:root {
  color-scheme: light;
  --ink: #18211d;
  --muted: #667169;
  --line: #d8dfd8;
  --paper: #f4f1ea;
  --panel: #fffdf8;
  --forest: #193b36;
  --leaf: #3d745f;
  --sun: #f2b84b;
  --rust: #bf6042;
  --sky: #dcecf0;
  --shadow: 0 18px 42px rgba(24, 33, 29, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: break-word;
  font-family:
    Inter, Pretendard, "Noto Sans KR", "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  min-height: 44px;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

.app-shell > * { min-width: 0; }

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #f0f6fa;
  color: #1b3550;
}

.brand {
  display: block;
  flex-shrink: 0;
  width: 100%;
  height: 176px;
  overflow: hidden;
  background: transparent;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.member-card small {
  margin-top: 3px;
  color: #52687b;
}

.nav-list {
  display: grid;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  gap: 8px;
}

.nav-list a {
  border-radius: 8px;
  padding: 12px 14px;
  color: #355269;
  text-decoration: none;
}

.nav-list a.active,
.nav-list a:hover {
  background: #dcebf6;
  color: #163d5a;
}

.member-card {
  flex-shrink: 0;
  margin-top: auto;
  border: 1px solid #cadce8;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 5px;
  background: #e5eff6;
}

.member-card span {
  color: #486378;
  font-size: 13px;
}

.rail-button {
  margin-top: 8px;
  border: 1px solid #b7cedf;
  border-radius: 8px;
  background: #d7e8f4;
  color: #153a55;
  font-weight: 900;
}

main {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.hero {
  min-height: 520px;
  border-radius: 8px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 24px;
  background:
    linear-gradient(90deg, rgba(14, 31, 29, 0.88), rgba(14, 31, 29, 0.42) 58%, rgba(14, 31, 29, 0.14)),
    url("./assets/afterwork-limo-camp-hero.png") center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.hero-copy {
  max-width: 760px;
}

.hero-title {
  font-size: 36px;
  line-height: 1.25;
}

.hero-title span {
  display: block;
  white-space: nowrap;
}

.hero-title span:last-child {
  margin-top: 4px;
  font-size: 0.9em;
  color: #ffe0a0;
  font-weight: 700;
}

@media (min-width: 1021px) and (max-width: 1200px) {
  .hero { grid-template-columns: minmax(0, 1fr) 300px; }
  .hero-title { font-size: 28px; }
}

@media (max-width: 760px) {
  .hero-title { font-size: 26px; }
}

@media (max-width: 360px) {
  .hero-title { font-size: 24px; }
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--sun);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: 48px;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.58;
}

.hero-actions,
.integration-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions button,
.integration-actions button {
  min-width: 150px;
  padding: 0 16px;
}

.ghost-button.light {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.phone-preview {
  justify-self: end;
  width: min(100%, 320px);
}

.phone-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border: 10px solid #111917;
  border-radius: 34px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 20, 18, 0.16), rgba(10, 20, 18, 0.76)),
    url("./assets/afterwork-limo-camp-hero.png") center / cover no-repeat;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
}

.phone-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-fallback {
  position: absolute;
  inset: auto 14px 14px;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 9px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
}

.video-fallback span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.video-fallback strong {
  line-height: 1.38;
}

.video-fallback button {
  border: 0;
  border-radius: 8px;
  background: var(--forest);
  color: #fff;
  font-weight: 900;
}

.finder-card,
.panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.finder-card {
  padding: 18px;
  display: grid;
  gap: 14px;
  color: var(--ink);
  backdrop-filter: blur(12px);
}

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

.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
  gap: 14px;
}

.inline-finder {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.consent-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.42;
}

.consent-row input {
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--leaf);
}

.integration-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.integration-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.integration-card strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
  line-height: 1.25;
}

.integration-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.58;
}

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

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

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button,
.bottom-bar button {
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.primary-button {
  background: var(--sun);
  color: #1b231d;
}

a.primary-button,
a.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
  text-align: center;
  overflow-wrap: anywhere;
}

#kakao .console-grid {
  margin-top: 18px;
}

.ghost-button,
.bottom-bar button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--forest);
}

.icon-button {
  width: 44px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--forest);
  font-size: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.summary-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.summary-grid span,
.channel-card span,
.timeline span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.content-panel,
.panel {
  padding: 20px;
}

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

.section-head.compact {
  margin-bottom: 12px;
}

.channel-list {
  display: grid;
  gap: 12px;
}

.channel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  background: #fff;
}

.channel-card.best {
  border-color: rgba(61, 116, 95, 0.55);
  box-shadow: inset 4px 0 0 var(--leaf);
}

.channel-card h3 {
  margin-bottom: 7px;
  font-size: 20px;
}

.channel-card p {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.channel-meta,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill,
.tags span,
.score-badge {
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--sky);
  color: var(--forest);
  font-size: 12px;
  font-weight: 900;
}

.score-badge {
  min-width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  align-content: center;
  background: var(--forest);
  color: #fff;
}

.score-badge strong {
  font-size: 24px;
}

.score-badge button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--sun);
  color: #1b231d;
  font-size: 12px;
  font-weight: 900;
}

.score-badge button:disabled {
  cursor: default;
  background: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.74);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.create-form {
  display: grid;
  gap: 12px;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--leaf);
}

.timeline {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 13px;
}

.timeline li {
  padding-left: 4px;
}

.timeline strong {
  display: block;
  margin-bottom: 4px;
}

.timeline p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.capability-grid,
.console-grid,
.admin-metrics {
  display: grid;
  gap: 12px;
}

.capability-grid {
  grid-template-columns: repeat(3, 1fr);
}

.console-grid,
.admin-metrics {
  grid-template-columns: repeat(4, 1fr);
}

.capability-grid article,
.console-grid article,
.admin-metrics article,
.ledger-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.capability-grid span,
.console-grid span,
.admin-metrics span,
.ledger-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.capability-grid strong,
.console-grid strong,
.admin-metrics strong,
.ledger-list strong {
  display: block;
  margin: 7px 0;
  line-height: 1.34;
}

.capability-grid p,
.console-grid p,
.ledger-list p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.52;
}

.ledger-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.membership-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.membership-grid article.featured {
  border-color: rgba(191, 96, 66, 0.5);
  box-shadow: inset 0 4px 0 var(--rust);
}

.membership-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.membership-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
}

.membership-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.52;
}

.bottom-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  width: min(560px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(32, 56, 47, 0.16);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 40px));
  border-radius: 8px;
  padding: 13px 15px;
  background: var(--forest);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(90px);
  transition: 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.channel-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 130px; }
.channel-actions button { padding: 10px 14px; }
button:disabled { cursor: default; opacity: 0.6; }
.toast { z-index: 30; }
#authStatus { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }
@media (max-width: 760px) {
  .channel-actions { flex-direction: row; flex-wrap: wrap; }
  .channel-actions button { flex: 1; }
  .phone-preview { display: none; }
  .hero { min-height: 370px; }
  .member-card { padding: 10px 12px; }
}

.story-dialog {
  width: min(620px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.story-dialog::backdrop {
  background: rgba(11, 20, 18, 0.48);
}

.story-dialog form {
  display: flex;
  justify-content: flex-end;
}

.close-button {
  min-height: 38px;
  width: 38px;
}

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

  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-list {
    display: flex;
    flex: 0 0 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .nav-list a { flex: 0 0 auto; white-space: nowrap; }

  .member-card {
    margin-top: 0;
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .phone-preview {
    justify-self: start;
  }

  .finder-card {
    max-width: 520px;
  }

  .inline-finder,
  .login-grid,
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  main {
    padding: 12px 12px 88px;
  }

  .rail {
    padding: 12px;
    gap: 12px;
  }

  .brand {
    width: 180px;
    height: 150px;
  }

  .nav-list {
    width: 100%;
  }

  .member-card {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 18px;
    background:
      linear-gradient(180deg, rgba(17, 28, 24, 0.82), rgba(17, 28, 24, 0.48)),
      url("./assets/afterwork-limo-camp-hero.png") center / cover no-repeat;
  }

  h1 {
    font-size: 42px;
  }

  .hero-copy p:last-child {
    font-size: 15px;
  }

  .summary-grid,
  .split-section,
  .field-pair,
  .inline-finder,
  .login-grid,
  .membership-grid,
  .capability-grid,
  .console-grid,
  .admin-metrics,
  .ledger-list {
    grid-template-columns: 1fr;
  }

  .channel-card {
    grid-template-columns: 1fr;
  }

  .score-badge {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 62px;
    grid-auto-flow: column;
    justify-content: center;
    gap: 8px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head.compact {
    flex-direction: row;
    align-items: center;
  }
}
