@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Karla:wght@400;500;600;700&display=swap');

:root {
  --paper: #EDE3C6;
  --ink: #23303B;
  --ink-soft: #4B5866;
  --rust: #A63D2A;
  --rust-deep: #7E2E20;
  --gold: #C79A3C;
  --gold-soft: #E6D8AE;
  --locked: #8B8272;
  --line: rgba(35,48,59,0.16);
  --card: #F7F1DE;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px 80px; }

.marquee-wrap { overflow: hidden; white-space: nowrap; width: 100%; }
.marquee-wrap .tam { display: inline-block; margin: 0; animation: marqueeLTR 9s linear infinite; }
@keyframes marqueeLTR {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-wrap .tam { animation: none; display: block; text-align: center; }
}

.guruji-photo {
  display: block;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 3px solid var(--gold);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

.hero {
  padding: 44px 20px 36px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% -10%, var(--gold-soft) 0%, transparent 60%);
}
.hero .tam { font-family: var(--serif); font-size: 15px; color: var(--rust); margin: 0 0 6px; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 8vw, 40px); margin: 0 0 12px; line-height: 1.1; }
.hero p { max-width: 46ch; margin: 0 auto; color: var(--ink-soft); font-size: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px;
  margin: 20px 0;
}
.card h2 { font-family: var(--serif); font-size: 19px; margin: 0 0 4px; font-weight: 600; }
.card .sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 16px; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px;
}
.field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px;
  min-height: 60px; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--rust); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 3px; padding: 11px 18px; font-family: var(--sans);
  font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--rust); color: #fff; }
.btn-primary:hover { background: var(--rust-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: default; }

.msg { font-size: 13px; margin-top: 10px; }
.msg.ok { color: var(--gold); }
.msg.err { color: var(--rust); }

.railhead { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 18px; }
.railhead h2 { font-family: var(--serif); font-size: 20px; margin: 0; font-weight: 600; }
.railhead .count { font-size: 13px; color: var(--ink-soft); }

.path { position: relative; padding-left: 34px; }
.path::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }

.stage { position: relative; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); overflow: hidden; }
.stage .marker {
  position: absolute; left: -34px; top: 18px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line); display: flex; align-items: center;
  justify-content: center; font-family: var(--serif); font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
.stage.done .marker { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.stage.current .marker { border-color: var(--rust); color: var(--rust); background: var(--card); }
.stage.pending .marker { border-color: var(--gold); color: var(--gold); }

.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px; }
.stage-head .eng { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 0; }
.tag { flex-shrink: 0; font-size: 11.5px; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.tag.locked { background: transparent; color: var(--locked); border: 1px solid var(--line); }
.tag.current { background: var(--rust); color: #fff; }
.tag.done { background: var(--gold); color: var(--ink); }
.tag.pending { background: var(--gold-soft); color: var(--rust-deep); border: 1px solid var(--gold); }

.stage-body { padding: 0 16px 18px; }
.stage.locked .stage-body { display: none; }
.video-frame { position: relative; width: 100%; padding-top: 56.25%; background: var(--ink); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame.placeholder { display: flex; align-items: center; justify-content: center; padding-top: 0; height: 140px; }
.video-frame.placeholder span { color: var(--gold); font-size: 13px; text-align: center; padding: 0 20px; }

.hint { font-size: 12.5px; color: var(--ink-soft); background: var(--gold-soft); border-radius: 3px; padding: 8px 10px; margin-top: 10px; }

footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; color: var(--ink-soft); }

/* Admin */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table th, table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table th { color: var(--ink-soft); font-weight: 600; font-size: 12px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.admin-topbar a { color: var(--ink-soft); font-size: 13px; text-decoration: none; }
.section-title { font-family: var(--serif); font-size: 18px; margin: 24px 0 10px; }
.login-wrap { max-width: 360px; margin: 80px auto; padding: 0 20px; }
