:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #687386;
  --paper: #f4f6fa;
  --panel: #ffffff;
  --line: #dfe4ec;
  --pine: #1f5a4a;
  --cranberry: #a61f45;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.admin-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 60px; }
header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: Georgia, serif; font-size: clamp(2.2rem, 6vw, 4.2rem); }
.eyebrow {
  margin-bottom: 5px;
  color: var(--cranberry);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.panel {
  padding: clamp(20px, 4vw, 34px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 45px rgba(24, 35, 56, 0.08);
}
.narrow { max-width: 520px; }
.stack { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #354056; font-size: 0.9rem; font-weight: 750; }
input, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid #cbd2dd;
  border-radius: 11px;
  outline: 0;
}
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #cbd2dd;
  border-radius: 11px;
}
option { color: #111827; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--pine); box-shadow: 0 0 0 4px rgba(31, 90, 74, 0.12); outline: 0; }
.primary, .secondary, .danger, .tab {
  min-height: 44px;
  padding: 0 17px;
  border-radius: 11px;
  border: 0;
  font-weight: 800;
}
.primary { justify-self: start; color: white; background: var(--pine); }
.secondary { color: var(--ink); background: #e9edf3; }
.danger { color: var(--cranberry); background: #fae8ed; }
.hint, .warning, .form-message, .save-state { margin: 0; color: var(--muted); font-size: 0.86rem; }
.warning { color: #8a5b0b; }
.form-message.error { color: #b51f3e; font-weight: 750; }
.form-message.success { color: var(--pine); font-weight: 750; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { color: var(--muted); background: #e5e9f0; }
.tab.active { color: white; background: var(--ink); }
#daysPanel { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.game-catalog { grid-column: 1 / -1; }
.game-catalog h2 { margin-bottom: 8px; }
.game-test-controls { display: flex; align-items: end; gap: 10px; margin: 15px 0 10px; }
.game-test-controls label { flex: 1; max-width: 520px; }
@media (max-width: 620px) { .game-test-controls { align-items: stretch; flex-direction: column; } }
.day-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: sticky; top: 18px; }
.day-pick {
  aspect-ratio: 1;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-weight: 850;
}
.day-pick.has-content::after { content: "•"; display: block; color: var(--pine); line-height: 0.3; }
.day-pick.active { color: white; background: var(--cranberry); border-color: var(--cranberry); }
.editor-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.upload-card { padding: 17px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 15px; }
.copy-card, .backup-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 15px; }
.copy-card strong, .backup-card h3 { display: block; margin: 0 0 5px; }
.copy-card p, .backup-card p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.copy-controls { display: flex; flex: 0 0 auto; gap: 8px; }
.copy-controls select { width: min(220px, 45vw); }
.intro-upload { margin-bottom: 22px; }
.upload-card h3 { margin-bottom: 7px; }
.upload-card p { min-height: 2.4em; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.file-input { min-height: 0; padding: 8px; font-size: 0.85rem; }
.drop-zone { display: grid; gap: 3px; margin: 10px 0; padding: 14px; color: var(--pine); background: #edf7f4; border: 2px dashed #75aa9c; border-radius: 12px; cursor: pointer; text-align: center; transition: background 120ms ease, border-color 120ms ease, transform 120ms ease; }
.drop-zone strong { font-size: 0.95rem; }
.drop-zone span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.drop-zone.drag-active { background: #d9f1eb; border-color: var(--pine); transform: scale(1.015); }
.media-preview { display: block; width: 100%; max-height: 240px; margin-top: 12px; background: #172033; border: 1px solid #cbd2dd; border-radius: 11px; object-fit: contain; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
progress { width: 100%; margin-top: 12px; accent-color: var(--pine); }
.check-row { display: flex; align-items: center; gap: 11px; font-size: 1rem; }
.check-row input { width: 20px; min-height: 20px; accent-color: var(--pine); }
@media (max-width: 760px) {
  .admin-shell { width: min(100% - 20px, 1120px); padding-top: 18px; }
  #daysPanel { grid-template-columns: 1fr; }
  .day-list { position: static; grid-template-columns: repeat(8, 1fr); overflow-x: auto; }
  .day-pick { min-width: 44px; }
  .media-grid { grid-template-columns: 1fr; }
  .copy-card, .backup-card { align-items: stretch; flex-direction: column; }
  .copy-controls { width: 100%; }
  .copy-controls select { flex: 1; width: auto; }
}

.game-multi{padding:18px;background:#f6f3ee;border:1px solid #d5c8b3;border-radius:16px}.game-multi-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;max-height:320px;overflow:auto;margin:12px 0}.game-multi-choices label{display:flex;align-items:center;gap:10px}.game-multi-choices input{width:auto}.game-multi-order li{display:flex;align-items:center;gap:8px;padding:8px}.game-multi-order li span{flex:1}.game-multi-order button{padding:8px}.game-multi input[type=search]{width:100%}#bonusPanel label{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px}#bonusPanel select{max-width:250px}

.end-reward-editor{min-width:0;border:1px solid #c8ae81;border-radius:14px;padding:14px;margin:12px 0}.end-reward-editor input[type=checkbox]{width:auto;min-height:20px;vertical-align:middle}.end-reward-editor textarea{width:100%;box-sizing:border-box;min-height:120px;resize:vertical}

.video-recorder { width: min(34rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; }
.video-recorder .button-row { flex-wrap: wrap; margin-top: 1rem; }
