:root {
  --bg: #F4F7F6;
  --card: #FFFFFF;
  --line: #DCE6E4;
  --text: #13201F;
  --muted: #5B6D6B;
  --teal: #2BA39A;
  --teal-dark: #1C7A73;
  --amber: #E8A93A;
  --night: #0D1A1B;
  --danger: #B3412F;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "DM Sans", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; margin: 0 0 8px; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
a { color: var(--teal-dark); }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 13px; }

.top {
  background: var(--night);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { border-radius: 9px; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-family: "Fraunces", serif; font-size: 19px; }
.brand small { color: var(--amber); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
#nav { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #BFD3D0; }
#nav button { background: transparent; color: #fff; border: 1px solid #36504E; }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px 24px 48px; }
.foot { text-align: center; padding: 20px 16px; color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
}
.narrow { max-width: 440px; margin: 40px auto; }

label { display: block; font-weight: 500; margin: 12px 0 6px; }
input, select {
  width: 100%;
  font: inherit;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  background: var(--teal);
  color: #fff;
  min-height: 44px;
}
button:hover { background: var(--teal-dark); }
button.ghost { background: transparent; color: var(--teal-dark); border: 1px solid var(--line); }
button.ghost:hover { background: #EAF3F1; }
button.danger { background: transparent; color: var(--danger); border: 1px solid #E8C9C2; min-height: 36px; padding: 6px 12px; }
button.danger:hover { background: #FBEDEA; }
button:disabled { opacity: .6; cursor: default; }
.full { width: 100%; margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > input, .row > select { flex: 1; width: auto; min-width: 200px; }
.spread { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin: 4px 0 8px; }
.tabs button { flex: 1; background: #EAF3F1; color: var(--teal-dark); }
.tabs button.on { background: var(--teal); color: #fff; }

.code {
  font-family: "DM Sans", monospace;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--night);
  background: #FFF6E3;
  border: 1px dashed var(--amber);
  border-radius: 12px;
  padding: 8px 18px;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat b { display: block; font-family: "Fraunces", serif; font-size: 28px; }
.stat span { color: var(--muted); font-size: 13px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
td.name { font-weight: 700; }
.bar { height: 6px; border-radius: 3px; background: #E3ECEA; width: 90px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--teal); }
.done { color: var(--teal-dark); font-weight: 700; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #FFF1D6; color: #8A5A0B; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--night); color: #fff; padding: 12px 18px; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100% - 32px);
}
.err { color: var(--danger); }
.ok { color: var(--teal-dark); }

@media (max-width: 720px) {
  .top { padding: 10px 16px; }
  main { padding: 20px 16px 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  #nav .who { display: none; }
}

/* ------------------------------------------------ public page (index.html) */
body.home { background: var(--night); color: #E6EFED; }
body.home .muted { color: #9DB3B0; }
body.home .foot { color: #8AA19E; }
body.home .foot a { color: #BFEAE5; }
.home-nav { display: flex; align-items: center; gap: 16px; }
.home-nav .link { color: #D5E4E1; text-decoration: none; font-weight: 500; font-size: 14px; }
.pill-btn, .ghost-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 15px; cursor: pointer; border: 0;
}
.pill-btn { background: var(--amber); color: #1B1405; }
.pill-btn:hover { background: #F0B952; }
.ghost-btn { background: transparent; color: #fff; border: 1px solid #3A5654; }
.ghost-btn:hover { background: #16292A; }
.ghost-btn.dark { color: var(--teal-dark); border-color: var(--line); }
.big { min-height: 52px; padding: 12px 24px; font-size: 16px; }
.eyebrow { color: var(--amber); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 6px; }

.hero { background: radial-gradient(1200px 500px at 10% -10%, #1E5E59 0%, transparent 60%), var(--night); }
.hero-in { max-width: 1240px; margin: 0 auto; padding: 56px 24px 40px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); color: #fff; margin-bottom: 14px; }
.hero .lead { font-size: 18px; max-width: 620px; color: #D5E4E1; margin: 0 0 22px; }
.hero .fine { font-size: 13px; color: #8AA19E; margin-top: 18px; max-width: 620px; }

.shelves { max-width: 1240px; padding-top: 8px; }
.shelf { margin: 28px 0 40px; }
.shelf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.shelf-head h2 { color: #fff; font-size: 26px; margin: 0 0 4px; }
.shelf-head p { margin: 0; }
.count { color: #9DB3B0; font-size: 13px; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px 16px; }
.ep { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ep:focus-visible .cover { outline: 3px solid var(--amber); outline-offset: 2px; }
.cover {
  position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden;
  background-image: linear-gradient(160deg, rgba(255,255,255,.08), rgba(0,0,0,.35));
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.ep:hover .cover img { transform: scale(1.04); }
.tag {
  position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff;
}
.tag.free { background: var(--amber); color: #1B1405; }
.ep-no { color: var(--amber); font-size: 12px; font-weight: 700; letter-spacing: .08em; margin-top: 6px; }
.ep-title { color: #fff; font-weight: 700; line-height: 1.3; }
.ep-sum {
  color: #9DB3B0; font-size: 13px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.band { background: #102324; border-top: 1px solid #1E3534; }
.band.light { background: var(--bg); color: var(--text); }
.band.light h2 { color: var(--night); }
.band.light p { color: var(--muted); }
.band-in {
  max-width: 1240px; margin: 0 auto; padding: 40px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.band h2 { color: #fff; font-size: 26px; }
.band p { max-width: 560px; margin: 0; }
.stores { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; min-width: 150px; min-height: 52px;
  padding: 6px 18px; border-radius: 12px; background: #000; color: #fff; text-decoration: none; border: 1px solid #3A5654;
}
.store small { font-size: 11px; color: #BFD3D0; }
.store b { font-size: 17px; }
.store.soon { opacity: .55; }

.modal { position: fixed; inset: 0; background: rgba(4, 10, 10, .78); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.modal[hidden] { display: none; }
.modal-box {
  position: relative; background: #fff; color: var(--text); border-radius: 20px; width: min(920px, 100%);
  max-height: calc(100vh - 32px); overflow: auto; padding: 22px;
}
.close { position: absolute; right: 10px; top: 8px; background: transparent; color: var(--muted); font-size: 30px; min-height: 40px; padding: 0 10px; z-index: 1; }
.close:hover { background: transparent; color: var(--text); }
.m-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 24px; align-items: start; }
.m-media iframe, .m-media .cover.big { width: 100%; aspect-ratio: 9 / 16; border: 0; border-radius: 14px; background: #000; display: block; }
.lock { position: absolute; inset: auto 0 0 0; padding: 14px; text-align: center; color: #fff; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.m-text h2 { font-size: 28px; color: var(--night); }
.m-text .share { margin-top: 12px; min-height: 40px; }

@media (max-width: 720px) {
  .home-nav .link { display: none; }
  .hero-in { padding: 36px 16px 28px; }
  .hero .lead { font-size: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .shelf-head h2 { font-size: 22px; }
  .band-in { padding: 32px 16px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-box { border-radius: 20px 20px 0 0; max-height: 92vh; padding: 16px; }
  .m-grid { grid-template-columns: 1fr; gap: 14px; }
  .m-media iframe, .m-media .cover.big { max-height: 62vh; width: auto; margin: 0 auto; }
}

/* pricing (public page) */
.pricing { background: #102324; border-top: 1px solid #1E3534; }
.band-in.col { flex-direction: column; align-items: stretch; }
.pricing h2 { color: #fff; font-size: 28px; }
.pricing h2.sub { font-size: 22px; margin-top: 18px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan { position: relative; background: #0D1A1B; border: 1px solid #26403F; border-radius: 16px; padding: 18px; }
.plan h3 { font-family: "DM Sans", sans-serif; font-size: 15px; color: #D5E4E1; margin: 0 0 6px; }
.plan .price { font-family: "Fraunces", serif; font-size: 32px; color: #fff; margin: 0 0 6px; }
.plan .price small { font-family: "DM Sans", sans-serif; font-size: 14px; color: #9DB3B0; }
.plan .small-price { font-size: 24px; }
.plan p { margin: 0; font-size: 14px; }
.plan.best { border-color: var(--amber); }
.flag { position: absolute; top: -11px; right: 14px; background: var(--amber); color: #1B1405; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.plan.cta { display: flex; flex-direction: column; justify-content: center; gap: 12px; background: transparent; border-style: dashed; }
.plan.cta p { color: #D5E4E1; }
.views { color: #9DB3B0; font-size: 12px; }

/* share panel */
.share-panel { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-panel a, .share-panel button {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
}
.share-panel a:hover, .share-panel button:hover { background: #EAF3F1; }
.share-panel[hidden] { display: none; }

@media (max-width: 900px) { .plans { grid-template-columns: repeat(2, 1fr); } }
.ghost-btn.dark:hover { background: #EAF3F1; }
.plan .price { white-space: nowrap; }
@media (max-width: 720px) { .plan .price { font-size: 26px; } .plan .price small { font-size: 12px; } }
.pricing[hidden] { display: none; }
.pricing .spread { align-items: flex-start; }
.pricing .hide-prices { min-height: 40px; }
