@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/archivo-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/archivo-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/bodoni-moda-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --green: #1F3D2E; --green-2: #2C5440; --brass: #CDB88A;
  --stone: #F1ECE4; --card: #FFFDF9; --ink: #1E1A18; --muted: #6A615B; --line: #DDD3C6;
  --ok: #2E6B45; --amber: #B5761E; --amber-bg: #FBF1E0; --red: #A33A2B;
  --on-green: #F6EFE6;
  --serif: 'Bodoni Moda', Didot, Georgia, serif;
  --sans: Archivo, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 1px 0 var(--line), 0 6px 18px rgba(31, 61, 46, .06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--stone); color: var(--ink); font: 17px/1.45 var(--sans); padding-bottom: 110px; }
body.noscroll { overflow: hidden; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; }
a { color: var(--green-2); }
.small { font-size: .9rem; color: var(--muted); }
[hidden] { display: none !important; }

/* Top bar */
.bar { background: var(--green); color: var(--on-green); padding: calc(.9rem + env(safe-area-inset-top)) 1.1rem .9rem; position: sticky; top: 0; z-index: 5; }
.bar-inner { max-width: 680px; margin: 0 auto; display: flex; align-items: center; gap: .8rem; }
.bar-title { font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; }
.bar-sub { font-size: .85rem; color: var(--brass); margin-top: .15rem; letter-spacing: .02em; }
.bar-back { color: var(--on-green); text-decoration: none; font-size: 2.2rem; line-height: 1; padding: 0 .3rem 0 0; }
body > .bar > .bar-title { display: block; max-width: 680px; margin: 0 auto; }

.page { max-width: 680px; margin: 0 auto; padding: 1rem .8rem; }
.panel { background: var(--card); box-shadow: var(--shadow); padding: 1.3rem; margin: 0 0 1rem; border-radius: 10px; }
.loading { color: var(--muted); text-align: center; padding: 3rem 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 1rem var(--sans); color: var(--on-green); background: var(--green); border: 0; border-radius: 10px; padding: .8rem 1.2rem; min-height: 50px; cursor: pointer; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; }
.btn.big { width: 100%; min-height: 58px; font-size: 1.1rem; }
.btn.ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.btn.ok { background: var(--ok); }
.btn.danger { color: var(--red); box-shadow: none; width: 100%; margin-top: .4rem; }
.btn.light { background: #fff; color: var(--ink); }
.btn.ghost.light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.link { background: none; border: 0; padding: .55rem .2rem; margin: -.55rem 0; color: var(--green-2); font: 600 .95rem var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }

/* Sections */
.section { font: 600 .8rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 1.6rem .2rem .7rem; display: flex; gap: .5rem; align-items: center; }
.section span { background: var(--ink); color: #fff; border-radius: 99px; padding: .1rem .55rem; letter-spacing: 0; font-size: .8rem; }
.room { font: 600 1rem var(--sans); margin: 1.1rem .2rem .5rem; color: var(--green); }
.group { display: grid; gap: .6rem; }
details.signed summary { list-style: none; cursor: pointer; }
details.signed summary::-webkit-details-marker { display: none; }
details.signed summary h2::after { content: 'Show'; margin-left: auto; text-transform: none; letter-spacing: 0; text-decoration: underline; color: var(--green-2); font-size: .9rem; }
details.signed[open] summary h2::after { content: 'Hide'; }

/* A snag */
.item { display: flex; gap: .9rem; align-items: flex-start; background: var(--card); border-radius: 12px; padding: 1rem 1rem 1rem .9rem; box-shadow: var(--shadow); border-left: 5px solid transparent; }
.item.sentback { border-left-color: var(--amber); }
.tick { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--green); background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; margin-top: -.1rem; }
.tick svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.tick:active { background: #E3EEE7; }
.item.ticking .tick, .s-done .tick, .s-signed .tick { background: var(--ok); border-color: var(--ok); }
.item.ticking .tick svg, .s-done .tick svg, .s-signed .tick svg { opacity: 1; }
.item.ticking { opacity: .6; transition: opacity .3s; }
.s-done, .s-signed { background: #FAF8F4; }
.s-done .body, .s-signed .body { color: var(--muted); }
.s-signed .body { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.tick:disabled { cursor: default; }
.item-main { flex: 1; min-width: 0; }
.body { margin: .1rem 0 .3rem; font-size: 1.08rem; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .3rem; }
.tag { font-size: .78rem; font-weight: 600; letter-spacing: .03em; background: #ECE6DC; color: var(--ink); border-radius: 6px; padding: .15rem .5rem; }
.tag.urgent { background: var(--red); color: #fff; }
.note { background: var(--amber-bg); color: #5A3A0C; border-radius: 8px; padding: .55rem .7rem; margin: .2rem 0 .5rem; font-size: .98rem; }
.thumbs { display: flex; gap: .45rem; flex-wrap: wrap; margin: .5rem 0 .2rem; }
.thumb { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; width: 84px; height: 84px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .84rem; color: var(--muted); margin-top: .3rem; }
.foot-btns { display: flex; gap: 1rem; }
.checkrow { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .7rem; }

.hint { background: #E4EEE7; border-radius: 10px; padding: .9rem 1rem; margin: .4rem 0 .6rem; display: flex; gap: .8rem; align-items: flex-start; }
.hint p { margin: 0; flex: 1; }
.banner { background: var(--ink); color: #fff; padding: .8rem 1rem; border-radius: 10px; margin-bottom: .8rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty p:first-child { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); margin: 0 0 .4rem; }

/* Add button pinned to the bottom */
.addbar { position: fixed; left: 0; right: 0; bottom: 0; padding: .7rem .8rem calc(.7rem + env(safe-area-inset-bottom)); background: linear-gradient(rgba(241,236,228,0), var(--stone) 35%); z-index: 4; }
.addbar .btn { max-width: 680px; margin: 0 auto; display: flex; box-shadow: 0 6px 20px rgba(31,61,46,.25); }

/* Bottom sheet */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(20, 18, 16, .45); }
.sheet-box { position: relative; background: var(--card); width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 1.1rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom)); animation: up .18s ease-out; }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-box { border-radius: 16px; } }
@keyframes up { from { transform: translateY(30px); opacity: .6; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.sheet-head h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin: 0; }
.x { background: none; border: 0; font-size: 2rem; line-height: 1; width: 48px; height: 48px; cursor: pointer; color: var(--muted); }
label { display: block; font-weight: 600; font-size: .95rem; margin: 0 0 .4rem; }
input:not([type=checkbox]), textarea { font: inherit; font-size: 1.05rem; color: var(--ink); width: 100%; padding: .8rem .9rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; margin: 0 0 1rem; }
textarea { resize: vertical; min-height: 96px; }
input:focus, textarea:focus { outline: none; border-color: var(--green-2); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .55rem; }
.chip { font: 600 .95rem var(--sans); background: #fff; border: 2px solid var(--line); border-radius: 99px; padding: .45rem .9rem; min-height: 44px; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.picker { margin: 0 0 1rem; }
.file { cursor: pointer; margin: 0; }
.previews { display: flex; gap: .45rem; flex-wrap: wrap; }
.previews img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; margin-top: .6rem; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 600; min-height: 48px; margin: 0 0 1rem; cursor: pointer; }
.check input { width: 26px; height: 26px; accent-color: var(--red); margin: 0; }

/* Photo viewer */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; }
.lb-actions { display: flex; gap: .6rem; margin-top: 1rem; }

/* Toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; border-radius: 10px; padding: .4rem .5rem .4rem 1rem; display: flex; align-items: center; gap: .8rem; z-index: 25; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 1.6rem); }
.toast button { background: none; border: 0; color: var(--brass); font: 600 1rem var(--sans); padding: .6rem .7rem; min-height: 44px; cursor: pointer; text-decoration: underline; }

/* Admin */
.listcard h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.listcard h2 a { color: var(--ink); text-decoration: none; }
.listcard.is-archived { opacity: .65; }
.meta { color: var(--muted); font-size: .92rem; margin: -.2rem 0 .8rem; }
.linkrow input { font-size: .9rem; margin-bottom: .7rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.more { margin-top: 1rem; }
.more summary { cursor: pointer; color: var(--green-2); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.more form { margin-top: .6rem; }
.key { overflow-wrap: anywhere; background: #F4EFE7; padding: .7rem; border-radius: 8px; }
