:root { --c: #80B918; --c2: #FF7B00; --bg: #EBD3AE; --ink: #2a2414; --mut: #6f6450; --leaf: #2f8f4f; --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) + 62px) 16px 24px; max-width: 520px; margin: 0 auto; }
.logo { text-align: left; align-self: flex-start; color: #3a2a12; background: rgba(255,248,232,.82); border-radius: 18px; padding: 8px 14px; box-shadow: 0 4px 14px rgba(80,50,10,.12); }
.logo h1 { margin: 0; font-size: clamp(34px, 9vw, 48px); font-weight: 900; letter-spacing: -1px; line-height: 1; color: #2f6b1e; }
.logo p { margin: 3px 0 0; font-weight: 800; font-size: 14px; color: #6a5030; }
.spacer { height: max(190px, calc(46vh - 150px)); width: 100%; display: flex; align-items: flex-start; justify-content: flex-start; padding-top: 10px; cursor: pointer; }
.pethint { background: rgba(255,255,255,.85); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 800; color: var(--mut); }
.sheet { width: 100%; background: rgba(255,250,240,.97); border-radius: 26px; padding: 14px; box-shadow: 0 -6px 30px rgba(80,50,10,.2); display: flex; flex-direction: column; gap: 8px; }
.petline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 4px; }
.petline b { font-size: 22px; font-weight: 900; }
.petline 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,50,10,.14); }
.btn.main { background: linear-gradient(180deg, #9BD94A, #4E9F2A); color: #fff; box-shadow: 0 8px 20px rgba(78,159,42,.38); }
.btn.big { min-height: 76px; font-size: 26px; font-weight: 900; }
.btn small { display: block; font-size: 14px; font-weight: 700; opacity: .92; }
.btn.small { min-height: 44px; font-size: 15px; width: auto; padding: 0 16px; display: inline-block; }
.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,50,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, #F2FFE0, #D6F5B0); }
.tile.lock { opacity: .6; }
.quests { background: #fff; border-radius: 18px; padding: 10px 12px; box-shadow: 0 4px 14px rgba(80,50,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; }
.q em { font-style: normal; color: var(--mut); }
.q.done { color: var(--leaf); }
.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,50,10,.08); }
.foot { color: var(--mut); font-size: 13px; text-align: center; margin: 6px 0 0; }
.foot a { color: var(--leaf); }

.page { max-width: 640px; margin: 0 auto; padding: calc(var(--sat) + 68px) 16px 40px; min-height: 100%; background: #fffaf0; }
.peek { height: 42vh; }
.page.see { min-height: auto; border-radius: 26px 26px 0 0; padding-top: 16px; box-shadow: 0 -6px 30px rgba(0,0,0,.25); }
.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,50,10,.12); flex: none; }
.mut { color: var(--mut); font-size: 14px; margin: 4px 0 10px; font-weight: 600; line-height: 1.5; }
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: 10px; text-align: left; box-shadow: 0 3px 12px rgba(80,50,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 span { font-weight: 600; line-height: 1.5; }
.row.slot { align-items: flex-start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.chip { border: 2px solid #e6dcc6; background: #fffdf6; border-radius: 14px; min-height: 48px; padding: 6px 10px; font-weight: 800; font-size: 14px; text-align: left; }
.chip small { display: block; font-size: 12px; color: var(--mut); }
.chip.on { border-color: var(--leaf); background: #e8f8e4; }
.chip.lock { opacity: .5; }
.lvls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.lvl { border: 0; background: #fff; border-radius: 18px; padding: 10px; min-height: 120px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; box-shadow: 0 3px 12px rgba(80,50,10,.07); }
.lvl b { font-size: 24px; font-weight: 900; color: var(--leaf); line-height: 1; }
.lvl span { font-weight: 800; font-size: 15px; }
.lvl em { font-style: normal; color: #f2a900; letter-spacing: 2px; }
.lvl small { color: var(--mut); font-weight: 600; font-size: 12px; line-height: 1.35; }
.lvl.lock { opacity: .55; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 10px; }
.tabs button { border: 0; border-radius: 14px; min-height: 46px; background: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 2px 8px rgba(80,50,10,.07); }
.tabs button.on { background: var(--leaf); color: #fff; }
.bird { display: flex; gap: 12px; background: #fff; border-radius: 20px; padding: 12px; box-shadow: 0 4px 14px rgba(80,50,10,.08); align-items: flex-start; }
.bird > img { width: 118px; height: 94px; border-radius: 16px; flex: none; }
.bird > div { flex: 1; min-width: 0; }
.bird b { font-size: 18px; display: block; }
.bird .sci { color: var(--mut); font-style: italic; font-weight: 600; font-size: 13px; }
.bird em { display: block; font-style: normal; color: #c98a00; font-weight: 800; font-size: 13px; margin: 3px 0; }
.bird em.no { color: var(--mut); }
.bird p { margin: 4px 0; font-size: 14px; font-weight: 600; line-height: 1.45; }
.bird p.call { display: flex; gap: 8px; align-items: center; background: #f4f1e8; border-radius: 12px; padding: 6px; }
.bird p.call img { width: 92px; height: 37px; border-radius: 8px; flex: none; }
.bird p.where { color: var(--mut); font-size: 13px; }
.bird.unseen > img { opacity: .8; }
.pill { display: inline-block; background: #e3f6e6; color: var(--leaf); font-weight: 800; border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.law { background: #fff; border-radius: 18px; padding: 14px; font-weight: 600; line-height: 1.55; font-size: 15px; }
.law li { margin: 6px 0; }
.comp { background: #12261c; border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.crow { display: grid; grid-template-columns: 54px repeat(8, 1fr); gap: 5px; align-items: center; }
.crow span { border-radius: 10px; font-weight: 900; font-size: 13px; text-align: center; padding: 12px 0; color: #14203d; }
.cell { border: 0; border-radius: 10px; min-height: 46px; background: rgba(255,255,255,.1); }
.cell.on { box-shadow: 0 0 14px rgba(255,255,255,.5); }
.bird.col { flex-direction: column; gap: 6px; }
.bh { display: flex; gap: 12px; align-items: flex-start; width: 100%; }
.bh > img { width: 104px; height: 83px; border-radius: 14px; flex: none; }
.bh > div { flex: 1; min-width: 0; }
.bird.col > p { width: 100%; }
.bird p.call img { width: 120px; height: 48px; }
.bird.unseen .bh > img { opacity: .8; }
