:root {
  color-scheme: light;
  --bg-sky: #96eef1;
  --bg-garden: #dff3b3;
  --bg-market: #ffd98f;
  --wood: #b9693f;
  --wood-dark: #8c4d31;
  --wood-line: rgba(97, 47, 27, 0.24);
  --board-teal: #43aa9f;
  --board-teal-dark: #227a74;
  --tile-cream: #f5d88d;
  --tile-edge: #c1844e;
  --panel: rgba(255, 249, 234, 0.88);
  --panel-strong: rgba(255, 250, 238, 0.96);
  --line: rgba(132, 78, 34, 0.16);
  --text: #4c2f1a;
  --muted: #8f6a4d;
  --accent: #c75a2a;
  --accent-soft: #f7d8b3;
  --success: #2f8a57;
  --warning: #bf7431;
  --danger: #a24034;
  --pastry: #e5a94a;
  --drink: #63a4a8;
  --decor: #d86f6f;
  --shadow: 0 16px 34px rgba(103, 58, 30, 0.16);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, var(--bg-sky) 0%, #c7f6df 26%, var(--bg-garden) 40%, var(--bg-market) 57%, var(--wood) 57%, var(--wood-dark) 100%);
  color: var(--text);
}

body {
  min-width: 320px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 58vh;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 92%, rgba(93, 177, 91, 0.34) 0 24%, transparent 25%),
    radial-gradient(ellipse at 82% 90%, rgba(112, 187, 101, 0.3) 0 22%, transparent 23%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0) 38%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 43vh;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 106px, var(--wood-line) 107px 109px, transparent 110px 128px),
    repeating-linear-gradient(0deg, rgba(255, 216, 150, 0.1) 0 10px, rgba(74, 34, 20, 0.08) 11px 12px),
    linear-gradient(180deg, #c77a4d, #9b5836);
}

button {
  font: inherit;
}

#app {
  min-height: 100vh;
  padding: 16px 14px 24px;
  position: relative;
  z-index: 1;
}

.app-shell {
  max-width: 1360px;
  margin: 0 auto;
}

.hero {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 244, 222, 0.98), rgba(255, 229, 190, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  box-shadow: var(--shadow);
  border: 1px solid rgba(146, 91, 45, 0.14);
}

.hero-top,
.hero-bottom {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.hero h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.hero p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.market-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 239, 201, 0.82));
  border: 1px solid rgba(179, 107, 45, 0.14);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 7px 16px rgba(102, 62, 25, 0.1);
}

.market-pill::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 32%, #fff8bf 0 18%, transparent 19%),
    radial-gradient(circle, #ffd465 0 50%, #d19029 51% 100%);
  box-shadow: 0 2px 0 rgba(136, 78, 27, 0.18);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions button,
.action-row button,
.next-action-button,
.upgrade-button,
.order-button,
.obstacle-button {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #fff7e4, #f4d9b2);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(102, 62, 25, 0.12);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.hero-actions button:hover,
.action-row button:hover,
.next-action-button:hover,
.upgrade-button:hover,
.order-button:hover,
.obstacle-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(102, 62, 25, 0.18);
}

.hero-actions button:disabled,
.action-row button:disabled,
.next-action-button:disabled,
.upgrade-button:disabled,
.order-button:disabled,
.obstacle-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.stat-card {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  padding: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 244, 215, 0.86));
  border: 1px solid rgba(140, 85, 39, 0.11);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 16px rgba(102, 62, 25, 0.1);
}

.stat-card::before {
  content: "";
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.82) 0 13%, transparent 14%),
    linear-gradient(180deg, #ffd76b, #d0912b);
  box-shadow:
    inset 0 -3px 0 rgba(132, 76, 26, 0.14),
    0 3px 6px rgba(94, 55, 24, 0.14);
}

.stat-card-energy::before {
  border-radius: 45% 55% 45% 55%;
  background:
    linear-gradient(135deg, transparent 0 38%, #effff0 39% 51%, transparent 52%),
    linear-gradient(180deg, #42c0ef, #2378c6);
}

.stat-card-order::before {
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(121, 78, 38, 0.22) 0 3px, transparent 4px),
    linear-gradient(180deg, #fff4ca, #d99a50);
}

.stat-card-clear::before {
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 50%, #74d3cb 0 34%, transparent 35%),
    linear-gradient(135deg, #24585c 0 46%, #163d42 47% 100%);
}

.stat-label {
  grid-column: 2;
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  grid-column: 2;
  display: block;
  margin-top: 6px;
  font-size: 24px;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 1.2fr 1.7fr 1.1fr;
  gap: 14px;
  margin-top: 16px;
  align-items: start;
}

.panel {
  padding: 16px;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.order-card,
.obstacle-card,
.tip-card,
.log-card,
.action-card {
  padding: 14px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid rgba(138, 90, 42, 0.1);
}

.progress-stage {
  padding: 14px 16px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(242, 255, 227, 0.94), rgba(255, 239, 196, 0.9));
  box-shadow: var(--shadow);
  border: 1px solid rgba(88, 146, 80, 0.18);
  backdrop-filter: blur(8px);
}

.progress-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.progress-header h2 {
  margin: 0;
  font-size: 18px;
}

.progress-header p {
  margin: 5px 0 0;
  color: #53705b;
  line-height: 1.35;
}

.progress-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.next-action-button {
  background: linear-gradient(180deg, #fff0b5, #f1a94f);
  color: #552f18;
  font-weight: 800;
  box-shadow: 0 8px 0 rgba(178, 100, 39, 0.32), 0 12px 24px rgba(151, 87, 33, 0.18);
}

.guide-strip {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 248, 224, 0.9);
  border: 1px solid rgba(217, 144, 61, 0.22);
  color: #7a5435;
  font-size: 13px;
  line-height: 1.4;
}

.progress-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.progress-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 254, 246, 0.76);
  border: 1px solid rgba(88, 146, 80, 0.14);
}

.progress-card-primary {
  background: linear-gradient(180deg, rgba(255, 248, 220, 0.92), rgba(235, 255, 226, 0.88));
  border-color: rgba(47, 138, 87, 0.28);
}

.progress-ready {
  border-color: rgba(47, 138, 87, 0.45);
  box-shadow: inset 0 0 0 1px rgba(47, 138, 87, 0.18);
}

.progress-label {
  color: #66816a;
  font-size: 12px;
  font-weight: 700;
}

.progress-card strong {
  font-size: 16px;
  line-height: 1.2;
}

.progress-card small {
  color: #6c7f67;
  line-height: 1.35;
}

.order-card-current {
  border-color: rgba(199, 90, 42, 0.32);
  box-shadow: inset 0 0 0 1px rgba(199, 90, 42, 0.08);
}

.status-line {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(199, 90, 42, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.requirement-list,
.log-list,
.obstacle-list,
.tip-list,
.order-list {
  display: grid;
  gap: 10px;
}

.requirement-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.requirement-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 245, 224, 0.78);
}

.requirement-icon img,
.cell-icon img,
.obstacle-list-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.requirement-item strong,
.obstacle-meta strong {
  font-weight: 700;
}

.requirement-ready {
  color: var(--success);
}

.requirement-blocked {
  color: var(--warning);
}

.board-frame {
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 244, 185, 0.36), transparent 21%),
    radial-gradient(circle at 88% 90%, rgba(24, 101, 96, 0.18), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--board-teal) 88%, white), var(--board-teal-dark));
  border: 5px solid rgba(28, 121, 113, 0.78);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.18),
    0 10px 0 rgba(21, 94, 91, 0.3),
    0 18px 26px rgba(64, 80, 66, 0.18);
}

.board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--board-teal-dark) 48%, transparent);
}

.cell {
  position: relative;
  min-height: 0;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid rgba(24, 115, 109, 0.16);
  background: rgba(82, 176, 166, 0.92);
  color: var(--text);
  padding: 8px;
  text-align: center;
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
  justify-items: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.cell:hover {
  transform: translateY(-1px);
}

.cell[data-dragging="true"] {
  opacity: 0.5;
}

.cell-selected {
  outline: 3px solid rgba(199, 90, 42, 0.34);
  outline-offset: -3px;
}

.cell-visual {
  position: relative;
  width: min(82px, 91%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 7px 14px rgba(85, 52, 24, 0.14);
}

.cell-icon img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter:
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.32))
    drop-shadow(0 5px 7px rgba(81, 49, 22, 0.2));
}

.cell-icon::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 12%;
  height: 10%;
  border-radius: 50%;
  background: rgba(72, 45, 25, 0.12);
  filter: blur(2px);
  z-index: 0;
}

.cell-icon img,
.producer-level-badge,
.producer-upgrade-badge,
.item-level-badge {
  position: relative;
  z-index: 1;
}

.cell-ground-pastry {
  background: radial-gradient(circle at 35% 25%, #fff2bf, #f5c56b 58%, #d99234);
}

.cell-ground-drink {
  background: radial-gradient(circle at 35% 25%, #e7ffff, #8fd0d2 58%, #4f999f);
}

.cell-ground-decor {
  background: radial-gradient(circle at 35% 25%, #ffe7e7, #e99ca2 58%, #bf5a65);
}

.cell-ground-empty {
  background:
    linear-gradient(135deg, rgba(104, 198, 185, 0.96), rgba(73, 171, 160, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -6px 12px rgba(28, 113, 112, 0.14);
}

.cell-ground-locked {
  background:
    radial-gradient(ellipse at 58% 68%, rgba(174, 114, 54, 0.18), transparent 32%),
    radial-gradient(ellipse at 36% 20%, rgba(255, 251, 218, 0.72), transparent 30%),
    radial-gradient(ellipse at 50% 74%, rgba(176, 111, 51, 0.18), transparent 42%),
    linear-gradient(180deg, var(--tile-cream), #e5b76d 78%, var(--tile-edge));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.52),
    inset 0 -8px 14px rgba(148, 87, 39, 0.16),
    0 4px 0 rgba(142, 89, 47, 0.18);
}

.cell-ground-obstacle {
  background:
    radial-gradient(circle at 38% 20%, rgba(255, 246, 204, 0.95), transparent 34%),
    linear-gradient(180deg, rgba(247, 204, 126, 0.98), rgba(211, 151, 79, 0.94));
}

.cell-ground-producer-pastry {
  background:
    radial-gradient(circle at 34% 22%, #fff5bc, transparent 36%),
    linear-gradient(180deg, #f0bd55, #b9702f);
}

.cell-ground-producer-drink {
  background:
    radial-gradient(circle at 34% 22%, #e9ffff, transparent 36%),
    linear-gradient(180deg, #86cfd0, #3f8b91);
}

.cell-ground-producer-decor {
  background:
    radial-gradient(circle at 34% 22%, #ffe9ed, transparent 36%),
    linear-gradient(180deg, #e99ca2, #ad4f5c);
}

.cell-open {
  background:
    linear-gradient(180deg, rgba(96, 187, 176, 0.98), rgba(69, 160, 151, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -8px 12px rgba(39, 126, 122, 0.14);
}

.cell-locked {
  background:
    radial-gradient(ellipse at 38% 20%, rgba(255, 251, 218, 0.72), transparent 30%),
    linear-gradient(180deg, #f3d693, #d9a45e 82%, #b97843);
  color: #805d42;
}

.cell-fog {
  background:
    radial-gradient(ellipse at 36% 19%, rgba(255, 252, 222, 0.7), transparent 30%),
    radial-gradient(ellipse at 72% 72%, rgba(170, 102, 48, 0.16), transparent 34%),
    linear-gradient(180deg, #f1d997, #dcae69 82%, #b77945);
  border-color: rgba(170, 106, 55, 0.34);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -10px 15px rgba(134, 78, 37, 0.2),
    0 4px 8px rgba(93, 59, 35, 0.12);
}

.cell-ground-unknown {
  background:
    radial-gradient(circle at 30% 62%, rgba(159, 99, 48, 0.14), transparent 18%),
    radial-gradient(circle at 66% 34%, rgba(245, 199, 104, 0.24), transparent 20%),
    radial-gradient(ellipse at 38% 18%, rgba(255, 252, 222, 0.62), transparent 28%),
    linear-gradient(180deg, #f2d996, #dcae69 82%, #b77945);
}

.cell-revealed {
  box-shadow:
    inset 0 0 0 2px rgba(255, 245, 192, 0.36),
    0 0 0 2px rgba(255, 220, 104, 0.22);
}

.cell-produced .cell-visual {
  animation: cell-produced-pop 360ms ease-out both;
}

.cell-merged .cell-visual {
  animation: cell-merged-pop 460ms ease-out both;
}

.cell-cleared {
  animation: cell-cleared-flash 520ms ease-out both;
}

.cell-reveal-pop {
  animation: cell-reveal-pop 520ms ease-out both;
}

.cell-obstacle {
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 235, 179, 0.96), transparent 44%),
    linear-gradient(180deg, rgba(232, 184, 112, 0.96), rgba(194, 132, 76, 0.9));
}

.cell-obstacle-match {
  background:
    radial-gradient(ellipse at 38% 18%, rgba(255, 252, 222, 0.66), transparent 30%),
    linear-gradient(180deg, #f3d893, #d9a45e 80%, #b97843);
}

.cell-obstacle-clearable {
  border-color: rgba(255, 238, 157, 0.92);
  box-shadow:
    inset 0 0 0 2px rgba(255, 244, 183, 0.6),
    0 0 0 3px rgba(255, 188, 70, 0.5),
    0 8px 18px rgba(133, 75, 29, 0.22);
}

.cell-obstacle-clearable::before {
  content: "解";
  position: absolute;
  z-index: 3;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff4a8;
  color: #8a4b10;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(91, 50, 20, 0.18);
}

.locked-requirement-icon {
  position: relative;
  width: 92%;
  height: 92%;
  display: grid;
  place-items: center;
}

.locked-requirement-item {
  width: 74%;
  height: 74%;
  display: grid;
  place-items: center;
  transform: translateY(-2px) rotate(-3deg);
  filter: saturate(1.06) drop-shadow(0 6px 8px rgba(104, 63, 25, 0.22));
}

.locked-requirement-web {
  position: absolute;
  inset: -3%;
  z-index: 1;
  border-radius: 18px;
  background:
    linear-gradient(32deg, transparent 0 42%, rgba(255, 246, 206, 0.86) 43% 45%, transparent 46% 100%),
    linear-gradient(146deg, transparent 0 38%, rgba(255, 246, 206, 0.78) 39% 41%, transparent 42% 100%),
    linear-gradient(90deg, transparent 0 46%, rgba(255, 238, 178, 0.48) 47% 49%, transparent 50% 100%),
    radial-gradient(ellipse at 50% 56%, transparent 0 36%, rgba(255, 246, 206, 0.54) 37% 39%, transparent 40% 100%);
  opacity: 0.88;
  pointer-events: none;
}

.locked-requirement-cover {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -4%;
  height: 42%;
  border-radius: 42% 48% 22% 22% / 68% 70% 28% 28%;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 246, 192, 0.95), transparent 30%),
    linear-gradient(180deg, #f7d890 0%, #d49b56 68%, #b8753d 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.48),
    0 -2px 7px rgba(139, 82, 38, 0.14);
}

.locked-requirement-cover::after {
  content: "";
  position: absolute;
  inset: 42% 10% auto 12%;
  height: 2px;
  border-radius: 999px;
  background: rgba(143, 90, 46, 0.2);
}

.locked-requirement-badge {
  position: absolute;
  right: -3px;
  bottom: 2px;
  z-index: 2;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff2bf;
  border: 2px solid rgba(168, 104, 48, 0.24);
  color: #8a4b10;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(105, 61, 26, 0.2);
}

.cell-item::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
}

.cell-producer {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.7), transparent 32%),
    linear-gradient(180deg, rgba(102, 198, 185, 0.98), rgba(43, 140, 134, 0.96));
  border: 2px solid rgba(40, 104, 100, 0.44);
  box-shadow:
    inset 0 -8px 0 rgba(49, 99, 84, 0.2),
    0 7px 0 rgba(49, 114, 103, 0.42);
}

.cell-producer::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 8px;
  border-radius: 999px;
  background: rgba(50, 57, 40, 0.22);
}

.cell-producer-body {
  z-index: 1;
  border: 2px solid rgba(255, 255, 255, 0.48);
  transform: translateY(-2px);
}

.cell-producer-base {
  z-index: 1;
  width: 62%;
  height: 10px;
  margin-top: -7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8f5a32, #5f3922);
  box-shadow:
    inset 0 2px 0 rgba(255, 232, 186, 0.26),
    0 3px 0 rgba(72, 48, 30, 0.28);
}

.producer-level-badge {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  min-width: 34px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #fff8db;
  color: #7d3d16;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(70, 43, 20, 0.2);
}

.item-level-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  min-width: 32px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 248, 219, 0.95);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(70, 43, 20, 0.18);
}

.producer-status-dot {
  position: absolute;
  left: 9px;
  bottom: 9px;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2f8a57;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.producer-ready {
  outline: 2px solid rgba(255, 241, 178, 0.86);
  outline-offset: -5px;
}

.producer-upgrade-ready {
  border-color: rgba(255, 236, 135, 0.96);
  box-shadow:
    inset 0 -8px 0 rgba(49, 99, 84, 0.18),
    0 0 0 3px rgba(255, 229, 105, 0.42),
    0 0 24px rgba(255, 211, 82, 0.42),
    0 7px 0 rgba(49, 114, 103, 0.42);
}

.producer-upgrade-ready .cell-producer-body {
  animation: producer-upgrade-pulse 1.2s ease-in-out infinite;
}

.producer-upgrade-badge {
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 3;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7b8, #f2aa35);
  color: #6d3510;
  font-size: 11px;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 4px 9px rgba(111, 63, 22, 0.24);
}

.producer-ready .cell-state-chip {
  color: #1d7658;
}

.producer-paused {
  filter: saturate(0.82);
}

@keyframes producer-upgrade-pulse {
  0%,
  100% {
    transform: translateY(-2px) scale(1);
    filter: drop-shadow(0 3px 5px rgba(81, 49, 22, 0.14));
  }
  50% {
    transform: translateY(-5px) scale(1.05);
    filter: drop-shadow(0 8px 12px rgba(177, 104, 26, 0.28));
  }
}

@keyframes cell-produced-pop {
  0% {
    transform: scale(0.72) translateY(8px);
    opacity: 0.28;
  }
  72% {
    transform: scale(1.08) translateY(-2px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes cell-merged-pop {
  0% {
    transform: scale(0.88);
  }
  50% {
    transform: scale(1.14);
    filter: drop-shadow(0 0 12px rgba(255, 231, 119, 0.7));
  }
  100% {
    transform: scale(1);
  }
}

@keyframes cell-cleared-flash {
  0% {
    filter: brightness(1.28);
    transform: scale(1.04);
  }
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

@keyframes cell-reveal-pop {
  0% {
    opacity: 0.42;
    transform: scale(0.88);
  }
  70% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.cell-pastry::after {
  background: var(--pastry);
}

.cell-drink::after {
  background: var(--drink);
}

.cell-decor::after {
  background: var(--decor);
}

.cell-caption {
  display: none;
  gap: 4px;
  justify-items: center;
  width: 100%;
}

.obstacle-list-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 245, 224, 0.78);
}

.cell-tag,
.cell-level,
.mini-tag,
.cell-state-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.cell-tag {
  background: rgba(255, 255, 255, 0.65);
}

.cell-state-chip {
  max-width: 100%;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-pastry,
.cell-pastry {
  color: #7e4a00;
}

.tag-drink,
.cell-drink {
  color: #136f74;
}

.tag-decor,
.cell-decor {
  color: #9e4040;
}

.cell-level {
  background: rgba(76, 47, 26, 0.08);
}

.cell-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.cell-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.action-row button:only-child {
  grid-column: 1 / -1;
}

.obstacle-name {
  font-weight: 700;
}

.order-subtext,
.obstacle-note,
.tip-list li,
.log-item,
.empty-note {
  color: var(--muted);
  line-height: 1.5;
}

.obstacle-card {
  display: grid;
  gap: 10px;
}

.obstacle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mini-tag {
  background: rgba(199, 90, 42, 0.12);
  color: var(--accent);
}

.tip-list {
  margin: 0;
  padding-left: 18px;
}

.log-item {
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(78, 44, 18, 0.4);
  backdrop-filter: blur(6px);
}

.result-card {
  width: min(520px, 100%);
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff5e7, #f4d7a8);
  box-shadow: 0 22px 50px rgba(84, 46, 18, 0.22);
  border: 1px solid rgba(153, 92, 39, 0.16);
}

.result-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.result-grid article {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-stack {
  display: grid;
  gap: 12px;
}

.tutorial-layer {
  position: fixed;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  --tutorial-target-left: 50vw;
  --tutorial-target-top: 50vh;
  --tutorial-target-width: 72px;
  --tutorial-target-height: 72px;
}

.tutorial-scrim {
  position: absolute;
  inset: 0;
  background: rgba(38, 24, 16, 0.24);
}

.tutorial-spotlight,
.tutorial-hand {
  position: absolute;
  left: var(--tutorial-target-left);
  top: var(--tutorial-target-top);
}

.tutorial-layer[data-anchor-ready="false"] .tutorial-spotlight,
.tutorial-layer[data-anchor-ready="false"] .tutorial-hand {
  opacity: 0;
}

.tutorial-spotlight {
  width: var(--tutorial-target-width);
  height: var(--tutorial-target-height);
  border-radius: 20px;
  border: 3px solid rgba(255, 244, 162, 0.95);
  box-shadow:
    0 0 0 999px rgba(43, 26, 15, 0.08),
    0 0 24px rgba(255, 214, 95, 0.82);
  transform: translate(-50%, -50%);
}

.tutorial-hand {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff5da;
  border: 2px solid rgba(140, 78, 33, 0.18);
  box-shadow: 0 10px 22px rgba(68, 40, 22, 0.22);
  font-size: 30px;
  animation: tutorial-hand-tap 760ms ease-in-out infinite alternate;
}

.tutorial-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 28px));
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 250, 236, 0.98);
  color: var(--text);
  border: 1px solid rgba(143, 78, 33, 0.2);
  box-shadow: 0 14px 34px rgba(65, 39, 21, 0.24);
  transform: translateX(-50%);
}

.tutorial-bubble strong {
  display: block;
  color: var(--accent);
  font-size: 13px;
}

.tutorial-bubble p {
  margin: 5px 0 0;
  line-height: 1.45;
  font-weight: 700;
}

.tutorial-layer-nudge .tutorial-bubble {
  animation: tutorial-nudge 220ms ease-in-out 2;
}

@keyframes tutorial-hand-tap {
  from {
    transform: translate(-50%, -50%) translate(8px, 8px) scale(0.96);
  }
  to {
    transform: translate(-50%, -50%) translate(14px, 14px) scale(1.04);
  }
}

@keyframes tutorial-nudge {
  0%,
  100% {
    transform: translateX(-50%);
  }
  50% {
    transform: translateX(calc(-50% + 8px));
  }
}

.section-spacer {
  margin-top: 12px;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout > .panel:nth-child(2) {
    order: -1;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #app {
    padding: 10px 10px 18px;
  }

  .hero {
    padding: 14px;
    border-radius: 18px;
  }

  .hero-top {
    gap: 8px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero p {
    font-size: 14px;
    line-height: 1.35;
  }

  .panel {
    padding: 12px;
    border-radius: 18px;
  }

  .board {
    gap: 5px;
  }

  .cell {
    min-height: 66px;
    border-radius: 15px;
    padding: 5px;
  }

  .cell-visual {
    width: min(44px, 90%);
    border-radius: 14px;
  }

  .cell-title {
    font-size: 13px;
  }

  .cell-state-chip {
    font-size: 10px;
    padding: 3px 5px;
  }

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

  .stat-card {
    padding: 9px 8px;
    border-radius: 14px;
  }

  .stat-value {
    font-size: 20px;
  }

  .board-frame {
    padding: 10px;
    border-radius: 18px;
  }

  .action-row,
  .result-grid {
    grid-template-columns: 1fr;
  }
}

.game-stage {
  position: relative;
  display: grid;
  gap: 12px;
  isolation: isolate;
}

.game-stage > :not(.scene-backdrop):not(.tutorial-layer):not(.overlay):not(.result-overlay) {
  position: relative;
  z-index: 1;
}

.scene-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.scene-backdrop span {
  position: absolute;
  display: block;
}

.scene-cloud {
  width: 190px;
  height: 54px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 46%, rgba(255, 255, 255, 0.88) 0 28%, transparent 29%),
    radial-gradient(circle at 44% 28%, rgba(255, 255, 255, 0.82) 0 32%, transparent 33%),
    radial-gradient(circle at 68% 46%, rgba(255, 255, 255, 0.78) 0 30%, transparent 31%);
  filter: blur(0.2px);
}

.scene-cloud-left {
  top: 7vh;
  left: 4vw;
  opacity: 0.62;
}

.scene-cloud-right {
  top: 10vh;
  right: 6vw;
  opacity: 0.46;
  transform: scale(0.82);
}

.scene-statue {
  left: max(18px, 8vw);
  top: 10vh;
  width: 170px;
  height: 280px;
  opacity: 0.28;
  filter: blur(1px);
  background:
    radial-gradient(ellipse at 50% 12%, #a77a52 0 18%, transparent 19%),
    linear-gradient(90deg, transparent 0 40%, #9c724f 41% 59%, transparent 60%),
    radial-gradient(ellipse at 50% 60%, #9f7350 0 34%, transparent 35%),
    linear-gradient(180deg, transparent 0 72%, #8d6649 73% 100%);
}

.scene-shop {
  right: max(18px, 7vw);
  top: 14vh;
  width: 210px;
  height: 170px;
  opacity: 0.34;
  filter: blur(0.7px);
  border-radius: 28px 28px 12px 12px;
  background:
    linear-gradient(135deg, transparent 0 18%, rgba(255, 245, 196, 0.72) 19% 100%),
    linear-gradient(180deg, #f8cf77 0 22%, #d88954 23% 100%);
  box-shadow: inset 0 -42px 0 rgba(149, 87, 56, 0.28);
}

.scene-tree {
  width: 220px;
  height: 190px;
  border-radius: 50% 50% 40% 40%;
  background:
    radial-gradient(circle at 30% 62%, rgba(82, 159, 77, 0.66) 0 30%, transparent 31%),
    radial-gradient(circle at 54% 42%, rgba(101, 184, 92, 0.72) 0 36%, transparent 37%),
    radial-gradient(circle at 76% 66%, rgba(73, 145, 73, 0.64) 0 28%, transparent 29%);
  filter: blur(1px);
}

.scene-tree-left {
  left: -42px;
  top: 28vh;
}

.scene-tree-right {
  right: -54px;
  top: 29vh;
}

.scene-garland {
  left: 50%;
  top: 7px;
  width: min(760px, 86vw);
  height: 42px;
  transform: translateX(-50%);
  border-bottom: 4px solid rgba(102, 141, 66, 0.28);
  border-radius: 0 0 50% 50%;
}

.scene-garland::before,
.scene-garland::after {
  content: "";
  position: absolute;
  top: 28px;
  width: 100%;
  height: 12px;
  background:
    radial-gradient(circle, #ffdc70 0 4px, transparent 5px) 0 0 / 42px 12px repeat-x,
    radial-gradient(circle, #ee7b69 0 4px, transparent 5px) 21px 0 / 42px 12px repeat-x;
}

.scene-counter {
  left: 0;
  right: 0;
  bottom: 39vh;
  height: 24px;
  background:
    linear-gradient(180deg, rgba(255, 205, 103, 0.96), rgba(223, 139, 51, 0.96));
  box-shadow:
    0 6px 0 rgba(142, 77, 32, 0.22),
    0 16px 24px rgba(109, 63, 33, 0.16);
}

.hud-bar {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(360px, 1.8fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(255, 212, 96, 0.28), transparent 16% 84%, rgba(255, 212, 96, 0.22)),
    linear-gradient(135deg, rgba(255, 250, 235, 0.92), rgba(255, 225, 179, 0.82)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0));
  box-shadow: var(--shadow);
  border: 1px solid rgba(146, 91, 45, 0.14);
  backdrop-filter: blur(10px);
}

.hud-bar::before {
  content: "";
  position: absolute;
  inset: 6px 10px auto;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #e8574f 0 12%, #ffd86d 12% 24%, #55b87f 24% 36%, #e8574f 36% 48%, #ffd86d 48% 60%, #55b87f 60% 72%, #e8574f 72% 84%, #ffd86d 84% 100%);
  opacity: 0.72;
}

.hud-title h1 {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 1.08;
}

.hud-stats {
  align-items: stretch;
}

.hud-actions {
  justify-content: flex-end;
}

.order-stage {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  padding: 10px 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 244, 221, 0.86), rgba(236, 184, 111, 0.8));
  box-shadow: var(--shadow);
  border: 1px solid rgba(146, 91, 45, 0.14);
  backdrop-filter: blur(8px);
}

.customer-portrait {
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, #f9fff4, #f0dca8 58%, #c47847);
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.78),
    0 12px 20px rgba(99, 57, 26, 0.18);
  overflow: hidden;
}

.portrait-avatar {
  position: relative;
  width: 78%;
  height: 82%;
  display: block;
}

.portrait-ribbon {
  position: absolute;
  left: 30%;
  top: 3%;
  width: 42%;
  height: 18%;
  z-index: 3;
}

.portrait-ribbon::before,
.portrait-ribbon::after {
  content: "";
  position: absolute;
  top: 20%;
  width: 45%;
  height: 62%;
  border-radius: 58% 42% 52% 48%;
  background: linear-gradient(180deg, #ffcf63, #e86f56);
  box-shadow: 0 2px 0 rgba(121, 56, 38, 0.12);
}

.portrait-ribbon::before {
  left: 2%;
  transform: rotate(-24deg);
}

.portrait-ribbon::after {
  right: 2%;
  transform: rotate(24deg);
}

.portrait-hair {
  position: absolute;
  left: 12%;
  right: 10%;
  top: 1%;
  height: 46%;
  border-radius: 48% 52% 42% 42%;
  background:
    linear-gradient(135deg, rgba(255, 183, 118, 0.72), transparent 28%),
    linear-gradient(180deg, #c95231, #8b2f27);
  box-shadow:
    -10px 12px 0 -5px #b9442d,
    12px 13px 0 -5px #9e382d;
}

.portrait-head {
  position: absolute;
  left: 21%;
  top: 22%;
  width: 56%;
  height: 48%;
  border-radius: 46% 48% 52% 52%;
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.52), transparent 15%),
    linear-gradient(180deg, #ffd4a0, #f1a86f);
  box-shadow:
    inset 0 -4px 0 rgba(191, 104, 66, 0.12),
    0 5px 9px rgba(85, 48, 26, 0.18);
}

.portrait-eye {
  position: absolute;
  top: 38%;
  width: 7px;
  height: 9px;
  border-radius: 50%;
  background: #3b694e;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.portrait-eye-left {
  left: 28%;
}

.portrait-eye-right {
  right: 28%;
}

.portrait-smile {
  position: absolute;
  left: 36%;
  bottom: 21%;
  width: 28%;
  height: 12%;
  border-bottom: 3px solid rgba(128, 66, 44, 0.78);
  border-radius: 0 0 999px 999px;
}

.portrait-apron {
  position: absolute;
  left: 20%;
  right: 17%;
  bottom: 2%;
  height: 32%;
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(90deg, transparent 0 19%, rgba(255, 244, 210, 0.86) 20% 25%, transparent 26% 74%, rgba(255, 244, 210, 0.86) 75% 80%, transparent 81%),
    linear-gradient(180deg, #70b7bd, #338a92);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.26);
}

.portrait-tray {
  position: absolute;
  left: 10%;
  right: 8%;
  bottom: -1%;
  height: 12%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 36% 38%, #e4a443 0 8%, transparent 9%),
    radial-gradient(circle at 54% 38%, #f7c66a 0 9%, transparent 10%),
    linear-gradient(180deg, #fff2cc, #c98c4b);
  box-shadow: 0 4px 8px rgba(80, 45, 24, 0.16);
}

.order-ticket {
  min-width: 0;
}

.order-ticket h2,
.stage-heading h2 {
  margin: 0;
  font-size: 18px;
}

.order-stage .order-card {
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(255, 253, 244, 0.96), rgba(255, 244, 224, 0.9));
  border-color: rgba(177, 101, 46, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 14px rgba(97, 56, 28, 0.1);
}

.play-layout {
  grid-template-columns: minmax(640px, 820px) minmax(260px, 340px);
  grid-template-areas: "board side";
  justify-content: center;
}

.board-stage {
  grid-area: board;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 251, 234, 0.92), rgba(255, 238, 205, 0.84));
}

.board-stage::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 18px;
  border-radius: 0 0 14px 14px;
  background:
    repeating-linear-gradient(90deg, #ed6452 0 34px, #fff4c8 34px 68px, #54af83 68px 102px);
  opacity: 0.82;
  box-shadow: 0 4px 10px rgba(112, 61, 31, 0.12);
}

.side-rail {
  grid-area: side;
  display: grid;
  gap: 14px;
}

.side-rail .order-stage,
.side-rail .progress-stage {
  box-shadow: var(--shadow);
}

.side-rail .order-stage {
  grid-template-columns: 76px minmax(0, 1fr);
  padding: 10px;
}

.side-rail .customer-portrait {
  width: 76px;
}

.side-rail .progress-header {
  grid-template-columns: 1fr;
}

.side-rail .progress-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.stage-heading span {
  color: var(--muted);
  font-size: 13px;
}

.tool-dock {
  display: none;
}

.dock-button,
.help-close {
  border: 0;
  cursor: pointer;
}

.help-card {
  width: min(620px, calc(100vw - 32px));
  position: relative;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, #f7fffb, #e4f5ef);
  border: 5px solid #15937f;
  box-shadow: 0 18px 42px rgba(12, 76, 67, 0.32);
}

.help-card h3 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 30px;
  color: #187b70;
}

.help-card p {
  margin: 0 0 18px;
  text-align: center;
  color: #557a70;
}

.help-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e7fff7;
  color: #15937f;
  font-size: 34px;
  line-height: 1;
}

.chain-book {
  display: grid;
  gap: 14px;
}

.chain-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(177, 217, 206, 0.35);
}

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

.chain-item {
  min-width: 0;
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.chain-item img {
  width: 42px;
  height: 42px;
}

.chain-item small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.chain-item-locked {
  opacity: 0.72;
}

@media (max-width: 1024px) {
  .hud-bar {
    grid-template-columns: 1fr;
  }

  .play-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "board"
      "side";
  }

  .board-stage {
    grid-area: board;
  }

  .side-rail {
    grid-area: side;
  }

  .progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  html,
  body {
    min-height: 100%;
    overflow-x: hidden;
  }

  #app {
    padding: 0 0 10px;
  }

  .app-shell {
    max-width: 430px;
  }

  .game-stage {
    gap: 8px;
    min-height: 100dvh;
    padding-bottom: 86px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 220px),
      linear-gradient(180deg, rgba(255, 244, 216, 0.18), rgba(150, 84, 51, 0.12));
  }

  .scene-statue,
  .scene-shop,
  .scene-tree {
    opacity: 0.18;
    transform: scale(0.78);
  }

  .scene-cloud {
    opacity: 0.28;
  }

  .scene-garland {
    top: 0;
    width: 96vw;
    opacity: 0.52;
  }

  .scene-counter {
    bottom: 37vh;
    height: 16px;
  }

  .hud-bar {
    grid-template-columns: minmax(118px, 0.9fr) minmax(0, 2.1fr);
    gap: 6px;
    align-items: center;
    padding: calc(7px + env(safe-area-inset-top)) 8px 7px;
    border-radius: 0 0 16px 16px;
  }

  .hud-title {
    min-width: 0;
  }

  .hud-title h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .market-pill {
    max-width: 100%;
    padding: 5px 7px;
    font-size: 11px;
    line-height: 1.1;
    justify-content: center;
    white-space: normal;
  }

  .market-pill::before {
    display: none;
  }

  .hud-stats {
    grid-column: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .stat-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 5px 4px;
    border-radius: 12px;
  }

  .stat-card::before {
    display: none;
  }

  .stat-label,
  .stat-value {
    grid-column: 1;
  }

  .stat-label {
    font-size: 10px;
    line-height: 1;
  }

  .stat-value {
    margin-top: 3px;
    font-size: 15px;
    line-height: 1.05;
  }

  .order-stage {
    grid-template-columns: 64px minmax(0, 1fr);
    margin: 0 10px;
    padding: 6px;
    border-radius: 16px;
  }

  .progress-stage {
    margin: 0 10px;
    padding: 7px 9px;
    border-radius: 16px;
  }

  .progress-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: center;
    margin-bottom: 0;
  }

  .progress-header h2 {
    font-size: 14px;
  }

  .progress-header p {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.28;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .upgrade-button {
    width: auto;
    min-width: 82px;
    padding: 7px 9px;
    border-radius: 12px;
    font-size: 12px;
  }

  .progress-actions {
    display: none;
  }

  .next-action-button {
    min-width: 96px;
    padding: 7px 9px;
    border-radius: 12px;
    font-size: 12px;
  }

  .guide-strip {
    display: none;
  }

  .progress-grid {
    display: none;
  }

  .customer-portrait {
    width: 60px;
  }

  .portrait-eye {
    width: 5px;
    height: 7px;
  }

  .portrait-smile {
    border-bottom-width: 2px;
  }

  .order-ticket h2 {
    display: none;
  }

  .order-stage .order-card {
    margin: 0;
    padding: 7px 9px;
    border-radius: 14px;
  }

  .order-stage .order-card h3,
  .order-stage .order-subtext {
    display: none;
  }

  .order-stage .requirement-list {
    gap: 6px;
  }

  .order-stage .requirement-item {
    grid-template-columns: 30px 1fr auto;
  }

  .order-button {
    margin-top: 6px;
    width: 100%;
    padding: 8px 10px;
  }

  .layout {
    margin: 0 10px;
  }

  .board-stage {
    padding: 8px;
    border-radius: 16px;
  }

  .stage-heading {
    margin-bottom: 6px;
  }

  .stage-heading h2 {
    font-size: 16px;
  }

  .stage-heading span {
    font-size: 12px;
  }

  .board-frame {
    padding: 5px;
    border-radius: 16px;
  }

  .board {
    gap: 3px;
  }

  .cell {
    min-height: clamp(43px, 12vw, 54px);
    border-radius: 12px;
    padding: 3px 2px;
    grid-template-rows: 1fr;
  }

  .cell-visual {
    width: min(43px, 94%);
    border-radius: 11px;
  }

  .producer-level-badge {
    top: 3px;
    right: 3px;
    min-width: 28px;
    padding: 2px 5px;
    font-size: 10px;
  }

  .producer-upgrade-badge {
    bottom: 1px;
    height: 12px;
    padding: 0 4px;
    font-size: 8px;
    line-height: 12px;
  }

  .cell-producer-base {
    width: 58%;
    height: 7px;
    margin-top: -8px;
  }

  .cell-caption {
    display: none;
  }

  .item-level-badge {
    right: 3px;
    bottom: 3px;
    min-width: 27px;
    padding: 2px 4px;
    font-size: 10px;
  }

  .producer-status-dot {
    left: 5px;
    bottom: 5px;
    width: 8px;
    height: 8px;
  }

  .side-panel {
    display: none;
  }

  .obstacle-panel {
    display: none;
  }

  .action-panel {
    display: none;
  }

  .tool-dock {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    width: min(430px, 100vw);
    transform: translateX(-50%);
    z-index: 20;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 54px 54px;
    gap: 8px;
    align-items: center;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(135, 86, 54, 0), rgba(129, 74, 44, 0.86) 18%, rgba(115, 68, 42, 0.96));
  }

  .dock-button {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    gap: 0;
    border-radius: 15px;
    background: linear-gradient(180deg, #f7fbff, #75b5e7);
    color: #235985;
    box-shadow: 0 5px 0 #3478ab, 0 8px 16px rgba(41, 48, 54, 0.22);
    font-size: 11px;
    font-weight: 700;
  }

  .dock-icon {
    font-size: 22px;
    line-height: 1;
  }

  .dock-hint {
    min-height: 54px;
    display: grid;
    align-items: center;
    padding: 8px 12px;
    border-radius: 16px;
    background: rgba(255, 248, 233, 0.95);
    color: #876148;
    text-align: center;
    font-size: 13px;
    line-height: 1.3;
    box-shadow: inset 0 0 0 1px rgba(132, 78, 34, 0.12);
  }

  .dock-hint-action {
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, #fff8dd, #ffd88c);
    color: #6f3c16;
    font-weight: 800;
    box-shadow:
      inset 0 0 0 1px rgba(176, 96, 28, 0.2),
      0 5px 0 rgba(163, 88, 38, 0.34),
      0 10px 18px rgba(51, 36, 24, 0.2);
  }

  .help-card {
    width: calc(100vw - 28px);
    max-height: min(78vh, 720px);
    overflow: auto;
    padding: 22px 16px 18px;
    border-radius: 24px;
  }

  .chain-row {
    grid-template-columns: 1fr;
  }
}
