body.app { background: var(--paper); min-height: 100vh; }
.shell { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.preview-bar { background: var(--blue-soft); color: #7C2D12; font-size: 13px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); display: grid; grid-template-columns: 112px minmax(0, 1fr) 112px; align-items: center; gap: 10px; }
.preview-bar .back-site { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px 0 6px; border-radius: 999px; background: #FFFFFF; color: var(--ink); text-decoration: none; flex: none; }
.preview-bar .back-site:hover { color: var(--ink); background: #FFE4D5; }
.preview-bar .pv-text { text-align: center; }
.preview-bar .back-site { justify-self: start; }
.preview-bar::after { content: ""; }
.preview-bar .bs-short { display: none; }
@media (max-width: 520px) { .preview-bar { grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 6px; } .preview-bar .bs-long { display: none; } .preview-bar .bs-short { display: inline; } }
.preview-bar a { font-weight: 600; }
.screen { padding: 0 20px; flex: 1; }
.app-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 0 12px; }
.app-head h1 { font-size: 30px; }
.lead-in { color: var(--muted); font-size: 15px; margin-bottom: 12px; }

.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--soft); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; }
.icon-btn.primary { background: var(--ink); color: #FFFFFF; }
.icon-btn.primary:hover { background: #34343A; }

.chips { display: flex; gap: 8px; padding: 4px 0 14px; overflow-x: auto; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #D6D3D1; background: #FFFFFF; color: var(--ink-2); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }

.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.item { background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.item.new { animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.avatar { width: 52px; height: 52px; border-radius: 12px; background: #E7E5E4; color: var(--muted); flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 15px; }
.meta { flex: 1; min-width: 0; }
.meta .name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .store { font-size: 13px; color: #78716C; margin-top: 2px; }
.meta .row { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.b-watch { background: var(--blue-soft); color: var(--blue-dark); }
.act { display: flex; align-items: center; gap: 6px; flex: none; }
.buy { min-height: 44px; padding: 0 14px; border-radius: 10px; background: var(--ink); color: #FFFFFF; text-decoration: none; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; }
.buy:hover { background: #34343A; color: #FFFFFF; }
.rm, .addq { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #78716C; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rm:hover { background: var(--soft); color: #B91C1C; }
.addq { background: var(--blue-soft); color: var(--blue-dark); }
.addq[disabled] { background: var(--green-bg); color: var(--green-ink); cursor: default; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }

.upsell { width: 100%; margin-top: 16px; min-height: 52px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--blue-soft); color: #7C2D12; font: inherit; font-size: 14px; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }

.group { background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.group h2 { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #78716C; margin-bottom: 4px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 15px; }
.setting input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--blue); }
.plus { font-style: normal; font-size: 11px; font-weight: 700; background: #FFE4D5; color: #9A3412; padding: 2px 7px; border-radius: 999px; margin-left: 6px; }
.link-btn { border: 0; background: none; color: var(--blue-dark); font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.pledge { color: var(--ink-2); font-size: 15px; }
.wide { width: 100%; margin-top: 8px; }
.hint { font-size: 13px; color: #78716C; margin-top: 10px; text-align: center; }
.hint.left { text-align: left; margin: 0 0 16px; font-size: 15px; color: var(--muted); }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: #FFFFFF; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; }
.tabbar button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: #78716C; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 56px; justify-content: center; cursor: pointer; }
.tabbar button[aria-current="page"] { color: var(--blue-dark); }

.sheet { border: 0; padding: 0; width: 100%; max-width: 520px; margin: auto auto 0; border-radius: 24px 24px 0 0; background: #FFFFFF; color: var(--ink); }
.sheet::backdrop { background: rgba(28,25,23,.45); }
.sheet[open] { animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) { .sheet { margin: auto; border-radius: 24px; } }
.sheet form { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h2 { font-size: 24px; }
.lbl { font-weight: 600; font-size: 14px; margin: 12px 0 6px; }
.opt { font-weight: 400; color: #78716C; }
.sheet .field { width: 100%; flex: none; }
.plans-mini { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.plan-opt { display: flex; align-items: center; gap: 12px; padding: 16px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; }
.plan-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.plan-opt input { width: 20px; height: 20px; accent-color: var(--blue); }
.plan-opt span { flex: 1; display: flex; flex-direction: column; }
.plan-opt small { color: var(--muted); font-size: 13px; }
.plan-opt em { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 18px; }

.toast-live { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #FFFFFF; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(28,25,23,.25); max-width: calc(100% - 40px); z-index: 20; }
.app-head h1 .hl { color: var(--orange); }

.badge.st { display: inline-flex; align-items: center; gap: 5px; }
.badge.st svg { flex: none; }
.b-soon { background: #FFF1E8; color: #C2410C; }
.b-watch { background: var(--soft); color: var(--ink-2); }

.avatar.has-ico { background: #FFF1E8; }
.avatar .ic-b { stroke: #1E1E21; }
.avatar .ic-a { stroke: #F2570D; }
.avatar .ic-dot { fill: #F2570D; stroke: none; }

/* Watchlist cards: never overlap on narrow phones or with large text */
.item { align-items: flex-start; }
.item .avatar { margin-top: 2px; }
.meta .row { flex-wrap: wrap; row-gap: 6px; }
.meta .pill-ok { max-width: 100%; }
.buy-inline { margin-top: 12px; min-height: 40px; }
.item .act { margin: -8px -8px 0 0; }
