﻿@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --primary: #3ed2ad;
  --primary-strong: #269b80;
  --secondary: #202726;
  --surface: #0a0c0c;
  --panel: rgba(15, 19, 18, 0.92);
  --panel-solid: #151c1a;
  --panel-soft: #1a2523;
  --text-strong: #edf6f4;
  --text-muted: #91aaa5;
  --line: #3a5754;
  --line-soft: #2a3f3d;
  --success: #38d39a;
  --warning: #ffb558;
  --danger: #f07d83;
  --focus-ring: #74dfc2;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow: 0 24px 56px rgba(2, 7, 6, 0.62);
  --shadow-float: 0 16px 36px rgba(2, 9, 10, 0.46);
  --shadow-card: 0 12px 24px rgba(3, 10, 11, 0.34);
  --shadow-press: 0 5px 12px rgba(2, 8, 9, 0.4);
  --bevel-top: rgba(221, 247, 239, 0.14);
  --bevel-bottom: rgba(4, 13, 13, 0.45);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text-strong);
  font-family: "Space Grotesk", "SUIT Variable", "Pretendard Variable", "Noto Sans KR", sans-serif;
  background:
    radial-gradient(880px 480px at -5% -20%, rgba(56, 132, 106, 0.28) 0%, transparent 60%),
    radial-gradient(920px 500px at 108% -16%, rgba(174, 126, 72, 0.14) 0%, transparent 60%),
    linear-gradient(150deg, #090a0a 0%, #101312 52%, #171b19 100%);
  line-height: 1.45;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(163, 167, 144, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 167, 144, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

.hero {
  width: min(1240px, calc(100% - 32px));
  margin: 20px auto 10px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid #44514c;
  background:
    linear-gradient(145deg, rgba(26, 34, 31, 0.98), rgba(15, 20, 18, 0.99)),
    var(--panel);
  box-shadow:
    0 30px 62px rgba(2, 9, 10, 0.55),
    0 1px 0 rgba(229, 247, 242, 0.16) inset,
    0 -20px 30px rgba(3, 11, 11, 0.48) inset;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(460px 220px at 12% -10%, rgba(252, 244, 225, 0.14), transparent 72%),
    linear-gradient(160deg, rgba(244, 231, 204, 0.11) 0%, transparent 44%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 260px at 105% -10%, rgba(71, 172, 139, 0.24), transparent 72%),
    linear-gradient(180deg, transparent 62%, rgba(4, 12, 12, 0.38) 100%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: #e3c892;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
}

.hero h1 {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 38px);
  letter-spacing: -0.01em;
}

.subtitle {
  margin: var(--space-2) 0 0;
  color: #b7beb4;
}

.hero-actions {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.auth-actions {
  margin-top: var(--space-2);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-2);
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(15, 20, 18, 0.78);
}

.auth-actions .chip {
  grid-column: span 8;
}

#cloudSyncBtn {
  grid-column: span 4;
}

#authLogoutBtn {
  grid-column: span 12;
}

.auth-actions .btn {
  width: 100%;
}

#authLoginBtn,
#authSignupBtn,
#authGoogleBtn,
#authKakaoBtn {
  grid-column: span 3;
}

.auth-message {
  margin: var(--space-2) 0 0;
  font-size: 13px;
}

.auth-email-input {
  grid-column: span 6;
  width: 100%;
  min-height: 36px;
  padding: 8px 11px;
}

.auth-password-input {
  grid-column: span 6;
  width: 100%;
  min-height: 36px;
  padding: 8px 11px;
}

.chip {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #356269;
  background: rgba(15, 25, 27, 0.95);
  font-size: 14px;
  font-weight: 600;
  color: #d8ece8;
}

.layout {
  width: min(1240px, calc(100% - 32px));
  margin: 12px auto 28px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(120px, auto);
  gap: var(--space-4);
  perspective: 1200px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(150deg, rgba(16, 29, 31, 0.92), rgba(11, 21, 22, 0.96)),
    var(--panel);
  box-shadow:
    var(--shadow-float),
    0 1px 0 var(--bevel-top) inset,
    0 -14px 20px var(--bevel-bottom) inset;
  padding: 18px;
  min-height: 280px;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(226, 247, 239, 0.09) 0%, transparent 42%);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 68%, rgba(3, 10, 10, 0.22) 100%);
}

.panel:hover {
  transform: translateY(-3px) rotateX(0.8deg);
  box-shadow:
    0 24px 44px rgba(2, 10, 11, 0.55),
    0 1px 0 rgba(230, 247, 241, 0.18) inset,
    0 -16px 24px rgba(3, 11, 11, 0.44) inset;
}

.layout .panel:nth-child(1) {
  grid-column: span 4;
}

.layout .panel:nth-child(2) {
  grid-column: span 5;
}

.layout .panel:nth-child(3) {
  grid-column: span 3;
}

.panel h2 {
  margin: 0 0 var(--space-3);
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.panel h2::before {
  content: "";
  margin-right: 0;
}

.layout .panel:nth-child(1) h2::before {
  content: "";
}

.layout .panel:nth-child(2) h2::before {
  content: "";
}

.layout .panel:nth-child(3) h2::before {
  content: "";
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.day-btn {
  border: 1px solid #32555b;
  background: linear-gradient(160deg, #15292d, #112126);
  color: #cfe6e2;
  border-radius: var(--radius-sm);
  height: 38px;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 8px 14px rgba(4, 12, 12, 0.28),
    0 1px 0 rgba(224, 245, 238, 0.12) inset,
    0 -2px 0 rgba(6, 15, 15, 0.36) inset;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.day-btn:hover {
  transform: translateY(-2px);
  border-color: #5fc9b0;
}

.day-btn.active {
  color: #eef8f6;
  background: linear-gradient(135deg, #39cda9, #2c9b80);
  border-color: #53c4aa;
  box-shadow:
    0 14px 22px rgba(36, 121, 99, 0.35),
    0 1px 0 rgba(232, 248, 243, 0.22) inset,
    0 -3px 0 rgba(20, 92, 74, 0.34) inset;
}

.day-meta {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  background: rgba(15, 24, 26, 0.86);
}

.day-title {
  margin: 0;
  font-weight: 700;
  color: #e1f2ee;
}

.focus-copy {
  margin: var(--space-2) 0 0;
  font-size: 14px;
  color: #c2d9d3;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.mini-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(15, 24, 26, 0.92);
  padding: var(--space-3);
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(221, 247, 239, 0.1) inset;
}

.mini-card h3 {
  margin: 0 0 var(--space-2);
  font-size: 15px;
  color: #d1e8e3;
}

.mini-card:nth-child(1) h3::before {
  content: "?ㅈ ";
}

.mini-card:nth-child(2) h3::before {
  content: "?슯 ";
}

.mini-card p {
  margin: 0;
  font-size: 14px;
}

.mini-card .detail-note {
  margin-top: var(--space-2);
  line-height: 1.45;
}

.section-title {
  margin: 0 0 var(--space-3);
  font-size: 16px;
}

.queue {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.queue-item {
  border: 1px solid #2f5359;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  background: #121f24;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  box-shadow:
    0 8px 16px rgba(2, 9, 10, 0.22),
    0 1px 0 rgba(220, 246, 238, 0.08) inset;
}

.queue-item.current {
  border-color: #54c3a8;
  box-shadow: inset 0 0 0 1px rgba(83, 173, 145, 0.34);
  background: #173036;
}

.queue-item.done {
  border-color: #2f6a5f;
  background: #122b29;
}

.queue-name {
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: #d9ece8;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.queue-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
}

.queue-text {
  display: inline-block;
}

.queue-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.routine-editor {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed #3a5f66;
  display: grid;
  gap: var(--space-2);
}

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.editor-head-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.editor-head .section-title {
  margin-bottom: 0;
}

.editor-label {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
}

.editor-input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #396a70;
  background: #102227;
  color: var(--text-strong);
  font: inherit;
}

.editor-input::placeholder {
  color: #7f9994;
}

.editor-input:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: transparent;
}

.editor-set-rows {
  display: grid;
  gap: var(--space-2);
}

.editor-set-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 88px auto;
  gap: var(--space-2);
  align-items: center;
}

.editor-set-index {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.editor-set-reps {
  text-align: center;
}

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

.editor-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.btn.danger {
  border-color: #7a4843;
  color: #efb5ad;
}

.editor-message {
  min-height: 18px;
  margin: 0;
}

.planner-stack {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.feature-box {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(12, 21, 23, 0.9);
  padding: 10px;
  display: grid;
  gap: var(--space-2);
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(220, 246, 238, 0.1) inset;
}

.feature-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.feature-head .section-title {
  margin: 0;
}

.library-filters {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-2);
}

.library-list {
  display: grid;
  gap: var(--space-2);
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.library-item {
  border: 1px solid #32595f;
  border-radius: var(--radius-sm);
  background: rgba(15, 25, 27, 0.95);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.library-item:hover {
  border-color: #59c8ad;
}

.library-item.active {
  border-color: #59c7ad;
  box-shadow: inset 0 0 0 1px rgba(85, 175, 148, 0.36);
  background: rgba(19, 34, 31, 0.95);
}

.library-item-main {
  min-width: 0;
}

.library-item-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #e1f1ed;
}

.library-item-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.library-tag {
  white-space: nowrap;
  font-size: 11px;
  color: #c7e2dc;
  border: 1px solid #3a696f;
  border-radius: 999px;
  padding: 2px 8px;
}

.feature-hint {
  margin: 0;
  font-size: 12px;
  min-height: 18px;
}

.condition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.condition-grid .editor-label {
  margin-top: 6px;
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  align-items: end;
}

.focus-panel {
  position: relative;
  overflow: hidden;
}

.exercise-title {
  margin: 0;
  font-size: clamp(22px, 2vw, 28px);
}

.exercise-target {
  margin: var(--space-2) 0 var(--space-3);
  color: #bcd9d3;
  font-weight: 600;
}

.coach-message {
  margin: 0 0 var(--space-3);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #345b61;
  background: linear-gradient(135deg, #17312f, #132726);
  color: #dcece8;
  font-weight: 600;
}

.status-strip {
  margin: 0 0 var(--space-3);
  padding: 10px;
  border: 1px solid #37686f;
  border-radius: var(--radius-md);
  background: rgba(12, 23, 24, 0.9);
  display: grid;
  gap: 6px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(222, 247, 240, 0.1) inset;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  width: fit-content;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-pill.status-ready {
  color: #d5ece8;
  border-color: #4c7a7f;
  background: rgba(22, 35, 33, 0.95);
}

.status-pill.status-active {
  color: #eaf7f4;
  border-color: #69d0b6;
  background: linear-gradient(135deg, #39cda9, #2d997f);
}

.status-pill.status-done {
  color: #eafff6;
  border-color: #49c29e;
  background: linear-gradient(135deg, #2f9f8b, #247b6a);
}

.anxiety-coach-box {
  margin: 0 0 var(--space-4);
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid #376168;
  background: rgba(17, 29, 30, 0.9);
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(224, 247, 241, 0.09) inset;
}

.anxiety-coach-box .section-title {
  margin-bottom: var(--space-2);
}

.coach-headline {
  margin: 0 0 var(--space-2);
  font-size: 14px;
  font-weight: 700;
  color: #d9ece8;
}

.pr-current-box {
  margin: 0 0 var(--space-4);
  border: 1px solid #3b656b;
  border-radius: var(--radius-md);
  background: rgba(16, 30, 31, 0.9);
  padding: 10px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(222, 247, 240, 0.1) inset;
}

.pr-current-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.set-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.set-item {
  border: 1px solid #31565d;
  border-radius: var(--radius-sm);
  background: #14252a;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.set-item.done {
  border-color: #2f7a62;
  background: #172f28;
}

.set-index {
  font-weight: 800;
  color: #d6e8e5;
}

.set-target {
  font-size: 13px;
  color: #c4dbd7;
}

.set-status {
  font-size: 12px;
  color: var(--text-muted);
}

.set-controls {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.rest-box {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(18, 31, 32, 0.84);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(220, 246, 238, 0.1) inset;
}

.rest-box p {
  margin: 0 0 var(--space-2);
}

.rest-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.guide-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(18, 31, 32, 0.88);
  padding: var(--space-3);
  min-height: 118px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(220, 246, 238, 0.08) inset;
}

.guide-card h3 {
  margin: 0 0 var(--space-2);
  font-size: 14px;
  color: #cde7e3;
}

.guide-card:nth-child(1) h3::before {
  content: "?쭬 ";
}

.guide-card:nth-child(2) h3::before {
  content: "?숋툘 ";
}

.guide-card:nth-child(3) h3::before {
  content: "?첄 ";
}

.guide-card.warning h3::before {
  content: "?좑툘 ";
}

.guide-card p {
  margin: 0;
  font-size: 13px;
  color: #c3d7d4;
}

.guide-card.warning {
  border-color: #73593b;
  background: rgba(46, 35, 21, 0.45);
}

.video-link-box {
  margin-top: var(--space-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(17, 30, 31, 0.88);
  padding: var(--space-3);
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(220, 246, 238, 0.09) inset;
}

.video-link-box h3 {
  margin: 0 0 var(--space-2);
  font-size: 14px;
  color: #cce7e2;
}

.video-link-box h3::before {
  content: "?렗 ";
}

.video-link-box p {
  margin: 0 0 var(--space-2);
  font-size: 13px;
}

.video-link-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.link-btn {
  width: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.habit-box {
  margin-bottom: var(--space-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(17, 30, 31, 0.9);
  padding: 10px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(222, 247, 240, 0.09) inset;
}

.weekly-report-box {
  margin-bottom: var(--space-3);
  border: 1px solid #3a666b;
  border-radius: var(--radius-md);
  background: rgba(17, 31, 32, 0.92);
  padding: 10px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(222, 247, 240, 0.09) inset;
}

.weekly-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

#weeklyReportAction {
  margin: var(--space-2) 0 0;
  font-size: 13px;
}

.pr-board-box {
  margin-bottom: var(--space-3);
  border: 1px solid #3a666b;
  border-radius: var(--radius-md);
  background: rgba(17, 30, 31, 0.91);
  padding: 10px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(222, 247, 240, 0.09) inset;
}

.pr-board-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.adaptive-box {
  margin-bottom: var(--space-3);
  border: 1px solid #395f66;
  border-radius: var(--radius-md);
  background: rgba(20, 34, 32, 0.92);
  padding: 10px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(222, 247, 240, 0.09) inset;
}

.adaptive-title {
  margin: 0 0 var(--space-2);
  font-size: 14px;
  font-weight: 700;
  color: #d8ece8;
}

.growth-box {
  margin-bottom: var(--space-3);
  border: 1px solid #3a666b;
  border-radius: var(--radius-md);
  background: rgba(17, 31, 32, 0.92);
  padding: 10px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(222, 247, 240, 0.09) inset;
}

.growth-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

#growthTrendHint {
  margin: 0 0 var(--space-2);
  font-size: 13px;
}

.growth-highlights .history-item {
  font-size: 12px;
}

.habit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.habit-head .section-title {
  margin: 0;
}

.habit-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

#weeklyGoalHint {
  margin: var(--space-2) 0 0;
  font-size: 13px;
}

.timer-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.stat-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(13, 22, 24, 0.92);
  padding: 10px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(224, 247, 241, 0.11) inset;
}

.stat-label {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.stat-value {
  margin: var(--space-1) 0 0;
  font-size: 22px;
  font-weight: 700;
  color: #e5f3f0;
  font-family: "JetBrains Mono", monospace;
}

.range-label {
  margin: var(--space-3) 0 var(--space-2);
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.history-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(12, 21, 23, 0.9);
  padding: 10px;
  font-size: 13px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(220, 246, 238, 0.08) inset;
}

.history-empty {
  border: 1px dashed #37686f;
  border-radius: var(--radius-sm);
  background: rgba(11, 20, 22, 0.88);
  color: var(--text-muted);
  padding: 12px;
  font-size: 13px;
}

.analytics-box {
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(12, 22, 24, 0.92);
  padding: 10px;
  box-shadow:
    var(--shadow-card),
    0 1px 0 rgba(222, 247, 240, 0.1) inset;
}

.analytics-period {
  margin: 8px 0;
  font-size: 12px;
}

.analytics-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.analytics-tab-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.analytics-tab-btn.active {
  color: #eaf7f4;
  background: linear-gradient(135deg, #3dcca8, #2c9a7f);
  border-color: #66cdb3;
}

.analytics-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.analytics-list {
  margin-top: var(--space-2);
}

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 16px rgba(3, 10, 10, 0.28),
    0 1px 0 rgba(226, 247, 240, 0.16) inset,
    0 -2px 0 rgba(5, 13, 13, 0.34) inset;
  transition: transform 0.15s ease, filter 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(236, 250, 246, 0.2), transparent 45%);
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 14px 22px rgba(3, 10, 10, 0.34),
    0 1px 0 rgba(226, 247, 240, 0.2) inset,
    0 -2px 0 rgba(5, 13, 13, 0.36) inset;
}

.btn:active {
  transform: translateY(1px);
  box-shadow:
    var(--shadow-press),
    0 1px 0 rgba(226, 247, 240, 0.14) inset,
    0 -1px 0 rgba(5, 13, 13, 0.25) inset;
}

.btn:focus-visible,
.day-btn:focus-visible,
.queue-name:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.btn.primary {
  color: #f3fbf8;
  border-color: #67cfb5;
  background: linear-gradient(135deg, #3ecfab, #2b977d);
}

.btn.secondary {
  color: #d9ece8;
  border-color: #376a70;
  background: linear-gradient(135deg, #1a302f, #172927);
}

.btn.ghost {
  color: #d2e9e4;
  border-color: #35646b;
  background: #122427;
}

.btn.full {
  width: 100%;
  margin-top: var(--space-3);
}

.muted {
  color: var(--text-muted);
}

body.modal-open {
  overflow: hidden;
}

.manual-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 20px;
}

.manual-modal[hidden] {
  display: none !important;
}

.manual-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(7, 11, 10, 0.78);
  cursor: pointer;
  z-index: 0;
}

.manual-card {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid #37686f;
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(16, 27, 25, 0.97), rgba(11, 19, 20, 0.98));
  box-shadow:
    0 28px 48px rgba(2, 7, 6, 0.62),
    0 1px 0 rgba(226, 247, 240, 0.16) inset,
    0 -18px 26px rgba(4, 12, 12, 0.45) inset;
  padding: 16px;
}

.manual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.manual-head h2 {
  margin: 0;
  font-size: 20px;
}

.manual-intro {
  margin: var(--space-2) 0 var(--space-3);
}

.manual-section {
  border: 1px solid #35666d;
  border-radius: var(--radius-md);
  background: rgba(10, 19, 20, 0.9);
  padding: 10px;
  margin-top: var(--space-2);
}

.manual-section h3 {
  margin: 0 0 var(--space-2);
  font-size: 15px;
  color: #d8ece8;
}

.manual-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.manual-list li {
  font-size: 14px;
  color: #c7dddd;
  line-height: 1.45;
}

.footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 34px;
  color: #8ea9a4;
  font-size: 13px;
}

.reveal {
  animation: rise 0.55s ease both;
}

.layout .panel:nth-child(1) {
  animation-delay: 0.06s;
}

.layout .panel:nth-child(2) {
  animation-delay: 0.12s;
}

.layout .panel:nth-child(3) {
  animation-delay: 0.18s;
}

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

@keyframes scanline {
  0% {
    transform: translateX(-55%);
    opacity: 0;
  }
  20% {
    opacity: 0.55;
  }
  70% {
    opacity: 0.35;
  }
  100% {
    transform: translateX(55%);
    opacity: 0;
  }
}

@media (max-width: 1240px) {
  .layout {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .layout .panel:nth-child(1) {
    grid-column: span 2;
  }

  .layout .panel:nth-child(2) {
    grid-column: span 4;
  }

  .layout .panel:nth-child(3) {
    grid-column: span 6;
  }
}

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

  .layout .panel:nth-child(1),
  .layout .panel:nth-child(2),
  .layout .panel:nth-child(3) {
    grid-column: auto;
  }

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

  .panel:hover {
    transform: none;
  }
}

@media (max-width: 700px) {
  .hero,
  .layout,
  .footer {
    width: calc(100% - 20px);
  }

  .hero {
    margin-top: 12px;
    padding: 16px;
  }

  .panel {
    padding: 14px;
  }

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

  .editor-set-row {
    grid-template-columns: 56px minmax(0, 1fr) 76px auto;
  }

  .library-filters {
    grid-template-columns: 1fr;
  }

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

  .feature-head {
    flex-direction: column;
    align-items: stretch;
  }

  .analytics-stats {
    grid-template-columns: 1fr;
  }

  .habit-head {
    flex-direction: column;
    align-items: stretch;
  }

  .habit-stats {
    grid-template-columns: 1fr;
  }

  .growth-stats {
    grid-template-columns: 1fr;
  }

  .pr-current-grid,
  .weekly-report-grid,
  .pr-board-stats {
    grid-template-columns: 1fr;
  }

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

  .auth-actions .chip,
  #cloudSyncBtn,
  #authLogoutBtn,
  .auth-email-input,
  .auth-password-input {
    grid-column: span 2;
  }

  #authLoginBtn,
  #authSignupBtn,
  #authGoogleBtn,
  #authKakaoBtn {
    grid-column: span 1;
  }

  .auth-email-input,
  .auth-password-input {
    width: 100%;
  }

  .manual-modal {
    padding: 12px;
  }

  .manual-card {
    max-height: calc(100vh - 24px);
    padding: 12px;
  }

  .manual-head {
    flex-direction: column;
    align-items: stretch;
  }
}


