:root {
  color-scheme: light;
  --ink: #3f3426;
  --muted: #716653;
  --paper: #fbf7ef;
  --line: #dccbad;
  --accent: #7b5a08;
  --accent-dark: #5c4204;
  --green: #466a37;
  --shadow: 0 18px 50px rgba(63, 52, 38, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(203, 174, 111, 0.24), transparent 32rem),
    linear-gradient(160deg, #f8f1e4, #fffdf8 55%, #efe4d2);
  font-family: "Pretendard", "Noto Sans KR", system-ui, sans-serif;
}

button, input { font: inherit; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
}

.skip-link:focus { top: 12px; }

.shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.site-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.site-nav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page-head, .section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.page-head { margin-bottom: 24px; }
.page-head .academy-name { margin: 0 0 8px; color: var(--ink); font-weight: 800; }
.page-head h1 { margin: 0; font-size: clamp(2rem, 7vw, 3.5rem); line-height: 1.05; }
.page-head p:not(.eyebrow):not(.academy-name) { max-width: 680px; margin: 12px 0 0; line-height: 1.7; color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: var(--green); font-weight: 900; letter-spacing: 0.08em; }

.panel, .recording-card {
  border: 1px solid rgba(188, 163, 116, 0.5);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.panel { padding: clamp(22px, 5vw, 38px); }
.panel h2, .section-head h2 { margin: 0; font-size: 1.45rem; }
.panel > p, .section-head p { color: var(--muted); line-height: 1.65; }
.status-panel { display: flex; align-items: center; gap: 14px; }

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e1d3bb;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-panel form {
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin-top: 24px;
}

.login-panel label { font-weight: 800; }
.login-panel input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.button {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.button:disabled { cursor: wait; opacity: 0.65; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }

.message { min-height: 1.5em; color: #9a301f; }
.muted { color: var(--muted); }
.recording-list { display: grid; gap: 18px; margin-top: 18px; }

.recording-card { overflow: hidden; }
.recording-card.is-targeted {
  border-color: #8b6914;
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.16);
}
.recording-copy { padding: 20px; }
.recording-card h3 { margin: 0; font-size: 1.2rem; }
.recording-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0 16px; color: var(--muted); font-size: 0.92rem; }
.recording-player { display: none; width: 100%; max-height: 70vh; background: #12100d; }
.recording-card.is-playing .recording-player { display: block; }
.empty-state { padding: 34px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }

@media (max-width: 640px) {
  .shell { width: min(100% - 22px, 980px); padding-top: 18px; }
  .page-head, .section-head { flex-direction: column; }
  .page-head .button, .section-head .button { width: 100%; }
  .recording-copy { padding: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.8s; }
}
