:root {
  --bg: #f3eee8;
  --bg-soft: #f7f3ee;
  --card: #efe8df;
  --ink: #3a2d26;
  --muted: #7a6a60;
  --line: #d9cfc4;
  --accent: #5c4033;
  --btn: #4a342c;
  --white: #fff;
  --shadow: 0 18px 50px rgba(58, 45, 38, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
}
button, input, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

.promo {
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  color: var(--muted);
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 36px 18px;
}
.logo {
  position: relative;
  z-index: 2;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.logo span { font-style: italic; opacity: 0.75; }
.menu-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 36px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.tabs a { color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid transparent; }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 36px 28px;
  flex-wrap: wrap;
}
.pills { display: flex; gap: 18px; flex-wrap: wrap; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; font-size: 15px; }
.pills button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 0;
}
.pills button.is-active { color: var(--ink); border-bottom: 1px solid var(--ink); }
.search-row { display: flex; gap: 10px; align-items: center; }
.search {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 240px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}
.filter-btn {
  border: 0;
  background: var(--btn);
  color: var(--white);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}

.wrap { padding: 0 36px 80px; }
.back-bar { padding: 0 36px 8px; }
.back-btn {
  border: 0;
  background: none;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  cursor: pointer;
  padding: 4px 0 12px;
}
.back-btn:hover { opacity: 0.7; }
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 12px 0 16px;
}
.section-head h2 { font-size: 32px; font-weight: 500; margin: 0; }
.section-head a { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; font-size: 14px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.shelf {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}
.card { cursor: pointer; }
.thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 2px;
  background: var(--card);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.28));
}
.bookmark {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.play {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(58,45,38,.18);
}
.thumb:hover .play { display: flex; }
.play span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.card h3 { font-size: 20px; font-weight: 500; margin: 10px 0 4px; }
.meta { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; font-size: 13px; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.drawer-bg {
  position: fixed;
  inset: 0;
  background: rgba(243,238,232,.55);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}
.drawer-bg.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 92vw);
  height: 100%;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: .25s ease;
  overflow: auto;
  padding: 18px 22px 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.drawer.is-open { transform: none; }
.drawer-top { display: flex; justify-content: flex-end; }
.drawer-top button { border: 0; background: none; font-size: 22px; cursor: pointer; }
.acc { border-bottom: 1px solid var(--line); padding: 14px 0; }
.acc-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  border: 0;
  background: none;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}
.chips { display: none; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.acc.is-open .chips { display: flex; }
.chip {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
}
.chip.is-on { background: var(--btn); color: #fff; border-color: var(--btn); }
.row-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.toggle {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: #cbbfb4;
  position: relative;
  cursor: pointer;
}
.toggle.is-on { background: var(--btn); }
.toggle::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: .15s;
}
.toggle.is-on::after { left: 21px; }

.site-foot {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 24px;
  padding: 48px 36px 36px;
  border-top: 1px solid var(--line);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: var(--muted);
}
.site-foot input {
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  width: min(260px, 100%);
  padding: 8px 0;
  margin-top: 8px;
}
.foot-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; color: var(--ink); }
.player {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}
.player-frame {
  aspect-ratio: 16/9;
  background: #2c241f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  margin-bottom: 20px;
  overflow: hidden;
}
.player-frame iframe { width: 100%; height: 100%; border: 0; }
.player h1 { font-size: 36px; font-weight: 500; margin: 8px 0 8px; }
.player .desc { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; line-height: 1.55; max-width: 640px; }
.week-day { margin: 28px 0 12px; font-size: 22px; }
.lvl-switch { display: flex; gap: 18px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; margin-bottom: 24px; }
.lvl-switch a { color: var(--muted); }
.lvl-switch a.is-on { color: var(--ink); border-bottom: 1px solid var(--ink); }
.stage { margin: 32px 0; }
.stage h3 { font-size: 26px; font-weight: 500; margin: 0 0 6px; }
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(243,238,232,.72);
  display: none;
  z-index: 40;
}
.nav-overlay.is-open { display: block; }
.nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 92vw);
  height: 100%;
  background: var(--bg-soft);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 22px;
  box-shadow: var(--shadow);
}
.nav-close { align-self: flex-end; border: 0; background: none; font-size: 22px; cursor: pointer; }
.page-copy { max-width: 640px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; line-height: 1.6; }
.login-box { max-width: 420px; margin: 40px auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
.login-box input, .login-box button { width: 100%; padding: 12px; margin-top: 10px; }
.login-box button { background: var(--btn); color: #fff; border: 0; border-radius: 999px; cursor: pointer; }

@media (max-width: 980px) {
  .grid-3, .grid-4, .shelf, .grid { grid-template-columns: repeat(2, 1fr); }
  .top, .toolbar, .wrap, .site-foot, .back-bar { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .shelf, .grid { grid-template-columns: 1fr; }
  .site-foot { grid-template-columns: 1fr; }
}
