:root {
  --bg: #f6f8fb;
  --ink: #17202a;
  --muted: #5c6775;
  --line: #dce3ea;
  --panel: #ffffff;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #b45309;
  --danger: #b42318;
  --ok: #14713d;
  --shadow: 0 14px 32px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100%;
  margin: 0;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  padding: 0 14px;
  font-weight: 700;
}

button:hover {
  background: var(--brand-dark);
}

button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

button.secondary:hover {
  border-color: #b9c5cf;
  background: #f9fbfc;
}

button.danger {
  background: var(--danger);
}

button.ghost {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

button.ghost:hover {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 251, 0.92);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero-band {
  display: grid;
  gap: 16px;
  padding: 24px 0 18px;
}

.hero-band h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(31px, 5vw, 54px);
  line-height: 1.02;
}

.hero-band p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.panel,
.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.item {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfd;
  color: var(--muted);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.pill.ok {
  border-color: #b9dfcb;
  background: #edf8f2;
  color: var(--ok);
}

.pill.warn {
  border-color: #f1d4a4;
  background: #fff8e8;
  color: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.tabs button {
  white-space: nowrap;
}

.tabs button[aria-selected="true"] {
  background: var(--brand);
  color: #fff;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebf0;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: linear-gradient(90deg, var(--brand), #2563eb);
}

.video-wrap {
  overflow: hidden;
  border-radius: 8px;
  background: #0b1016;
}

video {
  display: block;
  width: 100%;
  max-height: min(72vh, 720px);
  background: #0b1016;
  aspect-ratio: 16 / 9;
}

.watch-copy {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.watch-copy h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
}

.watch-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment {
  border-left: 3px solid var(--line);
  background: #fff;
  padding: 10px 12px;
}

.comment.reply {
  margin-left: 22px;
  border-left-color: var(--brand);
  background: #f4fbf9;
}

.comment strong {
  display: inline-flex;
  margin-right: 8px;
}

.comment p {
  margin: 6px 0 0;
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
}

.empty,
.notice {
  border: 1px dashed #c6d0d9;
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.notice {
  border-style: solid;
  background: #fff8e8;
  color: var(--accent);
  text-align: left;
}

.login-box {
  width: min(430px, 100%);
  margin: 64px auto;
}

.login-box h1 {
  margin-top: 0;
}

.share-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

@media (max-width: 850px) {
  .layout,
  .two {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .share-input {
    grid-template-columns: 1fr;
  }
}
