:root {
  --bg: #0f2a1d;
  --bg2: #163b29;
  --card: #fffaf0;
  --ink: #2a1a12;
  --muted: #7a6a5e;
  --red: #c8102e;
  --red-d: #9b0c23;
  --green: #1f7a4a;
  --gold: #f2c14e;
  --line: #eadfcd;
  --radius: 16px;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(242,193,78,.12), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(200,16,46,.18), transparent 45%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  background-attachment: fixed;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
header.top { text-align: center; color: #fff; margin: 12px 0 24px; }
header.top .logo { font-size: 56px; line-height: 1; }
header.top h1 { font-family: "Lobster", "Nunito", cursive; font-weight: 400; font-size: clamp(32px, 7vw, 48px); margin: 8px 0 4px; letter-spacing: .5px; }
header.top p { margin: 0; opacity: .85; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 12px; font-size: 20px; }
label { display: block; font-weight: 700; margin: 14px 0 6px; }
label small { font-weight: 400; color: var(--muted); }
textarea { width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); resize: vertical; }
textarea:focus { outline: none; border-color: var(--green); }
input, select {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--green); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
button, .btn {
  font: inherit; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border: 0; border-radius: 12px;
  background: var(--red); color: #fff;
  cursor: pointer; text-decoration: none;
  transition: transform .08s, background .15s;
}
button:hover, .btn:hover { background: var(--red-d); }
button:active, .btn:active { transform: scale(.97); }
button:disabled { background: #b9aaa0; cursor: not-allowed; }
button.secondary, .btn.secondary { background: #efe5d4; color: var(--ink); }
button.secondary:hover, .btn.secondary:hover { background: #e4d6bf; }
button.green, .btn.green { background: var(--green); }
button.green:hover, .btn.green:hover { background: #17603a; }
button.small, .btn.small { padding: 7px 11px; font-size: 14px; border-radius: 10px; }
button.big, .btn.big { width: 100%; padding: 16px; font-size: 18px; margin-top: 18px; }
.muted { color: var(--muted); }
.note { background: #fff3cd; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 12px; }
.err { color: var(--red); font-weight: 700; min-height: 1.2em; margin-top: 10px; }

.plist { list-style: none; padding: 0; margin: 0; }
.plist li { border-top: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.plist li:first-child { border-top: 0; }
.plist .name { font-weight: 800; }
.plist .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.plist .extra { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 14px; }
.plist .extra select { padding: 6px 8px; width: auto; font-size: 14px; }
.badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 99px; margin-left: 6px; vertical-align: middle; }
.badge.ok { background: #d8f0e1; color: var(--green); }
.badge.wait { background: #f6e4c8; color: #8a5a12; }
.badge.seen { background: #dde6ff; color: #3346a0; }
.progress { height: 10px; background: #efe5d4; border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width .4s; }

.preview { font-size: 15px; background: #fff; border: 2px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.big-emoji { font-size: 72px; text-align: center; margin: 6px 0; }
.center { text-align: center; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px);
  background: #222; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700;
  transition: transform .25s; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.wrap.wide { max-width: 960px; }
.tabs { display: flex; gap: 6px; margin: 0 0 16px; flex-wrap: wrap; }
.tabs button { background: rgba(255,255,255,.12); color: #fff; flex: 1 1 auto; }
.tabs button:hover { background: rgba(255,255,255,.22); }
.tabs button.on { background: var(--card); color: var(--ink); }
.item { border: 2px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.item .grid { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.item .grid.two { grid-template-columns: 1fr 1fr; margin-top: 8px; }
.item label { margin: 0 0 3px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.item input { padding: 8px 10px; border-radius: 10px; }
.item .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 800; }
.item .full { margin-top: 8px; }
.ph { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: #efe5d4; border-radius: 6px; padding: 2px 6px; margin: 2px; cursor: pointer; }
.savebar { position: sticky; bottom: 12px; display: flex; gap: 10px; justify-content: flex-end; background: var(--card); padding: 12px; border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.3); z-index: 5; flex-wrap: wrap; }
.vslot { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; border-top: 1px solid var(--line); padding: 14px 0; }
.vslot:first-of-type { border-top: 0; }
.vslot video, .vslot .novideo { width: 100%; aspect-ratio: 16/9; border-radius: 10px; background: #1d1d1d; }
.vslot .novideo { display: grid; place-items: center; color: #aaa; font-size: 13px; }
.vslot h3 { margin: 0 0 4px; font-size: 17px; }
.vslot textarea { font-size: 14px; margin-top: 6px; background: #fffdf8; }
.vslot .btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.upbar { height: 8px; background: #efe5d4; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.upbar > div { height: 100%; width: 0; background: var(--green); transition: width .2s; }
.spoiler { text-align: center; padding: 18px; background: #fff3cd; border-radius: 12px; }
@media (max-width: 640px) { .vslot { grid-template-columns: 1fr; } .item .grid.two { grid-template-columns: 1fr; } }
footer { text-align: center; color: rgba(255,255,255,.6); font-size: 13px; margin-top: 24px; }
@media (max-width: 480px) {
  .plist li { grid-template-columns: 1fr; }
  .plist .actions { justify-content: flex-start; }
}

button.green:disabled, button.secondary:disabled { background: #b9aaa0; color: #fff; cursor: not-allowed; }
