:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #2b2622;
  --muted: #6f665e;
  --line: #e4ddd3;
  --accent: #1f6f5c;
  --danger: #a4322a;
  --ok: #1f6f5c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --surface: #211e1b;
    --text: #f2ede6;
    --muted: #b3a99e;
    --line: #3a352f;
    --accent: #4fb39a;
    --danger: #ef8b82;
    --ok: #4fb39a;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Heebo", "Assistant", "Rubik", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

/* ----- public page ----- */
.lvp { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; text-align: center; }
.lvp-title { margin: 0 0 18px; font-size: clamp(24px, 4.5vw, 36px); line-height: 1.25; font-weight: 700; text-wrap: balance; }
.lvp-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.lvp-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lvp-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; color: #fff; font-size: clamp(18px, 3.5vw, 26px); line-height: 1.3; }
.lvp-btn {
  --lvp-color: #1f6f5c;
  --lvp-text: #ffffff;
  display: block; width: 100%; max-width: 520px; margin: 22px auto 0; padding: 18px 24px;
  background: var(--lvp-color); color: var(--lvp-text);
  font-size: clamp(20px, 4.5vw, 26px); font-weight: 700; line-height: 1.2; text-decoration: none;
  border-radius: 999px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
  transition: transform .15s ease, filter .15s ease;
}
.lvp-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.lvp-btn:active { transform: translateY(0); }
.lvp-btn:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.lvp-pop { animation: lvp-pop .7s ease-out 1; }
@keyframes lvp-pop { 0% { transform: scale(.9); opacity: 0; } 60% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); } }
.lvp-note { margin: 12px 0 0; font-size: 16px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .lvp-btn { transition: none; } .lvp-pop { animation: none; } }

/* ----- admin page ----- */
.adm { max-width: 620px; margin: 0 auto; padding: 24px 16px 64px; }
.adm h1 { margin: 0 0 4px; font-size: 26px; line-height: 1.25; }
.adm-sub { margin: 0 0 20px; color: var(--muted); }
.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.adm-field { margin-bottom: 16px; }
.adm-field label { display: block; margin-bottom: 6px; font-weight: 600; }
.adm-hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.adm-err { margin: 6px 0 0; font-size: 14px; color: var(--danger); font-weight: 600; }
.adm input[type="text"], .adm input[type="url"], .adm input[type="password"] {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px;
}
.adm input[dir="ltr"] { text-align: left; }
.adm input:focus-visible, .adm button:focus-visible, .adm a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.adm-colors { display: flex; gap: 20px; flex-wrap: wrap; }
.adm-colors label { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0; }
.adm input[type="color"] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.adm-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.adm button { font: inherit; font-weight: 700; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; }
.adm-primary { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .adm-primary { color: #10201c; } }
.adm-secondary { background: transparent; color: var(--text); border-color: var(--line) !important; }
.adm button:disabled { opacity: .6; cursor: default; }
.adm-status { margin: 14px 0 0; min-height: 24px; font-weight: 600; }
.adm-status.ok { color: var(--ok); }
.adm-status.bad { color: var(--danger); }
.adm-details { margin: 4px 0 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.adm-details summary { cursor: pointer; font-weight: 600; margin-bottom: 14px; }
.adm-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.adm-foot a { color: var(--accent); font-weight: 600; }
.adm-link { background: none !important; border: 0 !important; padding: 0 !important; color: var(--muted); font-weight: 600 !important; text-decoration: underline; border-radius: 4px !important; }
