/* Kashi Darshan – core styles */
:root {
  --bg: #FBF7F1;
  --surface: #FFFFFF;
  --surface-2: #F3ECE2;
  --text: #241A16;
  --muted: #76675E;
  --border: #E6DACB;
  --saffron: #E8751A;
  --saffron-2: #C95E0C;
  --maroon: #7A1F2B;
  --danger: #B3261E;
  --ok: #2E7D32;
  --shadow: 0 6px 24px rgba(60, 30, 10, .10);
  --radius: 14px;
  --topbar: 60px;
  --sidebar: 236px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15100E; --surface: #1F1815; --surface-2: #2A211D; --text: #F4ECE6; --muted: #B3A398;
    --border: #3A2E28; --shadow: 0 6px 24px rgba(0,0,0,.4); --maroon: #E7A3A9;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
p a, .muted a, .section-sub a, .desc-meta a { color: var(--saffron-2); }
p a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar); display: flex; align-items: center; gap: 16px;
  padding: 0 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.tb-left { display: flex; align-items: center; gap: 8px; }
.brand img { flex: none; }
.tb-right { flex: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.3px; }
.brand .hi { font-family: "Tiro Devanagari Hindi", serif; color: var(--saffron); font-weight: 400; font-size: 22px; }
.icon-btn { background: none; border: 0; color: var(--text); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }

.search { flex: 1 1 0; min-width: 0; max-width: 620px; margin: 0 auto; display: flex; }
.search input { flex: 1; min-width: 0; height: 40px; padding: 0 16px; border: 1px solid var(--border); border-right: 0; border-radius: 20px 0 0 20px;
  background: var(--surface); color: var(--text); font: inherit; outline: none; }
.search input:focus { border-color: var(--saffron); }
.search button { width: 60px; border: 1px solid var(--border); border-radius: 0 20px 20px 0; background: var(--surface-2); color: var(--text); cursor: pointer; display: grid; place-items: center; }

.tb-right { display: flex; align-items: center; gap: 10px; }
.user-menu { position: relative; }
.avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; }
.dropdown { position: absolute; right: 0; top: 48px; width: 250px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px 0; display: none; }
.dropdown.open { display: block; }
.dropdown a { display: block; padding: 10px 16px; }
.dropdown a:hover, .dd-link:hover { background: var(--surface-2); }
.dd-link { display: block; width: 100%; text-align: left; padding: 10px 16px; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; }
.dropdown form { margin: 0; }
.side-links { font-size: 12px; padding: 0 12px; color: var(--muted); }
.side-links a:hover { color: var(--saffron-2); }
.legal { max-width: 820px; margin: 10px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px 32px; }
.legal h1 { margin-top: 0; } .legal h2 { font-size: 17px; margin-top: 24px; } .legal li { margin: 4px 0; }
.danger-zone { border-top: 1px solid var(--border); margin-top: 26px; }
.report-box { margin-top: 12px; } .report-box summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.report-box form { background: var(--surface-2); padding: 12px 14px; border-radius: 12px; margin-top: 8px; }
.report-box label { margin: 8px 0; }
.dd-head { display: flex; gap: 12px; align-items: center; padding: 8px 16px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dd-head small { display: block; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 20px;
  font: 600 14px/1 inherit; font-family: inherit; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .15s; }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--saffron); color: #fff; }
.btn-primary:hover { background: var(--saffron-2); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-muted { background: var(--surface-2); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--saffron-2); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.big { height: 46px; width: 100%; font-size: 15px; border-radius: 24px; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 4px; }
.link-btn:hover { color: var(--danger); }

/* ---------- Avatars ---------- */
.avatar { --h: 25; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: hsl(var(--h) 60% 45%); color: #fff; font-weight: 600; font-size: 14px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.xl { width: 96px; height: 96px; font-size: 34px; }

/* ---------- Layout ---------- */
.layout { display: flex; }
.sidebar { position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); width: var(--sidebar); flex: none; overflow-y: auto; padding: 12px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.sidebar nav a { display: flex; align-items: center; gap: 18px; padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.sidebar nav a:hover { background: var(--surface-2); }
.sidebar nav a.active { background: var(--surface-2); font-weight: 600; }
.sidebar h4 { margin: 6px 12px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sidebar .dot { width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--h) 65% 50%); margin: 0 6px; }
.side-foot { font-size: 12px; color: var(--muted); padding: 4px 12px; }
body.sidebar-collapsed .sidebar { display: none; }
.scrim { display: none; }
.content { flex: 1; min-width: 0; padding: 16px 24px 48px; }

/* ---------- Home ---------- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 10px; background: var(--surface-2); font-size: 14px; font-weight: 500; }
.chip.active { background: var(--text); color: var(--bg); }
.hero { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin: 6px 0 22px; padding: 28px 32px;
  border-radius: var(--radius); color: #fff; background: linear-gradient(120deg, rgba(40,15,30,.85), rgba(122,31,43,.55)), url('../img/placeholder.svg') center/cover; }
.hero h1 { margin: 4px 0 8px; font-size: clamp(24px, 3.4vw, 36px); letter-spacing: -.5px; }
.hero p { margin: 0; max-width: 620px; opacity: .92; }
.eyebrow { font-family: "Tiro Devanagari Hindi", serif; color: #FFD27A; font-size: 17px; }
.section-title { font-size: 20px; margin: 8px 0 14px; }
.section-sub { margin: -8px 0 16px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px 18px; }
.card { display: block; }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card:hover .thumb img { transform: scale(1.03); }
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.status-badge { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; text-transform: capitalize; color: #fff; }
.status-badge.pending { background: #B7791F; }
.status-badge.rejected { background: var(--danger); }
.card-body { display: flex; gap: 12px; padding-top: 12px; }
.card-title { margin: 0 0 4px; font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin: 0; color: var(--muted); font-size: 13px; }
.meta.loc { color: var(--saffron-2); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty img { width: 260px; margin: 0 auto 16px; border-radius: 12px; opacity: .85; }
.empty h3 { color: var(--text); margin: 0 0 6px; }
.empty .btn { margin-top: 12px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 30px; }
.pager a { padding: 8px 14px; border-radius: 10px; background: var(--surface-2); font-weight: 500; }

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; }
.flash ul { margin: 0; padding-left: 18px; }
.flash.success { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash.error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.flash.info { background: color-mix(in srgb, var(--saffron) 12%, var(--surface)); border-color: color-mix(in srgb, var(--saffron) 35%, transparent); }

/* ---------- Watch ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; max-width: 1720px; margin: 0 auto; }
.player { background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; }
.player video { width: 100%; height: 100%; display: block; }
.watch-title { font-size: 20px; margin: 14px 0 10px; line-height: 1.3; }
.watch-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.channel-chip { display: flex; align-items: center; gap: 12px; }
.channel-chip small { display: block; color: var(--muted); font-size: 12px; }
.actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: flex; background: var(--surface-2); border-radius: 20px; overflow: hidden; }
.pill button, .pill-btn { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; background: var(--surface-2);
  color: var(--text); font: 600 14px inherit; font-family: inherit; cursor: pointer; border-radius: 20px; }
.pill button { border-radius: 0; }
.pill button + button { border-left: 1px solid var(--border); }
.pill button:hover, .pill-btn:hover { background: var(--border); }
.pill button.on { color: var(--saffron-2); }
.pill button.on svg { fill: currentColor; }
.pill-btn.danger { color: var(--danger); }
.description { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.desc-meta { margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.desc-text { font-size: 14px; overflow-wrap: anywhere; }

.comments h2 { font-size: 18px; margin: 24px 0 16px; }
.comment-form, .comment { display: flex; gap: 14px; margin-bottom: 20px; }
.comment-form textarea { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text);
  font: inherit; padding: 6px 0; resize: vertical; outline: none; min-height: 32px; }
.comment-form textarea:focus { border-color: var(--text); }
.form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.c-head { margin: 0 0 2px; font-size: 13px; }
.c-body { margin: 0; font-size: 14px; overflow-wrap: anywhere; }

.up-next h3 { margin: 0 0 12px; font-size: 16px; }
.mini-card { display: grid; grid-template-columns: 168px 1fr; gap: 10px; margin-bottom: 10px; }
.mini-card h4 { margin: 0 0 4px; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-card .thumb { border-radius: 8px; }

/* ---------- Search list ---------- */
.list { display: flex; flex-direction: column; gap: 16px; max-width: 1100px; }
.row-card { display: grid; grid-template-columns: 360px 1fr; gap: 16px; }
.row-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.row-card .chan { display: flex; align-items: center; gap: 8px; margin: 10px 0; }

/* ---------- Channel ---------- */
.channel-head .banner { height: 160px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(122,31,43,.55), rgba(232,117,26,.35)), url('../img/placeholder.svg') center 70%/cover; }
.channel-info { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 20px 4px 10px; }
.channel-info h1 { margin: 0 0 4px; font-size: 28px; }
.channel-info .bio { margin: 8px 0 0; max-width: 700px; }

/* ---------- Forms ---------- */
.form-page { max-width: 440px; margin: 30px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px; }
.form-page.wide { max-width: 1100px; }
.form-page h1 { margin: 0 0 4px; font-size: 24px; }
.form-page h2 { font-size: 17px; margin: 26px 0 8px; }
.form-logo { margin-bottom: 14px; }
form label { display: block; margin: 14px 0; font-size: 14px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=search]:not(.search input), select, textarea {
  font: inherit; color: var(--text); }
form label input[type=text], form label input[type=email], form label input[type=password], form label select, form label textarea, .inline-form input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); outline: none; }
form label input:focus, form label select:focus, form label textarea:focus { border-color: var(--saffron); box-shadow: 0 0 0 3px color-mix(in srgb, var(--saffron) 20%, transparent); }
form label input[type=file] { display: block; margin-top: 6px; font-size: 13px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: 3px; accent-color: var(--saffron); }

.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 18px; }
.dropzone { position: relative; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 220px; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--bg); cursor: pointer; padding: 20px; margin: 0 !important; }
.dropzone svg { width: 40px; height: 40px; color: var(--saffron); }
.dropzone.drag { border-color: var(--saffron); background: color-mix(in srgb, var(--saffron) 8%, var(--bg)); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.preview video { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 16/9; }
.thumb-row { display: flex; gap: 14px; margin-top: 12px; align-items: flex-start; }
.thumb-row img { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.thumb-row p { margin: 0 0 6px; }
.progress { position: relative; height: 26px; background: var(--surface-2); border-radius: 13px; overflow: hidden; margin: 12px 0; }
.progress .bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--saffron), var(--maroon)); transition: width .2s; }
.progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600; }

/* ---------- Admin ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stats strong { display: block; font-size: 24px; }
.stats span { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 16px; border-bottom: 2px solid transparent; font-weight: 500; white-space: nowrap; }
.tabs a.active { border-color: var(--saffron); color: var(--saffron-2); }
.admin-list { display: flex; flex-direction: column; gap: 14px; }
.admin-row { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.admin-row video { width: 300px; aspect-ratio: 16/9; background: #000; border-radius: 8px; flex: none; }
.admin-row h3 { margin: 0 0 6px; font-size: 16px; }
.row-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; }
.table th { background: var(--surface-2); font-size: 13px; }
.inline-form { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.inline-form input { width: auto; flex: 1; min-width: 200px; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .watch { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .sidebar { position: fixed; left: 0; top: var(--topbar); z-index: 40; background: var(--bg); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; background: rgba(0,0,0,.4); z-index: 30; }
  body.sidebar-collapsed .sidebar { display: block; }
}
@media (max-width: 760px) {
  .content { padding: 12px 16px 40px; }
  .brand-text { display: none; }
  .upload-btn span, .signin-btn span { display: none; }
  .signin-btn { width: 38px; padding: 0; }
  .upload-btn { width: 38px; padding: 0; }
  .topbar { gap: 8px; padding: 0 8px; }
  .search button { width: 46px; }
  .grid { grid-template-columns: 1fr; }
  .row-card { grid-template-columns: 1fr; }
  .upload-grid { grid-template-columns: 1fr; }
  .admin-row { flex-direction: column; }
  .admin-row video { width: 100%; }
  .actions { margin-left: 0; }
  .hero { padding: 22px; }
  .form-page { padding: 22px; margin: 12px auto; }
  .mini-card { grid-template-columns: 140px 1fr; }
}

.log { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; max-height: 360px; }

/* ---------- Avatar images ---------- */
.avatar.has-img { background: var(--surface-2); overflow: hidden; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Channel cover & photo editing ---------- */
.channel-head .banner { position: relative; overflow: hidden; }
.channel-head .banner.has-img { background: var(--surface-2); }
.channel-head .banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.channel-head .banner { width: 100%; aspect-ratio: 4 / 1; height: auto; max-height: 260px; }
.edit-chip { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 0; border-radius: 20px; background: rgba(0,0,0,.6); color: #fff; font: 600 13px Inter, sans-serif; cursor: pointer;
  backdrop-filter: blur(4px); transition: background .15s; }
.edit-chip:hover, .edit-chip:focus-visible { background: rgba(0,0,0,.8); }
.edit-chip svg { width: 18px; height: 18px; }
.avatar-edit { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; flex: none; }
.avatar-edit-overlay { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(0,0,0,.45); opacity: 0; transition: opacity .15s; }
.avatar-edit:hover .avatar-edit-overlay, .avatar-edit:focus-visible .avatar-edit-overlay { opacity: 1; }
.avatar-edit-overlay svg { width: 30px; height: 30px; }
@media (hover: none) { .avatar-edit-overlay { opacity: 1; background: rgba(0,0,0,.25); } }

/* ---------- Popup ---------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(10,6,4,.6); backdrop-filter: blur(3px); }
.modal-box { width: 100%; max-width: 680px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-head .icon-btn { font-size: 18px; }
.crop-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 200px;
  margin: 14px 0; border: 2px dashed var(--border); border-radius: 14px; background: var(--bg); cursor: pointer; text-align: center; padding: 20px; }
.crop-drop svg { width: 38px; height: 38px; color: var(--saffron); }
.crop-drop.drag { border-color: var(--saffron); }
.crop-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.crop-area { margin: 14px 0; }
.crop-area canvas { display: block; width: 100%; height: auto; margin: 0 auto; border-radius: 12px; background: #111; cursor: grab; touch-action: none; }
.crop-area canvas:active { cursor: grabbing; }
.crop-area canvas.round { max-width: 360px; }
.crop-area p { margin: 8px 0 4px; }
.zoom-row { display: flex; align-items: center; gap: 10px; max-width: 360px; margin: 6px auto; color: var(--muted); }
.zoom-row input { flex: 1; accent-color: var(--saffron); }
.crop-area .link-btn { display: block; margin: 4px auto 0; color: var(--saffron-2); }
.modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.danger-text { color: var(--danger) !important; }
@media (max-width: 760px) {
  .channel-info { gap: 14px; padding-top: 14px; }
  .channel-info .avatar.xl { width: 72px; height: 72px; font-size: 26px; }
  .channel-info .grow { flex: 1 1 calc(100% - 100px); }
  .channel-info h1 { font-size: 21px; }
  .channel-info > .btn, .channel-info > form { flex: 1 1 auto; }
  .channel-info > form .btn { width: 100%; }
  .edit-chip { right: 8px; bottom: 8px; }
  .edit-chip span { display: none; }
  .edit-chip { padding: 8px; }
  .modal-box { padding: 16px; }
}

/* ---------- Videos | Photos tabs ---------- */
.type-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin: 0 0 16px; }
.type-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.type-tabs a svg { width: 18px; height: 18px; }
.type-tabs a.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.upload-tabs { margin-bottom: 18px; }
.photo-count { display: inline-flex; align-items: center; gap: 4px; }
.photo-count svg { width: 14px; height: 14px; }

/* ---------- Photo viewer ---------- */
.gallery-stage { position: relative; background: #0d0907; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10;
  display: grid; place-items: center; user-select: none; }
.gallery-stage:fullscreen { border-radius: 0; aspect-ratio: auto; }
.gallery-img { display: none; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; grid-area: 1 / 1; }
.gallery-img.active { display: block; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.5); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 4px; }
.gallery-nav:hover { background: rgba(0,0,0,.75); }
.gallery-nav.prev { left: 12px; } .gallery-nav.next { right: 12px; }
.gallery-counter { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 14px; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; font-weight: 600; }
.gallery-full { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(0,0,0,.5);
  color: #fff; cursor: pointer; display: grid; place-items: center; }
.gallery-full svg { width: 20px; height: 20px; }
.gallery-strip { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 2px; scrollbar-width: thin; }
.gallery-thumb { flex: none; width: 88px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden;
  background: var(--surface-2); cursor: pointer; opacity: .65; transition: opacity .15s, border-color .15s; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active, .gallery-thumb:hover { opacity: 1; border-color: var(--saffron); }
a.pill-btn { text-decoration: none; }

/* ---------- Photo upload ---------- */
.photo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.pick { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: grab; }
.pick img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pick.dragging { opacity: .4; }
.pick-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; font-size: 12px; }
.pick-cover { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 6px; background: var(--saffron); color: #fff; font-size: 11px; font-weight: 700; }
@media (max-width: 760px) {
  .gallery-stage { aspect-ratio: 4 / 3; }
  .gallery-nav { width: 38px; height: 38px; font-size: 24px; }
  .gallery-thumb { width: 70px; }
}
.list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list-head .type-tabs { margin-top: 2px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-light { background: rgba(255,255,255,.92); color: #3a1a12; }
.btn-light:hover { background: #fff; }

.admin-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 300px; flex: none; align-content: start; }
.admin-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
@media (max-width: 760px) { .admin-photos { width: 100%; } }

/* ---------- Admin → SEO ---------- */
.seo-form { max-width: 860px; }
.seo-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.seo-card h2 { margin: 0 0 12px; font-size: 18px; }
.seo-card .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.serp { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 10px; background: #fff; border: 1px solid #dadce0;
  font-family: Arial, sans-serif; max-width: 620px; margin: 4px 0 10px; }
.serp-url { font-size: 13px; color: #202124; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { font-size: 19px; line-height: 1.3; color: #1a0dab; }
.serp-desc { font-size: 14px; line-height: 1.5; color: #4d5156; }
.counter { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.counter.over { color: var(--danger); font-weight: 600; }
.og-row { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 8px; }
.og-preview { width: 240px; aspect-ratio: 1200 / 630; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2);
  display: grid; place-items: center; border: 1px dashed var(--border); }
.og-preview img { width: 100%; height: 100%; object-fit: cover; }
.seo-list { display: flex; flex-direction: column; gap: 8px; }
.seo-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.seo-item.custom { border-left: 4px solid var(--saffron); }
.seo-item summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.seo-item summary::-webkit-details-marker { display: none; }
.seo-item summary small { display: block; }
.seo-item[open] summary { border-bottom: 1px solid var(--border); }
.seo-item form { padding: 6px 16px 16px; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag.ok { background: color-mix(in srgb, var(--saffron) 18%, var(--surface)); color: var(--saffron-2); }
.tag.warn { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.howto { padding-left: 20px; margin: 0; } .howto li { margin: 8px 0; }
.howto code, .seo-card code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 14px; }
.health-head { display: flex; align-items: center; gap: 20px; }
.health-head h2 { margin-bottom: 4px; } .health-head p { margin: 0; }
.score { --p: 0; width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--saffron) calc(var(--p) * 1%), var(--surface-2) 0); }
.score span { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.health-list { display: flex; flex-direction: column; gap: 8px; }
.health { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.health p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.health .fix { color: var(--text); }
.health .icon { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.health.ok .icon { background: var(--ok); } .health.warn .icon { background: #B7791F; }
.health.bad .icon { background: var(--danger); } .health.info .icon { background: #5B6B8C; }
@media (max-width: 760px) { .seo-card .two { grid-template-columns: 1fr; } .og-row { flex-direction: column; } .og-preview { width: 100%; } }
