:root {
  --bg: #eef4f8;
  --panel: rgba(255, 255, 255, 0.92);
  --paper: #fffaf0;
  --ink: #182033;
  --muted: #6d778b;
  --line: #dfe7f0;
  --accent: #4f7cff;
  --accent-2: #20b486;
  --warn: #ff5c70;
  --note: #fff6d8;
  --shadow: 0 24px 80px rgba(39, 57, 91, 0.18);
  --keyboard-inset: 0px;
  --app-top-safe: max(34px, calc(env(safe-area-inset-top) + 14px));
  --play-top-safe: max(38px, calc(env(safe-area-inset-top) + 12px));
  --play-bottom-safe: max(18px, env(safe-area-inset-bottom));
  --overlay-bottom-safe: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  --sheet-dock-clearance: max(82px, calc(env(safe-area-inset-bottom) + 74px));
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 10%, rgba(79, 124, 255, 0.18), transparent 32%),
    radial-gradient(circle at 86% 12%, rgba(32, 180, 134, 0.16), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 48%, #eaf0f6 100%);
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(340px, 410px);
  gap: 0;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 100%;
  padding: 18px;
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 390px);
  height: min(844px, calc(100dvh - 36px));
  overflow: hidden;
  overscroll-behavior: none;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 246, 251, 0.98));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.side-panel {
  display: none !important;
}

.app-modal {
  position: absolute;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.app-modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 27, 43, 0.38);
  backdrop-filter: blur(10px) saturate(1.1);
}

.app-modal .modal-card,
.app-modal .menu-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  max-height: calc(100% - 22px);
  overflow: auto;
}

.sheet-modal {
  align-items: end;
  padding: 0;
}

.sheet-modal .menu-sheet {
  max-width: none;
  max-height: 86%;
  overflow: auto;
  border-radius: 22px 22px 0 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px 8px;
}

.topbar h1 {
  margin: 0;
  color: #111a2e;
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: 0;
}

.topbar .eyebrow {
  margin-bottom: 2px;
  font-size: 10px;
}

.top-status {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.top-status span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 4px 7px;
  border: 1px solid rgba(218, 227, 240, 0.9);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #172033, #30405f);
  box-shadow: 0 8px 18px rgba(24, 32, 51, 0.1);
  line-height: 1;
}

.top-status b {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 900;
}

.top-status strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 1000;
}

.top-status .timer-only {
  min-width: 58px;
  justify-content: center;
  padding-inline: 8px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.topbar .icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(211, 222, 238, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(39, 57, 91, 0.08);
}

body.is-playing .topbar {
  display: none;
}

body.is-title .topbar {
  display: none;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.settings-language-section {
  display: grid;
  gap: 8px;
}

.language-select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(206, 218, 235, 0.95);
  border-radius: 14px;
  color: #172033;
  background: #fff;
  font-weight: 900;
  outline: none;
}

.language-select:focus {
  border-color: rgba(79, 124, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}

.settings-language-section.locked {
  opacity: 0.72;
}

.language-select:disabled {
  cursor: not-allowed;
  color: #7a8498;
  background: #eef3f8;
  box-shadow: none;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 2px 0 0;
  font-size: 21px;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(223, 231, 240, 0.9);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(39, 57, 91, 0.08);
}

.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(223, 231, 240, 0.9);
  border-radius: 12px;
  padding: 0 11px;
  color: var(--ink);
  background: #f7faff;
  font-size: 13px;
  font-weight: 900;
}

.setting-toggle strong {
  display: grid;
  min-width: 38px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-size: 11px;
}

.profile-strip,
.score-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 0 10px 6px;
}

.profile-strip div,
.score-board div {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(223, 231, 240, 0.82);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 18px rgba(39, 57, 91, 0.06);
}

.profile-strip strong,
.score-board strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-board .label {
  font-size: 10px;
}

.effect-strip {
  position: absolute;
  top: 92px;
  left: 50%;
  right: auto;
  z-index: 36;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border: 1px solid #c7ddff;
  border-radius: 999px;
  color: #173a74;
  background: #eef5ff;
  font-size: 11px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.effect-strip[hidden] {
  display: none;
}

.effect-strip.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.effect-strip.support {
  border-color: rgba(32, 180, 134, 0.42);
  color: #126344;
  background: linear-gradient(135deg, #e5fff1, #ffffff);
  box-shadow: 0 10px 24px rgba(32, 180, 134, 0.16);
}

.effect-strip.reward {
  border-color: rgba(240, 196, 81, 0.58);
  color: #725215;
  background: linear-gradient(135deg, #fff5c8, #ffffff);
  box-shadow: 0 10px 24px rgba(240, 196, 81, 0.2);
}

.effect-strip.surge {
  border-color: rgba(245, 145, 72, 0.46);
  color: #8b3a16;
  background: linear-gradient(135deg, #fff0df, #ffffff);
  box-shadow: 0 10px 24px rgba(245, 145, 72, 0.17);
}

.effect-strip.bad {
  border-color: rgba(239, 106, 91, 0.5);
  color: #812c36;
  background: linear-gradient(135deg, #ffe9e7, #ffffff);
  box-shadow: 0 10px 24px rgba(239, 106, 91, 0.18);
}

.play-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 42;
  overflow: hidden;
  pointer-events: none;
}

.slot-expansion-fx {
  --slot-fx-main: #2878f0;
  --slot-fx-accent: #18bda3;
  position: absolute;
  z-index: 8;
  min-width: 120px;
  min-height: 80px;
  border-radius: 16px;
  pointer-events: none;
  animation: slotExpansionShell 1080ms cubic-bezier(.2,.76,.2,1) both;
}

.slot-expansion-outline {
  position: absolute;
  inset: 0;
  border: 2px solid color-mix(in srgb, var(--slot-fx-main) 78%, white);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(40, 120, 240, 0.02), rgba(24, 189, 163, 0.09), rgba(40, 120, 240, 0.02));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.84),
    0 0 0 1px rgba(40, 120, 240, 0.12),
    0 0 24px rgba(40, 120, 240, 0.22);
  transform-origin: center;
  animation: slotExpansionOutline 980ms cubic-bezier(.2,.76,.2,1) both;
}

.slot-expansion-outline::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--slot-fx-main) 18%, var(--slot-fx-accent) 82%, transparent);
  opacity: 0;
  transform: scaleX(0.18);
  animation: slotExpansionRail 760ms 100ms ease-out both;
}

.slot-expansion-edge {
  position: absolute;
  top: 18%;
  bottom: 18%;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #fff 26%, var(--slot-fx-accent) 50%, #fff 74%, transparent);
  box-shadow: 0 0 14px rgba(24, 189, 163, 0.58);
  opacity: 0;
}

.slot-expansion-edge-left {
  left: 0;
  animation: slotExpansionEdgeLeft 760ms 80ms ease-out both;
}

.slot-expansion-edge-right {
  right: 0;
  animation: slotExpansionEdgeRight 760ms 80ms ease-out both;
}

.slot-expansion-badge {
  position: absolute;
  left: var(--slot-badge-left, 50%);
  top: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 104px;
  padding: 5px 9px 5px 5px;
  border: 1px solid rgba(84, 145, 242, 0.44);
  border-radius: 12px;
  color: #14284a;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 7px 18px rgba(31, 70, 139, 0.2);
  opacity: 0;
  transform: translate(-50%, -8px) scale(0.82);
  animation: slotExpansionBadge 940ms 80ms cubic-bezier(.18,.84,.2,1) both;
}

.slot-expansion-badge img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  object-fit: cover;
}

.slot-expansion-badge > span {
  display: grid;
  gap: 1px;
  white-space: nowrap;
}

.slot-expansion-badge b {
  font-size: 11px;
  font-weight: 1000;
  line-height: 1.15;
}

.slot-expansion-badge em {
  color: #2878f0;
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1.1;
}

.memo-count.slot-count-expanded {
  animation: slotCountExpanded 760ms cubic-bezier(.18,.84,.2,1) both;
}

@keyframes slotExpansionShell {
  0%, 100% { opacity: 0; }
  12%, 76% { opacity: 1; }
}

@keyframes slotExpansionOutline {
  0% { opacity: 0; transform: scaleX(0.9) scaleY(0.98); }
  28% { opacity: 1; transform: scaleX(1.018) scaleY(1); }
  72% { opacity: 0.94; transform: scaleX(1) scaleY(1); }
  100% { opacity: 0; transform: scaleX(1) scaleY(1); }
}

@keyframes slotExpansionRail {
  0% { opacity: 0; transform: scaleX(0.18); }
  34% { opacity: 1; }
  100% { opacity: 0; transform: scaleX(1); }
}

@keyframes slotExpansionEdgeLeft {
  0% { opacity: 0; transform: translateX(13px) scaleY(0.4); }
  34% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-5px) scaleY(1); }
}

@keyframes slotExpansionEdgeRight {
  0% { opacity: 0; transform: translateX(-13px) scaleY(0.4); }
  34% { opacity: 1; }
  100% { opacity: 0; transform: translateX(5px) scaleY(1); }
}

@keyframes slotExpansionBadge {
  0% { opacity: 0; transform: translate(-50%, -8px) scale(0.82); }
  22% { opacity: 1; transform: translate(-50%, 0) scale(1.04); }
  70% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -3px) scale(0.98); }
}

@keyframes slotCountExpanded {
  0%, 100% { transform: scale(1); box-shadow: none; }
  30% { transform: scale(1.15); color: #fff; background: #2878f0; box-shadow: 0 0 0 5px rgba(40, 120, 240, 0.16); }
}

body.theme-dark .slot-expansion-badge {
  border-color: rgba(98, 176, 255, 0.52);
  color: #edf6ff;
  background: rgba(18, 34, 57, 0.97);
}

body.theme-dark .slot-expansion-outline {
  background: linear-gradient(90deg, rgba(47, 132, 255, 0.04), rgba(31, 201, 174, 0.12), rgba(47, 132, 255, 0.04));
  box-shadow: inset 0 0 0 1px rgba(195, 229, 255, 0.18), 0 0 25px rgba(43, 142, 255, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .slot-expansion-fx,
  .slot-expansion-outline,
  .slot-expansion-outline::after,
  .slot-expansion-edge,
  .slot-expansion-badge,
  .memo-count.slot-count-expanded {
    animation-duration: 1ms !important;
  }
}

/* Keep modal actions clear of the lobby dock and Android navigation area. */
.app-modal:not(.sheet-modal) {
  padding-bottom: var(--overlay-bottom-safe);
}

.sheet-modal .menu-sheet,
#menuDialog .menu-sheet {
  width: calc(100% - 16px);
  margin: 0 8px var(--sheet-dock-clearance);
  max-height: calc(100% - var(--app-top-safe) - var(--sheet-dock-clearance) - 8px);
  border-radius: 22px;
}

#missionDialog .daily-panel,
#rankingDialog .home-ranking {
  padding-bottom: 8px;
}

#claimMissionBtn {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin-top: 6px;
  box-shadow: 0 10px 24px rgba(26, 54, 102, 0.2);
}

#rankingList {
  padding-bottom: 8px;
}

.fx-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.art-game-fx {
  --fx-size: min(360px, 94vw);
  position: absolute;
  left: 50%;
  top: 37%;
  z-index: 5;
  width: var(--fx-size);
  height: var(--fx-size);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  filter: drop-shadow(0 15px 24px rgba(16, 28, 54, 0.16));
  transform: translate(-50%, -50%) scale(0.74);
  opacity: 0;
  animation: artGameFxPop 980ms cubic-bezier(.16,.92,.18,1) forwards;
  pointer-events: none;
  will-change: transform, opacity, filter;
}

.art-game-fx::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 62%;
  height: 62%;
  border: 2px solid rgba(91, 139, 226, 0.28);
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(91, 139, 226, 0.12);
  transform: translate(-50%, -50%) scale(0.62);
  animation: artFxHalo 1180ms ease-out forwards;
}

.art-fx-accent {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #dcecff;
  box-shadow: 0 0 8px rgba(91, 139, 226, 0.32);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--accent-angle)) translateX(12px) rotate(var(--accent-counter-angle)) scale(0.55);
  animation: artFxAccent 1180ms cubic-bezier(.16,.78,.2,1) var(--accent-delay) forwards;
}

.art-game-fx-clean::before { border-color: rgba(32, 167, 125, 0.3); box-shadow: 0 0 20px rgba(32, 167, 125, 0.13); }
.art-game-fx-clean .art-fx-accent {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 7px;
  color: #fff;
  background: #20a77d;
  box-shadow: 0 0 7px rgba(32, 167, 125, 0.24);
}

.art-game-fx-clean .art-fx-accent::before {
  content: "✓";
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
}

.art-game-fx-speed .art-fx-accent {
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #6ca7e8);
  box-shadow: none;
}

.art-game-fx-freeze::before { border-color: rgba(99, 176, 225, 0.34); }
.art-game-fx-freeze .art-fx-accent {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 2px;
  background: #86cbed;
  transform-origin: center;
}

.art-game-fx-reward::before { border-color: rgba(214, 165, 30, 0.32); box-shadow: 0 0 18px rgba(214, 165, 30, 0.14); }
.art-game-fx-reward .art-fx-accent {
  width: 10px;
  height: 10px;
  border: 1px solid #fff1a8;
  border-radius: 999px;
  background: #e2ad22;
  box-shadow: 0 0 8px rgba(214, 165, 30, 0.28);
}

.art-game-fx-reward .art-fx-accent::before {
  content: "★";
  color: #fff2a8;
  font-size: 6px;
  line-height: 1;
}

@keyframes artFxHalo {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.62); }
  24% { opacity: 0.78; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.16); }
}

@keyframes artFxAccent {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--accent-angle)) translateX(12px) rotate(var(--accent-counter-angle)) scale(0.55);
  }
  24%, 80% { opacity: 0.92; }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--accent-angle)) translateX(var(--accent-distance)) rotate(var(--accent-counter-angle)) scale(0.2);
  }
}

.art-game-fx-clean {
  background-image: url("./assets/fx-art/cleanup-item-v2.png");
}

.art-game-fx-freeze {
  background-image: url("./assets/fx-art/freeze-item-v2.png");
}

.art-game-fx-speed {
  background-image: url("./assets/fx-art/slowdown-item-v2.png");
}

.art-game-fx-ai {
  background-image: url("./assets/fx-art/ai-assistant.png");
}

.art-game-fx-danger {
  --fx-size: min(380px, 98vw);
  background-image: url("./assets/fx-art/danger-overload.png");
}

.art-game-fx-reward {
  background-image: url("./assets/fx-art/gold-reward-v2.png");
}

.art-game-fx-compact {
  --fx-size: min(320px, 88vw);
}

.art-game-fx-item {
  --fx-size: min(190px, 50vw);
  top: 34%;
  animation-duration: 1320ms;
  opacity: 0.58;
}

.art-game-fx-reward-small {
  --fx-size: min(150px, 40vw);
  top: 29%;
  opacity: 0.72;
  animation-duration: 1080ms;
}

.art-game-fx-special {
  --fx-size: min(270px, 72vw);
  top: 33%;
  animation-duration: 900ms;
  opacity: 0.95;
}

.art-game-fx-alert {
  --fx-size: min(330px, 88vw);
  top: 31%;
  animation-name: artGameFxAlert;
  animation-duration: 880ms;
  filter: drop-shadow(0 16px 26px rgba(120, 26, 26, 0.18));
}

@keyframes artGameFxPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.54) rotate(-4deg);
    filter: blur(1px) drop-shadow(0 18px 26px rgba(16, 28, 54, 0.1));
  }
  16% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.98) rotate(0deg);
    filter: blur(0) drop-shadow(0 18px 28px rgba(16, 28, 54, 0.18));
  }
  76% {
    opacity: 0.52;
    transform: translate(-50%, -50%) scale(1.01) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.08) rotate(0deg);
    filter: blur(0.3px) drop-shadow(0 12px 20px rgba(16, 28, 54, 0.08));
  }
}

.ambient-game-fx {
  --ambient-main: #4f7cff;
  position: absolute;
  left: 10px;
  right: 10px;
  top: 132px;
  z-index: 4;
  height: min(46%, 330px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ambient-main) 26%, transparent);
  border-radius: 18px;
  opacity: 0;
  pointer-events: none;
  animation: ambientFrame 620ms ease-out forwards;
}

.ambient-game-fx::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, color-mix(in srgb, var(--ambient-main) 12%, transparent) 48%, transparent 70%);
  transform: translateX(-90%);
  animation: ambientSweep 560ms ease-out forwards;
}

.ambient-game-fx i {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: color-mix(in srgb, var(--ambient-main) 54%, white);
  opacity: 0.72;
}

.ambient-game-fx i:nth-child(1) { left: 7px; top: 7px; border-left: 2px solid; border-top: 2px solid; border-radius: 7px 0 0; }
.ambient-game-fx i:nth-child(2) { right: 7px; top: 7px; border-right: 2px solid; border-top: 2px solid; border-radius: 0 7px 0 0; }
.ambient-game-fx i:nth-child(3) { right: 7px; bottom: 7px; border-right: 2px solid; border-bottom: 2px solid; border-radius: 0 0 7px; }

.ambient-game-fx-clean { --ambient-main: #20a77d; }
.ambient-game-fx-freeze { --ambient-main: #4d9ed8; }
.ambient-game-fx-ai { --ambient-main: #5579d8; }
.ambient-game-fx-reward { --ambient-main: #c99a2d; }
.ambient-game-fx-danger { --ambient-main: #d86a5f; }

.ambient-game-fx-alert {
  top: 122px;
  height: min(42%, 290px);
  border-width: 1px 1px 2px;
  animation-duration: 680ms;
}

@keyframes ambientFrame {
  0% { opacity: 0; transform: scale(0.995); }
  22%, 60% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.002); }
}

@keyframes ambientSweep {
  0% { opacity: 0; transform: translateX(-90%); }
  24% { opacity: 0.78; }
  100% { opacity: 0; transform: translateX(90%); }
}

@keyframes artGameFxAlert {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.64) rotate(-5deg);
  }
  18% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.98) rotate(1deg);
  }
  68% {
    opacity: 0.88;
    transform: translate(-50%, -50%) scale(1.02) rotate(-1deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
  }
}

.fx-sprite-label {
  position: absolute;
  z-index: 2;
  min-width: 86px;
  max-width: 230px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  color: #142039;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(230,241,255,.9));
  box-shadow: 0 16px 34px rgba(19, 31, 58, 0.2), 0 0 0 5px rgba(255, 255, 255, 0.28);
  font-size: 13px;
  font-weight: 1000;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -50%) scale(.86);
  animation: fxSpriteLabel 1350ms cubic-bezier(.16,.92,.24,1) forwards;
  pointer-events: none;
}

.fx-burst {
  --fx-main: #20b486;
  --fx-soft: rgba(32, 180, 134, 0.2);
  position: absolute;
  top: 47%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 1px;
  height: 1px;
  color: #ffffff;
  transform: translate(-50%, -50%);
  animation: fxBurstFloat 2050ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  filter: drop-shadow(0 10px 22px var(--fx-soft));
}

.fx-burst.big {
  animation-duration: 2800ms;
}

.fx-aura,
.fx-shockwave {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  pointer-events: none;
}

.fx-aura {
  background:
    radial-gradient(circle, color-mix(in srgb, var(--fx-main) 34%, transparent), transparent 54%),
    conic-gradient(from 0deg, transparent 0 12%, color-mix(in srgb, var(--fx-main) 72%, #ffffff) 13% 18%, transparent 19% 31%, rgba(255,255,255,.9) 32% 35%, transparent 36% 100%);
  opacity: 0;
  filter: blur(1px);
  animation: fxAuraSpin 2200ms cubic-bezier(.12,.9,.22,1) forwards;
}

.fx-shockwave {
  border: 4px solid color-mix(in srgb, var(--fx-main) 72%, #ffffff);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--fx-main) 12%, transparent);
  opacity: 0;
  animation: fxShockwave 980ms ease-out forwards;
}

.fx-ring {
  position: absolute;
  width: 70px;
  height: 70px;
  border: 3px solid var(--fx-main);
  border-radius: 999px;
  background: radial-gradient(circle, var(--fx-soft), transparent 62%);
  animation: fxRing 1680ms ease-out forwards;
}

.fx-core {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--fx-main), rgba(255, 255, 255, 0.18));
  box-shadow: 0 12px 28px var(--fx-soft);
  font-size: 17px;
  font-weight: 1000;
  line-height: 1;
  animation: fxCorePop 1780ms ease-out forwards;
}

.fx-burst strong {
  position: absolute;
  top: 32px;
  max-width: 230px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #15213a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(24, 32, 51, 0.12);
  font-size: 11px;
  font-weight: 1000;
  line-height: 1.18;
  text-align: center;
  white-space: nowrap;
  animation: fxLabel 1880ms ease-out forwards;
}

.fx-burst i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ffffff, var(--fx-main));
  opacity: 0;
  transform: rotate(var(--a)) translateX(0) scale(0.8);
  animation: fxParticle 1540ms cubic-bezier(0.15, 0.9, 0.2, 1) var(--delay) forwards;
}

.fx-burst em {
  position: absolute;
  width: 42px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--fx-main), rgba(255,255,255,.92), transparent);
  opacity: 0;
  transform: rotate(var(--a)) translateX(0) scaleX(.45);
  animation: fxStreak 1060ms cubic-bezier(.12,.9,.18,1) var(--delay) forwards;
}

.fx-speed { --fx-main: #5f83ff; --fx-soft: rgba(95, 131, 255, 0.24); }
.fx-clean { --fx-main: #20b486; --fx-soft: rgba(32, 180, 134, 0.24); }
.fx-freeze { --fx-main: #5bbdff; --fx-soft: rgba(91, 189, 255, 0.25); }
.fx-support { --fx-main: #20b486; --fx-soft: rgba(32, 180, 134, 0.22); }
.fx-reward { --fx-main: #f0c451; --fx-soft: rgba(240, 196, 81, 0.32); }
.fx-bad { --fx-main: #ef6a5b; --fx-soft: rgba(239, 106, 91, 0.28); }
.fx-surge { --fx-main: #f28a3e; --fx-soft: rgba(242, 138, 62, 0.3); }
.fx-level { --fx-main: #7b61ff; --fx-soft: rgba(123, 97, 255, 0.28); }
.fx-boss { --fx-main: #b86623; --fx-soft: rgba(184, 102, 35, 0.3); }
.fx-gear { --fx-main: #3f8cff; --fx-soft: rgba(63, 140, 255, 0.28); }
.fx-guard { --fx-main: #17a6a6; --fx-soft: rgba(23, 166, 166, 0.26); }
.fx-ai { --fx-main: #4f7cff; --fx-soft: rgba(79, 124, 255, 0.26); }
.fx-power { --fx-main: #ff5f9b; --fx-soft: rgba(255, 95, 155, 0.26); }
.fx-combo { --fx-main: #8b5cf6; --fx-soft: rgba(139, 92, 246, 0.26); }

.memo-hit-fx {
  position: absolute;
  z-index: 45;
  min-width: 46px;
  max-width: 148px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #273a62, #4f7cff);
  box-shadow: 0 12px 26px rgba(24, 32, 51, 0.18), 0 0 0 3px rgba(79, 124, 255, 0.1);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.82);
  animation: memoHitFloat 1280ms cubic-bezier(0.16, 0.92, 0.24, 1) forwards;
}

.memo-card-burst {
  --burst-main: #4f7cff;
  position: absolute;
  z-index: 44;
  width: 104px;
  height: 70px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.memo-card-burst::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  border: 3px solid color-mix(in srgb, var(--burst-main), white 14%);
  border-radius: 999px;
  box-shadow:
    0 0 20px color-mix(in srgb, var(--burst-main), transparent 18%),
    inset 0 0 16px color-mix(in srgb, var(--burst-main), transparent 35%);
  transform: translate(-50%, -50%) scale(0.45);
  animation: memoBurstRing 520ms ease-out forwards;
}

.memo-card-burst span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, var(--burst-main));
  box-shadow:
    0 0 14px color-mix(in srgb, var(--burst-main), transparent 10%),
    0 0 4px #fff;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scaleY(0.45);
  animation: memoBurstSpark 620ms cubic-bezier(.12,.86,.2,1) var(--delay) forwards;
}

.memo-card-burst.burst-clean,
.memo-card-burst.burst-support {
  --burst-main: #20b486;
}

.memo-card-burst.burst-combo {
  --burst-main: #7c5cff;
}

.memo-card-burst.burst-gear,
.memo-card-burst.burst-boss {
  --burst-main: #f59e0b;
}

.memo-card-burst.burst-bad {
  --burst-main: #ef4444;
}

.memo-card-resolve-fx {
  --resolve-main: #4f7cff;
  position: absolute;
  z-index: 44;
  min-height: 34px;
  overflow: visible;
  border-radius: 12px;
  pointer-events: none;
}

.memo-card-resolve-fx::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--resolve-main) 15%, white) 44%, color-mix(in srgb, var(--resolve-main) 27%, white) 52%, transparent 100%);
  opacity: 0;
  transform: scaleX(0.08);
  animation: memoResolveWash 680ms cubic-bezier(.2,.8,.2,1) forwards;
}

.memo-card-resolve-fx b {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--resolve-main) 18%, #fff 50%, var(--resolve-main) 82%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--resolve-main) 44%, transparent);
  transform: translateY(-50%) scaleX(0);
  animation: memoResolveLine 620ms ease-out forwards;
}

.memo-card-resolve-fx em {
  position: absolute;
  right: 10px;
  top: 50%;
  max-width: 44%;
  overflow: hidden;
  color: color-mix(in srgb, var(--resolve-main) 82%, #172033);
  font-size: 11px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-50%) translateX(5px);
  animation: memoResolveScore 760ms ease-out forwards;
}

.memo-card-resolve-fx span {
  position: absolute;
  left: var(--spark-x);
  top: var(--spark-y);
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--resolve-main) 72%, white);
  box-shadow: 0 0 7px color-mix(in srgb, var(--resolve-main) 42%, transparent);
  opacity: 0;
  animation: memoResolveSpark 620ms ease-out var(--delay) forwards;
}

.memo-card-resolve-fx.resolve-clean,
.memo-card-resolve-fx.resolve-support { --resolve-main: #20a77d; }
.memo-card-resolve-fx.resolve-combo { --resolve-main: #735bd1; }
.memo-card-resolve-fx.resolve-gear,
.memo-card-resolve-fx.resolve-boss { --resolve-main: #d49324; }
.memo-card-resolve-fx.resolve-bad { --resolve-main: #d85b55; }
.memo-card-resolve-fx.resolve-rank-sss { --resolve-main: #d6a51e; }
.memo-card-resolve-fx.resolve-rank-ss { --resolve-main: #8d70d8; }
.memo-card-resolve-fx.resolve-rank-s { --resolve-main: #4678d8; }

@keyframes memoResolveWash {
  0% { opacity: 0; transform: scaleX(0.08); }
  24% { opacity: 0.86; }
  100% { opacity: 0; transform: scaleX(1); }
}

@keyframes memoResolveLine {
  0% { opacity: 0; transform: translateY(-50%) scaleX(0); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-50%) scaleX(1); }
}

@keyframes memoResolveScore {
  0%, 16% { opacity: 0; transform: translateY(-50%) translateX(5px); }
  34%, 70% { opacity: 0.88; transform: translateY(-50%) translateX(0); }
  100% { opacity: 0; transform: translateY(-70%) translateX(-2px); }
}

@keyframes memoResolveSpark {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  30% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(var(--drift-x), -10px) scale(0.2); }
}

@keyframes memoBurstRing {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.35); }
  18% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.15); }
}

@keyframes memoBurstSpark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scaleY(0.45);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-40px) scaleY(1);
  }
}

.memo-hit-fx.hit-support,
.memo-hit-fx.hit-clean {
  background: linear-gradient(135deg, #10b981, #20b486);
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.24), 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.memo-hit-fx.hit-combo {
  background: linear-gradient(135deg, #7c3aed, #4f7cff);
}

.memo-hit-fx.hit-gear,
.memo-hit-fx.hit-boss {
  background: linear-gradient(135deg, #f59e0b, #ef6a5b);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28), 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.memo-hit-fx.hit-bad {
  background: linear-gradient(135deg, #ef4444, #991b1b);
}

.memo-hit-fx.hit-rank-sss,
.memo-hit-fx.hit-rank-ss,
.memo-hit-fx.hit-rank-s {
  padding-inline: 12px;
  animation-duration: 1680ms;
}

.memo-hit-fx.hit-rank-sss {
  color: #3a2600;
  background: linear-gradient(135deg, #fff2a8, #f0aa18);
  box-shadow: 0 14px 30px rgba(240, 170, 24, 0.36), 0 0 0 5px rgba(255, 217, 93, 0.2);
}

.memo-hit-fx.hit-rank-ss {
  color: #253041;
  background: linear-gradient(135deg, #ffffff, #b8c2d0);
  box-shadow: 0 14px 30px rgba(72, 88, 116, 0.24), 0 0 0 5px rgba(184, 194, 208, 0.18);
}

.memo-hit-fx.hit-rank-s {
  background: linear-gradient(135deg, #b993ff, #7c5cff);
  box-shadow: 0 14px 30px rgba(124, 92, 255, 0.28), 0 0 0 5px rgba(124, 92, 255, 0.18);
}

@keyframes memoHitFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -38%) scale(0.78) rotate(-2deg);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -64%) scale(1.08) rotate(1deg);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -96%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -126%) scale(0.92) rotate(0deg);
  }
}

@keyframes fxSpriteLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, -28%) scale(.8);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -72%) scale(1.08);
  }
  68% {
    opacity: 1;
    transform: translate(-50%, -92%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -132%) scale(.94);
  }
}

body.fx-screen-pulse .memo-app {
  animation: fxScreenPulse 340ms ease-out;
}

body.fx-screen-bad .memo-app,
body.fx-screen-surge .memo-app {
  animation: fxAlertPulse 360ms ease-out;
}

.play-tutorial-coach {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  margin: 0 10px 2px;
  padding: 6px 9px;
  border: 1px solid rgba(79, 124, 255, 0.28);
  border-radius: 13px;
  color: #173a74;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 245, 255, 0.98));
  box-shadow: 0 10px 24px rgba(28, 39, 58, 0.14);
}

.play-tutorial-coach[hidden] {
  display: none;
}

.play-tutorial-coach span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 1000;
  white-space: nowrap;
}

.play-tutorial-coach strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.18;
}

.play-tutorial-coach small {
  grid-column: 1 / -1;
  color: #42516a;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.25;
}

.play-tutorial-coach button {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 28px;
  margin-top: 2px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  color: #ffffff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

body.tutorial-step-intro .play-tutorial-coach {
  margin: 4px 12px 6px;
  padding: 12px 14px;
  border-color: rgba(79, 124, 255, 0.42);
  box-shadow: 0 16px 36px rgba(28, 39, 58, 0.18);
}

body.tutorial-step-intro .play-tutorial-coach span {
  font-size: 12px;
}

body.tutorial-step-intro .play-tutorial-coach strong {
  font-size: 18px;
  line-height: 1.18;
}

body.tutorial-step-intro .play-tutorial-coach small {
  font-size: 13px;
  line-height: 1.35;
}

body.keyboard-open .play-tutorial-coach {
  margin: 0 8px 1px;
  padding: 5px 8px;
}

body.keyboard-open.tutorial-step-intro .play-tutorial-coach {
  margin: 4px 12px 6px;
  padding: 12px 14px;
}

.play-tutorial-coach.complete,
body.keyboard-open .play-tutorial-coach.complete {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  z-index: 260;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 24px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 26px;
  color: #182033;
  background:
    radial-gradient(circle at 82% 8%, rgba(79, 124, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 28px 70px rgba(20, 36, 68, 0.28);
  text-align: center;
  transform: translateY(-50%);
}

.play-tutorial-coach.complete span {
  justify-self: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: #172033;
  font-size: 12px;
}

.play-tutorial-coach.complete strong {
  font-size: 28px;
  line-height: 1.08;
}

.play-tutorial-coach.complete small {
  font-size: 14px;
  line-height: 1.42;
}

.play-tutorial-coach.complete button {
  justify-self: stretch;
  min-height: 72px;
  margin-top: 8px;
  border-radius: 20px;
  padding: 0 18px;
  background: linear-gradient(135deg, #4f7cff, #1f9ee7);
  box-shadow: 0 9px 0 #153b9a, 0 18px 32px rgba(39, 106, 255, 0.28);
  font-size: 22px;
}

body.tutorial-mode .memo-list {
  padding-top: 8px;
}

body.tutorial-mode .effect-strip {
  top: 174px;
  z-index: 44;
}

body.keyboard-open.tutorial-mode .memo-list {
  padding-top: 6px;
}

body.keyboard-open.tutorial-mode .effect-strip {
  top: calc(env(safe-area-inset-top) + 72px);
  max-width: min(270px, calc(100% - 20px));
}

body.tutorial-mode .memo-tools {
  visibility: hidden;
}

.overload-curtain {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 44px);
  left: 14px;
  right: 14px;
  z-index: 92;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(239, 106, 91, 0.55);
  border-radius: 16px;
  color: #742735;
  background: rgba(255, 246, 245, 0.98);
  box-shadow: 0 20px 44px rgba(239, 106, 91, 0.22);
  text-align: center;
  pointer-events: none;
  transform-origin: center top;
  animation: overloadCurtainIn 1050ms ease both;
}

.overload-curtain[hidden] {
  display: none;
}

.overload-curtain strong {
  font-size: 16px;
  line-height: 1.1;
}

.overload-curtain span {
  font-size: 12px;
  font-weight: 900;
}

.overload-curtain small {
  color: #9b5260;
  font-size: 10px;
  font-weight: 900;
}

@keyframes overloadCurtainIn {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  34% {
    opacity: 1;
    transform: translateY(0) scale(1.025);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.skill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: absolute;
  top: 50px;
  left: 14px;
  right: 14px;
  z-index: 38;
  pointer-events: none;
}

.skill-strip[hidden] {
  display: none;
}

.skill-strip span[hidden] {
  display: none;
}

.skill-strip span {
  flex: 0 0 auto;
  min-width: 58px;
  border: 1px solid rgba(31, 63, 117, 0.14);
  border-radius: 999px;
  padding: 6px 9px;
  color: #64748b;
  background: #f6f8fb;
  font-size: 10.5px;
  font-weight: 1000;
  text-align: center;
  white-space: nowrap;
}

.skill-strip span.active {
  color: #173a74;
  border-color: rgba(79, 124, 255, 0.34);
  background: linear-gradient(135deg, #eef5ff, #eafff6);
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.12);
}

.skill-strip span.using {
  color: #1b2b4b;
  border-color: rgba(240, 196, 81, 0.72);
  background: linear-gradient(135deg, #fff4bf, #eafff6);
  box-shadow: 0 0 0 3px rgba(240, 196, 81, 0.18), 0 9px 20px rgba(240, 196, 81, 0.2);
  animation: skillChipGlow 760ms ease-in-out infinite;
}

.skill-strip span[data-skill="auto"].using {
  border-color: rgba(79, 124, 255, 0.78);
  background: linear-gradient(135deg, #dfeaff, #ffffff);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.2), 0 9px 20px rgba(79, 124, 255, 0.18);
}

.skill-strip span[data-skill="clean"].using {
  border-color: rgba(47, 138, 85, 0.72);
  background: linear-gradient(135deg, #dbfff0, #ffffff);
  box-shadow: 0 0 0 3px rgba(47, 138, 85, 0.18), 0 9px 20px rgba(47, 138, 85, 0.16);
}

.skill-strip span[data-skill="combo"].using {
  border-color: rgba(239, 106, 91, 0.72);
  background: linear-gradient(135deg, #ffe7e3, #ffffff);
  box-shadow: 0 0 0 3px rgba(239, 106, 91, 0.18), 0 9px 20px rgba(239, 106, 91, 0.16);
}

.skill-strip span[data-skill="flow"].using,
.skill-strip span[data-skill="proof"].using {
  border-color: rgba(124, 92, 255, 0.68);
  background: linear-gradient(135deg, #efeaff, #ffffff);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16), 0 9px 20px rgba(124, 92, 255, 0.14);
}

.skill-strip span[data-skill="magnet"].using,
.skill-strip span[data-skill="bank"].using {
  border-color: rgba(232, 166, 55, 0.72);
  background: linear-gradient(135deg, #fff1cc, #ffffff);
  box-shadow: 0 0 0 3px rgba(232, 166, 55, 0.16), 0 9px 20px rgba(232, 166, 55, 0.14);
}

.play-mission {
  display: none;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 0 14px 8px;
  border: 1px solid rgba(216, 192, 112, 0.66);
  border-radius: 14px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fffdf1;
  text-align: left;
  box-shadow: 0 8px 18px rgba(155, 139, 80, 0.08);
}

.play-mission[hidden] {
  display: none;
}

.play-mission span,
.play-mission small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.play-mission strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-mission.complete {
  border-color: rgba(47, 138, 85, 0.5);
  background: #ecfff4;
}

.scenario-panel {
  display: none;
  gap: 3px;
  margin: 0 14px 8px;
  padding: 9px 11px;
  border: 1px solid rgba(158, 188, 255, 0.7);
  border-radius: 16px;
  color: #173a74;
  background: linear-gradient(135deg, rgba(240, 246, 255, 0.96), rgba(232, 250, 244, 0.96));
  box-shadow: 0 10px 24px rgba(79, 124, 255, 0.1);
}

.scenario-panel[hidden] {
  display: none;
}

.scenario-panel span {
  font-size: 10px;
  font-weight: 900;
  opacity: 0.78;
}

.scenario-panel strong {
  font-size: 13px;
}

.scenario-panel small {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.item-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  position: relative;
  z-index: 45;
  padding: 0 8px 5px;
}

.boss-panel {
  position: absolute;
  top: 98px;
  left: 14px;
  right: 14px;
  z-index: 39;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #f4b85f;
  border-radius: 12px;
  color: #2a1b08;
  background: linear-gradient(135deg, #fff0c9, #ffd7d7);
  box-shadow: 0 7px 18px rgba(184, 102, 35, 0.14);
  pointer-events: none;
}

.boss-panel[hidden] {
  display: none;
}

.boss-panel span {
  padding: 5px 7px;
  border-radius: 8px;
  color: #ffffff;
  background: #bf4b2f;
  font-size: 11px;
  font-weight: 900;
}

.boss-panel strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boss-panel.flash {
  animation: bossPulse 900ms ease-in-out 3;
}

.item-btn {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid rgba(223, 231, 240, 0.92);
  border-radius: 12px;
  padding: 6px 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(39, 57, 91, 0.06);
}

.item-btn span {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-btn strong {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-size: 12px;
}

#autoItemBtn {
  background: linear-gradient(135deg, #eef5ff, #ffffff);
}

#sortItemBtn {
  background: linear-gradient(135deg, #ecfff4, #ffffff);
}

#freezeItemBtn {
  background: linear-gradient(135deg, #f2efff, #ffffff);
}

.item-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.item-btn.recommended:not(:disabled) {
  border-color: #f0c451;
  background: #fff8d6;
  box-shadow: 0 0 0 4px rgba(240, 196, 81, 0.28), 0 12px 24px rgba(240, 196, 81, 0.2);
  transform: translateY(-1px);
  animation: itemRecommend 680ms ease-in-out infinite;
}

.item-btn.recommended:not(:disabled) strong {
  background: #d97706;
}

body.tutorial-focus-sort #sortItemBtn:not(:disabled),
body.tutorial-focus-speed #autoItemBtn:not(:disabled),
body.tutorial-focus-freeze #freezeItemBtn:not(:disabled) {
  border-color: #f0c451;
  background: #fff2b7;
  box-shadow: 0 0 0 5px rgba(240, 196, 81, 0.34), 0 16px 30px rgba(240, 196, 81, 0.24);
  animation: itemRecommend 680ms ease-in-out infinite;
}

body.tutorial-focus-sort #sortItemBtn::after,
body.tutorial-focus-speed #autoItemBtn::after,
body.tutorial-focus-freeze #freezeItemBtn::after {
  content: "눌러보기";
  justify-self: end;
  grid-column: 1 / -1;
  color: #8a6510;
  font-size: 10px;
  font-weight: 1000;
}

.item-hint {
  position: absolute;
  top: 104px;
  left: 14px;
  right: 14px;
  z-index: 34;
  margin: 0;
  border: 1px solid rgba(240, 196, 81, 0.6);
  border-radius: 12px;
  padding: 8px 10px;
  color: #5b3900;
  background: #fff7d6;
  font-size: 12px;
  font-weight: 1000;
  text-align: center;
  box-shadow: 0 10px 18px rgba(240, 196, 81, 0.14);
}

.item-hint[hidden] {
  display: none;
}

.control-panel {
  display: grid;
  gap: 10px;
  margin: 0 14px 12px;
  padding: 12px;
  border: 1px solid rgba(223, 231, 240, 0.88);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(39, 57, 91, 0.07);
}

.play-panel {
  padding: 10px 12px;
}

.mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

select,
input {
  outline: 0;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 0 0 0 rgba(45, 108, 223, 0);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

select:focus,
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 108, 223, 0.12);
}

.button-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.control-panel .button-row {
  grid-template-columns: 1fr 1fr;
}

.primary-btn,
.ghost-btn,
.submit-btn {
  min-height: 38px;
  border: 0;
  border-radius: 13px;
  padding: 0 10px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #4f7cff, #285fe8);
  box-shadow: 0 10px 22px rgba(79, 124, 255, 0.22);
}

.ghost-btn {
  color: var(--ink);
  background: #edf3f8;
}

.danger-btn {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  font-size: 13px;
  color: #ffffff;
  background: var(--warn);
  font-weight: 900;
}

.primary-btn:disabled,
.ghost-btn:disabled,
.submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.memo-app {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin: 0 8px 8px;
  overflow: hidden;
  border: 1px solid rgba(223, 231, 240, 0.86);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 18px 46px rgba(39, 57, 91, 0.09);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 160ms ease;
}

.memo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
}

.memo-header > div:first-child {
  min-width: 0;
}

.memo-header h2 {
  margin-top: 2px;
  font-size: 15px;
}

.memo-header small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memo-header small.complete {
  color: #2f8a55;
}

.memo-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  max-width: 142px;
}

.memo-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  max-width: 156px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #182033, #2b3d67);
  overflow: hidden;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-slot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 25px;
  padding: 0;
  border: 1px dashed rgba(79, 124, 255, 0.52);
  border-radius: 999px;
  color: #173a74;
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-weight: 900;
}

.ai-slot[hidden] {
  display: none;
}

.ai-slot b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 19px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-size: 9px;
  line-height: 1;
}

.ai-slot em {
  display: none;
}

.ai-slot.busy {
  border-style: solid;
  animation: aiSlotWork 620ms ease-in-out infinite;
}

.memo-count.danger {
  background: var(--warn);
  animation: pulse 680ms ease-in-out infinite;
}

.memo-count.skill-using {
  color: #1b2b4b;
  background: linear-gradient(135deg, #fff1a8, #c8fff0);
  box-shadow: 0 0 0 3px rgba(240, 196, 81, 0.2), 0 9px 18px rgba(240, 196, 81, 0.22);
  animation: skillChipGlow 760ms ease-in-out infinite;
}

body.danger-mode .memo-app {
  border-color: #ef6a5b;
  box-shadow: 0 0 0 2px rgba(239, 106, 91, 0.12), 0 12px 26px rgba(239, 106, 91, 0.14);
}

body.danger-mode .memo-header {
  background: #fff1f0;
}

body.pressure-high .memo-list {
  background:
    linear-gradient(180deg, rgba(239, 106, 91, 0.12), rgba(239, 106, 91, 0) 118px),
    repeating-linear-gradient(0deg, rgba(239, 106, 91, 0.08) 0 1px, transparent 1px 42px);
}

body.pressure-high .memo-count {
  box-shadow: 0 0 0 4px rgba(239, 106, 91, 0.14);
}

body.pressure-critical .memo-app {
  animation: pressureShake 620ms ease-in-out infinite;
}

body.pressure-critical .memo-list {
  border-top: 3px solid rgba(239, 106, 91, 0.9);
}

body.overload-ending .memo-app {
  border-color: rgba(239, 106, 91, 0.95);
  filter: saturate(0.78);
  animation: overloadEnd 880ms ease-in-out infinite;
}

body.overload-ending .memo-list {
  background:
    linear-gradient(180deg, rgba(239, 106, 91, 0.18), rgba(239, 106, 91, 0.04)),
    repeating-linear-gradient(0deg, rgba(239, 106, 91, 0.08) 0 1px, transparent 1px 42px);
}

body.surge-mode .effect-strip {
  border-color: #f0c451;
  color: #4c3200;
  background: #fff4bf;
}

body.surge-warning-mode .effect-strip {
  border-color: #f0c451;
  color: #5b3900;
  background: #fff2b8;
  animation: pulse 680ms ease-in-out infinite;
}

body.surge-warning-mode .memo-app {
  border-color: rgba(240, 196, 81, 0.9);
  box-shadow: 0 0 0 3px rgba(240, 196, 81, 0.18), 0 18px 46px rgba(39, 57, 91, 0.09);
}

.memo-list {
  display: grid;
  align-content: start;
  gap: 5px;
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow: auto;
  padding: 8px;
  list-style: none;
}

.memo-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid rgba(225, 216, 170, 0.84);
  border-radius: 11px;
  background: linear-gradient(180deg, #fff9df, var(--note));
  box-shadow: 0 7px 13px rgba(155, 139, 80, 0.08);
  font-size: 14px;
  font-weight: 800;
}

body.tutorial-focus-memo .memo-item:first-child,
body.tutorial-focus-sort .memo-item,
body.tutorial-focus-special .memo-item:first-child {
  border-color: rgba(79, 124, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.13), 0 10px 18px rgba(79, 124, 255, 0.12);
}

body.tutorial-focus-special .memo-item:first-child {
  border-color: rgba(240, 196, 81, 0.78);
  box-shadow: 0 0 0 5px rgba(240, 196, 81, 0.24), 0 12px 24px rgba(240, 196, 81, 0.18);
}

body.tutorial-focus-memo .input-zone input {
  border-color: rgba(79, 124, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.16);
}

body.tutorial-mode .input-zone input:disabled {
  border-color: rgba(176, 186, 199, 0.7);
  color: #7d8796;
  background: #eef3f7;
  box-shadow: none;
  opacity: 1;
}

.memo-list.compact {
  align-content: start;
  gap: 4px;
  padding: 7px;
}

.memo-list.compact .memo-item {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 13px;
  gap: 5px;
}

.memo-backlog {
  display: grid;
  gap: 2px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px dashed rgba(126, 139, 160, 0.5);
  border-radius: 10px;
  color: #59667a;
  background: rgba(246, 248, 251, 0.92);
  font-size: 12px;
  font-weight: 1000;
}

.memo-backlog small {
  color: #7d8797;
  font-size: 10px;
  font-weight: 900;
}

.memo-item.boss {
  border-color: #e46f40;
  background: #fff0d9;
  box-shadow: 0 4px 0 rgba(196, 82, 34, 0.18), 0 0 0 2px rgba(228, 111, 64, 0.12);
}

.memo-item.boss.summarized {
  border-color: #20b486;
  background: linear-gradient(135deg, #ecfff5, #ffffff);
  box-shadow: 0 4px 0 rgba(32, 180, 134, 0.14), 0 0 0 2px rgba(32, 180, 134, 0.1);
}

.memo-item.surge {
  border-color: #d9b146;
  background: #fff7cf;
  animation: surgeDrop 220ms ease-out;
}

.memo-item.special {
  position: relative;
  overflow: hidden;
  border-left-width: 5px;
}

.memo-item.special::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.48), transparent 34%);
  opacity: 0.34;
}

.memo-item.special-urgent {
  border-color: #ef6a5b;
  background: #fff0ef;
}

.memo-item.special-bomb {
  border-color: #4f9e6f;
  background: #eaf8ee;
}

.memo-item.special-double {
  border-color: #7d8fe8;
  background: #eef2ff;
}

.memo-item.special-secure {
  border-color: #222b3a;
  background: #eceff4;
}

.memo-item.special-bonus {
  border-color: #d6a51d;
  background: #fff8dc;
}

.memo-item.special-calm {
  border-color: #4f9ac7;
  background: #eaf7ff;
}

.memo-item.special-rework {
  border-color: #bf6b4b;
  background: #fff1e8;
}

.memo-item.special-shuffle {
  border-color: #8a68c8;
  background: #f3edff;
}

.memo-item.special-trap {
  border-color: #a56b2a;
  background: #fff2d8;
}

.memo-item.special-bad {
  border-color: #d56a52;
  background: linear-gradient(135deg, #fff0ed, #ffffff);
  box-shadow: 0 0 0 2px rgba(213, 106, 82, 0.12), 0 10px 20px rgba(213, 106, 82, 0.12);
}

.memo-item.special-decoyMemo {
  border-style: dashed;
}

.memo-item.special-auditMemo {
  background: linear-gradient(135deg, #f1f3f7, #ffffff);
}

.memo-item.special-delayMemo {
  background: linear-gradient(135deg, #fff6df, #ffffff);
}

.memo-item.special-overtimeTrap {
  background: linear-gradient(135deg, #ffece8, #ffffff);
}

.memo-item.special-priorityTrap {
  background: linear-gradient(135deg, #fff0f0, #ffffff);
}

.memo-item.special-keyPower {
  border-color: #7c5cff;
  background: linear-gradient(135deg, #f1edff, #ffffff);
  box-shadow: 0 10px 20px rgba(124, 92, 255, 0.14);
}

.memo-item.special-keyCombo {
  border-color: #14a8c8;
  background: linear-gradient(135deg, #e9fbff, #ffffff);
  box-shadow: 0 10px 20px rgba(20, 168, 200, 0.14);
}

.memo-item.special-keyClean {
  border-color: #20b486;
  background: linear-gradient(135deg, #e9fff7, #ffffff);
  box-shadow: 0 10px 20px rgba(32, 180, 134, 0.14);
}

.memo-item.special-slotUp {
  border-color: #ff9e2c;
  background: linear-gradient(135deg, #fff1dc, #ffffff);
  box-shadow: 0 10px 20px rgba(255, 158, 44, 0.16);
}

.memo-item.special-guard {
  border-color: #1d9f80;
  background: linear-gradient(135deg, #e8fff8, #ffffff);
  box-shadow: 0 10px 20px rgba(29, 159, 128, 0.14);
}

.memo-item.special-autoSlot {
  border-color: #16a3a3;
  background: linear-gradient(135deg, #e7ffff, #ffffff);
  box-shadow: 0 10px 20px rgba(22, 163, 163, 0.15);
}

.memo-item.special-gearBox {
  border-color: #e9781f;
  background: linear-gradient(135deg, #fff0dd, #ffffff);
  box-shadow: 0 12px 24px rgba(233, 120, 31, 0.18);
}

.memo-item.special-skillPower,
.memo-item.special-skillClean,
.memo-item.special-skillCombo {
  border-color: #4f7cff;
  background: linear-gradient(135deg, #edf4ff, #ffffff);
  box-shadow: 0 12px 22px rgba(79, 124, 255, 0.16);
}

.memo-item.special-meetingCancel {
  border-color: #20b486;
  background: linear-gradient(135deg, #e8fff4, #ffffff);
  box-shadow: 0 10px 20px rgba(32, 180, 134, 0.14);
}

.memo-item.special-payday {
  border-color: #e2a61d;
  background: linear-gradient(135deg, #fff6d7, #ffffff);
  box-shadow: 0 10px 20px rgba(226, 166, 29, 0.16);
}

.memo-item.special-focusMode {
  border-color: #4f9ac7;
  background: linear-gradient(135deg, #e9f8ff, #ffffff);
  box-shadow: 0 10px 20px rgba(79, 154, 199, 0.14);
}

.memo-item.special-bulkClear {
  border-color: #7c5cff;
  background: linear-gradient(135deg, #f0ecff, #ffffff);
  box-shadow: 0 10px 20px rgba(124, 92, 255, 0.14);
}

.memo-item.special-summaryNote {
  border-color: #0f9f8f;
  background: linear-gradient(135deg, #e5fffa, #ffffff);
  box-shadow: 0 10px 20px rgba(15, 159, 143, 0.14);
}

.memo-item.special-shortcut {
  border-color: #4f7cff;
  background: linear-gradient(135deg, #edf4ff, #ffffff);
  box-shadow: 0 10px 20px rgba(79, 124, 255, 0.14);
}

.memo-item.special-internHelp {
  border-color: #20b486;
  background: linear-gradient(135deg, #e7fff4, #ffffff);
  box-shadow: 0 10px 20px rgba(32, 180, 134, 0.14);
}

.memo-item.special-approvalPass {
  border-color: #c98605;
  background: linear-gradient(135deg, #fff7df, #ffffff);
  box-shadow: 0 10px 20px rgba(201, 134, 5, 0.14);
}

.memo-item.special-quietHour {
  border-color: #6b7a90;
  background: linear-gradient(135deg, #eef2f7, #ffffff);
  box-shadow: 0 10px 20px rgba(107, 122, 144, 0.14);
}

.memo-item.special-rank-sss {
  border-color: #f2b91f;
  background: linear-gradient(135deg, #fff4bd, #ffffff);
  box-shadow: 0 0 0 2px rgba(242, 185, 31, 0.3), 0 12px 24px rgba(156, 108, 12, 0.22);
  animation: rareMemoGlow 1850ms ease-in-out infinite;
}

.memo-item.special-rank-ss {
  border-color: #b7c2d4;
  background: linear-gradient(135deg, #f1f5fb, #ffffff);
  box-shadow: 0 0 0 2px rgba(183, 194, 212, 0.24), 0 12px 22px rgba(72, 88, 116, 0.16);
}

.memo-item.special-rank-s {
  border-color: #a77aff;
  background: linear-gradient(135deg, #f4edff, #ffffff);
  box-shadow: 0 0 0 2px rgba(167, 122, 255, 0.24), 0 12px 22px rgba(91, 58, 168, 0.16);
}

.memo-item.special-rank-a {
  border-color: #4f7cff;
  background: linear-gradient(135deg, #edf4ff, #ffffff);
}

.memo-item.special-rank-b {
  border-color: #20b486;
}

.memo-item.special-rank-c {
  border-color: #d4ad3c;
}

.memo-item.special-rank-d {
  border-color: #aab3c1;
  background: linear-gradient(135deg, #f7f8fb, #ffffff);
}

@keyframes rareMemoGlow {
  0%, 100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.18) brightness(1.03);
  }
}

.memo-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.memo-badge {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--ink);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.memo-rank {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 999px;
  color: #ffffff;
  background: #7d8797;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.rank-sss {
  color: #3a2600;
  background: linear-gradient(135deg, #ffd95d, #f0aa18);
}

.rank-ss {
  color: #253041;
  background: linear-gradient(135deg, #f4f7fb, #b8c2d0);
}

.rank-s {
  background: linear-gradient(135deg, #b993ff, #7c5cff);
}

.rank-a {
  background: #4f7cff;
}

.rank-b {
  background: #20b486;
}

.rank-c {
  color: #3f2b00;
  background: #e1bd47;
}

.rank-d {
  background: #7d8797;
}

.rank-sss,
.choice-option.choice-rank-sss,
.memo-item.special-rank-sss,
.special-guide-list span:has(.guide-dot.autoSlot) {
  --rank-main: #f0aa18;
  --rank-soft: #fff0a8;
  --rank-ink: #3a2600;
}

.rank-ss,
.choice-option.choice-rank-ss,
.memo-item.special-rank-ss,
.special-guide-list span:has(.guide-dot.skillPower),
.special-guide-list span:has(.guide-dot.skillClean),
.special-guide-list span:has(.guide-dot.skillCombo) {
  --rank-main: #b8c2d0;
  --rank-soft: #eef3fb;
  --rank-ink: #253041;
}

.rank-s,
.choice-option.choice-rank-s,
.memo-item.special-rank-s,
.special-guide-list span:has(.guide-dot.slotUp),
.special-guide-list span:has(.guide-dot.guard),
.special-guide-list span:has(.guide-dot.summaryNote),
.special-guide-list span:has(.guide-dot.approvalPass) {
  --rank-main: #7c5cff;
  --rank-soft: #f2ebff;
  --rank-ink: #ffffff;
}

.rank-a,
.choice-option.choice-rank-a,
.memo-item.special-rank-a,
.special-guide-list span:has(.guide-dot.keyPower),
.special-guide-list span:has(.guide-dot.keyCombo),
.special-guide-list span:has(.guide-dot.keyClean),
.special-guide-list span:has(.guide-dot.meetingCancel),
.special-guide-list span:has(.guide-dot.bulkClear) {
  --rank-main: #4f7cff;
  --rank-soft: #edf4ff;
  --rank-ink: #ffffff;
}

.rank-b,
.choice-option.choice-rank-b,
.memo-item.special-rank-b,
.special-guide-list span:has(.guide-dot.payday),
.special-guide-list span:has(.guide-dot.focusMode),
.special-guide-list span:has(.guide-dot.quietHour),
.special-guide-list span:has(.guide-dot.shortcut),
.special-guide-list span:has(.guide-dot.internHelp),
.special-guide-list span:has(.guide-dot.templateMemo),
.special-guide-list span:has(.guide-dot.archiveMemo),
.special-guide-list span:has(.guide-dot.pinMemo),
.special-guide-list span:has(.guide-dot.coffeeRefillMemo) {
  --rank-main: #20b486;
  --rank-soft: #eafbf5;
  --rank-ink: #ffffff;
}

.rank-c,
.choice-option.choice-rank-c,
.memo-item.special-rank-c,
.special-guide-list span:has(.guide-dot.bonus),
.special-guide-list span:has(.guide-dot.bomb),
.special-guide-list span:has(.guide-dot.calm),
.special-guide-list span:has(.guide-dot.gearBox),
.special-guide-list span:has(.guide-dot.snackMemo),
.special-guide-list span:has(.guide-dot.waterMemo),
.special-guide-list span:has(.guide-dot.smallWinMemo),
.special-guide-list span:has(.guide-dot.deskMemo),
.special-guide-list span:has(.guide-dot.calendarMemo),
.special-guide-list span:has(.guide-dot.clipMemo),
.special-guide-list span:has(.guide-dot.printMemo),
.special-guide-list span:has(.guide-dot.inboxMemo) {
  --rank-main: #d4ad3c;
  --rank-soft: #fff8df;
  --rank-ink: #3f2b00;
}

.rank-d,
.choice-option.choice-rank-d,
.memo-item.special-rank-d,
.special-guide-list span:has(.guide-dot.urgent),
.special-guide-list span:has(.guide-dot.double),
.special-guide-list span:has(.guide-dot.secure),
.special-guide-list span:has(.guide-dot.rework),
.special-guide-list span:has(.guide-dot.shuffle),
.special-guide-list span:has(.guide-dot.trap) {
  --rank-main: #7d8797;
  --rank-soft: #f7f8fb;
  --rank-ink: #ffffff;
}

.special-urgent .memo-badge {
  background: #ef6a5b;
}

.special-bomb .memo-badge {
  background: #2f8a55;
}

.special-double .memo-badge {
  background: #5d6fd1;
}

.special-secure .memo-badge {
  background: #111827;
}

.special-bonus .memo-badge {
  background: #b98908;
}

.special-calm .memo-badge {
  background: #287aa8;
}

.special-snackMemo .memo-badge,
.special-waterMemo .memo-badge,
.special-smallWinMemo .memo-badge,
.special-deskMemo .memo-badge,
.special-calendarMemo .memo-badge,
.special-clipMemo .memo-badge,
.special-printMemo .memo-badge,
.special-inboxMemo .memo-badge {
  color: #3f2b00;
  background: #e1bd47;
}

.special-templateMemo .memo-badge,
.special-archiveMemo .memo-badge,
.special-pinMemo .memo-badge,
.special-coffeeRefillMemo .memo-badge {
  background: #20b486;
}

.special-rework .memo-badge {
  background: #bf6b4b;
}

.special-shuffle .memo-badge {
  background: #7554b8;
}

.special-trap .memo-badge {
  background: #a56b2a;
}

.special-decoyMemo .memo-badge,
.special-auditMemo .memo-badge,
.special-delayMemo .memo-badge,
.special-overtimeTrap .memo-badge,
.special-priorityTrap .memo-badge {
  background: #d56a52;
}

.special-keyPower .memo-badge {
  background: #7c5cff;
}

.special-keyCombo .memo-badge {
  background: #14a8c8;
}

.special-keyClean .memo-badge {
  background: #20b486;
}

.special-slotUp .memo-badge {
  background: #ff8a1f;
}

.special-guard .memo-badge {
  background: #1d9f80;
}

.special-autoSlot .memo-badge {
  background: #16a3a3;
}

.special-gearBox .memo-badge {
  background: #e9781f;
}

.special-skillPower .memo-badge,
.special-skillClean .memo-badge,
.special-skillCombo .memo-badge {
  background: #4f7cff;
}

.special-meetingCancel .memo-badge {
  background: #20b486;
}

.special-payday .memo-badge {
  background: #c98605;
}

.special-focusMode .memo-badge {
  background: #287aa8;
}

.special-bulkClear .memo-badge {
  background: #7c5cff;
}

.special-summaryNote .memo-badge,
.boss-summary-badge {
  background: #0f9f8f;
}

.special-shortcut .memo-badge {
  background: #4f7cff;
}

.special-internHelp .memo-badge {
  background: #20b486;
}

.special-approvalPass .memo-badge {
  background: #c98605;
}

.special-quietHour .memo-badge {
  background: #6b7a90;
}

.memo-item.redacted .memo-title {
  position: relative;
  color: rgba(28, 38, 54, 0.22);
  text-shadow: none;
  filter: blur(1.6px);
}

.memo-item.redacted .memo-title::before {
  content: "";
  position: absolute;
  inset: 7px 62px 7px 0;
  border-radius: 999px;
  background: rgba(28, 38, 54, 0.12);
}

.memo-item.redacted .memo-badge {
  position: relative;
  z-index: 1;
  color: #ffffff;
}

.checkbox {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(24, 32, 51, 0.78);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
}

.memo-item.checked {
  color: #286a44;
  background: #e5f6e7;
  animation: checkedOut 440ms ease forwards;
}

.memo-item.checked-by-clean {
  border-color: rgba(32, 180, 134, 0.78);
  background: linear-gradient(135deg, #e3fff3, #ffffff);
  animation: assistedOut 560ms ease forwards;
}

.memo-item.checked-by-ai {
  border-color: rgba(79, 124, 255, 0.72);
  background: linear-gradient(135deg, #edf4ff, #ffffff);
  animation: assistedOut 520ms ease forwards;
}

.memo-item.checked-by-support {
  border-color: rgba(240, 196, 81, 0.76);
  background: linear-gradient(135deg, #fff5c8, #e8fff2 62%, #ffffff);
  animation: supportOut 620ms ease forwards;
}

.memo-item.checked .checkbox {
  color: #ffffff;
  background: var(--accent-2);
}

.memo-item.checked-by-ai .checkbox {
  background: var(--accent);
}

.memo-item.checked-by-support .checkbox {
  background: #f0c451;
  color: #1b2535;
}

.memo-badge.action-badge {
  background: #20b486;
}

.memo-item.checked-by-ai .action-badge {
  background: #4f7cff;
}

.memo-item.checked-by-support .action-badge {
  color: #1b2535;
  background: #f0c451;
}

.memo-item.checked-by-clean .checkbox {
  animation: cleanStamp 520ms ease both;
}

.memo-item.checked-by-ai .checkbox,
.memo-item.checked-by-support .checkbox {
  animation: assistStamp 520ms ease both;
}

.input-zone {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 8px 9px calc(8px + var(--play-bottom-safe));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.submit-btn {
  color: #ffffff;
  background: var(--ink);
}

.side-panel {
  max-width: 390px;
  padding: 28px;
  border: 1px solid rgba(217, 224, 232, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.side-panel h2 {
  margin-top: 8px;
  font-size: 31px;
}

.side-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.info-grid,
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.result-summary {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #173a74;
  background: #eef5ff;
  font-size: 13px;
  font-weight: 900;
}

.reward-card {
  margin-top: 9px;
  padding: 12px;
  border: 1px solid rgba(216, 192, 112, 0.78);
  border-radius: 16px;
  color: #4f3c00;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent 44%),
    linear-gradient(135deg, #fff7c7, #fffdf0);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(185, 137, 8, 0.12);
}

.result-review {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(158, 188, 255, 0.78);
  border-radius: 16px;
  color: #173a74;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 45%),
    linear-gradient(135deg, #eef5ff, #edfdf7);
  box-shadow: 0 12px 26px rgba(79, 124, 255, 0.1);
}

.result-review span,
.reward-card span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 900;
}

.result-review span {
  color: #285fe8;
  background: rgba(79, 124, 255, 0.12);
}

.reward-card span {
  color: #8a6510;
  background: rgba(185, 137, 8, 0.14);
}

.result-review strong,
.result-review small,
.reward-card strong,
.reward-card small {
  display: block;
}

.result-review strong {
  font-size: 14px;
}

.reward-card strong {
  margin-top: 4px;
  font-size: 17px;
}

.result-review small {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.reward-card small {
  margin-top: 3px;
  color: #7a651f;
  font-size: 11px;
  font-weight: 900;
}

.reward-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.reward-breakdown em {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid rgba(185, 137, 8, 0.18);
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff8d8;
  color: #7a5608;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.reward-card-list {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.reward-mini-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(185, 137, 8, 0.16);
  border-radius: 12px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.reward-mini-card b {
  display: inline-flex;
  min-width: 31px;
  height: 31px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffd96a, #ffb84a);
  color: #563800;
  font-size: 10px;
  font-weight: 950;
}

.reward-mini-card div {
  min-width: 0;
}

.reward-mini-card em,
.reward-mini-card strong,
.reward-mini-card small {
  display: block;
}

.reward-mini-card em {
  color: #9a6a00;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
}

.reward-mini-card strong {
  overflow: hidden;
  margin-top: 1px;
  color: #382500;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reward-mini-card small {
  overflow: hidden;
  margin-top: 1px;
  color: #7a651f;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-grid div,
.result-grid div {
  padding: 12px;
  border-radius: 12px;
  background: #f4f7fb;
}

.info-grid span,
.result-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.info-grid strong,
.result-grid strong {
  display: block;
  margin-top: 5px;
}

dialog {
  width: min(92vw, 420px);
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: var(--shadow);
}

.sheet-dialog {
  width: min(94vw, 430px);
}

.menu-sheet {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.98);
}

.sheet-header,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-header {
  position: sticky;
  top: -18px;
  z-index: 5;
  margin: -18px -18px 0;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(223, 231, 240, 0.72);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px) saturate(1.15);
}

.sheet-header small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.menu-sheet h2 {
  margin-top: 2px;
  font-size: 22px;
}

.menu-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(223, 231, 240, 0.88);
  border-radius: 18px;
  background: #f7faff;
}

.menu-section h3 {
  margin: 0;
  font-size: 15px;
}

.section-title-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ranking-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ranking-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: #edf2f7;
  font-size: 12px;
  font-weight: 900;
}

.ranking-tabs button.active {
  color: #ffffff;
  background: var(--accent);
}

.ranking-list li {
  display: grid;
  grid-template-columns: 24px 36px 1fr minmax(76px, auto);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.ranking-list .me {
  color: #ffffff;
  background: var(--accent);
}

.ranking-list .ranking-empty-state {
  grid-template-columns: 34px 1fr !important;
  justify-items: start;
  color: #5f6f8b;
  background: #f6f9ff;
}

.ranking-empty-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 13px;
  background: #eef5ff;
  color: #2563eb;
  font-size: 17px;
}

.ranking-list small {
  display: block;
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
}

.ranking-list strong {
  text-align: right;
}

.ranking-no {
  color: inherit;
  font-weight: 1000;
  text-align: center;
}

.ranking-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(180deg, #eef5ff, #ffffff);
  box-shadow: inset 0 -3px 0 rgba(39, 106, 255, 0.08);
}

.ranking-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.12));
}

.ranking-person {
  position: relative;
  width: 23px;
  height: 24px;
}

.ranking-person::before,
.ranking-person::after {
  content: "";
  position: absolute;
  left: 50%;
  background: #8aa0bd;
  transform: translateX(-50%);
}

.ranking-person::before {
  top: 1px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.ranking-person::after {
  bottom: 1px;
  width: 22px;
  height: 12px;
  border-radius: 999px 999px 7px 7px;
}

.profile-avatar.grade-avatar-0,
.ranking-person.grade-avatar-0 {
  --avatar-hair: #64748b;
  --avatar-face: #cbd5e1;
  --avatar-suit: #94a3b8;
  --avatar-bg-a: #f8fafc;
  --avatar-bg-b: #e2e8f0;
}

.profile-avatar.grade-avatar-1,
.ranking-person.grade-avatar-1 {
  --avatar-hair: #1d4ed8;
  --avatar-face: #bfdbfe;
  --avatar-suit: #60a5fa;
  --avatar-bg-a: #eff6ff;
  --avatar-bg-b: #dbeafe;
}

.profile-avatar.grade-avatar-2,
.ranking-person.grade-avatar-2 {
  --avatar-hair: #047857;
  --avatar-face: #bbf7d0;
  --avatar-suit: #34d399;
  --avatar-bg-a: #ecfdf5;
  --avatar-bg-b: #d1fae5;
}

.profile-avatar.grade-avatar-3,
.ranking-person.grade-avatar-3 {
  --avatar-hair: #7c3aed;
  --avatar-face: #ddd6fe;
  --avatar-suit: #a78bfa;
  --avatar-bg-a: #f5f3ff;
  --avatar-bg-b: #ede9fe;
}

.profile-avatar.grade-avatar-4,
.ranking-person.grade-avatar-4 {
  --avatar-hair: #b45309;
  --avatar-face: #fde68a;
  --avatar-suit: #f59e0b;
  --avatar-bg-a: #fffbeb;
  --avatar-bg-b: #fef3c7;
}

.profile-avatar.grade-avatar-5,
.ranking-person.grade-avatar-5 {
  --avatar-hair: #be123c;
  --avatar-face: #fecdd3;
  --avatar-suit: #fb7185;
  --avatar-bg-a: #fff1f2;
  --avatar-bg-b: #ffe4e6;
}

.profile-avatar.grade-avatar-6,
.ranking-person.grade-avatar-6 {
  --avatar-hair: #0f766e;
  --avatar-face: #99f6e4;
  --avatar-suit: #14b8a6;
  --avatar-bg-a: #f0fdfa;
  --avatar-bg-b: #ccfbf1;
}

.profile-avatar.grade-avatar-7,
.ranking-person.grade-avatar-7,
.profile-avatar.grade-avatar-8,
.ranking-person.grade-avatar-8,
.profile-avatar.grade-avatar-9,
.ranking-person.grade-avatar-9,
.profile-avatar.grade-avatar-10,
.ranking-person.grade-avatar-10 {
  --avatar-hair: #111827;
  --avatar-face: #fef3c7;
  --avatar-suit: #facc15;
  --avatar-bg-a: #fff7ed;
  --avatar-bg-b: #fde68a;
}

.profile-avatar.grade-avatar-11,
.ranking-person.grade-avatar-11,
.profile-avatar.grade-avatar-12,
.ranking-person.grade-avatar-12 {
  --avatar-hair: #4338ca;
  --avatar-face: #e0e7ff;
  --avatar-suit: #818cf8;
  --avatar-bg-a: #eef2ff;
  --avatar-bg-b: #c7d2fe;
}

.profile-avatar.grade-avatar-13,
.ranking-person.grade-avatar-13,
.profile-avatar.grade-avatar-14,
.ranking-person.grade-avatar-14,
.profile-avatar.grade-avatar-15,
.ranking-person.grade-avatar-15 {
  --avatar-hair: #3f1d08;
  --avatar-face: #fff7ed;
  --avatar-suit: #f97316;
  --avatar-bg-a: #fff7ed;
  --avatar-bg-b: #fed7aa;
}

.ranking-avatar:has(.ranking-person),
.profile-avatar:not(.has-photo) {
  background: linear-gradient(180deg, var(--avatar-bg-a, #eef5ff), var(--avatar-bg-b, #ffffff));
}

.profile-avatar:not(.has-photo) .avatar-person::before,
.ranking-person::before {
  background: linear-gradient(180deg, var(--avatar-face, #cbd5e1), var(--avatar-hair, #64748b));
  box-shadow: inset 0 -5px 0 var(--avatar-hair, #64748b);
}

.profile-avatar:not(.has-photo) .avatar-person::after,
.ranking-person::after {
  background: linear-gradient(180deg, var(--avatar-suit, #94a3b8), var(--avatar-hair, #64748b));
}

.ranking-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

dialog::backdrop {
  background: rgba(20, 28, 39, 0.46);
}

.modal-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  box-shadow: 0 28px 70px rgba(18, 27, 43, 0.24);
}

.app-modal .result-modal {
  gap: 8px;
  max-height: calc(100% - 18px);
  overflow: hidden;
  padding: 15px;
}

.result-modal h2 {
  font-size: 19px;
}

.result-modal .eyebrow {
  font-size: 10px;
}

.result-modal .result-summary,
.result-modal .result-review,
.result-modal .reward-card,
.result-modal .result-unlock {
  margin-top: 0;
  padding: 8px 9px;
}

.result-modal .result-review strong {
  font-size: 12px;
}

.result-modal .reward-card strong,
.result-modal .result-unlock strong {
  font-size: 15px;
}

.result-modal .result-review small,
.result-modal .result-unlock small {
  font-size: 11px;
  line-height: 1.25;
}

.result-modal .result-unlock {
  border: 1px solid rgba(39, 106, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(231, 240, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.result-modal .result-unlock span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.result-modal .result-unlock strong {
  display: block;
  margin-top: 2px;
}

.result-modal .result-unlock small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.result-modal .result-grid {
  gap: 6px;
  margin-top: 0;
}

.result-modal .result-grid div {
  padding: 7px 8px;
  border-radius: 10px;
}

.result-modal .result-grid span {
  font-size: 10px;
}

.result-modal .result-grid strong {
  margin-top: 2px;
  font-size: 12px;
}

.result-modal .result-extra {
  display: none;
}

.result-actions {
  gap: 6px;
}

.result-actions .primary-btn,
.result-actions .ghost-btn {
  min-height: 34px;
  padding: 0 6px;
  font-size: 12px;
}

.choice-card {
  position: relative;
  gap: 14px;
  padding: 22px;
}

.app-modal .choice-card {
  overflow: hidden;
}

.choice-card::before {
  content: "";
  position: absolute;
  top: -56px;
  right: -44px;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(79, 124, 255, 0.22), transparent 68%);
}

.choice-card::after {
  content: "!";
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff7a5f, #ff4f72);
  box-shadow: 0 10px 24px rgba(255, 92, 112, 0.24);
  font-size: 20px;
  font-weight: 900;
}

.choice-card h2,
.choice-card .modal-copy,
.choice-options {
  position: relative;
  z-index: 1;
}

.choice-card h2 {
  max-width: calc(100% - 48px);
  font-size: 21px;
  line-height: 1.25;
}

.choice-card .modal-copy {
  padding: 11px 12px;
  border-radius: 15px;
  color: #47566d;
  background: #eef5ff;
  font-size: 13px;
  font-weight: 800;
}

.choice-options {
  display: grid;
  gap: 10px;
}

.choice-option {
  display: grid;
  gap: 4px;
  min-height: 68px;
  border: 1px solid rgba(223, 231, 240, 0.95);
  border-radius: 18px;
  padding: 13px 14px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(39, 57, 91, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.choice-option[hidden] {
  display: none;
}

.choice-option:active {
  transform: translateY(2px) scale(0.99);
  box-shadow: 0 7px 16px rgba(39, 57, 91, 0.1);
}

.choice-option strong,
.choice-option small {
  display: block;
}

.choice-option strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
}

.choice-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.choice-rank-badge {
  display: inline-grid;
  min-width: 36px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1;
}

.choice-option.choice-rank-sss {
  border-color: #f2b91f;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 46%),
    linear-gradient(135deg, #fff0a8, #ffffff);
  box-shadow: 0 0 0 2px rgba(242, 185, 31, 0.22), 0 16px 30px rgba(156, 108, 12, 0.18);
}

.choice-option.choice-rank-ss {
  border-color: #b8c2d0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), transparent 46%),
    linear-gradient(135deg, #eef3fb, #ffffff);
  box-shadow: 0 0 0 2px rgba(184, 194, 208, 0.2), 0 14px 26px rgba(72, 88, 116, 0.14);
}

.choice-option.choice-rank-s {
  border-color: #a77aff;
  background: linear-gradient(135deg, #f2ebff, #ffffff);
  box-shadow: 0 0 0 2px rgba(167, 122, 255, 0.18), 0 14px 26px rgba(91, 58, 168, 0.13);
}

.choice-option.choice-rank-a {
  border-color: #4f7cff;
  background: linear-gradient(135deg, #edf4ff, #ffffff);
}

.choice-option.choice-rank-b {
  border-color: #20b486;
  background: linear-gradient(135deg, #eafbf5, #ffffff);
}

.choice-option.choice-rank-c {
  border-color: #d4ad3c;
  background: linear-gradient(135deg, #fff8df, #ffffff);
}

.choice-option.choice-rank-d {
  border-color: #aab3c1;
  background: linear-gradient(135deg, #f7f8fb, #ffffff);
  box-shadow: 0 8px 18px rgba(39, 57, 91, 0.06);
}

.toast {
  position: fixed;
  left: 50%;
  top: 72px;
  z-index: 3000;
  max-width: min(92vw, 430px);
  padding: 9px 13px;
  border-radius: 12px;
  color: #ffffff;
  background: var(--ink);
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.is-playing .toast {
  top: auto;
  bottom: calc(74px + var(--play-bottom-safe));
  max-width: min(82vw, 320px);
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 12px;
  text-align: center;
  transform: translate(-50%, 8px);
}

body.is-playing .toast.show {
  transform: translate(-50%, 0);
}

body.is-playing.keyboard-open .toast {
  bottom: calc(var(--keyboard-inset) + 76px);
  max-width: min(78vw, 300px);
}

body.theme-white {
  --paper: #ffffff;
  --note: #f8fafc;
}

body.theme-yellow {
  --paper: #fff8d8;
  --note: #ffef9e;
}

body.theme-dark {
  --bg: #151923;
  --panel: #222838;
  --paper: #1d2330;
  --ink: #f5f7fb;
  --muted: #aeb8c8;
  --line: #333b4e;
  --note: #2a3143;
}

body.theme-dark .phone,
body.theme-dark .memo-header,
body.theme-dark .input-zone,
body.theme-dark .side-panel,
body.theme-dark .modal-card,
body.theme-dark .menu-sheet {
  background: var(--panel);
}

/* Reward confirmation stays above the shop without shifting the lobby layout. */
.ad-gold-result-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(320px, calc(100vw - 36px));
  padding: 24px 20px 18px;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(255, 205, 72, 0.55) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 224, 119, 0.28), transparent 48%),
    #ffffff !important;
}

.ad-gold-result-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 2px;
  border: 5px solid #ffd45a;
  border-radius: 50%;
  color: #6f4300;
  background: linear-gradient(145deg, #fff2a4 0%, #ffc62f 72%);
  box-shadow: 0 12px 24px rgba(208, 145, 0, 0.24), inset 0 3px 0 rgba(255, 255, 255, 0.62);
  animation: ad-gold-pop 420ms cubic-bezier(0.2, 0.85, 0.25, 1.25) both;
}

.ad-gold-result-visual::before,
.ad-gold-result-visual::after {
  position: absolute;
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #ffd24d;
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(255, 194, 32, 0.7);
}

.ad-gold-result-visual::before {
  top: -10px;
  right: -15px;
}

.ad-gold-result-visual::after {
  bottom: 2px;
  left: -18px;
}

.ad-gold-result-visual span {
  font-size: 30px;
  font-weight: 1000;
  line-height: 1;
}

.ad-gold-result-kicker {
  color: #9a6500;
  font-size: 11px;
  font-weight: 900;
}

.ad-gold-result-card h2 {
  margin: 0;
  color: #152238;
  font-size: 21px;
}

.ad-gold-result-amount {
  color: #d88a00;
  font-size: 30px;
  line-height: 1.1;
}

.ad-gold-result-card .modal-copy {
  min-height: 18px;
  margin: 2px 0 8px;
  color: #68758a;
  font-size: 12px;
}

.ad-gold-result-confirm {
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
}

.ad-flow-busy #adGoldRewardBtn,
.ad-flow-busy #reviveBtn,
.ad-flow-busy #startBtn,
.ad-flow-busy .item-btn {
  pointer-events: none;
  filter: saturate(0.72);
  opacity: 0.72;
}

body.theme-dark .ad-gold-result-card {
  border-color: rgba(255, 205, 72, 0.45) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 205, 72, 0.17), transparent 48%),
    #182338 !important;
}

body.theme-dark .ad-gold-result-card h2 {
  color: #f6f8fc;
}

body.theme-dark .ad-gold-result-card .modal-copy {
  color: #c1cada;
}

@keyframes ad-gold-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.7) rotate(-8deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

body.theme-dark .menu-section,
body.theme-dark .ranking-list li {
  background: #151923;
}

body.theme-dark input,
body.theme-dark select {
  color: var(--ink);
  background: #151923;
}

@keyframes checkedOut {
  0% { opacity: 1; transform: translateX(0) scaleX(1); }
  46% { opacity: 0.94; transform: translateX(2px) scaleX(1); }
  100% {
    opacity: 0;
    transform: translateX(12px) scaleX(0.96);
  }
}

@keyframes assistedOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  42% {
    opacity: 1;
    transform: translateX(4px) scale(1.025);
  }
  100% {
    opacity: 0;
    transform: translateX(18px) scale(0.96);
  }
}

@keyframes supportOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(240, 196, 81, 0.24);
  }
  35% {
    opacity: 1;
    transform: translateY(-2px) scale(1.035);
    box-shadow: 0 0 0 5px rgba(240, 196, 81, 0.18);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
    box-shadow: 0 0 0 10px rgba(240, 196, 81, 0);
  }
}

@keyframes fxBurstFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.82);
  }
  14%,
  74% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -64%) scale(1.02);
  }
}

@keyframes fxRing {
  0% {
    opacity: 0.95;
    transform: scale(0.38);
  }
  58% {
    opacity: 0.44;
  }
  100% {
    opacity: 0;
    transform: scale(2.35);
  }
}

@keyframes fxAuraSpin {
  0% {
    opacity: 0;
    transform: scale(.28) rotate(-80deg);
  }
  18% {
    opacity: .95;
  }
  72% {
    opacity: .42;
  }
  100% {
    opacity: 0;
    transform: scale(1.85) rotate(110deg);
  }
}

@keyframes fxShockwave {
  0% {
    opacity: .85;
    transform: scale(.22);
  }
  64% {
    opacity: .28;
  }
  100% {
    opacity: 0;
    transform: scale(2.45);
  }
}

@keyframes fxCorePop {
  0% {
    opacity: 0;
    transform: scale(0.72) rotate(-4deg);
  }
  24% {
    opacity: 1;
    transform: scale(1.08) rotate(3deg);
  }
  76% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.88) translateY(-10px);
  }
}

@keyframes fxLabel {
  0% {
    opacity: 0;
    transform: translateY(4px) scale(0.94);
  }
  18%,
  78% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-7px) scale(0.96);
  }
}

@keyframes fxParticle {
  0% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(0) scale(0.7);
  }
  18%,
  68% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(var(--d)) scale(0.2);
  }
}

@keyframes fxStreak {
  0% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(0) scaleX(.3);
  }
  16% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(var(--d)) scaleX(1);
  }
}

@keyframes fxScreenPulse {
  45% {
    filter: saturate(1.12) brightness(1.03);
    transform: translateY(-1px);
  }
}

@keyframes fxAlertPulse {
  25% {
    transform: translateX(-1px);
    filter: saturate(1.12);
  }
  55% {
    transform: translateX(1px);
  }
}

@keyframes aiSlotWork {
  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.16);
  }
}

@keyframes cleanStamp {
  0% {
    transform: scale(0.88) rotate(-6deg);
  }
  45% {
    transform: scale(1.2) rotate(4deg);
    box-shadow: 0 0 0 4px rgba(32, 180, 134, 0.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes assistStamp {
  0% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.16);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulse {
  50% {
    transform: scale(1.06);
  }
}

@keyframes skillChipGlow {
  50% {
    transform: translateY(-1px);
    filter: saturate(1.16);
  }
}

@keyframes bossPulse {
  50% {
    transform: translateY(-1px) scale(1.015);
    box-shadow: 0 10px 24px rgba(184, 102, 35, 0.24);
  }
}

@keyframes surgeDrop {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pressureShake {
  25% {
    transform: translateX(-1px);
  }
  50% {
    transform: translateX(1px);
  }
  75% {
    transform: translateX(-0.5px);
  }
}

@keyframes overloadEnd {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(0.992);
    box-shadow: 0 0 0 4px rgba(239, 106, 91, 0.16), 0 18px 46px rgba(239, 106, 91, 0.14);
  }
}

@keyframes itemRecommend {
  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(240, 196, 81, 0.32);
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    min-height: 100dvh;
    padding: 0;
  }

  .phone {
    width: min(100%, 430px);
    height: min(100svh, 844px);
    max-height: 100svh;
    margin: 0 auto;
    border: 0;
    border-radius: clamp(0px, calc((100vw - 430px) * 2), 34px);
  }

  .side-panel {
    display: none;
  }

  .topbar {
    padding: calc(10px + env(safe-area-inset-top)) 14px 8px;
  }

  h1 {
    font-size: 19px;
  }

  .profile-strip,
  .score-board {
    gap: 5px;
    padding: 0 8px 6px;
  }

  .play-screen {
    padding-top: var(--play-top-safe);
  }

  .play-screen .score-board {
    padding-top: 3px;
  }

  .profile-strip div,
  .score-board div {
    padding: 6px;
    border-radius: 10px;
  }

  .profile-strip strong,
  .score-board strong {
    font-size: 13px;
  }

  .control-panel {
    margin: 0 10px 8px;
  }

  .boss-panel {
    top: 94px;
    left: 10px;
    right: 10px;
  }

  .effect-strip {
    top: 48px;
    left: 50%;
    right: auto;
    max-width: calc(100% - 20px);
  }

  .memo-app {
    margin: 0 10px calc(8px + env(safe-area-inset-bottom));
  }

  .memo-list {
    scroll-padding-bottom: 90px;
  }

  .sheet-dialog {
    width: 100vw;
    max-width: none;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }
}

@media (max-width: 860px) {
  body.keyboard-open .phone {
    height: 100svh;
    max-height: 100svh;
  }

  body.keyboard-open .screen {
    min-height: 0;
  }

  body.keyboard-open .play-screen {
    min-height: 0;
    padding-top: var(--play-top-safe);
    padding-bottom: var(--keyboard-inset);
    overflow: hidden;
  }

  body.keyboard-open .topbar h1,
  body.keyboard-open .topbar .eyebrow,
  body.keyboard-open .profile-strip,
  body.keyboard-open .control-panel {
    display: none;
  }

  body.keyboard-open .topbar {
    position: absolute;
    top: env(safe-area-inset-top);
    right: 0;
    z-index: 80;
    justify-content: flex-end;
    padding: 8px 10px 6px;
  }

  body.keyboard-open .top-actions {
    transform: scale(0.88);
    transform-origin: top right;
  }

  body.keyboard-open .score-board {
    display: flex;
    gap: 3px;
    padding: 0 48px 4px 6px;
  }

  body.keyboard-open .score-board div {
    flex: 1 1 0;
    min-height: 22px;
    padding: 2px 4px;
    border-radius: 8px;
    box-shadow: none;
  }

  body.keyboard-open .score-board strong {
    margin-top: 0;
    font-size: 11px;
  }

  body.keyboard-open .score-board .label {
    font-size: 8px;
  }

  body.keyboard-open .item-bar {
    gap: 4px;
    padding: 0 6px 4px;
  }

  body.keyboard-open .scenario-panel {
    display: none;
  }

  body.keyboard-open .skill-strip,
  body.keyboard-open .play-mission,
  body.keyboard-open .item-hint {
    display: none !important;
  }

  body.keyboard-open .boss-panel {
    top: 68px;
    left: 8px;
    right: 8px;
    padding: 8px 10px;
  }

  body.keyboard-open .effect-strip {
    top: calc(env(safe-area-inset-top) + 38px);
    left: 50%;
    right: auto;
    max-width: min(270px, calc(100% - 20px));
    padding: 4px 8px;
    font-size: 10px;
  }

  body.keyboard-open .fx-burst {
    top: 41%;
  }

  body.keyboard-open .item-btn {
    min-height: 25px;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 9px;
    box-shadow: none;
  }

  body.keyboard-open .item-btn span {
    font-size: 10px;
  }

  body.keyboard-open .item-btn strong {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }

  body.keyboard-open .memo-app {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 0 calc(4px + var(--play-bottom-safe));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
  }

  body.keyboard-open .memo-header {
    padding: 6px 8px;
  }

  body.keyboard-open .memo-header h2 {
    font-size: 14px;
  }

  body.keyboard-open .memo-header small {
    display: none;
  }

  body.keyboard-open .memo-count {
    min-width: 92px;
    max-width: 146px;
    height: 21px;
    padding: 0 6px;
    font-size: 9px;
  }

  body.keyboard-open .ai-slot {
    width: 24px;
    height: 21px;
    padding: 0;
  }

  body.keyboard-open .memo-list {
    gap: 4px;
    padding: 7px 8px;
    min-height: 0;
    overscroll-behavior: contain;
  }

  body.keyboard-open .memo-item {
    grid-template-columns: 20px 1fr;
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 10px;
    font-size: 12px;
  }

  body.keyboard-open .memo-backlog {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 11px;
  }

  body.keyboard-open .memo-backlog small {
    font-size: 9px;
  }

  body.keyboard-open .checkbox {
    width: 16px;
    height: 16px;
    border-radius: 5px;
  }

  body.keyboard-open .input-zone {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 7px 8px calc(7px + var(--play-bottom-safe));
  }

  body.keyboard-open .input-zone input {
    min-height: 34px;
    border-radius: 10px;
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .skill-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-strip,
  .score-board {
    grid-template-columns: repeat(2, 1fr);
  }

  .button-row,
  .control-panel .button-row,
  .mode-row {
    grid-template-columns: 1fr;
  }
}

.screen {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  overflow-anchor: none;
}

.screen[hidden] {
  display: none;
}

.home-screen {
  gap: 8px;
  padding: 0 10px 8px;
  overflow: auto;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5fb 62%, #edf3f8 100%);
}

.home-screen > .home-hero,
.home-screen > .player-card,
.home-screen > .login-card,
.home-screen > .home-actions,
.home-screen > .work-setup-card,
.home-screen > .item-stock-card,
.home-screen > .checkpoint-card,
.home-screen > .collection-card {
  flex: 0 0 auto;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-height: 184px;
  overflow: hidden;
  padding: 15px 14px 14px;
  border-radius: 22px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(135deg, #172643 0%, #1d4e91 48%, #0b8f7c 118%);
  box-shadow: 0 18px 38px rgba(22, 42, 79, 0.24);
}

.home-hero::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -74px;
  width: 210px;
  height: 210px;
  border-radius: 64px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(16deg);
}

.briefing-copy {
  position: relative;
  z-index: 1;
  padding-right: 104px;
}

.briefing-copy span,
.home-hero small {
  display: block;
  font-weight: 900;
  opacity: 0.82;
}

.briefing-copy span {
  font-size: 11px;
}

.home-hero h2 {
  margin: 5px 0;
  font-size: 23px;
  line-height: 1.12;
}

.home-hero small {
  font-size: 11px;
  line-height: 1.25;
}

.briefing-visual {
  position: absolute;
  top: 24px;
  right: 14px;
  z-index: 1;
  width: 92px;
  height: 80px;
}

.briefing-bubble {
  position: absolute;
  left: 0;
  bottom: 7px;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 42px;
  border-radius: 22px;
  background: linear-gradient(135deg, #9bd7ff, #3a8eff);
  box-shadow: 0 12px 20px rgba(3, 21, 58, 0.2);
}

.briefing-bubble::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -7px;
  border-width: 8px 0 0 10px;
  border-style: solid;
  border-color: transparent transparent transparent #3a8eff;
}

.briefing-bubble span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffffff;
  opacity: 0.92;
}

.briefing-note {
  position: absolute;
  right: 0;
  top: 0;
  display: grid;
  gap: 6px;
  width: 62px;
  height: 72px;
  border-radius: 15px 15px 20px 15px;
  padding: 17px 11px 9px;
  background: linear-gradient(135deg, #ffffff, #ddecff);
  box-shadow: 0 14px 22px rgba(3, 21, 58, 0.22);
  transform: rotate(7deg);
}

.briefing-note i {
  position: absolute;
  top: -6px;
  left: 15px;
  width: 10px;
  height: 17px;
  border: 3px solid #3c5f8c;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.briefing-note::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 7px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffd166;
  box-shadow: -2px 2px 0 rgba(185, 137, 8, 0.18);
}

.briefing-note b {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #aeb9c9;
}

.briefing-stack {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.briefing-stack div {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 19px;
  min-height: 86px;
  padding: 13px 13px 12px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
}

.briefing-stack span {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 900;
  opacity: 0.72;
}

.briefing-stack strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[lang="en"] .briefing-copy {
  padding-right: 72px;
}

html[lang="en"] .home-hero h2 {
  max-width: 100%;
  font-size: 22px;
  line-height: 1.08;
}

html[lang="en"] .home-hero small {
  max-width: 100%;
  line-height: 1.25;
}

html[lang="en"] .briefing-stack div {
  min-height: 72px;
}

html[lang="en"] .briefing-stack strong {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mission-progress {
  display: block;
  height: 8px;
  overflow: hidden;
  margin-top: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.mission-progress b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8de3ff, #dff8ff);
  transition: width 220ms ease;
}

.briefing-stack em {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 1000;
  text-align: right;
}

.player-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(223, 231, 240, 0.9);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 15px 34px rgba(39, 57, 91, 0.09);
}

.profile-avatar {
  position: relative;
  display: grid;
  place-items: end center;
  width: 52px;
  height: 52px;
  border: 1px solid #dce6f3;
  border-radius: 17px;
  background: linear-gradient(135deg, #eef5ff, #ffffff);
  box-shadow: inset 0 -8px 18px rgba(79, 124, 255, 0.08);
}

.avatar-face {
  position: relative;
  width: 38px;
  height: 41px;
  border-radius: 18px 18px 21px 21px;
  background: linear-gradient(180deg, #ffd3aa, #ffbd92);
}

.avatar-face span {
  position: absolute;
  top: -9px;
  left: 5px;
  width: 32px;
  height: 17px;
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(135deg, #101827, #45546c);
}

.avatar-face b {
  position: absolute;
  top: 22px;
  width: 5px;
  height: 7px;
  border-radius: 999px;
  background: #182033;
}

.avatar-face b:nth-child(2) {
  left: 14px;
}

.avatar-face b:nth-child(3) {
  right: 14px;
}

.avatar-face i {
  position: absolute;
  left: 19px;
  bottom: 11px;
  width: 12px;
  height: 6px;
  border: 2px solid #bf5d5d;
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.profile-avatar em {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  color: #19305d;
  background: #eef5ff;
  font-size: 14px;
  font-style: normal;
  font-weight: 1000;
}

.player-card strong {
  display: block;
  margin-top: 3px;
  color: #111a2e;
  font-size: 21px;
  line-height: 1.15;
}

.player-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(217, 224, 232, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(28, 39, 58, 0.08);
}

.login-card[hidden] {
  display: none !important;
}

.login-card strong,
.login-card small {
  display: block;
}

.login-card strong {
  margin-top: 2px;
  font-size: 14px;
}

.login-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.login-actions {
  display: flex;
  gap: 6px;
}

.login-btn {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(24, 32, 51, 0.12);
  border-radius: 11px;
  color: #1b2535;
  background: #ffffff;
  font-size: 11px;
  font-weight: 1000;
}

.login-btn.google {
  color: #174ea6;
  background: #eef5ff;
}

.login-btn.kakao {
  color: #3a2b00;
  background: #fee500;
}

.login-btn.ghost {
  color: var(--muted);
  background: #f4f6f8;
}

.onboard-modal {
  z-index: 1500;
}

.onboard-card {
  display: grid;
  gap: 14px;
  max-width: 370px;
  padding: 22px;
}

.onboard-badge {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: #174ea6;
  background: #eef5ff;
  font-size: 12px;
  font-weight: 1000;
}

.nickname-field {
  display: grid;
  gap: 7px;
}

.nickname-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.nickname-field input {
  width: 100%;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(24, 32, 51, 0.14);
  background: #fff;
  font-size: 17px;
  font-weight: 900;
}

.onboard-login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.onboard-login-actions .login-btn {
  min-height: 44px;
  border-radius: 14px;
  font-size: 13px;
}

.login-card.needs-link {
  border-color: rgba(79, 124, 255, 0.42);
  background: linear-gradient(135deg, #ffffff, #eef5ff);
  box-shadow: 0 14px 32px rgba(79, 124, 255, 0.16);
}

.ticket-pill {
  display: grid;
  min-width: 62px;
  min-height: 58px;
  place-items: center;
  padding: 9px;
  border-radius: 17px;
  color: #ffffff;
  background: linear-gradient(135deg, #101827, #2b3d67);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(24, 32, 51, 0.18);
}

.ticket-pill span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
}

.ticket-pill strong {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
}

.ticket-pill small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 900;
  opacity: 0.72;
}

.home-actions {
  display: grid;
  gap: 8px;
}

.item-stock-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(216, 226, 239, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(39, 57, 91, 0.08);
}

.item-stock-card div {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 7px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
}

.item-stock-card span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 8px;
  color: #174ea6;
  background: #ffffff;
  font-size: 12px;
  box-shadow: 0 5px 12px rgba(39, 57, 91, 0.08);
}

.item-stock-card small {
  overflow: hidden;
  color: #5f6f86;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-stock-card strong {
  color: #14213d;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.shop-stock-card {
  margin-top: -7px;
  background: linear-gradient(135deg, rgba(238, 245, 255, 0.96), rgba(255, 255, 255, 0.96));
  box-shadow: none;
}

.start-cta {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  border: 0;
  border-radius: 18px;
  padding: 10px 14px;
  color: #ffffff;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(135deg, #5478ff 0%, #256ee8 54%, #0e9f8d 124%);
  box-shadow: 0 8px 0 #163c9f, 0 15px 24px rgba(37, 110, 232, 0.24);
  transform: translateY(0);
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.start-play-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #326dff;
  background: #ffffff;
  box-shadow: 0 12px 20px rgba(12, 43, 112, 0.14);
  font-size: 19px;
}

.start-copy {
  min-width: 0;
}

.start-cta strong {
  display: block;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0;
}

.start-cta small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.start-arrow {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.88;
}

.start-cta:active {
  box-shadow: 0 10px 22px rgba(79, 124, 255, 0.24);
  transform: translateY(2px) scale(0.99);
}

.start-cta:disabled {
  border-color: #8d96a8;
  background: #8d96a8;
  box-shadow: none;
  transform: none;
}

.checkpoint-card {
  display: grid;
  grid-template-columns: 1fr 88px;
  align-items: center;
  gap: 10px;
  padding: 17px;
  border: 1px solid rgba(223, 231, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(39, 57, 91, 0.07);
}

.checkpoint-card.single-start-level {
  grid-template-columns: 1fr 88px;
}

.checkpoint-card select[hidden] {
  display: none;
}

.checkpoint-card select {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
}

.checkpoint-card strong {
  display: block;
  margin-top: 6px;
  font-size: 23px;
}

.work-setup-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(223, 231, 240, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 249, 255, 0.96)),
    radial-gradient(circle at 92% 14%, rgba(64, 124, 255, 0.13), transparent 30%);
  box-shadow: 0 12px 28px rgba(39, 57, 91, 0.07);
}

.setup-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.setup-head strong {
  display: block;
  margin-top: 4px;
  color: #0f1b33;
  font-size: 18px;
  line-height: 1.15;
}

.setup-head small {
  display: block;
  margin-top: 4px;
  color: #6c7a92;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.setup-shop-btn {
  min-width: 52px;
  min-height: 32px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #172643, #2d68ff);
  box-shadow: 0 9px 18px rgba(37, 83, 186, 0.2);
  font-size: 13px;
  font-weight: 1000;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.setup-grid div {
  min-height: 40px;
  padding: 6px;
  border: 1px solid rgba(221, 231, 244, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.setup-grid span {
  display: block;
  color: #7b8799;
  font-size: 10px;
  font-weight: 900;
}

.setup-grid strong {
  display: block;
  margin-top: 4px;
  color: #111a2c;
  font-size: 14px;
  line-height: 1.1;
}

.work-setup-card select[hidden] {
  display: none;
}

.work-setup-card select {
  width: 100%;
  min-height: 34px;
  margin-top: 7px;
  border: 1px solid rgba(51, 102, 255, 0.24);
  border-radius: 12px;
  color: #17325f;
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  font-weight: 900;
}

.stage-track {
  display: grid;
  grid-template-columns: 28px 1fr 28px 1fr 28px 1fr 28px 1fr 28px;
  align-items: center;
  gap: 0;
  margin-top: 15px;
  max-width: 270px;
}

.stage-track span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #d9e2ef;
  border-radius: 999px;
  color: #91a0b7;
  background: #ffffff;
  font-size: 13px;
  font-weight: 1000;
}

.stage-track span.active {
  border-color: #4f7cff;
  color: #276aff;
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.1);
}

.stage-track i {
  display: block;
  height: 3px;
  background: #e0e7f1;
}

.stage-track i.active {
  background: #4f7cff;
}

.stage-reward {
  display: grid;
  place-items: center;
  min-height: 84px;
  border-radius: 21px;
  background: linear-gradient(135deg, #f0f5ff, #ffffff);
}

.stage-reward span {
  font-size: 28px;
}

.stage-reward strong {
  margin: 5px 0 0;
  color: #31517e;
  font-size: 11px;
  text-align: center;
}

.guide-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(223, 231, 240, 0.9);
  border-radius: 12px;
  padding: 0 11px;
  color: var(--ink);
  background: #f7faff;
  font-size: 13px;
  font-weight: 900;
}

.special-guide-section > h3 {
  display: none;
}

.guide-toggle strong {
  color: var(--accent);
  font-size: 12px;
}

.special-unlock-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.special-guide-list {
  display: none;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}

.special-guide-section.open .special-guide-list {
  display: grid;
  overflow: visible;
}

.guide-group-title {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin-top: 2px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
}

.guide-group-title.bad {
  color: #a94839;
}

.special-guide-list span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  gap: 3px 8px;
  width: 100%;
  min-height: 46px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--rank-main, #dfe7f0) 44%, #ffffff);
  background: linear-gradient(135deg, var(--rank-soft, #f4f7fb), #ffffff);
  font-size: 11px;
  font-weight: 900;
}

.special-guide-list span.locked {
  opacity: 0.58;
  background: #eef1f5;
}

.special-guide-list span.bad-guide-item {
  border-color: rgba(213, 106, 82, 0.38);
  background: linear-gradient(135deg, #fff0ed, #ffffff);
}

.special-guide-list strong {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.special-guide-list strong::before {
  display: inline-grid;
  min-width: 28px;
  height: 17px;
  place-items: center;
  border-radius: 999px;
  color: var(--rank-ink, #ffffff);
  background: var(--rank-main, #7d8797);
  font-size: 9px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
  content: "C";
}

.special-guide-list span:has(.guide-dot.autoSlot) strong::before {
  content: "SSS";
}

.special-guide-list span:has(.guide-dot.skillPower) strong::before,
.special-guide-list span:has(.guide-dot.skillClean) strong::before,
.special-guide-list span:has(.guide-dot.skillCombo) strong::before {
  content: "SS";
}

.special-guide-list span:has(.guide-dot.slotUp) strong::before,
.special-guide-list span:has(.guide-dot.guard) strong::before,
.special-guide-list span:has(.guide-dot.summaryNote) strong::before,
.special-guide-list span:has(.guide-dot.approvalPass) strong::before {
  content: "S";
}

.special-guide-list span:has(.guide-dot.keyPower) strong::before,
.special-guide-list span:has(.guide-dot.keyCombo) strong::before,
.special-guide-list span:has(.guide-dot.keyClean) strong::before,
.special-guide-list span:has(.guide-dot.meetingCancel) strong::before,
.special-guide-list span:has(.guide-dot.bulkClear) strong::before {
  content: "A";
}

.special-guide-list span:has(.guide-dot.payday) strong::before,
.special-guide-list span:has(.guide-dot.focusMode) strong::before,
.special-guide-list span:has(.guide-dot.quietHour) strong::before,
.special-guide-list span:has(.guide-dot.shortcut) strong::before,
.special-guide-list span:has(.guide-dot.internHelp) strong::before,
.special-guide-list span:has(.guide-dot.templateMemo) strong::before,
.special-guide-list span:has(.guide-dot.archiveMemo) strong::before,
.special-guide-list span:has(.guide-dot.pinMemo) strong::before,
.special-guide-list span:has(.guide-dot.coffeeRefillMemo) strong::before {
  content: "B";
}

.special-guide-list span:has(.guide-dot.urgent) strong::before,
.special-guide-list span:has(.guide-dot.double) strong::before,
.special-guide-list span:has(.guide-dot.secure) strong::before,
.special-guide-list span:has(.guide-dot.rework) strong::before,
.special-guide-list span:has(.guide-dot.shuffle) strong::before,
.special-guide-list span:has(.guide-dot.trap) strong::before {
  content: "D";
}

.special-guide-list span[data-rank] strong::before {
  content: attr(data-rank);
}

.special-guide-list span[data-rank] strong::before {
  display: none;
}

.guide-rank-badge {
  display: inline-grid;
  min-width: 30px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  color: var(--rank-ink, #ffffff);
  background: var(--rank-main, #7d8797);
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
}

.special-guide-list span.bad-guide-item strong::before {
  display: none;
  content: none;
}

.special-guide-list small {
  display: -webkit-box;
  grid-column: 2;
  grid-row: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.special-guide-section.open .special-guide-list span {
  align-items: flex-start;
  grid-template-columns: 10px minmax(0, 1fr);
  min-height: 48px;
}

.special-guide-section.open .special-guide-list small {
  overflow: hidden;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: normal;
}

.guide-dot {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--rank-main, var(--ink));
}

.guide-dot.urgent { background: #ef6a5b; }
.guide-dot.bomb { background: #2f8a55; }
.guide-dot.double { background: #5d6fd1; }
.guide-dot.secure { background: #111827; }
.guide-dot.bonus { background: #b98908; }
.guide-dot.calm { background: #287aa8; }
.guide-dot.snackMemo { background: #d4ad3c; }
.guide-dot.waterMemo { background: #66a6c9; }
.guide-dot.smallWinMemo { background: #c98605; }
.guide-dot.deskMemo { background: #b89436; }
.guide-dot.calendarMemo { background: #d7a93c; }
.guide-dot.clipMemo { background: #c7a048; }
.guide-dot.printMemo { background: #ac9557; }
.guide-dot.inboxMemo { background: #c89a23; }
.guide-dot.templateMemo { background: #20b486; }
.guide-dot.archiveMemo { background: #168f72; }
.guide-dot.pinMemo { background: #2aa878; }
.guide-dot.coffeeRefillMemo { background: #287a64; }
.guide-dot.rework { background: #bf6b4b; }
.guide-dot.shuffle { background: #7554b8; }
.guide-dot.keyPower { background: #7c5cff; }
.guide-dot.keyCombo { background: #14a8c8; }
.guide-dot.keyClean { background: #20b486; }
.guide-dot.slotUp { background: #ff8a1f; }
.guide-dot.guard { background: #1d9f80; }
.guide-dot.autoSlot { background: #16a3a3; }
.guide-dot.gearBox { background: #e9781f; }
.guide-dot.skill { background: #4f7cff; }
.guide-dot.meetingCancel { background: #20b486; }
.guide-dot.payday { background: #c98605; }
.guide-dot.focusMode { background: #287aa8; }
.guide-dot.bulkClear { background: #7c5cff; }
.guide-dot.summaryNote { background: #0f9f8f; }
.guide-dot.shortcut { background: #4f7cff; }
.guide-dot.internHelp { background: #20b486; }
.guide-dot.approvalPass { background: #c98605; }
.guide-dot.quietHour { background: #6b7a90; }
.guide-dot.trap { background: #7d8797; }
.guide-dot.decoyMemo { background: #9a7466; }
.guide-dot.auditMemo { background: #111827; }
.guide-dot.delayMemo { background: #b8860b; }
.guide-dot.overtimeTrap { background: #d56a52; }
.guide-dot.priorityTrap { background: #ef4444; }

.collection-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(216, 192, 112, 0.76);
  border-radius: 18px;
  color: var(--ink);
  text-align: left;
  background: linear-gradient(135deg, #fff9dc, #fffdf4);
  box-shadow: 0 14px 30px rgba(185, 137, 8, 0.1);
}

.collection-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.collection-folder {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #fff3b8, #ffcf4a);
  box-shadow: 0 10px 18px rgba(185, 137, 8, 0.16);
  font-size: 20px;
}

.collection-card h2 {
  margin-top: 2px;
  font-size: 17px;
}

.collection-card small {
  display: block;
  margin-top: 2px;
  color: #665321;
  font-weight: 800;
}

.collection-progress {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.collection-progress strong {
  font-size: 18px;
}

.collection-progress span {
  padding: 4px 6px;
  border-radius: 999px;
  color: #ffffff;
  background: #b98908;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.collection-progress em,
.collection-summary span {
  color: #665321;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.collection-files {
  grid-column: 1 / -1;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid rgba(234, 220, 165, 0.94);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.collection-files div {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 88px;
  padding: 10px 5px;
  border-right: 1px solid rgba(234, 220, 165, 0.9);
  text-align: center;
}

.collection-files div:last-child {
  border-right: 0;
}

.collection-files span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: #f1f5fb;
  box-shadow: inset 0 -7px 12px rgba(79, 124, 255, 0.07);
  font-size: 22px;
}

.collection-files div.owned span {
  background: #e8f1ff;
}

.collection-files strong {
  color: #172033;
  font-size: 10px;
  line-height: 1.15;
}

.collection-files small {
  margin: 0;
  color: #546179;
  font-size: 12px;
  font-weight: 1000;
}

.collection-sheet {
  gap: 12px;
}

.collection-summary,
.shop-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  color: #4f3c00;
  background: #fff4bf;
  font-size: 13px;
  font-weight: 900;
}

.collection-summary span,
.shop-balance {
  color: #4f3c00;
}

.shop-title-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.shop-title-row h2 {
  margin: 0;
  white-space: nowrap;
}

.shop-header-balance {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid #ecd271;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.collection-purpose {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid #ead58a;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 205, 0.94)),
    #fff6d6;
  box-shadow: 0 12px 24px rgba(137, 98, 14, 0.1);
}

.collection-purpose span {
  color: #9b6d08;
  font-size: 11px;
  font-weight: 900;
}

.collection-purpose strong {
  color: #33270a;
  font-size: 16px;
  line-height: 1.15;
}

.collection-purpose small {
  color: #735819;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.shop-hero {
  display: grid;
  gap: 4px;
  padding: 15px;
  border-radius: 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(135deg, #1f2937, #e9781f);
  box-shadow: 0 16px 30px rgba(233, 120, 31, 0.18);
}

.shop-hero span,
.shop-hero small {
  font-size: 12px;
  font-weight: 900;
  opacity: 0.82;
}

.shop-hero strong {
  font-size: 21px;
  line-height: 1.1;
}

.shop-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shop-route-card {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.shop-route-card strong {
  color: #1f2937;
  font-size: 13px;
  font-weight: 950;
}

.shop-route-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.shop-route-card.cash {
  border-color: #f0c98a;
  background: #fff8e9;
}

.shop-route-card.gold {
  border-color: #e8d175;
  background: #fff8c8;
}

.shop-route-card.permanent {
  border-color: #abc4f7;
  background: #eef5ff;
}

.collection-list {
  display: grid;
  gap: 8px;
}

.collection-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.collection-item > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 38px;
  border-radius: 11px;
  color: #ffffff;
  background: #b98908;
  font-size: 10px;
  font-weight: 900;
}

.collection-item strong,
.collection-item small {
  display: block;
}

.collection-item strong {
  font-size: 14px;
}

.collection-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.collection-item .collection-effect {
  color: #8a6510;
  font-weight: 900;
}

.collection-item em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.collection-item.locked {
  opacity: 0.62;
}

.collection-item.locked > span {
  background: #8d96a8;
}

.collection-item.collection-set {
  border-color: rgba(79, 124, 255, 0.26);
  background:
    linear-gradient(135deg, rgba(231, 240, 255, 0.92), rgba(255, 255, 255, 0.96));
}

.collection-item.collection-set:not(.locked) {
  border-color: rgba(32, 180, 134, 0.4);
  background:
    linear-gradient(135deg, rgba(225, 255, 240, 0.94), rgba(255, 252, 229, 0.94));
  box-shadow: 0 10px 24px rgba(32, 180, 134, 0.11);
}

.home-dock {
  position: sticky;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: auto;
  margin-bottom: max(6px, env(safe-area-inset-bottom));
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border: 1px solid rgba(223, 231, 240, 0.82);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -14px 34px rgba(27, 39, 58, 0.1);
  backdrop-filter: blur(14px);
}

.home-dock button {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 47px;
  border: 0;
  border-radius: 15px;
  color: var(--ink);
  background: linear-gradient(135deg, #f7fbff, #edf3f8);
  font-weight: 900;
}

.home-dock button span {
  font-size: 16px;
  line-height: 1;
}

.home-dock button strong {
  font-size: 10px;
}

.home-dock button:nth-child(2) {
  color: #ffffff;
  background: linear-gradient(135deg, #182033, #34415b);
}

.title-hero {
  position: relative;
  min-height: 315px;
  overflow: hidden;
  align-content: space-between;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 38%),
    radial-gradient(circle at 82% 24%, rgba(255, 209, 102, 0.42), transparent 26%),
    linear-gradient(150deg, #172033 0%, #3d5ac8 48%, #0aa17f 115%);
}

.title-screen {
  gap: 13px;
  padding: max(18px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 12%, rgba(255, 209, 102, 0.26), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #edf3f8 100%);
}

.title-screen .title-hero {
  flex: 0 0 auto;
  min-height: 356px;
  margin-top: 0;
}

.title-screen .title-start-zone {
  flex: 0 0 auto;
}

.title-screen .start-cta {
  min-height: 82px;
  border-radius: 24px;
  box-shadow: 0 10px 0 #173d99, 0 22px 34px rgba(79, 124, 255, 0.32);
}

.title-screen .start-cta strong {
  font-size: 27px;
}

.title-screen .title-summary-card,
.title-screen .title-checkpoint-card,
.title-screen .title-collection-card {
  flex: 0 0 auto;
}

.title-screen .title-dock {
  position: relative;
  bottom: auto;
  margin-top: auto;
  margin-bottom: 0;
}

.front-title-screen {
  position: relative;
  justify-content: flex-start;
  gap: 12px;
  min-height: 100%;
  padding: max(22px, calc(env(safe-area-inset-top) + 18px)) 20px max(18px, env(safe-area-inset-bottom));
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0 12%, transparent 12% 27%, rgba(255, 255, 255, 0.07) 27% 39%, transparent 39%),
    linear-gradient(180deg, #0b1939 0%, #1745a4 46%, #039b8e 100%);
  isolation: isolate;
}

.front-title-screen::before,
.front-title-screen::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.front-title-screen::before {
  left: 16px;
  right: 16px;
  top: max(116px, calc(env(safe-area-inset-top) + 112px));
  height: 42px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 18px, transparent 18px 34px);
  opacity: 0.3;
}

.front-title-screen::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 210px;
  background: linear-gradient(180deg, transparent 0%, rgba(3, 12, 31, 0.36) 44%, rgba(3, 12, 31, 0.66) 100%);
  z-index: -1;
}

.front-logo {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-top: 2px;
  text-align: center;
}

.front-logo span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  font-size: 11px;
  font-weight: 950;
}

.front-logo h2 {
  margin: 0;
  color: #ffffff;
  font-size: 42px;
  font-weight: 1000;
  line-height: 1;
  text-shadow:
    0 5px 0 #0c2f83,
    0 13px 24px rgba(0, 0, 0, 0.34);
}

.front-logo small {
  max-width: 300px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.35;
}

.front-visual {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 352px;
  margin: 0 -14px;
}

.front-hero-art {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: min(94%, 348px);
  max-width: none;
  transform: translate(-50%, -50%);
  filter: saturate(1.18) contrast(1.08) drop-shadow(0 28px 34px rgba(2, 8, 23, 0.34));
}

.front-float-card {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border: 2px solid rgba(22, 32, 53, 0.86);
  border-radius: 13px;
  color: #172033;
  background: #ffffff;
  box-shadow: 0 9px 0 rgba(12, 18, 32, 0.24), 0 16px 22px rgba(3, 12, 31, 0.22);
  font-size: 12px;
  font-weight: 1000;
}

.front-float-card-a {
  left: 14px;
  top: 52px;
  transform: rotate(-9deg);
  background: #ffe1e6;
}

.front-float-card-b {
  right: 17px;
  top: 114px;
  transform: rotate(8deg);
  background: #dcfff4;
}

.front-float-card-c {
  left: 35px;
  bottom: 66px;
  transform: rotate(7deg);
  background: #fff0b7;
}

.front-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
}

.front-start-btn {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 72px;
  border: 0;
  border-radius: 24px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #ff596c 0%, #ff8d3d 52%, #ffd34e 100%);
  font-size: 25px;
  font-weight: 1000;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(80, 23, 23, 0.24);
  box-shadow: 0 10px 0 #9f2d28, 0 21px 28px rgba(3, 12, 31, 0.3);
}

.front-start-btn strong {
  font-size: 25px;
  font-weight: 1000;
  line-height: 1;
}

.front-start-btn small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.front-start-btn:active {
  transform: translateY(4px);
  box-shadow: 0 6px 0 #9f2d28, 0 13px 18px rgba(3, 12, 31, 0.28);
}

.front-creator-btn {
  display: grid;
  place-items: center;
  gap: 2px;
  justify-self: center;
  width: min(100%, 260px);
  min-height: 52px;
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 22px rgba(3, 12, 31, 0.18);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 950;
}

.front-creator-btn span {
  line-height: 1;
}

.front-creator-btn small {
  max-width: 100%;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-dashboard-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 100%;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.home-dashboard-empty h2 {
  color: var(--ink);
  font-size: 22px;
}

.home-dashboard-empty p {
  max-width: 280px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.title-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  max-width: 230px;
}

.title-season {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: #172033;
  background: #ffd166;
  font-size: 11px;
  font-weight: 1000;
}

.title-copy h2 {
  margin: 0;
  font-size: 43px;
  line-height: 0.95;
  color: #ffffff;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.title-copy small {
  max-width: 230px;
  color: rgba(255, 255, 255, 0.86);
}

.memo-mascot {
  position: absolute;
  right: 14px;
  bottom: 74px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border-radius: 34px;
  background: linear-gradient(180deg, #fffdf4, #e9f2ff);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18), inset 0 -8px 0 rgba(79, 124, 255, 0.1);
  transform: rotate(2deg);
}

.mascot-screen {
  position: absolute;
  top: 16px;
  display: grid;
  gap: 5px;
  width: 92px;
  padding: 9px;
  border: 3px solid #182033;
  border-radius: 15px;
  background: #fff7c7;
}

.mascot-screen span {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #182033;
  opacity: 0.72;
}

.mascot-screen span:nth-child(2) {
  width: 72%;
}

.mascot-screen span:nth-child(3) {
  width: 48%;
}

.mascot-face {
  position: absolute;
  top: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mascot-face b {
  width: 11px;
  height: 16px;
  border-radius: 999px;
  background: #182033;
}

.mascot-face i {
  position: absolute;
  top: 18px;
  left: 11px;
  width: 32px;
  height: 14px;
  border-bottom: 4px solid #182033;
  border-radius: 0 0 999px 999px;
}

.mascot-keyboard {
  position: absolute;
  bottom: 15px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  width: 94px;
}

.mascot-keyboard span {
  height: 15px;
  border-radius: 5px;
  background: #4f7cff;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16);
}

.title-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 7px;
}

.title-stats div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.14);
}

.title-stats span {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 1000;
  opacity: 0.72;
}

.title-stats strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-start-zone {
  margin-top: -4px;
}

.title-summary-card {
  padding: 13px 14px;
}

.title-summary-card #gradeLine {
  font-size: 16px;
}

.title-mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.title-mini-actions .ghost-btn {
  min-width: 62px;
}

.title-account-card {
  display: none;
}

.title-checkpoint-card {
  padding: 12px 14px;
}

.title-collection-card {
  padding: 12px 14px;
}

.title-dock {
  margin-top: auto;
}

.game-onboard-card {
  border: 1px solid rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 253, 0.98));
}

.onboard-step {
  display: grid;
  gap: 12px;
}

.onboard-step[hidden] {
  display: none;
}

.login-choice-stack {
  display: grid;
  gap: 9px;
}

.login-choice-stack .login-btn {
  min-height: 48px;
  border-radius: 15px;
  font-size: 14px;
}

.onboard-footnote {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.account-linked-pill {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 7px 10px;
  border-radius: 999px;
  color: #126344;
  background: #e5fff1;
  font-size: 12px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onboard-save-row {
  grid-template-columns: 1fr;
}

.onboard-close-btn {
  width: 100%;
}

.tutorial-card {
  display: grid;
  gap: 13px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 211, 78, 0.28), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.24);
}

.tutorial-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.tutorial-topline b {
  display: inline-grid;
  min-width: 42px;
  min-height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #172033;
}

.tutorial-visual {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 86px;
  height: 86px;
  border: 4px solid #172033;
  border-radius: 26px;
  background: linear-gradient(135deg, #fff0a8, #65e0c2);
  box-shadow: 0 12px 0 rgba(23, 32, 51, 0.15);
  font-size: 40px;
}

.tutorial-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.18;
  text-align: center;
}

.tutorial-card p {
  margin: 0;
  color: #39465a;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.48;
  text-align: center;
}

.tutorial-tip,
.tutorial-reward {
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  color: #42516a;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.36;
}

.tutorial-practice {
  display: grid;
  gap: 8px;
}

.tutorial-practice[hidden] {
  display: none;
}

.tutorial-practice-memo {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(79, 124, 255, 0.22);
  border-radius: 14px;
  background: #fffbe7;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.tutorial-practice-memo.done {
  color: #24683f;
  background: #e7f8eb;
  animation: supportOut 580ms ease both;
}

.tutorial-practice-memo span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.tutorial-practice input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 2px solid rgba(79, 124, 255, 0.26);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.tutorial-reward {
  border: 1px solid #ffe08a;
  background: #fff8d8;
}

.tutorial-reward span,
.tutorial-reward strong {
  display: block;
}

.tutorial-reward span {
  color: #8a6510;
  font-size: 11px;
  font-weight: 950;
}

.tutorial-reward strong {
  margin-top: 3px;
  color: #4f3c00;
  font-size: 13px;
}

.tutorial-reward-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 211, 78, 0.4), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fff3c4 100%);
  box-shadow: 0 28px 62px rgba(95, 65, 5, 0.28);
}

.tutorial-reward-badge {
  justify-self: center;
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: #172033;
  font-size: 12px;
  font-weight: 950;
}

.tutorial-reward-card h2 {
  margin: 0;
  color: #291f05;
  font-size: 23px;
  line-height: 1.15;
  text-align: center;
}

.tutorial-reward-card p {
  margin: 0;
  color: #604a13;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
  text-align: center;
}

.tutorial-reward-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tutorial-reward-items span {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 9px;
  border: 1px solid #f4ce65;
  border-radius: 14px;
  background: #ffffff;
  color: #533e05;
  font-size: 13px;
  font-weight: 950;
  text-align: center;
}

.tutorial-main-cta {
  display: grid;
  min-height: 72px;
  place-items: center;
  gap: 3px;
  margin-top: 4px;
  border-radius: 20px;
  box-shadow: 0 9px 0 #153b9a, 0 18px 32px rgba(39, 106, 255, 0.28);
}

.tutorial-main-cta strong {
  color: #ffffff;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1.05;
}

.tutorial-main-cta small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.tutorial-reward-card .tutorial-main-cta {
  width: 100%;
}

.tutorial-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.tutorial-dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #c6d1df;
}

.tutorial-dots i.active {
  width: 22px;
  background: var(--accent);
}

.tutorial-actions {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 9px;
}

.tutorial-actions button {
  min-height: 48px;
  border-radius: 16px;
}

.settings-account-section {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(79, 124, 255, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, #f7fbff, #ffffff);
}

.settings-account-section h3 {
  margin: 0;
  font-size: 15px;
}

.settings-account-copy {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.settings-account-state {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 12px;
  background: #eef5ff;
}

.settings-account-state strong,
.settings-account-state small {
  display: block;
}

.settings-account-state strong {
  color: #174ea6;
  font-size: 13px;
}

.settings-account-state small {
  color: #51627c;
  font-size: 10px;
  font-weight: 800;
}

.settings-login-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.app-info-section {
  gap: 9px;
}

.setting-link,
.setting-details,
.setting-contact {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(26, 45, 76, 0.08);
  border-radius: 13px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-decoration: none;
}

.setting-link {
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  border-style: solid;
  text-align: left;
  font: inherit;
}

.setting-link span,
.setting-details summary,
.setting-contact span {
  color: #20314f;
  font-size: 12px;
  font-weight: 950;
}

.setting-link strong {
  border-radius: 999px;
  padding: 4px 8px;
  background: #e8f1ff;
  color: #276aff;
  font-size: 11px;
  font-weight: 950;
}

.setting-details summary {
  cursor: pointer;
  list-style: none;
}

.setting-details summary::-webkit-details-marker {
  display: none;
}

.setting-details summary::after {
  content: "펼치기";
  float: right;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.setting-details[open] summary::after {
  content: "닫기";
}

.setting-details p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.setting-contact strong {
  color: #276aff;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.setting-version strong {
  color: #64748b;
  font-weight: 900;
}

.privacy-sheet {
  gap: 12px;
}

.privacy-content {
  display: grid;
  gap: 9px;
}

.privacy-content section {
  border: 1px solid rgba(26, 45, 76, 0.08);
  border-radius: 14px;
  padding: 12px;
  background: #f7faff;
}

.privacy-content h3 {
  margin: 0 0 5px;
  color: #20314f;
  font-size: 13px;
}

.privacy-content p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}

.privacy-content a {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e8f1ff;
  color: #276aff;
  font-size: 11px;
  font-weight: 950;
  text-decoration: none;
}

.daily-panel {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(223, 231, 240, 0.9);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(39, 57, 91, 0.07);
}

.sheet-panel {
  margin-top: 10px;
  box-shadow: none;
}

.daily-panel h2 {
  margin-top: 2px;
  font-size: 19px;
}

.small-btn {
  min-height: 34px;
  border-radius: 11px;
  font-size: 12px;
}

.attendance-track {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(239, 246, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.attendance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.attendance-head strong {
  font-size: 13px;
}

.attendance-head small {
  padding: 4px 8px;
  border-radius: 999px;
  color: #7c4a03;
  background: rgba(255, 237, 213, 0.9);
  font-size: 10px;
  font-weight: 900;
}

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

.attendance-day {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  min-height: 50px;
  padding: 5px 2px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 13px;
  color: #475569;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.attendance-day em {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
}

.attendance-day span,
.attendance-day strong {
  display: block;
}

.attendance-day span {
  font-size: 8px;
  font-weight: 900;
}

.attendance-day strong {
  max-width: 100%;
  font-size: 9px;
  line-height: 1.15;
  white-space: nowrap;
}

.attendance-day.done {
  border-color: rgba(34, 197, 94, 0.42);
  color: #166534;
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
}

.attendance-day.done em {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.attendance-day.today {
  border-color: var(--accent);
  color: #173a74;
  background: #eef5ff;
  box-shadow: 0 0 0 2px rgba(45, 108, 223, 0.12), 0 10px 20px rgba(37, 99, 235, 0.12);
}

.attendance-day.today em {
  background: linear-gradient(135deg, #facc15, #f97316);
}

.attendance-day.today::after {
  content: "오늘";
  display: inline-flex;
  justify-self: center;
  margin-top: 1px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-size: 8px;
  font-weight: 1000;
}

html[lang="en"] .attendance-day.today::after {
  content: "Today";
}

.attendance-day.done.today {
  border-color: rgba(34, 197, 94, 0.5);
  color: #166534;
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
}

.attendance-day.done.today em {
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.timer-only.empty {
  display: none !important;
}

.attendance-day.locked {
  opacity: 0.5;
}

.attendance-day.locked em {
  background: #cbd5e1;
}

.attendance-day:disabled {
  cursor: default;
}

.mission-reward-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  padding: 0 2px;
}

.mission-reward-title span {
  color: #111a2c;
  font-size: 14px;
  font-weight: 1000;
}

.mission-reward-title strong {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
}

.mission-list {
  display: grid;
  gap: 7px;
}

.mission-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(224, 232, 244, 0.95);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.78), transparent 45%),
    #f4f7fb;
  font-size: 12.5px;
  font-weight: 900;
}

.mission-row small {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #8a5c00;
  background: #fff1b8;
  font-size: 10px;
  font-weight: 1000;
}

.mission-row strong {
  min-width: 48px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #173a74;
  background: #eef5ff;
  font-size: 11px;
  text-align: center;
}

/* Bottom dock polish: no tab should look selected on the home lobby */
.home-dock button,
.home-dock button:nth-child(2),
.home-dock button:nth-child(4) {
  color: #182033;
  border: 1px solid rgba(216, 226, 239, 0.86);
  background:
    linear-gradient(180deg, #ffffff, #f2f6fb);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.home-dock button span,
.home-dock button:nth-child(4) span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto 2px;
  border-radius: 9px;
  color: #276aff;
  background: #eef5ff;
  font-size: 14px;
  line-height: 1;
}

.home-dock button:nth-child(2) span {
  color: #0f766e;
  background: #e7fff6;
}

.home-dock button:nth-child(3) span {
  color: #a66a00;
  background: #fff1be;
}

.home-dock button:nth-child(4) span {
  color: #44546a;
  background: #eef2f7;
  font-size: 13px;
}

.unlimited-card {
  display: grid;
  width: 100%;
  gap: 4px;
  padding: 15px;
  border: 0;
  border-radius: 18px;
  color: #ffffff;
  text-align: left;
  background: linear-gradient(135deg, #202735, #2d6cdf);
  box-shadow: 0 12px 28px rgba(45, 108, 223, 0.22);
}

.unlimited-card span,
.unlimited-card small {
  opacity: 0.78;
  font-size: 12px;
  font-weight: 900;
}

.unlimited-card strong {
  font-size: 17px;
  line-height: 1.2;
}

.unlimited-card.compact {
  box-shadow: none;
}

.shop-entry-card {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  border: 1px solid rgba(223, 231, 240, 0.9);
  border-radius: 20px;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
}

.shop-entry-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #edf2f7;
  font-size: 22px;
}

.shop-entry-card strong,
.shop-entry-card small {
  display: block;
}

.shop-entry-card strong {
  font-size: 16px;
}

.shop-entry-card small,
.shop-entry-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.home-ranking {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.shop-section {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.shop-section h2 {
  margin-top: 2px;
  font-size: 19px;
}

.shop-grid {
  display: grid;
  gap: 8px;
}

.shop-divider {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
}

.shop-divider strong {
  font-size: 13px;
}

.shop-divider small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.money-shop-grid .shop-card {
  min-height: 58px;
  background: #fffdf0;
}

.daily-gold-divider {
  margin-top: 6px;
}

.daily-gold-divider strong::before {
  content: "";
}

.daily-gold-shop .shop-card {
  border-color: rgba(212, 173, 60, 0.28);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 235, 159, 0.52), transparent 28%),
    linear-gradient(135deg, #fffdf1, #f6fbff);
}

.daily-gold-shop .shop-card .shop-icon {
  background: #fff7d1;
}

.daily-gold-shop .shop-card.owned {
  background: #f3f7ee;
}

.daily-gold-shop .shop-card:disabled {
  cursor: default;
}

.ad-gold-reward-card {
  width: 100%;
  margin: 0 0 10px;
  border-color: rgba(32, 180, 134, 0.28) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(74, 222, 128, 0.24), transparent 28%),
    linear-gradient(135deg, #ecfff5, #fff7d6) !important;
  box-shadow: 0 10px 24px rgba(32, 180, 134, 0.12) !important;
}

.ad-gold-reward-card .shop-icon {
  color: #ffffff !important;
  background: linear-gradient(135deg, #16a34a, #f0c451) !important;
}

.ad-gold-reward-card em {
  color: #116b42 !important;
  background: rgba(255, 255, 255, 0.74) !important;
  border: 1px solid rgba(32, 180, 134, 0.2);
}

.ad-gold-reward-card:disabled {
  cursor: default;
  opacity: 0.68;
}

.premium-divider strong::before {
  content: "";
  color: var(--accent);
  font-size: 10px;
}

.premium-shop-grid .shop-card,
.shop-card.premium-card {
  border-color: rgba(233, 120, 31, 0.24);
  background: #fff4e5;
  box-shadow: 0 10px 22px rgba(233, 120, 31, 0.11);
}

.shop-card.beginner-pack-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(245, 158, 11, 0.38);
  background:
    radial-gradient(circle at 18% 0%, rgba(253, 224, 71, 0.42), transparent 30%),
    linear-gradient(135deg, #fff7ed, #eef6ff 68%, #ffffff);
}

.shop-card.beginner-pack-card::before {
  content: "첫 결제 추천";
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #78350f;
  background: rgba(254, 243, 199, 0.95);
  font-size: 9px;
  font-weight: 1000;
}

.shop-card.beginner-pack-card.owned::before {
  content: "수령 완료";
  color: #166534;
  background: rgba(220, 252, 231, 0.95);
}

.start-level-card {
  background: #f2f7ff;
}

.start-level-card .shop-icon {
  color: #ffffff;
  background: #1f3f75;
  font-size: 13px;
  font-weight: 1000;
}

.slot-upgrade-card {
  background: #fff3e0;
}

.slot-upgrade-card .shop-icon {
  color: #ffffff;
  background: #e9781f;
  font-size: 20px;
  font-weight: 1000;
}

.shop-card.owned {
  opacity: 0.72;
}

.shop-card.owned em {
  color: #2f8a55;
}

.shop-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  border: 1px solid transparent;
  border-radius: 17px;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: #f5f8fc;
  box-shadow: 0 8px 18px rgba(39, 57, 91, 0.06);
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.shop-card:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: 0 4px 10px rgba(39, 57, 91, 0.06);
}

.shop-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #ffffff;
  font-size: 22px;
}

.shop-card strong,
.shop-card b,
.shop-card em {
  font-weight: 900;
}

.shop-card b {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  border-radius: 999px;
  padding: 3px 7px;
  color: #ffffff;
  background: var(--ink);
  font-size: 11px;
}

.shop-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.shop-card em {
  min-width: 64px;
  border-radius: 999px;
  padding: 6px 8px;
  color: #ffffff;
  text-align: center;
  background: var(--accent);
  font-style: normal;
  font-size: 12px;
}

html[lang="en"] .shop-card {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 8px 10px;
  min-height: 72px;
  padding: 10px;
}

html[lang="en"] .shop-card .shop-icon {
  width: 38px;
  height: 38px;
  font-size: 20px;
}

html[lang="en"] .shop-card strong,
html[lang="en"] .shop-card small {
  overflow-wrap: anywhere;
}

html[lang="en"] .shop-card em {
  grid-column: 2;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px;
  font-size: 11px;
  white-space: normal;
}

.money-shop-grid .shop-card em {
  color: #8a5d00;
  background: #fff0bd;
}

.premium-shop-grid .shop-card em,
.shop-card.premium-card em {
  background: #e9781f;
}

.home-ranking h2 {
  margin-top: 2px;
  font-size: 19px;
}

.play-screen {
  position: relative;
  gap: 4px;
  overflow: hidden;
  padding-top: calc(env(safe-area-inset-top) + 8px);
  background:
    linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(241, 246, 252, 0.98));
}

.play-screen .score-board {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  padding: 0 8px 4px;
}

.play-screen .score-board div {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 29px;
  padding: 3px 5px;
  border-radius: 11px;
  border-color: rgba(214, 225, 239, 0.9);
  background: rgba(255, 255, 255, 0.92);
}

.play-screen .score-board strong {
  display: inline-block;
  margin-top: 0;
  color: #111a2e;
  font-size: 13px;
}

.play-screen .score-board .label {
  color: #75839a;
  font-size: 9px;
}

.play-screen .score-board div:first-child strong {
  color: #256ee8;
}

.play-screen .score-board div:nth-child(2) strong {
  color: #e9781f;
}

.play-screen .score-board div:nth-child(3) strong {
  color: #2f8a55;
}

.play-screen .timer-cell {
  flex: 1.18 1 0;
  padding-right: 3px;
}

.score-menu-btn {
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #1e293b;
  background: rgba(226, 232, 240, 0.96);
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
}

.score-menu-btn:active {
  transform: translateY(1px);
}

.score-menu-btn[hidden] {
  display: none;
}

.modal-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.app-update-card {
  overflow: hidden;
  gap: 12px;
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 16%, rgba(59, 130, 246, 0.2), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: 0 26px 70px rgba(15, 31, 63, 0.26);
}

.app-update-visual {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 84px;
  height: 74px;
  pointer-events: none;
}

.update-orb {
  position: absolute;
  right: 0;
  bottom: 5px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f7cff, #20b486);
  box-shadow: 0 14px 24px rgba(42, 98, 202, 0.24);
}

.update-orb::before,
.update-orb::after {
  content: "";
  position: absolute;
  top: 21px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.update-orb::before {
  left: 15px;
}

.update-orb::after {
  left: 27px;
}

.update-document {
  position: absolute;
  left: 6px;
  top: 0;
  width: 42px;
  height: 54px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #dfeaff);
  border: 1px solid rgba(79, 124, 255, 0.18);
  box-shadow: 0 12px 24px rgba(33, 61, 120, 0.16);
  transform: rotate(-7deg);
}

.update-document::before,
.update-document::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 4px;
  border-radius: 99px;
  background: rgba(79, 124, 255, 0.28);
}

.update-document::before {
  top: 17px;
}

.update-document::after {
  top: 29px;
}

.app-update-badge {
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(79, 124, 255, 0.12);
  color: #2356c8;
  font-size: 11px;
  font-weight: 900;
}

.app-update-card h2 {
  position: relative;
  z-index: 1;
  max-width: 230px;
  margin: 0;
  color: #111a2e;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1.22;
}

.app-update-card .modal-copy {
  max-width: 286px;
  color: #556173;
  font-size: 13px;
  line-height: 1.55;
}

.app-update-version {
  margin: 0;
  color: #7a8699;
  font-size: 12px;
  font-weight: 800;
}

.app-update-actions {
  grid-template-columns: 0.8fr 1.2fr;
}

.app-modal.is-required .app-update-actions {
  grid-template-columns: 1fr;
}

.app-modal.is-required #appUpdateLaterBtn {
  display: none;
}

.pass-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #f4f7fb;
}

.pass-price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pass-price strong {
  font-size: 22px;
}

.pass-modal {
  display: grid;
  gap: 13px;
}

.pass-visual {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 209, 102, 0.62);
  border-radius: 20px;
  padding: 18px 14px 16px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 14%, rgba(255, 255, 255, 0.26), transparent 30%),
    linear-gradient(135deg, #273c75, #276aff 46%, #20b486);
  box-shadow: 0 18px 36px rgba(39, 106, 255, 0.22);
}

.pass-visual::before,
.pass-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.pass-visual::before {
  top: -42px;
  right: -34px;
  width: 126px;
  height: 126px;
  background: rgba(255, 209, 102, 0.28);
}

.pass-visual::after {
  bottom: -46px;
  left: -32px;
  width: 118px;
  height: 118px;
  background: rgba(255, 255, 255, 0.16);
}

.pass-orbit {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pass-orbit span {
  display: inline-flex;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  font-size: 14px;
  font-weight: 1000;
}

.pass-orbit span:nth-child(2) {
  width: 58px;
  height: 58px;
  border-color: rgba(255, 209, 102, 0.9);
  background: linear-gradient(135deg, #fff2a8, #ffd166);
  color: #3d2b00;
  font-size: 30px;
}

.pass-visual strong,
.pass-visual small {
  position: relative;
  z-index: 1;
  display: block;
}

.pass-visual strong {
  font-size: 20px;
  font-weight: 1000;
}

.pass-visual small {
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 900;
}

.pass-modal .button-row {
  grid-template-columns: 1.35fr 0.65fr;
}

.pass-buy-btn {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 50px;
  padding: 7px 10px;
  white-space: normal;
}

.pass-buy-btn strong,
.pass-buy-btn small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pass-buy-btn strong {
  font-size: 14px;
  line-height: 1.05;
}

.pass-buy-btn small {
  font-size: 10px;
  line-height: 1.2;
}

body.theme-dark .player-card,
body.theme-dark .home-ranking,
body.theme-dark .item-btn,
body.theme-dark .checkpoint-card,
body.theme-dark .collection-card,
body.theme-dark .daily-panel,
body.theme-dark .scenario-panel,
body.theme-dark .home-dock,
body.theme-dark .special-guide-section,
body.theme-dark .shop-section,
body.theme-dark .pass-price,
body.theme-dark .shop-balance,
body.theme-dark .collection-summary,
body.theme-dark .collection-purpose,
body.theme-dark .result-review {
  background: var(--panel);
}

body.theme-dark .mission-row,
body.theme-dark .attendance-track,
body.theme-dark .attendance-day,
body.theme-dark .choice-option,
body.theme-dark .collection-item,
body.theme-dark .shop-route-card {
  background: #151923;
}

body.theme-dark .collection-purpose strong,
body.theme-dark .shop-route-card strong {
  color: var(--ink);
}

body.theme-dark .collection-purpose small,
body.theme-dark .collection-purpose span,
body.theme-dark .shop-route-card small {
  color: var(--muted);
}

body.theme-dark .shop-card {
  color: var(--ink);
  background: #151923;
}

body.theme-dark .money-shop-grid .shop-card {
  background: #1b2230;
}

body.theme-dark .shop-header-balance {
  border-color: rgba(255, 211, 87, 0.42);
  color: #ffe17a;
  background: #382e12;
}

body.theme-dark .shop-entry-card {
  background: var(--panel);
}

body.theme-dark .shop-entry-icon,
body.theme-dark .shop-icon {
  background: #151923;
}

body.theme-dark .ranking-tabs button {
  background: #151923;
}

body.theme-dark .ticket-pill {
  color: #151923;
  background: #f5f7fb;
}

body.theme-dark {
  --bg: #101621;
  --panel: #1b2433;
  --paper: #151d2b;
  --ink: #f4f7fb;
  --muted: #a9b6ca;
  --line: rgba(141, 160, 190, 0.28);
  --note: #202a3c;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 10%, rgba(79, 124, 255, 0.18), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(32, 180, 134, 0.12), transparent 28%),
    linear-gradient(180deg, #080c13 0%, #101621 54%, #151b26 100%);
}

body.theme-dark .phone {
  border-color: rgba(150, 170, 205, 0.28);
  color: var(--ink);
  background: linear-gradient(180deg, #182131, #111827);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.theme-dark .screen,
body.theme-dark .home-screen,
body.theme-dark .play-screen {
  color: var(--ink);
  background: linear-gradient(180deg, #121a28 0%, #0f1622 100%);
}

body.theme-dark :where(
  h1,
  h2,
  h3,
  h4,
  p,
  label,
  .topbar,
  .player-info,
  .menu-sheet,
  .modal-card,
  .menu-section,
  .memo-app,
  .memo-header,
  .memo-list,
  .input-zone,
  .ranking-list li,
  .collection-card,
  .collection-item,
  .collection-files div,
  .daily-panel,
  .mission-row,
  .attendance-track,
  .attendance-day,
  .shop-section,
  .shop-card,
  .shop-entry-card,
  .shop-route-card,
  .result-review,
  .info-grid div,
  .result-grid div,
  .choice-option,
  .checkpoint-card,
  .work-setup-card,
  .scenario-panel,
  .home-ranking
) {
  color: var(--ink);
}

body.theme-dark :where(
  small,
  .label,
  .eyebrow,
  .muted,
  .section-title-row span,
  .memo-header small,
  .memo-backlog small,
  .ranking-list small,
  .collection-card small,
  .collection-progress span,
  .collection-summary span,
  .collection-purpose small,
  .collection-purpose span,
  .shop-route-card small,
  .shop-card small,
  .shop-balance,
  .pass-price,
  .info-grid span,
  .result-grid span,
  .sheet-header small
) {
  color: var(--muted);
}

body.theme-dark :where(
  .memo-app,
  .player-card,
  .home-ranking,
  .checkpoint-card,
  .collection-card,
  .daily-panel,
  .scenario-panel,
  .special-guide-section,
  .shop-section,
  .shop-entry-card,
  .modal-card,
  .menu-sheet,
  .result-review
) {
  border-color: rgba(141, 160, 190, 0.24);
  background: linear-gradient(180deg, #1b2433, #151d2b);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

body.theme-dark :where(
  .menu-section,
  .mission-row,
  .attendance-track,
  .attendance-day,
  .choice-option,
  .collection-item,
  .collection-files div,
  .collection-summary,
  .collection-purpose,
  .shop-route-card,
  .shop-card,
  .money-shop-grid .shop-card,
  .info-grid div,
  .result-grid div
) {
  border-color: rgba(141, 160, 190, 0.22);
  background: #111827;
}

body.theme-dark .sheet-header,
body.theme-dark .memo-header,
body.theme-dark .input-zone {
  border-color: rgba(141, 160, 190, 0.24);
  background: rgba(25, 34, 49, 0.94);
}

body.theme-dark :where(input, textarea, select) {
  border-color: rgba(141, 160, 190, 0.36);
  color: var(--ink);
  background: #0f1622;
}

body.theme-dark :where(input, textarea)::placeholder {
  color: rgba(169, 182, 202, 0.74);
}

body.theme-dark .ghost-btn {
  color: var(--ink);
  background: #253047;
}

body.theme-dark .memo-list {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 120px),
    repeating-linear-gradient(0deg, rgba(141, 160, 190, 0.08) 0 1px, transparent 1px 42px);
}

body.theme-dark .memo-item {
  border-color: rgba(141, 160, 190, 0.32);
  color: var(--ink);
  background: linear-gradient(180deg, #263247, #202a3c);
  box-shadow: 0 7px 13px rgba(0, 0, 0, 0.16);
}

body.theme-dark .memo-backlog {
  border-color: rgba(141, 160, 190, 0.34);
  color: var(--ink);
  background: rgba(17, 24, 39, 0.92);
}

body.theme-dark .memo-item.boss,
body.theme-dark .memo-item.surge,
body.theme-dark .memo-item[class*="special-"] {
  color: var(--ink);
  background: linear-gradient(180deg, #263247, #1d2637);
}

body.theme-dark .memo-item.boss {
  border-color: rgba(228, 111, 64, 0.76);
}

body.theme-dark .memo-item.boss.summarized,
body.theme-dark .memo-item.special-bomb,
body.theme-dark .memo-item.special-calm,
body.theme-dark .memo-item.special-meetingCancel,
body.theme-dark .memo-item.special-approvalPass,
body.theme-dark .memo-item.special-keyClean,
body.theme-dark .memo-item.special-skillClean {
  background: linear-gradient(180deg, rgba(32, 180, 134, 0.2), #1b2b32);
}

body.theme-dark .memo-item.surge,
body.theme-dark .memo-item.special-payday,
body.theme-dark .memo-item.special-rank-sss,
body.theme-dark .memo-item.special-rank-ss {
  background: linear-gradient(180deg, rgba(242, 185, 31, 0.22), #2b2730);
}

body.theme-dark .memo-item.special-urgent,
body.theme-dark .memo-item.special-bad,
body.theme-dark .memo-item.special-rework,
body.theme-dark .memo-item.special-trap,
body.theme-dark .memo-item.special-decoyMemo,
body.theme-dark .memo-item.special-auditMemo,
body.theme-dark .memo-item.special-delayMemo,
body.theme-dark .memo-item.special-overtimeTrap,
body.theme-dark .memo-item.special-priorityTrap {
  background: linear-gradient(180deg, rgba(239, 106, 91, 0.2), #2a202c);
}

body.theme-dark .checkbox {
  border-color: rgba(169, 182, 202, 0.62);
  background: #111827;
}

body.theme-dark .ai-slot {
  border-color: rgba(112, 151, 255, 0.68);
  color: #dbe7ff;
  background: #17233a;
}

body.theme-dark .ranking-tabs button {
  color: var(--muted);
  background: #111827;
}

body.theme-dark .ranking-tabs button.active,
body.theme-dark .ranking-list .me {
  color: #ffffff;
}

body.theme-dark .ranking-avatar,
body.theme-dark .profile-avatar,
body.theme-dark .shop-entry-icon,
body.theme-dark .shop-icon {
  border-color: rgba(141, 160, 190, 0.26);
  background: linear-gradient(180deg, #263247, #182132);
}

body.theme-dark .ticket-pill {
  color: #101621;
  background: #f4f7fb;
}

body.keyboard-open .effect-strip {
  display: none !important;
}

body.keyboard-open .overload-curtain {
  top: calc(env(safe-area-inset-top) + 36px);
  left: 10px;
  right: 10px;
  padding: 9px 12px;
  border-radius: 14px;
}

body.keyboard-open .overload-curtain strong {
  font-size: 14px;
}

body.keyboard-open .overload-curtain span {
  font-size: 11px;
}

body.keyboard-open .phone {
  height: 100svh;
  max-height: 100svh;
}

body.keyboard-open .screen {
  min-height: 0;
}

body.keyboard-open .play-screen {
  min-height: 0;
  padding-top: calc(env(safe-area-inset-top) + 6px);
  padding-bottom: var(--keyboard-inset);
  overflow: hidden;
}

body.keyboard-open .profile-strip,
body.keyboard-open .control-panel,
body.keyboard-open .scenario-panel,
body.keyboard-open .skill-strip,
body.keyboard-open .play-mission,
body.keyboard-open .item-hint {
  display: none !important;
}

body.keyboard-open .score-board {
  display: flex;
  gap: 4px;
  padding: 0 6px 4px;
}

body.keyboard-open .score-board div {
  flex: 1 1 0;
  min-height: 24px;
  padding: 2px 4px;
  border-radius: 8px;
  box-shadow: none;
}

body.keyboard-open .score-board strong {
  margin-top: 0;
  font-size: 11px;
}

body.keyboard-open .score-board .label {
  font-size: 8px;
}

body.keyboard-open .item-bar {
  gap: 5px;
  padding: 0 6px 4px;
}

body.keyboard-open .item-btn {
  min-height: 30px;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 10px;
  box-shadow: none;
}

body.keyboard-open .item-btn span {
  font-size: 10px;
}

body.keyboard-open .item-btn strong {
  min-width: 18px;
  height: 18px;
  font-size: 10px;
}

body.keyboard-open .boss-panel {
  top: calc(env(safe-area-inset-top) + 60px);
  left: 8px;
  right: 8px;
  padding: 7px 9px;
}

body.keyboard-open .memo-app {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 6px calc(4px + var(--play-bottom-safe));
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 14px 14px 0 0;
}

body.keyboard-open .memo-header {
  min-height: 26px;
  padding: 3px 8px;
}

body.keyboard-open .memo-header::before {
  content: "업무량";
  color: #75839a;
  font-size: 10px;
  font-weight: 1000;
  white-space: nowrap;
}

body.keyboard-open .memo-header .eyebrow,
body.keyboard-open .memo-header h2,
body.keyboard-open .memo-header small {
  display: none;
}

body.keyboard-open .memo-tools {
  max-width: none;
  margin-left: auto;
}

body.keyboard-open .memo-count {
  min-width: 72px;
  max-width: 146px;
  height: 22px;
  padding: 0 6px;
  font-size: 9px;
}

body.keyboard-open .ai-slot {
  width: 24px;
  height: 21px;
  padding: 0;
}

body.keyboard-open .memo-list {
  gap: 5px;
  padding: 7px 8px;
  min-height: 0;
  overscroll-behavior: contain;
}

body.keyboard-open .memo-item {
  grid-template-columns: 20px 1fr;
  min-height: 31px;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 12px;
}

body.keyboard-open .memo-backlog {
  min-height: 29px;
  padding: 5px 8px;
  font-size: 11px;
}

body.keyboard-open .memo-backlog small {
  font-size: 9px;
}

body.keyboard-open .checkbox {
  width: 16px;
  height: 16px;
  border-radius: 5px;
}

body.keyboard-open .input-zone {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 6px 8px calc(6px + var(--play-bottom-safe));
}

body.keyboard-open .input-zone input {
  min-height: 34px;
  border-radius: 10px;
  font-size: 13px;
}

/* PDF UI/UX refresh 2026-06-11: mobile game lobby + pressure-first play screen */
:root {
  --game-blue: #276aff;
  --game-cyan: #13b8a6;
  --game-gold: #ffc94d;
  --game-red: #ff5268;
  --game-charcoal: #111827;
  --game-surface: rgba(255, 255, 255, 0.95);
  --game-soft: #f5f8fc;
}

.phone {
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 252, 0.98));
  box-shadow:
    0 28px 90px rgba(26, 43, 77, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.front-creator-btn small {
  display: none;
}

.front-creator-btn {
  width: min(100%, 206px);
  min-height: 44px;
  border-radius: 18px;
}

.home-screen {
  gap: 7px;
  padding: 0 10px 8px;
  background:
    radial-gradient(circle at 16% 4%, rgba(39, 106, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #f1f6fc 58%, #eaf1f8 100%);
}

.home-hero {
  min-height: 172px;
  border-radius: 24px;
  padding: 15px 14px 13px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 201, 77, 0.42), transparent 21%),
    radial-gradient(circle at 76% 76%, rgba(19, 184, 166, 0.32), transparent 32%),
    linear-gradient(135deg, #111827 0%, #223b78 52%, #0b8f7c 122%);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.24);
}

.home-hero::before {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #ffffff, #dcecff);
  box-shadow: 0 18px 28px rgba(3, 12, 31, 0.22);
  transform: rotate(7deg);
  opacity: 0.95;
}

.home-hero::after {
  right: 23px;
  top: 40px;
  bottom: auto;
  width: 38px;
  height: 26px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 50%, #ffffff 0 4px, transparent 5px),
    radial-gradient(circle at 54% 50%, #ffffff 0 4px, transparent 5px),
    radial-gradient(circle at 78% 50%, #ffffff 0 4px, transparent 5px),
    linear-gradient(135deg, #7cc8ff, #276aff);
  transform: none;
  box-shadow: 0 12px 18px rgba(3, 12, 31, 0.2);
}

.briefing-copy {
  padding-right: 108px;
}

.briefing-copy span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.home-hero h2 {
  max-width: 220px;
  margin-top: 7px;
  font-size: 26px;
  line-height: 1.05;
}

.home-hero small {
  max-width: 230px;
  color: rgba(255, 255, 255, 0.82);
}

.briefing-visual {
  display: none;
}

.briefing-stack {
  gap: 8px;
}

.briefing-stack div {
  min-height: 70px;
  border-radius: 17px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.14);
}

.player-card {
  grid-template-columns: 50px 1fr auto;
  padding: 9px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
  box-shadow: 0 12px 26px rgba(39, 57, 91, 0.08);
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.player-card strong {
  font-size: 19px;
}

.ticket-pill {
  min-width: 58px;
  min-height: 54px;
  border-radius: 17px;
  background:
    linear-gradient(135deg, #111827, #263a65 62%, #276aff);
}

.start-cta {
  min-height: 76px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #5277ff 0%, #276aff 48%, #13b8a6 125%);
  box-shadow:
    0 9px 0 #153b9a,
    0 22px 34px rgba(39, 106, 255, 0.28);
}

.start-cta strong {
  font-size: 25px;
  line-height: 1.05;
}

.start-cta small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}

.start-play-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  color: #276aff;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 18px rgba(3, 12, 31, 0.16);
}

.work-setup-card,
.collection-card {
  border: 1px solid rgba(223, 231, 240, 0.9);
  border-radius: 19px;
  background: var(--game-surface);
  box-shadow: 0 11px 24px rgba(39, 57, 91, 0.07);
}

.work-setup-card {
  padding: 11px 12px;
}

.setup-grid {
  gap: 7px;
}

.setup-grid div {
  border-radius: 14px;
  background: #f3f7fc;
}

.collection-card {
  overflow: hidden;
  padding: 12px;
}

.collection-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 201, 77, 0.16), transparent 42%);
}

.collection-head,
.collection-progress,
.collection-files {
  position: relative;
  z-index: 1;
}

.collection-folder {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff2bd;
  box-shadow: inset 0 -5px 0 rgba(255, 201, 77, 0.25);
}

.collection-progress em {
  color: #ffffff;
  background: linear-gradient(135deg, #d99a12, #ffc94d);
}

.collection-files {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.home-dock {
  border-radius: 22px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -14px 30px rgba(27, 39, 58, 0.1);
}

.home-dock button {
  min-height: 49px;
  border-radius: 17px;
}

.home-dock button:active,
.shop-card:active,
.item-btn:active {
  transform: translateY(2px) scale(0.99);
}

.play-screen {
  gap: 3px;
  padding-top: calc(env(safe-area-inset-top) + 10px);
  background:
    radial-gradient(circle at 50% -6%, rgba(39, 106, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #f9fcff 0%, #edf4fb 100%);
}

.play-screen .score-board {
  gap: 5px;
  padding: 0 8px 4px;
  align-items: center;
}

.play-screen .score-board div {
  min-height: 27px;
  border: 1px solid rgba(217, 226, 239, 0.84);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 14px rgba(39, 57, 91, 0.05);
}

.play-screen .score-board > div:not(.timer-cell) {
  flex: 0 0 clamp(58px, 18vw, 74px);
}

.score-menu-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #263a65);
}

.item-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 8px 5px;
}

.item-btn {
  min-height: 41px;
  border: 1px solid rgba(219, 228, 240, 0.9);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(39, 57, 91, 0.07);
}

.item-btn span {
  font-size: 11px;
  font-weight: 1000;
}

.item-btn strong {
  min-width: 23px;
  height: 23px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #276aff);
}

.memo-app {
  margin: 0 8px 8px;
  border: 1px solid rgba(214, 224, 238, 0.94);
  border-radius: 20px;
  background:
    linear-gradient(180deg, #ffffff, #fffaf0);
  box-shadow: 0 16px 38px rgba(39, 57, 91, 0.1);
}

.memo-header {
  min-height: 54px;
  padding: 8px 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 252, 0.94));
}

.memo-header h2 {
  font-size: 16px;
}

.memo-count {
  min-width: 80px;
  height: 25px;
  background: linear-gradient(135deg, #111827, #263a65);
}

.ai-slot {
  width: 31px;
  height: 26px;
  border-color: rgba(39, 106, 255, 0.62);
  background: #edf5ff;
}

.memo-list {
  gap: 6px;
  padding: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent),
    repeating-linear-gradient(0deg, rgba(202, 178, 111, 0.08) 0 1px, transparent 1px 42px);
}

.memo-item {
  min-height: 38px;
  border-color: rgba(218, 207, 164, 0.84);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #fffefa, #fff5cf);
  box-shadow:
    0 8px 16px rgba(155, 139, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.memo-item.special {
  border-width: 2px;
}

.memo-item.special::after {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  width: 4px;
  border-radius: 999px;
  background: var(--rank-main, #4f7cff);
}

.memo-item.special-bad::after {
  background: repeating-linear-gradient(45deg, #ff5268 0 4px, #ffb088 4px 8px);
}

.memo-item.special-gearBox {
  border-color: #ff9c2b;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), transparent 44%),
    linear-gradient(135deg, #fff0d8, #ffffff);
}

.memo-item.special-gearBox::after {
  background: #ff9c2b;
}

.memo-rank {
  min-width: 30px;
  height: 18px;
  display: inline-grid;
  place-items: center;
}

.memo-badge {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.checkbox {
  border-radius: 7px;
}

body.memo-hit .memo-app {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(39, 57, 91, 0.13);
}

body.memo-hit .input-zone input {
  border-color: rgba(19, 184, 166, 0.9);
  box-shadow: 0 0 0 4px rgba(19, 184, 166, 0.14);
}

.memo-item.checked {
  animation: checkedOut 440ms ease forwards;
}

.input-zone {
  padding: 8px 9px calc(8px + var(--play-bottom-safe));
  background: rgba(255, 255, 255, 0.96);
}

.input-zone input {
  min-height: 43px;
  border-radius: 14px;
  font-family: "D2Coding", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
}

.app-modal .modal-card,
.app-modal .menu-sheet {
  border: 1px solid rgba(229, 236, 246, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.24);
}

.result-modal {
  overflow: hidden;
}

.app-modal .result-modal {
  max-height: min(96%, 690px);
}

.result-modal h2 {
  font-size: 25px;
}

.result-summary {
  border: 1px solid rgba(39, 106, 255, 0.16);
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 40%),
    linear-gradient(135deg, #edf5ff, #eafbf5);
}

.result-grid {
  gap: 7px;
  margin-top: 10px;
}

.result-grid div {
  border: 1px solid rgba(224, 232, 244, 0.86);
  border-radius: 16px;
  background: #f7faff;
}

.reward-card {
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(135deg, #fff0a8, #fffdf0);
}

.result-actions {
  gap: 7px;
}

.result-actions .primary-btn {
  min-height: 46px;
  border-radius: 16px;
}

.shop-hero {
  border-radius: 20px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 201, 77, 0.38), transparent 25%),
    linear-gradient(135deg, #111827, #276aff 58%, #13b8a6);
}

.shop-route-card,
.shop-card,
.shop-entry-card {
  border-radius: 17px;
  box-shadow: 0 10px 20px rgba(39, 57, 91, 0.06);
}

.money-shop-grid .shop-card {
  border-color: rgba(255, 201, 77, 0.45);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), transparent 40%),
    #fff9df;
}

.premium-shop-grid .shop-card,
.shop-card.premium-card {
  border-color: rgba(39, 106, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), transparent 40%),
    #edf5ff;
}

.special-guide-list span {
  border-radius: 14px;
}

.special-guide-list .bad-guide-item {
  border-color: rgba(255, 82, 104, 0.3);
  background:
    repeating-linear-gradient(45deg, rgba(255, 82, 104, 0.05) 0 6px, transparent 6px 12px),
    #fff7f6;
}

body.keyboard-open .play-screen {
  padding-top: calc(env(safe-area-inset-top) + 10px);
}

/* Play HUD fix: keep active special memo levels beside memo count */
.memo-tools {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  max-width: 74%;
  min-width: 0;
  margin-block: -4px;
  padding-block: 4px;
  overflow: visible;
}

.memo-tools .memo-count {
  flex: 0 0 auto;
  white-space: nowrap;
}

.memo-tools .skill-strip {
  position: static;
  inset: auto;
  z-index: auto;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  max-width: 210px;
  margin-block: -4px;
  padding-block: 4px;
  overflow: visible;
  pointer-events: none;
}

.memo-tools .skill-strip[hidden] {
  display: none;
}

.memo-tools .skill-strip span {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 70px;
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 9px;
  font-size: 8.8px;
  line-height: 1;
  text-overflow: ellipsis;
  letter-spacing: 0;
}

.memo-tools .skill-strip span.using {
  transform: translateY(-2px);
  animation: skillChipGlow 620ms ease-in-out infinite;
}

body.keyboard-open .memo-tools {
  max-width: 76%;
}

body.keyboard-open .memo-tools .skill-strip {
  display: flex !important;
}

body.keyboard-open .memo-tools .skill-strip[hidden] {
  display: none !important;
}

body.keyboard-open .memo-tools .skill-strip span {
  max-width: 62px;
  padding: 3px 5px;
  font-size: 8.2px;
}

/* Result modal fix: keep action buttons visible on phone-sized screens */
.app-modal .result-modal {
  width: min(360px, calc(100vw - 22px));
  max-height: min(88vh, 640px);
  gap: 7px;
  overflow: hidden;
  padding: 14px;
}

.result-modal h2 {
  font-size: 20px;
  line-height: 1.05;
}

.result-modal .eyebrow {
  font-size: 10px;
}

.result-summary,
.result-modal .result-review,
.result-modal .reward-card,
.result-modal .result-unlock {
  margin-top: 0;
  padding: 8px 9px;
  border-radius: 13px;
}

.result-modal .result-review {
  gap: 2px;
}

.result-modal .result-review strong {
  font-size: 13px;
}

.result-modal .result-review small,
.result-modal .result-unlock small {
  font-size: 10px;
  line-height: 1.25;
}

.result-modal .reward-card-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.result-modal .reward-mini-card {
  grid-template-columns: 24px 1fr;
  gap: 5px;
  padding: 5px 6px;
}

.result-modal .reward-mini-card b {
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 9px;
}

.result-modal .reward-mini-card strong {
  font-size: 11px;
}

.result-modal .reward-mini-card small {
  display: none;
}

.result-modal .result-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 0;
}

.result-modal .result-grid div {
  min-width: 0;
  padding: 6px 5px;
  border-radius: 11px;
}

.result-modal .result-grid span {
  font-size: 9.5px;
  line-height: 1.1;
}

.result-modal .result-grid strong {
  margin-top: 2px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-modal .result-extra {
  display: none;
}

.result-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
  padding-top: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.98) 30%);
}

.result-actions .primary-btn,
.result-actions .ghost-btn {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 13px;
  font-size: 11.5px;
  line-height: 1.15;
  white-space: normal;
}

#reviveBtn.revive-available:not(:disabled) {
  border-color: #e99012;
  color: #ffffff;
  background: linear-gradient(135deg, #ffad24, #ed7411);
  box-shadow: 0 8px 18px rgba(237, 116, 17, 0.25);
}

#reviveBtn:disabled {
  border-color: #d7dde7;
  color: #8b96a8;
  background: #edf1f6;
  box-shadow: none;
}

/* Final lobby flow pass: setup first, commute CTA second */
.topbar {
  align-items: center;
  min-height: 78px;
  padding: 9px 13px 7px;
}

.topbar .eyebrow {
  display: none;
}

.topbar h1 {
  font-size: 18px;
  line-height: 1.1;
}

.top-status {
  gap: 4px;
  margin-top: 5px;
}

.top-status span {
  min-height: 22px;
  padding: 3px 7px;
}

.top-status b {
  font-size: 9px;
}

.top-status strong {
  font-size: 11px;
}

.topbar .icon-btn {
  width: 39px;
  height: 39px;
  border-radius: 16px;
}

.home-screen {
  gap: 6px;
  padding-inline: 10px;
}

.home-screen > .home-hero {
  order: 1;
}

.home-screen > .player-card {
  order: 2;
}

.home-screen > .login-card {
  order: 3;
}

.home-hero {
  min-height: 142px;
  max-height: 154px;
  padding: 12px 13px 11px;
  border-radius: 20px;
}

.home-hero::before {
  right: 14px;
  top: 14px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.home-hero::after {
  right: 30px;
  top: 31px;
  width: 30px;
  height: 21px;
}

.briefing-copy {
  padding-right: 82px;
}

.briefing-copy span {
  font-size: 10px;
}

.home-hero h2 {
  margin: 3px 0;
  font-size: 19px;
  line-height: 1.1;
}

.home-hero small {
  font-size: 10px;
  line-height: 1.2;
}

.briefing-visual {
  display: none;
}

.briefing-stack {
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 2px;
}

.briefing-stack div {
  min-height: 44px;
  padding: 7px 8px;
  border-radius: 14px;
}

.briefing-stack span {
  font-size: 9px;
}

.briefing-stack strong {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.18;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.briefing-stack em {
  right: 8px;
  bottom: 6px;
  font-size: 9px;
}

.player-card {
  min-height: 78px;
  padding: 10px 11px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.ticket-pill.profile-grade-pill {
  min-width: 54px;
  min-height: 50px;
  padding: 7px;
}

.work-setup-card {
  order: 4;
  padding: 9px 10px;
  border-radius: 17px;
}

.home-screen > .item-stock-card {
  order: 5;
}

.home-actions {
  order: 6;
}

.home-screen > .collection-card {
  order: 7;
}

.home-screen > .home-dock {
  order: 8;
}

.setup-head {
  gap: 8px;
}

.setup-head strong {
  font-size: 15px;
}

.setup-head small {
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.22;
}

.setup-grid div {
  min-height: 35px;
  padding: 5px 7px;
}

.work-setup-card select {
  min-height: 30px;
  margin-top: 6px;
}

.start-cta {
  min-height: 72px;
  border-radius: 21px;
  box-shadow: 0 9px 0 #153b9a, 0 17px 28px rgba(39, 106, 255, 0.26);
}

.start-cta strong {
  font-size: 22px;
}

.start-play-icon {
  width: 44px;
  height: 44px;
}

.memo-app {
  position: relative;
}

.memo-app.skill-pulse {
  box-shadow: 0 0 0 3px rgba(255, 201, 77, 0.22), 0 18px 42px rgba(39, 57, 91, 0.14);
}

.memo-app.skill-pulse::after {
  content: attr(data-skill-pulse);
  position: absolute;
  top: 47px;
  right: 10px;
  z-index: 9;
  max-width: calc(100% - 20px);
  padding: 6px 9px;
  border-radius: 999px;
  color: #172033;
  background: linear-gradient(135deg, #fff4bf, #ffffff);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.16);
  font-size: 11px;
  font-weight: 1000;
  pointer-events: none;
  animation: skillBadgePop 780ms ease-in-out infinite;
}

.memo-app.skill-pulse-clean::after {
  background: linear-gradient(135deg, #dcfff1, #ffffff);
}

.memo-app.skill-pulse-auto::after {
  background: linear-gradient(135deg, #dfeaff, #ffffff);
}

.memo-app.skill-pulse-combo::after {
  background: linear-gradient(135deg, #ffe5e2, #ffffff);
}

.memo-app.skill-pulse-flow::after,
.memo-app.skill-pulse-proof::after {
  background: linear-gradient(135deg, #efeaff, #ffffff);
}

.memo-app.skill-pulse-magnet::after,
.memo-app.skill-pulse-bank::after {
  background: linear-gradient(135deg, #fff0c8, #ffffff);
}

@keyframes skillBadgePop {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.035);
  }
}

body.keyboard-open .score-board {
  padding: 0 8px 4px;
}

body.keyboard-open .score-board div {
  min-height: 25px;
  border-radius: 10px;
}

body.keyboard-open .item-bar {
  padding: 0 8px 4px;
}

body.keyboard-open .item-btn {
  min-height: 32px;
  border-radius: 11px;
}

body.keyboard-open .memo-app {
  margin: 0 6px calc(4px + var(--play-bottom-safe));
  border-radius: 16px 16px 0 0;
}

body.keyboard-open .memo-header {
  min-height: 28px;
  padding: 4px 8px;
}

body.keyboard-open .memo-header::before {
  content: "업무 메모";
}

body.keyboard-open .memo-list {
  gap: 5px;
  padding: 7px 8px;
}

body.keyboard-open .memo-item {
  min-height: 32px;
  border-radius: 11px;
  font-size: 12.5px;
}

body.keyboard-open .input-zone input {
  min-height: 36px;
  font-size: 13.5px;
}

@media (max-width: 860px) {
  .app-shell {
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: 0;
  }

  .home-screen {
    padding-top: 0;
  }
}

/* UI correction pass: neutral avatar, calmer CTA, file cabinet in bottom tab */
.home-screen,
.memo-list,
.menu-sheet,
.app-modal .modal-card {
  scrollbar-width: none;
}

.home-screen::-webkit-scrollbar,
.memo-list::-webkit-scrollbar,
.menu-sheet::-webkit-scrollbar,
.app-modal .modal-card::-webkit-scrollbar {
  display: none;
}

.profile-avatar {
  position: relative;
  border: 1px solid rgba(204, 216, 234, 0.9);
  background:
    linear-gradient(180deg, #ffffff, #eef5ff);
  cursor: default;
  overflow: hidden;
}

.profile-avatar:hover,
.profile-avatar:disabled {
  opacity: 1;
  box-shadow: none;
}

.profile-avatar .avatar-face {
  display: none;
}

.avatar-person {
  position: relative;
  display: block;
  width: 31px;
  height: 34px;
}

.avatar-person::before,
.avatar-person::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.avatar-person::before {
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
}

.avatar-person::after {
  bottom: 0;
  width: 30px;
  height: 17px;
  border-radius: 15px 15px 8px 8px;
}

.avatar-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: inherit;
}

.profile-avatar.has-photo .avatar-person {
  display: none;
}

.profile-avatar em {
  display: none;
}

.front-start-btn {
  min-height: 68px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 36%),
    linear-gradient(135deg, #2563ff 0%, #0ea5e9 55%, #14b8a6 118%);
  font-size: 21px;
  text-shadow: none;
  box-shadow: 0 9px 0 #12328a, 0 19px 24px rgba(3, 12, 31, 0.28);
}

.front-start-btn strong {
  font-size: 22px;
}

/* Built-in grade profile picker */
.profile-avatar {
  cursor: pointer;
}

.profile-avatar:hover {
  box-shadow: 0 0 0 4px rgba(39, 106, 255, 0.1), inset 0 -8px 18px rgba(79, 124, 255, 0.08);
}

.profile-avatar:disabled {
  opacity: 1;
}

.profile-avatar .avatar-person,
.ranking-person {
  filter: drop-shadow(0 5px 5px rgba(25, 38, 64, 0.12));
}

.profile-avatar.avatar-variant-1 .avatar-person::before,
.ranking-person.avatar-variant-1::before {
  width: 18px;
  border-radius: 9px 9px 12px 12px;
  transform: translateX(-50%) rotate(-5deg);
}

.profile-avatar.avatar-variant-1 .avatar-person::after,
.ranking-person.avatar-variant-1::after {
  width: 25px;
  border-radius: 8px 16px 8px 16px;
}

.profile-avatar.avatar-variant-2 .avatar-person::before,
.ranking-person.avatar-variant-2::before {
  width: 15px;
  height: 15px;
  box-shadow: inset 0 -4px 0 var(--avatar-hair, #64748b), 8px 3px 0 -5px var(--avatar-hair, #64748b);
}

.profile-avatar.avatar-variant-2 .avatar-person::after,
.ranking-person.avatar-variant-2::after {
  height: 18px;
  border-radius: 999px 999px 10px 10px;
  transform: translateX(-50%) skewX(-6deg);
}

.profile-avatar.avatar-variant-3 .avatar-person::before,
.ranking-person.avatar-variant-3::before {
  top: 0;
  width: 17px;
  border-radius: 999px 999px 8px 8px;
  box-shadow: inset 0 -6px 0 var(--avatar-hair, #64748b), -7px 3px 0 -5px var(--avatar-hair, #64748b);
}

.profile-avatar.avatar-variant-3 .avatar-person::after,
.ranking-person.avatar-variant-3::after {
  width: 28px;
  height: 15px;
  border-radius: 7px 7px 16px 16px;
}

.profile-picker-card {
  width: min(92vw, 430px);
  max-height: min(82vh, 680px);
  padding: 18px;
  overflow: hidden;
}

.profile-picker-card h2 {
  margin: 0;
  color: #111827;
  font-size: 21px;
  line-height: 1.22;
}

.profile-grid {
  display: grid;
  gap: 11px;
  max-height: min(58vh, 470px);
  padding: 2px 3px 10px 0;
  overflow: auto;
  scroll-padding: 14px;
  scrollbar-width: none;
}

.profile-grid::-webkit-scrollbar {
  display: none;
}

.profile-grade-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(215, 226, 242, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.profile-grade-group.locked {
  background: rgba(244, 247, 251, 0.74);
}

.profile-grade-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-grade-title strong {
  color: #111827;
  font-size: 14px;
  font-weight: 1000;
}

.profile-grade-title span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.profile-avatar-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.profile-choice {
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 84px;
  padding: 7px 4px 8px;
  border: 1px solid rgba(213, 226, 244, 0.95);
  border-radius: 18px;
  color: #172033;
  background: linear-gradient(180deg, #ffffff, #f5f8fd);
  box-shadow: inset 0 -3px 0 rgba(39, 106, 255, 0.05);
  overflow: hidden;
}

.profile-choice .ranking-person {
  width: 30px;
  height: 31px;
}

.profile-choice-img {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  object-fit: cover;
  background: #eef5ff;
  border: 1px solid rgba(213, 226, 244, 0.92);
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.12));
}

.profile-choice span:last-child {
  color: #5b6980;
  font-size: 10px;
  font-weight: 1000;
}

.profile-choice.selected {
  border-color: #276aff;
  color: #133e9a;
  background: linear-gradient(180deg, #eef5ff, #dce9ff);
  box-shadow: 0 0 0 3px rgba(39, 106, 255, 0.14), inset 0 -3px 0 rgba(39, 106, 255, 0.1);
}

.profile-choice.locked,
.profile-choice:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

body.theme-dark .profile-picker-card,
body.theme-dark .profile-grade-group {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: linear-gradient(180deg, #202b3b, #151c29) !important;
}

body.theme-dark .profile-picker-card h2,
body.theme-dark .profile-grade-title strong {
  color: #f8fafc !important;
}

body.theme-dark .profile-grade-title span,
body.theme-dark .profile-choice span:last-child {
  color: #cbd5e1 !important;
}

body.theme-dark .profile-choice {
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #263246, #182132) !important;
}

body.theme-dark .profile-choice.selected {
  border-color: #60a5fa !important;
  background: linear-gradient(180deg, #243653, #172554) !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22), inset 0 -3px 0 rgba(96, 165, 250, 0.16) !important;
}

.front-start-btn small {
  font-size: 11px;
}

.front-start-btn:active {
  box-shadow: 0 5px 0 #153b9a, 0 11px 16px rgba(3, 12, 31, 0.24);
}

.start-cta {
  min-height: 64px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #3f7cff 0%, #276aff 56%, #13b8a6 124%);
  box-shadow: 0 7px 0 #153b9a, 0 16px 26px rgba(39, 106, 255, 0.24);
}

.start-cta strong {
  font-size: 21px;
}

.start-cta small {
  font-size: 11px;
}

.start-play-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
}

.home-screen > .collection-card,
.title-collection-card {
  display: none !important;
}

.home-dock button small {
  display: block;
  margin-top: -1px;
  color: #64748b;
  font-size: 8px;
  font-weight: 1000;
  line-height: 1;
}

.home-dock button:nth-child(2) {
  color: #ffffff;
  background: linear-gradient(135deg, #182033, #34415b);
}

.home-dock button:nth-child(4) {
  color: #173a74;
  background: linear-gradient(135deg, #eef5ff, #ffffff);
}

.home-dock button:nth-child(4) span {
  font-size: 15px;
}

.collection-purpose strong {
  font-size: 15px;
}

.phone:has(#titleScreen:not([hidden])) > .topbar {
  display: none;
}

/* Final dock override: keep every bottom tab visually equal */
.home-dock button,
.home-dock button:nth-child(2),
.home-dock button:nth-child(4) {
  color: #182033;
  border: 1px solid rgba(216, 226, 239, 0.86);
  background: linear-gradient(180deg, #ffffff, #f2f6fb);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.home-dock button span,
.home-dock button:nth-child(4) span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto 2px;
  border-radius: 9px;
  color: #276aff;
  background: #eef5ff;
  font-size: 14px;
  line-height: 1;
}

.home-dock button:nth-child(2) span {
  color: #0f766e;
  background: #e7fff6;
}

.home-dock button:nth-child(3) span {
  color: #a66a00;
  background: #fff1be;
}

.home-dock button:nth-child(4) span {
  color: #44546a;
  background: #eef2f7;
  font-size: 13px;
}

.front-title-screen {
  gap: 10px;
}

.front-visual {
  display: grid;
  place-items: center;
  min-height: 318px;
  margin: 0 -8px;
}

.front-hero-art {
  display: none;
}

.front-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 51%;
  width: 214px;
  height: 176px;
  border: 3px solid rgba(17, 24, 39, 0.92);
  border-radius: 28px;
  background:
    linear-gradient(90deg, #54e2c1 0 72px, transparent 72px) 28px 42px / 148px 13px no-repeat,
    linear-gradient(90deg, #9fb0c8 0 126px, transparent 126px) 28px 72px / 150px 10px no-repeat,
    linear-gradient(90deg, #9fb0c8 0 94px, transparent 94px) 28px 98px / 150px 10px no-repeat,
    linear-gradient(180deg, #ffffff, #eaf2ff);
  box-shadow:
    0 22px 0 rgba(4, 12, 28, 0.24),
    0 34px 48px rgba(2, 8, 23, 0.3);
  transform: translate(-50%, -50%) rotate(-2deg);
}

.front-visual::after {
  content: "✓";
  position: absolute;
  left: calc(50% + 74px);
  top: calc(51% - 64px);
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 3px solid rgba(17, 24, 39, 0.92);
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #ffd96a, #ffc94d);
  box-shadow: 0 10px 18px rgba(3, 12, 31, 0.22);
  font-size: 27px;
  font-weight: 1000;
}

.front-float-card-a {
  top: 24px;
}

.front-float-card-b {
  top: 68px;
}

.front-float-card-c {
  bottom: 32px;
}

.front-start-btn strong {
  font-size: 20px;
}

.front-start-btn {
  min-height: 60px;
}

@media (max-width: 860px) {
  .home-screen {
    padding: 0 9px 8px;
  }

  .player-card {
    padding: 10px;
  }

  .player-card strong {
    font-size: 20px;
  }

  .start-cta {
    min-height: 62px;
    border-radius: 16px;
    box-shadow: 0 7px 0 #102f83, 0 13px 22px rgba(23, 72, 200, 0.24);
  }

  .start-cta strong {
    font-size: 22px;
  }

  .home-ranking {
    min-height: 0;
  }

  .play-screen .score-board {
    padding: 0 8px 4px;
  }

  .item-bar {
    padding: 0 8px 5px;
  }
}

.runtime-announcement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 2px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 253, 245, 0.92));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.runtime-announcement strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 0;
}

.runtime-announcement small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.runtime-announcement button {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
}

.title-screen .runtime-announcement {
  margin: 4px 18px 0;
  background: rgba(255, 255, 255, 0.9);
}

.profile-grade-pill span,
.profile-grade-pill small {
  display: none;
}

.profile-grade-pill {
  min-width: 74px;
  justify-content: center;
}

.creator-card {
  position: relative;
  text-align: center;
  max-width: 320px;
}

.announcement-card {
  position: relative;
  max-width: 340px;
  text-align: left;
}

.announcement-card h2 {
  margin: 8px 0 8px;
  font-size: 24px;
  letter-spacing: 0;
}

.announcement-card .modal-copy {
  margin-bottom: 16px;
}

.announcement-card .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.creator-card h2 {
  margin: 8px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.creator-card .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

body.game-starting .start-cta,
body.game-starting .front-start-btn {
  filter: saturate(0.92);
  transform: translateY(1px);
}

/* Boss orders should inform, not cover the play field. */
.play-screen .boss-panel,
body.keyboard-open .boss-panel {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 42;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  margin: -1px 8px 2px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 185, 88, 0.72);
  border-radius: 12px;
  color: #321b05;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), transparent 44%),
    linear-gradient(135deg, #fff2c7, #ffe2d8);
  box-shadow: 0 8px 18px rgba(184, 102, 35, 0.11);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.play-screen .boss-panel[hidden],
body.keyboard-open .boss-panel[hidden] {
  display: none;
}

.play-screen .boss-panel.active,
body.keyboard-open .boss-panel.active {
  visibility: visible;
  opacity: 1;
}

.play-screen .boss-panel span,
body.keyboard-open .boss-panel span {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #c64631, #e9781f);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.play-screen .boss-panel strong,
body.keyboard-open .boss-panel strong {
  min-width: 0;
  overflow: hidden;
  color: #321b05;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.keyboard-open .boss-panel {
  min-height: 24px;
  margin: -1px 6px 2px;
  padding: 3px 7px;
  border-radius: 10px;
  box-shadow: none;
}

/* Mobile WebView polish: keep input and dialogs steady when the keyboard appears. */
.notification-consent-card {
  gap: 12px;
  padding: 22px;
  border-radius: 26px;
  text-align: center;
  background:
    radial-gradient(circle at 78% 12%, rgba(57, 160, 236, 0.2), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
}

.notification-visual {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 0 auto 2px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eaf4ff, #fff6d9);
  box-shadow: 0 12px 28px rgba(42, 88, 150, 0.16);
  font-size: 30px;
}

.notification-actions {
  grid-template-columns: 0.85fr 1fr;
}

.app-exit-card {
  gap: 12px;
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 84% 14%, rgba(255, 196, 81, 0.2), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 24px 70px rgba(20, 36, 68, 0.24);
}

.app-exit-card h2 {
  margin: 0;
  color: #102033;
  font-size: 22px;
  line-height: 1.2;
}

#onboardingDialog .modal-card {
  max-height: min(86svh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
}

#onboardNicknameInput {
  font-size: 16px;
  scroll-margin: 0;
}

.account-linked-pill {
  color: #24516d;
  background: linear-gradient(135deg, #edf7ff, #f8fbff);
}

.memo-count.danger {
  color: #553000;
  background: linear-gradient(135deg, #ffe08a, #ffb66e);
  animation: pulse 900ms ease-in-out infinite;
}

body.danger-mode .memo-app {
  border-color: rgba(255, 179, 92, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 179, 92, 0.14), 0 12px 26px rgba(180, 112, 32, 0.12);
}

body.danger-mode .memo-header {
  background: #fff8df;
}

body.pressure-high .memo-list {
  background:
    linear-gradient(180deg, rgba(255, 184, 77, 0.14), rgba(255, 184, 77, 0) 118px),
    repeating-linear-gradient(0deg, rgba(255, 184, 77, 0.06) 0 1px, transparent 1px 42px);
}

body.pressure-high .memo-count {
  box-shadow: 0 0 0 4px rgba(255, 184, 77, 0.16);
}

body.pressure-critical .memo-app {
  animation: criticalGlow 920ms ease-in-out infinite;
}

body.pressure-critical .memo-list {
  border-top: 2px solid rgba(255, 166, 71, 0.9);
}

body.overload-ending .memo-app {
  border-color: rgba(255, 141, 87, 0.92);
  filter: saturate(0.92);
  animation: overloadEnd 960ms ease-in-out infinite;
}

body.overload-ending .memo-list {
  background:
    linear-gradient(180deg, rgba(255, 154, 90, 0.18), rgba(255, 238, 207, 0.08)),
    repeating-linear-gradient(0deg, rgba(255, 154, 90, 0.06) 0 1px, transparent 1px 42px);
}

@keyframes criticalGlow {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(255, 171, 64, 0.14), 0 14px 28px rgba(98, 61, 20, 0.08);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 171, 64, 0.24), 0 18px 34px rgba(98, 61, 20, 0.14);
  }
}

.play-screen .timer-cell {
  flex: 0 0 auto;
  min-width: 0;
  margin-left: auto;
  justify-content: flex-end;
  padding-left: 8px;
}

#timer {
  white-space: nowrap;
}

@media (max-width: 860px) {
  #onboardingDialog {
    align-items: center;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  }

  #onboardingDialog .modal-card {
    width: min(100%, 390px);
    margin: auto;
  }

  body.keyboard-open .play-screen {
    height: 100svh;
    padding-bottom: 0 !important;
  }

  body.keyboard-open .memo-app {
    margin-bottom: calc(2px + var(--play-bottom-safe));
  }

  body.keyboard-open .input-zone {
    position: sticky;
    bottom: 0;
    padding-bottom: calc(6px + var(--play-bottom-safe));
  }

  body.keyboard-open .play-screen .timer-cell {
    flex: 0 0 auto;
    min-width: 0;
  }
}

/* Mobile IME fix: keep the typing field pinned above Korean keyboards. */
@media (max-width: 860px) {
  body.keyboard-open .memo-app {
    margin-bottom: 0 !important;
    padding-bottom: 56px;
    border-radius: 16px 16px 0 0;
  }

  body.keyboard-open .memo-list {
    padding-bottom: 64px !important;
  }

  body.keyboard-open .input-zone {
    position: fixed !important;
    left: max(8px, calc((100vw - 390px) / 2 + 8px));
    right: max(8px, calc((100vw - 390px) / 2 + 8px));
    bottom: calc(var(--keyboard-inset, 0px) + 6px + env(safe-area-inset-bottom));
    z-index: 180;
    display: grid;
    grid-template-columns: 1fr;
    padding: 6px;
    border: 1px solid rgba(184, 204, 238, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(18, 39, 82, 0.18);
    transform: translateZ(0);
    backdrop-filter: blur(12px);
  }

  body.keyboard-open .input-zone input {
    width: 100%;
    min-height: 38px;
    border-radius: 10px;
    font-size: 14px;
  }
}

/* English strings are longer than Korean; keep the lobby readable. */
html[lang="en"] .briefing-copy {
  padding-right: 70px !important;
}

html[lang="en"] .home-hero h2 {
  max-width: 100% !important;
  font-size: 18px !important;
  line-height: 1.24 !important;
  min-height: 25px;
  overflow: visible;
  white-space: normal;
}

html[lang="en"] .home-hero small {
  max-width: 100% !important;
  overflow-wrap: anywhere;
}

html[lang="en"] .briefing-stack div {
  min-height: 74px !important;
}

html[lang="en"] .briefing-stack strong {
  display: -webkit-box !important;
  overflow: hidden;
  white-space: normal !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sheet-modal .menu-sheet,
#menuDialog .menu-sheet {
  overflow: auto;
}

/* Lobby hero must fit English labels and use the game mascot artwork. */
.home-hero {
  min-height: 204px !important;
  max-height: none !important;
}

.home-hero::before,
.home-hero::after {
  content: none !important;
}

.briefing-visual {
  display: block !important;
  position: absolute;
  top: 14px;
  right: 12px;
  width: 78px;
  height: 78px;
  border-radius: 24px;
  background:
    url("./store-assets/briefing-rush-icon.svg") center / cover no-repeat;
  box-shadow: 0 14px 28px rgba(4, 13, 32, 0.2);
  filter: saturate(1.12) contrast(1.05);
}

.briefing-visual > * {
  display: none !important;
}

.briefing-copy {
  padding-right: 82px !important;
}

.briefing-stack {
  margin-top: 10px !important;
}

.briefing-stack div {
  min-height: 68px !important;
}

html[lang="en"] .home-hero {
  min-height: 212px !important;
}

html[lang="en"] .briefing-copy {
  padding-right: 84px !important;
}

html[lang="en"] .home-hero h2 {
  max-width: 245px !important;
  font-size: 17px !important;
}

/* Final play HUD alignment: stats stay left, survival/settings stay right. */
.play-screen .score-board,
body.keyboard-open .play-screen .score-board {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 0 8px 4px !important;
}

.play-screen .score-board > div:not(.timer-cell),
body.keyboard-open .play-screen .score-board > div:not(.timer-cell) {
  flex: 0 0 clamp(56px, 17vw, 70px) !important;
  min-width: 0 !important;
}

.play-screen .score-board > .timer-cell,
body.keyboard-open .play-screen .score-board > .timer-cell {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin-left: auto !important;
  justify-content: flex-end !important;
  gap: 3px !important;
  padding: 2px 3px 2px 6px !important;
}

html[lang="en"] .briefing-stack {
  margin-top: 12px !important;
}

html[lang="en"] .briefing-stack div {
  min-height: 76px !important;
}

/* Mobile polish: avoid error-like red flashing on overload and keep lobby tabs low. */
body.pressure-critical .memo-app,
body.overload-ending .memo-app {
  animation: none !important;
}

body.pressure-critical .memo-app {
  border-color: rgba(247, 181, 77, 0.92) !important;
  box-shadow: 0 0 0 2px rgba(247, 181, 77, 0.16), 0 14px 28px rgba(120, 72, 19, 0.1) !important;
}

body.pressure-critical .memo-list {
  border-top: 2px solid rgba(247, 181, 77, 0.86) !important;
}

body.overload-ending .memo-app {
  border-color: rgba(255, 181, 92, 0.92) !important;
  filter: saturate(0.96) !important;
  box-shadow: 0 0 0 2px rgba(255, 181, 92, 0.18), 0 14px 30px rgba(120, 72, 19, 0.11) !important;
}

body.overload-ending .memo-list {
  background:
    linear-gradient(180deg, rgba(255, 190, 97, 0.14), rgba(255, 249, 236, 0.04)),
    repeating-linear-gradient(0deg, rgba(255, 190, 97, 0.045) 0 1px, transparent 1px 42px) !important;
}

.home-screen > .home-dock,
.home-dock {
  bottom: 0 !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom)) !important;
  border-radius: 18px 18px 0 0 !important;
}

.home-dock button {
  min-height: 45px !important;
}

/* Phone status-bar safety: keep the lobby title below Android/iOS system UI. */
.topbar {
  min-height: calc(var(--app-top-safe) + 56px) !important;
  padding: var(--app-top-safe) 13px 7px !important;
}

.topbar .icon-btn {
  margin-top: 0 !important;
}

.front-title-screen {
  padding-top: max(34px, calc(env(safe-area-inset-top) + 18px)) !important;
}

/* Play screen uses the same status-bar safety and menu button language as lobby. */
.play-screen,
body.keyboard-open .play-screen {
  padding-top: var(--app-top-safe) !important;
}

.play-screen .score-board > .timer-cell,
body.keyboard-open .play-screen .score-board > .timer-cell {
  min-height: 36px !important;
  padding: 0 0 0 7px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.score-menu-btn,
body.keyboard-open .score-menu-btn {
  width: 36px !important;
  height: 36px !important;
  border: 1px solid rgba(211, 222, 238, 0.95) !important;
  border-radius: 15px !important;
  color: #182033 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 10px 24px rgba(39, 57, 91, 0.1) !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

/* Dark Office final readability pass. */
body.theme-dark .work-setup-card,
body.theme-dark .item-stock-card,
body.theme-dark .shop-stock-card,
body.theme-dark .home-dock,
body.theme-dark .home-dock button,
body.theme-dark .home-dock button:nth-child(2),
body.theme-dark .home-dock button:nth-child(4) {
  border-color: rgba(148, 163, 184, 0.34) !important;
  color: #f4f7fb !important;
  background: linear-gradient(180deg, #202b3b, #151c29) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22) !important;
}

body.theme-dark .setup-grid div,
body.theme-dark .item-stock-card div {
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #f4f7fb !important;
  background: linear-gradient(180deg, #263246, #1b2433) !important;
}

body.theme-dark .item-stock-card span,
body.theme-dark .home-dock button span,
body.theme-dark .home-dock button:nth-child(2) span,
body.theme-dark .home-dock button:nth-child(4) span {
  color: #bfdbfe !important;
  background: rgba(79, 124, 255, 0.2) !important;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.18) !important;
}

body.theme-dark .item-stock-card small,
body.theme-dark .setup-head small,
body.theme-dark .setup-grid span,
body.theme-dark .work-setup-card select,
body.theme-dark .home-dock button strong,
body.theme-dark .home-dock button small {
  color: #cbd5e1 !important;
}

body.theme-dark .item-stock-card strong,
body.theme-dark .setup-head strong,
body.theme-dark .setup-grid strong,
body.theme-dark .work-setup-card strong,
body.theme-dark .shop-balance,
body.theme-dark .shop-stock-card strong {
  color: #ffffff !important;
}

body.theme-dark .setup-shop-btn {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #0f766e) !important;
}

/* Dark Office full contrast guard: settings and in-game controls must never
   inherit white text onto light button/card backgrounds. */
body.theme-dark .menu-section,
body.theme-dark .settings-language-section,
body.theme-dark .settings-account-section,
body.theme-dark .app-info-section,
body.theme-dark .special-guide-section {
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: #f4f7fb !important;
  background: linear-gradient(180deg, #202b3b, #151c29) !important;
}

body.theme-dark .menu-section h3,
body.theme-dark .menu-section label,
body.theme-dark .setting-link span,
body.theme-dark .setting-details summary,
body.theme-dark .setting-contact span,
body.theme-dark .settings-account-state strong,
body.theme-dark .setting-link strong,
body.theme-dark .setting-contact strong,
body.theme-dark .guide-toggle span,
body.theme-dark .guide-toggle strong {
  color: #f8fafc !important;
}

body.theme-dark .settings-account-copy,
body.theme-dark .settings-account-state small,
body.theme-dark .setting-details p,
body.theme-dark .setting-contact,
body.theme-dark .menu-section small,
body.theme-dark .special-unlock-note,
body.theme-dark .special-guide-list span {
  color: #cbd5e1 !important;
}

body.theme-dark .setting-toggle,
body.theme-dark .setting-link,
body.theme-dark .setting-details,
body.theme-dark .setting-contact,
body.theme-dark .settings-account-state,
body.theme-dark #themeSelect,
body.theme-dark #languageSelect,
body.theme-dark .language-select,
body.theme-dark .guide-toggle {
  border-color: rgba(148, 163, 184, 0.36) !important;
  color: #f8fafc !important;
  background: #111827 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.theme-dark .setting-toggle,
body.theme-dark .setting-link,
body.theme-dark .setting-details,
body.theme-dark .setting-contact,
body.theme-dark .settings-account-state,
body.theme-dark #themeSelect,
body.theme-dark #languageSelect,
body.theme-dark .language-select,
body.theme-dark .guide-toggle {
  background-color: #111827 !important;
}

body.theme-dark .setting-toggle span,
body.theme-dark .setting-link span,
body.theme-dark .guide-toggle span {
  color: #f8fafc !important;
}

body.theme-dark .setting-toggle strong,
body.theme-dark .setting-link strong,
body.theme-dark .guide-toggle strong {
  color: #07111f !important;
  background: #bfdbfe !important;
}

body.theme-dark #themeSelect option,
body.theme-dark #languageSelect option,
body.theme-dark .language-select option {
  color: #f8fafc !important;
  background: #111827 !important;
}

body.theme-dark .item-bar {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(12, 18, 29, 0.58) !important;
}

body.theme-dark .item-btn,
body.theme-dark #autoItemBtn,
body.theme-dark #sortItemBtn,
body.theme-dark #freezeItemBtn {
  border-color: rgba(148, 163, 184, 0.36) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #202b3b, #151c29) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2) !important;
}

body.theme-dark .item-btn,
body.theme-dark #autoItemBtn,
body.theme-dark #sortItemBtn,
body.theme-dark #freezeItemBtn {
  background-color: #202b3b !important;
}

body.theme-dark .item-btn span,
body.theme-dark #autoItemBtn span,
body.theme-dark #sortItemBtn span,
body.theme-dark #freezeItemBtn span {
  color: #f4f7fb !important;
}

body.theme-dark .item-btn strong,
body.theme-dark #autoItemBtn strong,
body.theme-dark #sortItemBtn strong,
body.theme-dark #freezeItemBtn strong {
  color: #07111f !important;
  background: #bfdbfe !important;
}

body.theme-dark .item-btn:disabled,
body.theme-dark #autoItemBtn:disabled,
body.theme-dark #sortItemBtn:disabled,
body.theme-dark #freezeItemBtn:disabled {
  opacity: 0.74 !important;
  color: #94a3b8 !important;
  background: #111827 !important;
  box-shadow: none !important;
}

body.theme-dark .item-btn:disabled span,
body.theme-dark #autoItemBtn:disabled span,
body.theme-dark #sortItemBtn:disabled span,
body.theme-dark #freezeItemBtn:disabled span {
  color: #94a3b8 !important;
}

body.theme-dark .item-btn:disabled strong,
body.theme-dark #autoItemBtn:disabled strong,
body.theme-dark #sortItemBtn:disabled strong,
body.theme-dark #freezeItemBtn:disabled strong {
  color: #0f172a !important;
  background: #64748b !important;
}

body.theme-dark .item-btn.recommended:not(:disabled),
body.theme-dark #autoItemBtn.recommended:not(:disabled),
body.theme-dark #sortItemBtn.recommended:not(:disabled),
body.theme-dark #freezeItemBtn.recommended:not(:disabled),
body.theme-dark.tutorial-focus-sort #sortItemBtn:not(:disabled),
body.theme-dark.tutorial-focus-speed #autoItemBtn:not(:disabled),
body.theme-dark.tutorial-focus-freeze #freezeItemBtn:not(:disabled) {
  border-color: #facc15 !important;
  color: #fff7d6 !important;
  background: linear-gradient(180deg, #40361a, #1f2937) !important;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.18), 0 12px 24px rgba(0, 0, 0, 0.22) !important;
}

body.theme-dark .score-board div {
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #f8fafc !important;
  background: #111827 !important;
}

body.theme-dark .score-board .label {
  color: #cbd5e1 !important;
}

body.theme-dark .score-board strong {
  color: #f8fafc !important;
}

body.theme-dark .score-menu-btn,
body.keyboard-open.theme-dark .score-menu-btn {
  border-color: rgba(148, 163, 184, 0.36) !important;
  color: #f8fafc !important;
  background: #1b2433 !important;
}

/* Dark Office hard pass for lobby/profile/modal controls. */
body.theme-dark .icon-btn,
body.theme-dark .topbar .icon-btn,
body.theme-dark .modal-card .icon-btn,
body.theme-dark .menu-sheet .icon-btn,
body.theme-dark #menuBtn,
body.theme-dark #closeMenuBtn,
body.theme-dark #closeShopBtn,
body.theme-dark #closeCollectionBtn,
body.theme-dark #closeMissionBtn,
body.theme-dark #closeRankingBtn,
body.theme-dark #closePrivacyBtn,
body.theme-dark #closeCreatorBtn,
body.theme-dark #closeAnnouncementBtn {
  border-color: rgba(148, 163, 184, 0.42) !important;
  color: #f8fafc !important;
  background: #1b2433 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark .player-card {
  border-color: rgba(148, 163, 184, 0.32) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #202b3b, #151c29) !important;
}

body.theme-dark .player-card .label,
body.theme-dark .player-card span,
body.theme-dark .player-card small,
body.theme-dark #gradeLine {
  color: #cbd5e1 !important;
}

body.theme-dark .player-card strong,
body.theme-dark #nickname {
  color: #ffffff !important;
}

body.theme-dark .profile-avatar {
  border-color: rgba(148, 163, 184, 0.38) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #263246, #182132) !important;
}

body.theme-dark .profile-avatar em {
  border-color: #1b2433 !important;
  color: #07111f !important;
  background: #bfdbfe !important;
}

body.theme-dark .ticket-pill,
body.theme-dark .profile-grade-pill {
  border: 1px solid rgba(147, 197, 253, 0.36) !important;
  color: #f8fafc !important;
  background: linear-gradient(135deg, #243653, #1b2433 72%, #0f766e) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22) !important;
}

body.theme-dark .ticket-pill strong,
body.theme-dark .profile-grade-pill strong,
body.theme-dark #profileGradePill {
  color: #ffffff !important;
}

body.theme-dark .ticket-pill span,
body.theme-dark .ticket-pill small,
body.theme-dark .profile-grade-pill span,
body.theme-dark .profile-grade-pill small {
  color: #bfdbfe !important;
}

.item-btn {
  grid-template-columns: auto 1fr auto;
}

.item-btn::before {
  content: "";
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 8px;
  color: #172033;
  background: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

#autoItemBtn::before {
  content: "↓";
}

#sortItemBtn::before {
  content: "✓";
}

#freezeItemBtn::before {
  content: "Ⅱ";
}

body.theme-dark .item-btn::before {
  color: #07111f !important;
  background: #dbeafe !important;
}

body.theme-dark #freezeItemBtn::before {
  color: #0f172a !important;
  background: #ddd6fe !important;
}

body.theme-dark .shop-icon,
body.theme-dark .daily-gold-shop .shop-card .shop-icon,
body.theme-dark .start-level-card .shop-icon,
body.theme-dark .slot-upgrade-card .shop-icon {
  border: 1px solid rgba(147, 197, 253, 0.28) !important;
  color: #07111f !important;
  background: #bfdbfe !important;
}

body.theme-dark .ad-gold-reward-card {
  border-color: rgba(74, 222, 128, 0.34) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 197, 94, 0.2), transparent 30%),
    linear-gradient(180deg, #173326, #13241f) !important;
}

body.theme-dark .ad-gold-reward-card em {
  color: #bbf7d0 !important;
  background: rgba(20, 83, 45, 0.72) !important;
  border-color: rgba(74, 222, 128, 0.26) !important;
}

body.theme-dark .shop-card em,
body.theme-dark .money-shop-grid .shop-card em,
body.theme-dark .premium-shop-grid .shop-card em,
body.theme-dark .shop-card.premium-card em,
body.theme-dark #beginnerPackPrice,
body.theme-dark #slotUpgradePrice {
  color: #07111f !important;
  background: #fcd34d !important;
}

body.theme-dark .attendance-track {
  border-color: rgba(250, 204, 21, 0.3) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #202b3b, #151c29) !important;
}

body.theme-dark .attendance-head small,
body.theme-dark .attendance-day small {
  color: #07111f !important;
  background: #fde68a !important;
}

body.theme-dark .attendance-day {
  border-color: rgba(148, 163, 184, 0.34) !important;
  color: #e5edf8 !important;
  background: #111827 !important;
}

body.theme-dark .attendance-day span,
body.theme-dark .attendance-day strong {
  color: #e5edf8 !important;
}

body.theme-dark .attendance-day em {
  color: #07111f !important;
  background: #bfdbfe !important;
}

body.theme-dark .attendance-day.done {
  border-color: rgba(34, 197, 94, 0.5) !important;
  color: #dcfce7 !important;
  background: linear-gradient(180deg, #123222, #101f1a) !important;
}

body.theme-dark .attendance-day.done em {
  color: #052e16 !important;
  background: #86efac !important;
}

body.theme-dark .attendance-day.today {
  border-color: #93c5fd !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #243653, #152033) !important;
}

body.theme-dark .attendance-day.today em {
  color: #422006 !important;
  background: #facc15 !important;
}

body.theme-dark .attendance-day.done.today {
  border-color: rgba(34, 197, 94, 0.5) !important;
  color: #dcfce7 !important;
  background: linear-gradient(180deg, #123222, #101f1a) !important;
}

body.theme-dark .attendance-day.done.today em {
  color: #052e16 !important;
  background: #86efac !important;
}

body.theme-dark .attendance-day.locked {
  color: #94a3b8 !important;
  background: #0f172a !important;
}

body.theme-dark .attendance-day.locked em {
  color: #111827 !important;
  background: #94a3b8 !important;
}

body.theme-dark .collection-item > span,
body.theme-dark .collection-item.locked > span,
body.theme-dark .collection-progress span {
  color: #07111f !important;
  background: #cbd5e1 !important;
}

body.theme-dark .mission-reward-title span {
  color: #f8fafc !important;
}

body.theme-dark .mission-reward-title strong {
  color: #cbd5e1 !important;
}

body.theme-dark .mission-row small {
  color: #422006 !important;
  background: #fde68a !important;
}

body.theme-dark .mission-row strong {
  color: #07111f !important;
  background: #bfdbfe !important;
}

/* Special memo guide readability and alignment. */
.special-guide-section.open .special-guide-list strong,
.special-guide-section.open .special-guide-list small {
  align-self: start;
}

.special-guide-section.open .special-guide-list strong {
  min-width: 0;
  padding-top: 1px;
  line-height: 1.24;
  white-space: normal;
}

.special-guide-section.open .special-guide-list small {
  min-width: 0;
}

body.theme-dark .guide-group-title {
  color: #bfdbfe !important;
}

body.theme-dark .guide-group-title.bad {
  color: #fca5a5 !important;
}

body.theme-dark .special-guide-list span {
  border-color: rgba(148, 163, 184, 0.34) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #202b3b, #151c29) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.theme-dark .special-guide-list span.good-guide-item {
  border-color: color-mix(in srgb, var(--rank-main, #93c5fd) 48%, rgba(148, 163, 184, 0.34)) !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--rank-main, #4f7cff) 16%, transparent), transparent 44%),
    linear-gradient(180deg, #202b3b, #151c29) !important;
}

body.theme-dark .special-guide-list span.bad-guide-item {
  border-color: rgba(248, 113, 113, 0.46) !important;
  background:
    linear-gradient(90deg, rgba(239, 68, 68, 0.18), transparent 48%),
    linear-gradient(180deg, #2a202c, #151c29) !important;
}

body.theme-dark .special-guide-list span.locked {
  opacity: 0.82 !important;
  border-color: rgba(100, 116, 139, 0.38) !important;
  background: #111827 !important;
}

body.theme-dark .special-guide-list strong {
  color: #f8fafc !important;
}

body.theme-dark .special-guide-list small {
  color: #dbeafe !important;
}

body.theme-dark .special-guide-list span.bad-guide-item small {
  color: #fecaca !important;
}

body.theme-dark .guide-rank-badge {
  color: var(--rank-ink, #07111f) !important;
  background: var(--rank-main, #bfdbfe) !important;
}

body.theme-dark .guide-dot {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08) !important;
}

/* UI polish pass: color roles, card system, game-object memo cards. */
:root {
  --role-bg: #f4f7fc;
  --role-surface: #ffffff;
  --role-surface-soft: #f8fbff;
  --role-ink: #172033;
  --role-muted: #66748a;
  --role-line: rgba(202, 213, 226, 0.82);
  --role-primary: #276aff;
  --role-primary-deep: #123a9f;
  --role-support: #18a77c;
  --role-warning: #f2a216;
  --role-danger: #e94c63;
  --radius-card: 18px;
  --radius-panel: 22px;
  --radius-chip: 999px;
  --shadow-card: 0 12px 28px rgba(29, 43, 72, 0.1);
  --shadow-panel: 0 18px 44px rgba(29, 43, 72, 0.14);
  --shadow-game-object: 0 4px 0 rgba(24, 32, 51, 0.14), 0 12px 22px rgba(24, 32, 51, 0.1);
}

body.theme-dark {
  --role-bg: #0c1320;
  --role-surface: #172033;
  --role-surface-soft: #202b3b;
  --role-ink: #f8fafc;
  --role-muted: #cbd5e1;
  --role-line: rgba(148, 163, 184, 0.34);
  --role-primary: #8bb7ff;
  --role-primary-deep: #dbeafe;
  --role-support: #86efac;
  --role-warning: #fde68a;
  --role-danger: #fca5a5;
  --shadow-card: 0 14px 30px rgba(0, 0, 0, 0.28);
  --shadow-panel: 0 22px 50px rgba(0, 0, 0, 0.34);
  --shadow-game-object: 0 4px 0 rgba(0, 0, 0, 0.34), 0 12px 24px rgba(0, 0, 0, 0.28);
}

.home-screen,
.screen {
  color: var(--role-ink);
}

:where(
  .home-hero,
  .player-card,
  .work-setup-card,
  .item-stock-card,
  .collection-card,
  .shop-section,
  .daily-panel,
  .home-ranking,
  .collection-summary,
  .collection-purpose,
  .modal-card,
  .menu-sheet,
  .memo-app,
  .attendance-track
) {
  border: 1px solid var(--role-line) !important;
  border-radius: var(--radius-panel) !important;
  box-shadow: var(--shadow-card) !important;
}

:where(
  .shop-card,
  .mission-row,
  .attendance-day,
  .collection-item,
  .result-grid div,
  .reward-mini-card,
  .choice-option,
  .checkpoint-card,
  .setting-link,
  .setting-details,
  .setting-contact,
  .shop-route-card,
  .setup-grid div,
  .item-stock-card div,
  .home-dock button
) {
  border-radius: var(--radius-card) !important;
  box-shadow: 0 8px 18px rgba(29, 43, 72, 0.08) !important;
}

.home-hero {
  background:
    radial-gradient(circle at 84% 14%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(135deg, #203a68 0%, #176a76 58%, #12876f 100%) !important;
}

.primary-btn,
#startBtn,
.start-card {
  border-radius: var(--radius-card) !important;
  box-shadow: 0 10px 0 rgba(18, 58, 159, 0.2), 0 18px 32px rgba(39, 106, 255, 0.18) !important;
}

.ghost-btn,
.icon-btn,
.topbar .icon-btn,
.score-menu-btn {
  border-radius: 14px !important;
}

.ticket-pill,
.profile-grade-pill,
.memo-rank,
.memo-badge,
.guide-rank-badge {
  border-radius: var(--radius-chip) !important;
}

.play-screen .memo-list {
  gap: 7px !important;
  padding: 9px !important;
}

.play-screen .memo-item {
  position: relative;
  min-height: 40px !important;
  padding: 8px 9px 8px 10px !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  border: 1px solid rgba(39, 106, 255, 0.2) !important;
  border-radius: 15px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.1)),
    linear-gradient(135deg, #fffdf4, #fff3c9) !important;
  box-shadow: var(--shadow-game-object) !important;
  overflow: hidden !important;
}

.play-screen .memo-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 var(--radius-chip) var(--radius-chip) 0;
  background: var(--role-primary);
}

.play-screen .memo-item.special {
  border-color: rgba(24, 167, 124, 0.36) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.14)),
    linear-gradient(135deg, #ecfff6, #f7fff2) !important;
}

.play-screen .memo-item.special::before {
  background: var(--rank-main, var(--role-support));
}

.play-screen .memo-item.special-bad,
.play-screen .memo-item.boss {
  border-color: rgba(233, 76, 99, 0.36) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, #fff0f3, #fff8ea) !important;
}

.play-screen .memo-item.special-bad::before,
.play-screen .memo-item.boss::before {
  background: var(--role-danger);
}

.play-screen .memo-item.special-gearBox {
  border-color: rgba(242, 162, 22, 0.62) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.85), transparent 44%),
    linear-gradient(135deg, #fff1ca, #ffffff) !important;
}

.play-screen .memo-item.special-gearBox::before {
  background: var(--role-warning);
}

.play-screen .memo-title {
  min-width: 0;
  color: #172033;
  font-weight: 900;
  letter-spacing: 0;
}

.play-screen .checkbox {
  width: 21px !important;
  height: 21px !important;
  border: 1px solid rgba(39, 106, 255, 0.26) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68) !important;
}

.play-screen .memo-badge {
  border: 1px solid rgba(24, 32, 51, 0.08);
  color: #374151;
  background: rgba(255, 255, 255, 0.72);
}

.play-screen .memo-item.checked {
  box-shadow: 0 2px 0 rgba(24, 32, 51, 0.08), 0 6px 14px rgba(24, 32, 51, 0.08) !important;
}

.home-dashboard-empty,
.ranking-list:empty,
.collection-grid:empty {
  position: relative;
}

.home-dashboard-empty::before,
.ranking-list:empty::before,
.collection-grid:empty::before,
.result-modal::before {
  content: "";
  display: block;
  width: 70px;
  height: 70px;
  margin: 0 auto 7px;
  border-radius: 24px;
  background:
    url("./store-assets/briefing-rush-icon.svg") center / cover no-repeat;
  filter: drop-shadow(0 12px 18px rgba(29, 43, 72, 0.12));
}

.ranking-list:empty::before,
.collection-grid:empty::before {
  width: 58px;
  height: 58px;
  margin-top: 10px;
}

.result-modal::before {
  width: 56px;
  height: 56px;
  margin-bottom: 2px;
}

.result-modal h2 {
  color: var(--role-ink) !important;
}

.result-modal .result-summary {
  color: var(--role-primary-deep) !important;
  font-weight: 900;
}

.result-modal .result-review span,
.result-modal .reward-card > span,
.result-modal .result-unlock span {
  color: var(--role-primary-deep) !important;
  font-weight: 1000;
}

.result-modal .result-review,
.result-modal .reward-card,
.result-modal .result-unlock {
  background: linear-gradient(180deg, var(--role-surface), var(--role-surface-soft)) !important;
}

body.theme-dark .home-hero {
  background:
    radial-gradient(circle at 84% 14%, rgba(147, 197, 253, 0.22), transparent 24%),
    linear-gradient(135deg, #172642 0%, #12363e 58%, #124339 100%) !important;
}

body.theme-dark .play-screen .memo-item {
  border-color: rgba(147, 197, 253, 0.28) !important;
  color: #f8fafc !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #202b3b, #151c29) !important;
}

body.theme-dark .play-screen .memo-item.special {
  border-color: rgba(134, 239, 172, 0.38) !important;
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.14), transparent 48%),
    linear-gradient(135deg, #202b3b, #151c29) !important;
}

body.theme-dark .play-screen .memo-item.special-bad,
body.theme-dark .play-screen .memo-item.boss {
  border-color: rgba(252, 165, 165, 0.42) !important;
  background:
    linear-gradient(90deg, rgba(239, 68, 68, 0.16), transparent 48%),
    linear-gradient(135deg, #2a202c, #151c29) !important;
}

body.theme-dark .play-screen .memo-title,
body.theme-dark .play-screen .memo-badge {
  color: #f8fafc !important;
}

body.theme-dark .play-screen .memo-badge {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(15, 23, 42, 0.72) !important;
}

body.theme-dark .result-modal .result-summary,
body.theme-dark .result-modal .result-review span,
body.theme-dark .result-modal .reward-card > span,
body.theme-dark .result-modal .result-unlock span {
  color: #bfdbfe !important;
}

/* Make in-run special memo ranks readable at a glance. */
.play-screen .memo-title {
  justify-content: flex-start !important;
  gap: 5px !important;
}

.play-screen .memo-rank {
  order: 10;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 auto !important;
  min-width: 38px !important;
  height: 23px !important;
  margin-left: auto !important;
  padding: 0 8px !important;
  border: 2px solid rgba(255, 255, 255, 0.92) !important;
  border-radius: 999px !important;
  color: var(--rank-ink, #ffffff) !important;
  background: var(--rank-main, #7d8797) !important;
  box-shadow:
    0 0 0 1px rgba(24, 32, 51, 0.12),
    0 6px 12px rgba(24, 32, 51, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
  font-size: 10.5px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

.play-screen .memo-badge {
  order: 11;
  max-width: 102px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-screen .memo-rank.rank-sss {
  color: #3a2600 !important;
  background: linear-gradient(135deg, #fff08a 0%, #f5b51d 54%, #c98205 100%) !important;
  box-shadow:
    0 0 0 1px rgba(121, 80, 0, 0.2),
    0 0 14px rgba(245, 181, 29, 0.5),
    0 7px 13px rgba(121, 80, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.62) !important;
}

.play-screen .memo-rank.rank-ss {
  color: #1f2937 !important;
  background: linear-gradient(135deg, #ffffff 0%, #c6d0df 58%, #8793a6 100%) !important;
}

.play-screen .memo-rank.rank-s {
  color: #ffffff !important;
  background: linear-gradient(135deg, #c8a7ff 0%, #875dff 55%, #5b35d6 100%) !important;
  box-shadow:
    0 0 0 1px rgba(91, 53, 214, 0.22),
    0 0 12px rgba(135, 93, 255, 0.36),
    0 7px 13px rgba(91, 53, 214, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.38) !important;
}

.play-screen .memo-rank.rank-a {
  color: #ffffff !important;
  background: linear-gradient(135deg, #7fb2ff 0%, #276aff 58%, #1742b6 100%) !important;
}

.play-screen .memo-rank.rank-b {
  color: #ffffff !important;
  background: linear-gradient(135deg, #5ee0ad 0%, #18a77c 58%, #0e7558 100%) !important;
}

.play-screen .memo-rank.rank-c {
  color: #3f2b00 !important;
  background: linear-gradient(135deg, #ffe589 0%, #d4ad3c 58%, #a67813 100%) !important;
}

.play-screen .memo-rank.rank-d {
  color: #ffffff !important;
  background: linear-gradient(135deg, #aab3c1 0%, #7d8797 58%, #4b5563 100%) !important;
}

body.theme-dark .play-screen .memo-rank {
  border-color: rgba(248, 250, 252, 0.94) !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 7px 14px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
}

html[lang="en"] .shop-card.beginner-pack-card::before {
  content: "First purchase";
}

html[lang="en"] .shop-card.beginner-pack-card.owned::before {
  content: "Claimed";
}

html[lang="en"] body.keyboard-open .memo-header::before {
  content: "Work Memos";
}

.launch-splash {
  position: absolute;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: start center;
  padding: calc(env(safe-area-inset-top) + 104px) 24px calc(env(safe-area-inset-bottom) + 28px);
  background:
    linear-gradient(180deg, rgba(5, 23, 70, 0.46) 0%, rgba(9, 48, 120, 0.12) 22%, rgba(2, 20, 50, 0.03) 46%),
    url("store-assets/splash-fullscreen-v1.png") center center / cover no-repeat,
    linear-gradient(150deg, #0a55bd 0%, #05c6df 100%);
  opacity: 1;
  transform: scale(1);
  transition: opacity 180ms ease, transform 180ms ease;
  overflow: hidden;
}

.launch-splash[hidden] {
  display: none;
}

.launch-splash.leaving {
  opacity: 0;
  transform: scale(1.025);
}

.launch-splash-inner {
  display: grid;
  justify-items: center;
  gap: 0;
  width: min(100%, 360px);
  animation: splash-pop 520ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.launch-splash-inner strong {
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-size: clamp(34px, 9.5vw, 48px);
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow:
    0 4px 14px rgba(4, 14, 42, 0.46),
    0 16px 34px rgba(4, 14, 42, 0.26);
}

html[lang="en"] .launch-splash-inner strong {
  font-size: clamp(32px, 8.4vw, 44px);
}

@keyframes splash-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.theme-dark .launch-splash {
  background:
    linear-gradient(180deg, rgba(5, 12, 30, 0.58) 0%, rgba(12, 42, 85, 0.16) 24%, rgba(3, 12, 26, 0.06) 50%),
    url("store-assets/splash-fullscreen-v1.png") center center / cover no-repeat,
    linear-gradient(150deg, #101827 0%, #17233a 52%, #103934 100%);
}

body.theme-dark .launch-splash-inner strong {
  color: #f7fbff;
}

/* Final title-art override: use the real mascot asset, not CSS-drawn placeholder shapes. */
.front-title-screen .front-hero-art {
  display: block !important;
  position: absolute !important;
  left: 50% !important;
  top: 52% !important;
  width: min(82%, 310px) !important;
  max-width: none !important;
  transform: translate(-50%, -50%) !important;
  border-radius: 28px !important;
  filter: saturate(1.16) contrast(1.08) drop-shadow(0 28px 34px rgba(2, 8, 23, 0.34)) !important;
}

.front-title-screen .front-visual::before,
.front-title-screen .front-visual::after {
  content: none !important;
}

/* Profiles are real PNG assets now. Never show the old CSS-drawn fallback faces. */
.profile-avatar .avatar-person,
.ranking-person {
  display: none !important;
}

/* Home lobby visual upgrade: closer to the 3D game-profile tone. */
body:not(.is-title):not(.is-playing) .phone {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.38)),
    linear-gradient(155deg, #f7fbff 0%, #e9f3ff 52%, #e9fbf6 100%) !important;
}

body:not(.is-title):not(.is-playing) .home-screen {
  gap: 8px !important;
  padding: 0 10px 8px !important;
  background:
    linear-gradient(135deg, rgba(39, 106, 255, 0.045) 0 12%, transparent 12% 31%, rgba(20, 184, 166, 0.05) 31% 43%, transparent 43%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(236, 247, 255, 0.78)) !important;
}

body:not(.is-title):not(.is-playing) .topbar {
  padding: var(--app-top-safe) 13px 6px !important;
  background: transparent !important;
}

body:not(.is-title):not(.is-playing) .topbar h1 {
  color: #102044 !important;
  font-size: 21px !important;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9);
}

body:not(.is-title):not(.is-playing) .top-status span {
  min-height: 25px !important;
  padding: 0 9px !important;
  border: 1px solid rgba(31, 48, 88, 0.12) !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  background: linear-gradient(180deg, #23365f, #111d38) !important;
  box-shadow: 0 5px 10px rgba(15, 31, 65, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

body:not(.is-title):not(.is-playing) .topbar .icon-btn {
  width: 42px !important;
  height: 42px !important;
  border: 1px solid rgba(31, 48, 88, 0.12) !important;
  border-radius: 16px !important;
  color: #14213d !important;
  background: linear-gradient(180deg, #ffffff, #edf5ff) !important;
  box-shadow: 0 8px 18px rgba(29, 43, 72, 0.12), inset 0 -3px 0 rgba(39, 106, 255, 0.06) !important;
}

body:not(.is-title):not(.is-playing) .home-hero {
  min-height: 210px !important;
  position: relative !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 18%, transparent 18% 36%, rgba(255, 255, 255, 0.12) 36% 47%, transparent 47%),
    linear-gradient(140deg, #183979 0%, #10648d 55%, #0aa87a 100%) !important;
  box-shadow: 0 13px 0 rgba(15, 47, 103, 0.18), 0 24px 38px rgba(15, 47, 103, 0.2) !important;
}

body:not(.is-title):not(.is-playing) .home-hero::before {
  content: "" !important;
  position: absolute !important;
  z-index: 0 !important;
  right: -18px !important;
  top: 28px !important;
  width: 132px !important;
  height: 132px !important;
  border-radius: 36px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 34%),
    var(--selected-avatar-image, url("./store-assets/splash-icon.png")) center / cover no-repeat !important;
  box-shadow: 0 14px 0 rgba(6, 25, 62, 0.14), 0 26px 34px rgba(6, 25, 62, 0.24) !important;
  transform: rotate(5deg) !important;
}

body:not(.is-title):not(.is-playing) .home-hero::after {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  right: 74px !important;
  top: 12px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 14px !important;
  background: url("./store-assets/briefing-rush-icon.svg") center / cover no-repeat !important;
  box-shadow: 0 8px 14px rgba(6, 25, 62, 0.18) !important;
  transform: rotate(-10deg) !important;
}

body:not(.is-title):not(.is-playing) .briefing-visual {
  top: 12px !important;
  right: 12px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body:not(.is-title):not(.is-playing) .briefing-copy {
  position: relative !important;
  z-index: 2 !important;
  padding-right: 110px !important;
}

body:not(.is-title):not(.is-playing) .briefing-stack {
  position: relative !important;
  z-index: 2 !important;
  gap: 8px !important;
}

body:not(.is-title):not(.is-playing) .briefing-stack div {
  min-height: 64px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 17px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.46)) !important;
  backdrop-filter: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 18px rgba(2, 8, 23, 0.08) !important;
}

body:not(.is-title):not(.is-playing) .player-card {
  grid-template-columns: 74px minmax(0, 1fr) auto !important;
  column-gap: 10px !important;
  min-height: 92px !important;
  padding: 11px 12px !important;
  border: 1px solid rgba(211, 224, 245, 0.92) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94)),
    linear-gradient(135deg, rgba(39, 106, 255, 0.08), transparent 42%) !important;
  box-shadow: 0 10px 0 rgba(29, 43, 72, 0.06), 0 18px 28px rgba(29, 43, 72, 0.1) !important;
}

body:not(.is-title):not(.is-playing) .player-card > div:not(.profile-grade-pill) {
  min-width: 0 !important;
}

body:not(.is-title):not(.is-playing) .player-card .label,
body:not(.is-title):not(.is-playing) .player-card strong,
body:not(.is-title):not(.is-playing) .player-card small {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.is-title):not(.is-playing) .profile-avatar {
  width: 64px !important;
  height: 64px !important;
  border: 4px solid #ffffff !important;
  border-radius: 22px !important;
  background: linear-gradient(180deg, #ffffff, #eaf4ff) !important;
  box-shadow: 0 8px 14px rgba(29, 43, 72, 0.14), inset 0 -3px 0 rgba(39, 106, 255, 0.08) !important;
}

body:not(.is-title):not(.is-playing) .player-card .grade-pill,
body:not(.is-title):not(.is-playing) .profile-grade-pill {
  min-width: 64px !important;
  min-height: 64px !important;
  border-radius: 21px !important;
  color: #ffffff !important;
  background: linear-gradient(180deg, #20365f, #111d38) !important;
  box-shadow: 0 9px 0 rgba(17, 29, 56, 0.18), 0 16px 22px rgba(17, 29, 56, 0.16) !important;
}

body:not(.is-title):not(.is-playing) .work-setup-card,
body:not(.is-title):not(.is-playing) .item-stock-card {
  border: 1px solid rgba(211, 224, 245, 0.92) !important;
  border-radius: 21px !important;
  background: linear-gradient(180deg, #ffffff, #f5f9ff) !important;
  box-shadow: 0 8px 0 rgba(29, 43, 72, 0.05), 0 14px 22px rgba(29, 43, 72, 0.08) !important;
}

body:not(.is-title):not(.is-playing) .item-stock-card {
  padding: 7px !important;
}

body:not(.is-title):not(.is-playing) .item-stock-card div {
  min-height: 38px !important;
  border: 1px solid rgba(215, 227, 245, 0.92) !important;
  border-radius: 15px !important;
  background: linear-gradient(180deg, #ffffff, #eef6ff) !important;
  box-shadow: inset 0 -3px 0 rgba(39, 106, 255, 0.05) !important;
}

body:not(.is-title):not(.is-playing) .start-cta {
  min-height: 68px !important;
  border-radius: 23px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(135deg, #2667ff 0%, #1689f5 56%, #17b8ad 118%) !important;
  box-shadow: 0 10px 0 #12358f, 0 19px 24px rgba(39, 106, 255, 0.24) !important;
}

body:not(.is-title):not(.is-playing) .start-cta .start-play-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 17px !important;
  color: #276aff !important;
  background: #ffffff !important;
  box-shadow: 0 7px 0 rgba(13, 46, 126, 0.14), 0 12px 18px rgba(13, 46, 126, 0.16) !important;
}

body:not(.is-title):not(.is-playing) .collection-card {
  border: 1px solid rgba(245, 198, 72, 0.48) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 229, 0.92)),
    linear-gradient(135deg, rgba(255, 206, 82, 0.18), transparent 58%) !important;
  box-shadow: 0 9px 0 rgba(190, 128, 30, 0.08), 0 16px 24px rgba(190, 128, 30, 0.12) !important;
}

body:not(.is-title):not(.is-playing) .home-dock {
  border: 1px solid rgba(218, 229, 246, 0.92) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 -12px 32px rgba(29, 43, 72, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(14px);
}

body:not(.is-title):not(.is-playing) .home-dock button {
  border: 1px solid rgba(218, 229, 246, 0.9) !important;
  background: linear-gradient(180deg, #ffffff, #f1f6ff) !important;
}

/* Keep the complete shift summary and its actions visible on short phones. */
.result-modal::before {
  width: 44px !important;
  height: 44px !important;
  margin-bottom: 0 !important;
}

.result-modal .result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.result-modal .result-review small,
.result-modal .result-unlock small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-actions {
  position: relative !important;
  padding-top: 2px !important;
  background: transparent !important;
}

/* Lobby goals need solid contrast over the illustrated briefing background. */
body:not(.is-title):not(.is-playing) .briefing-stack div {
  border-color: rgba(255, 255, 255, 0.72) !important;
  background: rgba(248, 252, 255, 0.9) !important;
  box-shadow: 0 8px 20px rgba(8, 34, 72, 0.13) !important;
}

body:not(.is-title):not(.is-playing) .briefing-stack span {
  color: #46617f !important;
  opacity: 1 !important;
}

body:not(.is-title):not(.is-playing) .briefing-stack strong {
  color: #13213b !important;
}

body:not(.is-title):not(.is-playing) .briefing-stack em {
  color: #23536d !important;
}

body:not(.is-title):not(.is-playing) .briefing-stack .mission-progress {
  background: rgba(32, 76, 112, 0.14) !important;
}

body.theme-dark:not(.is-title):not(.is-playing) .briefing-stack div {
  border-color: rgba(148, 197, 253, 0.24) !important;
  background: rgba(15, 27, 48, 0.9) !important;
}

body.theme-dark:not(.is-title):not(.is-playing) .briefing-stack span,
body.theme-dark:not(.is-title):not(.is-playing) .briefing-stack em {
  color: #a9c7e8 !important;
}

body.theme-dark:not(.is-title):not(.is-playing) .briefing-stack strong {
  color: #f4f8ff !important;
}

/* Memo cards already communicate type through color; keep the text lane clean. */
.play-screen .memo-item,
body.keyboard-open .play-screen .memo-item {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
  padding-left: 13px !important;
}

.intro-modal {
  align-items: stretch;
  padding: 12px;
}

.intro-modal .modal-backdrop {
  background: rgba(10, 18, 36, 0.5);
}

.intro-card {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  min-height: calc(100dvh - 24px);
  margin: auto;
  padding: calc(env(safe-area-inset-top) + 24px) 22px calc(env(safe-area-inset-bottom) + 22px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    radial-gradient(circle at 18% 12%, rgba(94, 178, 255, 0.48), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(255, 204, 77, 0.34), transparent 28%),
    linear-gradient(150deg, #eef6ff 0%, #f9fbff 48%, #dff8f4 100%);
  box-shadow: 0 28px 70px rgba(24, 47, 91, 0.24);
  display: grid;
  grid-template-rows: minmax(190px, 0.9fr) auto auto;
  gap: 18px;
  overflow: hidden;
}

.intro-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -80px -40px;
  height: 180px;
  background: linear-gradient(90deg, rgba(41, 116, 255, 0.22), rgba(16, 180, 151, 0.2));
  filter: blur(8px);
  pointer-events: none;
}

.intro-visual {
  position: relative;
  min-height: 200px;
  display: grid;
  place-items: center;
}

.intro-memo-stack {
  width: 220px;
  min-height: 150px;
  position: relative;
}

.intro-memo-stack span {
  position: absolute;
  left: 50%;
  width: 172px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: #15243d;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(42, 68, 110, 0.18);
  transform: translateX(-50%) rotate(var(--r, -4deg));
}

.intro-memo-stack span::before {
  content: "□";
  margin-right: 8px;
  color: #2878ff;
}

.intro-memo-stack span:nth-child(1) {
  top: 0;
  --r: -7deg;
}

.intro-memo-stack span:nth-child(2) {
  top: 54px;
  --r: 4deg;
}

.intro-memo-stack span:nth-child(3) {
  top: 108px;
  --r: -2deg;
  background: #fff3d5;
  color: #442b05;
}

.intro-keyboard {
  position: absolute;
  bottom: 4px;
  display: grid;
  grid-template-columns: repeat(6, 28px);
  gap: 7px;
  padding: 12px;
  border-radius: 18px;
  background: #1b3157;
  box-shadow: 0 18px 34px rgba(26, 51, 94, 0.25);
}

.intro-keyboard b {
  width: 28px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #dfeaff);
}

.intro-copy {
  position: relative;
  z-index: 1;
  color: #10213c;
}

.intro-eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(35, 118, 255, 0.1);
  color: #2367df;
  font-size: 12px;
  font-weight: 900;
}

.intro-copy h2 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}

.intro-copy p {
  margin: 0;
  color: #526174;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.55;
  word-break: keep-all;
}

.intro-rules {
  margin-top: 18px;
  display: grid;
  gap: 9px;
}

.intro-rules div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(200, 215, 236, 0.7);
}

.intro-rules strong {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #2878ff;
  color: #fff;
  font-size: 13px;
}

.intro-rules span {
  color: #1f2e48;
  font-size: 14px;
  font-weight: 850;
  word-break: keep-all;
}

.intro-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.intro-start-btn {
  min-height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #2878ff, #12a38e);
  box-shadow: 0 18px 38px rgba(40, 120, 255, 0.28);
}

.intro-start-btn strong,
.intro-start-btn small {
  display: block;
}

.intro-start-btn strong {
  font-size: 21px;
}

.intro-start-btn small {
  margin-top: 5px;
  font-size: 12px;
  opacity: 0.88;
}

.intro-close-btn {
  min-height: 44px;
  border-radius: 16px;
  color: #516179;
  background: rgba(255, 255, 255, 0.72);
}

body.theme-dark .intro-card {
  background:
    radial-gradient(circle at 20% 12%, rgba(46, 130, 255, 0.44), transparent 30%),
    linear-gradient(150deg, #101827 0%, #17233a 52%, #103934 100%);
  border-color: rgba(255, 255, 255, 0.13);
}

body.theme-dark .intro-copy,
body.theme-dark .intro-rules span,
body.theme-dark .intro-memo-stack span {
  color: #f3f7ff;
}

body.theme-dark .intro-copy p {
  color: #b8c5d8;
}

body.theme-dark .intro-rules div {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Dark Office final contrast layer. Keep late lobby/modal polish from
   reintroducing light cards with low-contrast text. */
body.theme-dark:not(.is-title):not(.is-playing) .phone,
body.theme-dark:not(.is-title):not(.is-playing) .home-screen {
  color: #f8fafc !important;
  background:
    radial-gradient(circle at 90% 8%, rgba(45, 212, 191, 0.1), transparent 26%),
    linear-gradient(180deg, #121a28, #0d1420) !important;
}

body.theme-dark:not(.is-title):not(.is-playing) .topbar h1 {
  color: #f8fafc !important;
  text-shadow: none !important;
}

body.theme-dark:not(.is-title):not(.is-playing) .topbar .icon-btn {
  border-color: rgba(148, 163, 184, 0.36) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #253248, #172033) !important;
}

body.theme-dark:not(.is-title):not(.is-playing) :is(.player-card, .work-setup-card, .item-stock-card, .collection-card, .home-dock) {
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #202b3b, #151c29) !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark:not(.is-title):not(.is-playing) :is(.item-stock-card div, .home-dock button) {
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #263246, #182132) !important;
}

body.theme-dark .app-modal :is(.modal-card, .menu-sheet) {
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: #f8fafc !important;
  background: linear-gradient(180deg, #202b3b, #131b29) !important;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.48) !important;
}

body.theme-dark .app-modal :is(.sheet-header, .result-summary, .result-review, .reward-card, .result-unlock, .choice-option, .info-grid div, .result-grid div) {
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #f8fafc !important;
  background: #111827 !important;
}

body.theme-dark .app-modal :is(h2, h3, .sheet-header strong, .result-review strong, .reward-card strong, .result-unlock strong, .choice-option strong) {
  color: #f8fafc !important;
}

body.theme-dark .app-modal :is(.modal-copy, .result-summary, .result-review small, .reward-card small, .result-unlock small, .choice-option small, .info-grid span, .result-grid span) {
  color: #cbd5e1 !important;
}

body.theme-dark #reviveBtn.revive-available:not(:disabled) {
  border-color: #fbbf24 !important;
  color: #fffdf5 !important;
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28) !important;
}

body.theme-dark #reviveBtn:disabled {
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #8290a4 !important;
  background: #111827 !important;
}

@media (prefers-reduced-motion: reduce) {
  .fx-burst,
  .fx-ring,
  .fx-core,
  .fx-burst strong,
  .fx-burst i {
    animation-duration: 1ms !important;
  }

  body.fx-screen-pulse .memo-app,
  body.fx-screen-bad .memo-app,
  body.fx-screen-surge .memo-app {
    animation: none !important;
  }
}
