:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  color: #182c27;
  background: #f7faf8;
  --accent: #176453;
  --muted: #4b6259;
  --line: #d8e5df;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
button { font: inherit; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #15765e; outline-offset: 3px; }
.shell { width: min(100% - 2rem, 71rem); margin-inline: auto; }

.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { font-weight: 800; color: inherit; text-decoration: none; }
.language {
  color: var(--accent);
  font-size: .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .45rem .85rem;
  text-decoration: none;
}

main { min-height: 65vh; }
.intro { padding: clamp(2.25rem, 7vw, 5.25rem) 0 1.75rem; }
h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.65rem); line-height: 1.15; letter-spacing: -.025em; }
.intro p { color: var(--muted); margin: .85rem 0 0; }
.tabs { display: flex; flex-wrap: wrap; gap: .55rem; padding: .4rem 0 1rem; }
.tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .55rem .85rem;
  color: #29483e;
  background: #fff;
  cursor: pointer;
  font-weight: 650;
  font-size: .9rem;
}
.tabs button[aria-selected="true"] {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}
.count {
  display: inline-block;
  min-width: 1.45em;
  color: inherit;
  background: #86bfad35;
  border-radius: 999px;
  padding: .02rem .3rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.status { border-top: 1px solid var(--line); color: var(--muted); margin: 0; padding: 1rem 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.cards:empty { display: none; }
.card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: .8rem;
  overflow: hidden;
  color: inherit;
  text-align: start;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.card:hover { border-color: #6e9d8d; }
.thumbnail {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e2ede7;
  color: var(--muted);
}
.thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.placeholder { font-size: .88rem; }
.card-info { display: grid; gap: .3rem; padding: .9rem 1rem 1rem; overflow-wrap: anywhere; }
.card-title { font-weight: 750; }
.channel, .viewers { color: var(--muted); font-size: .88rem; }
.viewers { color: var(--accent); font-variant-numeric: tabular-nums; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin-top: 2.5rem;
  padding: 1.15rem 0 2rem;
  font-size: .9rem;
}
.prose { padding-top: 3rem; }
.prose p { max-width: 46rem; }

dialog {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  width: min(52rem, calc(100% - 1rem));
  color: inherit;
}
dialog::backdrop { background: #102520b8; }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-header h2 { margin: 0; line-height: 1.32; overflow-wrap: anywhere; }
.dialog-header button, .watch {
  display: inline-block;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: .55rem;
  padding: .55rem .8rem;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.watch { background: var(--accent); border-color: var(--accent); color: #fff; }
dialog iframe {
  display: block;
  width: 100%;
  border: 0;
  background: #13201c;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  margin-bottom: 1rem;
}
