:root {
  --bg: #f3f6f5;
  --bg-elevated: #ffffff;
  --ink: #14211e;
  --ink-muted: #5a6b66;
  --ink-faint: #8a9a94;
  --teal: #0f766e;
  --teal-deep: #0b5c56;
  --teal-soft: #d8eeea;
  --teal-wash: #eef7f5;
  --amber: #c47a14;
  --amber-soft: #f8ecd8;
  --line: #d5e0dc;
  --line-strong: #b8c9c3;
  --danger-soft: #f8e8e4;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(20, 33, 30, 0.06);
  --font-sans: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-display: "Pretendard", "Noto Sans KR", sans-serif;
  --sidebar-w: 280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dff3ef 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #f6e8cf 0%, transparent 45%),
    linear-gradient(180deg, #f7faf8 0%, var(--bg) 40%, #eef3f1 100%);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* —— Sidebar —— */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  overflow: auto;
}

.brand {
  padding: 4px 10px 22px;
}

.brand-kicker {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--teal);
  font-weight: 700;
}

.brand-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.brand-sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
}

.room-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 8px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-group-title {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.room-nav-btn {
  text-align: left;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.room-nav-btn:hover {
  background: var(--teal-wash);
}

.room-nav-btn.active {
  background: var(--bg-elevated);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.room-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  margin-bottom: 6px;
}

.room-type.공지방 {
  background: var(--amber-soft);
  color: #8a5608;
}

.room-type.시크릿방 {
  background: #e8eef8;
  color: #35507a;
}

.room-type.프반 {
  background: #e7f2ea;
  color: #2f6b45;
}

.room-nav-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.room-nav-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-faint);
}

.sidebar-note {
  margin-top: 28px;
  padding: 14px;
  border-radius: 12px;
  background: var(--teal-wash);
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
}

/* —— Main —— */
.main {
  padding: 28px 36px 64px;
  max-width: 980px;
}

.loading,
.error {
  padding: 40px 8px;
  color: var(--ink-muted);
}

.room-header {
  margin-bottom: 18px;
}

.room-header h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.04em;
  font-weight: 800;
  line-height: 1.2;
}

.room-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 14px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

/* —— Latest strip —— */
.strip {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(196, 122, 20, 0.08)),
    var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.strip-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.strip-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--teal);
}

.strip-day {
  font-size: 13px;
  color: var(--ink-muted);
}

.strip-headline {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.strip-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
}

.strip-card h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--ink-faint);
  font-weight: 700;
}

.strip-card p,
.strip-card .name {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.strip-card .name {
  font-weight: 700;
}

.strip-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.strip-links a {
  color: var(--teal-deep);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.strip-links a:hover {
  text-decoration: underline;
}

.strip-actions {
  display: flex;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--teal-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--teal-deep);
  border: 1px solid var(--line-strong);
}

/* —— Tabs —— */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
}

.tab {
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-muted);
}

.tab.active {
  background: var(--ink);
  color: #fff;
}

.panel[hidden] {
  display: none !important;
}

/* —— Day accordion —— */
.day-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.day.open {
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.day-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  text-align: left;
}

.day-arrow {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--teal-wash);
  color: var(--teal-deep);
  transition: transform 0.2s ease;
}

.day.open .day-arrow {
  transform: rotate(180deg);
}

.day-date {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.day-preview {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.day-badge {
  font-size: 12px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.day-body {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.day.open .day-body {
  display: block;
  animation: rise 0.25s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section-block {
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}

.section-block:last-child {
  border-bottom: 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--teal-deep);
  letter-spacing: -0.01em;
}

.section-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
}

.muted {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.55;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--teal-wash);
  border: 1px solid transparent;
}

.item-card.amber {
  background: var(--amber-soft);
}

.item-card .who {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--teal-deep);
  border: 1px solid var(--line);
}

.badge.staff {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.badge.mvp {
  background: var(--amber);
  color: #fff;
  border-color: var(--amber);
}

.item-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

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

.participant {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  min-width: 140px;
}

.participant strong {
  font-size: 13px;
}

.qa-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.qa-q {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  text-align: left;
}

.q-mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--amber);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.qa-q-text {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.45;
}

.qa-count {
  color: var(--ink-faint);
  font-size: 12px;
  white-space: nowrap;
}

.qa-a {
  display: none;
  padding: 0 14px 14px 46px;
  gap: 8px;
  flex-direction: column;
}

.qa-item.open .qa-a {
  display: flex;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--teal-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.link-list a span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-weight: 500;
  font-size: 12px;
}

.footer-ref {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f0f2f1;
  border: 1px dashed var(--line-strong);
}

.footer-ref summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
}

.footer-ref ol {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink-muted);
  font-size: 13px;
}

.footer-ref .hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-faint);
}

/* —— Global panels —— */
.card-grid {
  display: grid;
  gap: 10px;
}

.notice-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.notice-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.notice-meta {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.notice-card p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.instructor-day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}

.instructor-day > button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 700;
}

.instructor-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.instructor-day.open .instructor-body {
  display: block;
}

.msg {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  line-height: 1.5;
}

.msg:last-child {
  border-bottom: 0;
}

.msg .meta {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.data-note {
  margin-top: 28px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.55;
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main {
    padding: 20px 16px 48px;
  }

  .strip-grid {
    grid-template-columns: 1fr;
  }

  .day-head {
    grid-template-columns: auto 1fr;
  }

  .day-badge {
    display: none;
  }
}
