
.app-shell.is-first-entry {display:block;max-width:none;min-height:100svh;padding:0;gap:0;}
.app-shell.is-first-entry > .topbar,.app-shell.is-first-entry > .sidebar,.app-shell.is-first-entry > .mobile-nav {display:none!important;}
.app-shell.is-first-entry > .main-content {margin:0;padding:0;min-height:100svh;max-width:none;overflow:visible;}
.first-battles-welcome {position:relative;isolation:isolate;min-height:100svh;overflow:hidden;display:grid;grid-template-columns:minmax(0,540px) minmax(0,1fr);align-content:center;padding:clamp(20px,4vh,56px) clamp(24px,6vw,100px);color:#fff3da;background:#0a1017;}
.first-entry-background {position:absolute;inset:-8px;z-index:-1;background:linear-gradient(90deg,#05070cd9 0%,#090c12a8 48%,#080b1520 100%),var(--first-entry-scene) center/cover;filter:blur(3px);}
.first-entry-logo {position:relative;grid-column:1;z-index:0;justify-self:start;width:clamp(220px,28vw,430px);max-width:70vw;height:clamp(96px,18vh,180px);object-fit:contain;object-position:left center;margin-bottom:clamp(22px,4vh,48px);filter:drop-shadow(0 4px 14px #000);}
.first-entry-character {position:absolute;right:-2vw;top:6vh;bottom:0;width:min(55vw,900px);z-index:1;pointer-events:none;}
.first-entry-character::before {content:'';position:absolute;inset:12% 8% 3%;background:radial-gradient(ellipse,#c2904266 0%,#31568150 30%,transparent 67%);filter:blur(28px);}
.first-entry-character img {position:absolute;top:0;left:0;width:100%;height:125%;object-fit:contain;object-position:top center;filter:drop-shadow(0 0 24px #628bb440);mask-image:linear-gradient(#000 80%,transparent);}
.first-entry-copy {position:relative;grid-column:1;z-index:2;width:100%;max-width:540px;padding:clamp(20px,3vw,38px);border:1px solid #e1bb6b44;border-radius:18px;background:linear-gradient(135deg,#0e101ee8,#0d101ba3);backdrop-filter:blur(10px);box-shadow:0 20px 80px #0006;}
.first-entry-copy h1 {font-size:clamp(30px,3.4vw,53px);line-height:1.13;margin:12px 0 20px;text-wrap:balance;}
.first-entry-copy p {font-size:clamp(15px,1.3vw,18px);line-height:1.7;color:#e6dfd3;}
.first-entry-copy .eyebrow {color:#efc97b;letter-spacing:.16em;font-size:12px;}
.first-entry-actions {display:grid;gap:12px;margin-top:26px;}
.first-entry-actions button {min-height:52px;width:100%;margin:0;}
.first-guide-actions {display:flex;gap:8px;}
.first-guide-actions button {flex:1;min-width:0;}
.first-battles-reward-icons {display:flex;justify-content:center;flex-wrap:wrap;gap:16px;margin:16px 0;}
@media(max-width:650px) and (orientation:portrait) {
 .first-battles-welcome {grid-template-columns:minmax(0,1fr);padding:22px 16px max(24px,env(safe-area-inset-bottom));align-content:end;min-height:100svh;}
 .first-entry-logo {position:absolute;top:max(14px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:220px;max-width:64vw;}
 .first-entry-character {top:12%;left:-17%;right:auto;width:116%;bottom:23%;}
 .first-entry-character img {height:155%;object-position:center top;}
 .first-entry-copy {width:100%;margin-top:42svh;padding:20px 22px;background:linear-gradient(135deg,#0d101ced,#10111ccf);}
 .first-entry-copy h1 {font-size:clamp(29px,8vw,39px);margin:8px 0 12px;}
 .first-entry-copy p {font-size:14px;line-height:1.6;}
 .first-entry-actions {margin-top:18px;gap:10px;}
}
@media(max-height:500px) and (orientation:landscape) {
 .first-battles-welcome {padding:18px 32px;min-height:100svh;}
 .first-entry-logo {width:190px;margin-bottom:8px;}
 .first-entry-copy {padding:14px 20px;width:52%;}
 .first-entry-copy h1 {font-size:28px;margin:4px 0 8px;}
 .first-entry-copy p {font-size:12px;line-height:1.5;}
 .first-entry-actions {margin-top:12px;gap:8px;}
 .first-entry-actions button {min-height:38px;padding:8px;}
 .first-entry-character {top:2%;right:-6%;width:62%;}
}



.onboarding-guide.is-battle.first-battle-guide { position: fixed; z-index: 140; width: min(300px, calc(100vw - 16px)); padding: 14px; box-sizing: border-box; overflow: auto; border: 1px solid #cda85f; border-radius: 14px; color: #f6e8cb; background: #19151bf5; box-shadow: 0 6px 30px #000b; }
.first-battle-guide h2 { margin: 8px 0; font-size: 18px; }
.first-battle-guide p { margin: 8px 0 12px; font-size: 14px; line-height: 1.4; }
.first-battle-focus { position: fixed; z-index: 139; pointer-events: none; border: 2px solid #ffdc83; border-radius: 8px; box-shadow: 0 0 14px #ffc75c90; }
.first-battles-reward { color: #f4d38a; line-height: 1.7; }
.first-battle-no-timer .turn-value { font-size: 30px; }
@media (max-height: 500px) and (orientation: landscape) {
  .onboarding-guide.is-battle.first-battle-guide { width: min(250px, calc(100vw - 16px)); padding: 10px; }
  .first-battle-guide h2 { font-size: 16px; margin: 5px 0; }
  .first-battle-guide p { font-size: 12px; margin: 6px 0; }
  .first-battle-guide .primary-button { min-height: 32px; padding: 6px 12px; }
}

.is-first-entry .auth-tabs[hidden] {display:none!important;}
@media(max-height:500px) and (orientation:landscape) {
 .first-battles-welcome {align-content:end;}
 .first-entry-logo {position:absolute;top:8px;left:32px;width:150px;margin:0;}
 .first-entry-copy {margin-top:76px;padding:10px 16px;}
 .first-entry-copy h1 {font-size:24px;margin:2px 0 6px;}
 .first-entry-copy p {font-size:11px;line-height:1.35;margin:8px 0;}
 .first-entry-copy .eyebrow {font-size:10px;}
 .first-entry-actions {margin-top:8px;gap:6px;}
 .first-entry-actions button {min-height:34px;padding:6px;}
}

.app-shell.is-initializing {display:block;min-height:var(--app-viewport-height);}
.app-shell.is-initializing > .main-content {height:var(--app-viewport-height);margin:0;max-width:none;}
.app-shell.is-initializing > .topbar,.app-shell.is-initializing > .sidebar,.app-shell.is-initializing > .mobile-nav {display:none!important;}
.first-battles-reward .sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

@media(max-width:360px) and (orientation:portrait) {
 .first-entry-copy {margin-top:32svh;padding:18px;}
 .first-entry-copy h1 {font-size:27px;}
 .first-entry-copy p {font-size:13px;line-height:1.5;}
 .first-entry-actions button {min-height:46px;}
}

.auth-card.has-first-entry-back {position:relative;padding-top:74px;}
.first-entry-back {position:absolute;top:16px;left:18px;display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 16px;border:1px solid #dab76e;background:#443124;color:#ffe1a0;font-weight:700;z-index:1;}
.first-entry-back span {font-size:24px;line-height:1;}
.onboarding-guide.is-battle.first-battle-guide.is-compact-attack {width:min(340px,calc(100vw - 16px));padding:4px 10px;}
.first-battle-guide.is-compact-attack .onboarding-mentor {position:absolute;left:8px;top:4px;}
.first-battle-guide.is-compact-attack .onboarding-mentor > div {display:none;}
.onboarding-guide.is-battle.first-battle-guide.is-compact-attack .onboarding-mentor .identity-avatar {--avatar-size:20px!important;}
.first-battle-guide.is-compact-attack h2 {display:flex;align-items:center;min-height:20px;margin:0 60px 0 26px;font-size:13px;line-height:1.1;white-space:nowrap;}
.first-battle-guide.is-compact-attack p {font-size:11px;line-height:1.1;margin:2px 0 0;}
.first-battle-guide.is-compact-attack .first-guide-actions {position:absolute;top:4px;right:7px;gap:4px;}
.first-battle-guide.is-compact-attack .first-guide-actions button {min-height:20px;height:20px;width:24px;min-width:24px;padding:0;font-size:0;}
.first-battle-guide.is-compact-attack [data-first-guide-back]::before {content:'←';font-size:16px;}
.first-battle-guide.is-compact-attack [data-first-explain]::before {content:'→';font-size:16px;}
.first-battle-guide.is-compact-attack .first-guide-actions button:disabled {display:none;}

@media(max-height:500px) and (orientation:landscape) {
 .onboarding-guide.is-battle.first-battle-guide.is-compact-attack {padding:1px 8px;}
 .first-battle-guide.is-compact-attack .onboarding-mentor {top:1px;left:6px;}
 .onboarding-guide.is-battle.first-battle-guide.is-compact-attack .onboarding-mentor .identity-avatar {--avatar-size:18px!important;}
 .first-battle-guide.is-compact-attack h2 {position:absolute;width:1px;height:1px;min-height:0;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}
 .first-battle-guide.is-compact-attack p {margin:0 56px 0 22px;line-height:18px;white-space:nowrap;}
 .first-battle-guide.is-compact-attack .first-guide-actions {top:1px;right:6px;}
 .first-battle-guide.is-compact-attack .first-guide-actions button {min-height:18px;height:18px;}
}
