:root {
  --bg: #070d17;
  --panel: #0f1b2d;
  --panel-2: #16263d;
  --border: #253b59;
  --text: #eef4fb;
  --muted: #8fa6c2;
  --accent: #38a3ff;
  --accent-2: #f5b942;
  --good: #2ecc71;
  --bad: #ff5757;
  --warn: #f39c12;
  --shadow: 0 8px 24px rgba(0,0,0,0.5);
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 0%, #162b4a 0%, #070d17 68%);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 14px;
  min-height: 100vh;
}

/* 타겟: 모바일 portrait + PC 포털 중앙 스타디움 프레임 */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;       /* 모바일 주소창 반영 */
  overflow: hidden;     /* 스크롤은 #view-root 만 */
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px;
  background: linear-gradient(180deg, rgba(13, 24, 41, 0.96) 0%, rgba(7, 13, 23, 0.98) 100%);
  border-left: 1px solid rgba(245, 185, 66, 0.14);
  border-right: 1px solid rgba(245, 185, 66, 0.14);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.65);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245, 185, 66, 0.22);
  flex-shrink: 0;       /* 헤더 고정 — 자기 영역 차지 */
}

.logo, .logo-text {
  margin: 0;
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 20px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-2);
  text-shadow: 0 2px 10px rgba(245, 185, 66, 0.35);
}

.topbar-info {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  margin-left: 16px;
}

.topbar-info strong {
  color: var(--text);
  margin: 0 4px;
}

.locale-toggle {
  margin-left: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--accent);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
}
.locale-toggle:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

/* Modal — backdrop + dialog (메뉴의 "이어하기" 등) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fadeIn 160ms ease-out;
}
.modal-dialog {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  animation: slideUp 200ms ease-out;
  /* 내용이 길면(이미지+오퍼 등) 뷰포트를 넘지 않고 모달 내부 스크롤 */
  max-height: 90vh;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-dialog h2 {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 17px;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Floating "맨 위로" 버튼 — 최상단이 아니면 하단 우측에 표시 */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #08111c;
  border: none;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45), 0 0 0 1px rgba(78,164,255,0.3);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 200ms, transform 200ms;
}
.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top:active {
  transform: translateY(2px);
}

.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;       /* 푸터 고정 — 자기 영역 차지 */
}
/* 상태 메시지 — 푸터 폭 대부분 차지(길게 표시). 게임명은 오른쪽에 작게 고정. */
#footer-status {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-title {
  flex-shrink: 0;
  color: var(--accent-2);
  font-weight: 700;
  white-space: nowrap;
}

#view-root {
  flex: 1;
  min-height: 0;        /* flex 자식 축소 허용 → 내부 스크롤 동작 */
  overflow-y: auto;     /* 본문만 스크롤 */
  -webkit-overflow-scrolling: touch;
  padding: 18px 0;
  position: relative;   /* 시작화면(.start-screen) absolute inset 기준 */
}


/* 시작 화면 — 배경 이미지 풀블리드 + 하단 버튼, 한 화면 무스크롤.
   view-root 의 padding(18px 0) 을 무시하고 inset:0 으로 정확히 채워 스크롤이 없도록. */
.start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #141c24;
}
.start-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.start-bg picture {
  display: block;
  width: 100%;
  height: 100%;
}
.start-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}
/* 하단 가독성 — 이미지 위로 어두운 그라데이션 */
.start-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(14,17,22,0.15) 0%, rgba(14,17,22,0.05) 35%, rgba(14,17,22,0.78) 78%, rgba(14,17,22,0.95) 100%);
}
.start-title {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 10px 16px;
  margin: 10px auto 0;
  width: fit-content;
  max-width: calc(100% - 24px);
  background: rgba(13, 38, 19, 0.88);
  border: 2.5px solid #4a3321;
  border-radius: 10px;
  box-shadow: 0 3px 0 #4a3321;
  flex-shrink: 0;
}
.start-title .logo-text {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}
.start-title .tagline {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text);
  opacity: 0.85;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}
/* 하단 액션 — 버튼 묶음을 바닥에 고정, 넘치면 이 영역만 스크롤 */
.start-actions {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 72%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.start-actions .panel {
  margin: 0;
  background: rgba(22,27,34,0.82);
  backdrop-filter: blur(3px);
}

/* Buttons */
button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms, transform 60ms;
}
button:hover:not(:disabled) {
  background: #2a323e;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button.primary {
  background: var(--accent);
  color: #08111c;
  border-color: var(--accent);
  font-weight: 600;
}
button.primary:hover:not(:disabled) {
  background: #6bb6ff;
}
button.danger {
  background: transparent;
  color: var(--bad);
  border-color: var(--bad);
}

/* Layout primitives */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--accent-2);
}
.panel h3 {
  margin: 12px 0 8px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.col { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.center { display: flex; align-items: center; justify-content: center; }

/* Forms */
input[type="text"], select {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
}
label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }

/* Stat bar */
.stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.stat-name {
  width: 56px;
  font-size: 11px;
  color: var(--muted);
}
.stat-bar {
  flex: 1;
  height: 8px;
  background: var(--panel-2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 300ms ease;
}
.stat-val {
  width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

/* Action cards (weekly choice) */
.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.action-card {
  cursor: pointer;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 120ms, transform 80ms;
}
.action-card:hover {
  border-color: var(--accent);
}
.action-card:active {
  transform: translateY(1px);
}
.action-card .title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.action-card .desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.action-card .meta {
  margin-top: 8px;
  font-size: 11px;
  color: var(--accent);
}

/* Day strip */
.daystrip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  margin-top: 5px;
}
.daycell {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 2px;
  text-align: center;
  font-size: 11px;
  min-width: 0;
}
.daycell.done { opacity: 0.55; }
.daycell.weekend {
  background: #fde68a !important;
  border-color: #b45309 !important;
  color: #78350f !important;
}
.daycell .label { color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 1px; font-weight: 800; }
.daycell.weekend .label { color: #92400e !important; }
.daycell .val {
  font-weight: 700;
  font-size: 9.5px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.me { background: rgba(78, 164, 255, 0.08); }
tr.me td { font-weight: 600; }

/* Notices / chips */
.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
.chip.good { color: var(--good); border-color: rgba(63,185,80,0.4); }
.chip.bad { color: var(--bad); border-color: rgba(248,81,73,0.4); }
.chip.warn { color: var(--warn); border-color: rgba(210,153,34,0.4); }

.notice {
  padding: 10px 12px;
  background: var(--panel-2);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 13px;
}
.notice.bad { border-left-color: var(--bad); }
.notice.good { border-left-color: var(--good); }
.notice.warn { border-left-color: var(--warn); }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.big { font-size: 18px; font-weight: 600; }

@media (max-width: 700px) {
  .actions { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
}

/* Stadium Game Theme Polish & Combat/Batting Juice */
.btn.gold {
  background: linear-gradient(180deg, #f7c85c 0%, #d9941e 100%);
  color: #141008;
  border: 1px solid #ffe08c;
  font-family: "Oswald", "Inter", sans-serif;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(245, 185, 66, 0.35);
}
.btn.gold:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.btn.primary {
  font-family: "Oswald", "Inter", sans-serif;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(56, 163, 255, 0.28);
}
td.num, .topbar-info strong {
  font-family: "JetBrains Mono", monospace;
}
.panel {
  box-shadow: var(--shadow);
  border-color: rgba(56, 163, 255, 0.18);
}
@keyframes nir-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5px, 3px); }
  40% { transform: translate(5px, -3px); }
  60% { transform: translate(-4px, -2px); }
  80% { transform: translate(4px, 2px); }
}
@keyframes nir-flash-gold {
  0% { box-shadow: inset 0 0 0 0 rgba(245, 185, 66, 0.8), 0 0 28px rgba(245, 185, 66, 0.9); }
  100% { box-shadow: inset 0 0 0 0 rgba(245, 185, 66, 0), 0 8px 24px rgba(0, 0, 0, 0.55); }
}
.nir-shake { animation: nir-shake 320ms ease-out; }
.nir-flash-gold { animation: nir-flash-gold 480ms ease-out; }


/* ==========================================================================
   Kairosoft "Home Run High" 16-bit Pixel Art Baseball Club Theme
   ========================================================================== */
:root {
  --bg: #4da84b;
  --panel: #fff9ea;
  --panel-2: #f4e6c6;
  --border: #4a3321;
  --text: #2f1f14;
  --muted: #6e553f;
  --accent: #2278d4;
  --accent-2: #d97706;
  --good: #1f8f3d;
  --bad: #d93838;
  --warn: #d97706;
  --shadow: 0 3px 0 rgba(74, 51, 33, 0.85);
  --radius: 8px;
}

html, body {
  background: repeating-linear-gradient(
    180deg,
    #4fa849 0px,
    #4fa849 24px,
    #469a41 24px,
    #469a41 48px
  ) !important;
  color: var(--text) !important;
}

img, canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#app {
  background: linear-gradient(180deg, #e8f5dc 0%, #d8ecc8 100%) !important;
  border-left: 3px solid #4a3321 !important;
  border-right: 3px solid #4a3321 !important;
  box-shadow: 0 0 0 3px #fff9ea, 0 10px 28px rgba(0, 0, 0, 0.35) !important;
}

/* Retro Green Stadium Scoreboard Header */
.topbar {
  background: #1d522b;
  margin: 0 -12px;
  padding: 10px 12px !important;
  border-bottom: 3px solid #4a3321 !important;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.14);
}
.topbar .logo, .topbar .logo-text {
  color: #ffe259 !important;
  text-shadow: 2px 2px 0 #102e17 !important;
}
.topbar .topbar-info, .topbar .topbar-info strong {
  color: #eefce8 !important;
}
.locale-toggle {
  background: #fff9ea !important;
  color: #2f1f14 !important;
  border: 2px solid #4a3321 !important;
  box-shadow: 0 2px 0 #4a3321;
}

.bottombar {
  background: #1d522b;
  margin: 0 -12px;
  padding: 8px 12px !important;
  border-top: 3px solid #4a3321 !important;
  color: #d8f2d8 !important;
}
.bottombar .footer-title {
  color: #ffe259 !important;
}

/* Kairosoft Cream Pixel Panels & Tactile Buttons */
.panel, .modal-dialog {
  background: var(--panel) !important;
  border: 2px solid #4a3321 !important;
  box-shadow: 0 3px 0 #4a3321 !important;
  color: var(--text) !important;
}
.panel h2, .modal-dialog h2 {
  color: #1d522b !important;
  border-bottom: 2px dashed #d6c39c;
  padding-bottom: 6px;
}

button {
  background: #fff4d6 !important;
  color: #2f1f14 !important;
  border: 2px solid #4a3321 !important;
  box-shadow: 0 3px 0 #4a3321;
  font-weight: 700;
}
button:hover:not(:disabled) {
  background: #ffe8ad !important;
}
button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #4a3321;
}
button.primary {
  background: #ff9f1c !important;
  color: #ffffff !important;
  border-color: #4a3321 !important;
  text-shadow: 1px 1px 0 #7a3e00;
}
button.primary:hover:not(:disabled) {
  background: #ffb242 !important;
}
button.danger {
  background: #ffe5e5 !important;
  color: #b91c1c !important;
  border-color: #991b1b !important;
}
button:disabled,
button.primary:disabled {
  background: #e2d5b5 !important;
  color: #6e5a44 !important;
  border-color: #9c8669 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* Start screen card readability */
.start-actions .panel {
  background: rgba(255, 249, 234, 0.94) !important;
}
.start-title .logo-text {
  color: #ffe259 !important;
  text-shadow: 3px 3px 0 #3b2412 !important;
}
.start-title .tagline {
  color: #ffffff !important;
  text-shadow: 1px 1px 0 #2a180a !important;
}

/* Live Kairosoft 16-bit Pixel Field Stage Card */
.kairo-stage-card {
  position: relative;
  border: 3px solid #4a3321;
  border-radius: 8px;
  overflow: hidden;
  background: #4ca842;
  box-shadow: 0 3px 0 #4a3321;
  flex-shrink: 0 !important;
}
.kairo-stage-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: #1d522b;
  border-bottom: 2px solid #4a3321;
  font-size: 11px;
  font-weight: 800;
  color: #fff9ea;
}
.kairo-badge {
  background: #ffe259;
  color: #3b2412;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #4a3321;
  letter-spacing: 0.4px;
}
.kairo-badge[data-mode="game"] {
  background: #ff6b4a;
  color: #ffffff;
}
.kairo-badge[data-mode="rest"] {
  background: #7ae582;
  color: #143d1d;
}
.kairo-ticker {
  color: #e8fce6;
  font-family: monospace;
  font-size: 11px;
}
.kairo-stage-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 152;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Kairosoft Retro Match Scoreboard & Line Score */
[data-live="lineScore"] {
  background: #1d522b !important;
  color: #fff9ea !important;
  border: 2px solid #4a3321 !important;
  border-radius: 6px;
  font-family: monospace;
}
[data-live="lineScore"] th,
[data-live="lineScore"] td {
  border-color: rgba(255, 249, 234, 0.22) !important;
  color: #fff9ea !important;
}
[data-live="myScore"],
[data-live="oppScore"] {
  font-family: monospace;
  text-shadow: 2px 2px 0 rgba(74, 51, 33, 0.35);
}
.kairo-match-diamond {
  display: block;
  margin: 0 auto;
}

/* ==========================================================================
   Polish: Touch, Safe-Area, Speed Toggle, Streak Glow & Reduced Motion
   ========================================================================== */
html, body, button, a, input, select, .action-card {
  touch-action: manipulation;
}

#app {
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
}

.topbar {
  padding-top: max(10px, env(safe-area-inset-top, 0px)) !important;
  gap: 6px;
}

.topbar-info {
  margin-left: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.locale-toggle {
  margin-left: 0;
  min-height: 32px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.speed-toggle {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  padding: 4px 8px;
  background: #ffe259 !important;
  color: #3b2412 !important;
}

.bottombar {
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
}

.scroll-top {
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
}

.kairo-streak {
  background: #ff9f1c;
  color: #fff9ea;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #4a3321;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  margin-left: 6px;
  margin-right: auto;
  animation: kairo-streak-pulse 1.2s ease-in-out infinite;
}

.kairo-stage-card.is-hot-streak {
  border-color: #d97706;
  box-shadow: 0 3px 0 #4a3321, 0 0 14px rgba(255, 226, 89, 0.75);
}

.kairo-stage-card.is-milestone {
  animation: kairo-milestone-flash 620ms ease-out;
}

@keyframes kairo-streak-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

@keyframes kairo-milestone-flash {
  0% { box-shadow: 0 3px 0 #4a3321, 0 0 0 4px rgba(255, 226, 89, 0.95); transform: scale(1.015); }
  100% { box-shadow: 0 3px 0 #4a3321, 0 0 0 0 rgba(255, 226, 89, 0); transform: scale(1); }
}

/* PC Landscape Side Panels (16:9 Portal Viewport) */
.portal-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.portal-shell > #app {
  margin: 0;
  width: 100%;
}
.side-panel {
  display: none;
  width: 240px;
  background: #fff9ea;
  border: 3px solid #4a3321;
  border-radius: 10px;
  padding: 14px;
  color: #2f1f14;
  box-shadow: 0 5px 0 #4a3321, 0 12px 24px rgba(0, 0, 0, 0.35);
  flex-direction: column;
  gap: 10px;
}
.side-title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: #1d522b;
  border-bottom: 2px dashed #d6c39c;
  padding-bottom: 6px;
}
.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}
.side-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.side-kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: #ffe259;
  border: 2px solid #4a3321;
  color: #3b2412;
  font-family: monospace;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.side-box {
  background: #f5ebd1;
  border: 2px solid #c9b283;
  border-radius: 7px;
  padding: 9px 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #4a3321;
}
@media (min-width: 1600px) {
  .side-panel {
    display: flex;
  }
}

/* ==========================================================================
   V3 Overhaul: True Landscape Optimization, Kairosoft Scoreboard & Dock
   ========================================================================== */
.locale-toggle[hidden] {
  display: none !important;
}
html, body {
  overflow-wrap: break-word;
}
h1, h2, h3 {
  text-wrap: balance;
}
canvas, img, svg {
  display: block;
}
.pixel-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Scoreboard HUD Controls & Gauges */
.topbar {
  flex-wrap: wrap;
  gap: 6px 10px;
}
.topbar-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-inline-size: 0;
  flex: 1 1 180px;
}
.topbar-info-text {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-club-icon {
  flex-shrink: 0;
  border-radius: 4px;
  background: rgba(255, 249, 234, 0.9);
  border: 1px solid #4a3321;
}
.topbar-brand-title {
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #ffe259;
  text-shadow: 2px 2px 0 #102e17;
}
.topbar-hud-gauges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-inline-size: 0;
}
.topbar-hud-gauges[hidden],
.topbar-sim-controls[hidden],
.landscape-prompt-banner[hidden] {
  display: none !important;
}
.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #143c1f;
  border: 1.5px solid #6ab04c;
  color: #fff9ea;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.hud-chip.hud-week {
  background: #ffe259;
  color: #3b2412;
  border-color: #4a3321;
}
.hud-chip.hud-money {
  color: #ffe259;
}
.hud-bar-track {
  width: 44px;
  height: 8px;
  border-radius: 3px;
  background: #0d2613;
  border: 1px solid #4a3321;
  overflow: hidden;
  display: inline-flex;
}
.hud-bar-fill {
  height: 100%;
  transition: width 200ms ease;
}
.hud-bar-fill.tone-good { background: #4ade80; }
.hud-bar-fill.tone-warn { background: #fbbf24; }
.hud-bar-fill.tone-bad { background: #f87171; }
.hud-cond.tone-good { border-color: #4ade80; color: #bbf7d0; }
.hud-cond.tone-bad { border-color: #f87171; color: #fecaca; }

.topbar-sim-controls,
.topbar-util-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.sim-speed-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.sim-play-btn {
  background: #ff9f1c !important;
  color: #ffffff !important;
  text-shadow: 1px 1px 0 #7a3e00;
  padding: 4px 10px !important;
  font-size: 12px !important;
  white-space: nowrap;
}
.sim-play-btn.is-paused-pulse {
  animation: kairo-streak-pulse 1.1s ease-in-out infinite;
  box-shadow: 0 2px 0 #4a3321, 0 0 0 2px #ffe259 !important;
}
.speed-pill {
  padding: 4px 7px !important;
  font-size: 11px !important;
  min-width: 30px !important;
  font-family: "JetBrains Mono", monospace !important;
}
.speed-pill.active {
  background: #ffe259 !important;
  color: #3b2412 !important;
  border-color: #4a3321 !important;
}
.lang-pill {
  font-size: 11px !important;
  padding: 4px 7px !important;
}

/* Portrait Rotate Guidance Overlay */
.landscape-prompt-banner {
  background: linear-gradient(180deg, #fff9ea 0%, #f4e6c6 100%);
  border-bottom: 3px solid #4a3321;
  margin: 0 -12px;
  padding: 8px 12px;
  z-index: 50;
  flex-shrink: 0;
}
.landscape-prompt-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.landscape-prompt-badge {
  padding: 4px 8px;
  border-radius: 6px;
  background: #1d522b;
  color: #ffe259;
  border: 2px solid #4a3321;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 800;
}
.landscape-prompt-copy {
  flex: 1 1 160px;
  min-inline-size: 0;
}
.landscape-prompt-title {
  font-size: 12px;
  font-weight: 900;
  color: #1d522b;
}
.landscape-prompt-desc {
  font-size: 11px;
  color: #4a3321;
  line-height: 1.35;
}
.landscape-prompt-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.landscape-prompt-actions button {
  padding: 6px 10px;
  font-size: 11px;
}

.mobile-tablist {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
}
.mobile-tablist [role="tab"] {
  position: relative;
  flex: 1 0 auto;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.mobile-tablist [role="tab"][aria-selected="true"] {
  color: var(--accent-2);
}
.mobile-tablist [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--accent-2);
}

.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-inline-size: 0;
}
.dash-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-inline-size: 0;
}
.dash-col[hidden] {
  display: none;
}

/* Kairosoft Command Dock & Visual Presets */
.kairo-dock-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 10px;
}
.kairo-dock-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 3px !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  line-height: 1.15;
  min-inline-size: 0;
  background: #f4e6c6 !important;
  color: #4a3321 !important;
  border: 2px solid #4a3321 !important;
  border-radius: 7px !important;
  box-shadow: 0 2px 0 #4a3321;
}
.kairo-dock-tab img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.kairo-dock-tab[aria-selected="true"] {
  background: #ff9f1c !important;
  color: #ffffff !important;
  text-shadow: 1px 1px 0 #7a3e00;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #4a3321;
}
.kairo-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.kairo-preset-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  padding: 5px 7px !important;
  text-align: left !important;
  border-radius: 7px !important;
  border: 2px solid #4a3321 !important;
  background: #fff4d6 !important;
  box-shadow: 0 2px 0 #4a3321;
  min-inline-size: 0;
}
.kairo-preset-card.is-active {
  background: #ffe259 !important;
  border-color: #d97706 !important;
  box-shadow: 0 2px 0 #4a3321, inset 0 0 0 1px #ffffff;
}
.kairo-preset-card.has-coach-hint {
  border-color: #d97706 !important;
  background: #fff8dc !important;
}
.kairo-preset-card.has-coach-hint .kairo-preset-head {
  padding-right: 40px;
}
.kairo-coach-hint-badge {
  position: absolute;
  top: 2px;
  right: 3px;
  background: #ef4444;
  color: #ffffff;
  border: 1.5px solid #4a3321;
  border-radius: 999px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 1px 0 #4a3321;
  pointer-events: none;
  z-index: 2;
}
.kairo-coach-hint-badge.is-claimed {
  background: #16a34a;
}
.kairo-preset-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  background: rgba(74, 51, 33, 0.08);
  border-radius: 4px;
  padding: 1px;
}
.kairo-preset-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #2f1f14;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kairo-preset-desc {
  display: none;
}
.kairo-active-preset-hint {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
  border-bottom: 1.5px dashed #d6c39c;
  padding-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kairo-dock-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.kairo-dock-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.center-bottom-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.start-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
}
.create-bottom-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.kairo-paused-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 7px;
  margin-bottom: 5px;
  border-radius: 6px;
  background: #ffe8ad;
  border: 2px solid #d97706;
  color: #4a3321;
  font-size: 10.5px;
  font-weight: 800;
}
.kairo-paused-banner[hidden],
.kairo-paused-inline[hidden] {
  display: none !important;
}
.kairo-paused-inline {
  display: none;
  font-size: 10px !important;
  padding: 2px 7px !important;
  white-space: nowrap;
}
.kairo-camp-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}
.stat-gauge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.stat-gauge-track {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: #d6c39c;
  border: 1px solid #4a3321;
  overflow: hidden;
}
.stat-gauge-fill {
  height: 100%;
  background: #1f8f3d;
  transition: width 220ms ease;
}
.stat-gauge-fill.warn { background: #d97706; }
.stat-gauge-fill.bad { background: #d93838; }

.create-top-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.start-hero-col {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-inline-size: 0;
}
.start-cloud-drawer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.start-cloud-pill {
  background: rgba(15, 24, 34, 0.78) !important;
  color: #fff9ea !important;
  border: 1.5px solid rgba(255, 226, 89, 0.55) !important;
  border-radius: 999px !important;
  padding: 5px 12px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}
.start-cloud-strip {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.start-cloud-strip[hidden] {
  display: none !important;
}
.start-cloud-strip .panel {
  margin: 0;
  padding: 6px 8px !important;
  background: rgba(255, 249, 234, 0.94) !important;
}
.create-mid-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 6px;
}
.create-mid-row > div {
  min-inline-size: 0;
}
.create-mid-row label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-items-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.shop-relic-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.season-end-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==========================================================================
   True Landscape Layout: Landscape Viewports (>= 480px)
   ========================================================================== */
@media (orientation: landscape) and (min-width: 480px) {
  #app {
    max-width: 1360px;
  }
  .mobile-tablist {
    display: none;
  }
  .dash-col[hidden] {
    display: flex;
  }
  #view-root:has(.dashboard-grid) {
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
  }
  .dashboard-grid {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr) 388px;
    grid-template-areas: "left center right";
    gap: 12px;
    align-items: stretch;
    flex: 1 1 auto;
    min-block-size: 0;
    block-size: 100%;
  }
  .dash-col {
    max-block-size: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-inline-end: 2px;
  }
  .dash-col-left { grid-area: left; }
  .dash-col-center { grid-area: center; }
  .dash-col-right { grid-area: right; }

  .start-screen {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(270px, 360px);
    align-items: center;
    gap: 18px;
    padding: 12px 20px;
  }
  .start-overlay {
    background: linear-gradient(180deg, rgba(10, 20, 14, 0.06) 0%, rgba(10, 20, 14, 0.24) 100%);
  }
  .start-bg img {
    object-position: center 22%;
  }
  .start-title {
    text-align: left;
    margin: 0;
    width: fit-content;
    max-width: min(420px, 100%);
    padding: 12px 18px;
    background: rgba(13, 38, 19, 0.86);
    border: 3px solid #4a3321;
    border-radius: 12px;
    box-shadow: 0 4px 0 #4a3321;
  }
  .start-cloud-drawer {
    align-items: flex-start;
  }
  .start-actions {
    margin-top: 0;
    max-height: 100%;
    padding: 0;
  }

  .create-top-pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  }
  .create-mid-row {
    grid-template-columns: 68px minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 6px;
  }
  .create-face-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
  }
  .create-bottom-pair {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: end;
  }
  .club-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .center-bottom-strip {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
  }
  .center-bottom-strip > .media-ticker-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .center-bottom-strip .media-ticker-list {
    flex: 1 1 auto;
    min-height: 0;
    max-block-size: 100%;
  }
  .create-grid-desktop {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.85fr);
    gap: 12px;
    align-items: start;
  }
  .create-preview-col {
    position: sticky;
    top: 0;
  }

  .shop-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
  .season-end-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: start;
  }
  .modal-dialog {
    max-width: min(500px, 92vw) !important;
  }
}

/* Native modal dialog containment */
dialog.nir-modal {
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--accent-2);
  border-radius: 12px;
  padding: 18px;
  width: min(520px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72);
}
dialog.nir-modal:modal {
  overscroll-behavior: contain;
}
dialog.nir-modal::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(4, 9, 18, 0.78);
  backdrop-filter: blur(3px);
}

/* 6-Tier Player Card */
.nir-player-card {
  border: var(--card-border, 2px solid #64748B);
  background: var(--card-bg, linear-gradient(145deg, #1E293B 0%, #334155 100%));
  box-shadow: var(--card-shadow, 0 4px 10px rgba(15, 23, 42, 0.45));
  border-radius: 12px;
  padding: 10px;
  color: #f8fafc !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform-style: preserve-3d;
  will-change: transform;
}
.nir-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.nir-card-ovr {
  color: var(--card-ovr-color, #CBD5E1);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}
.nir-card-portrait {
  width: 100%;
  max-width: 176px;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: rgba(7, 13, 23, 0.35);
}
.nir-card-footer {
  text-align: center;
}
.nir-card-name {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.nir-card-sub {
  font-size: 11px;
  color: #cbd5e1 !important;
}

/* Club selector cards & trait pills */
.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
}
@media (min-width: 900px), ((orientation: landscape) and (min-width: 480px)) {
  .club-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
}
.club-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 11px;
  min-inline-size: 0;
}
.club-chip[aria-pressed="true"] {
  border-color: var(--accent-2);
  background: rgba(245, 185, 66, 0.14);
}
.club-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.trait-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.trait-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
}
.trait-pill.grade-blue   { background: #dbeafe; border: 1.5px solid #1d4ed8; color: #1e3a8a; }
.trait-pill.grade-purple { background: #f3e8ff; border: 1.5px solid #7e22ce; color: #581c87; }
.trait-pill.grade-gold   { background: #fef3c7; border: 1.5px solid #b45309; color: #78350f; }
.trait-pill.grade-red    { background: #fee2e2; border: 1.5px solid #b91c1c; color: #7f1d1d; }

/* ABS Zone HUD & Media Ticker */
.abs-hud-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
}
.abs-zone-box {
  position: relative;
  width: 48px;
  height: 58px;
  border: 2px dashed rgba(148, 163, 184, 0.7);
  border-radius: 4px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.7);
}
.abs-zone-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.media-ticker-list {
  max-block-size: 200px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.media-ticker-item {
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border-left: 3px solid var(--accent);
  font-size: 11px;
  line-height: 1.4;
}

@media (prefers-reduced-motion: no-preference) {
  .nir-player-card {
    transition: transform 140ms ease-out, box-shadow 180ms ease-out;
  }
  .nir-player-card.tier-signature {
    animation: sigGlow 3.6s ease-in-out infinite;
  }
  @keyframes sigGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08); }
  }
}

/* Zero-Scroll Mobile Handheld Landscape Override (cascade after base components) */
@media ((orientation: landscape) and (min-width: 480px) and (max-width: 899px)),
       ((orientation: landscape) and (min-width: 480px) and (max-height: 500px)) {
  .bottombar {
    display: none !important;
  }
  .topbar {
    flex-wrap: nowrap !important;
    padding: 2px 8px !important;
    gap: 4px !important;
    min-height: 30px;
  }
  .topbar-info {
    flex: 1 1 70px;
    font-size: 10.5px;
  }
  .topbar-brand-title {
    font-size: 13px;
  }
  .topbar-club-icon {
    width: 15px;
    height: 15px;
  }
  .topbar-hud-gauges {
    flex-wrap: nowrap;
    gap: 3px;
  }
  .hud-chip {
    padding: 1px 4px;
    font-size: 9px;
  }
  .hud-bar-track {
    width: 24px;
    height: 6px;
  }
  .locale-toggle {
    min-height: 24px !important;
    min-width: 24px !important;
    padding: 1px 5px !important;
    font-size: 10px !important;
  }
  .sim-play-btn {
    padding: 2px 6px !important;
    font-size: 10px !important;
  }
  .speed-pill {
    padding: 1px 4px !important;
    min-width: 22px !important;
    font-size: 9px !important;
  }
  #view-root {
    padding: 4px 0 !important;
  }
  #view-root:has(.dashboard-grid) {
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* Start Screen Compact 2-Col */
  .start-screen {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 10px;
    padding: 6px 12px;
    overflow-y: auto;
  }
  .start-hero-col {
    gap: 5px;
  }
  .start-title {
    padding: 8px 12px;
    margin: 0;
  }
  .start-title .logo-text {
    font-size: 18px;
  }
  .start-title .tagline {
    font-size: 10.5px;
  }
  .start-cloud-strip {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 4px;
  }
  .start-cloud-strip .panel {
    padding: 4px 7px !important;
  }
  .start-cloud-strip button {
    padding: 4px 6px !important;
    font-size: 10px !important;
  }
  .start-cloud-strip .muted.small {
    display: none;
  }
  .start-bg img {
    object-position: center 18%;
  }
  .modal-backdrop {
    padding: 6px 12px;
  }
  .modal-dialog {
    max-height: calc(100dvh - 14px);
    padding: 12px 14px;
  }
  .modal-dialog section {
    margin-bottom: 10px !important;
  }
  dialog.nir-modal[open] {
    max-height: calc(100dvh - 14px);
    padding: 10px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #clutch-live-stage .pov-scene-wrap {
    max-width: 316px !important;
  }
  #clutch-live-stage .pov-stage {
    height: 158px !important;
    max-width: 316px !important;
  }
  #clutch-live-stage .pov-act-btn {
    padding: 4px 8px !important;
    font-size: 10.5px !important;
  }
  .start-actions {
    gap: 4px;
    overflow-y: auto;
  }
  .start-actions .panel {
    padding: 6px 8px !important;
  }
  .start-actions .panel button {
    padding: 5px 8px !important;
    font-size: 11px !important;
    margin-bottom: 4px !important;
  }
  .start-sub-grid {
    gap: 4px;
    margin-top: 2px;
  }
  .start-sub-grid button {
    margin: 0 !important;
    padding: 4px 4px !important;
    font-size: 10px !important;
  }
  .start-auth-desc {
    display: none;
  }
  .nir-event-cut {
    max-width: 240px !important;
  }

  /* Create Screen Ultra-Compact 2-Col down to 270px height */
  .create-panel {
    padding: 5px 8px !important;
  }
  .create-panel h2 {
    font-size: 12px !important;
    margin: 0 !important;
    padding-bottom: 1px;
  }
  .create-grid-desktop {
    gap: 8px;
    align-items: start;
  }
  .create-form-col {
    gap: 3px !important;
  }
  .create-form-col label {
    margin-bottom: 1px;
    font-size: 9px;
  }
  .create-form-col input,
  .create-form-col select {
    padding: 2px 4px;
    font-size: 10.5px;
    min-height: 22px;
  }
  .create-form-col button {
    padding: 2px 3px !important;
    font-size: 9.5px !important;
  }
  .club-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
  }
  .club-chip {
    padding: 1px 3px;
    font-size: 8.5px;
    gap: 2px;
  }
  .club-chip img {
    width: 12px;
    height: 12px;
  }
  .create-face-cell {
    padding: 2px 3px !important;
    gap: 2px;
  }
  .create-face-svg svg {
    width: 18px;
    height: 18px;
  }
  .create-face-lbl {
    font-size: 8.5px !important;
    margin-top: 0 !important;
  }
  .create-preview-col {
    gap: 4px !important;
    position: static;
  }
  .create-preview-col .nir-player-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas:
      "hdr hdr"
      "img ftr";
    align-items: center;
    padding: 5px 7px;
    gap: 3px 8px;
  }
  .create-preview-col .nir-card-header {
    grid-area: hdr;
    font-size: 9.5px;
  }
  .create-preview-col .nir-card-portrait {
    grid-area: img;
    max-width: 58px;
    margin: 0;
  }
  .create-preview-col .nir-card-footer {
    grid-area: ftr;
    text-align: left;
  }
  .create-preview-col .nir-card-name {
    font-size: 13px;
  }
  .create-preview-col .nir-card-sub {
    font-size: 10px;
  }
  .create-preview-col #create-start-btn {
    padding: 7px !important;
    font-size: 12.5px !important;
  }

  /* Weekly 3-Column Zero Scroll */
  .dashboard-grid {
    grid-template-columns: 172px minmax(0, 1fr) 264px;
    gap: 6px;
  }
  .dash-col {
    gap: 4px;
  }
  .panel {
    padding: 5px 7px;
  }
  .dash-col-left .nir-player-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
      "hdr hdr"
      "img ftr";
    align-items: center;
    padding: 4px 6px;
    gap: 3px 6px;
  }
  .dash-col-left .nir-card-header {
    grid-area: hdr;
    font-size: 9.5px;
  }
  .dash-col-left .nir-card-ovr {
    font-size: 10.5px;
  }
  .dash-col-left .nir-card-portrait {
    grid-area: img;
    max-width: 52px;
    margin: 0;
  }
  .dash-col-left .nir-card-footer {
    grid-area: ftr;
    text-align: left;
    min-inline-size: 0;
  }
  .dash-col-left .nir-card-name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dash-col-left .nir-card-sub {
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .player-vitals-panel {
    padding: 4px 6px !important;
  }
  .player-vitals-panel > div:first-child {
    gap: 2px 4px !important;
  }
  .player-vitals-panel > div:first-child > div > div:first-child {
    font-size: 8.5px !important;
  }
  .player-vitals-panel > div:first-child > div > div:nth-child(2) {
    font-size: 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .player-vitals-panel .stat-gauge-row {
    margin-top: 2px;
  }
  .traits-panel {
    padding: 4px 6px !important;
  }
  .traits-panel h2 {
    font-size: 10.5px !important;
    margin-bottom: 2px !important;
    padding-bottom: 2px !important;
  }

  /* Center Stadium + ABS/News Strip Zero Scroll */
  .kairo-stage-hud {
    padding: 2px 6px;
    font-size: 10px;
  }
  .kairo-stage-canvas {
    width: auto;
    max-width: 100%;
    max-height: 132px;
    margin: 0 auto;
  }
  .center-bottom-strip {
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 5px;
  }
  .abs-hud-card {
    padding: 5px 6px;
    gap: 6px;
    font-size: 10px;
  }
  .abs-zone-box {
    width: 34px;
    height: 42px;
  }
  .media-ticker-panel {
    padding: 5px 7px !important;
  }
  .media-ticker-panel h2 {
    font-size: 11px !important;
    margin-bottom: 3px !important;
    padding-bottom: 2px !important;
  }
  .media-ticker-item {
    padding: 3px 5px;
    font-size: 10px;
  }

  /* Right Schedule + 1-Click Command Dock Zero Scroll */
  .dash-col-right {
    gap: 3px;
  }
  .schedule-panel {
    padding: 4px 6px !important;
  }
  .schedule-panel [data-tb="title"] {
    font-size: 12px !important;
  }
  .daystrip {
    margin-top: 2px;
  }
  .daycell {
    padding: 2px 1px;
  }
  .daycell .label {
    font-size: 8px;
  }
  .daycell .val {
    font-size: 8.5px;
  }
  .kairo-paused-banner {
    display: none !important;
  }
  .kairo-paused-inline {
    display: inline-flex;
  }
  .kairo-camp-btn {
    margin-top: 4px;
    padding: 4px 6px !important;
    font-size: 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .kairo-dock-panel {
    padding: 4px 6px !important;
  }
  .kairo-dock-tabs {
    gap: 3px;
    margin-bottom: 3px;
  }
  .kairo-dock-tab {
    padding: 2px 1px !important;
    font-size: 9px !important;
    gap: 1px;
  }
  .kairo-dock-tab img {
    width: 13px;
    height: 13px;
  }
  .kairo-active-preset-hint {
    font-size: 9px;
    margin-bottom: 3px;
    padding-bottom: 1px;
  }
  .kairo-preset-grid {
    gap: 2px;
  }
  .kairo-preset-card {
    padding: 2px 4px !important;
    min-height: 19px;
  }
  .kairo-preset-head {
    font-size: 9.5px;
    gap: 3px;
  }
  .kairo-preset-head img {
    width: 13px;
    height: 13px;
  }
}

/* Narrow Handheld Landscape (480px ~ 720px width, e.g., 568x270 / 612x280) */
@media (orientation: landscape) and (min-width: 480px) and (max-width: 720px) {
  .start-screen {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 270px);
    gap: 8px;
    padding: 5px 8px;
  }
  .create-grid-desktop {
    grid-template-columns: minmax(0, 1.45fr) minmax(168px, 0.78fr);
    gap: 6px;
  }
  .dashboard-grid {
    grid-template-columns: 132px minmax(0, 1fr) 210px;
    gap: 4px;
  }
  .center-bottom-strip {
    grid-template-columns: 118px minmax(0, 1fr);
  }
  .kairo-stage-canvas {
    max-height: 112px;
  }
}


/* ──────────────────────────────────────────────────────────────────────────
   3-Strike / 4-Ball POV B-S-O HUD & Minigame Landscape Grid
   ────────────────────────────────────────────────────────────────────────── */
.nir-card-hand {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  color: #fde68a;
  font-weight: 700;
}

.pov-stage .pov-bso-board {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(8, 15, 28, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.pov-bso-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pov-bso-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.pov-bso-dot.dot-b.on {
  background: #22c55e;
  border-color: #86efac;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.85);
}

.pov-bso-dot.dot-s.on {
  background: #f59e0b;
  border-color: #fde68a;
  box-shadow: 0 0 5px rgba(245, 158, 11, 0.85);
}

.pov-bso-dot.dot-o.on {
  background: #ef4444;
  border-color: #fca5a5;
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.85);
}

.pov-pitch-pill {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(245, 185, 66, 0.22);
  border: 1px solid rgba(245, 185, 66, 0.55);
  color: #fde68a;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.pov-inline-controls {
  position: relative;
  width: 100%;
  padding: 6px 8px;
  box-sizing: border-box;
  background: rgba(15, 24, 34, 0.92);
  border: 2px solid #4a3321;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stack[hidden],
.pov-inline-controls[hidden] {
  display: none !important;
}

.pov-inline-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.pov-mini-pill {
  padding: 3px 7px !important;
  min-height: 24px !important;
  font-size: 10px !important;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.85) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 5px;
}

.pov-mini-pill.active {
  background: #2563eb !important;
  border-color: #93c5fd !important;
  color: #ffffff !important;
}

.pov-mini-pill.intent.chase {
  background: #9333ea !important;
  border-color: #d8b4fe !important;
  color: #ffffff !important;
}

.pov-inline-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.pov-act-btn {
  padding: 6px 10px !important;
  font-size: 11px !important;
  font-weight: 800;
  min-height: 32px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Standalone Minigame */
.minigame-lobby,
.minigame-grid,
.minigame-gameover {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.minigame-mode-row,
.minigame-intent-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.minigame-pill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.minigame-pill-grid button,
.minigame-intent-row button {
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 700;
  min-width: 0;
}

.minigame-rule-box,
.minigame-record-box {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  white-space: pre-line;
  line-height: 1.45;
}

.minigame-record-box {
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  color: var(--accent-2);
}

.minigame-base-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.minigame-hint {
  font-size: 11px;
  line-height: 1.3;
  flex: 1 1 auto;
}

.minigame-diamond {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  transform: rotate(45deg);
  margin: 4px;
}

.mg-base {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1.5px solid #4a3321;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

.mg-base.b2 { top: 0; left: 0; }
.mg-base.b3 { bottom: 0; left: 0; }
.mg-base.b1 { top: 0; right: 0; }

.mg-base.on {
  background: #f59e0b;
  border-color: #78350f;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
}

.minigame-hud-strip {
  display: flex;
  align-items: center;
  gap: 6px;
}

.minigame-hud-val {
  flex: 1 1 auto;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 12px;
  color: var(--accent-2);
  text-align: center;
}

.minigame-hud-val.warn {
  color: var(--bad);
}

.minigame-call-log {
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
}

.minigame-action-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.minigame-big-btn {
  width: 100%;
  min-block-size: 46px;
  font-size: 15px;
  font-weight: 800;
}

.minigame-sec-btn {
  width: 100%;
  min-block-size: 40px;
  font-size: 13px;
  font-weight: 700;
}

.minigame-gameover {
  max-width: 440px;
  margin: auto;
  text-align: center;
}

.minigame-over-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

@media (pointer: coarse) {
  .minigame-big-btn,
  .minigame-sec-btn,
  .pov-act-btn {
    min-block-size: 44px;
  }
}

@media (orientation: landscape) and (min-width: 480px) {
  .minigame-lobby {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(200px, 0.9fr);
    align-items: center;
    gap: 14px;
  }
  .minigame-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.95fr);
    align-items: stretch;
    gap: 12px;
  }
  .minigame-stage-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }
  .minigame-ctrl-col {
    min-width: 0;
  }
}

@media (orientation: landscape) and (max-height: 360px) {
  .minigame-grid {
    padding: 6px 8px;
    gap: 8px;
  }
  .minigame-grid .pov-stage {
    height: 168px !important;
    max-width: 299px !important;
  }
  .minigame-big-btn {
    min-block-size: 38px;
    font-size: 13px;
  }
  .minigame-sec-btn {
    min-block-size: 32px;
    font-size: 11.5px;
  }
  .minigame-base-strip {
    margin-top: 3px;
  }
  .minigame-hint {
    font-size: 10px;
  }
}

/* ── 1B / 2B / 3B / HR 타구 임팩트·화면 쉐이크·배너 연출 ── */
@keyframes pov-hr-shake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  14% { transform: translate3d(-5px, -3px, 0) rotate(-0.6deg); }
  28% { transform: translate3d(5px, 3px, 0) rotate(0.6deg); }
  44% { transform: translate3d(-4px, 2px, 0) rotate(-0.4deg); }
  62% { transform: translate3d(3px, -2px, 0) rotate(0.3deg); }
  80% { transform: translate3d(-2px, 1px, 0); }
}

@keyframes pov-xbh-jolt {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-2.5px, 1.5px, 0); }
  55% { transform: translate3d(2.5px, -1.5px, 0); }
}

@keyframes pov-hr-flash-anim {
  0% { opacity: 0.78; }
  35% { opacity: 0.36; }
  100% { opacity: 0; }
}

@keyframes pov-banner-pop {
  0% { transform: scale(0.84); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pov-stage.pov-shake-hr {
  animation: pov-hr-shake 440ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pov-stage.pov-shake-xbh {
  animation: pov-xbh-jolt 240ms ease-out;
}

.pov-hr-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(circle at 50% 54%, rgba(255, 250, 210, 0.92) 0%, rgba(255, 196, 70, 0.45) 48%, rgba(255, 180, 40, 0) 82%);
  animation: pov-hr-flash-anim 400ms ease-out forwards;
}

.pov-hit-banner {
  transform-box: fill-box;
  transform-origin: center;
  animation: pov-banner-pop 210ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.pov-hit-banner.is-hr rect {
  filter: drop-shadow(0 0 6px rgba(255, 209, 102, 0.65));
}

/* ── 레전드 드림팀 로스터 & CPU 도장깨기 ── */
.dreamteam-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
@media (max-width: 520px) {
  .dreamteam-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.dreamteam-slot-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 7px 8px !important;
  border: 2px solid #4a3321 !important;
  border-radius: 7px !important;
  background: var(--panel-2) !important;
  text-align: left !important;
  min-width: 0;
}
.dreamteam-slot-card.is-filled {
  background: #fff9e6 !important;
  border-color: #d97706 !important;
  color: #2f1f14 !important;
}
.dreamteam-vault-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
@media (max-width: 520px) {
  .dreamteam-vault-grid {
    grid-template-columns: 1fr;
  }
}
.dreamteam-vault-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel-2);
  min-width: 0;
}
.dreamteam-boxscore {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: center;
}
.dreamteam-boxscore th,
.dreamteam-boxscore td {
  border: 1px solid var(--border);
  padding: 4px 5px;
}
.dreamteam-boxscore th {
  background: var(--panel-2);
  font-weight: 800;
}

/* ── D-30 실시간 해외 포스팅·FA 모달 & 상점 장바구니·스태프 번들 ── */
dialog.overseas-d30-modal[open] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.overseas-modal-title {
  margin: 0;
  font-size: 16px;
  color: var(--accent);
}
.d30-led-banner {
  background: #0f172a;
  color: #f8fafc;
  border: 2px solid #4a3321;
  border-radius: 8px;
  padding: 8px 10px;
}
.d30-led-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}
.d30-day-badge {
  background: #dc2626;
  color: #fff;
  font-weight: 900;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 13px;
}
.d30-progress-track {
  height: 6px;
  background: #334155;
  border-radius: 999px;
  overflow: hidden;
}
.d30-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #facc15, #22c55e);
  transition: width 0.2s ease;
}
.d30-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.d30-controls button {
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 700;
}
.d30-choice-box {
  background: #fef3c7;
  color: #2f1f14;
  border: 2px solid #d97706;
  border-radius: 8px;
  padding: 9px 10px;
}
.d30-ticker-feed {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  max-height: 92px;
  overflow-y: auto;
  font-size: 11px;
  line-height: 1.45;
}
.d30-ticker-line + .d30-ticker-line {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px dashed rgba(74, 51, 33, 0.25);
}
.d30-offers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.d30-offer-card {
  background: #fffdf5;
  color: #2f1f14;
  border: 2px solid #4a3321;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.d30-offer-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
}
.d30-league-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: #1e293b;
  color: #f8fafc;
}
.d30-league-pill.is-mlb { background: #1d4ed8; }
.d30-league-pill.is-npb { background: #b91c1c; }
.d30-league-pill.is-homecoming { background: #b45309; }
.d30-bump-tag {
  background: #15803d;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}
.d30-warn-tag {
  background: #b91c1c;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}
.d30-offer-fin {
  font-size: 12px;
  font-weight: 700;
  color: #14532d;
}
.d30-clause-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #9a3412;
  background: #ffedd5;
  padding: 4px 7px;
  border-radius: 5px;
  cursor: pointer;
}
.d30-sign-btn {
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.staff-bundle-banner {
  background: #fef3c7;
  color: #2f1f14;
  border: 2px solid #d97706;
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.staff-bundle-title {
  font-size: 12.5px;
  font-weight: 800;
}
.staff-bundle-sub {
  font-size: 11px;
  margin-top: 2px;
}
.shop-cart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.shop-cart-toolbar button {
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
}
.shop-cart-toggle {
  padding: 3px 7px !important;
  font-size: 10.5px !important;
  font-weight: 800;
  border-radius: 5px;
}
.shop-cart-toggle.is-in-cart {
  background: #1d522b !important;
  color: #fff !important;
  border-color: #14532d !important;
}
.shop-cart-bar {
  position: sticky;
  bottom: 6px;
  z-index: 10;
  margin-top: 8px;
  background: #fffbeb;
  color: #2f1f14;
  border: 2px solid #4a3321;
  box-shadow: 0 3px 0 #4a3321;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}
