:root {
  --canvas: #eef4f1;
  --canvas-deep: #e4ece8;
  --paper: #fffefa;
  --paper-strong: #ffffff;
  --ink: #172522;
  --muted: #5f6f69;
  --muted-soft: #7c8b85;
  --line: #d7e0dc;
  --line-strong: #c6d2cd;
  --teal: #0f766e;
  --teal-dark: #0a5d57;
  --teal-soft: #dcefe9;
  --yellow: #f5c542;
  --yellow-soft: #fff4cf;
  --coral: #d97757;
  --coral-soft: #fbe9e1;
  --blue: #507fa6;
  --blue-soft: #e5eef5;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 18px 50px rgba(23, 37, 34, 0.08);
  --shadow-card: 0 1px 0 rgba(23, 37, 34, 0.04), 0 12px 30px rgba(23, 37, 34, 0.05);
  --focus: #f5c542;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  word-break: keep-all;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

svg {
  display: block;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 24px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(198, 210, 205, 0.72);
  background: rgba(238, 244, 241, 0.94);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--teal);
}

.brand-mark svg {
  width: 27px;
  height: 27px;
  fill: var(--yellow);
}

.header-note {
  color: var(--muted);
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.72);
  padding: 3px;
}

.nav-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link[aria-current="page"] {
  background: var(--ink);
  color: #ffffff;
}

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.72);
  color: var(--muted);
  padding: 7px 11px;
  font-size: 13px;
  white-space: nowrap;
}

.privacy-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--teal);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper-strong);
  padding: 10px 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.button:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.1);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.button-primary:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.button-secondary {
  background: rgba(255, 254, 250, 0.78);
}

.button-danger {
  border-color: #9b3f2d;
  background: #9b3f2d;
  color: #ffffff;
}

.button-danger:hover {
  border-color: #7f3021;
  background: #7f3021;
}

.button-full {
  width: 100%;
}

.button-small {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 13px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper-strong);
  cursor: pointer;
  list-style: none;
}

.icon-button::-webkit-details-marker {
  display: none;
}

.more-menu {
  position: relative;
}

.more-menu[open] .icon-button {
  border-color: var(--teal);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  width: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-strong);
  box-shadow: var(--shadow-soft);
  padding: 6px;
}

.menu-panel button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.menu-panel button:hover {
  background: var(--canvas);
}

.menu-panel .danger {
  color: #9b3f2d;
}

button:focus-visible,
summary:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.notice-stack {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #bfd8d0;
  border-radius: var(--radius-md);
  background: var(--teal-soft);
  padding: 14px 16px;
  color: var(--ink);
  font-size: 14px;
}

.notice-warning {
  border-color: #e8b6a5;
  background: var(--coral-soft);
}

.notice-demo {
  border-color: #ead27f;
  background: var(--yellow-soft);
}

.notice-demo strong {
  color: #805d00;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
  padding: clamp(54px, 8vw, 96px) 0 64px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 5.4vw, 68px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: 0;
}

.intro-lead {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.75;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.microcopy {
  margin: 16px 0 0;
  color: var(--muted-soft);
  font-size: 13px;
}

.intro-board {
  position: relative;
  overflow: hidden;
  border: 1px solid #263b36;
  border-radius: 26px;
  background: var(--ink);
  padding: 26px;
  color: #eaf2ef;
  box-shadow: 0 22px 0 var(--canvas-deep), 0 34px 80px rgba(23, 37, 34, 0.18);
}

.intro-board::before {
  position: absolute;
  top: -40px;
  right: -42px;
  width: 150px;
  height: 150px;
  border: 30px solid rgba(245, 197, 66, 0.12);
  border-radius: 50%;
  content: "";
}

.board-topline,
.board-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.board-topline {
  color: #c7d7d2;
  font-size: 14px;
}

.board-chip {
  border: 1px solid rgba(234, 242, 239, 0.22);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
}

.board-number {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 34px;
}

.board-number strong {
  color: var(--yellow);
  font-size: clamp(56px, 7vw, 82px);
  font-weight: 850;
  line-height: 1;
}

.board-number span {
  color: #c7d7d2;
  font-size: 18px;
}

.board-rule {
  height: 1px;
  margin: 28px 0 20px;
  background: rgba(234, 242, 239, 0.16);
}

.board-row {
  padding: 8px 0;
  color: #c7d7d2;
  font-size: 14px;
}

.board-row strong {
  color: #ffffff;
}

.intro-board p {
  position: relative;
  margin: 22px 0 0;
  color: #aebfba;
  font-size: 13px;
  line-height: 1.7;
}

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

.add-view-head {
  padding: clamp(38px, 6vw, 74px) 0 30px;
}

.add-view-head h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 4.8vw, 58px);
  font-weight: 850;
  line-height: 1.16;
}

.add-view-head > p:last-child {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.back-home {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.78);
  padding: 8px 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.back-home:hover {
  border-color: var(--teal);
  background: var(--paper-strong);
}

.add-panel {
  display: grid;
  gap: 18px;
  padding-bottom: 56px;
}

.add-shoe-context {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1fr);
  gap: 16px 28px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.add-shoe-context h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.3;
}

.add-shoe-select {
  margin: 0;
}

.add-shoe-select select {
  margin-top: 6px;
}

.selected-shoe-summary {
  grid-column: 1 / -1;
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

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

.add-method {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.add-method-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.add-method-icon .icon {
  width: 24px;
  height: 24px;
}

.add-method h2 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.3;
}

.add-method > p:not(.eyebrow) {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.add-method .button {
  margin-top: auto;
}

.privacy-note {
  margin: 0;
  border-radius: var(--radius-md);
  background: var(--teal-soft);
  padding: 14px 16px;
  color: var(--teal-dark);
  font-size: 13px;
  line-height: 1.65;
}

.mobile-view-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: none;
  border-top: 1px solid var(--line-strong);
  background: rgba(255, 254, 250, 0.96);
  padding: 8px 14px max(8px, env(safe-area-inset-bottom));
  backdrop-filter: blur(16px);
}

.mobile-view-nav .nav-link {
  flex: 1;
  flex-direction: column;
  gap: 2px;
  border-radius: 12px;
  font-size: 12px;
}

.overview,
.wardrobe,
.journal,
.guide {
  padding: 38px 0 48px;
}

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

.section-heading h2,
.guide-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 820;
  line-height: 1.25;
  letter-spacing: 0;
}

.section-meta {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
}

.summary-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.summary-card-total {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.summary-card-review {
  background: var(--yellow-soft);
  border-color: #ead27f;
}

.summary-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.summary-card-total .summary-label,
.summary-card-total p {
  color: #d5e8e3;
}

.summary-card strong {
  display: block;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 840;
  line-height: 1.1;
}

.summary-card strong small {
  font-size: 16px;
  font-weight: 650;
}

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

.section-description {
  margin: -10px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.shoe-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 300px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.shoe-card.is-default {
  border-color: #9dc7ba;
  background: #f6fbf8;
}

.shoe-card::after {
  position: absolute;
  right: 18px;
  bottom: 17px;
  width: 44px;
  height: 10px;
  border-radius: 999px;
  background: var(--canvas-deep);
  content: "";
  opacity: 0.65;
}

.shoe-card.is-default::after {
  background: var(--yellow);
  opacity: 0.7;
}

.shoe-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shoe-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: var(--canvas);
}

.shoe-icon svg {
  width: 35px;
  height: 35px;
  fill: var(--teal);
}

.shoe-card.is-default .shoe-icon {
  background: var(--teal-soft);
}

.default-pill {
  border-radius: 999px;
  background: var(--teal-soft);
  padding: 5px 10px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.shoe-name {
  margin: 18px 0 3px;
  overflow-wrap: anywhere;
  font-size: 19px;
  font-weight: 820;
  line-height: 1.35;
}

.shoe-type {
  color: var(--muted);
  font-size: 14px;
}

.shoe-km {
  margin-top: 22px;
  font-size: 38px;
  font-weight: 850;
  line-height: 1;
}

.shoe-km small {
  font-size: 15px;
  font-weight: 600;
}

.shoe-caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.milestone {
  margin-top: auto;
  padding-top: 20px;
}

.milestone-track {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--canvas-deep);
}

.milestone-track::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--canvas-deep);
}

.milestone-track::-webkit-progress-value {
  border-radius: 999px;
  background: var(--teal);
}

.milestone-track::-moz-progress-bar {
  border-radius: 999px;
  background: var(--teal);
}

.milestone-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.shoe-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.text-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.text-button:hover {
  border-color: var(--teal);
  background: var(--canvas);
}

.text-button-danger {
  color: #9b3f2d;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 250, 0.55);
  padding: 44px 24px;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: var(--teal-soft);
}

.empty-state-icon svg {
  width: 34px;
  height: 34px;
  fill: var(--teal);
}

.empty-state strong {
  margin-top: 14px;
  font-size: 18px;
}

.empty-state p {
  max-width: 460px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.journal-heading {
  align-items: end;
}

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

.journal-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.range-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 3px;
}

.range-switch button {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 7px 12px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.range-switch button.is-active {
  background: var(--ink);
  color: #ffffff;
}

.day-list {
  display: grid;
  gap: 8px;
}

.day-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(23, 37, 34, 0.03);
}

.day-card[open] {
  border-color: #b9cec7;
  box-shadow: var(--shadow-card);
}

.day-card summary {
  display: grid;
  grid-template-columns: 22px minmax(130px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.day-card summary::-webkit-details-marker {
  display: none;
}

.day-chevron {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: var(--canvas);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: transform 150ms ease;
}

.day-card[open] .day-chevron {
  transform: rotate(45deg);
}

.day-date {
  font-size: 15px;
  font-weight: 780;
}

.day-status {
  border-radius: 999px;
  background: var(--canvas);
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.day-status.is-review {
  background: var(--yellow-soft);
  color: #805d00;
}

.day-status.is-mixed {
  background: var(--blue-soft);
  color: #355f80;
}

.day-distance {
  min-width: 84px;
  text-align: right;
  font-size: 17px;
  font-weight: 820;
  white-space: nowrap;
}

.day-body {
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px 50px;
}

.day-controls {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.day-controls label,
.segment-assignment label {
  margin: 0;
}

.day-controls select,
.segment-assignment select {
  min-height: 42px;
  margin-top: 0;
}

.day-controls p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.segment-list {
  display: grid;
}

.segment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
  gap: 14px;
  align-items: start;
  border-top: 1px solid #edf1ef;
  padding: 13px 0;
}

.segment-row:first-child {
  border-top: 0;
}

.segment-title {
  font-size: 14px;
  font-weight: 720;
}

.pending-tag,
.excluded-tag,
.confirmed-tag {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 780;
}

.pending-tag {
  color: #805d00;
}

.excluded-tag {
  color: #7a3f3f;
}

.confirmed-tag {
  color: var(--teal-dark);
}

.segment-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.segment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.pending-tag {
  color: #8b6200;
  font-weight: 750;
}

.excluded-tag {
  color: var(--muted-soft);
}

.guide {
  margin-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.guide-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.guide-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--teal);
  font-size: 22px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.guide-grid article {
  border-top: 2px solid var(--ink);
  padding-top: 17px;
}

.guide-index {
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
}

.guide-grid h3 {
  margin: 10px 0 8px;
  font-size: 18px;
}

.guide-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.help-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 250, 0.68);
}

.help-panel summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 780;
}

.help-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  border-top: 1px solid var(--line);
  padding: 20px 22px 24px;
}

.help-content h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.help-content p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 14px;
}

.muted {
  color: var(--muted-soft) !important;
  font-size: 13px !important;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line-strong);
  padding: 28px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

.app-footer div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.app-footer strong {
  color: var(--ink);
  font-size: 18px;
}

.dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper-strong);
  padding: 0;
  color: var(--ink);
  box-shadow: 0 32px 90px rgba(23, 37, 34, 0.25);
}

.dialog::backdrop {
  background: rgba(23, 37, 34, 0.46);
  backdrop-filter: blur(4px);
}

.dialog form {
  padding: 26px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.close-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--canvas);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

label {
  display: block;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #ffffff;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 16px;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: 0 0 auto;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  line-height: 1.55;
}

.label-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.form-note,
.dialog-summary {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.dialog-summary {
  border-radius: 12px;
  background: var(--canvas);
  padding: 12px 14px;
  color: var(--ink);
}

.import-file-summary {
  border: 1px solid #bfd8d0;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.import-scope-note {
  border-left: 3px solid var(--teal);
  padding-left: 10px;
  color: var(--ink);
}

.import-scope-note strong {
  color: var(--teal-dark);
}

.range-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 16px;
}

.range-presets button {
  min-height: 44px;
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-strong);
  padding: 7px 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.range-presets button:hover {
  border-color: var(--teal);
  color: var(--ink);
}

.range-presets button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

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

.today {
  padding: 4px 0 26px;
}

.today-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border: 1px solid #cfe0d9;
  border-radius: var(--radius-lg);
  background: #f4fbf8;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.today-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.3;
}

.today-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.today-summary {
  margin-top: 10px;
  color: var(--teal-dark);
  font-weight: 700;
}

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

.day-wear {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 12px;
}

.wear-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.wear-chip {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 4px;
  border: 1px solid #bfd8d0;
  border-radius: 999px;
  background: var(--teal-soft);
  padding: 2px 2px 2px 12px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
}

.wear-chip button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.wear-chip button:hover {
  background: rgba(15, 118, 110, 0.14);
}

.wear-empty {
  color: var(--muted-soft);
  font-size: 13px;
}

.wear-photo-preview {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--canvas);
}

.wear-photo-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.wear-match-choices {
  display: grid;
  gap: 9px;
}

.wear-match-choice {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 12px 14px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.wear-match-choice:hover,
.wear-match-choice:focus-visible {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.wear-match-choice span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wear-match-choice b {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 12px;
}

.wear-match-new-shoe {
  margin-top: 14px;
}

.retired-view-head {
  padding: clamp(38px, 6vw, 74px) 0 26px;
}

.retired-view-head h1 {
  margin: 0;
  font-size: clamp(34px, 4.8vw, 58px);
  font-weight: 850;
  line-height: 1.16;
}

.retired-view-head > p:last-child {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.retired-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 56px;
}

.retired-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.retired-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.retired-pill {
  border-radius: 999px;
  background: var(--canvas-deep);
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.retired-card h2 {
  margin: 18px 0 4px;
  overflow-wrap: anywhere;
  font-size: 22px;
  font-weight: 820;
  line-height: 1.35;
}

.retired-period {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.retired-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.retired-numbers div {
  min-width: 0;
  border-top: 2px solid var(--ink);
  padding-top: 10px;
}

.retired-numbers span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.retired-numbers strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  font-weight: 830;
  line-height: 1.1;
}

.retired-numbers small {
  font-size: 12px;
  font-weight: 600;
}

.retired-detail {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.retired-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
}

@media (max-width: 980px) {
  .header-note,
  .privacy-chip {
    display: none;
  }

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

  .intro-board {
    max-width: 620px;
  }

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

  .summary-card-total {
    grid-column: 1 / -1;
  }

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

  .add-shoe-context {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .app-shell {
    width: min(100% - 28px, 1180px);
    padding-bottom: 96px;
  }

  .app-header {
    min-height: 72px;
  }

  .brand {
    font-size: 21px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .header-actions .button-primary {
    width: 46px;
    padding: 0;
    font-size: 0;
  }

  .header-actions .button-primary .icon {
    width: 20px;
    height: 20px;
  }

  .header-nav {
    display: none;
  }

  .mobile-view-nav {
    display: flex;
  }

  .intro {
    gap: 0;
    padding: 30px 0 24px;
  }

  .intro h1 {
    font-size: clamp(36px, 10.5vw, 46px);
  }

  .intro-lead {
    margin-top: 18px;
    font-size: 16px;
  }

  .intro-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .intro-board {
    display: none;
  }

  .board-number strong {
    font-size: 58px;
  }

  .overview,
  .wardrobe,
  .journal,
  .guide {
    padding: 30px 0 38px;
  }

  .wardrobe {
    padding-top: 18px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .summary-grid,
  .shoe-grid,
  .guide-grid,
  .help-content {
    grid-template-columns: 1fr;
  }

  .shoe-grid {
    grid-auto-columns: minmax(238px, 82%);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 2px 2px 12px;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
  }

  .shoe-grid::-webkit-scrollbar {
    display: none;
  }

  .shoe-card {
    scroll-snap-align: start;
  }

  .summary-card-total {
    grid-column: auto;
  }

  .shoe-card {
    min-height: 270px;
  }

  .journal-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .range-switch {
    width: 100%;
  }

  .range-switch button {
    flex: 1;
  }

  .day-card summary {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px;
  }

  .day-status {
    display: none;
  }

  .day-distance {
    min-width: 72px;
    font-size: 15px;
  }

  .day-body {
    padding: 14px 12px 16px 42px;
  }

  .day-controls,
  .segment-row {
    grid-template-columns: 1fr;
  }

  .segment-actions {
    justify-content: flex-start;
  }

  .guide-heading {
    align-items: flex-start;
  }

  .guide-mark {
    display: none;
  }

  .help-content {
    gap: 20px;
  }

  .app-footer,
  .app-footer div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .add-view-head {
    padding: 30px 0 24px;
  }

  .add-view-head h1 {
    font-size: clamp(33px, 10vw, 42px);
  }

  .add-view-head > p:last-child {
    font-size: 16px;
  }

  .back-home {
    margin-bottom: 22px;
  }

  .add-shoe-context,
  .add-method {
    padding: 18px;
    border-radius: 20px;
  }

  .add-methods {
    grid-template-columns: 1fr;
  }

  .add-method {
    min-height: 0;
  }

  .today-card {
    grid-template-columns: 1fr;
    padding: 18px;
    border-radius: 20px;
  }

  .today-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .day-wear {
    align-items: flex-start;
    flex-direction: column;
  }

  .retired-list {
    grid-template-columns: 1fr;
  }

  .retired-numbers {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: min(100% - 22px, 1180px);
  }

  .intro {
    padding: 22px 0 16px;
  }

  .intro h1 {
    font-size: 34px;
  }

  .intro-lead {
    margin-top: 15px;
    font-size: 15px;
    line-height: 1.6;
  }

  .intro-actions {
    margin-top: 20px;
  }

  .intro .microcopy {
    display: none;
  }

  .wardrobe {
    padding-top: 12px;
  }

  .section-heading {
    margin-bottom: 14px;
  }

  .summary-card,
  .shoe-card {
    padding: 18px;
    border-radius: 20px;
  }

  .day-body {
    padding-left: 12px;
  }

  .retired-card {
    padding: 18px;
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

[hidden] {
  display: none !important;
}

body.auth-pending .app-shell,
body.auth-pending .mobile-view-nav,
body.auth-pending .skip-link {
  display: none;
}

body.auth-ready .auth-screen {
  display: none;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(15, 118, 110, 0.05) 1px, transparent 1px),
    var(--canvas);
  background-size: 40px 40px;
}

.auth-layout {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  gap: 52px;
  align-items: center;
}

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

.auth-brand-mark {
  margin-bottom: 22px;
}

.auth-copy h1 {
  margin: 10px 0 18px;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.auth-copy > p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.auth-panel {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--paper-strong);
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.auth-panel h2 {
  margin: 4px 0 4px;
  font-size: 28px;
  line-height: 1.15;
}

.auth-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-pin-label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.auth-pin-label input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--canvas);
  padding: 10px 14px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: center;
}

.auth-pin-label input::placeholder {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
}

.auth-message,
.admin-notice {
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 650;
}

.auth-message.is-error,
.admin-notice.is-error {
  background: var(--coral-soft);
  color: #9f442e;
}

.auth-footnote {
  text-align: center;
  font-size: 13px !important;
}

.auth-user {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.78);
  padding: 4px 5px 4px 12px;
  white-space: nowrap;
}

.auth-user-name {
  font-size: 14px;
  font-weight: 800;
}

.auth-role {
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 750;
}

.auth-user .text-button {
  min-height: 32px;
  padding: 4px 8px;
}

.admin-view-head {
  padding: 42px 0 30px;
  border-bottom: 1px solid var(--line);
}

.admin-view-head h1 {
  margin: 8px 0 12px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
}

.admin-view-head > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.admin-panel {
  padding: 34px 0 48px;
}

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.admin-toolbar h2 {
  margin: 0 0 6px;
  font-size: 25px;
}

.admin-toolbar p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-user-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 0.7fr) minmax(130px, 0.6fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 18px;
}

.admin-user-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.admin-user-form input,
.admin-user-form select,
.admin-pin-label input {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-strong);
  padding: 8px 10px;
  color: var(--ink);
}

.admin-notice {
  margin: 14px 0 0;
}

.admin-user-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 16px 18px;
}

.admin-user-row.is-disabled {
  background: var(--canvas-deep);
  opacity: 0.78;
}

.admin-user-main {
  min-width: 0;
}

.admin-user-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.admin-user-name strong {
  font-size: 17px;
}

.admin-role-badge,
.admin-self,
.admin-disabled {
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 750;
}

.admin-role-badge.is-admin {
  background: var(--yellow-soft);
  color: #8a6200;
}

.admin-self {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.admin-disabled {
  background: var(--coral-soft);
  color: #9f442e;
}

.admin-user-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.admin-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--paper);
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .auth-copy h1 {
    font-size: clamp(36px, 8vw, 52px);
  }

  .auth-panel {
    max-width: 520px;
  }

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

  .admin-user-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .auth-screen {
    align-items: start;
    padding: 30px 16px 40px;
  }

  .auth-panel {
    padding: 22px;
    border-radius: 18px;
  }

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

  .auth-user {
    padding-left: 9px;
  }

  .auth-user .auth-role {
    display: none;
  }

  .admin-view-head {
    padding: 30px 0 24px;
  }

  .admin-toolbar,
  .admin-user-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-toolbar .button,
  .admin-user-actions {
    width: 100%;
  }

  .admin-user-actions {
    justify-content: flex-start;
  }

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