/* Stories / short-video grammar. Verdict fields are drenched colour; green, amber and red are reserved for verdicts only. Light: used in bright supermarket light. */
:root {
  --ground: #fbf9ff;
  --ink: #17112f;
  --ink-2: #5d5878;
  --line: #e6e1f5;
  --soft: #f1eefc;
  --accent: #5b3df5;
  --pink: #ff3d8b;
  --orange: #ff9a3d;
  --ok: #08855a;
  --check: #ffb800;
  --no: #d9263c;
  --shadow: 0 2px 10px rgba(23,17,47,.10), 0 1px 3px rgba(23,17,47,.08);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.20), 0 3px 8px rgba(0,0,0,.10);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 72px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 500 16px/1.45 'Rubik', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  height: 100dvh; overflow: hidden; overscroll-behavior: none;
}
::selection { background: rgba(91,61,245,.22); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 18px; font-weight: 700; margin-block: 24px 10px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 18px; height: 18px; }
.ic.lg { width: 28px; height: 28px; }
.muted { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shell: one phone-shaped column; scrolling happens inside #view */
#app { height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; background: var(--ground); position: relative; overflow: hidden; }
#view { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; outline: none; }
#view.pad { padding: calc(14px + env(safe-area-inset-top)) 16px 24px; }
#view.pad > * { animation: rise .35s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 560px) {
  body { background: #e4defa; display: grid; place-items: center; }
  #app { height: min(900px, calc(100dvh - 32px)); border-radius: 36px; box-shadow: var(--shadow-lg); }
}

/* bottom bar with the raised scan button */
.tabs { flex: none; display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: end; padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); position: relative; z-index: 5; }
.tabs a { min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-2); text-decoration: none; font-size: 12px; font-weight: 600; border-radius: 14px; }
.tabs a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.tabs a[aria-current="page"] .ic { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.fab { justify-self: center; width: 68px; height: 68px; margin-block-start: -30px; border-radius: 50%; border: 5px solid #fff; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 20px rgba(91,61,245,.38); transition: transform .15s var(--ease); }
.fab .ic { width: 30px; height: 30px; stroke-width: 2.1; }
.fab:active { transform: scale(.92); }
#app[data-mode="story"] .tabs, #app[data-mode="bare"] .tabs { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--soft); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .12s var(--ease); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { color: #a3132a; background: #fdecef; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn.outline { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--soft); cursor: pointer; color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.btn-row { display: flex; gap: 10px; } .btn-row > * { flex: 1; }

/* stories row = family members */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.stories::-webkit-scrollbar { display: none; }
.story-btn { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; padding: 0; cursor: pointer; scroll-snap-align: start; }
.ring { display: block; padding: 3px; border-radius: 50%; background: var(--line); }
.story-btn[aria-pressed="true"] .ring { background: linear-gradient(45deg, var(--orange), var(--pink) 50%, var(--accent)); }
.story-btn .gap { display: block; padding: 3px; border-radius: 50%; background: var(--ground); }
.story-btn { text-decoration: none; }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px; background: var(--c, var(--accent)); }
.avatar.xl { width: 84px; height: 84px; font-size: 36px; }
.avatar.sm { width: 36px; height: 36px; font-size: 16px; }
.story-btn span.nm { font-size: 12.5px; font-weight: 600; max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.story-btn[aria-pressed="true"] span.nm { color: var(--ink); font-weight: 700; }
.story-btn.add .ring { background: none; box-shadow: inset 0 0 0 2px var(--line); }
.story-btn.add .avatar { background: var(--soft); color: var(--accent); }
.wordmark { display: flex; align-items: center; justify-content: space-between; padding-inline-end: 16px; padding: calc(12px + env(safe-area-inset-top)) 16px 2px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }

/* feed: snap-scrolling full cards */
.home { display: flex; flex-direction: column; height: 100%; }
.feed { flex: 1; min-height: 0; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; padding: 2px 8px 0; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.vcard { position: relative; height: calc(100% - 22px); min-height: 380px; margin-block-end: 8px; scroll-snap-align: start; border-radius: 28px; overflow: hidden; padding: 22px; padding-inline: 22px 84px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; background: var(--f); color: var(--t); }
.vcard:last-child { height: calc(100% - 8px); }
.vcard .cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.vcard .big-ic { position: absolute; inset-inline-start: 18px; top: 18px; opacity: .95; }
.vcard .big-ic .ic { width: 64px; height: 64px; stroke-width: 1.6; }
.vcard .word { font-size: clamp(46px, 15vw, 76px); font-weight: 800; line-height: .95; letter-spacing: -.03em; }
.vcard .pname { font-size: 22px; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.vcard .why { font-size: 16px; font-weight: 500; color: var(--t2); }
.rail { position: absolute; inset-inline-end: 12px; bottom: 22px; z-index: 2; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.rbtn { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--t); font-size: 12px; font-weight: 700; text-decoration: none; }
.rbtn .c { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); transition: transform .15s var(--ease); }
.rbtn:active .c { transform: scale(.9); }
.rbtn.on .ic { fill: currentColor; }
.rbtn .ic { width: 26px; height: 26px; }
.v-ok { --f: var(--ok); --t: #fff; --t2: rgba(255,255,255,.92); --chip: rgba(255,255,255,.2); }
.v-warn { --f: var(--check); --t: var(--ink); --t2: rgba(23,17,47,.84); --chip: rgba(23,17,47,.12); }
.v-bad { --f: var(--no); --t: #fff; --t2: rgba(255,255,255,.93); --chip: rgba(255,255,255,.2); }

.hero-card { position: relative; height: calc(100% - 22px); min-height: 400px; margin-block-end: 8px; scroll-snap-align: start; border-radius: 28px; overflow: hidden; background: var(--accent); color: #fff; padding: 26px 22px 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.hero-card .bars { position: absolute; inset: 0 0 auto 0; height: 70%; width: 100%; color: rgba(255,255,255,.17); -webkit-mask-image: linear-gradient(#000 35%, transparent); mask-image: linear-gradient(#000 35%, transparent); }
.hero-card h1 { font-size: clamp(40px, 13vw, 58px); position: relative; }
.hero-card p { position: relative; font-size: 17px; font-weight: 500; color: rgba(255,255,255,.92); max-width: 30ch; }
.scan-big { position: relative; min-height: 68px; border-radius: 999px; border: 0; background: #fff; color: var(--accent); font-size: 21px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; box-shadow: 0 8px 22px rgba(23,17,47,.25); transition: transform .15s var(--ease); }
.scan-big:active { transform: scale(.97); }
.pills { position: relative; display: flex; gap: 8px; }
.pills button { flex: 1; min-height: 46px; border-radius: 999px; border: 0; background: rgba(255,255,255,.2); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.pills button:active { transform: scale(.96); }
.swipe-hint { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.88); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.feed-empty { padding: 8px 12px 24px; color: var(--ink-2); text-align: center; }

/* result = full-screen story */
.story { position: relative; height: 100%; background: var(--f); color: var(--t); display: flex; flex-direction: column; overflow: hidden; }
.story .seg { display: flex; gap: 4px; padding: calc(10px + env(safe-area-inset-top)) 12px 0; }
.story .seg button { flex: 1; height: 22px; background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; }
.story .seg i { display: block; width: 100%; height: 4px; border-radius: 4px; background: var(--chip); }
.story .seg button[aria-current="true"] i { background: var(--t); }
.story .seg button.done i { background: var(--t); opacity: .55; }
.story .who { display: flex; align-items: center; gap: 10px; padding: 6px 14px; }
.story .who .avatar { box-shadow: 0 0 0 2px var(--t); }
.story .who b { display: block; font-size: 16px; line-height: 1.1; }
.story .who small { font-size: 13px; color: var(--t2); font-weight: 500; }
.story .who .x { margin-inline-start: auto; background: var(--chip); color: var(--t); }
.story .body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 84px 0 24px; padding-inline: 24px 88px; gap: 14px; animation: swap .32s var(--ease) both; }
@keyframes swap { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 28px)); } to { opacity: 1; transform: none; } }
.story .mark { width: 96px; height: 96px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; animation: pop .5s var(--ease) both; }
.story .mark .ic { width: 58px; height: 58px; stroke-width: 1.7; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.story .word { font-size: clamp(54px, 18vw, 88px); font-weight: 800; line-height: .92; letter-spacing: -.035em; }
.story .why { font-size: 21px; font-weight: 600; line-height: 1.3; text-wrap: balance; color: var(--t); }
.story .gf { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 6px 14px 6px 12px; border-radius: 999px; background: var(--chip); font-weight: 700; font-size: 15px; }
.story .foot { padding: 0 24px calc(22px + env(safe-area-inset-bottom)); padding-inline: 24px 88px; }
.story .foot .pn { font-size: 22px; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.story .foot .mk { font-size: 15px; color: var(--t2); margin-block-start: 2px; }
.story .foot .more { margin-block-start: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; background: var(--t); color: var(--f); font-weight: 800; cursor: pointer; }
.story .rail { bottom: calc(22px + env(safe-area-inset-bottom)); }
.story .tap { position: absolute; top: 96px; bottom: 150px; width: 30%; border: 0; background: none; z-index: 1; cursor: pointer; padding: 0; }
.story .tap.prev { inset-inline-start: 0; } .story .tap.next { inset-inline-end: 22%; }
.story .tap:focus-visible { outline-offset: -6px; }

/* details sheet content */
.find { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--soft); }
.find + .find { margin-block-start: 8px; }
.find .ic { margin-block-start: 2px; }
.find.bad .ic { color: var(--no); } .find.warn .ic { color: #9a6b00; }
.find b { display: block; }
.find span { color: var(--ink-2); font-size: 15px; }
.ai-tag { font-size: 12px; font-weight: 800; background: #fff; color: var(--accent); padding: 1px 8px; border-radius: 999px; margin-inline-start: 6px; }
details { border-radius: 18px; background: var(--soft); padding: 2px 14px; margin-block-start: 12px; }
summary { min-height: 46px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
details p { padding-block: 2px 12px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70ch; }
.fine { margin-block-start: 18px; font-size: 14px; color: var(--ink-2); max-width: 60ch; }
.empty { padding: 36px 12px; text-align: center; color: var(--ink-2); }
.empty .ic { width: 40px; height: 40px; margin-block-end: 8px; color: var(--accent); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-block-end: 4px; }
.head-line { display: flex; align-items: center; gap: 14px; margin-block-end: 14px; }

/* favourites = profile grid */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-inline: -16px; }
.tile { position: relative; aspect-ratio: 1; background: var(--f); color: var(--t); display: flex; flex-direction: column; justify-content: space-between; padding: 10px; text-decoration: none; overflow: hidden; }
.tile .ic { width: 28px; height: 28px; }
.tile b { font-size: 14px; font-weight: 700; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile:active { filter: brightness(.94); }

/* shops */
.search { position: relative; }
.search .ic { position: absolute; inset-inline-start: 16px; top: 14px; color: var(--ink-2); }
.input, textarea.input { width: 100%; min-height: 50px; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--soft); }
textarea.input { min-height: 150px; border-radius: 20px; resize: vertical; padding: 14px 16px; }
.search .input { padding-inline-start: 46px; }
.input:focus { outline: 3px solid rgba(91,61,245,.4); }
.shops { display: flex; flex-direction: column; gap: 10px; margin-block-start: 6px; }
.shop { position: relative; border-radius: 26px; padding: 18px 18px 16px; background: var(--c); color: #fff; display: flex; flex-direction: column; gap: 4px; min-height: 132px; overflow: hidden; }
.shop h3 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.shop p { font-size: 15px; color: rgba(255,255,255,.94); max-width: 30ch; }
.shop .btn-row { margin-block-start: auto; padding-block-start: 10px; }
.shop .btn { min-height: 42px; background: rgba(255,255,255,.22); color: #fff; font-size: 14.5px; }
.shop .btn.solid { background: #fff; color: var(--c); }
.shop.venue { background: var(--soft); color: var(--ink); min-height: 0; }
.shop.venue p { color: var(--ink-2); }
.shop.venue .btn { background: #fff; color: var(--accent); box-shadow: inset 0 0 0 2px var(--line); }

/* family */
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block: 14px; }
.person { border: 0; background: var(--soft); border-radius: 26px; padding: 18px 12px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; text-align: center; }
.person:active { transform: scale(.97); }
.person b { font-size: 18px; }
.lvl { font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: #fff; color: var(--accent); }
.person.add { background: none; box-shadow: inset 0 0 0 2px var(--line); color: var(--accent); justify-content: center; min-height: 160px; }

/* sheets and overlays */
#layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.scrim { position: absolute; inset: 0; background: rgba(23,17,47,.5); pointer-events: auto; animation: fade .2s ease both; }
.sheet { position: absolute; inset-inline: 0; bottom: 0; max-width: 480px; margin-inline: auto; max-height: 88dvh; overflow: auto; pointer-events: auto; background: var(--ground); border-radius: 28px 28px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: up .36s var(--ease) both; }
.sheet .grab { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { font-size: 22px; font-weight: 800; margin-block-end: 12px; letter-spacing: -.01em; }
@keyframes up { from { transform: translateY(50px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.field { display: block; margin-block-end: 14px; }
.field > span { display: block; font-weight: 700; margin-block-end: 6px; }
.levels { display: grid; gap: 8px; margin-block-end: 16px; }
.level { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 20px; background: var(--soft); cursor: pointer; }
.level input { margin-block-start: 4px; width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.level b { display: block; } .level span { color: var(--ink-2); font-size: 15px; }
.level:has(input:checked) { background: #fff; box-shadow: inset 0 0 0 2px var(--accent); }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-radius: 20px; background: var(--soft); cursor: pointer; text-align: start; }
.pick + .pick { margin-block-start: 8px; }
.pick[aria-pressed="true"] { background: #fff; box-shadow: inset 0 0 0 2px var(--accent); }
.pick .grow { flex: 1; } .pick b { display: block; } .pick small { color: var(--ink-2); font-size: 14px; }

.scanner { position: absolute; inset: 0; background: #0d0a1c; pointer-events: auto; display: flex; flex-direction: column; animation: fade .2s ease both; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset-inline: 9%; top: 27%; height: 26%; border-radius: 26px; box-shadow: 0 0 0 9999px rgba(13,10,28,.6); border: 4px solid #fff; }
.scanner .frame::after { content: ""; position: absolute; inset-inline: 14px; top: 50%; height: 3px; border-radius: 3px; background: var(--pink); animation: sweep 1.6s ease-in-out infinite alternate; }
@keyframes sweep { from { top: 14%; } to { top: 86%; } }
.scanner .hint { position: absolute; inset-inline: 0; top: calc(27% + 26% + 22px); text-align: center; color: #fff; font-weight: 700; font-size: 18px; padding-inline: 24px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.scanner .bar { position: absolute; inset-inline: 0; top: 0; display: flex; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 16px; }
.scanner .bar .icon-btn { background: rgba(255,255,255,.22); color: #fff; }
.scanner .bottom { position: absolute; inset-inline: 0; bottom: 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.scanner .bottom .btn { flex: 1; background: rgba(255,255,255,.96); }
.scanner .msg { margin: auto; padding: 24px; text-align: center; color: #fff; max-width: 360px; font-weight: 600; font-size: 18px; }

.busy { position: absolute; inset: 0; display: grid; place-items: center; background: var(--accent); color: #fff; pointer-events: auto; animation: fade .2s ease both; text-align: center; }
.busy > div { padding: 24px; max-width: 300px; }
.busy b { font-size: 26px; font-weight: 800; display: block; }
.busy p { color: rgba(255,255,255,.9); margin-block-start: 4px; }
.spin { width: 56px; height: 56px; border-radius: 50%; border: 5px solid rgba(255,255,255,.3); border-top-color: #fff; margin: 0 auto 18px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { margin: 2px 8px 0; height: calc(100% - 30px); border-radius: 28px; background: linear-gradient(90deg, var(--soft) 25%, #f8f6ff 50%, var(--soft) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

#toast { position: fixed; inset-inline: 16px; bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); max-width: 440px; margin-inline: auto; z-index: 60; background: var(--ink); color: #fff; padding: 13px 18px; border-radius: 999px; text-align: center; font-weight: 700; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .3s var(--ease); }
#toast.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .feed { scroll-behavior: auto; }
}
@media (hover: hover) { .btn:hover, .person:hover, .pick:hover { filter: brightness(.97); } .fab:hover { filter: brightness(1.08); } .rbtn:hover .c { transform: scale(1.06); } }

.wordmark { padding-inline: 16px; }
.acct { text-decoration: none; }
.titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.callout { padding: 12px 14px; border-radius: 16px; background: #fdecef; color: #8a1426; font-weight: 600; margin-block-end: 12px; }
.callout.soft { background: var(--soft); color: var(--ink-2); font-weight: 500; }

/* login */
.login { height: 100%; min-height: 0; margin: 8px; border-radius: 28px; justify-content: center; align-items: stretch; }
.login .bars-wrap { position: absolute; inset: 0 0 auto 0; height: 55%; color: rgba(255,255,255,.17); -webkit-mask-image: linear-gradient(#000 35%, transparent); mask-image: linear-gradient(#000 35%, transparent); }
.login .bars-wrap .bars { width: 100%; height: 100%; position: static; }
.login h1 { font-size: 54px; } .gbtn { position: relative; display: flex; justify-content: center; min-height: 44px; }
.gmsg { font-size: 15px; text-align: center; } .devform { position: relative; display: flex; flex-direction: column; gap: 8px; }
.devform p { font-size: 14px; color: rgba(255,255,255,.85); } .devform .input { background: rgba(255,255,255,.95); color: var(--ink); }

/* places, guides */
.place { display: block; width: 100%; text-align: start; border: 0; background: var(--soft); border-radius: 24px; padding: 16px 18px; cursor: pointer; }
.place + .place { margin-block-start: 10px; }
.place b { font-size: 20px; display: block; margin-block-start: 6px; }
.place p { margin-block-start: 6px; color: var(--ink); }
.place small { display: block; margin-block-start: 8px; color: var(--ink-2); }
.pk { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 12px; border-radius: 999px; background: #fff; color: var(--accent); }
.pc { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 14px; margin-block-start: 2px; }
.guides { display: flex; flex-direction: column; gap: 8px; }
.guide { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; text-decoration: none; color: var(--ink); background: #fff; border: 0; box-shadow: inset 0 0 0 2px var(--line); border-radius: 22px; padding: 14px 16px; cursor: pointer; }
.guide > span { flex: 1; } .guide b { display: block; } .guide small { color: var(--ink-2); font-size: 14px; }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 14px; }
.kind input { position: absolute; opacity: 0; } .kind span { display: inline-block; padding: 9px 18px; border-radius: 999px; background: var(--soft); font-weight: 700; cursor: pointer; }
.kind input:checked + span { background: var(--accent); color: #fff; } .kind input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* recipes */
.rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.rimg { aspect-ratio: 4 / 5; border-radius: 22px; background: var(--soft) center / cover no-repeat; display: grid; place-items: center; color: var(--accent); }
.rcard b { font-size: 16px; line-height: 1.25; }
.rmeta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .rmeta small { color: var(--ink-2); font-weight: 600; }
.mv { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--f); color: var(--t); }
.rcard .mv.v-ok, .mv.v-ok { --f: var(--ok); --t: #fff; } .mv.v-warn { --f: var(--check); --t: var(--ink); } .mv.v-bad { --f: var(--no); --t: #fff; }
.rhead h1 { font-size: 30px; } .rhero { display: block; aspect-ratio: 16 / 10; border-radius: 24px; background: var(--soft) center / cover no-repeat; margin-block-end: 14px; }
.rtags { display: flex; gap: 6px; flex-wrap: wrap; margin-block-start: 8px; } .tag { font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--soft); color: var(--ink-2); }
.who-list { display: flex; flex-direction: column; gap: 8px; }
.who-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 20px; background: var(--f); color: var(--t); }
.who-row b { flex: 1; } .who-row .mv { background: var(--chip, rgba(255,255,255,.22)); color: inherit; font-size: 14px; }
.who-row.v-warn { --chip: rgba(23,17,47,.12); }
.who-row .avatar { box-shadow: 0 0 0 2px var(--t); }
.ing, .steps { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; } .steps { gap: 10px; }
.ing li::marker { color: var(--accent); } .steps li::marker { color: var(--accent); font-weight: 800; }
.note { color: var(--ink-2); white-space: pre-wrap; max-width: 60ch; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0; color: var(--accent); font-weight: 700; background: none; border: 0; cursor: pointer; margin-block-end: 6px; }
.invite { padding: 16px; border-radius: 22px; background: var(--soft); } .invite .code { font-size: 22px; letter-spacing: .12em; color: var(--accent); }

/* in-app window */
.frame-win { position: absolute; inset: 0; background: var(--ground); pointer-events: auto; display: flex; flex-direction: column; max-width: 480px; margin-inline: auto; animation: up .3s var(--ease) both; }
.frame-win .fbar { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; } .fbar b { flex: 1; text-align: center; }
.frame-win iframe { flex: 1; min-height: 0; border: 0; width: 100%; background: #fff; }
.frame-win .fnote { font-size: 13px; color: var(--ink-2); padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); text-align: center; }

.hbtns { display: flex; align-items: center; gap: 10px; }
.hbtns .icon-btn { text-decoration: none; color: var(--ink); }
.dcard { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); background: var(--soft); border-radius: 24px; padding: 14px 16px; }
.dcard + .dcard { margin-block-start: 10px; }
.dcard .grow { flex: 1; min-width: 0; } .dcard b { display: block; font-size: 18px; margin-block-start: 4px; } .dcard small { color: var(--ink-2); }
.dayh { font-size: 15px; color: var(--ink-2); margin-block: 22px 8px; }
.entry { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; border: 0; background: var(--soft); border-radius: 20px; padding: 12px 14px; cursor: pointer; }
.entry + .entry { margin-block-start: 8px; }
.entry .et { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); min-width: 46px; }
.entry .grow { flex: 1; min-width: 0; } .entry b { display: block; } .entry small { display: block; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ethumb { width: 46px; height: 46px; border-radius: 12px; background: var(--line) center / cover no-repeat; flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inl { display: flex; gap: 8px; align-items: center; } .inl .input { flex: 1; }
.prev { margin-block-start: 8px; aspect-ratio: 4 / 3; border-radius: 18px; background: var(--soft) center / cover no-repeat; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn-row .btn { padding-inline: 12px; white-space: nowrap; }
