:root {
  --ink: #5a4636; --ink2: #8a7462; --paper: #fffaf2; --paper2: #fff3e3; --line: #f0dfc8;
  --mint: #7fd4b0; --mint2: #5fbf98; --pink: #ff9fb4; --pink2: #f07f98; --lemon: #ffe27a; --peach: #ffbe8a; --coral: #ff8f8a; --lilac: #c9b4ff;
  --gold: #f5c242; --shadow: 0 6px 0 rgba(150, 110, 80, .18), 0 10px 26px rgba(120, 90, 60, .16);
  --r: 22px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: clip; background: #c4ecef; color: var(--ink); font-family: 'Zen Kaku Gothic New', system-ui, sans-serif; font-weight: 700; user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#ui * { pointer-events: auto; }
#ui .np, #ui .np * { pointer-events: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
svg { display: block; }

/* 起動 */
#boot { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #fffaf2, #ffe9d6 60%, #ffd9cc); transition: opacity .6s; }
#boot.out { opacity: 0; pointer-events: none; }
.boot-in { display: grid; justify-items: center; gap: 18px; }
.boot-title { font-weight: 900; font-size: clamp(28px, 7vw, 48px); letter-spacing: .04em; color: var(--ink); }
.boot-ring { width: 84px; height: 84px; border-radius: 50%; background: conic-gradient(var(--pink) var(--p, 0%), #fff 0); display: grid; place-items: center; box-shadow: var(--shadow); }
.boot-ring i { width: 62px; height: 62px; border-radius: 50%; background: var(--paper); }

/* 上の帯 */
.hud-tl { position: absolute; left: calc(12px + var(--safe-l)); top: calc(12px + var(--safe-t)); display: flex; align-items: center; gap: 10px; }
.me { position: relative; width: 68px; height: 68px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; }
.me img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; background: #ffeedd; }
.me svg.ring { position: absolute; inset: -5px; width: 78px; height: 78px; transform: rotate(-90deg); }
.me .kg { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); background: var(--paper); border-radius: 10px; padding: 1px 7px; font-size: 12px; font-weight: 900; box-shadow: 0 2px 0 rgba(150,110,80,.18); white-space: nowrap; }
.me.full { animation: shake .4s; }
.me.full svg.ring circle.v { stroke: var(--coral); }
@keyframes shake { 0%,100% { transform: none } 25% { transform: translateX(-4px) } 75% { transform: translateX(4px) } }
.pill { height: 44px; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); display: flex; align-items: center; gap: 6px; padding: 0 14px 0 6px; font-weight: 900; font-size: 19px; font-variant-numeric: tabular-nums; }
.pill .ic { width: 32px; height: 32px; }
.lvring { position: relative; width: 46px; height: 46px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; font-weight: 900; font-size: 18px; }
.lvring svg { position: absolute; inset: 3px; width: 40px; height: 40px; transform: rotate(-90deg); }
.lvring b { position: relative; }
.clock { width: 34px; height: 34px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; }
.clock svg { width: 24px; height: 24px; }

.hud-tr { position: absolute; right: calc(12px + var(--safe-r)); top: calc(12px + var(--safe-t)); display: flex; flex-direction: column; gap: 10px; }
.ibtn { width: 52px; height: 52px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; transition: transform .12s; position: relative; }
.ibtn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(150,110,80,.18); }
.ibtn svg { width: 30px; height: 30px; }
.ibtn .dot { position: absolute; top: 6px; right: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--paper); }

/* 目標 */
.goal { position: absolute; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(255,250,242,.94); border-radius: 26px; padding: 6px 16px 6px 6px; box-shadow: var(--shadow); max-width: min(440px, calc(100vw - 340px)); }
.goal img, .goal .gi { width: 40px; height: 40px; flex: none; border-radius: 14px; background: #fff1e4; display: grid; place-items: center; }
.goal .gi svg { width: 28px; height: 28px; }
.goal .gt { font-size: 15px; line-height: 1.3; font-weight: 900; }
.goal .gp { display: flex; gap: 4px; margin-top: 3px; }
.goal .gp i { width: 14px; height: 6px; border-radius: 3px; background: #f0e2cf; }
.goal .gp i.on { background: var(--mint); }
.goal.done { animation: pop .5s; }
@keyframes pop { 0% { transform: translateX(-50%) scale(1) } 40% { transform: translateX(-50%) scale(1.12) } 100% { transform: translateX(-50%) scale(1) } }

/* 動かす */
.act { position: absolute; right: calc(22px + var(--safe-r)); bottom: calc(26px + var(--safe-b)); width: 92px; height: 92px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; transition: transform .15s, opacity .15s; }
.act.off { opacity: 0; transform: scale(.6); pointer-events: none; }
.act img { width: 66px; height: 66px; }
.act .ai svg { width: 46px; height: 46px; }
.act .key { position: absolute; left: -6px; top: -6px; width: 28px; height: 28px; border-radius: 9px; background: #fff; box-shadow: 0 2px 0 rgba(150,110,80,.25); display: grid; place-items: center; font-size: 14px; font-weight: 900; }
.act svg.pr { position: absolute; inset: -6px; width: 104px; height: 104px; transform: rotate(-90deg); pointer-events: none; }
.act:active { transform: scale(.94); }
.touch .act .key { display: none; }

.joy { position: absolute; left: calc(20px + var(--safe-l)); bottom: calc(24px + var(--safe-b)); width: 140px; height: 140px; border-radius: 50%; background: rgba(255,250,242,.45); box-shadow: inset 0 0 0 3px rgba(255,255,255,.7); display: none; }
.touch .joy { display: block; }
.joy i { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow); }

/* パネル */
.veil { position: absolute; inset: 0; background: rgba(90, 70, 54, .18); opacity: 0; transition: opacity .2s; }
.veil.on { opacity: 1; }
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.96); opacity: 0; width: min(600px, calc(100vw - 32px)); max-height: min(78vh, 720px); background: var(--paper); border-radius: 28px; box-shadow: 0 8px 0 rgba(150,110,80,.2), 0 24px 60px rgba(120,90,60,.25); display: flex; flex-direction: column; overflow: hidden; transition: transform .22s cubic-bezier(.2,1.4,.4,1), opacity .18s; }
.panel.on { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.ph { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 16px; flex: none; }
.ph .pic { width: 44px; height: 44px; border-radius: 15px; background: #fff0e0; display: grid; place-items: center; flex: none; }
.ph .pic svg { width: 30px; height: 30px; }
.ph .pic img { width: 40px; height: 40px; }
.ph h2 { margin: 0; font-size: 21px; font-weight: 900; flex: 1; min-width: 0; }
.ph .x { width: 44px; height: 44px; border-radius: 15px; background: #fff0e0; display: grid; place-items: center; flex: none; }
.ph .x svg { width: 22px; height: 22px; }
.ph .meta { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 900; color: var(--ink2); font-variant-numeric: tabular-nums; }
.ph .meta svg { width: 20px; height: 20px; }
.pb { overflow: hidden auto; padding: 4px 14px 16px; flex: 1; min-height: 0; overscroll-behavior: contain; touch-action: pan-y; }
.tabs { display: flex; gap: 6px; padding: 0 14px 10px; flex: none; }
.tabs button { flex: 1 1 0; min-width: 0; height: 46px; border-radius: 15px; background: #fff0e0; display: grid; place-items: center; }
.tabs button svg { width: 26px; height: 26px; }
.tabs button img { width: 36px; height: 36px; }
.tabs button.on { background: var(--mint); box-shadow: 0 3px 0 var(--mint2); }

/* 品物のマス */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.cell { position: relative; aspect-ratio: 1; border-radius: 18px; background: #fff8ee; box-shadow: 0 3px 0 #f0e2cf; display: grid; place-items: center; min-width: 0; }
.cell img { width: 82%; height: 82%; }
.cell .n { position: absolute; right: 6px; bottom: 4px; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.cell .nm { position: absolute; left: 0; right: 0; top: 3px; text-align: center; font-size: 11px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.cell.sel { box-shadow: 0 0 0 3px var(--mint), 0 3px 0 var(--mint2); }
.cell.dim img { filter: grayscale(1) opacity(.35); }
.sep { grid-column: 1 / -1; height: 4px; border-radius: 2px; margin: 4px 0; }
.cap { display: flex; align-items: center; gap: 8px; margin: 2px 2px 10px; font-weight: 900; font-variant-numeric: tabular-nums; }
.cap svg { width: 22px; height: 22px; flex: none; }
.bar { flex: 1; height: 12px; border-radius: 6px; background: #f3e6d6; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--mint); }

/* 作り方の行 */
.rows { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; background: #fff; border-radius: 20px; padding: 8px 8px 8px 8px; box-shadow: 0 3px 0 #f0e2cf; }
.row .out { position: relative; width: 64px; height: 64px; border-radius: 16px; background: #fff6ea; display: grid; place-items: center; }
.row .out img { width: 58px; height: 58px; }
.row .out .n { position: absolute; right: 2px; bottom: 0; font-size: 13px; font-weight: 900; }
.row .mid { min-width: 0; }
.row .nm { font-size: 16px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .ins { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
.chip { display: flex; align-items: center; gap: 1px; background: #fff6ea; border-radius: 12px; padding: 1px 7px 1px 1px; font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
.chip img { width: 28px; height: 28px; }
.chip svg { width: 22px; height: 22px; margin: 3px; }
.chip.lack { background: #ffe4e1; color: #c0504a; }
.chip.q { color: var(--ink2); }
.row .go { display: flex; gap: 6px; }
.btn { min-width: 52px; height: 48px; border-radius: 16px; background: var(--mint); box-shadow: 0 4px 0 var(--mint2); display: grid; place-items: center; padding: 0 8px; font-weight: 900; font-size: 15px; color: #2f4a3c; transition: transform .1s; }
.btn svg { width: 26px; height: 26px; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--mint2); }
.btn.pink { background: var(--pink); box-shadow: 0 4px 0 var(--pink2); color: #5a2a36; }
.btn.lemon { background: var(--lemon); box-shadow: 0 4px 0 #e8c24a; color: #5a4636; }
.btn.off { background: #efe6da; box-shadow: 0 4px 0 #e0d3c2; color: #b3a493; pointer-events: none; }
.btn .two { display: flex; align-items: center; gap: 2px; }
.row.lock { opacity: .62; }
.row.unknown .out img { filter: brightness(0) opacity(.25); }
.prog { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: #f3e6d6; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--pink); border-radius: 5px; transition: width .1s linear; }
.tag { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 900; color: var(--ink2); font-variant-numeric: tabular-nums; }
.tag svg { width: 18px; height: 18px; }

/* お店 */
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.slot { position: relative; border-radius: 20px; background: #fff; box-shadow: 0 3px 0 #f0e2cf; padding: 8px 6px 8px; display: grid; justify-items: center; gap: 4px; min-width: 0; }
.slot .sp { width: 100%; min-width: 0; overflow: hidden; aspect-ratio: 1.3; border-radius: 14px; background: repeating-linear-gradient(90deg, #fff4f6 0 14px, #ffe1e8 14px 28px); display: grid; place-items: center; }
.slot .sp img { height: 90%; width: auto; max-width: 100%; object-fit: contain; }
.slot .sp svg { width: 34px; height: 34px; opacity: .5; }
.slot .pr { display: flex; align-items: center; gap: 3px; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.slot .pr svg { width: 18px; height: 18px; }
.slot .ct { position: absolute; right: 10px; top: 10px; background: var(--paper); border-radius: 10px; padding: 0 7px; font-size: 13px; font-weight: 900; }
.slot .tools { display: flex; gap: 6px; }
.slot .tools button { width: 36px; height: 36px; border-radius: 12px; background: #fff0e0; display: grid; place-items: center; }
.slot .tools button svg { width: 22px; height: 22px; }
.slot .tools button.on { background: var(--mint); }
.slot.pick { box-shadow: 0 0 0 3px var(--pink), 0 3px 0 #f0e2cf; }
.trend { width: 16px; height: 16px; }
.order { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: #fff; border-radius: 18px; padding: 6px 8px; box-shadow: 0 3px 0 #f0e2cf; }
.order .who { width: 52px; height: 52px; border-radius: 50%; background: #fff1e4; overflow: hidden; }
.order .who img { width: 100%; height: 100%; }
.order .want { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order .want .chip img { width: 34px; height: 34px; }
.hline { height: 2px; background: var(--line); border-radius: 1px; margin: 12px 4px; }

/* 町づくり */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.card { background: #fff; border-radius: 22px; box-shadow: 0 3px 0 #f0e2cf; padding: 10px; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: center; position: relative; }
.card .th { width: 84px; height: 84px; border-radius: 18px; background: linear-gradient(#e8f8f2, #fff6ea); display: grid; place-items: center; }
.card .th img { width: 80px; height: 80px; }
.card .nm { font-size: 16px; font-weight: 900; margin-bottom: 4px; }
.card .ins { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card .ft { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card.done .th::after { content: ''; position: absolute; left: 70px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/20px no-repeat; box-shadow: 0 2px 0 var(--mint2); }
.card.lock { opacity: .6; }
.card.lock .th img { filter: grayscale(.8); }

/* なかま */
.fr { background: #fff; border-radius: 22px; box-shadow: 0 3px 0 #f0e2cf; padding: 10px; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; margin-bottom: 10px; }
.fr .face { position: relative; width: 84px; height: 84px; border-radius: 50%; background: #fff1e4; overflow: hidden; }
.fr .face img { width: 100%; height: 100%; }
.fr .nm { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 900; }
.fr .nm .me-badge { width: 24px; height: 24px; border-radius: 8px; background: var(--lemon); display: grid; place-items: center; }
.fr .nm .me-badge svg { width: 16px; height: 16px; }
.stat { display: grid; grid-template-columns: 24px minmax(0, 1fr) 46px; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat svg { width: 22px; height: 22px; }
.stat .bar i { background: var(--peach); }
.stat:nth-of-type(3) .bar i { background: var(--mint); }
.stat:nth-of-type(4) .bar i { background: var(--lilac); }
.good { display: flex; gap: 4px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.good .gd { width: 30px; height: 30px; border-radius: 10px; background: #fff6ea; display: grid; place-items: center; }
.good .gd img { width: 28px; height: 28px; }
.good .gd svg { width: 20px; height: 20px; }
.jobs { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.jobs button { flex: 1 1 0; min-width: 52px; height: 48px; border-radius: 15px; background: #fff0e0; display: grid; place-items: center; position: relative; }
.jobs button svg { width: 26px; height: 26px; }
.jobs button.on { background: var(--mint); box-shadow: 0 3px 0 var(--mint2); }
.jobs button img { width: 34px; height: 34px; position: absolute; right: -4px; bottom: -4px; background: #fff; border-radius: 10px; box-shadow: 0 2px 0 #f0e2cf; }
.pickgrid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; background: #fff6ea; border-radius: 16px; padding: 8px; }
.pickgrid button { aspect-ratio: 1; border-radius: 14px; background: #fff8ee; display: grid; place-items: center; box-shadow: 0 2px 0 #f0e2cf; position: relative; min-width: 0; }
.pickgrid button img { width: 86%; }
.pickgrid button.lockd img { filter: grayscale(1) opacity(.35); }
.pickgrid button.lockd::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a7462' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='3'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat; }

/* 吹き出し */
.bubble { position: absolute; transform: translate(-50%, -100%); background: #fff; border-radius: 22px; padding: 12px 18px; box-shadow: var(--shadow); max-width: min(320px, 80vw); font-size: 17px; line-height: 1.55; font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -12px; margin-left: -12px; border: 12px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble .more { position: absolute; right: 12px; bottom: 6px; width: 14px; height: 14px; animation: bob .8s infinite; }
@keyframes bob { 50% { transform: translateY(3px) } }

/* レベルアップ */
.lvup { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(255,250,242,.92), rgba(255,226,214,.86)); opacity: 0; transition: opacity .3s; }
.lvup.on { opacity: 1; }
.lvup .big { display: grid; justify-items: center; gap: 14px; transform: scale(.6); transition: transform .5s cubic-bezier(.2,1.6,.4,1); }
.lvup.on .big { transform: scale(1); }
.lvup .lvc { width: 150px; height: 150px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; position: relative; }
.lvup .lvc svg { position: absolute; inset: -10px; width: 170px; height: 170px; }
.lvup .lvc b { font-size: 64px; font-weight: 900; line-height: 1; }
.lvup .lvc small { position: absolute; top: 26px; font-size: 18px; font-weight: 900; color: var(--ink2); }
.lvup .who { display: flex; gap: 14px; }
.lvup .who div { display: grid; justify-items: center; gap: 4px; font-weight: 900; font-size: 18px; animation: hop 1s infinite; }
.lvup .who img { width: 110px; height: 110px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); }
@keyframes hop { 50% { transform: translateY(-8px) } }

/* ひらめき */
.disc { position: absolute; right: calc(80px + var(--safe-r)); top: calc(14px + var(--safe-t)); display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 22px; padding: 6px 14px 6px 6px; box-shadow: var(--shadow); transform: translateY(-30px) scale(.9); opacity: 0; visibility: hidden; transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .25s, visibility 0s .35s; }
.disc.on { transform: none; opacity: 1; visibility: visible; transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .25s; }
.disc .ics { display: flex; gap: 2px; }
.disc img { width: 52px; height: 52px; border-radius: 14px; background: #fff6ea; }
.disc .spark { width: 28px; height: 28px; }
.disc .nms { font-size: 15px; font-weight: 900; line-height: 1.3; }

/* 切り替えの丸 */
.wipe { position: absolute; inset: 0; background: var(--paper); clip-path: circle(0% at 50% 50%); transition: clip-path .38s ease-in; pointer-events: none; }
.wipe.on { clip-path: circle(150% at 50% 50%); pointer-events: auto; }

/* 設定 */
.set { display: grid; gap: 10px; }
.set .sw { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 10px 12px; box-shadow: 0 3px 0 #f0e2cf; }
.set .sw svg { width: 30px; height: 30px; flex: none; }
.set .sw .tg { margin-left: auto; width: 64px; height: 36px; border-radius: 18px; background: #efe6da; position: relative; transition: background .15s; }
.set .sw .tg::after { content: ''; position: absolute; left: 4px; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.12); transition: left .15s; }
.set .sw .tg.on { background: var(--mint); }
.set .sw .tg.on::after { left: 32px; }
.hold { position: relative; overflow: hidden; }
.hold i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,143,138,.35); }

@media (max-width: 720px) {
  .goal { top: calc(92px + var(--safe-t)); max-width: calc(100vw - 100px); left: calc(50% - 32px); }
  .panel { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 82vh; transform: translateY(40%); border-radius: 28px 28px 0 0; padding-bottom: var(--safe-b); }
  .panel.on { transform: none; }
  .slots { gap: 6px; }
  .act { width: 84px; height: 84px; }
  .act svg.pr { width: 96px; height: 96px; }
  .disc { right: calc(76px + var(--safe-r)); top: calc(150px + var(--safe-t)); }
  .hud-tl { gap: 8px; }
  .pill { font-size: 17px; padding-right: 12px; }
}
@media (max-width: 360px) {
  .clock { display: none; }
  .me { width: 60px; height: 60px; } .me img { width: 50px; height: 50px; } .me svg.ring { width: 70px; height: 70px; }
  .pill { padding-right: 10px; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); }
  .row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .row .out { width: 56px; height: 56px; } .row .out img { width: 50px; height: 50px; }
  .btn { min-width: 46px; }
}
