:root {
  --ink: #3b2a20;
  --ink-soft: #7d6a5c;
  --bg: #f5ede2;
  --paper: #fffdf8;
  --line: #eadccb;
  --brick: #c8502a;
  --brick-dark: #96381b;
  --sea: #3f8fb4;
  --leaf: #4f8a45;
  --gold: #f5b82e;
  --wood: #c99a66;
  --font: "Zen Maru Gothic", system-ui, sans-serif;
  --hand: "Kiwi Maru", "Zen Maru Gothic", serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 500; line-height: 1.7; line-break: strict; overflow-x: hidden; }
[hidden] { display: none !important; }
button { font-family: var(--font); }

.g-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; max-width: 560px; margin: 0 auto; font-size: 13px; font-weight: 900; }
.g-brand { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.g-title { flex: 1; text-align: center; white-space: nowrap; }
.g-head [data-mg-account] a { color: var(--brick-dark); text-decoration: none; }
main { max-width: 560px; margin: 0 auto; padding: 0 10px 24px; }

/* 上: 店の絵と数字 */
.top { display: flex; align-items: center; gap: 6px; padding: 4px; background: var(--paper); border-radius: 16px; box-shadow: 0 4px 14px rgba(59, 42, 32, 0.08); }
.scene { flex: none; display: block; width: 84px; height: 46px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #bfe3f2; cursor: pointer; }
.scene svg { display: block; width: 100%; height: 100%; }
.scene.shine { animation: shine 1.2s ease-out; }
.top-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.top-row { display: flex; align-items: center; gap: 4px; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 4px; border-radius: 999px; background: var(--bg); font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.5; white-space: nowrap; }
.pill svg { width: 18px; height: 18px; display: block; }
.pill b { font-size: 15px; }
.pill small { font-size: 11px; }
.pill.bump { animation: bump 0.45s ease-out; }
@keyframes bump { 30% { transform: scale(1.25); } }
.goal { min-width: 0; padding-right: 2px; }
.goal-text { margin: 0 0 2px; font-size: 11px; font-weight: 900; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.goal-track { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.goal-track span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width 0.4s; }
.btn-repair { flex: none; align-self: stretch; padding: 4px 9px; border: 0; border-radius: 12px; background: var(--line); color: var(--ink-soft); font-weight: 900; font-size: 12px; line-height: 1.25; white-space: nowrap; cursor: pointer; }
.btn-repair.ready { background: var(--brick); color: #fff; box-shadow: 0 3px 0 var(--brick-dark); animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { transform: translateY(-1px) scale(1.04); } }

/* 注文（今日のお客さんは金色の札で先頭に） */
.orders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 6px; }
.orders.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.orders.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.od { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 3px 5px; border-radius: 14px; background: var(--paper); border: 2px solid var(--line); min-width: 0; }
.od.sp { background: linear-gradient(#fff4d6, #fffaf0); border-color: #f0cf7a; }
.od.sp .od-who { color: #a8650f; }
.od-tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 900; color: #fff; background: #d08a2c; border-radius: 999px; padding: 0 6px; line-height: 1.5; white-space: nowrap; }
.od.can { border-color: #8cc46e; background: #f3faee; }
.od.wait { opacity: 0.6; }
.od-head { display: flex; align-items: center; gap: 4px; width: 100%; padding: 0 2px; }
.od:not(.sp) .od-head { padding-right: 12px; }
.od-face { flex: none; padding: 0; border: 0; background: none; cursor: pointer; }
.od-face svg { width: 24px; height: 24px; display: block; }
.od-who { flex: 1; min-width: 0; font-size: 10px; letter-spacing: -0.03em; font-weight: 900; line-height: 1.2; color: var(--ink-soft); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.od-skip { position: absolute; top: -8px; right: -6px; width: 24px; height: 24px; padding: 0; border: 1.5px solid var(--line); border-radius: 50%; background: var(--paper); color: #b6a596; cursor: pointer; display: grid; place-items: center; }
.od-skip svg { width: 11px; height: 11px; }
.od-items { display: flex; gap: 2px; justify-content: center; }
.oi { position: relative; width: 36px; height: 36px; border-radius: 10px; background: var(--bg); cursor: pointer; }
.orders.n4 .oi { width: 33px; height: 33px; }
.oi svg { width: 100%; height: 100%; display: block; }
.oi.ok::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; border: 1.5px solid #fff; }
.od-rw { font-size: 10px; font-weight: 900; color: var(--ink-soft); display: flex; align-items: center; gap: 2px; line-height: 1.3; white-space: nowrap; }
.od-rw svg { width: 12px; height: 12px; }
.btn-give { width: 100%; margin-top: 2px; padding: 6px 2px; border: 0; border-radius: 10px; background: var(--brick); color: #fff; font-weight: 900; font-size: 13px; line-height: 1.2; cursor: pointer; box-shadow: 0 2px 0 var(--brick-dark); white-space: nowrap; }
.btn-give:disabled { background: #e8ddd0; color: #a8978a; box-shadow: none; cursor: default; font-size: 11px; }
.od.bounce { animation: cheer 0.55s ease-out; }
@keyframes cheer { 25% { transform: translateY(-6px) scale(1.04); } 55% { transform: translateY(1px); } }
.od.enter { animation: enter 0.35s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(-8px) scale(0.92); } }

/* 盤（縦に収まる大きさ。小さい画面でも、注文・盤・道具箱が1画面に入るように） */
.board-wrap { width: 100%; max-width: clamp(196px, calc((100vh - 316px) * 0.875), 560px); max-width: clamp(196px, calc((100svh - 316px) * 0.875), 560px); margin: 6px auto 0; padding: 5px; border-radius: 16px; background: #e2c49c; box-shadow: inset 0 0 0 3px #d2ad7e; }
.board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.cell { position: relative; aspect-ratio: 1; border-radius: 10px; background: #f7ead6; box-shadow: inset 0 -2px 0 rgba(150, 110, 70, 0.18); }
.cell:nth-child(odd) { background: #f3e2ca; }
.cell .it { position: absolute; inset: 5%; display: block; transition: transform 0.12s; }
.cell .it svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.cell .lv { position: absolute; left: 2px; bottom: 1px; font-size: 9px; font-weight: 900; color: #8a6a50; line-height: 1; pointer-events: none; }
.cell[data-l="5"] .it, .cell[data-l="6"] .it, .cell[data-l="7"] .it, .cell[data-l="8"] .it { filter: drop-shadow(0 0 2px rgba(255, 200, 60, 0.9)); }
.cell.want::after { content: ""; position: absolute; right: 1px; top: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; pointer-events: none; }
.cell.sel { box-shadow: inset 0 0 0 3px var(--sea); background: #e6f3f8; }
.cell.mate { box-shadow: inset 0 0 0 2px rgba(63, 143, 180, 0.55); }
.cell.lift .it { opacity: 0.25; }
.cell.tgt { box-shadow: inset 0 0 0 3px #b6a596; }
.cell.tgt-m { box-shadow: inset 0 0 0 3px var(--gold); background: #fff6d8; }
.cell.tgt-m .it { transform: scale(1.1); }
.cell.pop .it { animation: pop 0.5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(0.35); } 55% { transform: scale(1.28); } 100% { transform: scale(1); } }
.cell.appear .it { animation: appear 0.38s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes appear { 0% { transform: scale(0.2) translateY(30%); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.cell.shake .it { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.drag-ghost { position: fixed; z-index: 70; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(59, 42, 32, 0.35)); transition: none; }
.drag-ghost svg { width: 100%; height: 100%; display: block; }
.drag-ghost.snap { transition: left 0.09s ease-in, top 0.09s ease-in, transform 0.09s ease-in; transform: scale(0.8); }

/* 効果（合体の光・粒・文字） */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 65; overflow: hidden; }
.ring { position: absolute; border-radius: 50%; border: 3px solid var(--gold); animation: ring 0.55s ease-out forwards; }
@keyframes ring { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.flash { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 246, 200, 0.95), rgba(255, 220, 120, 0) 70%); animation: flash 0.45s ease-out forwards; }
@keyframes flash { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.pt { position: absolute; width: 8px; height: 8px; border-radius: 50%; animation: pt 0.6s ease-out forwards; }
.pt.st { border-radius: 2px; transform: rotate(45deg); }
@keyframes pt { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(0.3); opacity: 0; } }
.float { position: absolute; transform: translate(-50%, 0); font-weight: 900; font-size: 13px; color: var(--brick-dark); white-space: nowrap; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; animation: float 1.1s ease-out forwards; }
.float.big { font-size: 16px; color: #b0700a; }
@keyframes float { from { transform: translate(-50%, 6px); opacity: 0; } 15% { opacity: 1; } to { transform: translate(-50%, -34px); opacity: 0; } }
.fly { position: absolute; pointer-events: none; }
.fly svg { width: 100%; height: 100%; display: block; }

/* 選んだものの説明 */
.info { display: flex; align-items: center; gap: 6px; min-height: 50px; margin-top: 6px; padding: 4px 6px; border-radius: 14px; background: var(--paper); }
.info-art { flex: none; width: 42px; height: 42px; }
.info-art svg { width: 100%; height: 100%; display: block; }
.info-txt { flex: 1; min-width: 0; line-height: 1.3; }
.info-txt b { display: block; font-size: 14px; }
.info-txt small { display: block; font-size: 11px; color: var(--ink-soft); word-break: keep-all; overflow-wrap: anywhere; }
.info.none .info-art, .info.none .btn-s { display: none; }
.info.none .info-txt small { font-size: 12px; font-weight: 700; text-align: center; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.info.none .info-txt b { display: none; }
.btn-s { flex: none; padding: 7px 10px; border: 0; border-radius: 10px; background: var(--sea); color: #fff; font-weight: 900; font-size: 12px; line-height: 1.25; cursor: pointer; white-space: nowrap; text-align: center; }
.btn-s small { display: block; font-size: 10px; opacity: 0.9; }
.btn-s.soft { background: var(--paper); color: var(--brick-dark); box-shadow: inset 0 0 0 2px #e6c9b8; }
.btn-s:disabled { opacity: 0.45; cursor: default; }

/* 道具箱 */
.boxes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.bx { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 2px 5px; border: 0; border-radius: 14px; background: var(--paper); box-shadow: 0 3px 0 #e2d2be; cursor: pointer; color: var(--ink); min-width: 0; }
.bx:active { transform: translateY(2px); box-shadow: 0 1px 0 #e2d2be; }
.bx .bx-art { width: 42px; height: 42px; }
.bx .bx-art svg { width: 100%; height: 100%; display: block; }
.bx .bx-n { position: absolute; top: -5px; right: -3px; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--brick); color: #fff; font-size: 12px; font-weight: 900; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.bx .bx-name { font-size: 10px; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.bx .bx-t { font-size: 9px; color: var(--ink-soft); line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.bx.zero { background: #f0e8de; }
.bx.zero .bx-art { opacity: 0.45; }
.bx.zero .bx-n { background: #b6a596; }
.bx.locked { background: transparent; box-shadow: inset 0 0 0 2px var(--line); cursor: default; }
.bx.locked .bx-art { opacity: 0.18; filter: grayscale(1); }
.bx.tap .bx-art { animation: tapbox 0.25s ease-out; }
@keyframes tapbox { 40% { transform: scale(0.86) rotate(-4deg); } }

/* しまう箱 */
.store-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.store-lbl { flex: none; font-size: 11px; font-weight: 900; color: var(--ink-soft); writing-mode: horizontal-tb; white-space: nowrap; }
.store { display: flex; flex-wrap: wrap; gap: 4px; }
.sl { width: 36px; height: 36px; padding: 2px; border-radius: 10px; border: 2px dashed #d8c6b0; background: transparent; cursor: default; }
.sl.has { border: 2px solid var(--line); background: var(--paper); cursor: pointer; }
.sl svg { width: 100%; height: 100%; display: block; pointer-events: none; }

/* メニュー */
.menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.menu button { position: relative; padding: 10px 2px; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); font-weight: 900; font-size: 13px; line-height: 1.2; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 0 #e2d2be; }
.badge:empty { min-width: 12px; width: 12px; height: 12px; padding: 0; }
.badge { position: absolute; top: -5px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #4a3200; font-size: 11px; line-height: 18px; }

.records { margin: 14px 2px 0; font-size: 12px; color: var(--ink-soft); text-align: center; }
.panel { margin-top: 12px; display: grid; gap: 10px; }

/* 小窓 */
.dlg { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(59, 42, 32, 0.5); }
.dlg-in { width: 100%; max-width: 400px; max-height: 88vh; overflow: auto; background: var(--paper); border-radius: 18px; padding: 18px 16px 16px; }
.dlg h2 { margin: 0 0 8px; font-size: 18px; font-weight: 900; text-align: center; text-wrap: balance; }
.dlg p { margin: 0 0 10px; font-size: 14px; }
.story { padding-top: 12px; }
.story-scene { margin: 0 -4px 10px; border-radius: 12px; overflow: hidden; }
.story-scene svg { display: block; width: 100%; height: auto; }
.story-scene.shine { animation: shine 1.2s ease-out; }
@keyframes shine { 0% { filter: brightness(1.6) saturate(0.4); } 100% { filter: none; } }
.story-new { font-weight: 900; color: var(--leaf); text-align: center; }
.sheet-wrap { place-items: end center; padding: 0; }
.sheet { max-width: 560px; border-radius: 20px 20px 0 0; padding: 14px 14px 22px; }
.sheet-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sheet-top h2 { flex: 1; margin: 0; text-align: left; font-size: 16px; }
.x-btn { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.note { font-size: 12px !important; color: var(--ink-soft); }

/* 直す一覧 */
.rp { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.rp li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--bg); font-size: 13px; font-weight: 700; line-height: 1.4; }
.rp li .rp-n { flex: none; font-weight: 900; color: var(--ink-soft); }
.rp li .rp-name { flex: 1; min-width: 0; }
.rp li .rp-name small { display: block; font-size: 11px; color: var(--leaf); }
.rp li .rp-c { flex: none; display: inline-flex; align-items: center; gap: 2px; font-weight: 900; white-space: nowrap; }
.rp li .rp-c svg { width: 14px; height: 14px; }
.rp li.done { background: #eef6e8; color: var(--ink-soft); }
.rp li.next { background: #fff4d6; box-shadow: inset 0 0 0 2px #f0cf7a; }
.rp li.later { opacity: 0.6; }
.btn { display: block; width: 100%; margin: 8px 0 0; padding: 12px 10px; border: 0; border-radius: 14px; background: var(--brick); color: #fff; font: 900 15px/1.2 var(--font); cursor: pointer; box-shadow: 0 3px 0 var(--brick-dark); }
.btn:disabled { background: #e8ddd0; color: #a8978a; box-shadow: none; cursor: default; }
.btn.small { width: auto; display: inline-block; padding: 9px 16px; font-size: 13px; margin: 0; }
.btn.ghost { background: transparent; border: 2px solid var(--line); color: var(--ink-soft); box-shadow: none; }

/* 図鑑 */
.bk-ch { margin: 10px 0 2px; font-size: 14px; font-weight: 900; }
.bk-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.bk { display: flex; flex-direction: column; align-items: center; padding: 4px 2px; border-radius: 10px; background: var(--bg); min-width: 0; }
.bk svg { width: 44px; height: 44px; display: block; }
.bk.no svg { filter: brightness(0) opacity(0.15); }
.bk small { font-size: 10px; font-weight: 700; line-height: 1.25; text-align: center; color: var(--ink); min-height: 2.5em; display: flex; align-items: center; word-break: keep-all; overflow-wrap: anywhere; }
.bk.no small { color: var(--ink-soft); }
.bk .bk-l { font-size: 9px; color: var(--ink-soft); line-height: 1; }

/* みがく */
.pl { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.pl li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: var(--bg); }
.pl li .pl-art { flex: none; width: 40px; height: 40px; }
.pl li .pl-art svg { width: 100%; height: 100%; display: block; }
.pl li .pl-t { flex: 1; min-width: 0; font-size: 13px; font-weight: 900; line-height: 1.35; }
.pl li .pl-t small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-soft); }
.pl li .btn-s { min-width: 64px; }
.nw { white-space: nowrap; }
@media (max-width: 420px) { .bk-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bk small { letter-spacing: -0.04em; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; width: max-content; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 16px; background: rgba(150, 56, 27, 0.95); color: #fff; font-weight: 900; font-size: 14px; text-align: center; pointer-events: none; text-wrap: balance; }

/* 下の解説 */
.guide { margin-top: 28px; background: var(--paper); border-radius: 18px; padding: 22px 20px 12px; font-size: 15px; line-height: 1.85; }
.guide p { margin: 0 0 1em; }
.guide h2 { font-size: 19px; margin: 32px 0 12px; padding-left: 10px; border-left: 5px solid var(--brick); line-height: 1.4; }
.guide h2:first-child { margin-top: 0; }
.guide h3 { font-size: 16px; margin: 22px 0 6px; line-height: 1.5; }
.guide .steps { list-style: none; padding: 0; margin: 0 0 1em; }
.guide .steps li { display: flex; align-items: baseline; gap: 6px; margin: 6px 0; }
.guide .steps .num { flex: none; font-weight: 900; color: var(--brick); }
.guide details { border-top: 1px solid var(--line); padding: 12px 0; }
.guide details p { margin: 8px 0 4px; }
.guide summary { font-weight: 900; cursor: pointer; }
.reset-row { text-align: center; margin-top: 16px !important; }
.g-foot { max-width: 560px; margin: 0 auto; padding: 14px 16px 28px; font-size: 12px; text-align: center; }
.g-foot a { color: var(--ink-soft); }

@media (max-width: 359px) {
  .pill b { font-size: 13px; }
  .btn-repair { padding: 6px 7px; font-size: 11px; }
  .oi { width: 32px; height: 32px; }
  .bx .bx-art { width: 36px; height: 36px; }
  .bx .bx-name { font-size: 9px; }
  .sl { width: 32px; height: 32px; }
  .od-face svg { width: 22px; height: 22px; }
  .orders.n4 .od:not(.sp) .od-face { display: none; }
  .orders.n4 .od-who { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cell.pop .it, .cell.appear .it, .cell.shake .it, .od.bounce, .od.enter, .scene.shine, .btn-repair.ready, .pill.bump, .bx.tap .bx-art, .story-scene.shine { animation: none; }
  .ring, .pt, .flash { display: none; }
  .float { animation: none; transform: translate(-50%, -14px); }
}

/* ---------- 背の低い画面でも、注文・盤・道具箱が1画面に入るように詰める（上の決まりを上書き） ---------- */
.g-head { padding: 6px 12px; }
.top { padding: 3px; gap: 5px; }
.scene { width: 64px; height: 38px; border-radius: 10px; }
.pill b { font-size: 14px; }
.btn-repair { padding: 2px 8px; font-size: 11px; }
.orders { margin-top: 5px; }
.od { padding: 3px 3px 4px; gap: 1px; }
.oi { width: 32px; height: 32px; }
.od.three .oi, .orders.n4 .od.three .oi { width: 24px; height: 24px; border-radius: 7px; }
.od.three .od-items { gap: 1px; }
.od-set { position: absolute; top: -8px; left: 6px; font-size: 9px; font-weight: 900; color: #fff; background: var(--sea); border-radius: 999px; padding: 0 6px; line-height: 1.5; }
.btn-give { padding: 5px 2px; font-size: 12px; }
.btn-give small { font-size: 10px; margin-left: 2px; }
.board-wrap { margin-top: 5px; padding: 4px; }
.board { gap: 2px; }
.info { min-height: 44px; margin-top: 5px; padding: 3px 6px; }
.info-art { width: 38px; height: 38px; }
.btn-s { width: 58px; padding: 6px 2px; }
#b-sell, #b-undo { margin-left: 14px; }
#b-undo { width: auto; padding: 6px 10px; margin-left: 4px; }
.tools { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 5px; margin-top: 6px; }
.boxes { margin-top: 0; gap: 4px; }
.bx { padding: 3px 1px 4px; }
.bx .bx-art { width: 34px; height: 34px; }
.bx .bx-name { font-size: 9.5px; }
.pool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 12px; background: #fff4d6; box-shadow: inset 0 0 0 2px #f0cf7a; line-height: 1.15; padding: 2px; }
.pool.zero { background: #f0e8de; box-shadow: inset 0 0 0 2px var(--line); }
.pool-l { font-size: 9.5px; font-weight: 900; color: #a8650f; }
.pool-v b { font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pool-v small { font-size: 9px; color: var(--ink-soft); }
.pool-track { width: 80%; height: 4px; border-radius: 9px; background: #f0e2c0; overflow: hidden; }
.pool-track span { display: block; height: 100%; background: var(--gold); }
.pool-t { font-size: 8.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.decor-art { flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-weight: 900; color: var(--ink-soft); }
@media (max-width: 419px) {
  .orders.n4 .od-face { display: none; }
  .orders.n4 .od-who { text-align: center; font-size: 9.5px; }
  .orders.n4 .od.sp .od-who { cursor: pointer; text-decoration: underline dotted; }
  .orders.n4 .oi { width: 30px; height: 30px; }
}
@media (max-width: 359px) {
  .tools { grid-template-columns: 58px minmax(0, 1fr); }
  .bx .bx-art { width: 30px; height: 30px; }
  .bx .bx-name { font-size: 8.5px; letter-spacing: -0.04em; }
  .btn-s { width: 52px; }
  .orders.n4 .oi { width: 27px; height: 27px; }
  .od.three .oi, .orders.n4 .od.three .oi { width: 21px; height: 21px; }
}
