/* Akhum Data Room — elevated private-bank aesthetic
   navy / warm paper / bronze foil · engraved-ledger feel · fully responsive */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --paper: #f4f2ec;
  --paper-2: #eeeae1;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --ink: #17202e;
  --ink-2: #414b5b;
  --navy: #0f2542;
  --navy-2: #16345c;
  --navy-deep: #0a1a30;
  --hairline: #ddd8cd;
  --hairline-soft: #ebe7de;
  --muted: #78756b;
  --muted-2: #9b978c;
  --accent: #9a7324;
  --accent-2: #c39a45;
  --accent-soft: #efe6d2;
  --danger: #8c2f2f;
  --danger-2: #a94040;
  --focus: #2a5b9e;

  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;

  --radius: 3px;
  --shadow-xs: 0 1px 2px rgba(15, 37, 66, .05);
  --shadow-sm: 0 1px 2px rgba(15, 37, 66, .05), 0 2px 5px rgba(15, 37, 66, .05);
  --shadow-md: 0 6px 18px rgba(15, 37, 66, .09), 0 2px 6px rgba(15, 37, 66, .05);
  --shadow-lg: 0 28px 64px rgba(4, 12, 24, .34);
  --ring: 0 0 0 3px rgba(42, 91, 158, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html {
  /* fluid base: scales continuously between phone and desktop */
  font-size: clamp(14.5px, 0.34vw + 13.3px, 16.5px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 520px at 50% -12%, rgba(154, 115, 36, .06), transparent 62%),
    radial-gradient(900px 600px at 100% 0%, rgba(15, 37, 66, .04), transparent 55%),
    repeating-linear-gradient(0deg, rgba(120, 100, 60, .022) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(120, 100, 60, .022) 0 1px, transparent 1px 34px);
  background-attachment: fixed;
}

.hidden { display: none !important; }
.screen { min-height: 100vh; display: flex; flex-direction: column; }

svg.icon {
  width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.6;
  fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px;
  flex-shrink: 0;
}

::selection { background: rgba(154, 115, 36, .22); }

/* ============================================================= PIN gate */
#screen-pin {
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(120% 120% at 50% -25%, #234878 0%, var(--navy) 48%, var(--navy-deep) 100%);
  position: relative;
  overflow: hidden;
}
#screen-pin::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 40px);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 78%);
  pointer-events: none;
}
.pin-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  border-top: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
  padding: clamp(34px, 6vw, 54px) clamp(26px, 5vw, 48px) 34px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: cardRise .55s var(--ease) both;
}
.pin-card::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
}
@keyframes cardRise {
  from { opacity: 0; transform: translateY(16px) scale(.99); }
  to   { opacity: 1; transform: none; }
}
.pin-logo {
  color: var(--navy);
  width: 66px; height: 66px; margin: 0 auto 2px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff, var(--surface-2));
  box-shadow: inset 0 0 0 1px var(--hairline), 0 6px 16px rgba(15, 37, 66, .10);
}
.pin-logo svg { width: 30px; height: 30px; stroke-width: 1.3; }
.pin-card h1 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--navy);
  padding-left: 0.16em;
}
.pin-sub {
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: -14px;
  padding-left: 0.34em;
}
.pin-hint { color: var(--muted); font-size: 0.82rem; }
#pin-input {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.4rem;
  letter-spacing: 0.5em;
  text-align: center;
  text-indent: 0.5em;
  padding: 14px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
#pin-input:focus { border-color: var(--focus); box-shadow: var(--ring); background: #fff; }
.pin-error { color: var(--danger); font-size: 0.8rem; min-height: 1.2em; font-weight: 500; }
.pin-foot {
  border-top: 1px solid var(--hairline-soft);
  padding-top: 15px;
  color: var(--muted-2);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}

/* ================================================================ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1;
  padding: 9px 16px;
  box-shadow: var(--shadow-xs);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .06s;
}
.btn:hover { border-color: var(--navy); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--focus); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-2); border-color: var(--danger-2); }

/* toolbar buttons sit on navy */
.topbar .btn {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
  box-shadow: none;
}
.topbar .btn:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .1); }
.topbar .btn:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); border-color: #fff; }
.topbar .btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-color: var(--accent);
  color: #1c1405;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(154, 115, 36, .35);
}
.topbar .btn-primary:hover { filter: brightness(1.05); border-color: var(--accent-2); }

/* ============================================================== app chrome */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px clamp(14px, 3vw, 30px);
  background: linear-gradient(180deg, var(--navy-2), var(--navy) 70%, var(--navy-deep));
  color: #fff;
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 4px 18px rgba(4, 12, 24, .25);
}
.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.brand svg { width: 19px; height: 19px; stroke-width: 1.4; color: var(--accent-2); vertical-align: -3px; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding-left: 0.16em;
}
.brand-sub {
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  white-space: nowrap;
}
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

.crumbbar {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(1.1) blur(4px);
  border-bottom: 1px solid var(--hairline);
  padding: 11px clamp(14px, 3vw, 30px);
}
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; }
.crumb {
  background: none; border: 0; color: var(--muted);
  cursor: pointer; font-family: var(--sans); font-size: 0.82rem;
  padding: 2px 3px; border-radius: 2px; transition: color .12s;
}
.crumb:hover { color: var(--navy); text-decoration: underline; }
.crumb[disabled] { color: var(--ink); cursor: default; font-weight: 600; text-decoration: none; }
.crumb-sep { color: var(--hairline); }

/* ============================================================ content/table */
.content {
  flex: 1;
  padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 30px) 80px;
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.content.dragging .panel { outline: 2px dashed var(--focus); outline-offset: -6px; }
.drop-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; font-weight: 600; letter-spacing: .02em;
  color: var(--navy);
  background: rgba(244, 242, 236, .86);
  backdrop-filter: blur(2px);
  pointer-events: none; z-index: 5;
  border-radius: var(--radius);
}

.file-table { width: 100%; border-collapse: collapse; }
.file-table th {
  text-align: left;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
  white-space: nowrap;
}
.file-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 0.86rem;
  vertical-align: middle;
}
.file-table tbody tr {
  transition: background .12s;
  animation: rowIn .32s var(--ease) both;
}
.file-table tbody tr:last-child td { border-bottom: 0; }
.file-table tbody tr td:first-child { transition: box-shadow .16s var(--ease); }
.file-table tbody tr:hover { background: #faf8f2; }
.file-table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 0 var(--accent); }
.file-table tr.cut { opacity: .45; }
.file-table tr.cut td:first-child { box-shadow: inset 2px 0 0 0 var(--muted-2); }

@keyframes rowIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.file-table tbody tr:nth-child(1) { animation-delay: .02s; }
.file-table tbody tr:nth-child(2) { animation-delay: .05s; }
.file-table tbody tr:nth-child(3) { animation-delay: .08s; }
.file-table tbody tr:nth-child(4) { animation-delay: .11s; }
.file-table tbody tr:nth-child(5) { animation-delay: .14s; }
.file-table tbody tr:nth-child(6) { animation-delay: .17s; }
.file-table tbody tr:nth-child(n+7) { animation-delay: .2s; }

.item-name {
  display: inline-flex; align-items: center; gap: 11px;
  background: none; border: 0; color: var(--ink);
  cursor: pointer; font-family: var(--sans);
  font-size: 0.87rem; font-weight: 500; text-align: left;
  word-break: break-word; padding: 0;
}
.item-name .label { border-bottom: 1px solid transparent; transition: border-color .12s, color .12s; }
.item-name:hover .label { color: var(--focus); border-bottom-color: var(--focus); }
.item-icon {
  color: var(--muted); display: inline-flex;
  width: 30px; height: 30px; border-radius: var(--radius);
  align-items: center; justify-content: center;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hairline-soft);
  flex-shrink: 0;
}
.item-icon svg { width: 16px; height: 16px; }
tr[data-type="folder"] .item-icon { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px #e3d4b3; }

.cell-muted { color: var(--muted); font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.views-badge {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; color: var(--ink-2);
  cursor: pointer; font-family: var(--sans);
  font-size: 0.74rem; font-weight: 600; font-variant-numeric: tabular-nums;
  min-width: 34px; padding: 3px 11px;
  transition: border-color .12s, color .12s, background .12s;
}
.views-badge:hover { border-color: var(--focus); color: var(--focus); background: #f4f7fb; }

.pin-chip {
  background: var(--surface-2); border: 1px dashed var(--hairline);
  border-radius: var(--radius); color: var(--ink-2);
  cursor: pointer; font-family: var(--mono);
  font-size: 0.75rem; letter-spacing: 0.1em; padding: 4px 11px;
  transition: border-color .12s, color .12s;
}
.pin-chip:hover { border-color: var(--accent); color: var(--accent); border-style: solid; }

.col-actions { width: 1%; }
.cell-act { text-align: right; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; white-space: nowrap; }
.icon-btn {
  background: none; border: 0; border-radius: var(--radius);
  color: var(--muted); cursor: pointer;
  padding: 6px 7px; display: inline-flex;
  transition: background .12s, color .12s;
}
.icon-btn:hover { background: #f0ede5; color: var(--navy); }
.icon-btn.danger:hover { color: var(--danger); background: #f7ecec; }

.empty { text-align: center; padding: clamp(56px, 12vw, 96px) 20px; color: var(--muted); }
.empty svg { width: 32px; height: 32px; stroke-width: 1.1; margin-bottom: 14px; color: var(--hairline); }
.empty p { font-size: 0.9rem; }
.empty-hint { font-size: 0.78rem; margin-top: 6px; color: var(--muted-2); }

/* ================================================================= modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 20, 36, .5);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 50;
  animation: fadeIn .18s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  border-top: 2px solid var(--navy);
  box-shadow: var(--shadow-lg);
  padding: 26px 28px;
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; gap: 16px;
  animation: cardRise .28s var(--ease) both;
}
.modal h2 { font-family: var(--serif); font-size: 1.02rem; font-weight: 700; color: var(--navy); letter-spacing: .01em; }
.modal input {
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: var(--radius); color: var(--ink);
  font-family: var(--sans); font-size: 0.9rem; padding: 11px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.modal input:focus { border-color: var(--focus); box-shadow: var(--ring); background: #fff; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal .note { color: var(--muted); font-size: 0.84rem; line-height: 1.55; }

.views-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; margin: -4px 0; }
.view-row {
  display: flex; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--hairline-soft);
  padding: 9px 2px; font-size: 0.78rem;
}
.view-row:last-child { border-bottom: 0; }
.view-row .ip { font-family: var(--mono); color: var(--ink); }
.view-row .when { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ========================================================= preview overlay */
.preview-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: rgba(8, 17, 31, .97);
  animation: fadeIn .2s ease both;
}
.preview-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 12px clamp(14px, 3vw, 22px);
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.preview-title { min-width: 0; }
.pv-name { font-weight: 500; font-size: 0.9rem; word-break: break-word; }
.pv-meta { color: rgba(255, 255, 255, .55); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.preview-actions { display: flex; gap: 8px; }
.preview-head .btn {
  background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .24);
  color: #fff; text-decoration: none; box-shadow: none;
}
.preview-head .btn:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .1); }
.preview-body { flex: 1; display: flex; min-height: 0; }
.preview-body iframe { flex: 1; border: 0; width: 100%; background: #fff; }
.preview-body img, .preview-body video { max-width: 96%; max-height: 96%; margin: auto; display: block; border-radius: 2px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.preview-body audio { margin: auto; }
.preview-text {
  flex: 1; overflow: auto;
  background: var(--surface); color: var(--ink);
  padding: clamp(18px, 4vw, 30px);
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}
.preview-fallback {
  margin: auto; text-align: center; color: #c8c5bb;
  display: flex; flex-direction: column; gap: 18px; align-items: center;
  padding: 24px;
}

/* ================================================================= toast */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  border-left: 3px solid var(--accent);
  color: #fff; font-size: 0.82rem; font-weight: 500;
  padding: 12px 22px; border-radius: var(--radius);
  z-index: 100; max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-lg);
  animation: toastIn .28s var(--ease) both;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.error { background: var(--danger); border-left-color: #d99a99; }

/* ========================================= floating upload (mobile primary) */
.fab { display: none; }

/* ============================================================== responsive */
/* Tablet */
@media (max-width: 860px) {
  .brand-sub { display: none; }
}

/* ---------------------------------------------------------- Phones (≤720px)
   Mobile-first: the file list becomes touch-friendly cards, the primary
   action moves to a thumb-reachable floating button, tap targets ≥44px. */
@media (max-width: 720px) {
  /* topbar: compact icon buttons, generous hit area */
  .topbar { padding: 12px 14px; }
  .btn .btn-label { display: none; }
  .toolbar { gap: 8px; }
  .topbar .btn {
    min-width: 44px; min-height: 44px; padding: 10px;
    border-radius: 12px; justify-content: center;
  }
  #btn-upload { display: none; }              /* replaced by the floating button */

  .content { padding: 12px 12px 104px; }       /* room for the FAB */
  .panel { border: 0; background: transparent; box-shadow: none; overflow: visible; }

  /* card container */
  .file-table thead { display: none; }
  .file-table, .file-table tbody { display: block; }
  .file-table tbody tr {
    display: flex; flex-wrap: wrap; align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 14px;
    overflow: hidden;
    animation: rowIn .3s var(--ease) both;
  }
  .file-table td { border: 0; padding: 0; }
  .file-table td::before {
    content: attr(data-label);
    color: var(--muted); font-size: 0.6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .12em;
  }

  /* name = big tappable header */
  .file-table td.cell-name {
    flex: 1 1 100%;
    padding: 15px 16px 14px;
    border-bottom: 1px solid var(--hairline-soft);
  }
  .file-table td.cell-name::before { display: none; }
  .item-name { width: 100%; gap: 13px; font-size: 1rem; font-weight: 600; align-items: center; }
  .item-name .label { min-width: 0; overflow-wrap: anywhere; word-break: normal; line-height: 1.35; }
  .item-icon { width: 44px; height: 44px; border-radius: 12px; }
  .item-icon svg { width: 21px; height: 21px; }

  /* meta = 2-column info grid */
  .file-table td[data-label] {
    flex: 1 1 50%;
    display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
    padding: 11px 16px;
  }
  .file-table td[data-label] .cell-muted,
  .file-table td[data-label] .views-badge,
  .file-table td[data-label] .pin-chip { font-size: 0.9rem; }
  .cell-muted { white-space: normal; }

  /* hide only empty meta: folders have no size; unshared items show no views/pin
     (a shared folder keeps its Views + editable PIN — those cells hold a chip, not a dash) */
  .file-table tr[data-type="folder"] td[data-label="Size"] { display: none; }
  .file-table td[data-label="Views"]:has(.cell-muted),
  .file-table td[data-label="Link PIN"]:has(.cell-muted) { display: none; }
  .file-table tr[data-type="folder"] td[data-label="Uploaded"] { flex: 1 1 100%; }

  /* action bar = full-width row of large, evenly-spaced controls */
  .file-table td.cell-act {
    flex: 1 1 100%;
    border-top: 1px solid var(--hairline-soft);
    background: var(--surface-2);
  }
  .file-table td.cell-act::before { display: none; }
  .row-actions { width: 100%; justify-content: space-around; gap: 0; }
  .icon-btn {
    flex: 1; min-height: 50px; padding: 0;
    align-items: center; justify-content: center;
    color: var(--ink-2); border-radius: 0;
  }
  .icon-btn svg.icon { width: 19px; height: 19px; }
  .icon-btn + .icon-btn { border-left: 1px solid var(--hairline-soft); }
  .icon-btn:active { background: #efece4; }

  /* floating upload button */
  .fab {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed; right: 18px; bottom: 20px; z-index: 40;
    width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: #1c1405;
    box-shadow: 0 10px 24px rgba(154, 115, 36, .45), 0 2px 6px rgba(4, 12, 24, .2);
    transition: transform .1s, filter .15s;
  }
  .fab:active { transform: scale(.93); }
  .fab:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(154, 115, 36, .3); }
  .fab svg.icon { width: 25px; height: 25px; stroke-width: 1.9; }

  /* larger inputs prevent iOS auto-zoom on focus */
  .modal input { font-size: 16px; padding: 13px; }
  .modal-actions .btn { min-height: 44px; flex: 1; }

  .empty { padding: 64px 20px; }

  .toast { bottom: 90px; left: 12px; right: 12px; transform: none; text-align: center; }
  @keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 400px) {
  .brand-name { font-size: 1.05rem; }
  .toolbar { gap: 6px; }
  .topbar .btn { min-width: 44px; padding: 9px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
