:root {
  --bordeaux: #4a1228;
  --bordeaux-2: #6b1d3a;
  --gold: #c9a24a;
  --bg: #fbf6f1;
  --card: #ffffff;
  --text: #2a1a20;
  --muted: #7a6a70;
  --danger: #b3261e;
  --ok: #1f7a43;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-text-size-adjust: 100%;
}
header {
  background: var(--bordeaux); color: #fff;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 3px solid var(--gold);
}
header h1 { margin: 0; font-size: 20px; flex: 1; font-weight: 600; letter-spacing: .3px; }
header button, header a { color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.4);
  border-radius: 8px; padding: 6px 10px; font-size: 14px; text-decoration: none; }
main { padding: 14px; max-width: 960px; margin: 0 auto; }
.card { background: var(--card); border-radius: 12px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.grp { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); display: flex; flex-direction: column; }
.grp .thumb { aspect-ratio: 1; background: #eadfd8 center/cover no-repeat; cursor: pointer; }
.grp .meta { padding: 8px 10px 4px; }
.grp .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp .meta small { color: var(--muted); }
.grp .acts { display: flex; gap: 6px; padding: 6px 10px 10px; }
button.btn, a.btn {
  background: var(--bordeaux); color: #fff; border: 0; border-radius: 10px;
  padding: 10px 14px; font-size: 15px; text-decoration: none; cursor: pointer; display: inline-block; text-align: center;
}
button.btn.sec, a.btn.sec { background: #efe3dc; color: var(--bordeaux); }
button.btn.small, a.btn.small { padding: 7px 10px; font-size: 13px; flex: 1; }
button.btn:disabled { opacity: .5; }
input[type=text], input[type=password] {
  width: 100%; padding: 12px; font-size: 16px; border: 1px solid #cdbfb7; border-radius: 10px; background: #fff;
}
label { display: block; font-weight: 600; margin: 12px 0 6px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 12px 0; }
.thumbs a, .thumbs div { aspect-ratio: 1; background: #eadfd8 center/cover no-repeat; border-radius: 8px; display: block; }
.thumbs video { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; }
.msg.err { background: #fde8e6; color: var(--danger); }
.msg.ok { background: #e3f4e9; color: var(--ok); }
.bar { height: 8px; background: #eadfd8; border-radius: 4px; overflow: hidden; margin-top: 12px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .15s; }
.hidden { display: none !important; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
