/* RoyalBoyz approved premium image concept — v8.97. Isolated to the homepage only. */
:root{--portal-ink:#f5f7ff;--portal-muted:#c9d4f6;--portal-line:#6483d5;--portal-bg:#050b21}
html{scroll-behavior:smooth}
body.rb-home-body{margin:0;min-height:100vh;background:#040d28;color:#f5f7ff;font-family:system-ui,-apple-system,"Segoe UI","Malgun Gothic",sans-serif}
body.rb-home-body::before{content:"";position:fixed;z-index:-1;inset:0;background:radial-gradient(ellipse at 50% 34%,#0e2665 0%,#061436 53%,#03091d 100%);pointer-events:none}
.rb-portal,.rb-portal *{box-sizing:border-box}
.rb-portal a{color:inherit}
.rb-portal button{font:inherit}
.portal-ref-hero{position:relative;width:100%;line-height:0;isolation:isolate}
.portal-desktop-hero-image{width:100%;height:auto;display:block}
.portal-ref-logo-hotspot{position:absolute;left:1.8%;top:3.8%;width:21%;height:22%;z-index:3;border-radius:8px}
.portal-desktop-nav{position:absolute;right:2.7%;top:2%;height:19%;width:27.8%;display:flex;gap:0;z-index:3}
.portal-desktop-nav a{display:block;height:100%;flex:1}
.portal-desktop-nav a:nth-child(1){flex:1.32}
.portal-desktop-nav a:nth-child(2){flex:.72}
.portal-desktop-nav a:nth-child(3){flex:1.22}
.portal-desktop-nav a:nth-child(4),.portal-desktop-nav a:nth-child(5){flex:.7}
.portal-ref-hero a:hover{background:rgba(74,136,231,.09)}
.portal-ref-hero a:focus-visible,.portal-ref-card:focus-visible{outline:3px solid #7be3ff;outline-offset:3px}
.portal-ref-gallery{width:calc(100% - 2.9%);max-width:1601px;margin:0 auto;display:grid;gap:21px}
.portal-ref-row{display:grid;align-items:stretch;gap:18px}
.portal-ref-primary{grid-template-columns:524fr 520fr 525fr}
.portal-ref-secondary{grid-template-columns:397fr 382fr 383fr 394fr;gap:16px}
.portal-ref-card{appearance:none;position:relative;display:block;min-width:0;width:100%;border:0;background:none;border-radius:20px;overflow:hidden;padding:0;line-height:0;text-decoration:none;cursor:pointer;transition:filter .17s ease,transform .17s ease;box-shadow:0 10px 16px rgba(0,3,13,.18);isolation:isolate;background-color:#07143a}
.portal-ref-card::after{content:'';position:absolute;inset:0;border-radius:inherit;border:1px solid rgba(123,190,255,.58);box-shadow:inset 0 1px 0 rgba(226,246,255,.72),inset 0 0 0 1px rgba(118,165,255,.22),inset 0 -1px 0 rgba(42,86,178,.44);pointer-events:none;z-index:2}
.portal-ref-card img{position:absolute;left:-6px;top:-6px;display:block;width:calc(100% + 12px);height:calc(100% + 12px);max-width:none;object-fit:cover;object-position:center center;user-select:none;pointer-events:none}
.portal-ref-card-music{aspect-ratio:524/207}
.portal-ref-card-app{aspect-ratio:520/207}
.portal-ref-card-cad{aspect-ratio:525/207}
.portal-ref-card-gif{aspect-ratio:397/217}
.portal-ref-card-photo{aspect-ratio:382/217}
.portal-ref-card-units{aspect-ratio:383/217}
.portal-ref-card-games{aspect-ratio:394/217}
.portal-ref-card:hover{filter:brightness(1.11) drop-shadow(0 0 8px #3473d688);transform:translateY(-3px)}
.portal-ref-card:focus-visible{outline-offset:5px}
.portal-sr-title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.portal-ref-bottom{width:100%;aspect-ratio:1672 / 94;background:url('/assets/home/portal-v8_97/ending-v8_98.png') top center/100% 100% no-repeat}
.portal-mobile-header{display:none}
.rb-portal .portal-dialog{color:#f8faff;background:linear-gradient(145deg,#14244f,#090f2a);border:1px solid #7795e3;border-radius:20px;box-shadow:0 25px 90px #000b;padding:32px;max-width:min(440px,calc(100% - 40px))}
.rb-portal .portal-dialog::backdrop{background:#010615bf;backdrop-filter:blur(6px)}
.rb-portal .portal-dialog h2{margin:0 0 12px;color:#f6faff;font-size:27px}
.rb-portal .portal-dialog p{font-size:15px;line-height:1.8;color:#c4d3ee}
.rb-portal .portal-dialog button{cursor:pointer;margin-top:14px;background:#2864d3;border:1px solid #7fa9ff;border-radius:12px;color:white;padding:10px 24px;font-weight:750}
body.rb-home-body .footer{border-top:1px solid #384872;background:#070d24}
body.rb-home-body .footer .brand{color:#f6f8ff}
body.rb-home-body .rb-private-dialog{color:#fff}
/* English edition uses the same art and the same grid, with real localized captions. */
.portal-en-hero{height:clamp(245px,19vw,330px);background:radial-gradient(ellipse at center bottom,#112f77,#04112e 72%);overflow:hidden}
.portal-en-wave{position:absolute;bottom:-14%;height:110%;width:33%;opacity:.94;background-size:100% 100%;background-repeat:no-repeat}
.portal-en-wave-left{left:0;background-image:url('/assets/home/portal/hero-left.webp')}
.portal-en-wave-right{right:0;background-image:url('/assets/home/portal/hero-right.webp')}
.portal-en-hero-brand{display:flex;align-items:center;flex-direction:column;justify-content:flex-end;position:absolute;inset:6% 12% 7%;line-height:1}
.portal-en-hero-brand>img{width:160px;height:91px;object-fit:cover;object-position:center;filter:drop-shadow(0 0 10px #dbeaff8c)}
.portal-en-hero-brand .portal-brand-title{font:normal clamp(57px,6vw,116px)/1 Georgia,'Times New Roman',serif;letter-spacing:-.04em;white-space:nowrap;color:#fff;margin:0;text-shadow:0 3px 2px #bac1d2,0 0 22px #7893d660,0 6px 14px #000}
.portal-en-hero-brand p{font-size:clamp(12px,1.45vw,24px);letter-spacing:.02em;line-height:1.4;color:white;margin:9px 0 0;text-align:center}
.portal-en-logo{top:5%;left:2%;height:auto;width:auto;padding:8px 4px;font:bold 22px Georgia,serif;color:white;text-decoration:none;line-height:1.2}
.portal-en-nav{position:absolute;right:3.3%;top:7%;display:flex;gap:22px;align-items:center;line-height:1.3}
.portal-en-nav>a{font-size:14px;font-weight:650;text-decoration:none}
.portal-lang{display:flex;gap:2px;border-radius:99px;border:1px solid #5672aa;background:#081637;padding:3px}
.portal-lang a{font-size:13px;text-decoration:none;border-radius:30px;font-weight:800;padding:6px 9px}
.portal-lang a.active{background:#326fd9;color:#fff}
.portal-en-copy{position:absolute;left:5%;top:8%;height:71%;width:65%;background:linear-gradient(100deg,#112c63 0%,#0b2557 71%,transparent 100%);color:#fff;padding:15px 0 0 5%;display:flex;flex-direction:column;gap:19px;line-height:1.2;text-shadow:0 1px 4px #00112a}
.portal-en-copy strong{font-size:clamp(17px,1.8vw,31px)}
.portal-en-copy small{font-size:clamp(11px,.9vw,15px);line-height:1.5;max-width:67%}
.portal-ref-secondary .portal-en-copy{padding-top:10px;gap:15px;left:4%;width:73%}
.portal-ref-secondary .portal-en-copy strong{font-size:clamp(17px,1.5vw,26px)}
.portal-ref-secondary .portal-en-copy small{max-width:65%}
@media(min-width:1700px){.portal-ref-hero,.portal-ref-bottom{max-width:1900px;margin-left:auto;margin-right:auto}}
@media(max-width:900px){
 .portal-ref-gallery{width:calc(100% - 28px);gap:16px}
 .portal-ref-row{gap:12px}
 .portal-ref-primary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .portal-ref-secondary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .portal-ref-primary .portal-ref-card:last-child{grid-column:span 2;max-width:calc((100% - 12px)/2);justify-self:center}
 .portal-ref-hero{display:none}
 .portal-mobile-header{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:74px;padding:10px 16px;background:#06122f;border-bottom:1px solid #304a7b;position:relative;z-index:12}
 .portal-mobile-logo img{display:block;width:min(195px,42vw);height:auto}
 .portal-mobile-actions{display:flex;align-items:center;gap:12px}
 .portal-menu-button{display:grid;place-items:center;border:1px solid #4964a6;background:#172755;color:#fff;border-radius:10px;font-size:23px;width:43px;height:42px;cursor:pointer}
 .portal-nav{display:none;position:absolute;right:14px;top:calc(100% - 1px);border:1px solid #567cc4;border-radius:13px;background:#0a1735;box-shadow:0 14px 24px #0009;min-width:182px;padding:10px}
 .portal-nav.open{display:flex;flex-direction:column}
 .portal-nav a{display:block;color:#fff;padding:12px 13px;font-weight:650;text-decoration:none}
 .portal-ref-gallery:before{content:"";display:block;grid-column:1;justify-self:center;width:min(75vw,560px);height:155px;margin:20px auto 4px;background:url('/assets/home/portal-v8_97/mobile-crown.png') top center/110px auto no-repeat;pointer-events:none}
 .portal-ref-gallery:after{content:"";position:absolute;z-index:-1;left:0;right:0;top:75px;height:240px;background:radial-gradient(ellipse at center,#173878 0,#06122e 80%)}
 .portal-ref-gallery{position:relative}
 .portal-ref-gallery:before{background-position:center top}
 .portal-en-copy{gap:10px;padding-top:7px}
 .portal-en-copy strong{font-size:clamp(15px,2.1vw,25px)}
 .portal-en-copy small{font-size:clamp(10px,1.5vw,14px)}
}
@media(max-width:570px){
 .portal-mobile-header{min-height:68px}
 .portal-ref-gallery{width:calc(100% - 24px);gap:12px}
 .portal-ref-primary,.portal-ref-secondary{grid-template-columns:1fr;gap:12px}
 .portal-ref-primary .portal-ref-card:last-child{grid-column:auto;max-width:none}
 .portal-ref-gallery:before{height:132px;width:100%;margin:18px 0 0;background-size:118px auto}
 .portal-ref-gallery{padding-top:0}
 .portal-ref-card{border-radius:16px}
 .portal-ref-bottom{height:55px;aspect-ratio:auto;background-size:cover}
 .portal-en-copy{gap:14px;padding-top:15px}
 .portal-en-copy strong{font-size:clamp(21px,6vw,28px)}
 .portal-en-copy small{font-size:clamp(12px,3.2vw,15px)}
 .portal-ref-secondary .portal-en-copy strong{font-size:clamp(19px,5.2vw,26px)}
}
@media(prefers-reduced-motion:reduce){.portal-ref-card{transition:none}}

/* Mobile hero: real selectable title and visible decorative silver crown. */
.portal-visually-hidden{position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap}
.portal-mobile-hero{display:none}
@media(max-width:900px){
 .portal-mobile-hero{height:240px;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;overflow:hidden;background:radial-gradient(ellipse at center bottom,#143b83,#071631 65%,#06122e 100%);isolation:isolate}
 .portal-mobile-hero:before,.portal-mobile-hero:after{content:'';position:absolute;bottom:3px;width:55%;height:120px;pointer-events:none;z-index:-1;opacity:.85;background-size:cover;background-position:center}
 .portal-mobile-hero:before{left:0;background-image:url('/assets/home/portal/hero-left.webp')}
 .portal-mobile-hero:after{right:0;background-image:url('/assets/home/portal/hero-right.webp')}
 .portal-mobile-hero img{mix-blend-mode:screen;width:145px;height:82px;object-fit:cover;object-position:top center}
 .portal-mobile-hero .portal-brand-title{font:normal clamp(38px,7vw,73px)/1.06 Georgia,'Times New Roman',serif;letter-spacing:-.045em;margin:1px 0 0;background:linear-gradient(175deg,#fff 9%,#d4daee 45%,#fff 85%);background-clip:text;-webkit-background-clip:text;color:transparent;filter:drop-shadow(0 3px 6px #0009)}
 .portal-mobile-hero p{font-size:clamp(13px,2.6vw,19px);font-weight:650;margin:8px 0 0;line-height:1.4;text-align:center;text-shadow:0 1px 8px #000d}
 .portal-ref-gallery:before,.portal-ref-gallery:after{display:none!important;content:none!important}
 .portal-ref-gallery{padding-top:14px}
}
@media(max-width:570px){.portal-mobile-hero{height:210px}.portal-mobile-hero img{width:120px;height:76px}.portal-mobile-hero .portal-brand-title{font-size:clamp(37px,10vw,55px)}.portal-mobile-hero p{padding:0 8px;font-size:13px}}

/* English service captions: opaque enough to cover original Korean lettering fully. */
.portal-en-logo{font-size:0!important;display:block;min-width:254px;height:45px!important;background:url('/assets/home/portal-v8_97/mobile-logo.png') center left/contain no-repeat}
.portal-ref-card .portal-en-copy{left:0;top:0;width:87%;height:100%;padding:29px 12px 12px 39px;gap:20px;background:linear-gradient(90deg,#153568 0%,#11295b 78%,transparent 100%);align-items:flex-start}
.portal-ref-card .portal-en-copy strong{font-size:clamp(19px,2.0vw,31px);font-weight:820;white-space:nowrap}
.portal-ref-card .portal-en-copy small{font-size:clamp(12px,1vw,16px);line-height:1.5;max-width:66%;text-align:left}
.portal-ref-card .portal-en-copy:after{content:'→';position:absolute;left:39px;bottom:30px;width:60px;height:32px;display:grid;place-items:center;border:1px solid #5a89cf;border-radius:23px;background:linear-gradient(#24488b,#102858);font-size:21px;color:#fff}
.portal-ref-secondary .portal-en-copy{width:91%;padding:29px 6px 12px 32px;gap:20px}
.portal-ref-secondary .portal-en-copy strong{font-size:clamp(19px,1.7vw,27px)}
.portal-ref-secondary .portal-en-copy small{font-size:clamp(11px,.9vw,15px);max-width:65%}
.portal-ref-secondary .portal-en-copy:after{left:32px;bottom:27px;width:58px}
@media(max-width:900px){.portal-ref-card .portal-en-copy{padding:20px 10px 8px 22px}.portal-ref-card .portal-en-copy strong{font-size:clamp(17px,3vw,25px)}.portal-ref-card .portal-en-copy small{font-size:clamp(11px,1.6vw,14px)}.portal-ref-card .portal-en-copy:after{left:22px;bottom:13px}}
@media(max-width:570px){.portal-ref-card .portal-en-copy strong{font-size:clamp(19px,6vw,28px)}.portal-ref-card .portal-en-copy small{font-size:clamp(12px,3.2vw,15px)}.portal-ref-card .portal-en-copy{gap:12px;padding-top:22px}.portal-ref-card .portal-en-copy:after{bottom:12px}}

/* Keep the translated cards free of visible Korean fragments from the artwork. */
.portal-ref-card .portal-en-copy{width:94%;background:linear-gradient(90deg,#153568 0%,#11295b 84%,transparent 100%)}
.portal-ref-secondary .portal-en-copy{width:96%}

/* v8.100 — seven equal-height homepage cards with consistent, smooth corners.
   Scope: the seven homepage service cards only; artwork and links stay unchanged. */
.portal-ref-gallery{container-type:inline-size}
.portal-ref-gallery .portal-ref-card{
 border-radius:24px;
 overflow:hidden;
 isolation:isolate;
}
.portal-ref-gallery .portal-ref-card>img{border-radius:inherit}
.portal-ref-gallery .portal-ref-card::after{
 content:"";
 position:absolute;
 inset:0;
 z-index:2;
 border:1px solid rgba(95,175,250,.45);
 border-radius:inherit;
 pointer-events:none;
}
@media (min-width:901px){
 /* 207px high at the 1601px art-gallery width, scaled in exact proportion. */
 .portal-ref-gallery .portal-ref-row{grid-auto-rows:12.93cqw}
 .portal-ref-gallery .portal-ref-card{height:100%}
 /* Do not crop the lettering, icon, or artwork at the edges. */
 .portal-ref-gallery .portal-ref-card>img{
  width:100%;
  height:100%;
  object-fit:fill;
 }
}
@media (max-width:900px){
 /* Preserve the original artwork proportions in the responsive layout. */
 .portal-ref-gallery .portal-ref-card{border-radius:22px}
}
