/* CloudTreoMay dark surface skin. All assets are static, local and cacheable. */
.app-shell,.webapp-auth {
  --game-gold:#d3b77e; --game-edge:#38bdf830; --cloud-accent:#38bdf8;
  background-color:#0d151d;
  background-image:
    radial-gradient(900px 420px at 85% -8%, #38bdf818, transparent 62%),
    radial-gradient(640px 360px at 12% 10%, #d3b77e12, transparent 60%),
    linear-gradient(180deg,#0d151d,#0b1219);
  background-position:center top; background-size:cover; background-attachment:fixed;
}
.app-shell .appbar { background:#0f1924f5; border-bottom:1px solid var(--game-edge); box-shadow:0 8px 30px #0003; }
.app-shell .app-heading {
  position:relative; isolation:isolate; min-height:152px; box-sizing:border-box;
  padding:28px 34px; margin:0 0 24px; overflow:hidden; border:1px solid var(--game-edge);
  border-radius:18px;
  background:
    radial-gradient(520px 220px at 88% 20%, #38bdf822, transparent 70%),
    radial-gradient(360px 180px at 76% 90%, #d3b77e16, transparent 72%),
    linear-gradient(115deg,#101d2b 0%,#122234 55%,#0e1925 100%);
  box-shadow:inset 0 1px 0 #38bdf824,0 14px 40px #0003;
}
.app-heading::before {
  content:""; position:absolute; z-index:-1; right:-40px; top:-60px; width:300px; height:300px;
  border-radius:50%; background:radial-gradient(circle,#38bdf81f 0%,transparent 68%);
  pointer-events:none;
}
.app-heading::after {
  content:""; position:absolute; z-index:-1; right:24px; top:50%; transform:translateY(-50%);
  width:180px; height:180px; border-radius:28px; pointer-events:none;
  background:radial-gradient(circle at 50% 50%,#38bdf814,#0d151d00 70%);
  border:1px solid #38bdf818;
}
.app-heading > div { max-width:74%; }
.app-shell .app-heading h1 { font-size:clamp(26px,3vw,36px); line-height:1.15; letter-spacing:-.6px; color:#fff; text-shadow:0 2px 14px #0006; margin:8px 0 10px; }
.app-heading .eyebrow { color:#7dd3fc; letter-spacing:.18em; font-weight:700; }
.app-heading .muted { color:#ced8e3; max-width:480px; line-height:1.6; }
.app-shell .game-account-card,.app-shell .surface-card,.app-shell .solo-card,.app-shell .dungeon-team-card {
  border:1px solid var(--game-edge); border-radius:16px;
  background-color:#15202b; background-image:linear-gradient(145deg,#ffffff04,transparent 45%);
  box-shadow:inset 0 0 0 1px #ffffff06,0 12px 28px #0002;
}
.app-shell .game-account-card > header,.app-shell .solo-card > header,.app-shell .dungeon-team-card > header {
  padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid var(--game-edge);
  background:none;
}
.app-shell .game-account-card > header h2,.app-shell .solo-card > header h2 { display:flex; gap:12px; align-items:center; min-height:48px; }
.game-account-card > header h2::before,.solo-card > header h2::before { content:""; width:48px; height:48px; flex:none; background:url("../game-ui/account.5eb8f420a82b.webp") center/42px no-repeat; filter:drop-shadow(0 3px 5px #0005); }
.train-account-card > header h2::before { background-image:url("../game-ui/auto.0b9c5c06634d.webp"); }
.inventory-card > header h2::before { background-image:url("../game-ui/bag.c3cf2b6cf859.webp"); }
.solo-card > header h2::before { background-image:url("../game-ui/dungeon.6649db73daa8.webp"); }
.app-shell h2,.app-shell h3,.app-shell summary { color:#f6efe3; }
.app-shell input:not([type=checkbox]):not([type=radio]),.app-shell select,.app-shell textarea { background-color:#101a22; border-color:#6e725e66; box-shadow:inset 0 2px 6px #0003; }
.app-shell input:focus-visible,.app-shell select:focus-visible,.app-shell textarea:focus-visible,.app-shell button:focus-visible { outline:2px solid #e7cc92; outline-offset:3px; }
.app-shell button.primary,.app-shell #add-account,.app-shell .train-card-actions button,.app-shell [data-solo=run],.app-shell [data-team=run] { background:linear-gradient(#4c4935,#353b32); border:1px solid #bba16699; color:#fff8e9; box-shadow:inset 0 1px #fff2,0 3px 8px #0003; }
.app-shell button:hover:not(:disabled) { border-color:#c5ac76; }
.app-shell .card-connection[aria-checked=true] { border-color:#b8af7888; background:#38453455; }
.app-shell input[type=checkbox] { accent-color:#c7ac6e; }
.app-shell .floating-dock { background:#15212af5; border-color:#c2a46b66; box-shadow:inset 0 0 0 3px #10182077,0 12px 36px #0007; }
.app-shell .floating-dock button[aria-current=page] { background:#b59b6230; box-shadow:inset 0 0 0 1px #ddc18a55; }
.app-shell .floating-dock .game-nav-icon { filter:drop-shadow(0 3px 3px #0006); }
.app-shell .overview-intro { background:linear-gradient(110deg,#25323d,#18232d); border:1px solid var(--game-edge); border-radius:16px 4px; }
.app-shell .metric-card { border-color:var(--game-edge); background:#18242e; }
.app-shell .metric-card strong { color:#f1dfb5; }
/* Reuse native pictures as semantic landmarks, not as replacement labels. */
.daily-checks label::before { content:""; flex:none; width:26px; height:26px; background:center/contain no-repeat; }
.daily-checks label:has([data-option=checkin])::before { background-image:url("../game-ui/checkin.6591014c9fd5.webp"); }
.daily-checks label:has([data-option=online])::before,.daily-checks label:has([data-option=friend_receive])::before,.daily-checks label:has([data-option=friend_send])::before { background-image:url("../game-ui/gift.8859e9d13083.webp"); }
.daily-checks label:has([data-option=mail])::before { background-image:url("../game-ui/mail.fd38e0c1e032.webp"); }
.daily-checks label:has([data-option=escort])::before { background-image:url("../game-ui/castle.e823f8e87fee.webp"); }
.daily-checks label:has([data-option=guild_sign])::before { background-image:url("../game-ui/scroll.f34a84207273.webp"); }
.daily-checks label:has([data-option=guild_boss])::before { background-image:url("../game-ui/swords.a745a6d34d17.webp"); }
.daily-checks label:has([data-option=summon])::before,.daily-checks label:has([data-option=card])::before { background-image:url("../game-ui/scroll.f34a84207273.webp"); }
.daily-checks label:has([data-option=summon_box])::before,.daily-checks label:has([data-option=pearl_box])::before { background-image:url("../game-ui/treasure.ca83a95f7e2f.webp"); }
.account-card-stats div:has([data-field=gold]) dt::before,.account-card-stats div:has([data-field=sp]) dt::before,.account-card-stats div:has([data-field=guild_coins]) dt::before { content:""; display:inline-block; width:18px; height:18px; vertical-align:-4px; margin-right:5px; background:center/contain no-repeat; }
.account-card-stats div:has([data-field=gold]) dt::before,.account-card-stats div:has([data-field=guild_coins]) dt::before { background-image:url("../game-ui/coins.1e458920c85b.webp"); }
.account-card-stats div:has([data-field=sp]) dt::before { background-image:url("../game-ui/energy.6bb9f8572a63.webp"); }
.app-shell .bag-slot { border:5px solid transparent; border-image:url("../game-ui/slot-frame.4def78347e20.webp") 14 fill stretch; border-radius:4px; background:#141b29; padding:5px 3px; }
.bag-slot img { filter:drop-shadow(0 3px 3px #0006); }
.bag-points > div { background:#101c26; border-color:var(--game-edge); }
.bag-points dt::before { content:""; display:inline-block; width:22px; height:22px; vertical-align:-6px; margin-right:6px; background:center/contain no-repeat; }
.bag-points [data-stat=int] dt::before { background-image:url("../game-ui/scroll.f34a84207273.webp"); }
.bag-points [data-stat=atk] dt::before { background-image:url("../game-ui/attack.374ce1ac5332.webp"); }
.bag-points [data-stat=def] dt::before { background-image:url("../game-ui/shield.fad877b68a0d.webp"); }
.bag-points [data-stat=agi] dt::before { background-image:url("../game-ui/speed.423fdb155bdd.webp"); }
.bag-points [data-stat=hpx] dt::before { background-image:url("../game-ui/hp.d79cee3248d8.webp"); }
.bag-points [data-stat=spx] dt::before { background-image:url("../game-ui/energy.6bb9f8572a63.webp"); }
.app-shell .train-board { padding:16px 12px; border:1px solid var(--game-edge); border-radius:12px; background:linear-gradient(180deg,#13212ef5,#101a24f8); }
.train-board-side h4::before { content:""; display:block; width:34px; height:34px; margin:0 auto 6px; background:url("../game-ui/account.5eb8f420a82b.webp") center/contain no-repeat; }
.train-board-side[data-side=enemy] h4::before { background-image:url("../game-ui/swords.a745a6d34d17.webp"); }
.app-shell .train-account-card .training-cell:not(.empty) { border:4px solid transparent; border-image:url("../game-ui/gold-frame.451953def8f8.webp") 13 fill stretch; background:#181e2b; border-radius:4px; }
.app-shell .training-cell.empty { border-color:#8b784c55; background:#101a2133; }
.train-hp-bar { width:100%; height:5px; flex:none; border:0; appearance:none; }
.train-hp-bar::-webkit-meter-bar { background:#080f14; border:0; border-radius:2px; }
.train-hp-bar::-webkit-meter-optimum-value { background:#bc645a; border-radius:2px; }
.app-shell .solo-card { background-image:linear-gradient(100deg,#17212af0,#17212afa),url("../game-ui/treasure.ca83a95f7e2f.webp"); background-position:center,right 20px top 70px; background-size:cover,125px; background-repeat:no-repeat; }
.app-shell .dungeon-team-card { background-image:linear-gradient(100deg,#17212af2,#17212afa),url("../game-ui/castle.e823f8e87fee.webp"); background-position:center,right 24px top 70px; background-size:cover,125px; background-repeat:no-repeat; }
/* Clean Cloud hosting backdrop for authentication pages. */
.webapp-auth {
  background-image:
    radial-gradient(760px 420px at 78% 18%, #38bdf81c, transparent 64%),
    radial-gradient(560px 360px at 22% 84%, #d3b77e12, transparent 62%),
    linear-gradient(135deg,#0b131c 0%,#0f1b28 52%,#0c151f 100%);
}
.webapp-auth::before {
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:radial-gradient(#38bdf814 1px, transparent 1px);
  background-size:28px 28px; opacity:.45;
}
.webapp-auth .auth-card { position:relative; z-index:1; background:#131f2cf5; border:1px solid #38bdf83d; border-radius:18px; box-shadow:inset 0 1px 0 #ffffff0d,0 24px 80px #0007; }
.webapp-auth .auth-brand .brand-mark { width:52px; height:52px; background:none; border-radius:14px; overflow:hidden; }
.webapp-auth .auth-brand img { width:52px; height:52px; object-fit:contain; border-radius:12px; }
.webapp-auth button.primary { background:linear-gradient(180deg,#0ea5e9,#0284c7); border-color:#38bdf8; color:#fff; }
@media(max-width:700px) {
 .app-shell .app-heading { min-height:132px; padding:20px 18px; margin-bottom:18px; border-radius:14px; }
 .app-heading::after { width:110px; height:110px; right:10px; opacity:.55; }
 .app-heading::before { width:180px; height:180px; }
 .app-heading > div { max-width:100%; }
 .app-heading .muted { max-width:100%; font-size:13px; }
 .app-shell .game-account-card > header { padding-bottom:14px; }
 .game-account-card > header h2::before,.solo-card > header h2::before { width:36px; height:40px; background-size:34px; }
 .game-account-card > header h2 { gap:7px; font-size:16px; }
 .app-shell .train-board { padding:12px 6px; }
 .daily-checks label::before { width:22px; height:22px; }
 .webapp-auth::before { opacity:.3; }
}
@media(prefers-reduced-motion:reduce) { .app-shell * { scroll-behavior:auto; } }
.app-shell .game-account-card > header,.app-shell .solo-card > header,.app-shell .dungeon-team-card > header {
  background:none;
}
#teams-heading::before,.dungeon-team-heading h2::before { content:""; display:inline-block; width:34px; height:34px; margin-right:10px; vertical-align:-9px; background:url("../game-ui/castle.e823f8e87fee.webp") center/contain no-repeat; }
.dungeon-team-heading h2::before { background-image:url("../game-ui/swords.a745a6d34d17.webp"); }
@media(max-width:700px) {
 .app-shell .bag-points { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.app-shell .session-monogram { color:transparent; font-size:0; border-color:var(--game-edge); background:#14212a url("../game-ui/account.5eb8f420a82b.webp") center/30px no-repeat; }
/* Space for the optional HP meter inside the native frame, including on phone. */
.app-shell .train-account-card .training-cell:not(.empty) { gap:2px; }

/* Keep scrolling cheap: no full-page fixed wallpaper or backdrop blur layers. */
.app-shell { background-attachment:scroll; background-size:100% 720px; background-repeat:no-repeat; }
.app-shell .appbar { background:#101922; backdrop-filter:none; -webkit-backdrop-filter:none; }
.app-shell .floating-dock { background:#15212a; backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:0 5px 18px #0006; }
.app-shell .bag-slot img,.app-shell .floating-dock .game-nav-icon { filter:none; }
.app-shell .app-heading { min-height:132px; padding:22px 28px; margin-bottom:20px; box-shadow:inset 0 0 0 1px #10192388; }
.app-shell .app-heading h1 { font-size:clamp(25px,3vw,32px); margin:6px 0 8px; }
.app-shell .game-account-card { box-shadow:inset 0 0 0 1px #0b141855; }
@media(max-width:700px) {
 .app-shell .app-heading { min-height:112px; padding:16px 18px; margin-bottom:16px; }
 .app-shell .app-heading .muted { font-size:12px; }
}
