@font-face { font-family: 'Fredoka'; src: url('fonts/fredoka.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
:root {
  --ink: #3d2f22; --ink2: #7a6652; --paper: #fffaf0; --paper2: #f4e8d2; --line: #e5d5ba;
  --accent: #2a9d8f; --accent-dk: #1d776c; --gold: #f2b84b; --gold-dk: #c98a1e; --coral: #e76f51; --coral-dk: #b9502f;
  --good: #3f9f58; --bad: #d9544a; --sky: #bfe3f0;
  --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: hidden; background: var(--sky); overscroll-behavior: none; }
body { font-family: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif; color: var(--ink); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; -webkit-text-size-adjust: 100%; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.ic { width: 20px; height: 20px; flex: none; display: block; }
button { font-family: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus { outline: none; }
button:focus-visible { outline: 3px solid #4cc9f0; outline-offset: 2px; }

#ui { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#ui .pe { pointer-events: auto; }
.panel { background: var(--paper); border-radius: 14px; box-shadow: 0 2px 0 rgba(90, 60, 30, .18), 0 6px 18px rgba(40, 30, 20, .18); }

/* ---------- top bar ---------- */
#top { position: absolute; top: calc(var(--safe-t) + 6px); left: calc(var(--safe-l) + 6px); right: calc(var(--safe-r) + 54px); display: flex; flex-direction: column; gap: 5px; }
#menubtn { position: absolute; top: calc(var(--safe-t) + 6px); right: calc(var(--safe-r) + 6px); }
.row { display: flex; gap: 5px; align-items: stretch; }
.chip { display: flex; align-items: center; gap: 5px; padding: 4px 9px 4px 6px; border-radius: 12px; background: rgba(255, 250, 240, .95); box-shadow: 0 2px 0 rgba(90, 60, 30, .16), 0 3px 10px rgba(40, 30, 20, .12); font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap; position: relative; }
.chip .ic { width: 20px; height: 20px; }
.chip.big { font-size: 19px; padding: 5px 11px 5px 7px; }
.chip.big .ic { width: 25px; height: 25px; }
.chip .rate { font-size: 11px; font-weight: 500; color: var(--good); margin-left: 1px; }
.chip .rate.neg { color: var(--bad); }
.chip.warn { animation: warnPulse 1s ease-in-out infinite; }
@keyframes warnPulse { 50% { background: #ffd9cf; } }
.chip.flash { animation: flash .5s ease-out; }
@keyframes flash { 0% { transform: scale(1.12); background: #fff3b0; } 100% { transform: scale(1); } }
#popchip { flex-direction: column; align-items: stretch; gap: 3px; padding: 5px 10px 6px 8px; min-width: 112px; cursor: pointer; }
#popchip .l1 { display: flex; align-items: center; gap: 5px; }
#popchip .tier { font-size: 12px; color: var(--ink2); font-weight: 600; margin-left: auto; padding-left: 6px; }
.bar { height: 5px; border-radius: 3px; background: #eadcc2; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #f2b84b, #f7d36b); border-radius: 3px; transition: width .4s; }
#res2 { flex-wrap: wrap; }
#res2 .chip { font-size: 14px; padding: 3px 8px 3px 5px; }
#res2 .chip .ic { width: 18px; height: 18px; }
.spacer { flex: 1; }
.rbtn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 250, 240, .95); box-shadow: 0 2px 0 rgba(90, 60, 30, .2), 0 3px 10px rgba(40, 30, 20, .12); color: var(--ink); }
.rbtn .ic { width: 22px; height: 22px; }
.rbtn:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
.rbtn.on { background: var(--accent); color: #fff; }
.rbtn[disabled] { opacity: .45; }
#speedbtn { font-weight: 700; font-size: 15px; width: auto; min-width: 42px; padding: 0 8px; gap: 2px; display: flex; align-items: center; justify-content: center; }
#speedbtn .ic { width: 18px; height: 18px; }

/* ---------- quest card ---------- */
#quest { position: absolute; left: calc(var(--safe-l) + 6px); max-width: min(300px, calc(100vw - 72px)); padding: 7px 10px 8px 8px; display: flex; gap: 8px; align-items: flex-start; cursor: pointer; transition: transform .2s; }
#quest .qi { width: 26px; height: 26px; flex: none; margin-top: 1px; }
#quest .qt { font-weight: 600; font-size: 14px; line-height: 1.15; }
#quest .qd { font-size: 12.5px; color: var(--ink2); line-height: 1.25; margin-top: 3px; display: none; }
#quest.open .qd { display: block; }
#quest .qp { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--ink2); font-weight: 600; }
#quest .qp .bar { flex: 1; min-width: 60px; }
#quest .qp .bar > i { background: linear-gradient(90deg, #2a9d8f, #5cc6b5); }
#quest.ready { background: #fff4c9; box-shadow: 0 2px 0 var(--gold-dk), 0 0 0 3px rgba(242, 184, 75, .6), 0 6px 18px rgba(40, 30, 20, .2); animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
#quest .claim { display: none; margin-top: 6px; }
#quest.ready .claim { display: inline-flex; }
#quest .rew { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; margin-left: 6px; }
#quest .rew .ic { width: 15px; height: 15px; }

/* ---------- side buttons ---------- */
#side { position: absolute; right: calc(var(--safe-r) + 6px); display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }

/* ---------- dock ---------- */
#dock { position: absolute; left: calc(var(--safe-l) + 6px); right: calc(var(--safe-r) + 6px); bottom: calc(var(--safe-b) + 6px); padding: 6px; display: flex; gap: 4px; align-items: stretch; }
#cats { display: flex; gap: 3px; flex: 1; justify-content: space-between; }
.cat { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 2px 5px; border-radius: 11px; font-size: 11.5px; font-weight: 600; color: var(--ink); position: relative; }
.cat .ic { width: 28px; height: 28px; }
.cat:active { background: var(--paper2); }
.cat.on { background: #dff3ee; box-shadow: inset 0 0 0 2px var(--accent); }
.cat.locked { opacity: .45; }
.cat .badge { position: absolute; top: 2px; right: 6px; background: var(--coral); color: #fff; font-size: 10px; border-radius: 8px; padding: 1px 5px; }
.hint-pulse { animation: hintPulse 1.1s ease-in-out infinite; z-index: 1; }
@keyframes hintPulse { 0%, 100% { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 0 rgba(242, 184, 75, .7); } 50% { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 7px rgba(242, 184, 75, 0); background: #fff4c9; } }
#cards { display: none; flex: 1; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; touch-action: pan-x; padding: 1px; scroll-snap-type: x proximity; }
#cards::-webkit-scrollbar { display: none; }
#dock.cardsmode #cats { display: none; }
#dock.cardsmode #cards { display: flex; }
.back { flex: none; width: 40px; border-radius: 11px; display: none; place-items: center; background: var(--paper2); color: var(--ink); }
#dock.cardsmode .back { display: grid; }
.card { flex: none; width: 84px; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); padding: 3px 3px 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; position: relative; scroll-snap-align: start; }
.card img { width: 58px; height: 58px; display: block; margin-top: -2px; }
.card .nm { font-size: 11.5px; font-weight: 600; line-height: 1.05; text-align: center; min-height: 12px; }
.card .cs { font-size: 11px; font-weight: 600; display: flex; gap: 4px; align-items: center; color: var(--ink2); flex-wrap: wrap; justify-content: center; }
.card .cs span { display: inline-flex; align-items: center; gap: 1px; }
.card .cs .ic { width: 12px; height: 12px; }
.card .cs .no { color: var(--bad); }
.card.on { box-shadow: inset 0 0 0 2.5px var(--accent); background: #eefaf7; }
.card.locked { opacity: .55; }
.card.locked img { filter: grayscale(1) brightness(1.1); }
.card .lock { position: absolute; top: 24px; left: 0; right: 0; text-align: center; font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(61, 47, 34, .78); padding: 2px 0; }
.card.poor .cs { color: var(--bad); }

/* ---------- tool bar / confirm ---------- */
#toolbar { position: absolute; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; max-width: calc(100vw - 16px); }
#toolbar.show { display: flex; }
#toolbar .tt { font-size: 13.5px; font-weight: 600; line-height: 1.2; min-width: 170px; flex: 1; }
#toolbar .tt .l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#toolbar .tt .l1 b { font-size: 15px; }
#toolbar .cost { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; }
#toolbar .cost span { display: inline-flex; align-items: center; gap: 2px; }
#toolbar .cost .ic { width: 15px; height: 15px; }
#toolbar .cost .no { color: var(--bad); }
#toolbar .tt small { display: block; font-weight: 500; color: var(--ink2); font-size: 12px; }
#toolbar .tt .good { color: var(--good); } #toolbar .tt .bad { color: var(--bad); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 15px; padding: 9px 15px; border-radius: 12px; background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dk); white-space: nowrap; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-dk); }
.btn .ic { width: 20px; height: 20px; }
.btn.gold { background: var(--gold); box-shadow: 0 3px 0 var(--gold-dk); color: #4a3210; }
.btn.coral { background: var(--coral); box-shadow: 0 3px 0 var(--coral-dk); }
.btn.ghost { background: var(--paper2); color: var(--ink); box-shadow: 0 3px 0 #d8c6a5; }
.btn.small { font-size: 13px; padding: 6px 11px; }
.btn[disabled] { opacity: .5; filter: grayscale(.6); }
.ibtn { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--paper2); color: var(--ink); box-shadow: 0 2px 0 #d8c6a5; }
.ibtn.ok { background: var(--good); color: #fff; box-shadow: 0 3px 0 #2c7a42; width: 52px; }
.ibtn.ok[disabled] { background: #b9b0a0; box-shadow: 0 3px 0 #958b7a; }
.ibtn:active { transform: translateY(2px); }

/* ---------- info panel ---------- */
#info { position: absolute; left: calc(var(--safe-l) + 6px); right: calc(var(--safe-r) + 6px); bottom: calc(var(--safe-b) + 6px); max-height: 56%; display: none; flex-direction: column; overflow: hidden; }
#info.show { display: flex; animation: slideUp .2s ease-out; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } }
#info .hd { display: flex; align-items: center; gap: 10px; padding: 10px 10px 6px 10px; }
#info .hd img { width: 54px; height: 54px; flex: none; }
#info .hd .t { flex: 1; min-width: 0; }
#info .hd .t b { font-size: 18px; display: block; line-height: 1.1; }
#info .hd .t span { font-size: 13px; color: var(--ink2); }
#info .bd { padding: 0 12px 6px; overflow-y: auto; touch-action: pan-y; font-size: 14px; }
#info .ft { display: flex; gap: 8px; padding: 8px 10px 10px; border-top: 1.5px solid var(--paper2); }
.stat { display: flex; align-items: center; gap: 7px; padding: 3px 0; }
.stat .ic { width: 18px; height: 18px; }
.stat .v { margin-left: auto; font-weight: 600; }
.needs { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 4px; }
.need { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 9px; background: #f8f1e3; font-size: 13.5px; }
.need .ic { width: 20px; height: 20px; }
.need span:not(.st) { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.need span:not(.st) .ic { width: 16px; height: 16px; }
.need .st { margin-left: auto; font-weight: 700; }
.need.ok .st { color: var(--good); } .need.no .st { color: var(--bad); }
.need.no { background: #fde9e4; }
.sub { font-size: 12.5px; color: var(--ink2); font-weight: 600; margin-top: 8px; text-transform: uppercase; letter-spacing: .04em; }
.lvlrow { display: flex; gap: 3px; margin-top: 4px; }
.lvlrow i { flex: 1; height: 6px; border-radius: 3px; background: #eadcc2; }
.lvlrow i.on { background: var(--gold); }
.hintline { font-size: 13px; color: var(--ink2); margin: 4px 0; line-height: 1.3; }

/* ---------- modal ---------- */
#modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(30, 25, 20, .45); z-index: 5; padding: 16px; pointer-events: auto; }
#modal.show { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
#modal .box { width: min(420px, 100%); max-height: calc(100% - 10px); overflow-y: auto; padding: 18px 18px 16px; text-align: center; animation: pop .28s cubic-bezier(.2, 1.4, .5, 1); touch-action: pan-y; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
#modal h2 { margin: 2px 0 6px; font-size: 24px; line-height: 1.15; }
#modal p { margin: 6px 0; font-size: 15px; line-height: 1.35; color: var(--ink2); }
#modal .acts { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
#modal .big-ic { width: 64px; height: 64px; margin: 0 auto 4px; }
#modal .big-ic .ic { width: 64px; height: 64px; }
#ui.pre { opacity: 0; pointer-events: none; }
#ui { transition: opacity .5s; }
#modal .unl { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0 4px; }
#modal .unl div { width: 76px; font-size: 12px; font-weight: 600; }
#modal .unl img { width: 60px; height: 60px; display: block; margin: 0 auto; }
#modal .rewards { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; font-weight: 700; font-size: 16px; margin: 8px 0; }
#modal .rewards span { display: inline-flex; gap: 4px; align-items: center; background: #f8f1e3; padding: 4px 10px; border-radius: 10px; }
.menu-list { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.menu-list .btn { width: 100%; }
.slider { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; text-align: left; }
.slider input { flex: 1; accent-color: var(--accent); height: 28px; }
.slider span { width: 64px; }
.help { text-align: left; font-size: 14px; line-height: 1.4; color: var(--ink); }
.help li { margin: 4px 0; }
.help ul { padding-left: 18px; margin: 6px 0; }
.stats-grid { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; text-align: left; font-size: 14px; margin-top: 8px; }
.stats-grid b { text-align: right; }

/* ---------- toasts & labels ---------- */
#toasts { position: absolute; left: 0; right: 0; display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; pointer-events: none; }
.toast { padding: 8px 14px; border-radius: 12px; background: rgba(61, 47, 34, .9); color: #fff; font-weight: 600; font-size: 14px; animation: toastIn .25s ease-out; max-width: 88vw; text-align: center; display: flex; align-items: center; gap: 6px; }
.toast .ic { width: 18px; height: 18px; }
.toast.bad { background: rgba(185, 60, 45, .92); }
.toast.good { background: rgba(42, 130, 110, .94); }
.toast.out { opacity: 0; transform: translateY(-6px); transition: all .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }
#labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.flt { position: absolute; left: 0; top: 0; font-weight: 700; font-size: 15px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 0 6px rgba(0, 0, 0, .3); white-space: nowrap; will-change: transform; }
.flt.lvl { color: #fff3b0; font-size: 14px; }
.flt.coin { color: #ffe066; }
.tag { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); padding: 4px 8px; border-radius: 10px; background: rgba(255, 250, 240, .96); font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 4px; box-shadow: 0 2px 0 rgba(90, 60, 30, .2); pointer-events: auto; cursor: pointer; white-space: nowrap; }
.tag .ic { width: 16px; height: 16px; }
.tag.poor { color: var(--bad); }

/* ---------- title ---------- */
#title { position: fixed; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 8vh) 20px calc(var(--safe-b) + 7vh); pointer-events: auto; background: linear-gradient(180deg, rgba(14, 20, 40, .55) 0%, rgba(14, 20, 40, 0) 38%, rgba(14, 20, 40, 0) 70%, rgba(14, 20, 40, .45) 100%); transition: opacity .5s; }
#title.hide { opacity: 0; pointer-events: none; }
#title .logo { text-align: center; color: #fff; text-shadow: 0 3px 0 rgba(60, 40, 20, .45), 0 6px 20px rgba(0, 0, 0, .3); }
#title .logo h1 { font-size: clamp(44px, 12vw, 92px); margin: 0; line-height: .95; letter-spacing: .01em; font-weight: 700; }
#title .logo h1 span { color: #ffd36b; }
#title .logo p { font-size: clamp(15px, 3.6vw, 22px); margin: 10px 0 0; font-weight: 500; }
#title .go { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#title .btn { font-size: 22px; padding: 14px 40px; border-radius: 16px; }
#title .small { font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); opacity: .9; }
#loading { position: fixed; inset: 0; z-index: 7; display: grid; place-items: center; background: var(--sky); color: var(--ink); font-size: 22px; font-weight: 600; transition: opacity .4s; }
#loading.hide { opacity: 0; pointer-events: none; }

/* ---------- small screens ---------- */
@media (max-width: 420px) {
  .chip.big { font-size: 17px; }
  #popchip { min-width: 100px; }
  .cat { font-size: 10.5px; }
  .cat .ic { width: 26px; height: 26px; }
}
@media (max-height: 460px) {
  #top { top: calc(var(--safe-t) + 4px); flex-direction: row; flex-wrap: wrap; }
  .chip.big { font-size: 16px; padding: 3px 9px 3px 5px; }
  .chip.big .ic { width: 21px; height: 21px; }
  #popchip { padding: 3px 9px 4px 7px; }
  #res2 .chip { font-size: 13px; }
  .cat { flex-direction: row; gap: 4px; padding: 5px 4px; font-size: 11.5px; }
  .cat .ic { width: 22px; height: 22px; }
  #dock { padding: 4px; }
  .card { width: 74px; }
  .card img { width: 44px; height: 44px; }
  #info { max-height: 70%; }
  #quest { padding: 5px 8px 6px 6px; }
  #quest .qi { width: 20px; height: 20px; }
  #quest .qt { font-size: 13px; }
  #quest .claim { margin-top: 4px; }
  #menubtn { top: calc(var(--safe-t) + 4px); }
  #modal .box { padding: 12px 14px; }
  #modal h2 { font-size: 20px; }
  .rbtn { width: 38px; height: 38px; }
}
@media (min-width: 900px) and (min-height: 600px) {
  #dock { left: 50%; right: auto; transform: translateX(-50%); width: min(760px, calc(100vw - 24px)); }
  #info { left: auto; right: 12px; width: 360px; bottom: 100px; }
  .chip.big { font-size: 20px; }
}

/* tutorial pointer */
.tut-ptr { position: absolute; left: 0; top: 0; pointer-events: none; display: none; z-index: 3; }
.tut-ptr .ic { position: absolute; left: -20px; top: -46px; width: 40px; height: 40px; animation: ptrBounce .8s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.tut-ptr .txt { position: absolute; left: 0; top: -78px; transform: translateX(-50%); white-space: nowrap; background: #fff4c9; color: var(--ink); font-weight: 700; font-size: 13px; padding: 4px 9px; border-radius: 9px; box-shadow: 0 2px 0 var(--gold-dk); animation: ptrBounce .8s ease-in-out infinite; }
@keyframes ptrBounce { 50% { transform: translateY(-8px); } }
.tut-ptr .txt { animation-name: ptrBounceX; }
@keyframes ptrBounceX { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -8px); } }
.ibtn.ok.hint-pulse { animation: okPulse 1s ease-in-out infinite; }
@keyframes okPulse { 50% { transform: scale(1.12); box-shadow: 0 3px 0 #2c7a42, 0 0 0 6px rgba(63, 159, 88, .3); } }

/* gamepad reticle */
.reticle { position: fixed; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 2px rgba(61, 47, 34, .5), inset 0 0 0 2px rgba(61, 47, 34, .35); pointer-events: none; z-index: 3; display: none; }
.reticle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }
#title.thumb .logo h1 { font-size: 118px; }

.fest-chip { background: #fff1c2; cursor: pointer; animation: bob 1.4s ease-in-out infinite; }

/* short landscape phones: compact modals, info as a side sheet */
@media (max-height: 460px) {
  #modal .big-ic, #modal .big-ic .ic { width: 40px; height: 40px; }
  #modal .unl img { width: 44px; height: 44px; }
  #modal .unl div { width: 64px; font-size: 11px; }
  #modal p { margin: 4px 0; font-size: 14px; }
  #modal .acts { margin-top: 8px; }
  #modal .rewards { margin: 4px 0; }
}
@media (max-height: 460px) and (orientation: landscape) {
  #info { left: auto; right: calc(var(--safe-r) + 6px); top: calc(var(--safe-t) + 6px); bottom: calc(var(--safe-b) + 6px); width: min(360px, 52vw); max-height: none; }
}

#quest .wish { display: none; align-items: center; gap: 6px; margin-top: 6px; padding-top: 5px; border-top: 1.5px dashed var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink2); flex-wrap: wrap; }
#quest .wish .wn { margin-left: auto; }
#quest .wish .wclaim { display: none; padding: 4px 9px; font-size: 12px; }
#quest .wish .wclaim .ic { width: 14px; height: 14px; }
#quest .wish.ready .wclaim { display: inline-flex; }
#quest .wish.ready .wt { color: var(--ink); }

#ui.photo { opacity: 0; pointer-events: none; }
#ui.photo * { pointer-events: none !important; }
.photo-exit { position: fixed; top: calc(var(--safe-t) + 8px); right: calc(var(--safe-r) + 8px); z-index: 4; display: none; opacity: .75; }

input, select, textarea { -webkit-user-select: text; user-select: text; touch-action: manipulation; }

@media (prefers-reduced-motion: reduce) {
  #quest.ready, .fest-chip, .tut-ptr .ic, .tut-ptr .txt, .hint-pulse, .ibtn.ok.hint-pulse, .chip.warn { animation: none !important; }
}
