:root {
  --bg: #fff6ec;
  --bg-blob-1: #ffd8f0;
  --bg-blob-2: #d9f2ff;
  --surface: #ffffff;
  --surface-2: #faf5ff;
  --ink: #23123d;
  --muted: #74668a;
  --line: #23123d;
  --soft-line: #eadff5;
  --primary: #7c3aed;
  --primary-2: #a855f7;
  --primary-ink: #ffffff;
  --pink: #ec4899;
  --yellow: #fbbf24;
  --mint: #10b981;
  --sky: #0ea5e9;
  --orange: #f97316;
  --red: #e11d48;
  --t-purple: #efe4ff;
  --t-pink: #ffe1f0;
  --t-yellow: #fff1c7;
  --t-mint: #d5f7e9;
  --t-sky: #dbf1ff;
  --t-orange: #ffe4d1;
  --shadow: 4px 4px 0 var(--line);
  --shadow-sm: 2px 2px 0 var(--line);
  --radius: 18px;
  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #160d26;
    --bg-blob-1: #3b1650;
    --bg-blob-2: #0f2c45;
    --surface: #221538;
    --surface-2: #2b1c45;
    --ink: #f6efff;
    --muted: #b6a7cc;
    --line: #0a0514;
    --soft-line: #3a2a57;
    --t-purple: #3a2266;
    --t-pink: #4a1d3b;
    --t-yellow: #4a3a12;
    --t-mint: #123d33;
    --t-sky: #123650;
    --t-orange: #4a2a14;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #160d26; --bg-blob-1: #3b1650; --bg-blob-2: #0f2c45; --surface: #221538; --surface-2: #2b1c45;
  --ink: #f6efff; --muted: #b6a7cc; --line: #0a0514; --soft-line: #3a2a57;
  --t-purple: #3a2266; --t-pink: #4a1d3b; --t-yellow: #4a3a12; --t-mint: #123d33; --t-sky: #123650; --t-orange: #4a2a14;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(600px 400px at 0% 0%, var(--bg-blob-1), transparent 70%),
    radial-gradient(700px 500px at 100% 10%, var(--bg-blob-2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 15px;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: .2px; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--red); font-weight: 700; min-height: 1.2em; margin: 8px 0 0; }
.spacer { flex: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 2px solid var(--line); border-radius: 12px;
  padding: 9px 16px; font-weight: 800; cursor: pointer;
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .08s ease, box-shadow .08s ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-success { background: var(--mint); color: #fff; }
.btn-soft { background: var(--t-purple); }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; transform: none; }
.btn-danger-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--red); }
.btn-danger-ghost:hover { background: var(--t-pink); box-shadow: none; transform: none; }
.btn-block { width: 100%; }
.icon-btn { padding: 6px 10px; font-size: 18px; line-height: 1; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%); text-align: center;
  background: var(--surface); border: 2px solid var(--line); border-radius: 24px;
  box-shadow: 8px 8px 0 var(--line); padding: 32px 24px;
}
.login-card h1 { font-size: 34px; }
.login-card p { margin: 4px 0 20px; }
.login-card input { width: 100%; margin-bottom: 12px; }
.mv-logo { display: inline-block; flex: none; color: var(--ink); fill: currentColor; filter: drop-shadow(3px 3px 0 var(--line)); overflow: visible; }
.login-mascot { width: 96px; height: 84px; margin-bottom: 10px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-6deg); } }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--soft-line);
}
.brand { display: flex; min-width: 0; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.brand-logo { width: 34px; height: 30px; filter: drop-shadow(2px 2px 0 var(--line)); transition: transform .3s; }
.brand:hover .brand-logo { transform: rotate(-15deg) scale(1.15); }
.brand-dot { color: var(--pink); }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.menu { position: relative; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 6px; display: flex; flex-direction: column;
}
.menu-pop button { text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.menu-pop button:hover { background: var(--surface-2); }
.menu-pop hr { border: 0; border-top: 2px solid var(--soft-line); margin: 4px 0; width: 100%; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 18px 16px 80px; }

/* ---------- dashboard ---------- */
.dashboard { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); margin-bottom: 26px; }
.tile {
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; position: relative; overflow: hidden; min-width: 0;
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.tile-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.tile-value { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile-sub { font-size: 13px; color: var(--muted); margin-top: 2px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-emoji { position: absolute; right: 10px; top: 8px; font-size: 30px; opacity: .9; transform: rotate(8deg); }
.kpi { grid-column: span 3; }
.kpi .tile-label, .hl .tile-label { padding-right: 30px; }
.hl { grid-column: span 3; cursor: default; }
.hl.clickable { cursor: pointer; }
.hl.clickable:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.hl .tile-value { font-size: 22px; }
.hl-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.t-purple { background: var(--t-purple); } .t-pink { background: var(--t-pink); } .t-yellow { background: var(--t-yellow); }
.t-mint { background: var(--t-mint); } .t-sky { background: var(--t-sky); } .t-orange { background: var(--t-orange); }
.pos { color: var(--mint); } .neg { color: var(--red); }

.level { grid-column: span 6; background: linear-gradient(135deg, var(--primary), var(--pink)); color: #fff; }
.level .tile-label { color: rgba(255,255,255,.85); }
.level-name { font-family: var(--font-display); font-size: 30px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.level-badge { font-size: 42px; animation: bob 3s ease-in-out infinite; }
.level-bar { height: 14px; border-radius: 99px; background: rgba(255,255,255,.25); border: 2px solid var(--line); margin-top: 10px; overflow: hidden; }
.level-bar > i { display: block; height: 100%; background: var(--yellow); border-radius: 99px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.level-sub { font-size: 13px; margin-top: 6px; font-weight: 700; opacity: .92; }

.markets { grid-column: span 6; }
.bars { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.bar-row .bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 14px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 2px solid var(--line); }
.bar-track > i { display: block; height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar-row .bar-n { text-align: right; font-variant-numeric: tabular-nums; }
.empty-mini { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.views { display: flex; gap: 8px; }
.view-tab {
  border: 2px solid var(--line); background: var(--surface); border-radius: 12px 12px 12px 12px;
  padding: 8px 14px; font-weight: 800; cursor: pointer; font-family: var(--font-display); font-size: 16px;
}
.view-tab.active { background: var(--ink); color: var(--bg); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
#search { flex: 1 1 240px; }
input, select, textarea {
  border: 2px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 9px 12px; outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent); }
textarea { resize: vertical; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 2px solid var(--line); border-radius: 99px; padding: 5px 12px; font-weight: 800; font-size: 13px;
  background: var(--surface); cursor: pointer; user-select: none;
}
.chip.on { background: var(--yellow); color: #23123d; }
.chip .n { opacity: .65; margin-left: 4px; }

/* ---------- item grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease;
  animation: pop .35s cubic-bezier(.2, 1.4, .4, 1) both;
}
.card:hover { transform: translate(-2px, -2px) rotate(-.4deg); box-shadow: 7px 7px 0 var(--line); }
.card.is-sold { opacity: .82; }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); border-bottom: 2px solid var(--line); cursor: pointer; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo .ph { display: grid; place-items: center; height: 100%; font-size: 64px; }
.photo-count { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 99px; }
.pill {
  position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
}
.pill.stock { background: var(--t-sky); }
.pill.listed { background: var(--yellow); color: #23123d; }
.pill.sold { background: var(--mint); color: #fff; }
.sold-stamp {
  position: absolute; right: -6px; top: 18px; transform: rotate(12deg);
  font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--red);
  border: 3px solid var(--red); padding: 0 10px; border-radius: 8px; background: rgba(255,255,255,.85);
}
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.card-meta { font-size: 12.5px; color: var(--muted); font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.card-markets { display: flex; gap: 4px; flex-wrap: wrap; }
.mk { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; border: 1.5px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 8px; }
.stat { min-width: 0; }
.stat b { display: block; font-family: var(--font-display); font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.profit-tag { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.card-btns { display: flex; gap: 6px; }
.card-btns .btn { padding: 6px 12px; font-size: 13px; }

.empty {
  grid-column: 1 / -1; text-align: center; padding: 50px 20px;
  background: var(--surface); border: 2px dashed var(--line); border-radius: 24px;
}
.empty .big { font-size: 72px; animation: bob 2.4s ease-in-out infinite; }
.empty svg.big { width: 84px; height: 74px; }
.empty h3 { font-size: 24px; margin: 8px 0 4px; }
.empty .btn { margin-top: 14px; }

/* ---------- ledger ---------- */
.table-wrap { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; text-align: left; white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 2px solid var(--line); background: var(--surface-2); }
td { border-bottom: 1px solid var(--soft-line); }
td.num, th.num { text-align: right; }
tfoot td { font-weight: 800; border-top: 2px solid var(--line); border-bottom: 0; background: var(--surface-2); }
.link { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- dialogs ---------- */
.dlg {
  border: 2px solid var(--line); border-radius: 22px; padding: 0; width: min(680px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px); background: var(--surface); color: var(--ink); box-shadow: 8px 8px 0 var(--line);
}
.dlg-sm { width: min(460px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(20, 8, 40, .55); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlg-in .25s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes dlg-in { from { transform: translateY(20px) scale(.97); opacity: 0; } }
.dlg form { display: flex; flex-direction: column; max-height: calc(100dvh - 28px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 2px solid var(--soft-line); }
.dlg-head h2 { font-size: 22px; }
.dlg-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.dlg-foot { display: flex; gap: 8px; align-items: center; padding: 12px 18px; border-top: 2px solid var(--soft-line); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 150px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }
.money { position: relative; }
.money::before { content: '$'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--muted); pointer-events: none; }
.money input { padding-left: 24px; }
.add-market { display: flex; gap: 6px; margin-top: 6px; }
.add-market input { flex: 1; }
.preview { justify-content: flex-end; }
.preview-box { border: 2px dashed var(--line); border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 14px; background: var(--surface-2); }

.photo-zone { border: 2px dashed var(--line); border-radius: 16px; padding: 12px; background: var(--surface-2); transition: background .15s; }
.photo-zone.drag { background: var(--t-yellow); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs:not(:empty) { margin-bottom: 10px; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); cursor: pointer; background: var(--surface); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.cover::after { content: '★ cover'; position: absolute; left: 0; right: 0; bottom: 0; background: var(--yellow); color: #23123d; font-size: 10px; font-weight: 800; text-align: center; }
.thumb .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 99px; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; cursor: pointer; line-height: 22px; padding: 0; }
.thumb.loading { display: grid; place-items: center; font-size: 26px; animation: spin 1s linear infinite; border-style: dashed; }
@keyframes spin { to { transform: rotate(360deg); } }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.sales-block h3 { font-size: 16px; margin-bottom: 6px; }
.sale-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2px solid var(--soft-line); border-radius: 12px; margin-bottom: 6px; font-size: 14px; font-weight: 700; flex-wrap: wrap; }
.sale-row .grow { flex: 1; min-width: 140px; }
.sale-row button { background: none; border: 0; cursor: pointer; color: var(--red); font-weight: 800; }

.sell-name { font-family: var(--font-display); font-size: 18px; margin: 0; }
.sell-preview { border-radius: 14px; padding: 12px 14px; font-weight: 800; border: 2px solid var(--line); text-align: center; font-size: 15px; }

/* ---------- camera ---------- */
.cam-dlg { width: min(560px, 100vw); max-height: 100dvh; background: #000; border-radius: 22px; overflow: hidden; }
.cam-wrap { position: relative; display: flex; flex-direction: column; height: min(86dvh, 760px); }
#cam-video { flex: 1; width: 100%; min-height: 0; object-fit: cover; background: #000; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.cam-flash.on { opacity: .85; transition: none; }
.cam-shots { position: absolute; left: 10px; right: 10px; bottom: 104px; display: flex; gap: 6px; overflow-x: auto; }
.cam-shots img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; flex: none; animation: pop .3s cubic-bezier(.2, 1.4, .4, 1); }
.cam-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); background: #000; }
.cam-side { background: none; border: 0; color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; width: 70px; }
.cam-shutter { width: 72px; height: 72px; border-radius: 50%; border: 5px solid #fff; background: var(--pink); cursor: pointer; transition: transform .1s; }
.cam-shutter:active { transform: scale(.88); }
.cam-done { position: absolute; top: 12px; right: 12px; background: var(--yellow); color: #23123d; border: 2px solid #000; border-radius: 99px; font-weight: 800; padding: 7px 16px; cursor: pointer; }

/* ---------- lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; }
.lightbox::backdrop { background: rgba(10, 4, 20, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 80px); border-radius: 14px; border: 3px solid #fff; }
.lb-close, .lb-nav { position: fixed; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 99px; cursor: pointer; font-size: 22px; width: 46px; height: 46px; }
.lb-close { top: 14px; right: 14px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 32px; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-count { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 800; }

/* ---------- toast & confetti ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 14px; font-weight: 800;
  border: 2px solid var(--line); box-shadow: var(--shadow); z-index: 100; transition: transform .35s cubic-bezier(.2, 1.4, .4, 1);
  max-width: calc(100vw - 32px); text-align: center; opacity: 0; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.confetti { position: fixed; top: -12px; width: 10px; height: 14px; z-index: 99; pointer-events: none; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); } }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .kpi, .hl { grid-column: span 6; }
  .level, .markets { grid-column: span 12; }
}
@media (max-width: 560px) {
  .dashboard { gap: 10px; }
  .tile { padding: 12px; }
  .tile-value { font-size: 24px; }
  .tile-emoji { font-size: 22px; }
  .level-name { font-size: 22px; }
  .brand { font-size: 22px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  #add-btn { padding: 8px 12px; }
  .brand-logo { width: 28px; height: 25px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 10px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:nth-child(3) { display: none; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .card-btns .btn { flex: 1; }
  .dlg { border-radius: 18px; }
  .cam-dlg { border-radius: 0; width: 100vw; }
  .cam-wrap { height: 100dvh; }
}
@media (max-width: 380px) {
  .add-word { display: none; }
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
