/* Exterior presentation only. Original game logic, sprites and HUD are unchanged. */
.mode-unavailable { display: none !important; }
body { background: #11151b; }
#loading-screen { background: radial-gradient(circle at 50% 30%, #27303a, #11151b 70%); }
#loading-logo { background-image: url("app-icon.svg"); border-color: #ff725e; border-radius: 28px; }
#intro-screen {
  background-image:
    radial-gradient(circle at 78% 26%, #ff725e24, transparent 25%),
    url("menu-scene.svg");
  background-position: center;
  align-items: flex-start;
  justify-content: center;
  padding: max(64px, env(safe-area-inset-top)) 7vw max(28px, env(safe-area-inset-bottom));
  overflow-y: auto;
  isolation: isolate;
}
#intro-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #11151bf7 0%, #11151be8 31%, #11151b45 64%, transparent 100%),
    repeating-linear-gradient(118deg, transparent 0 38px, #ffffff08 39px 40px);
  z-index: -1;
  pointer-events: none;
}
.drift-heading, #button-container { width: min(410px, 100%); flex-shrink: 0; }
.drift-eyebrow, .drift-menu-label { font-size: 10px; font-weight: 700; letter-spacing: .18em; color: #ff927f; }
.drift-heading h1 { margin: 16px 0; font-size: clamp(44px, 6vw, 76px); line-height: .96; letter-spacing: -.055em; color: #fff; }
.drift-heading h1 em { font-style: normal; color: #ff725e; }
.drift-heading > p { color: #c3cbd7; font-size: 14px; line-height: 1.6; }
#button-container { height: auto; margin-top: 30px; padding: 0; grid-template-columns: 1fr 1fr; gap: 10px; justify-items: stretch; align-content: start; }
.drift-menu-label { grid-column: 1 / -1; margin-bottom: 3px; color: #a8b1c1; }
#button-container .menu-button { width: 100%; max-width: none; min-height: 48px; border: 1px solid #ffffff26; border-radius: 14px; background: #242b38eb; padding: 14px 16px; text-shadow: none; box-shadow: none; font-size: 13px; font-weight: 650; transition: background .16s, border-color .16s; }
#button-container #snow-drift-btn, #button-container #adventure-drift-btn { grid-column: 1 / -1; min-height: 72px; text-align: left; font-size: 21px; letter-spacing: -.025em; position: relative; padding-right: 80px; }
#button-container #snow-drift-btn { color: #10262e; background: #9ce9ed; border-color: #bbf7f9; }
#button-container #adventure-drift-btn { color: #171c22; background: #ff725e; border-color: #ffad9f; }
#button-container .menu-button::after { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; right: 16px; top: 50%; bottom: auto; transform: translateY(-50%); color: inherit; opacity: .75; }
#button-container .menu-button:hover { transform: none; border-color: #fff; background: #354254; }
#button-container #snow-drift-btn:hover { background: #c7f9fa; }
#button-container #adventure-drift-btn:hover { background: #ff927f; }
#intro-screen button:focus-visible, .overlay-screen button:focus-visible, #local-host button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
#collection-screen, #helpful-screen { background: radial-gradient(ellipse at 50% 0, #313b46, #11151b 65%); padding: max(64px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
#collection-screen .overlay-header, #helpful-screen .overlay-header { max-width: 760px; text-align: left; padding: 0 56px 18px 0; border-bottom: 1px solid #ffffff1c; margin-bottom: 18px; }
#collection-screen h1, #helpful-screen h1 { font-size: clamp(25px, 4vw, 36px); letter-spacing: -.04em; text-shadow: none; }
.overlay-screen .close-overlay-btn { top: 0; right: 0; transform: none; min-width: 44px; min-height: 44px; text-align: center; background: #ffffff0d; border: 1px solid #ffffff26; border-radius: 12px; padding: 6px; }
#collection-list { max-width: 760px; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; padding: 3px 10px 20px 3px; }
#collection-list .collection-item { min-height: 190px; margin: 0; padding: 14px 14px 32px; background: #222b39; border: 1px solid #ffffff1c; border-radius: 18px; }
#collection-list .collection-item.selected { border: 2px solid #98e7ec; background: #24414a; }
#collection-list .collection-item.locked { filter: none; background: #1d2531; }
#collection-list .locked .collection-avatar, #collection-list .locked .collection-vehicle { opacity: .55; }
#collection-list .selection-tick { background: #9ce9ed; color: #142d35; width: 26px; height: 26px; line-height: 26px; font-size: 16px; }
#collection-list .unlock-requirement { bottom: 10px; right: 10px; font-size: 11px; color: #d1dae7; background: #131a26; }
#helpful-content { max-width: 760px; min-height: 0; padding: 0 16px 30px 0; color: #c8d1df; }
#helpful-content h2 { color: #ff927f; border-bottom: 1px solid #ffffff18; }
.pregame-overlay { background: linear-gradient(#141822dd, #14182245 50%, #141822dd); padding: max(76px, env(safe-area-inset-top)) 22px max(26px, env(safe-area-inset-bottom)); }
.pregame-overlay .pregame-layout { max-width: 580px; justify-content: space-between; }
.pregame-overlay .pregame-top-info { padding: 0; }
.pregame-overlay .pregame-top-info h1 { font-size: clamp(30px, 7vw, 56px); letter-spacing: -.045em; text-shadow: 0 2px 12px #0005; }
.pregame-overlay .pregame-top-info p { font-size: 15px; color: #d2e3e9; }
.pregame-overlay .pregame-middle-spacer { height: 20px; flex: 1; }
.pregame-overlay .pregame-bottom-info { padding: 16px; background: #17232fe8; border: 1px solid #ffffff24; border-radius: 18px; }
.pregame-overlay .pregame-bottom-info p { font-size: 14px; line-height: 1.5; color: #d2e3e9; }
.pregame-overlay #back-to-menu-btn { top: max(12px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); min-height: 42px; background: #202b39; border: 1px solid #ffffff40; border-radius: 12px; text-shadow: none; box-shadow: none; font-size: 14px; padding: 10px 16px; }
.pregame-overlay #vehicle-selector { flex-wrap: wrap; gap: 12px; }
.pregame-overlay .vehicle-option { width: 48px; height: 48px; border: 2px solid #768494; background-color: #2b3846; }
.pregame-overlay .vehicle-option.active { border-color: #a4f1f3; box-shadow: 0 0 0 3px #a4f1f329; }
#local-host #local-panel { background: #141822df; padding: 20px; }
@media (max-width: 600px) {
  #intro-screen { padding: max(66px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); justify-content: flex-end; background-position: 55% center; }
  #intro-screen::before { background: linear-gradient(#14182210 0%, #14182280 30%, #141822ed 62%, #141822 100%); }
  .drift-heading h1 { font-size: 52px; margin: 12px 0; }
  .drift-heading h1 br { display: none; }
  .drift-heading h1 em::before { content: ' '; }
  .drift-eyebrow { font-size: 9px; }
  #button-container { margin-top: 24px; }
  #collection-list { gap: 10px; }
  #collection-list .collection-item { min-height: 218px; padding: 14px 8px 40px; flex-direction: column; gap: 8px; }
  #collection-list .collection-avatar { width: 80px; height: 80px; margin-right: 0; transform: scale(.7); margin-top: -10px; margin-bottom: -12px; }
  #collection-list .collection-vehicle { transform: scale(.8); margin-top: -10px; margin-bottom: -12px; }
  .pregame-overlay .pregame-bottom-info { padding: 12px; }
  .pregame-overlay #vehicle-selector { gap: 8px; }
  .pregame-overlay .vehicle-option { width: 42px; height: 42px; }
}
@media (max-height: 540px) and (min-width: 601px) {
  #intro-screen { flex-direction: row; align-items: center; gap: 30px; padding: 62px 5vw 20px; }
  .drift-heading h1 { font-size: 52px; }
  #button-container { margin-top: 0; }
  #button-container #snow-drift-btn, #button-container #adventure-drift-btn { min-height: 58px; }
  .pregame-overlay { padding-top: 60px; padding-bottom: 16px; }
  .pregame-overlay .pregame-top-info h1 { font-size: 30px; }
  .pregame-overlay .pregame-top-info p { margin-top: 4px; }
}
@media (max-height: 650px) and (max-width: 600px) {
  .drift-heading h1 { font-size: 40px; }
  .drift-eyebrow, .drift-heading > p { display: none; }
  #button-container { margin-top: 14px; gap: 8px; }
  #button-container #snow-drift-btn, #button-container #adventure-drift-btn { min-height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  #intro-screen, #button-container .menu-button, #collection-list .collection-item, .pregame-overlay .vehicle-option, .pregame-overlay #back-to-menu-btn { transition: none; }
}

/* Vipex result card: Showa / Hong Kong shop signboard (cream enamel plate, red header band, rivets, stamped tags). */
#local-host #local-card, #yt-result > div { position: relative; min-width: min(300px, 84vw); max-width: 92vw; padding: 0 22px 24px; text-align: center; color: #1b1a17; background-color: #f4ead2; background-image: radial-gradient(circle at 12px 12px, #1b1a17 2.5px, transparent 3.2px), radial-gradient(circle at calc(100% - 12px) 12px, #1b1a17 2.5px, transparent 3.2px), radial-gradient(circle at 12px calc(100% - 12px), #1b1a17 2.5px, transparent 3.2px), radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), #1b1a17 2.5px, transparent 3.2px); border: 3px solid #1b1a17; border-radius: 8px; box-shadow: inset 0 0 0 4px #f4ead2, inset 0 0 0 6px #c8231b, 0 8px 0 #1b1a17, 0 18px 40px rgba(0, 0, 0, .45); overflow: hidden; font-family: "Arial Black", "Helvetica Neue", "Hiragino Kaku Gothic StdN", "PingFang HK", system-ui, sans-serif; }
#local-host #local-card h2, #yt-result h2 { margin: 0 -22px 14px; padding: 15px 10px 13px; background: #c8231b; color: #f4ead2; border-bottom: 3px solid #1b1a17; font: 900 14px/1 "Arial Black", "Helvetica Neue", "Hiragino Kaku Gothic StdN", "PingFang HK", system-ui, sans-serif; letter-spacing: .3em; text-transform: uppercase; text-shadow: 2px 2px 0 #1b1a17; }
#local-host #local-card h2::before, #yt-result h2::before { content: none; font-family: "Hiragino Mincho ProN", "Songti TC", "Noto Serif CJK JP", "Noto Serif CJK TC", serif; letter-spacing: .08em; }
.fd-score { margin: 8px 0 14px; font: 900 clamp(62px, 18vw, 94px)/1 "Arial Black", "Helvetica Neue", "Hiragino Kaku Gothic StdN", "PingFang HK", system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: #c8231b; text-shadow: 4px 4px 0 #1b1a17; }
.fd-note { margin: 6px 0 20px; font: 700 15px/1.4 system-ui, -apple-system, sans-serif; color: #3a3630; }
.fd-best, .fd-new { display: inline-block; margin: 0 0 20px; padding: 6px 12px 5px; font: 900 13px/1 "Arial Black", "Helvetica Neue", "Hiragino Kaku Gothic StdN", "PingFang HK", system-ui, sans-serif; letter-spacing: .14em; border: 2px solid #1b1a17; box-shadow: 0 3px 0 #1b1a17; transform: rotate(-2deg); }
.fd-best { color: #1b1a17; background: #f2b705; }
.fd-new { color: #f4ead2; background: #1f7a5a; animation: fdStamp .45s cubic-bezier(.3, 1.5, .5, 1) both; }
.fd-best[hidden], .fd-new[hidden] { display: none; }
@keyframes fdStamp { from { transform: rotate(-12deg) scale(1.8); opacity: 0; } to { transform: rotate(-2deg) scale(1); opacity: 1; } }
#local-host #local-card button, #yt-result button { display: block; width: 100%; margin: 10px 0 0; min-height: 50px; padding: 12px 18px; border: 3px solid #1b1a17; border-radius: 6px; box-shadow: 0 4px 0 #1b1a17; font: 900 15px/1 "Arial Black", "Helvetica Neue", "Hiragino Kaku Gothic StdN", "PingFang HK", system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; }
#local-host #local-card button:active, #yt-result button:active { transform: translateY(3px); box-shadow: 0 1px 0 #1b1a17; }
#local-host #local-replay, #local-host #local-resume, #yt-result button { color: #f4ead2; background: #c8231b; text-shadow: 2px 2px 0 #1b1a17; }
#local-host #local-menu { color: #1b1a17; background: #f4ead2; }
#local-host #local-replay[hidden], #local-host #local-resume[hidden] { display: none; }
#local-host #local-toolbar button { color: #1b1a17; background: #f4ead2; border: 2px solid #1b1a17; border-radius: 4px; box-shadow: 0 3px 0 #1b1a17; font: 900 12px/1 "Arial Black", "Helvetica Neue", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: 9px 11px 8px; }
#local-host #local-toolbar button:active { transform: translateY(2px); box-shadow: 0 1px 0 #1b1a17; }
