:root { --c: #B5651D; --c2: #90BE6D; --bg: #8fd0ff; --ink: #3a2412; --mut: #7a5f48; --sat: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); font-family: "Be Vietnam Pro", system-ui, sans-serif; color: var(--ink); overscroll-behavior: none; }
canvas#c { position: fixed; inset: 0; touch-action: none; display: block; }
#menu { position: fixed; inset: 0; z-index: 20; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#menu.on { display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: default; }

.home { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: calc(var(--sat) + 64px) 16px 24px; max-width: 520px; margin: 0 auto; }
.logo { text-align: center; color: #fff; text-shadow: 0 3px 14px rgba(60,30,0,.45); }
.logo h1 { margin: 0; font-size: clamp(40px, 11vw, 56px); font-weight: 900; letter-spacing: -1px; line-height: 1; }
.logo p { margin: 4px 0 0; font-weight: 800; font-size: 16px; }
.spacer { height: max(170px, calc(47vh - 150px)); width: 100%; display: flex; align-items: flex-start; justify-content: center; }
.pethint { margin-top: 6px; background: rgba(255,255,255,.75); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 800; color: var(--mut); }
.sheet { width: 100%; background: rgba(255,248,236,.96); border-radius: 26px; padding: 14px; box-shadow: 0 -6px 30px rgba(80,40,10,.18); display: flex; flex-direction: column; gap: 8px; }
.dogline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 4px; }
.dogline b { font-size: 22px; font-weight: 900; }
.dogline span { color: var(--mut); font-weight: 800; font-size: 14px; text-align: right; }
.btn { display: block; width: 100%; min-height: 52px; border: 0; border-radius: 18px; background: #fff; font-weight: 800; font-size: 17px; margin: 6px 0; box-shadow: 0 6px 16px rgba(80,40,10,.14); }
.btn.main { background: linear-gradient(180deg, #ffb35c, #e8742a); color: #fff; box-shadow: 0 8px 20px rgba(232,116,42,.4); }
.btn.big { min-height: 76px; font-size: 26px; font-weight: 900; }
.btn small { display: block; font-size: 14px; font-weight: 700; opacity: .92; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { border: 0; border-radius: 20px; background: #fff; padding: 12px; text-align: left; min-height: 100px; box-shadow: 0 4px 14px rgba(80,40,10,.1); display: flex; flex-direction: column; gap: 2px; }
.tile i { font-style: normal; font-size: 26px; }
.tile b { font-size: 17px; }
.tile small { color: var(--mut); font-weight: 700; font-size: 12.5px; line-height: 1.3; }
.tile.hot { background: linear-gradient(180deg, #fff6d6, #ffe7a8); }
.quests { background: #fff; border-radius: 18px; padding: 10px 12px; box-shadow: 0 4px 14px rgba(80,40,10,.08); }
.quests > b { display: block; margin-bottom: 4px; font-size: 15px; }
.q { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; padding: 4px 0; color: var(--ink); }
.q em { font-style: normal; color: var(--mut); }
.q.done { color: #2f8f4f; }
.link { border: 0; background: #fff; border-radius: 14px; min-height: 48px; padding: 10px 16px; font-weight: 800; width: 100%; box-shadow: 0 3px 10px rgba(80,40,10,.08); }
.foot { color: var(--mut); font-size: 13px; text-align: center; margin: 6px 0 0; }
.foot a { color: var(--c); }

.page { max-width: 640px; margin: 0 auto; padding: calc(var(--sat) + 68px) 16px 40px; min-height: 100%; background: #fff8ec; }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.top h2 { margin: 0; font-size: 24px; font-weight: 900; }
.back { border: 0; background: #fff; border-radius: 14px; min-height: 44px; padding: 0 14px; font-weight: 800; box-shadow: 0 3px 10px rgba(80,40,10,.1); }
.mut { color: var(--mut); font-size: 14px; margin: 4px 0 10px; font-weight: 600; line-height: 1.45; }
h3 { margin: 18px 0 8px; font-size: 18px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { border: 0; background: #fff; border-radius: 18px; padding: 12px; display: flex; align-items: center; gap: 12px; text-align: left; box-shadow: 0 3px 12px rgba(80,40,10,.07); min-height: 56px; width: 100%; }
.row > i { font-style: normal; font-size: 28px; width: 40px; text-align: center; flex: none; }
.row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row b { font-size: 17px; }
.row small { color: var(--mut); font-weight: 600; font-size: 13px; line-height: 1.35; }
.row em { font-style: normal; font-weight: 900; color: #2f8f4f; font-size: 18px; }
.row span { font-weight: 600; line-height: 1.45; }
.row.lock { opacity: .55; }
.row.tip.lock { opacity: .5; }
.mini { width: 72px; height: 58px; border-radius: 12px; flex: none; }
.bar { display: block; height: 9px; background: #f0e2cd; border-radius: 5px; overflow: hidden; margin-top: 2px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #7BD389, #3fa45b); border-radius: 5px; }
.dog { display: flex; gap: 12px; background: #fff; border-radius: 20px; padding: 12px; margin: 10px 0; box-shadow: 0 4px 14px rgba(80,40,10,.08); align-items: flex-start; }
.dog img { width: 130px; height: 104px; border-radius: 16px; flex: none; }
.dog > div { flex: 1; min-width: 0; }
.dog b { font-size: 18px; display: block; }
.dog small { color: var(--c); font-weight: 800; }
.dog p { margin: 4px 0; font-size: 14px; font-weight: 600; line-height: 1.4; }
.dog .btn { min-height: 46px; font-size: 16px; }
.bond { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-weight: 700; font-size: 14px; color: var(--mut); }
.bond i { flex: 1; height: 10px; background: #f0e2cd; border-radius: 5px; overflow: hidden; }
.bond em { display: block; height: 100%; background: linear-gradient(90deg, #ff9cbf, #ff5d8f); border-radius: 5px; }
.bond b { color: var(--ink); }
.tile.lock { opacity: .6; }
.ok { color: #2f8f4f !important; font-weight: 800; margin: 4px 0; }
.lbl { font-weight: 900; margin: 12px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; background: #fff; border-radius: 999px; min-height: 44px; padding: 8px 14px; font-weight: 800; font-size: 14px; box-shadow: 0 2px 8px rgba(80,40,10,.1); }
.chip.on { background: var(--c); color: #fff; }
.chip:disabled { opacity: .5; }
.pv { text-align: center; }
.pv img { width: 300px; max-width: 100%; height: auto; border-radius: 20px; }
