:root {
  --ink: #0c1712;
  --ink-soft: #314139;
  --muted: #718078;
  --line: #dbe3dc;
  --paper: #f4f6f2;
  --card: #ffffff;
  --green: #2a6d4e;
  --green-2: #3f8c65;
  --lime: #c5f46b;
  --mint: #e3f3e7;
  --warm: #f3ead4;
  --danger: #b33b45;
  --shadow: 0 16px 42px rgba(15, 36, 26, 0.1);
  --radius: 18px;
  --font: "Aptos", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

/* Editorial club dossier redesign */

:root {
  --ink: #11140f;
  --ink-soft: #30352d;
  --muted: #72766c;
  --line: #cbc9bd;
  --paper: #eeede6;
  --card: #f8f7f2;
  --green: #204b36;
  --green-2: #37664d;
  --lime: #e3c85f;
  --mint: #dce5d5;
  --warm: #e6ddc3;
  --danger: #9b3b36;
  --shadow: none;
  --radius: 4px;
  --font: "Aptos", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
  --display: "Georgia", "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
}

html,
body {
  background: var(--paper);
}

body {
  color: var(--ink);
  font-family: var(--font);
}

button,
input,
select,
textarea {
  letter-spacing: 0.005em;
}

.eyebrow {
  color: #6d7167;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.primary-button,
.secondary-button,
.hero-action,
.quick-checkin {
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.primary-button {
  color: #f7f5eb;
  background: var(--ink);
  box-shadow: none;
}

.primary-button:hover {
  color: var(--ink);
  background: var(--lime);
  box-shadow: none;
}

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

.secondary-button:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
}

.text-button {
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.field {
  gap: 6px;
}

.field > span,
.scope-fieldset legend {
  color: #55594f;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea,
.conversation-search input,
.feed-tools select,
.feed-search input {
  border-color: #c8c6ba;
  border-radius: 2px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.56);
}

.field input,
.field select,
.conversation-search input,
.feed-tools select,
.feed-search input {
  height: 45px;
}

.field textarea {
  min-height: 108px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.conversation-search input:focus,
.feed-tools select:focus,
.feed-search input:focus {
  border-color: var(--green);
  background: #fffef9;
  box-shadow: 0 0 0 1px var(--green);
}

.auth-shell {
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 0.75fr);
  background: var(--paper);
}

.auth-scene {
  padding: clamp(34px, 5vw, 64px);
  overflow: hidden;
  color: #f0eee3;
  background:
    linear-gradient(104deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 96px),
    #17251d;
}

.auth-scene::before {
  content: "ZHILI";
  position: absolute;
  left: -0.04em;
  bottom: -0.18em;
  color: rgba(244, 242, 231, 0.035);
  font-family: var(--display);
  font-size: clamp(140px, 24vw, 360px);
  font-weight: 800;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.auth-scene::after {
  content: "30";
  position: absolute;
  right: 4.5%;
  top: 12%;
  color: var(--lime);
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 88px);
  line-height: 1;
}

.auth-pitch-lines {
  width: min(54vw, 760px);
  right: -22%;
  bottom: -30%;
  border-color: rgba(227, 200, 95, 0.14);
  border-radius: 0;
  transform: rotate(0deg);
}

.auth-pitch-lines::before {
  border-radius: 0;
}

.auth-pitch-lines::after {
  border-radius: 50%;
}

.brand-ball {
  border-radius: 1px;
  color: #171b14;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: none;
}

.auth-brand {
  align-items: flex-start;
}

.auth-brand span:not(.brand-ball) {
  color: #9b9f92;
  letter-spacing: 0.05em;
}

.auth-brand strong {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0;
}

.auth-copy {
  max-width: 850px;
}

.auth-copy .eyebrow {
  color: #b7b4a4;
}

.auth-copy h1 {
  max-width: 760px;
  margin: 21px 0 27px;
  font-family: var(--display);
  font-size: clamp(48px, 6.3vw, 90px);
  font-weight: 700;
  line-height: 0.97;
  letter-spacing: -0.055em;
}

.auth-copy > p {
  max-width: 570px;
  color: #afb2a5;
  font-size: 13px;
  line-height: 1.85;
}

.taxonomy-strip {
  max-width: 720px;
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(239, 237, 224, 0.25);
  border-bottom: 1px solid rgba(239, 237, 224, 0.25);
}

.taxonomy-strip span {
  min-width: 0;
  padding: 16px 12px 15px 0;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 12px;
  color: #e6e3d8;
  background: transparent;
  font-size: 13px;
}

.taxonomy-strip span + span {
  padding-left: 14px;
  border-left: 1px solid rgba(239, 237, 224, 0.16);
}

.taxonomy-strip b {
  margin: 0;
  color: var(--lime);
  font-family: var(--font);
  font-size: 8px;
}

.auth-footnote {
  color: #898f82;
}

.auth-panel {
  padding: clamp(32px, 5vw, 66px);
  align-items: start;
  background:
    linear-gradient(90deg, rgba(17, 20, 15, 0.06) 1px, transparent 1px) 0 0 / 72px 100%,
    var(--paper);
}

.auth-panel-inner {
  margin-top: clamp(20px, 8vh, 90px);
}

.auth-heading {
  margin-bottom: 27px;
}

.auth-heading h2 {
  margin: 11px 0 9px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.auth-heading p {
  max-width: 430px;
  color: #6b7065;
  font-size: 12px;
}

.auth-tabs {
  margin-bottom: 24px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #bbb9ad;
  border-radius: 0;
  gap: 24px;
  background: transparent;
}

.auth-tabs button {
  height: 43px;
  padding: 0 0 3px;
  border-radius: 0;
  position: relative;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
}

.auth-tabs button.active {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.auth-tabs button.active::after {
  content: "";
  height: 2px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  background: var(--ink);
}

.auth-form {
  gap: 15px;
}

.auth-submit {
  min-height: 52px;
  justify-content: space-between;
  padding: 0 17px;
}

.auth-submit svg {
  color: var(--lime);
}

.auth-submit:hover svg {
  color: var(--ink);
}

/* Application */

.app-shell {
  grid-template-columns: 196px minmax(0, 1fr);
  background: var(--paper);
}

.sidebar {
  padding: 25px 16px 18px;
  color: #eae8de;
  background: #141712;
  border-right: 0;
}

.side-brand {
  padding: 0 5px;
}

.side-brand .brand-ball {
  width: 39px;
  height: 39px;
}

.side-brand strong {
  font-family: var(--display);
  font-size: 17px;
}

.side-brand small {
  color: #7d8176;
}

.side-nav {
  margin-top: 40px;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.side-nav button {
  min-height: 48px;
  padding: 0 8px;
  border-radius: 0;
  gap: 11px;
  color: #b3b6aa;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
}

.side-nav button:hover {
  color: #f2f0e6;
  background: transparent;
}

.side-nav button:not(.active) .nav-index {
  color: #858a7e;
}

.side-nav button.active {
  color: #171a14;
  background: var(--lime);
  transform: translateX(7px);
}

.nav-index {
  color: #676c60;
  font-size: 7px;
}

.side-nav button.active .nav-index {
  color: #606241;
}

.nav-count {
  border-radius: 1px;
  background: #a44942;
}

.sidebar-note {
  margin: auto 5px 19px;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0;
  background: transparent;
}

.sidebar-note span {
  color: var(--lime);
}

.sidebar-note p {
  color: #777b70;
  line-height: 1.65;
}

.side-user {
  padding: 14px 5px 0;
}

.side-avatar {
  border-radius: 1px;
  color: #161a13;
  background: var(--lime);
  border-color: var(--lime);
}

.topbar {
  height: 67px;
  padding: 0 clamp(22px, 3.7vw, 50px);
  border-bottom: 1px solid #c9c7bc;
  background: rgba(238, 237, 230, 0.94);
}

.page-context span {
  color: #74786d;
}

.page-context strong {
  font-size: 13px;
  letter-spacing: 0.03em;
}

.quick-checkin {
  min-height: 36px;
  color: #f1efe5;
  background: var(--ink);
}

.quick-checkin:hover {
  color: var(--ink);
  background: var(--lime);
}

.connection-state {
  color: #74786d;
}

.page-stack {
  padding: clamp(24px, 3.2vw, 44px);
}

.app-page {
  max-width: 1270px;
}

.lobby-hero {
  min-height: 252px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 2px;
  color: #f5f2e8;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 68px 100%,
    linear-gradient(115deg, #204a35, #183929 70%);
  box-shadow: none;
}

.lobby-hero::before {
  content: "TRAIN / THINK / COMPETE";
  position: absolute;
  left: clamp(28px, 4vw, 48px);
  top: 24px;
  color: rgba(245, 242, 232, 0.44);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.lobby-hero::after {
  content: "致理";
  width: auto;
  height: auto;
  right: 3.7%;
  top: 6%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: rgba(245, 242, 232, 0.07);
  font-family: var(--display);
  font-size: clamp(110px, 15vw, 190px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.12em;
}

.lobby-hero .eyebrow {
  color: #aab7ab;
}

.lobby-hero h1 {
  margin: 13px 0 11px;
  font-family: var(--display);
  font-size: clamp(40px, 4.8vw, 62px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.lobby-hero p {
  color: #b9c5b8;
  font-size: 12px;
}

.hero-action {
  min-width: 137px;
  color: #181b14;
  background: var(--lime);
}

.stat-grid {
  margin-top: 15px;
  border: 1px solid #c9c7bc;
  gap: 0;
  background: #f7f6f0;
}

.stat-card {
  min-height: 104px;
  padding: 18px 20px;
  border: 0;
  border-right: 1px solid #d2d0c4;
  border-radius: 0;
  background: transparent;
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card span {
  color: #73776d;
}

.stat-card strong {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
}

.stat-card small {
  color: #898d82;
}

.stat-card.accent {
  color: #f5f1e7;
  background: var(--ink);
}

.stat-card.accent span,
.stat-card.accent small {
  color: #c6c9bc;
}

.content-section {
  margin-top: 38px;
}

.section-title-row {
  padding-bottom: 11px;
  border-bottom: 1px solid #c6c4b9;
}

.section-title-row h2 {
  margin-top: 7px;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.task-preview-grid {
  gap: 10px;
}

.task-preview-grid > .empty-card:only-child {
  min-height: 116px;
  grid-column: 1 / -1;
}

.task-preview-card {
  min-height: 143px;
  padding: 17px;
  border: 1px solid #c9c7bc;
  border-top: 3px solid var(--green);
  border-radius: 1px;
  background: #f9f8f3;
}

.task-preview-card header span {
  color: var(--green);
  letter-spacing: 0.11em;
}

.task-preview-card h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}

.progress-line {
  height: 3px;
  border-radius: 0;
  background: #d9d7cb;
}

.progress-line i {
  border-radius: 0;
  background: var(--green);
}

.empty-card {
  border: 1px solid #c9c7bc;
  border-radius: 1px;
  color: #7b7f75;
  background: transparent;
}

.skeleton-card {
  border-radius: 1px;
  border-color: #c9c7bc;
}

.feed-tools {
  gap: 6px;
}

.feed-tools select,
.feed-search input {
  border-radius: 0;
  border-color: #c1bfb4;
  background: rgba(255, 255, 255, 0.38);
}

.feed-list {
  gap: 0;
  border-top: 1px solid #c9c7bc;
}

.feed-card {
  padding: 22px 16px 21px;
  border: 0;
  border-bottom: 1px solid #c9c7bc;
  border-left: 3px solid transparent;
  border-radius: 0;
  display: grid;
  gap: 11px;
  background: transparent;
  transition: background 150ms ease, border-color 150ms ease, padding 150ms ease;
}

.feed-card:hover {
  border-color: #c9c7bc;
  border-left-color: var(--green);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  transform: none;
}

.feed-card.is-draft {
  background: #f5f0e1;
}

.feed-avatar {
  width: 35px;
  height: 35px;
  border-radius: 1px;
  color: #f2f0e7;
  background: var(--green);
}

.feed-author-copy strong {
  font-size: 11px;
  letter-spacing: 0.02em;
}

.feed-author-copy small {
  color: #81857a;
}

.category-badge,
.draft-badge {
  border-radius: 1px;
  letter-spacing: 0.06em;
}

.category-badge {
  color: #234b36;
  background: #dfe6d7;
}

.category-badge.iq {
  color: #654b17;
  background: #eadfba;
}

.feed-card h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}

.feed-card > p {
  max-width: 900px;
  color: #5c6157;
  font-size: 11px;
}

.feed-card-foot {
  color: #7b7f74;
}

.feed-video-label {
  color: var(--green);
  letter-spacing: 0.03em;
}

.page-heading {
  padding-bottom: 20px;
  border-bottom: 1px solid #c9c7bc;
}

.page-heading h1 {
  font-family: var(--display);
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 700;
}

.form-card {
  padding: clamp(20px, 2.7vw, 29px);
  border-color: #c9c7bc;
  border-radius: 1px;
  background: #f8f7f2;
}

.form-card-heading {
  padding-bottom: 13px;
  border-bottom: 1px solid #d6d4c9;
}

.step-badge {
  border: 1px solid #bfc0b5;
  border-radius: 1px;
  color: #4d544a;
  background: transparent;
}

.form-card-heading h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}

.metric-hint {
  border-left: 2px solid var(--green);
  color: #5d665c;
  background: #ecece3;
}

.upload-field {
  border: 1px solid #c4c3b8;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.goal-card {
  border-color: #cfcdc2;
  border-radius: 1px;
  background: #f1f0e9;
}

.aside-card {
  border-color: #c9c7bc;
  border-radius: 1px;
  background: #f8f7f2;
}

.aside-card.warm {
  border-color: #c7b987;
  background: #e7dfc4;
}

.check-list li {
  color: #6e7268;
}

.check-list li.complete {
  color: var(--green);
}

.checkin-aside {
  top: 85px;
}

/* Tasks, mail, profile and admin */

.task-card,
.admin-task {
  padding: 19px;
  border-color: #c9c7bc;
  border-radius: 1px;
  background: #f8f7f2;
}

.task-card h2 {
  font-family: var(--display);
  font-size: 21px;
}

.task-card-meta span {
  border-radius: 0;
  background: #e7e6de;
}

.task-complete-badge {
  border-radius: 1px;
}

.messages-layout {
  border-color: #c9c7bc;
  border-radius: 1px;
  background: #f8f7f2;
}

.conversation-panel {
  background: #e9e8e0;
}

.conversation-item {
  border-color: #d1cfc3;
}

.conversation-item:hover,
.conversation-item.active {
  background: #f7f6f0;
}

.mini-avatar,
.profile-avatar {
  border-radius: 1px;
  color: #171a14;
  background: var(--lime);
}

.chat-messages {
  background:
    linear-gradient(90deg, rgba(17, 20, 15, 0.04) 1px, transparent 1px) 0 0 / 64px 100%,
    #f8f7f2;
}

.message-bubble {
  border-radius: 1px;
  color: #33382f;
  background: #e5e5dc;
}

.message-bubble.mine {
  border-radius: 1px;
  background: var(--green);
}

.chat-composer textarea {
  border-radius: 1px;
}

.profile-hero {
  border-radius: 1px;
  color: #f4f1e8;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 68px 100%,
    #1e4633;
}

.profile-avatar {
  border-color: rgba(227, 200, 95, 0.6);
}

.profile-identity h1 {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 700;
}

.profile-stats span {
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.16);
}

.profile-stats b {
  font-family: var(--display);
}

.admin-metrics {
  border: 1px solid #c9c7bc;
  gap: 0;
  background: #f8f7f2;
}

.admin-metrics article {
  border: 0;
  border-right: 1px solid #d2d0c4;
  border-radius: 0;
  background: transparent;
}

.admin-metrics article:last-child {
  border-right: 0;
}

.admin-metrics strong {
  font-family: var(--display);
  font-size: 31px;
}

.roster-admin-item {
  border-color: #d1cfc4;
  border-radius: 1px;
  background: #f8f7f2;
}

.roster-admin-item i {
  border-radius: 1px;
}

.roster-admin-item.registered i {
  background: var(--green);
}

.scope-fieldset {
  border-color: #cbc9bd;
  border-radius: 1px;
}

.admin-task header button {
  border-radius: 1px;
}

.progress-player {
  border-radius: 1px;
}

.modal-card {
  border-radius: 2px;
  background: #f8f7f2;
}

.modal-close {
  border-radius: 1px;
  color: var(--ink);
  background: #f8f7f2;
}

.detail-hero {
  color: #f3f0e6;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 62px 100%,
    #1d4532;
}

.detail-hero h1 {
  font-family: var(--display);
  font-size: 34px;
}

.detail-meta-row span {
  border-radius: 1px;
  background: #e7e6de;
}

.video-card {
  border-radius: 1px;
}

.goal-detail {
  border-color: #ceccc1;
  border-radius: 1px;
  background: #f1f0e9;
}

.mobile-nav {
  border-color: #d1cfc4;
  background: rgba(248, 247, 242, 0.97);
}

.mobile-nav button span {
  border-radius: 1px;
}

.mobile-nav button.active span {
  color: #171a14;
  background: var(--lime);
}

@media (max-width: 1100px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) 420px;
  }

  .taxonomy-strip {
    max-width: 560px;
  }

  .auth-copy h1 {
    font-size: clamp(48px, 6vw, 68px);
  }
}

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

  .auth-scene {
    min-height: 390px;
  }

  .auth-copy {
    margin: 66px 0 16px;
  }

  .auth-copy h1 {
    max-width: 600px;
    font-size: 52px;
  }

  .auth-panel {
    padding: 40px 25px 48px;
    background: var(--paper);
  }

  .auth-panel-inner {
    margin-top: 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: min(280px, 84vw);
  }

  .topbar {
    padding: 0 18px;
  }

  .page-stack {
    padding: 20px 18px 88px;
  }
}

@media (max-width: 650px) {
  .auth-scene {
    min-height: 420px;
    padding: 28px 22px;
  }

  .auth-scene::after {
    right: 22px;
    top: 25px;
    font-size: 44px;
  }

  .auth-copy {
    margin-top: 72px;
  }

  .auth-copy h1 {
    font-size: 41px;
    line-height: 1;
  }

  .auth-copy > p {
    font-size: 11px;
  }

  .taxonomy-strip {
    margin-top: 28px;
  }

  .taxonomy-strip span {
    min-width: 0;
    padding: 12px 7px 11px 0;
    gap: 7px;
    font-size: 11px;
  }

  .taxonomy-strip span + span {
    padding-left: 8px;
  }

  .auth-panel {
    padding: 34px 18px 44px;
  }

  .auth-heading h2 {
    font-size: 29px;
  }

  .lobby-hero {
    min-height: 277px;
    padding: 26px 22px;
  }

  .lobby-hero::before {
    left: 22px;
    top: 20px;
  }

  .lobby-hero::after {
    right: 12px;
    top: 16%;
    font-size: 105px;
  }

  .lobby-hero h1 {
    font-size: 31px;
    line-height: 1.14;
  }

  .hero-action {
    margin-top: 12px;
  }

  .topbar-actions {
    gap: 0;
  }

  .quick-checkin {
    width: 38px;
    min-width: 38px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .quick-checkin span {
    font-size: 18px;
  }

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

  .stat-card {
    min-height: 96px;
    border-bottom: 1px solid #d2d0c4;
  }

  .stat-card:nth-child(2n) {
    border-right: 0;
  }

  .stat-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .section-title-row h2 {
    font-size: 24px;
  }

  .feed-card {
    padding: 19px 12px;
  }

  .feed-card h3 {
    font-size: 20px;
  }

  .page-heading h1 {
    font-size: 35px;
  }

  .form-card {
    padding: 19px 16px;
  }

  .admin-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .admin-metrics article {
    border-bottom: 1px solid #d2d0c4;
  }

  .admin-metrics article:nth-child(2n) {
    border-right: 0;
  }

  .admin-metrics article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .modal-card {
    border-radius: 1px 1px 0 0;
  }

  .detail-hero h1 {
    font-size: 30px;
  }
}

@layer legacy {

* {
  box-sizing: border-box;
}

}

/* Light green / simplified */

:root {
  --ink: #102f31;
  --ink-soft: #315356;
  --muted: #6d8586;
  --line: #bfd9d6;
  --paper: #eaf6f4;
  --card: #f9fdfc;
  --green: #1f7068;
  --green-2: #5fac9f;
  --lime: #b7e9df;
  --mint: #d5f1eb;
  --warm: #e5f3f0;
  --danger: #a14343;
  --shadow: 0 8px 24px rgba(44, 85, 61, 0.06);
  --radius: 8px;
}

html,
body {
  background: var(--paper);
}

body {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(27, 102, 96, 0.026) 1px, transparent 1px) 0 0 / 80px 100%,
    var(--paper);
}

.eyebrow {
  color: #668386;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.primary-button,
.secondary-button,
.hero-action,
.quick-checkin {
  border-radius: 8px;
  box-shadow: none;
  font-weight: 700;
  letter-spacing: 0;
}

.primary-button {
  color: #fff;
  background: var(--green);
}

.primary-button:hover {
  color: #0e3031;
  background: #b7e9df;
  box-shadow: none;
}

.secondary-button {
  border-color: #bdd8d5;
  background: rgba(255, 255, 255, 0.5);
}

.secondary-button:hover {
  border-color: var(--green);
  background: #fff;
}

.field input,
.field select,
.field textarea,
.conversation-search input,
.feed-tools select,
.feed-search input {
  border-color: #c4dcda;
  border-radius: 8px;
  background: #fff;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.conversation-search input:focus,
.feed-tools select:focus,
.feed-search input:focus {
  border-color: #59a79e;
  box-shadow: 0 0 0 3px rgba(89, 167, 158, 0.14);
}

/* Auth */

.auth-shell {
  grid-template-columns: minmax(0, 1.16fr) minmax(410px, 0.84fr);
  background: var(--paper);
}

.auth-scene {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(30, 103, 97, 0.055) 1px, transparent 1px) 0 0 / 74px 100%,
    #d6efeb;
}

.auth-scene::before {
  content: "致理";
  left: auto;
  right: -0.05em;
  bottom: -0.1em;
  color: rgba(29, 102, 97, 0.05);
  font-family: var(--display);
  font-size: clamp(150px, 24vw, 340px);
  letter-spacing: -0.12em;
}

.auth-scene::after {
  content: "30";
  right: 5%;
  top: 12%;
  color: #3d948c;
  font-size: clamp(40px, 5vw, 68px);
}

.brand-ball {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.auth-brand span:not(.brand-ball) {
  color: #5d7c80;
}

.auth-brand strong {
  color: var(--ink);
}

.auth-copy .eyebrow {
  color: #628084;
}

.auth-copy h1 {
  max-width: 650px;
  margin-bottom: 22px;
  color: #103638;
  font-size: clamp(46px, 5.6vw, 78px);
}

.auth-copy > p {
  color: #567275;
  font-size: 14px;
}

.taxonomy-strip {
  max-width: 620px;
  margin-top: 35px;
  border-color: rgba(38, 113, 106, 0.24);
}

.taxonomy-strip span {
  color: #28595a;
}

.taxonomy-strip span + span {
  border-color: rgba(38, 113, 106, 0.17);
}

.taxonomy-strip b {
  color: #3f8f88;
}

.auth-footnote {
  color: #678487;
}

.auth-panel {
  background: #f7fcfb;
}

.auth-heading h2 {
  color: var(--ink);
}

.auth-tabs {
  border-color: #c3dad8;
}

.auth-tabs button.active::after {
  background: var(--green);
}

.auth-submit {
  color: #fff;
  background: var(--green);
}

.auth-submit svg {
  color: #d5f1ed;
}

/* App */

.app-shell {
  grid-template-columns: 188px minmax(0, 1fr);
  background: var(--paper);
}

.sidebar {
  color: var(--ink);
  background: #d8ece9;
  border-right: 1px solid #bed8d5;
}

.side-brand strong {
  color: #103538;
}

.side-brand small {
  color: #6f898b;
}

.side-nav {
  border-color: #bad4d2;
}

.side-nav button {
  color: #416466;
  border-color: #c1dad8;
  border-radius: 7px;
}

.side-nav button:hover {
  color: #10383a;
  background: rgba(255, 255, 255, 0.42);
}

.side-nav button.active {
  color: #103538;
  background: #fff;
  box-shadow: inset 3px 0 0 var(--green);
  transform: none;
}

.side-nav button:not(.active) .nav-index,
.nav-index {
  color: #748f91;
}

.side-nav button.active .nav-index {
  color: var(--green);
}

.side-avatar {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.topbar {
  border-color: #c1dbd8;
  background: rgba(245, 252, 250, 0.96);
}

.page-context span {
  color: #728d8f;
}

.quick-checkin {
  color: #fff;
  background: var(--green);
}

.quick-checkin:hover {
  color: #0d3032;
  background: #b7e9df;
}

.page-stack {
  padding: clamp(22px, 3vw, 40px);
}

.lobby-hero {
  min-height: 224px;
  color: var(--ink);
  border: 1px solid #bcd9d5;
  border-radius: 10px;
  background: #d4eee9;
  box-shadow: none;
}

.lobby-hero::before {
  display: none;
}

.lobby-hero::after {
  content: "致理";
  color: rgba(26, 105, 98, 0.065);
  font-size: clamp(100px, 14vw, 170px);
}

.lobby-hero .eyebrow {
  color: #628186;
}

.lobby-hero h1 {
  color: #0f383a;
  font-size: clamp(36px, 4.4vw, 54px);
}

.lobby-hero p {
  color: #527377;
}

.hero-action {
  color: #fff;
  background: var(--green);
}

.stat-grid {
  border-color: #c1dbd8;
  border-radius: 9px;
  overflow: hidden;
  background: #f9fdfc;
}

.stat-card {
  border-color: #d0e3e1;
}

.stat-card.accent {
  color: #103638;
  background: #d1eee9;
}

.stat-card.accent span,
.stat-card.accent small {
  color: #5f8083;
}

.stat-card strong {
  color: #174a4d;
}

.content-section {
  margin-top: 32px;
}

.section-title-row {
  border-color: #c1dbd8;
}

.section-title-row h2 {
  color: #123c3e;
  font-size: 24px;
}

.task-preview-card {
  border-color: #c4dcda;
  border-top-color: #64a9a0;
  border-radius: 8px;
  background: #f9fdfc;
}

.task-preview-card h3,
.feed-card h3,
.page-heading h1,
.form-card-heading h2 {
  color: #11393b;
}

.progress-line {
  background: #d9eae8;
}

.progress-line i {
  background: #5aa49b;
}

.empty-card {
  border-color: #c1dbd8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
}

.feed-tools select,
.feed-search input {
  border-color: #c1dbd8;
  background: #f9fdfc;
}

.feed-list {
  border-color: #c1dbd8;
}

.feed-card {
  border-bottom-color: #c1dbd8;
  background: transparent;
}

.feed-card:hover {
  border-left-color: #5ba79e;
  background: rgba(255, 255, 255, 0.48);
}

.feed-avatar {
  color: #fff;
  background: #4f928b;
}

.category-badge {
  color: #27615f;
  background: #d8eeea;
}

.category-badge.iq {
  color: #315b72;
  background: #deedf2;
}

.draft-badge {
  color: #2f6170;
  background: #e0eef2;
}

.page-heading {
  border-color: #c1dbd8;
}

.page-heading h1 {
  font-size: clamp(34px, 3.7vw, 46px);
}

.page-heading p {
  color: #6d8789;
}

.form-card {
  border-color: #c1dbd8;
  border-radius: 10px;
  background: #f9fdfc;
  box-shadow: none;
}

.form-card-heading {
  border-color: #d7e8e6;
}

.step-badge {
  color: #37696b;
  border-color: #bbd6d3;
  background: #eaf6f4;
}

.metric-hint {
  color: #547477;
  border-left-color: #62a9a1;
  background: #eaf5f3;
}

.upload-field,
.goal-card {
  border-color: #c9dfdc;
  border-radius: 8px;
  background: #f2f9f8;
}

.aside-card {
  border-color: #c1dbd8;
  border-radius: 9px;
  background: #f9fdfc;
}

.aside-card.warm {
  border-color: #c3dcd9;
  background: #e5f3f0;
}

.task-card,
.admin-task {
  border-color: #c1dbd8;
  border-radius: 9px;
  background: #f9fdfc;
}

.task-card-meta span {
  background: #e8f3f1;
}

.messages-layout {
  border-color: #c1dbd8;
  border-radius: 10px;
  background: #f9fdfc;
}

.conversation-panel {
  background: #eff7f5;
}

.conversation-item:hover,
.conversation-item.active {
  background: #fff;
}

.mini-avatar {
  color: #fff;
  background: #4e918a;
}

.chat-messages {
  background: #f9fdfc;
}

.message-bubble {
  background: #e7f1ef;
}

.message-bubble.mine {
  background: #26736c;
}

.profile-hero {
  color: var(--ink);
  border: 1px solid #bed8d5;
  border-radius: 10px;
  background: #d4eee9;
}

.profile-avatar {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.profile-identity .eyebrow,
.profile-identity p {
  color: #5f7f82;
}

.profile-stats span {
  border-color: #bdd8d5;
  background: rgba(255, 255, 255, 0.4);
}

.profile-stats small {
  color: #698587;
}

.admin-metrics {
  border-color: #c1dbd8;
  border-radius: 9px;
  overflow: hidden;
  background: #f9fdfc;
}

.admin-metrics article {
  border-color: #d0e3e1;
}

.roster-admin-item {
  border-color: #c9dfdc;
  border-radius: 8px;
  background: #f9fdfc;
}

.roster-admin-item.registered i {
  background: #4d918a;
}

.scope-fieldset {
  border-color: #c4dcda;
  border-radius: 8px;
}

.modal-card {
  border-radius: 10px;
  background: #f9fdfc;
}

.detail-hero {
  color: var(--ink);
  background: #d5efea;
}

.detail-hero .detail-author {
  color: #557579;
}

.detail-hero .feed-avatar {
  color: #fff;
  background: #4d918a;
}

.detail-meta-row span,
.goal-detail {
  background: #eaf5f3;
}

.mobile-nav {
  border-color: #c1dbd8;
  background: rgba(247, 252, 251, 0.98);
}

.mobile-nav button.active span {
  color: #fff;
  background: var(--green);
}

/* Admin settings */

.settings-panel {
  min-height: 310px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #c1dbd8;
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 34px;
  background: #f9fdfc;
}

.settings-form {
  display: grid;
  align-content: start;
  gap: 20px;
}

.settings-toggle {
  min-height: 64px;
  padding: 13px 15px;
  border: 1px solid #c4dcda;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #f2f9f8;
}

.settings-toggle > span {
  display: grid;
  gap: 4px;
}

.settings-toggle b {
  font-size: 12px;
}

.settings-toggle small {
  color: #6c8688;
  font-size: 10px;
}

.settings-toggle input {
  width: 42px;
  height: 22px;
  accent-color: var(--green);
}

.settings-form .primary-button {
  justify-self: start;
  min-width: 130px;
}

.settings-note {
  padding: 21px;
  border-left: 1px solid #d0e3e1;
  display: grid;
  align-content: start;
  gap: 9px;
}

.settings-note span {
  color: #6e888a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.settings-note strong {
  color: #1a5556;
  font-family: var(--display);
  font-size: 28px;
}

.settings-note p {
  margin: 0;
  color: #6c8588;
  font-size: 11px;
  line-height: 1.6;
}

.form-message.success {
  color: var(--green);
}

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

  .auth-scene {
    min-height: 390px;
    background: #d6efeb;
  }

  .auth-panel {
    background: #f7fcfb;
  }

  .sidebar {
    background: #d8ece9;
  }

  .settings-panel {
    grid-template-columns: 1fr;
  }

  .settings-note {
    padding: 17px 0 0;
    border-left: 0;
    border-top: 1px solid #d0e3e1;
  }
}

@media (max-width: 650px) {
  .auth-scene {
    min-height: 380px;
    background: #d6efeb;
  }

  .auth-copy h1 {
    color: #103638;
    font-size: 46px;
  }

  .auth-scene::after {
    color: #3d948c;
  }

  .lobby-hero {
    min-height: 245px;
    background: #d4eee9;
  }

  .lobby-hero h1 {
    color: #0f383a;
    font-size: 31px;
  }

  .stat-card.accent {
    background: #d1eee9;
  }

  .settings-panel {
    padding: 19px 16px;
  }
}

@layer legacy {

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.primary-button,
.secondary-button,
.hero-action,
.quick-checkin {
  min-height: 43px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  padding: 0 20px;
  color: #102116;
  background: var(--lime);
  box-shadow: 0 8px 18px rgba(146, 192, 64, 0.19);
}

.primary-button:hover,
.hero-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(108, 151, 37, 0.24);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

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

.secondary-button:hover {
  border-color: #b8c6bc;
  background: #f9fbf8;
}

.secondary-button.compact {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
}

.full {
  width: 100%;
}

.text-button {
  padding: 5px 0;
  border: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.field > span,
.scope-fieldset legend {
  color: #43534a;
  font-size: 11px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.conversation-search input,
.feed-tools select,
.feed-search input {
  width: 100%;
  border: 1px solid #d9e1da;
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #fbfcfa;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field input,
.field select,
.conversation-search input,
.feed-tools select,
.feed-search input {
  height: 43px;
  padding: 0 12px;
}

.field textarea {
  min-height: 96px;
  padding: 12px;
  line-height: 1.65;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.conversation-search input:focus,
.feed-tools select:focus,
.feed-search input:focus {
  border-color: #6ca27f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(64, 137, 93, 0.11);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa69e;
}

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

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-message {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.5;
}

/* Auth */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(390px, 0.84fr);
  background: #09120e;
}

.auth-scene {
  min-height: 100vh;
  padding: clamp(32px, 5vw, 72px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 18% 18%, rgba(66, 151, 102, 0.24), transparent 32%),
    linear-gradient(145deg, #0d1e16, #07110d 70%);
}

.auth-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 76%);
}

.auth-pitch-lines {
  position: absolute;
  width: min(48vw, 650px);
  aspect-ratio: 0.68;
  right: -14%;
  bottom: -16%;
  border: 2px solid rgba(197, 244, 107, 0.2);
  border-radius: 45%;
  transform: rotate(-12deg);
}

.auth-pitch-lines::before,
.auth-pitch-lines::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(197, 244, 107, 0.16);
}

.auth-pitch-lines::before {
  inset: 10%;
  border-radius: 40%;
}

.auth-pitch-lines::after {
  width: 34%;
  aspect-ratio: 1;
  left: 33%;
  top: 37%;
  border-radius: 50%;
}

.auth-pitch-lines i {
  position: absolute;
  width: 32%;
  height: 15%;
  left: 34%;
  border: 1px solid rgba(197, 244, 107, 0.12);
}

.auth-pitch-lines i:nth-child(1) {
  top: 0;
  border-top: 0;
}

.auth-pitch-lines i:nth-child(2) {
  bottom: 0;
  border-bottom: 0;
}

.auth-pitch-lines i:nth-child(3) {
  width: 1px;
  height: 100%;
  left: 50%;
  top: 0;
  border-width: 0 0 0 1px;
}

.auth-brand,
.side-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  z-index: 1;
}

.brand-ball,
.side-avatar,
.profile-avatar,
.mini-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.brand-ball {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(197, 244, 107, 0.5);
  color: #112315;
  background: var(--lime);
  box-shadow: 0 0 0 7px rgba(197, 244, 107, 0.08);
}

.auth-brand div {
  display: grid;
  gap: 2px;
}

.auth-brand span:not(.brand-ball) {
  color: #95a69b;
  font-size: 11px;
}

.auth-brand strong {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.auth-copy {
  position: relative;
  z-index: 1;
  margin: auto 0;
  max-width: 780px;
}

.auth-copy .eyebrow {
  color: #86a18f;
}

.auth-copy h1 {
  max-width: 760px;
  margin: 18px 0 24px;
  font-size: clamp(40px, 5.6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.auth-copy > p {
  max-width: 600px;
  margin: 0;
  color: #a7b6ac;
  font-size: 15px;
  line-height: 1.8;
}

.taxonomy-strip {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.taxonomy-strip span {
  min-width: 108px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  color: #dce9df;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
}

.taxonomy-strip b {
  margin-right: 10px;
  color: var(--lime);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.auth-footnote {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #60766a;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.auth-panel {
  min-height: 100vh;
  padding: 40px;
  display: grid;
  place-items: center;
  background: #f4f6f2;
}

.auth-panel-inner {
  width: min(100%, 470px);
}

.auth-heading {
  margin-bottom: 24px;
}

.auth-heading h2 {
  margin: 9px 0 8px;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-tabs {
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #e9eee8;
}

.auth-tabs button {
  height: 39px;
  border: 0;
  border-radius: 9px;
  color: #69786f;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.auth-tabs button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 14px rgba(21, 41, 30, 0.08);
}

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

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  justify-content: space-between;
  padding: 0 18px;
}

.auth-submit svg {
  width: 20px;
}

/* App shell */

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

.sidebar {
  height: 100vh;
  padding: 26px 18px 20px;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  color: #eef5f0;
  background: #08130f;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.side-brand {
  padding: 0 8px;
  color: #fff;
  text-decoration: none;
}

.side-brand .brand-ball {
  width: 40px;
  height: 40px;
}

.side-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.side-brand strong {
  font-size: 15px;
}

.side-brand small {
  color: #637569;
  font-size: 9px;
}

.side-nav {
  margin-top: 42px;
  display: grid;
  gap: 4px;
}

.side-nav button {
  width: 100%;
  min-height: 45px;
  padding: 0 12px;
  position: relative;
  border: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #7e9185;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.side-nav button:hover {
  color: #dbe9df;
  background: rgba(255, 255, 255, 0.035);
}

.side-nav button.active {
  color: #122216;
  background: var(--lime);
}

.nav-index {
  font-size: 8px;
  letter-spacing: 0.08em;
  opacity: 0.55;
}

.nav-count {
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #c4565e;
  font-style: normal;
  font-size: 9px;
}

.side-nav button.active .nav-count {
  color: #fff;
  background: #23503a;
}

.sidebar-note {
  margin: auto 8px 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-note span {
  color: var(--lime);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sidebar-note p {
  margin: 7px 0 0;
  color: #788a7f;
  font-size: 10px;
  line-height: 1.55;
}

.side-user {
  padding: 13px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-avatar {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(197, 244, 107, 0.3);
  color: #e6f5e9;
  background: #1d3b2b;
  cursor: pointer;
  font-size: 12px;
}

.side-user > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.side-user strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-user small {
  color: #66786c;
  font-size: 9px;
}

.app-main {
  min-width: 0;
}

.topbar {
  height: 74px;
  padding: 0 clamp(22px, 4vw, 54px);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(182, 196, 185, 0.62);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(244, 246, 242, 0.92);
  backdrop-filter: blur(18px);
}

.mobile-menu-button {
  width: 38px;
  height: 38px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: none;
  background: #fff;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 100%;
  height: 1px;
  margin: 3px 0;
  display: block;
  background: var(--ink);
}

.page-context {
  display: grid;
  gap: 3px;
}

.page-context span {
  color: #8b988f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.page-context strong {
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #738178;
  font-size: 10px;
}

.connection-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45a46d;
  box-shadow: 0 0 0 4px rgba(69, 164, 109, 0.1);
}

.quick-checkin {
  min-height: 37px;
  padding: 0 15px;
  color: #132319;
  background: #dff1b8;
  font-size: 11px;
}

.quick-checkin span {
  font-size: 17px;
}

.page-stack {
  padding: clamp(24px, 3.5vw, 48px);
}

.app-page {
  width: min(100%, 1320px);
  margin: 0 auto;
}

.lobby-hero {
  min-height: 210px;
  padding: clamp(28px, 4vw, 48px);
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  color: #fff;
  background:
    linear-gradient(95deg, rgba(9, 28, 19, 0.95), rgba(20, 64, 44, 0.68)),
    repeating-linear-gradient(100deg, #183c2a 0 34px, #1a422e 34px 68px);
  box-shadow: var(--shadow);
}

.lobby-hero::after {
  content: "";
  width: 320px;
  height: 320px;
  position: absolute;
  right: 7%;
  top: -45%;
  border: 1px solid rgba(197, 244, 107, 0.25);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(197, 244, 107, 0.025), 0 0 0 100px rgba(197, 244, 107, 0.02);
}

.lobby-hero .eyebrow {
  color: #94b19f;
}

.lobby-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.045em;
}

.lobby-hero p {
  margin: 0;
  color: #aabbb0;
  font-size: 13px;
}

.hero-action {
  min-width: 135px;
  padding: 0 18px;
  position: relative;
  z-index: 1;
  color: #102116;
  background: var(--lime);
}

.hero-action b {
  font-size: 20px;
}

.stat-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  min-height: 112px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  align-content: space-between;
  background: #fff;
}

.stat-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.stat-card strong {
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-card small {
  color: #9aa69f;
  font-size: 9px;
}

.stat-card.accent {
  color: #fff;
  border-color: transparent;
  background: var(--green);
}

.stat-card.accent span,
.stat-card.accent small {
  color: #b5cbbd;
}

.content-section {
  margin-top: 32px;
}

.section-title-row {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-title-row h2 {
  margin: 6px 0 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

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

.task-preview-card {
  min-height: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.task-preview-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-preview-card header span {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.task-preview-card header small {
  color: #8b998f;
  font-size: 9px;
}

.task-preview-card h3 {
  margin: 0;
  font-size: 14px;
}

.task-preview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.progress-line {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ede8;
}

.progress-line i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green-2);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #728078;
  font-size: 9px;
}

.empty-card {
  min-height: 126px;
  padding: 20px;
  border: 1px dashed #cbd7ce;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #87958c;
  background: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  text-align: center;
}

.skeleton-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(100deg, #fff 20%, #f1f4f0 40%, #fff 60%);
  background-size: 240% 100%;
  animation: shimmer 1.6s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

.feed-title-row {
  align-items: center;
}

.feed-tools {
  display: flex;
  gap: 8px;
}

.feed-tools select {
  width: 119px;
  height: 37px;
  font-size: 11px;
}

.feed-search input {
  width: min(24vw, 270px);
  height: 37px;
  font-size: 11px;
}

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

.feed-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  gap: 13px;
  background: #fff;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.feed-card:hover {
  border-color: #b6c8bb;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17, 39, 27, 0.06);
}

.feed-card.is-draft {
  border-style: dashed;
  background: #fffdf8;
}

.feed-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.feed-author {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-avatar {
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #dff0e5;
  background: #214733;
  font-size: 11px;
  font-weight: 900;
}

.feed-author-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.feed-author-copy strong {
  font-size: 12px;
}

.feed-author-copy small {
  color: #8b988f;
  font-size: 9px;
}

.category-badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: #1e573a;
  background: #e8f4e8;
  font-size: 9px;
  font-weight: 800;
}

.category-badge.iq {
  color: #735421;
  background: #f6edd7;
}

.draft-badge {
  margin-left: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #916322;
  background: #fbf1db;
  font-size: 9px;
  font-weight: 800;
}

.feed-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}

.feed-card > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #5f6e65;
  font-size: 12px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feed-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #8a978f;
  font-size: 9px;
}

.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.feed-video-label {
  color: var(--green);
  font-weight: 800;
}

/* Shared page headings */

.page-heading {
  margin-bottom: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.page-heading h1 {
  margin: 8px 0 7px;
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: -0.045em;
}

.page-heading p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

/* Check-in */

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

.checkin-main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.form-card {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 19px;
  background: #fff;
}

.form-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-badge {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #2f6649;
  background: #e7f2e7;
  font-size: 9px;
  font-weight: 900;
}

.form-card-heading h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.form-card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.topic-custom-field {
  margin-top: -5px;
}

.dynamic-fields {
  display: grid;
  gap: 14px;
}

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

.metric-hint {
  padding: 10px 12px;
  border-left: 2px solid #82b390;
  color: #697a6e;
  background: #f7faf6;
  font-size: 10px;
  line-height: 1.6;
}

.upload-field {
  min-height: 78px;
  padding: 14px;
  border: 1px dashed #bccbc0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #fafcf9;
}

.upload-field > span {
  display: grid;
  gap: 4px;
}

.upload-field b {
  font-size: 11px;
}

.upload-field small {
  color: #8a968e;
  font-size: 9px;
}

.upload-field input {
  max-width: 240px;
  color: #637168;
  font-size: 10px;
}

.goal-heading {
  padding-top: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.goal-heading h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.goal-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

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

.goal-card {
  padding: 17px;
  border: 1px solid #dce3dc;
  border-radius: 14px;
  display: grid;
  gap: 12px;
  background: #fbfcfa;
}

.goal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.goal-card-head strong {
  font-size: 12px;
}

.goal-card-head button {
  padding: 3px 8px;
  border: 0;
  color: #a15358;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

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

.goal-textareas textarea {
  min-height: 105px;
}

.checkin-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
}

.aside-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.aside-card.warm {
  background: var(--warm);
  border-color: #e8ddc3;
}

.aside-card h3 {
  margin: 7px 0 12px;
  font-size: 15px;
}

.aside-card p {
  margin: 0;
  color: #69776f;
  font-size: 10px;
  line-height: 1.65;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.check-list li {
  padding-left: 21px;
  position: relative;
  color: #77857d;
  font-size: 10px;
  line-height: 1.45;
}

.check-list li::before {
  content: "";
  width: 11px;
  height: 11px;
  position: absolute;
  left: 0;
  top: 1px;
  border: 1px solid #bdc9c0;
  border-radius: 50%;
}

.check-list li.complete {
  color: #2d6b4b;
}

.check-list li.complete::before {
  border-color: #3f8c65;
  background: #3f8c65;
  box-shadow: inset 0 0 0 2px #fff;
}

.checkin-actions {
  display: grid;
  gap: 8px;
}

/* Tasks */

.task-board,
.admin-task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  gap: 14px;
  background: #fff;
}

.task-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.task-card h2 {
  margin: 0 0 5px;
  font-size: 17px;
}

.task-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.task-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #6f7d75;
  font-size: 9px;
}

.task-card-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f4ef;
}

.task-progress-large {
  display: grid;
  gap: 7px;
}

.task-progress-large .progress-line {
  height: 9px;
}

.task-complete-badge {
  padding: 7px 10px;
  border-radius: 999px;
  color: #236540;
  background: #e2f3e5;
  font-size: 9px;
  font-weight: 800;
}

.task-overdue-badge {
  color: #985056;
  background: #f9e7e8;
}

/* Messages */

.messages-layout {
  height: calc(100vh - 170px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: #fff;
}

.conversation-panel {
  min-width: 0;
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fbfcfa;
}

.conversation-search {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.conversation-search input {
  height: 38px;
  font-size: 10px;
}

.conversation-list {
  overflow-y: auto;
}

.conversation-item {
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid #edf0ed;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.conversation-item:hover,
.conversation-item.active {
  background: #eef4ed;
}

.conversation-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.conversation-copy strong {
  font-size: 11px;
}

.conversation-copy small {
  overflow: hidden;
  color: #89958d;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-side {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.conversation-side small {
  color: #a0aba4;
  font-size: 8px;
}

.conversation-side i {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #b7444d;
  font-style: normal;
  font-size: 8px;
}

.chat-panel {
  min-width: 0;
  display: grid;
}

.chat-empty {
  max-width: 330px;
  margin: auto;
  padding: 40px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #2f6d4d;
  background: #e8f2e8;
  font-size: 20px;
  font-weight: 900;
}

.chat-empty h2 {
  margin: 18px 0 7px;
  font-size: 17px;
}

.chat-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.chat-active {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.chat-header {
  min-height: 66px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-back {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 25px;
}

.mini-avatar {
  width: 34px;
  height: 34px;
  color: #e6f4e9;
  background: #28543b;
  font-size: 10px;
}

.chat-header div:last-child {
  display: grid;
  gap: 3px;
}

.chat-header strong {
  font-size: 12px;
}

.chat-header small {
  color: #86938a;
  font-size: 9px;
}

.chat-messages {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background:
    radial-gradient(circle at 80% 0, rgba(64, 140, 98, 0.06), transparent 34%),
    #fff;
}

.message-bubble {
  width: fit-content;
  max-width: min(70%, 600px);
  padding: 9px 12px;
  border-radius: 13px 13px 13px 4px;
  color: #35443b;
  background: #eef2ee;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message-bubble.mine {
  margin-left: auto;
  border-radius: 13px 13px 4px 13px;
  color: #edf8f1;
  background: #2d6648;
}

.message-time {
  margin-top: 4px;
  display: block;
  color: #91a097;
  font-size: 8px;
}

.message-bubble.mine .message-time {
  color: #a7c5b2;
  text-align: right;
}

.chat-composer {
  padding: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.chat-composer textarea {
  min-height: 44px;
  max-height: 130px;
  padding: 10px 12px;
  border: 1px solid #d7dfd8;
  border-radius: 10px;
  outline: 0;
  resize: vertical;
}

.chat-composer textarea:focus {
  border-color: #6ca27f;
}

/* Profile */

.profile-hero {
  padding: clamp(24px, 4vw, 40px);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: #fff;
  background: linear-gradient(115deg, #10291c, #285b40);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(197, 244, 107, 0.37);
  color: var(--lime);
  background: rgba(0, 0, 0, 0.2);
  font-size: 24px;
}

.profile-identity .eyebrow {
  color: #8eab99;
}

.profile-identity h1 {
  margin: 7px 0 4px;
  font-size: 32px;
}

.profile-identity p {
  margin: 0;
  color: #9eb2a5;
  font-size: 11px;
}

.profile-stats {
  display: flex;
  gap: 9px;
}

.profile-stats span {
  min-width: 92px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  background: rgba(0, 0, 0, 0.12);
}

.profile-stats b {
  font-size: 22px;
}

.profile-stats small {
  color: #94a99c;
  font-size: 9px;
}

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

.profile-side {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}

.profile-details {
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}

.profile-details div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-details dt {
  color: #87948c;
  font-size: 10px;
}

.profile-details dd {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
}

.stack-form {
  display: grid;
  gap: 11px;
}

/* Admin */

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-metrics article {
  min-height: 105px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  align-content: space-between;
  background: #fff;
}

.admin-metrics span {
  color: var(--muted);
  font-size: 10px;
}

.admin-metrics strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: start;
  gap: 20px;
}

.roster-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.roster-admin-item {
  min-height: 53px;
  padding: 9px 10px;
  border: 1px solid #e0e6e1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
}

.roster-admin-item i {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #6d7a72;
  background: #eef1ed;
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
}

.roster-admin-item.registered i {
  color: #e9f5ed;
  background: #2f6648;
}

.roster-admin-item span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.roster-admin-item strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-admin-item small {
  color: #94a098;
  font-size: 8px;
}

.task-form {
  display: grid;
  gap: 13px;
}

.scope-fieldset {
  margin: 0;
  padding: 12px;
  border: 1px solid #dce3dd;
  border-radius: 12px;
  display: grid;
  gap: 8px;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #536259;
  font-size: 10px;
}

.player-picker {
  max-height: 230px;
  padding-top: 5px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.player-pick {
  padding: 7px 8px;
  border: 1px solid #e4e9e5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
}

.admin-task {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 13px;
  background: #fff;
}

.admin-task header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-task h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.admin-task p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.admin-task header button {
  padding: 5px 8px;
  border: 1px solid #ead6d8;
  border-radius: 7px;
  color: #a54a51;
  background: #fff7f7;
  cursor: pointer;
  font-size: 8px;
}

.progress-player-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.progress-player {
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f5f7f4;
  font-size: 9px;
}

.progress-player.done {
  color: #276342;
  background: #e7f4e8;
}

.progress-player.unregistered {
  color: #8b7e67;
  background: #f8f3e8;
}

/* Modal, toast, loading */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(4, 13, 8, 0.68);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(100%, 900px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  position: relative;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.modal-close {
  width: 35px;
  height: 35px;
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
  border: 1px solid #e1e7e2;
  border-radius: 50%;
  color: #67746c;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 20px;
}

.detail-hero {
  padding: 34px 34px 27px;
  color: #fff;
  background: linear-gradient(120deg, #10271b, #2b6142);
}

.detail-hero h1 {
  max-width: 760px;
  margin: 10px 34px 10px 0;
  font-size: 27px;
  line-height: 1.3;
}

.detail-author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b6c8bc;
  font-size: 10px;
}

.detail-author .feed-avatar {
  background: rgba(255, 255, 255, 0.12);
}

.detail-body {
  padding: 28px 34px 34px;
  display: grid;
  gap: 24px;
}

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

.detail-meta-row span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #5f6e65;
  background: #f0f4ef;
  font-size: 9px;
}

.detail-section h2 {
  margin: 0 0 9px;
  font-size: 14px;
}

.detail-text {
  margin: 0;
  color: #4d5c53;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.metrics-display {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.metrics-display span {
  padding: 11px;
  border-radius: 10px;
  display: grid;
  gap: 3px;
  background: #f4f7f3;
  color: #66746b;
  font-size: 9px;
}

.metrics-display b {
  color: var(--ink);
  font-size: 13px;
}

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

.video-card {
  overflow: hidden;
  border: 1px solid #dfe5e0;
  border-radius: 12px;
  background: #0c1510;
}

.video-card video {
  width: 100%;
  min-height: 180px;
  max-height: 320px;
  display: block;
  background: #07100b;
}

.video-card > span {
  padding: 8px 10px;
  display: block;
  color: #d8e5dc;
  font-size: 9px;
}

.goal-detail-list {
  display: grid;
  gap: 11px;
}

.goal-detail {
  padding: 16px;
  border: 1px solid #e0e5e1;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  background: #fbfcfa;
}

.goal-detail h3 {
  margin: 0;
  font-size: 13px;
}

.goal-detail dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.goal-detail dl div {
  display: grid;
  gap: 3px;
}

.goal-detail dt {
  color: #75827a;
  font-size: 9px;
  font-weight: 800;
}

.goal-detail dd {
  margin: 0;
  color: #4b5a51;
  font-size: 11px;
  line-height: 1.65;
}

.detail-actions {
  padding-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toast {
  min-width: 220px;
  max-width: min(90vw, 520px);
  padding: 12px 16px;
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  border-radius: 10px;
  color: #eef7f1;
  background: #16261d;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 11px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-cover {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #dce9df;
  background: #08130f;
  transition: opacity 250ms ease;
}

.loading-cover.done {
  opacity: 0;
  pointer-events: none;
}

.loading-cover p {
  margin: 0;
  color: #7f9286;
  font-size: 10px;
}

.loading-ball {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(197, 244, 107, 0.2);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.mobile-nav {
  display: none;
}

.compact-feed .feed-card {
  padding: 16px;
}

/* Responsive */

@media (max-width: 1120px) {
  .task-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkin-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

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

  .roster-admin-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

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

  .auth-scene {
    min-height: 360px;
    padding: 30px;
  }

  .auth-copy {
    margin: 55px 0 20px;
  }

  .auth-copy h1 {
    font-size: 44px;
  }

  .auth-footnote {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding: 34px 24px 48px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: min(290px, 86vw);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 60;
    transform: translateX(-102%);
    transition: transform 200ms ease;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.28);
  }

  .app-shell.menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-menu-button {
    display: block;
  }

  .topbar {
    padding: 0 18px;
  }

  .page-stack {
    padding: 20px 18px 90px;
  }

  .mobile-nav {
    height: 66px;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    border-top: 1px solid #dce4dd;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
  }

  .mobile-nav button {
    border: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: #7c8981;
    background: transparent;
    font-size: 9px;
  }

  .mobile-nav button span {
    width: 25px;
    height: 25px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 900;
  }

  .mobile-nav button.active {
    color: #22563b;
  }

  .mobile-nav button.active span {
    color: #173321;
    background: var(--lime);
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feed-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .feed-tools,
  .feed-search,
  .feed-search input {
    width: 100%;
  }

  .checkin-layout {
    grid-template-columns: 1fr;
  }

  .checkin-aside {
    position: static;
  }

  .checkin-aside .aside-card.warm {
    display: none;
  }

  .messages-layout {
    height: calc(100vh - 190px);
    grid-template-columns: 240px minmax(0, 1fr);
  }

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

  .profile-side {
    margin-top: 0;
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roster-admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .auth-copy h1 {
    font-size: 35px;
  }

  .taxonomy-strip {
    margin-top: 25px;
  }

  .taxonomy-strip span {
    min-width: 91px;
    padding: 9px 10px;
  }

  .auth-panel {
    padding-inline: 18px;
  }

  .field-grid,
  .form-grid.three,
  .form-grid.two,
  .metric-grid,
  .goal-textareas,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions .connection-state {
    display: none;
  }

  .quick-checkin {
    width: 38px;
    min-width: 38px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .quick-checkin span {
    font-size: 18px;
  }

  .page-context span {
    display: none;
  }

  .lobby-hero {
    min-height: 265px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
  }

  .lobby-hero h1 {
    margin-bottom: 14px;
    font-size: 29px;
  }

  .hero-action {
    min-width: 0;
    position: static;
    align-self: flex-start;
    margin-top: 14px;
  }

  .task-preview-grid {
    grid-template-columns: 1fr;
  }

  .feed-tools {
    flex-direction: column;
  }

  .feed-tools select {
    width: 100%;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading .secondary-button {
    align-self: flex-start;
  }

  .upload-field {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-field input {
    width: 100%;
    max-width: none;
  }

  .goal-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .goal-textareas {
    gap: 8px;
  }

  .messages-layout {
    height: calc(100vh - 180px);
    min-height: 500px;
    position: relative;
    display: block;
  }

  .conversation-panel {
    height: 100%;
    border-right: 0;
  }

  .messages-layout.chat-open .conversation-panel {
    display: none;
  }

  .chat-panel {
    height: 100%;
  }

  .messages-layout:not(.chat-open) .chat-panel {
    display: none;
  }

  .chat-back {
    display: block;
  }

  .profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-stats {
    width: 100%;
  }

  .profile-stats span {
    min-width: 0;
    flex: 1;
  }

  .admin-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .roster-admin-grid,
  .player-picker,
  .progress-player-list {
    grid-template-columns: 1fr 1fr;
  }

  .modal-backdrop {
    padding: 0;
    align-items: end;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }

  .detail-hero {
    padding: 30px 20px 22px;
  }

  .detail-body {
    padding: 22px 20px 30px;
  }

  .metrics-display {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

}
