@font-face { font-family: "AP Chobani"; src: url(/fonts/ap-chobani-serif.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --brown: #5a3729; --muted: #83695f; --cream: #fdf6ea; --line: #ead9cc;
  --pink-l: #fdeef2; --pink: #f6c3cf; --pink-btn: #f8c9d0; --accent: #e0849b;
  --yel-l: #fdf2d2; --yel: #f9dc8c; --blue-l: #e5f5fa; --sky: #a0d9e6; --mint: #bfeadf; --lilac: #dcc8f2;
  --sand: #f3eee4; --problem: #b0502c;
  --shadow: 0 14px 40px rgba(90, 55, 41, .08);
  --font: "AP Chobani", Georgia, serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--cream); color: var(--brown); font-family: var(--font); font-size: 16px; }
body { min-height: 100vh; min-height: 100dvh; }
body::before { content: ""; position: fixed; inset: 0; background: url(/img/paw.png) 0 0 / 300px 300px repeat; z-index: -1; pointer-events: none; }
a { color: var(--brown); }
button, input, select, textarea { font-family: inherit; color: var(--brown); font-size: 16px; }
h1, h2, h3 { font-weight: 400; margin: 0; }
h1 { font-size: 32px; line-height: 1.1; }
h2 { font-size: 21px; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#app.wide { max-width: 1240px; }

.bar { background: var(--sky); padding: calc(6px + var(--safe-t)) 16px 6px; display: flex; align-items: center; gap: 10px; min-height: 60px; position: sticky; top: 0; z-index: 20; }
.bar img { width: 46px; height: auto; display: block; }
.tag { display: inline-block; background: var(--pink); color: var(--brown); border-radius: 8px; padding: 5px 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3; }
.bar .tag { align-self: flex-start; }
.bar .grow { flex: 1; }
.bar .sync { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--brown); opacity: .8; }

header.head { padding: 14px 16px 2px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
header.head p { margin: 4px 0 0; }
.iconbtn { width: 48px; height: 48px; border-radius: 10px; background: var(--blue-l); border: none; display: inline-flex; align-items: center; justify-content: center; color: var(--brown); text-decoration: none; flex-shrink: 0; cursor: pointer; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; font-size: 15px; }

main { flex: 1; padding: 14px 16px calc(96px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 14px 16px; }
.card.flush { padding: 6px 8px 4px; }
.band { border-radius: 24px; padding: 14px 16px; }
.band.blue { background: var(--blue-l); } .band.pink { background: var(--pink-l); } .band.yel { background: var(--yel-l); } .band.mint { background: #e6f7f2; }
.row-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 6px 8px 10px; }

.btn { min-height: 50px; border-radius: 12px; border: none; background: var(--sky); color: var(--brown); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; font-weight: 400; }
.btn.pink { background: var(--pink-btn); }
.btn.line { background: #fff; border: 1.5px solid var(--line); }
.btn.small { min-height: 44px; font-size: 13px; letter-spacing: .1em; padding: 0 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.problem { background: #fbe3dc; }
.linkbtn { background: none; border: none; min-height: 48px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; width: 100%; }

.days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.chip { flex: 1 0 62px; min-width: 62px; height: 52px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--brown); }
.chip b { font-weight: 400; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.chip span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.chip.on { background: var(--pink-btn); border-color: var(--pink-btn); }
.chip.on span { color: var(--brown); }
.chip.all { flex-basis: 84px; }

.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; background: var(--sand); border-radius: 16px; padding: 4px; }
.tabs button { min-height: 44px; border: none; border-radius: 12px; background: transparent; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; padding: 0 4px; }
.tabs button.on { background: var(--pink-btn); }

.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--brown); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.item:last-child { border-bottom: none; }
.num { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-l); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.num.none { background: var(--yel-l); }
.num.done { background: var(--mint); }
.num.fail { background: #fbe3dc; }
.num.llm { background: var(--lilac); }
.item .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .t { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 13px; border-radius: 8px; padding: 5px 10px; background: var(--sand); white-space: nowrap; }
.pill.yel { background: var(--yel); } .pill.lilac { background: var(--lilac); } .pill.mint { background: var(--mint); } .pill.pink { background: var(--pink); } .pill.sky { background: var(--sky); } .pill.red { background: #fbe3dc; }
.badge { min-width: 20px; height: 20px; border-radius: 6px; background: var(--problem); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }

.avatar { width: 44px; height: 44px; border-radius: 30%; background: var(--mint); border: 2px solid #fff; box-shadow: 0 6px 16px rgba(90,55,41,.12); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; font-size: 16px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; }

.progress { height: 10px; border-radius: 6px; background: var(--sand); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--sky); border-radius: 6px; }

nav.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 6px 8px calc(6px + var(--safe-b)); z-index: 30; }
nav.tabbar .in { width: 100%; max-width: 560px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
nav.tabbar a { text-decoration: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0 2px; min-height: 54px; }
nav.tabbar a .ic { width: 50px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; position: relative; }
nav.tabbar a.on { color: var(--brown); }
nav.tabbar a.on .ic { background: var(--sky); }
nav.tabbar a b { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; }
nav.tabbar a.on b { font-weight: 700; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.input { min-height: 50px; border-radius: 12px; border: 1.5px solid var(--line); padding: 0 14px; background: #fff; font-size: 17px; width: 100%; }
textarea.input { padding: 12px 14px; min-height: 90px; resize: vertical; }
.code-input { letter-spacing: .4em; font-size: 26px; text-align: center; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { min-height: 56px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; text-align: left; padding: 8px 14px; font-size: 16px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.opt.on { background: var(--sky); border-color: var(--sky); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 22px; cursor: pointer; }
.stepper b { min-width: 28px; text-align: center; font-size: 20px; font-weight: 400; }

.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); background: var(--brown); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.sheet-back { position: fixed; inset: 0; background: rgba(160, 217, 230, .42); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--cream); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; max-height: 88vh; overflow: auto; }

.photo-prev { width: 100%; border-radius: 16px; display: block; background: var(--sand); max-height: 360px; object-fit: cover; }
video.cam { width: 100%; border-radius: 16px; background: #000; max-height: 50vh; object-fit: cover; }
.label-prev { width: 100%; max-width: 260px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; display: block; margin: 0 auto; }

.drag { touch-action: none; }
.item.dragging { opacity: .6; background: var(--blue-l); }
.grip { width: 30px; display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* Owner web */
.web-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; flex-wrap: wrap; }
.web-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.web-main { padding: 12px 20px 40px; display: flex; flex-direction: column; gap: 14px; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: left; font-weight: 400; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 6px; border-bottom: 1.5px solid var(--line); }
table.t td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scrollx { overflow-x: auto; }
@media (max-width: 700px) { .web-head, .web-main { padding-left: 14px; padding-right: 14px; } }
