/* Public inner pages only: an original, continuous Scarab Heart sanctuary.
   Homepage, embedded game surface, private management and API pages are untouched. */
body.scarab-inner-page{
  isolation:isolate;min-height:100vh;
  background:#080a0e!important;background-image:none!important;
  color:#eee6d4;
}
body.scarab-inner-page::before{
  content:""!important;display:block!important;position:fixed!important;
  inset:0!important;width:100%!important;height:100%!important;z-index:-1!important;
  pointer-events:none!important;opacity:1!important;transform:none!important;filter:none!important;
  background-color:#080a0e!important;
  background-image:linear-gradient(180deg,rgba(8,10,14,.08),rgba(8,10,14,.28) 66%,rgba(8,10,14,.56)),url('/images/scarab-inner-sanctuary.svg')!important;
  background-position:center center,center top!important;
  background-size:cover,cover!important;background-repeat:no-repeat!important;
  background-attachment:scroll!important;
}
body.scarab-inner-page::after{display:none!important}
body.scarab-inner-page .page-noise{display:none!important}
body.scarab-inner-page main{position:relative;background:transparent!important;background-image:none!important}
body.scarab-inner-page .route-view.active:not([data-route="/"]){position:relative;background:transparent!important;background-image:none!important}
body.scarab-inner-page .route-view.active:not([data-route="/"])::before,
body.scarab-inner-page .route-view.active:not([data-route="/"])::after,
body.scarab-inner-page .route-view.active:not([data-route="/"]) :is(.subpage,.v88-page,.v99-trial,.tz-auth-page,.member-page)::before,
body.scarab-inner-page .route-view.active:not([data-route="/"]) :is(.subpage,.v88-page,.v99-trial,.tz-auth-page,.member-page)::after{display:none!important}
body.scarab-inner-page .route-view.active:not([data-route="/"]) :is(.subpage,.v88-page,.v99-trial,.tz-auth-page,.member-page){background:transparent!important;background-image:none!important}
@media(max-width:700px){
 body.scarab-inner-page::before{
  background-image:linear-gradient(180deg,rgba(8,10,14,.18),rgba(8,10,14,.50) 76%,rgba(8,10,14,.68)),url('/images/scarab-inner-sanctuary.svg')!important;
  background-size:cover,auto 100%!important;
 }
}
body.scarab-inner-page .route-view.active :is(.feature-card,.guide-card,.faq-item,.download-card,.install-card,.support-card,.member-card,.security-card,.update-card,.about-card){background:#111418!important;background-image:linear-gradient(145deg,#bd985319,transparent 54%)!important;color:#f3e6c5;border:1px solid #97763880!important;box-shadow:inset 0 1px #ffe6a512,0 12px 32px #0003!important}
body.scarab-inner-page .route-view.active :is(.sub-hero,.about-hero){background:#11151bea!important;background-image:radial-gradient(ellipse at 100% 0,#bc944b1e,transparent 64%)!important;border:1px solid #ae8d4a77!important;color:#f4dfaa;box-shadow:inset 0 0 0 4px #d6b36505,0 18px 40px #0003!important}
body.scarab-inner-page :is(.cards .card,.article-aside,.comments form){background:#111418f2!important;background-image:linear-gradient(135deg,#d8af4c0c,transparent 65%)!important;color:#f3e6c5;border-color:#98773a85!important;box-shadow:inset 0 1px #ffe6a510,0 12px 28px #0003}
body.scarab-inner-page .card p,body.scarab-inner-page .article-aside p{color:#bfc7cf}
body.scarab-inner-page .card h2{color:#f0dfb5}
body.scarab-inner-page .hero{border-color:#98773b90;box-shadow:0 18px 40px #0005;color:#f5f1e7}
body.scarab-inner-page .hero p{color:#c2c8ce}
body.scarab-inner-page .library>.section-head h2{color:#f0e4c8}
body.scarab-inner-page .library>.section-head>span,body.scarab-inner-page .library>.section-head>a{color:#aeb6c0}
body.scarab-inner-page .library .eyebrow{color:#cfaf6d;font-weight:600}
body.scarab-inner-page .search label{color:#c0c6ce}
body.scarab-inner-page .tabs{border-color:#997e4538}
body.scarab-inner-page .tabs a{background:#111a26a6;color:#bfc6d0;border-color:#8e773850;font-weight:500}
body.scarab-inner-page .tabs a.active{background:#b99a4520;color:#f3d590;border-color:#c7a354}
body.scarab-inner-page .article-top{color:#eee6d4;text-shadow:none}
body.scarab-inner-page .article-top h1{color:#f3e8d0}
body.scarab-inner-page .article-top .lead{color:#c1c9d3}
body.scarab-inner-page .article-top :is(.byline,.crumb){color:#a5afbd}
body.scarab-inner-page .article-top .eyebrow{color:#cfaf6d}
body.scarab-inner-page .reading{background:#101419ef;border:1px solid #ae8d4a50;padding:28px;color:#dedfdc;box-shadow:0 16px 40px #0003}
body.scarab-inner-page .reading p{color:#c7cdd4;text-shadow:none}
body.scarab-inner-page .reading h2{color:#e9d4a1;text-shadow:none}
body.scarab-inner-page .reading .toc{background:#18202ab0;border-color:#b2924d;color:#e9d4a1}
body.scarab-inner-page .reading .toc a{color:#bfc8d3}
body.scarab-inner-page .reading .note{background:#9f7e2c0c;color:#cbb88d;border-color:#a98b414f}
body.scarab-inner-page .reading .note a{color:#e5c781;font-weight:600}
body.scarab-inner-page .reading .eyebrow{color:#cfaf6d}
body.scarab-inner-page .comments form,body.scarab-inner-page .comments form :is(p,label,.eyebrow){color:#d7d7cc}
body.scarab-inner-page .reading section{scroll-margin-top:108px}
body.scarab-inner-page .library>.empty{color:#c0c7cf}
body.scarab-inner-page footer:not(.site-footer){background:#080e17;color:#b6bfca}
@media(max-width:600px){body.scarab-inner-page .reading{padding:18px}}
body.scarab-popup-open{overflow:hidden}
.scarab-welcome{--promo-gold:#e2bd66;position:fixed;width:min(390px,calc(100vw - 44px));max-height:calc(100dvh - 56px);padding:0;border:1px solid #c8a752;border-radius:19px;overflow:visible;background:#071b18;color:#f6eac9;box-shadow:0 0 0 5px #bca35712,0 30px 100px #000a,0 0 65px #a887262a;font-family:-apple-system,BlinkMacSystemFont,'Microsoft JhengHei',sans-serif}
.scarab-welcome::backdrop{background:#050c09b8;-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px)}
.scarab-welcome:not([open]){display:none}
.scarab-welcome[open]{animation:scarabWelcomeIn .28s ease-out}
.scarab-welcome__content{position:relative;isolation:isolate;border-radius:18px;overflow:hidden;padding:26px 20px 16px;text-align:center;background:radial-gradient(ellipse at 50% 0,#3b705734,transparent 60%),linear-gradient(130deg,#061610d9,#111b20ef),url('/scarab-papyrus.svg');background-size:auto,auto,512px 512px;max-height:calc(100dvh - 56px);overflow-y:auto}
.scarab-welcome__content::before{content:'';position:absolute;inset:8px;border:1px solid #c6a85045;border-radius:12px;pointer-events:none;z-index:-1}
.scarab-welcome__close{position:absolute;right:-12px;top:-12px;width:36px;height:36px;min-width:36px;border-radius:50%;border:1px solid #d8b65b;background:#0b1714;color:#f3d99d;font-size:25px;font-weight:300;line-height:1;cursor:pointer;z-index:2;box-shadow:0 3px 15px #0008;display:grid;place-items:center;padding:0}
.scarab-welcome__close:hover{background:#3d3820}
.scarab-welcome__brand{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 0 4px}
.scarab-welcome__brand img{width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 0 8px #d9b45444)}
.scarab-welcome__brand span{color:#ebcf8c;font-size:26px;font-weight:800;letter-spacing:3px;text-shadow:0 2px 2px #000}
.scarab-welcome__eyebrow{font-size:9px;letter-spacing:4px;color:#a9976a;margin:0 0 5px}
.scarab-welcome h2{font-family:'Noto Serif TC','Songti TC','PMingLiU',serif;font-size:50px;font-weight:900;line-height:1.16;letter-spacing:5px;margin:4px 0 7px;color:#f7de94;background:linear-gradient(#fff5c8,#f2cd6e 48%,#bd802c 57%,#ffdf87 82%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 3px 1px #2d1b04)}
.scarab-welcome__intro{font-size:12px;color:#c4c8b4;margin:0 0 15px;letter-spacing:1px}
.scarab-welcome__screens{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:stretch}
.scarab-welcome__screen{margin:0;padding:5px 5px 0;border:1px solid #ceaa55;border-radius:10px;background:linear-gradient(140deg,#05241b,#051511);box-shadow:0 0 13px #a77c2333,inset 0 0 0 2px #b99b4633;overflow:hidden;display:flex;flex-direction:column}
.scarab-welcome__screen img{display:block;width:100%;height:190px;object-fit:contain;object-position:center;background:#071b19;border-radius:5px}
.scarab-welcome__screen figcaption{font-size:12px;font-weight:700;color:#f2d794;border-top:1px solid #aa8e4366;margin:5px -5px 0;padding:7px 2px;background:#06140ee8;letter-spacing:1px}
.scarab-welcome__cta{display:flex;align-items:center;justify-content:center;gap:12px;background:linear-gradient(#fff1b3,#edcd77 35%,#d09a3e 82%,#f5d689);color:#39260b!important;border:1px solid #ffe5a2;border-radius:999px;min-height:44px;font-size:17px;font-weight:800;text-decoration:none;margin:16px 6px 8px;box-shadow:inset 0 0 0 2px #fff6,0 0 20px #ce9f3b3b;letter-spacing:2px}
.scarab-welcome__cta:hover{filter:brightness(1.1)}
.scarab-welcome__note{color:#b9bbaa;font-size:10px;letter-spacing:1px;margin:5px 0 0}
.scarab-welcome :is(a,button):focus-visible{outline:2px solid #fff0b3;outline-offset:4px}
@keyframes scarabWelcomeIn{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@media(max-width:540px){body.scarab-inner-page{background-attachment:scroll!important}.scarab-welcome{width:min(360px,calc(100vw - 40px))}.scarab-welcome__content{padding:23px 16px 14px}.scarab-welcome h2{font-size:45px}.scarab-welcome__screen img{height:174px}.scarab-welcome__brand span{font-size:25px}}
@media(max-height:650px){.scarab-welcome__content{padding-top:17px}.scarab-welcome h2{font-size:39px}.scarab-welcome__brand img{width:34px;height:34px}.scarab-welcome__screen img{height:130px}.scarab-welcome__intro{margin-bottom:9px}.scarab-welcome__cta{margin-top:10px}}
@media(prefers-reduced-motion:reduce){.scarab-welcome[open]{animation:none}}

/* Crisp, high-contrast Traditional Chinese popup typography. */
.scarab-welcome{font-family:-apple-system,BlinkMacSystemFont,"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;background:#0a121e}
.scarab-welcome__content{background:radial-gradient(ellipse at 50% 0,#b18b3830,transparent 62%),linear-gradient(145deg,#0c1727,#090f1b);padding-top:24px}
.scarab-welcome__brand span{font-family:"Noto Serif TC","Songti TC","PMingLiU",serif;font-size:28px;font-weight:800;letter-spacing:3px;color:#f5dda1;text-shadow:0 1px 1px #000}
.scarab-welcome__eyebrow{font-size:10px;letter-spacing:2px;color:#c3b991}
.scarab-welcome h2{font-family:"Noto Serif TC","Songti TC","PMingLiU",serif!important;font-size:50px;font-weight:900;line-height:1.2;letter-spacing:5px;background:linear-gradient(#fff5c8 0%,#f4d27b 44%,#d9a345 58%,#ffe19a 86%)!important;background-clip:text!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;color:#ffe3a0;filter:drop-shadow(0 2px 1px #30200c)!important;text-shadow:none!important;margin:9px 0 8px}
.scarab-welcome__intro{font-size:14px;line-height:1.65;color:#f0efdf;letter-spacing:.5px;margin-bottom:14px}
.scarab-welcome__screen{background:#0b1622}
.scarab-welcome__screen img{background:#0b1622}
.scarab-welcome__screen figcaption{font-size:13px;font-weight:700;line-height:1.55;letter-spacing:0;color:#ffdfa0;background:#0a111b}
.scarab-welcome__cta{font-size:18px;font-weight:800;letter-spacing:1px;line-height:1.6}
.scarab-welcome__note{font-size:12px;line-height:1.6;color:#d7d8d2;letter-spacing:0}
.scarab-welcome__preference{display:flex;align-items:center;justify-content:center;gap:9px;margin:14px 0 8px;font-size:14px;font-weight:600;line-height:1.5;color:#f0efdf;cursor:pointer}
.scarab-welcome__preference input{width:18px;height:18px;min-width:18px;margin:0;accent-color:#e2bd66;cursor:pointer}
@media(max-width:540px){.scarab-welcome h2{font-size:45px}.scarab-welcome__intro{font-size:13px}.scarab-welcome__screen figcaption{font-size:12px}.scarab-welcome__note{font-size:11px}}
@media(max-height:650px){.scarab-welcome h2{font-size:39px}.scarab-welcome__intro{margin-bottom:8px}.scarab-welcome__preference{margin:9px 0 5px}.scarab-welcome__screen img{height:120px}}

/* Two true product views: ranked rooms, then gameplay and floating controls. */
.scarab-welcome__ranking>img{height:220px;object-fit:cover;object-position:center top}
.scarab-welcome__game-and-panel{display:grid;grid-template-rows:100px 120px;min-height:220px;background:#07111c;border-radius:5px;overflow:hidden}
.scarab-welcome__game-and-panel img{height:100%;width:100%;object-fit:contain;background:#07111c;border-radius:0}
.scarab-welcome__game-and-panel .scarab-welcome__game-shot{border-bottom:1px solid #b59a4a44}
@media(max-width:540px){.scarab-welcome__ranking>img{height:200px}.scarab-welcome__game-and-panel{grid-template-rows:90px 110px;min-height:200px}}
@media(max-height:700px){.scarab-welcome__ranking>img{height:155px}.scarab-welcome__game-and-panel{grid-template-rows:70px 85px;min-height:155px}}

/* Isolate the dialog close control from shared button sizing and cyan focus styles. */
.scarab-welcome .scarab-welcome__close{
 -webkit-appearance:none!important;appearance:none!important;box-sizing:border-box!important;
 position:absolute!important;top:10px!important;right:10px!important;
 width:40px!important;height:40px!important;min-width:40px!important;max-width:40px!important;min-height:40px!important;max-height:40px!important;
 padding:0!important;margin:0!important;display:grid!important;place-items:center!important;
 border:1px solid #b99b58!important;border-radius:50%!important;
 background:#0a1320!important;color:#f3d995!important;
 font-family:Arial,sans-serif!important;font-size:25px!important;font-weight:400!important;line-height:1!important;
 outline:none!important;box-shadow:none!important;transform:none!important;text-shadow:none!important;
 cursor:pointer;overflow:hidden;z-index:3;
}
.scarab-welcome .scarab-welcome__close::before,.scarab-welcome .scarab-welcome__close::after{content:none!important;display:none!important}
.scarab-welcome .scarab-welcome__close:is(:hover,:focus-visible){outline:none!important;box-shadow:none!important;background:#352b19!important;border-color:#ffe6a6!important;color:#fff1c7!important}

/* Scale the established portrait layout uniformly on desktop. */
@media(min-width:901px) and (min-height:850px){
 .scarab-welcome{zoom:1.25;width:390px;max-height:calc((100dvh - 56px)/1.25)}
 .scarab-welcome__content{max-height:calc((100dvh - 56px)/1.25)}
}
@media(min-width:901px) and (min-height:701px) and (max-height:849px){
 .scarab-welcome{zoom:1.1;width:390px;max-height:calc((100dvh - 56px)/1.1)}
 .scarab-welcome__content{max-height:calc((100dvh - 56px)/1.1)}
}

/* Final welcome-dialog fit: keep the original portrait composition, independent of site-wide controls. */
.scarab-welcome{
  box-sizing:border-box;inset:0;margin:auto;max-width:calc(100vw - 40px);
  max-height:calc(100dvh - 40px);
}
.scarab-welcome__content{
  box-sizing:border-box;max-height:calc(100dvh - 42px);
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  scrollbar-width:thin;scrollbar-color:#a58a4e #0a1320;
}
.scarab-welcome__brand{padding-inline:30px;min-height:44px}
.scarab-welcome__brand span{white-space:nowrap}
.scarab-welcome__screens{grid-template-columns:repeat(2,minmax(0,1fr))}
.scarab-welcome__screen{min-width:0}
.scarab-welcome__screen figcaption{min-height:35px;display:grid;place-items:center;box-sizing:border-box}
.scarab-welcome__preference{min-height:32px}
.scarab-welcome h2:focus{outline:none}
.scarab-welcome .scarab-welcome__close:focus-visible{
  outline:2px solid #ffe6a6!important;outline-offset:3px!important;
  box-shadow:none!important;
}
@media(min-width:901px){
 .scarab-welcome{width:390px}
}
@media(min-width:901px) and (min-height:850px){
 .scarab-welcome{zoom:1.25;max-height:calc((100dvh - 56px)/1.25)}
 .scarab-welcome__content{max-height:calc((100dvh - 58px)/1.25)}
}
@media(min-width:901px) and (min-height:701px) and (max-height:849px){
 .scarab-welcome{zoom:1.1;max-height:calc((100dvh - 48px)/1.1)}
 .scarab-welcome__content{max-height:calc((100dvh - 50px)/1.1)}
}
@media(max-width:540px){
 .scarab-welcome__brand{padding-inline:28px}
 .scarab-welcome__brand span{font-size:25px}
 .scarab-welcome__content{max-height:calc(100dvh - 42px)}
}
@media(max-width:360px){
 .scarab-welcome{width:calc(100vw - 28px);max-width:calc(100vw - 28px)}
 .scarab-welcome__content{padding-inline:12px}
 .scarab-welcome__brand{gap:7px;padding-inline:24px}
 .scarab-welcome__brand img{width:34px;height:34px}
 .scarab-welcome__brand span{font-size:22px;letter-spacing:2px}
 .scarab-welcome h2{font-size:38px}
 .scarab-welcome__screens{gap:7px}
 .scarab-welcome__intro{font-size:12px}
}
@media(max-height:700px){
 .scarab-welcome__brand{min-height:34px}
 .scarab-welcome__preference{min-height:28px}
}
@media(max-height:480px) and (min-width:541px){
 .scarab-welcome__content{padding-top:16px}
 .scarab-welcome__ranking>img{height:120px}
 .scarab-welcome__game-and-panel{grid-template-rows:55px 65px;min-height:120px}
}

/* Sharper actual screenshots: keep the existing two-card composition and expose
   original image detail without resampling, artificial sharpening or fake data. */
.scarab-welcome__screens{gap:10px}
.scarab-welcome__screen{padding:4px 4px 0}
.scarab-welcome__screen figcaption{margin:5px -4px 0}
.scarab-welcome .scarab-welcome__image-button{
 position:relative;display:block;width:100%;min-width:0;min-height:0!important;
 margin:0!important;padding:0!important;border:0!important;border-radius:5px;
 background:#091c29!important;box-shadow:none!important;overflow:hidden;cursor:zoom-in;
 appearance:none;transform:none!important;
}
.scarab-welcome .scarab-welcome__image-button::before,.scarab-welcome .scarab-welcome__image-button::after{display:none!important;content:none!important}
.scarab-welcome .scarab-welcome__image-button img{
 display:block;width:100%;height:100%;max-width:none;max-height:none;
 image-rendering:auto;filter:none!important;transform:none!important;opacity:1!important;
 object-position:center top;border:0!important;border-radius:0;
}
.scarab-welcome__ranking .scarab-welcome__ranking-shot{height:220px}
.scarab-welcome__ranking .scarab-welcome__ranking-shot img{object-fit:cover}
.scarab-welcome__game-and-panel{grid-template-rows:100px 120px;min-height:220px;gap:0}
.scarab-welcome .scarab-welcome__game-shot img{object-fit:cover;object-position:32% center}
.scarab-welcome .scarab-welcome__panel-shot img{object-fit:contain;object-position:center center}
.scarab-welcome .scarab-welcome__game-and-panel .scarab-welcome__game-shot{border-bottom:1px solid #b59a4a44!important}
.scarab-welcome__zoom-mark{position:absolute;right:5px;bottom:5px;display:grid;place-items:center;width:22px;height:22px;border:1px solid #e6c581a0;border-radius:5px;background:#07111ddd;color:#ffe5a6;font:700 18px/1 Arial,sans-serif;pointer-events:none}
.scarab-welcome .scarab-welcome__image-button:focus-visible{outline:2px solid #ffe5a6!important;outline-offset:-2px!important}
.scarab-screen-viewer{position:fixed;inset:0;margin:auto;width:max-content;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);box-sizing:border-box;padding:0;border:1px solid #b99b58;border-radius:14px;color:#f3dda8;background:#07111c;overflow:auto;box-shadow:0 20px 80px #000b;overscroll-behavior:contain}
.scarab-screen-viewer::backdrop{background:#02060de8}
.scarab-screen-viewer header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:10px 14px;background:#0c1724;border-bottom:1px solid #b99b5850;font:700 14px/1.4 -apple-system,BlinkMacSystemFont,"Microsoft JhengHei",sans-serif}
.scarab-screen-viewer header button{display:grid;place-items:center;width:34px;height:34px;min-width:34px;min-height:34px;margin:0;padding:0;border:1px solid #b99b58;border-radius:50%;background:#0a1320;color:#f3d995;font:22px/1 Arial;cursor:pointer}
.scarab-screen-viewer__stage{padding:10px;overflow:auto;max-width:calc(100vw - 26px);box-sizing:border-box}
.scarab-screen-viewer__stage img{display:block;width:auto;height:auto;max-width:100%;max-height:none;margin:0 auto;image-rendering:auto;filter:none;object-fit:contain}
@media(max-width:540px){.scarab-welcome__ranking .scarab-welcome__ranking-shot{height:200px}.scarab-welcome__game-and-panel{grid-template-rows:90px 110px;min-height:200px}}
@media(max-width:360px){.scarab-welcome__screens{gap:7px}}
@media(max-height:700px){.scarab-welcome__ranking .scarab-welcome__ranking-shot{height:155px}.scarab-welcome__game-and-panel{grid-template-rows:70px 85px;min-height:155px}}
@media(max-height:480px) and (min-width:541px){.scarab-welcome__ranking .scarab-welcome__ranking-shot{height:120px}.scarab-welcome__game-and-panel{grid-template-rows:55px 65px;min-height:120px}}
