/* ===== ילדים זה שמחה — "המקרר הדיגיטלי" · שפת עיצוב פסטלית חמה ===== */

:root {
  /* surfaces */
  --bg: #fdf4ee;
  --bg-2: #fbeee6;
  --fridge: #fffdfb;
  --card: #ffffff;
  --line: #f0e2d8;
  --line-soft: #f6ece4;

  /* ink */
  --ink: #4a3b34;
  --ink-strong: #38271f;
  --ink-soft: #8b7568;
  --ink-faint: #b7a294;

  /* primary (dark, warm espresso — the "hero" action) */
  --primary: #3d2a20;
  --primary-hover: #533a2d;

  /* accents */
  --peach: #ff9472;   /* fridge / general accent */
  --sky: #6db3f2;     /* list */
  --gold: #f6b73c;    /* top / ranking */
  --rose: #ff8bb0;

  /* note pastels */
  --n-pink: #ffd6e0;
  --n-mint: #c7f0d8;
  --n-sky: #cfe8ff;
  --n-lemon: #fff3c4;
  --n-lilac: #e7d9ff;
  --n-peach: #ffdcc7;

  /* status */
  --danger: #e5484d;
  --ok: #3aa675;

  /* shape */
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* shadow (warm tint) */
  --sh-sm: 0 3px 10px rgba(150, 100, 70, .10);
  --sh: 0 8px 22px rgba(150, 100, 70, .14);
  --sh-lg: 0 20px 50px rgba(120, 80, 55, .22);

  --font: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-hand: 'Gveret Levin AlefAlefAlef', var(--font);
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 100% -5%, #ffe9db 0%, transparent 55%),
    radial-gradient(900px 500px at -10% 10%, #eaf6ef 0%, transparent 50%);
  background-attachment: fixed;
  font-weight: 600;
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 800; color: var(--ink-strong); line-height: 1.2; }

::selection { background: #ffd9c2; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #e7d3c6; border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #d9c1b1; background-clip: content-box; }

/* ===================== buttons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 800; font-size: 15px;
  padding: 13px 22px; border-radius: var(--r);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-soft { background: #fff; color: var(--ink-strong); border: 1.5px solid var(--line); box-shadow: var(--sh-sm); }
.btn-soft:hover { border-color: #e6d3c6; background: #fffaf6; }
.btn-ghost { background: transparent; color: var(--ink-soft); font-weight: 700; }
.btn-ghost:hover { background: #fff2e9; color: var(--ink-strong); }
.btn-danger { background: #fdecec; color: var(--danger); font-weight: 800; }
.btn-danger:hover { background: #fbe0e0; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 26px; font-size: 16px; border-radius: var(--r-lg); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: var(--r-sm); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 13px; color: var(--ink-soft);
  transition: transform .15s, background .2s, color .2s;
}
.icon-btn:hover { background: #fff2e9; color: var(--ink-strong); }
.icon-btn:active { transform: scale(.9); }

/* ===================== fields ===================== */
.field-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: 0 2px 7px; }
.field {
  width: 100%; min-width: 0; background: #fbf3ec; border: 1.5px solid var(--line);
  border-radius: var(--r); padding: 13px 15px; font-weight: 600; font-size: 15.5px; color: var(--ink-strong);
  transition: border-color .18s, background .18s, box-shadow .18s; outline: none;
}
.field::placeholder { color: #c3ac9d; font-weight: 600; }
.field:focus { border-color: var(--peach); background: #fff; box-shadow: 0 0 0 4px rgba(255, 148, 114, .14); }
textarea.field { resize: vertical; min-height: 90px; line-height: 1.55; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%238b7568' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-left: 40px; }

/* ===================== cards ===================== */
.card { background: var(--card); border: 1.5px solid var(--line-soft); border-radius: var(--r-xl); box-shadow: var(--sh-sm); }

/* ===================== app shell ===================== */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 14px clamp(14px, 4vw, 34px);
  background: rgba(255, 251, 247, .82); backdrop-filter: blur(14px);
  border-bottom: 1.5px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink-strong); }
.brand .logo { font-size: 26px; filter: drop-shadow(0 2px 3px rgba(150,100,70,.2)); }
.brand .brand-name { font-size: 19px; }
.brand .brand-sub { font-family: var(--font-hand); font-size: 15px; color: var(--peach); font-weight: 700; }
.topbar-spacer { flex: 1; }

/* child chips row */
.kids-strip { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 12px clamp(14px, 4vw, 34px); scrollbar-width: none; }
.kids-strip::-webkit-scrollbar { display: none; }
.kid-chip {
  display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0;
  padding: 8px 15px 8px 9px; border-radius: 999px; background: #fff; border: 2px solid transparent;
  box-shadow: var(--sh-sm); transition: transform .15s, border-color .2s, box-shadow .2s;
}
.kid-chip:hover { transform: translateY(-2px); }
.kid-chip:active { transform: scale(.96); }
.kid-chip.active { border-color: var(--ink-strong); }
.kid-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.kid-chip .kid-name { font-weight: 800; font-size: 14.5px; color: var(--ink-strong); }
.kid-chip .kid-count { font-size: 11px; font-weight: 800; color: var(--ink-faint); background: #f7ede5; padding: 1px 8px; border-radius: 999px; }
.kid-add { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; background: #fff; border: 2px dashed #e8d2c3; color: var(--peach); font-size: 22px; display: grid; place-items: center; box-shadow: var(--sh-sm); transition: transform .15s, border-color .2s; }
.kid-add:hover { border-color: var(--peach); transform: rotate(90deg); }

/* view tabs */
.tabs { display: inline-flex; gap: 4px; padding: 5px; background: #f3e6dc; border-radius: 999px; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px;
  font-weight: 800; font-size: 14px; color: var(--ink-soft); transition: all .2s;
}
.tab .tab-emoji { font-size: 16px; }
.tab:hover { color: var(--ink-strong); }
.tab.active { background: #fff; color: var(--ink-strong); box-shadow: var(--sh-sm); }

.main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px clamp(14px, 4vw, 34px) 120px; }
.view-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 2px 20px; }
.view-title { font-size: clamp(22px, 4vw, 30px); font-weight: 800; display: flex; align-items: center; gap: 10px; }
.view-title .emoji { font-size: 1.1em; }
.view-sub { color: var(--ink-soft); font-weight: 700; font-size: 14px; }

/* filter bar */
.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search-wrap svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.search-wrap .field { padding-right: 42px; }
.pills { display: inline-flex; gap: 7px; flex-wrap: wrap; }
.pill { padding: 9px 15px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 800; font-size: 13.5px; color: var(--ink-soft); transition: all .18s; }
.pill:hover { border-color: #e6d3c6; }
.pill.active { background: var(--ink-strong); color: #fff; border-color: var(--ink-strong); }

/* ===================== fridge board (notes) ===================== */
.fridge {
  background:
    linear-gradient(180deg, #fffdfb, #fbf4ee);
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: clamp(14px, 3vw, 26px);
  box-shadow: inset 0 2px 20px rgba(180, 140, 110, .07), var(--sh-sm);
}
.board { columns: 4 230px; column-gap: 18px; }
.note {
  break-inside: avoid; margin-bottom: 18px; position: relative;
  border-radius: 16px; padding: 20px 18px 16px;
  box-shadow: 0 6px 16px rgba(150, 110, 80, .16);
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
/* handwritten-ish paper tint + slight rotations */
.note::after { content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 42px; height: 15px; background: rgba(255,255,255,.55); border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.note:nth-child(4n+1) { transform: rotate(-1.6deg); }
.note:nth-child(4n+2) { transform: rotate(1.3deg); }
.note:nth-child(4n+3) { transform: rotate(-.7deg); }
.note:nth-child(4n+4) { transform: rotate(1.9deg); }
.note:hover { transform: rotate(0deg) translateY(-5px) scale(1.02); box-shadow: 0 16px 30px rgba(150, 110, 80, .26); z-index: 2; }
.note.c-pink { background: var(--n-pink); }
.note.c-mint { background: var(--n-mint); }
.note.c-sky { background: var(--n-sky); }
.note.c-lemon { background: var(--n-lemon); }
.note.c-lilac { background: var(--n-lilac); }
.note.c-peach { background: var(--n-peach); }

.note-type { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; color: rgba(60,40,30,.55); margin-bottom: 8px; }
.note-title { font-weight: 800; color: var(--ink-strong); font-size: 17px; margin-bottom: 6px; line-height: 1.25; }
.note-body { color: #574538; font-weight: 600; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.note-date { margin-top: 12px; font-family: var(--font-hand); font-size: 15px; color: rgba(60,40,30,.5); font-weight: 700; }
.note-rankbadge { position: absolute; top: -10px; right: -8px; background: var(--gold); color: #fff; font-weight: 800; font-size: 12px; min-width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(180,130,40,.4); border: 2px solid #fff; }

/* dialogue lines inside a note / detail — "דובר: טקסט" on one flowing line, no quote marks */
.dialogue { display: flex; flex-direction: column; gap: 6px; }
.dline { line-height: 1.5; }
.dline .speaker { font-weight: 800; color: var(--ink-strong); }
.dline .said { font-weight: 600; color: #574538; font-size: 15.5px; }
.note-context { color: #7a6456; font-weight: 700; font-size: 13px; line-height: 1.4; margin-bottom: 9px; white-space: pre-wrap; word-break: break-word; }

.note-media { border-radius: 12px; overflow: hidden; margin-bottom: 10px; position: relative; background: rgba(0,0,0,.05); }
.note-media img, .note-media video { width: 100%; max-height: 260px; object-fit: cover; }
.play-badge { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.play-badge span { width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; font-size: 18px; backdrop-filter: blur(2px); }

/* ===================== list / timeline ===================== */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.month-head { font-family: var(--font-hand); font-size: 20px; color: var(--peach); font-weight: 700; margin: 20px 4px 4px; }
.row {
  display: flex; align-items: flex-start; gap: 14px; background: #fff; border: 1.5px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 15px 17px; box-shadow: var(--sh-sm); transition: transform .15s, box-shadow .2s;
  cursor: pointer;
}
.row:hover { transform: translateX(-3px); box-shadow: var(--sh); }
.row-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; flex-shrink: 0; }
.row-main { flex: 1; min-width: 0; }
.row-top { display: flex; align-items: center; gap: 9px; margin-bottom: 3px; }
.row-title { font-weight: 800; color: var(--ink-strong); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-badge { font-size: 10.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; }
.row-preview { color: var(--ink-soft); font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-date { font-size: 12.5px; font-weight: 800; color: var(--ink-faint); flex-shrink: 0; white-space: nowrap; }

/* type accent colors */
.t-quote { background: #fff0f4; color: #d6588a; }
.t-video { background: #eef4ff; color: #4f83d6; }
.t-first { background: #fff6e2; color: #d99a1f; }

/* ===================== ranking (Top) ===================== */
.rank-intro { display: flex; align-items: center; gap: 12px; background: linear-gradient(120deg, #fff6e0, #fff0e4); border: 1.5px solid #f8e3b8; border-radius: var(--r-lg); padding: 14px 18px; margin-bottom: 20px; color: #8a6414; font-weight: 700; font-size: 14px; }
.ranklist { display: flex; flex-direction: column; gap: 12px; }
.rank-item {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1.5px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 12px 14px 12px 16px; box-shadow: var(--sh-sm);
}
.rank-item.dragging { opacity: .5; }
.rank-ghost { border: 2px dashed var(--gold); background: #fffaf0; }
.rank-num { font-weight: 800; font-size: 22px; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; color: #fff; background: #cdb9ac; box-shadow: var(--sh-sm); font-family: var(--font-hand); }
.rank-num.g1 { background: linear-gradient(135deg, #ffcf5c, #f59e0b); box-shadow: 0 6px 16px rgba(245,158,11,.4); }
.rank-num.g2 { background: linear-gradient(135deg, #d9dde3, #b3bcc7); }
.rank-num.g3 { background: linear-gradient(135deg, #f0b483, #cd7f4e); }
.rank-body { flex: 1; min-width: 0; }
.rank-body .rank-t { font-weight: 800; color: var(--ink-strong); font-size: 16px; margin-bottom: 2px; }
.rank-body .rank-p { color: var(--ink-soft); font-weight: 600; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.drag-handle { cursor: grab; color: var(--ink-faint); padding: 8px; touch-action: none; }
.drag-handle:active { cursor: grabbing; }

/* ===================== FAB (extended, labeled) ===================== */
.fab {
  position: fixed; bottom: max(24px, env(safe-area-inset-bottom)); left: 24px; z-index: 45;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 15px 24px 15px 20px; border-radius: 20px; background: var(--primary); color: #fff;
  font-weight: 800; font-size: 16.5px; box-shadow: 0 12px 26px rgba(61,42,32,.42);
  transition: transform .18s, box-shadow .2s;
}
.fab .fab-plus { font-size: 24px; line-height: 1; margin-top: -2px; }
.fab:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(61,42,32,.5); }
.fab:active { transform: scale(.95); }

/* ===================== empty state ===================== */
.empty { text-align: center; padding: 70px 20px; }
.empty .em { font-size: 62px; margin-bottom: 14px; display: block; }
.empty h3 { font-size: 21px; margin-bottom: 8px; }
.empty p { color: var(--ink-soft); font-weight: 600; max-width: 380px; margin: 0 auto 22px; }

/* ===================== dialog / bottom sheet ===================== */
.overlay { position: fixed; inset: 0; background: rgba(60,40,30,.42); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 18px; opacity: 0; transition: opacity .2s; }
.overlay.show { opacity: 1; }
.sheet {
  background: var(--fridge); border-radius: var(--r-xl); width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto;
  box-shadow: var(--sh-lg); transform: translateY(16px) scale(.98); transition: transform .25s cubic-bezier(.2,.9,.3,1);
  border: 1.5px solid var(--line-soft);
}
.overlay.show .sheet { transform: none; }
.sheet-head { padding: 22px 24px 6px; text-align: center; position: relative; }
.sheet-emoji { font-size: 46px; }
.sheet-title { font-size: 22px; font-weight: 800; margin-top: 4px; }
.sheet-sub { color: var(--ink-soft); font-weight: 700; font-size: 14px; margin-top: 3px; }
.sheet-x { position: absolute; top: 14px; left: 14px; }
.sheet-body { padding: 12px 24px 24px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }

.form-row { margin-bottom: 15px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

/* type selector */
.typesel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 6px; }
.typesel button { padding: 14px 8px; border-radius: var(--r); background: #fbf3ec; border: 2px solid var(--line); font-weight: 800; font-size: 13.5px; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: 5px; transition: all .18s; }
.typesel button .te { font-size: 24px; }
.typesel button:hover { border-color: #e6d3c6; }
.typesel button.active { border-color: var(--primary); background: #fff; color: var(--ink-strong); box-shadow: var(--sh-sm); }

/* dialogue editor */
.dlg-lines { display: flex; flex-direction: column; gap: 10px; }
.dlg-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.dlg-line .field { padding: 10px 12px; font-size: 14.5px; }
.dlg-line .rm { color: var(--ink-faint); align-self: center; }
.dlg-line .rm:hover { color: var(--danger); }
.add-line { align-self: flex-start; margin-top: 2px; }

/* color picker */
.colorsel { display: flex; gap: 9px; }
.colorsel button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); transition: transform .15s; }
.colorsel button:hover { transform: scale(1.12); }
.colorsel button.active { box-shadow: 0 0 0 2.5px var(--ink-strong); transform: scale(1.1); }

/* emoji picker for child */
.emojisel { display: flex; flex-wrap: wrap; gap: 6px; }
.emojisel button { width: 42px; height: 42px; border-radius: 12px; font-size: 22px; background: #fbf3ec; border: 2px solid var(--line); transition: all .15s; }
.emojisel button:hover { border-color: #e6d3c6; }
.emojisel button.active { border-color: var(--primary); background: #fff; }

/* segmented toggle (gender) */
.segmented { display: inline-flex; gap: 6px; background: #f3e6dc; padding: 5px; border-radius: 15px; }
.segmented button { padding: 10px 20px; border-radius: 11px; font-weight: 800; font-size: 14.5px; color: var(--ink-soft); transition: all .18s; }
.segmented button:hover { color: var(--ink-strong); }
.segmented button.active { background: #fff; color: var(--ink-strong); box-shadow: var(--sh-sm); }

/* media dropzone */
.drop { display: block; width: 100%; border: 2px dashed #e8d2c3; border-radius: var(--r); padding: 22px; text-align: center; color: var(--ink-soft); font-weight: 700; line-height: 1.5; cursor: pointer; transition: all .18s; background: #fbf3ec; }
.drop:hover { border-color: var(--peach); background: #fff8f3; color: var(--ink-strong); }
.drop .dz-em { font-size: 30px; display: block; margin-bottom: 6px; }
.media-prev { position: relative; border-radius: var(--r); overflow: hidden; }
.media-prev img, .media-prev video { width: 100%; max-height: 240px; object-fit: cover; }
.media-prev .rm-media { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); color: #fff; }

/* detail view media */
.detail-media { border-radius: var(--r); overflow: hidden; margin-bottom: 14px; background: #000; }
.detail-media img, .detail-media video { width: 100%; max-height: 62dvh; object-fit: contain; }
.detail-context { color: var(--ink-soft); font-weight: 700; font-size: 14.5px; text-align: center; line-height: 1.5; margin-bottom: 14px; white-space: pre-wrap; word-break: break-word; }
.detail-dialogue { background: #fbf3ec; border-radius: var(--r); padding: 16px 18px; }
.detail-dialogue .said { font-size: 16.5px; }

/* ===================== toast ===================== */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink-strong); color: #fff; font-weight: 800; font-size: 14px; padding: 13px 18px; border-radius: 15px; box-shadow: var(--sh-lg); transform: translateY(12px); opacity: 0; transition: all .25s; max-width: min(90vw, 380px); }
.toast.show { transform: none; opacity: 1; }
.toast.ok { background: #2f7d5b; }
.toast.err { background: #c93b3f; }

/* ===================== auth pages ===================== */
.auth-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 22px; }
.auth-card { width: 100%; max-width: 430px; background: var(--fridge); border-radius: var(--r-xl); box-shadow: var(--sh-lg); border: 1.5px solid var(--line-soft); overflow: hidden; }
.auth-hero { background: linear-gradient(135deg, #ffd9c2, #ffe9a8 55%, #c7f0d8); padding: 32px 28px 26px; text-align: center; }
.auth-hero .logo { font-size: 52px; filter: drop-shadow(0 4px 6px rgba(150,100,70,.25)); }
.auth-hero h1 { font-size: 25px; color: #5b3a2e; margin-top: 6px; }
.auth-hero p { color: #8a6a5c; font-weight: 700; font-size: 14px; margin-top: 2px; }
.auth-body { padding: 26px 28px 30px; }
.auth-body h2 { font-size: 20px; margin-bottom: 4px; }
.auth-body .lead { color: var(--ink-soft); font-weight: 700; font-size: 14px; margin-bottom: 20px; }
.auth-foot { text-align: center; margin-top: 18px; font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.auth-foot a { color: var(--peach); font-weight: 800; }
.code-input { text-align: center; letter-spacing: 12px; font-size: 26px; font-weight: 800; direction: ltr; font-family: ui-monospace, Menlo, monospace; }
.link-muted { color: var(--ink-faint); font-weight: 800; font-size: 13px; }
.link-muted:hover { color: var(--peach); }

/* success card */
.success-card { text-align: center; padding: 10px 0; }
.success-card .big { font-size: 60px; }

/* helpers */
.center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }
.spin { width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; }
.spin.dark { border-color: rgba(60,40,30,.2); border-top-color: var(--primary); }
@keyframes sp { to { transform: rotate(360deg); } }
.loading-full { display: grid; place-items: center; min-height: 60dvh; }

/* ===================== responsive ===================== */
@media (max-width: 640px) {
  .brand .brand-sub { display: none; }
  .brand .brand-name { display: none; }
  .tab .tab-label { display: none; }
  .tab { padding: 9px 13px; }
  .two { grid-template-columns: 1fr; }
  .dlg-line { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .view-head { margin: 12px 2px 16px; }
  .fab { left: 18px; bottom: max(18px, env(safe-area-inset-bottom)); }
  #toasts { right: 12px; left: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .board { column-gap: 14px; }
}
@media (max-width: 400px) { .board { columns: 1; } }
