/* ============================================================
   Slidey — App UI (auth, dashboard, create, profile)
   ============================================================ */

/* ============ FORM PRIMITIVES (shared by auth + settings) ============ */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%; font-size: 15px; color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ============ APP TOP NAV (authed) ============ */
.app-nav {
  position: sticky; top: 0; z-index: 100;
  background: oklch(0.985 0.004 270 / 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
html[data-theme='dark'] .app-nav { background: oklch(0.165 0.014 274 / 0.85); }
.app-nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 18px; }
/* Brend logosi — landing bilan bir xil chiroyli ko'rinish (app sahifalarida) */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand-mark { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent); color: var(--accent-contrast, #fff); box-shadow: 0 4px 12px oklch(0.55 0.2 280 / 0.35); flex: none; }
.brand-mark svg { width: 21px; height: 21px; }
.app-nav .brand { flex: none; }
.app-nav-links { display: flex; align-items: center; gap: 4px; }
.app-nav-links a { font-size: 14.5px; font-weight: 600; color: var(--text-2); padding: 8px 13px; border-radius: var(--r-md); transition: color .15s, background .15s; }
.app-nav-links a:hover { color: var(--text); background: var(--card-2); }
.app-nav-links a.active { color: var(--accent-ink); background: var(--accent-soft); }
.app-nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* search */
.app-search { position: relative; width: 240px; }
.app-search input {
  width: 100%; font-size: 14px; color: var(--text); background: var(--card-2);
  border: 1px solid var(--border); border-radius: var(--r-pill); padding: 9px 14px 9px 38px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.app-search input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.app-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }

/* avatar + menu */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--accent-contrast); font-family: var(--font-display); font-weight: 600; overflow: hidden; flex: none; }
.avatar.sm { width: 38px; height: 38px; font-size: 15px; }
.avatar.lg { width: 88px; height: 88px; font-size: 34px; }
.avatar-btn { padding: 0; border-radius: 50%; transition: box-shadow .15s; }
.avatar-btn:hover { box-shadow: 0 0 0 3px var(--accent-soft); }
.menu-wrap { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 90;
  min-width: 220px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.menu-wrap.open .dropdown { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-head { display: flex; align-items: center; gap: 11px; padding: 10px 11px 12px; }
.dropdown-head .nm { font-weight: 700; font-size: 14px; color: var(--text); }
.dropdown-head .em { font-size: 12.5px; color: var(--muted); }
.dropdown-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; font-size: 14px; font-weight: 600; color: var(--text-2); padding: 10px 11px; border-radius: 8px; transition: background .12s, color .12s; }
.dropdown-item:hover { background: var(--card-2); color: var(--text); }
.dropdown-item svg { width: 18px; height: 18px; flex: none; }
.dropdown-item.danger { color: var(--pink); }
.dropdown-sep { height: 1px; background: var(--border); margin: 5px 4px; }

.app-burger { display: none; }

/* ============ APP MAIN ============ */
.block-title { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; color: var(--text); }
.app-main { padding: 36px 0 64px; min-height: 70vh; }
.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title-row h1 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.02em; }
.page-title-row .sub { font-size: 15px; color: var(--text-2); margin-top: 6px; }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { font-size: 13.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); padding: 8px 15px; border-radius: var(--r-pill); transition: all .15s; }
.chip:hover { border-color: var(--faint); color: var(--text); }
.chip.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.chips-spacer { flex: 1; }
.sort-select { font-size: 13.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; }

/* ============ DECK GRID ============ */
.deck-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.deck-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s, border-color .18s; }
.deck-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--faint); }
.deck-thumb { aspect-ratio: 16/9; position: relative; overflow: hidden; container-type: inline-size; cursor: pointer; }
.deck-thumb .ds { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 12cqw; }
.deck-thumb .ds .t { font-family: var(--font-display); font-weight: 700; font-size: 11cqw; line-height: 1.1; letter-spacing: -.02em; }
.deck-thumb .ds .s { font-size: 5.4cqw; margin-top: 4cqw; opacity: .8; }
.deck-thumb .ds .bar { height: 3cqw; width: 38%; border-radius: 2cqw; margin-top: 7cqw; }
.ds-light { background: #fff; color: #15151c; }
.ds-light .bar { background: var(--th); }
.ds-tint { color: #15151c; }
.ds-tint .bar { background: var(--th); }
.ds-ink { background: #16161f; color: #fff; }
.ds-ink .bar { background: var(--th); }
.ds-grad { color: #fff; }
.ds-grad .bar { background: rgba(255,255,255,.85); }
.deck-thumb .badge { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: oklch(1 0 0 / .9); color: #15151c; padding: 3px 9px; border-radius: var(--r-pill); backdrop-filter: blur(4px); }
.deck-thumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; background: oklch(0.2 0.02 274 / .28); transition: opacity .18s; }
.deck-card:hover .play { opacity: 1; }
.deck-thumb .play span { width: 48px; height: 48px; border-radius: 50%; background: oklch(1 0 0 / .92); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); }
.deck-thumb .play svg { width: 20px; height: 20px; color: #15151c; margin-left: 2px; }

.deck-body { padding: 14px 15px; display: flex; align-items: flex-start; gap: 10px; }
.deck-body .info { flex: 1; min-width: 0; }
.deck-body h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-body .meta { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.deck-body .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.deck-menu-btn { width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); }
.deck-menu-btn:hover { background: var(--card-2); color: var(--text); }
.deck-menu-btn svg { width: 18px; height: 18px; }

/* new-deck card */
.new-card { border: 1.5px dashed var(--border); background: transparent; border-radius: var(--r-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 200px; color: var(--text-2); cursor: pointer; transition: border-color .18s, color .18s, background .18s; }
.new-card:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.new-card .plus { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; }
.new-card:hover .plus { background: var(--accent); color: var(--accent-contrast); }
.new-card .plus svg { width: 24px; height: 24px; }
.new-card span { font-size: 14.5px; font-weight: 600; }

/* empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state svg { width: 46px; height: 46px; margin: 0 auto 16px; color: var(--faint); }
.empty-state h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* ============ CREATE PAGE ============ */
.create-ai {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 30px; box-shadow: var(--shadow-sm); margin-bottom: 30px; position: relative; overflow: hidden;
}
.create-ai::before { content: ""; position: absolute; top: -80px; right: -40px; width: 280px; height: 220px; background: radial-gradient(circle, var(--accent-soft), transparent 70%); pointer-events: none; }
.create-ai .lbl { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.create-ai .lbl .spark { width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, oklch(0.86 0.14 285), var(--accent)); }
.create-ai h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 16px; }
.ai-input-wrap { display: flex; gap: 10px; align-items: stretch; position: relative; z-index: 1; }
.ai-input-wrap input { flex: 1; font-size: 15.5px; color: var(--text); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; transition: border-color .15s, box-shadow .15s; }
.ai-input-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.ai-chips button { font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--card-2); border: 1px solid var(--border); padding: 7px 13px; border-radius: var(--r-pill); transition: all .15s; }
.ai-chips button:hover { border-color: var(--accent); color: var(--accent-ink); }

.start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 40px; }
.start-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.start-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.start-card .ic { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-ink); }
.start-card .ic svg { width: 23px; height: 23px; }
.start-card h3 { font-size: 17px; }
.start-card p { font-size: 14px; color: var(--text-2); line-height: 1.5; }

/* template gallery (reused look) */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tpl-card { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: transform .18s, box-shadow .18s; }
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tpl-card .thumb { aspect-ratio: 16/10; position: relative; container-type: inline-size; }
.tpl-card .thumb .ds { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 11cqw; }
.tpl-card .thumb .ds .t { font-family: var(--font-display); font-weight: 700; font-size: 10cqw; line-height: 1.1; }
.tpl-card .thumb .ds .bar { height: 3cqw; width: 40%; border-radius: 2cqw; margin-top: 6cqw; }
.tpl-card .cap { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; }
.tpl-card .cap h4 { font-size: 14.5px; font-weight: 600; }
.tpl-card .cap span { font-size: 12px; color: var(--muted); }

/* ============ PROFILE ============ */
.profile-header { display: flex; align-items: center; gap: 22px; padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); margin-bottom: 26px; flex-wrap: wrap; }
.profile-header .who { flex: 1; min-width: 200px; }
.profile-header h1 { font-size: 26px; letter-spacing: -.02em; }
.profile-header .em { font-size: 15px; color: var(--text-2); margin-top: 4px; }
.profile-header .role { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 11px; border-radius: var(--r-pill); }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.pstat { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); text-align: center; }
.pstat .n { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.pstat .l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.profile-section { margin-bottom: 28px; }
.profile-section h2 { font-size: 19px; margin-bottom: 14px; }
.activity-list { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.activity { display: flex; align-items: center; gap: 14px; padding: 15px 18px; transition: background .12s; }
.activity + .activity { border-top: 1px solid var(--border); }
.activity:hover { background: var(--card-2); }
.activity .ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-ink); }
.activity .ic svg { width: 18px; height: 18px; }
.activity .tx { flex: 1; min-width: 0; }
.activity .tx b { font-weight: 600; font-size: 14.5px; color: var(--text); }
.activity .tx span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.activity .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ============ PROFILE EDIT / SETTINGS ============ */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 34px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 3px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); padding: 10px 13px; border-radius: var(--r-md); transition: background .15s, color .15s; }
.settings-nav a:hover { background: var(--card-2); color: var(--text); }
.settings-nav a.active { background: var(--accent-soft); color: var(--accent-ink); }
.settings-nav a svg { width: 17px; height: 17px; }
.settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.settings-card > h2 { font-size: 18px; margin-bottom: 4px; }
.settings-card > .desc { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.avatar-edit { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.avatar-edit .actions { display: flex; gap: 10px; }
.seg-field { display: inline-flex; background: var(--card-2); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; }
.seg-field button { font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 16px; border-radius: var(--r-pill); transition: color .15s, background .15s, box-shadow .15s; }
.seg-field button.active { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); }
.save-bar { display: flex; align-items: center; gap: 14px; }
.danger-zone { border: 1px solid oklch(0.62 0.20 12 / .35); border-radius: var(--r-lg); padding: 22px 24px; }
.danger-zone h3 { font-size: 16px; color: var(--pink); margin-bottom: 6px; }
.danger-zone p { font-size: 13.5px; color: var(--text-2); margin-bottom: 16px; }
.btn-danger { background: transparent; color: var(--pink); border: 1px solid var(--pink); }
.btn-danger:hover { background: var(--pink); color: #fff; }

/* ============ AUTH (login / register) ============ */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { position: relative; overflow: hidden; padding: 48px; color: #fff; display: flex; flex-direction: column; background: linear-gradient(150deg, var(--accent), var(--accent-2)); }
.auth-aside::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 78% 18%, oklch(1 0 0 / .18), transparent 42%), radial-gradient(circle at 12% 88%, oklch(1 0 0 / .12), transparent 40%); }
.auth-aside .brand { color: #fff; position: relative; z-index: 1; }
.auth-aside .brand-mark { background: oklch(1 0 0 / .2); color: #fff; }
.auth-aside .aside-body { margin-top: auto; position: relative; z-index: 1; }
.auth-aside .aside-body h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.15; margin-bottom: 14px; }
.auth-aside .aside-body p { font-size: 16px; color: oklch(1 0 0 / .85); line-height: 1.55; max-width: 30em; }
.auth-aside .aside-stats { display: flex; gap: 30px; margin-top: 30px; }
.auth-aside .aside-stats .n { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.auth-aside .aside-stats .l { font-size: 12.5px; color: oklch(1 0 0 / .75); }
/* floating mini deck preview */
.aside-deck { position: absolute; top: 16%; right: -30px; width: 230px; aspect-ratio: 16/9; background: #fff; border-radius: 12px; box-shadow: 0 30px 70px rgba(0,0,0,.3); transform: rotate(6deg); container-type: inline-size; overflow: hidden; z-index: 1; }
.aside-deck .ds { position: absolute; inset: 0; padding: 12cqw; display: flex; flex-direction: column; justify-content: center; color: #15151c; }
.aside-deck .ds .t { font-family: var(--font-display); font-weight: 700; font-size: 11cqw; }
.aside-deck .ds .bar { height: 3cqw; width: 40%; border-radius: 2cqw; margin-top: 6cqw; background: var(--accent); }

.auth-panel { display: flex; flex-direction: column; padding: 28px 40px; overflow-y: auto; }
.auth-top { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.auth-top .brand { display: none; margin-right: auto; }
.auth-card { width: 100%; max-width: 400px; margin: auto; padding: 24px 0; }
.auth-card h1 { font-size: 28px; letter-spacing: -.02em; margin-bottom: 8px; }
.auth-card .lede { font-size: 15px; color: var(--text-2); margin-bottom: 26px; }
.oauth-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.oauth-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; transition: background .15s, border-color .15s; }
.oauth-btn:hover { background: var(--card-2); border-color: var(--faint); }
.oauth-btn svg { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-card .field label { font-size: 13.5px; }
.field-hint { display: flex; align-items: center; justify-content: space-between; }
.field-hint a { font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-2); margin-bottom: 20px; line-height: 1.5; }
.checkbox-row input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.checkbox-row a { color: var(--accent-ink); font-weight: 600; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-2); margin-top: 22px; }
.auth-switch a { color: var(--accent-ink); font-weight: 700; }
.pw-meter { display: flex; gap: 5px; margin-top: 9px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background .2s; }
.pw-meter.s1 i:nth-child(1) { background: var(--pink); }
.pw-meter.s2 i:nth-child(-n+2) { background: var(--amber); }
.pw-meter.s3 i:nth-child(-n+3) { background: var(--accent); }
.pw-meter.s4 i { background: var(--green); }

/* ============ TOAST (shared) ============ */
.toast-host { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); font-size: 13.5px; font-weight: 600; padding: 11px 16px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg); animation: toastIn .3s ease, toastOut .3s ease 2.6s forwards; }
.toast svg { width: 17px; height: 17px; color: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(14px); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .deck-grid { grid-template-columns: repeat(3, 1fr); }
  .tpl-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 940px) {
  .app-search { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-top .brand { display: inline-flex; }
}
@media (max-width: 760px) {
  .app-nav-links { display: none; }
  .app-burger { display: inline-flex; }
  .deck-grid { grid-template-columns: repeat(2, 1fr); }
  .tpl-grid, .start-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .ai-input-wrap { flex-direction: column; }
}
@media (max-width: 520px) {
  .deck-grid, .tpl-grid, .start-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .auth-panel { padding: 24px 22px; }
  .container { padding-inline: 18px; }
}

/* app mobile menu reuse */
.mobile-menu { position: fixed; inset: var(--nav-h) 0 0; z-index: 99; background: var(--bg); padding: 24px; display: none; flex-direction: column; gap: 6px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 18px; font-weight: 600; color: var(--text); padding: 14px 4px; border-bottom: 1px solid var(--border); }
