:root {
  color-scheme: dark;
  --bg: #11131d;
  --panel: #1a1d2b;
  --panel-soft: #202434;
  --text: #f8f7fb;
  --muted: #a4a8ba;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #bd9cff;
  --accent-2: #ff9ccf;
  --success: #90e0b2;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
.app-shell { width: min(100%, 760px); margin: 0 auto; padding: 26px 20px 48px; }
.topbar, .welcome-row, .section-heading, .sheet-actions, .item-top, .item-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.heading-actions { display: flex; align-items: center; gap: 16px; }
.topbar { margin-bottom: 34px; }
.brand-button { padding: 0; color: inherit; background: transparent; text-align: left; }
.brand-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 4px; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
h1, h2, p { margin: 0; }
h1 { font-size: 29px; line-height: 1; letter-spacing: -.05em; }
h2 { font-size: 22px; letter-spacing: -.04em; }
.spark { color: var(--accent-2); margin-left: 4px; }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.25); border-radius: 15px; color: #17131d; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-weight: 900; }
.welcome-row { margin-bottom: 24px; }
.muted { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.icon-button { width: 42px; height: 42px; border-radius: 15px; color: var(--text); background: var(--panel-soft); border: 1px solid var(--line); font-size: 24px; }
.list-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 20px; }
.list-tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 10px 14px; border-radius: 13px; color: var(--muted); background: transparent; border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.tab.active { color: #191522; border-color: transparent; background: linear-gradient(135deg, var(--accent), #d9b8ff); }
.add-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 16px; margin-bottom: 34px; border: 1px solid rgba(189,156,255,.24); border-radius: 22px; background: linear-gradient(145deg, rgba(189,156,255,.15), rgba(255,156,207,.06)); }
.add-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #191522; background: var(--accent); font-size: 22px; font-weight: 900; }
.add-copy { display: grid; gap: 4px; align-content: center; }
.add-copy strong { font-size: 14px; }
.add-copy span { color: var(--muted); font-size: 12px; }
.add-form { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 3px; }
input { min-width: 0; width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; outline: 0; color: var(--text); background: rgba(0,0,0,.18); }
input:focus { border-color: var(--accent); }
.primary-button, .secondary-button, .text-button { padding: 12px 15px; border-radius: 13px; font-weight: 800; white-space: nowrap; }
.primary-button { color: #17131d; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.secondary-button { color: var(--text); background: var(--panel-soft); border: 1px solid var(--line); }
.text-button { color: var(--accent); background: transparent; padding-inline: 0; font-size: 13px; }
.text-button.danger { color: var(--accent-2); }
.text-button:disabled { cursor: not-allowed; opacity: .35; }
.section-heading { margin-bottom: 14px; align-items: end; }
.section-heading .eyebrow { margin-bottom: 4px; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.item-card { display: flex; min-width: 0; overflow: hidden; flex-direction: column; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.item-image, .item-placeholder { display: grid; place-items: center; width: 100%; height: 152px; color: var(--muted); background: linear-gradient(135deg, #282238, #1c2330); object-fit: cover; font-size: 30px; }
.item-body { display: flex; min-height: 142px; padding: 13px; flex: 1; flex-direction: column; }
.item-domain { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.item-title { display: -webkit-box; min-height: 2.6em; overflow: hidden; margin: 5px 0 9px; font-size: 14px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.item-price { min-height: 1.2em; color: var(--accent-2); font-size: 12px; font-weight: 800; }
.item-actions { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.item-action { padding: 0; color: var(--muted); background: transparent; font-size: 11px; }
.item-action.done { color: var(--success); }
.empty-state { grid-column: 1 / -1; padding: 42px 20px; border: 1px dashed rgba(255,255,255,.15); border-radius: 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--text); }
.shared-panel { padding: 17px; margin-bottom: 20px; border: 1px solid rgba(255,156,207,.25); border-radius: 20px; background: linear-gradient(135deg, rgba(255,156,207,.14), rgba(189,156,255,.09)); }
.shared-panel .shared-copy { margin-bottom: 13px; }
.shared-panel strong { display: block; margin-bottom: 4px; }
.shared-panel span { color: var(--muted); font-size: 12px; }
.shared-address { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; margin-bottom: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(0,0,0,.14); }
.shared-address > div { min-width: 0; }
.copy-button { display: grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); background: var(--panel-soft); font-size: 20px; line-height: 1; }
.copy-button:active { transform: scale(.96); }
.shared-address span { color: var(--accent-2); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.shared-address strong { margin: 0; white-space: pre-line; font-size: 13px; line-height: 1.4; }
.shared-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shared-grid .item-card { background: rgba(16, 18, 28, .38); }
.hidden { display: none !important; }
.sheet-backdrop { position: fixed; z-index: 5; inset: 0; display: grid; align-items: end; background: rgba(5,6,10,.7); backdrop-filter: blur(7px); }
.preview-sheet { width: min(100%, 760px); padding: 12px 20px calc(22px + env(safe-area-inset-bottom)); margin: 0 auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; background: #1b1d2a; }
.sheet-handle { width: 44px; height: 4px; margin: 0 auto 20px; border-radius: 4px; background: rgba(255,255,255,.25); }
.preview-card { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: center; margin-bottom: 22px; }
.preview-card img, .preview-placeholder { width: 90px; height: 90px; border-radius: 18px; object-fit: cover; background: #292336; }
.preview-placeholder { display: grid; place-items: center; font-size: 26px; }
.preview-card h3 { margin: 5px 0; font-size: 16px; }
.preview-card p { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.preview-warning { display: block; margin-top: 8px; color: var(--accent-2); font-size: 11px; line-height: 1.35; }
.preview-domain { color: var(--accent-2); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.settings-sheet h2 { margin: 6px 0 8px; }
.settings-copy { color: var(--muted); font-size: 13px; line-height: 1.45; }
.settings-form { display: grid; gap: 10px; margin-top: 18px; }
.settings-form > label:not(.check-row) { color: var(--muted); font-size: 12px; font-weight: 700; }
textarea { min-width: 0; width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; outline: 0; resize: vertical; color: var(--text); background: rgba(0,0,0,.18); font: inherit; }
textarea:focus { border-color: var(--accent); }
.check-row { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.check-row input { width: auto; margin: 2px 0 0; accent-color: var(--accent); }
.sheet-actions button { flex: 1; }
.toast { position: fixed; z-index: 10; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom)); left: 18px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 15px; color: var(--text); background: #292c3d; box-shadow: 0 10px 30px rgba(0,0,0,.25); text-align: center; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.visible { transform: translateY(0); opacity: 1; }
@media (max-width: 520px) { .app-shell { padding-inline: 16px; } .item-grid { grid-template-columns: 1fr 1fr; gap: 9px; } .item-image, .item-placeholder { height: 128px; } .item-body { padding: 11px; } .add-form { display: grid; grid-template-columns: 1fr auto; } }
