:root {
  --paper: #faf8f2;
  --white: #fffefa;
  --ink: #24362c;
  --muted: #596b60;
  --green: #c9e66e;
  --deep: #315b40;
  --pink: #f5c5d0;
  --blue: #c5e5e9;
  --orange: #ee9564;
  --line: #ddd9cd;
  --sans: 'DM Sans', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

body {
  color: var(--ink);
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font-family: var(--sans);
}

.sidebar {
  background: #f1efe6;
  border-right-color: #ddd9ce;
}

.brand {
  color: #24382d;
}

.brand-ball {
  background: #c9e66e;
  box-shadow: 0 3px 0 #78934b;
}

.nav-caption,
.section-kicker,
.eyebrow {
  color: #526b59;
  font-weight: 600;
  font-size: 9px;
}

.nav-item {
  color: #41564a;
  font-weight: 600;
  font-size: 12.5px;
  gap: 10px;
  padding-inline: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  white-space: nowrap;
}

.nav-item.active,
.nav-item:hover {
  color: #244431;
  background: #e4edcf;
  border-color: #d4e1bb;
}

.nav-item i,
.sidebar-footer,
.today-label,
.crumb-soft {
  color: #65766a;
}

.nav-item i {
  font-size: 8px;
  white-space: nowrap;
}

.sidebar-note {
  color: #4e6254;
  border: 1px solid #efd7c6;
  border-radius: 5px;
  box-shadow: 0 5px 14px #463a2315;
}

.scribble {
  color: #315b40;
}

.sidebar-footer {
  border-top-color: #d9d6cb;
}

.cover {
  background: #edf2e5;
  border: 1px solid #d8e2cc;
  border-radius: 18px;
  box-shadow: 0 12px 30px #31442d0d;
}

.cover h1,
.inner-title {
  color: #263b2f;
}

.cover h1 em,
.inner-title em {
  color: #47734e;
}

.eyebrow-line {
  background: #78966d;
}

.cover-date,
.cover-chinese,
.inner-subtitle,
.journey-day,
.cover-bottom,
.bottom-note b,
.journey-full-content,
.session-meta,
.gear-item-body p,
.map-summary,
.map-legend,
.court-detail-head p {
  color: #52665a;
}

.journey-day b,
.cover-bottom b {
  color: #416449;
}

.cover-bottom {
  font-size: 9px;
}

.stats-range,
.stat-label,
.stat-label small,
.nav-item i,
.journey-full-label,
.field > span,
.field > span i,
.field input::placeholder,
.field textarea::placeholder,
.gear-item-date,
.collection-empty p,
.map-attribution-note,
.map-attribution-note a,
.detail-back,
.filter-tab {
  color: #5d7063;
}

.stats-range {
  border-bottom-color: #d9d5c9;
  color: #506457;
}

.stats-range label,
.stats-range select {
  color: #405849;
  font-size: 11px;
}

.stat-item {
  border-color: #ddd9cd;
}

.stat-number {
  color: #315b40;
}

.journey-board,
.journey-full-row,
.month-card,
.session-card,
.gear-hub-card,
.gear-item,
.world-map-wrap,
.detail-paper {
  border: 1px solid #e1ddd1;
  box-shadow: 0 5px 18px #35432f0b;
}

.month-card,
.session-card,
.gear-hub-card,
.gear-item,
.world-map-wrap {
  border-radius: 13px;
}

.month-card:hover,
.session-card:hover,
.gear-hub-card:hover,
.gear-item:hover {
  border-color: #bfceaa;
  box-shadow: 0 9px 24px #35432f14;
}

.journey-full-month,
.session-title,
.gear-item-body h3,
.section-heading h2,
.court-detail-head h3 {
  color: #2c4635;
}

.month-card.future {
  opacity: 1;
  background: #fffefa;
  border-color: #ded9cb;
}

.month-card .month-title {
  color: #475d4d;
  font-size: 10px;
  font-weight: 600;
}

.month-card .month-count {
  color: #42674a;
  font-weight: 700;
}

.month-card .month-focus {
  color: #617468;
  font-size: 10px;
}

.stat-label {
  color: #43594a;
  font-size: 10px;
  font-weight: 600;
}

.stat-label small {
  color: #52675a;
}

.section-heading h2::after {
  content: '✳';
  display: inline-block;
  margin-left: 8px;
  color: #e9946a;
  font: 14px var(--sans);
  vertical-align: 4px;
}

.primary-button,
.save-button {
  color: #fffefa;
  background: #3b6648;
  border: 1px solid #31583d;
  border-radius: 999px;
  box-shadow: 0 4px 0 #294b35;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.primary-button:hover,
.save-button:hover {
  background: #2e563b;
  box-shadow: 0 2px 0 #294b35;
  transform: translateY(2px);
}

.text-link,
.detail-back,
.filter-tab.active {
  color: #315b40;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.detail-input {
  color: #293d31;
  border-color: #d8d6cb;
  background: #fffefa;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.detail-input:focus {
  border-color: #75996d;
  box-shadow: 0 0 0 3px #c9e66e45;
}

.quick-note {
  color: #425c49;
  background: #f2f5e9;
  border-left-color: #e89569;
  border-radius: 8px;
}

.map-filter.active,
.filter-tab.active {
  background: #e6efd4;
  border-color: #c7d8ac;
}

.fab-add {
  background: #315b40;
  color: white;
}

.bulk-backdrop {
  z-index: 24;
}

.bulk-modal {
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  overflow-y: auto;
}

.bulk-instructions {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  margin: 0 0 12px;
  border-left: 3px solid #e9946a;
  border-radius: 7px;
  background: #f1f4e8;
  color: #425d49;
  font-size: 12px;
  line-height: 1.6;
}

.bulk-instructions b {
  color: #294b35;
}

.bulk-instructions span {
  color: #5b7060;
}

.bulk-input {
  display: block;
  width: 100%;
  min-height: 170px;
  padding: 12px;
  resize: vertical;
  border: 1px solid #d8d6cb;
  border-radius: 9px;
  background: #fffefa;
  color: #293d31;
  font: 12px/1.7 var(--mono);
}

.bulk-input:focus {
  outline: none;
  border-color: #75996d;
  box-shadow: 0 0 0 3px #c9e66e45;
}

.bulk-preview {
  min-height: 44px;
  margin-top: 11px;
  padding: 11px 13px;
  border: 1px solid #e1ddd1;
  border-radius: 8px;
  background: #fbfaf6;
  color: #52665a;
  font-size: 12px;
  line-height: 1.6;
}

.bulk-preview > b,
.bulk-preview > span {
  color: #405849;
}

.bulk-preview ul {
  margin: 6px 0 0;
  padding-left: 19px;
}

.bulk-preview .bulk-error,
.bulk-errors {
  color: #9a4d3d;
}

.bulk-errors {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed #e8c7bb;
}

.bulk-errors ul {
  margin-top: 4px;
}

#bulk-import:disabled {
  opacity: .5;
  box-shadow: none;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .bulk-modal {
    padding: 22px 17px 18px;
    max-height: 88vh;
  }

  .bulk-instructions {
    font-size: 11px;
  }

  .bulk-input {
    min-height: 145px;
    font-size: 10px;
  }

  .bulk-preview {
    font-size: 11px;
  }
}

/* Personal archive pages */
.feature-content{display:grid;gap:18px;margin-top:24px}
.feature-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.feature-stats>div{padding:20px 22px;background:#fffdf8;border:1px solid #e9dfce;border-radius:16px;box-shadow:0 5px 18px #55402a0b;display:grid;gap:5px}
.feature-stats b{font:700 27px/1.1 'DM Sans',sans-serif;color:#33493e}
.feature-stats span{font-size:13px;color:#68776a}
.feature-paper,.feature-callout{padding:23px 25px;background:#fffdf8;border:1px solid #e9dfce;border-radius:18px;box-shadow:0 5px 18px #55402a0b}
.feature-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:17px}
.feature-section-head h2{margin:5px 0 0;color:#33493e;font-size:21px}
.skill-chip-list{display:flex;gap:10px;flex-wrap:wrap}
.skill-chip{padding:11px 15px;border-radius:999px;background:#eff3e7;color:#344b3b;font-size:14px}
.skill-chip b{margin-left:7px;color:#74845b;font-size:12px}
.coach-note-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.coach-note{padding:17px;text-align:left;border:1px dashed #d8c9ad;border-radius:13px;background:#fffaf1;color:#465447;cursor:pointer}
.coach-note span,.coach-note small{display:block}.coach-note span{font-family:'Kalam',cursive;font-size:17px;line-height:1.45}.coach-note small{margin-top:12px;color:#758171;font-size:11px}
.feature-empty{min-height:175px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:25px;color:#667264}
.feature-empty>span{font-size:26px;color:#cf906f}.feature-empty>b{margin-top:8px;color:#34493b;font-size:17px}.feature-empty p{max-width:460px;margin:8px 0 15px;line-height:1.7;font-size:13px}.feature-empty.compact{min-height:80px}
.court-guide-list,.coach-guide-list{display:grid;gap:12px}
.court-guide-card{width:100%;display:flex;align-items:center;gap:15px;padding:17px 19px;text-align:left;border:1px solid #e9dfce;border-radius:15px;background:#fffdf8;color:#34493b;cursor:pointer;transition:transform .18s,box-shadow .18s}
.court-guide-card:hover{transform:translateY(-2px);box-shadow:0 9px 24px #55402a14}
.court-guide-pin{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:#f8e7d8;color:#bd795b;font-size:22px;flex:none}
.court-guide-copy{display:grid;gap:5px;min-width:0;flex:1}.court-guide-copy>b{font-size:16px}.court-guide-copy small{font-size:12px;color:#748071}.court-guide-arrow{color:#b97959;font-size:20px}
.feature-callout p{color:#647264;font-size:14px;line-height:1.8}.coach-guide-card{display:flex;gap:17px;padding:22px;border:1px solid #e9dfce;border-radius:16px;background:#fffdf8}.coach-avatar{width:48px;height:48px;display:grid;place-items:center;flex:none;border-radius:50%;background:#e9efd9;color:#4d6548;font-family:'Kalam',cursive;font-size:23px}.coach-guide-body{min-width:0;flex:1}.coach-guide-body h2{margin:6px 0 11px;color:#34493b}.coach-facts{display:flex;gap:8px 17px;flex-wrap:wrap;color:#68776a;font-size:12px}.coach-session-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.coach-session-links button{padding:8px 10px;border:1px dashed #d8c9ad;border-radius:9px;background:#fffbf4;color:#5d6c5e;font-size:11px;cursor:pointer}
.calendar-page-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.calendar-controls{display:flex;gap:7px}.calendar-controls button{min-width:39px;height:38px;padding:0 11px;border:1px solid #dfd5c2;border-radius:10px;background:#fffdf8;color:#465447;cursor:pointer}.calendar-summary{display:flex;align-items:baseline;justify-content:space-between;padding:17px 20px;border-radius:15px;background:#eaf0df;color:#40533f}.calendar-summary b{font-size:21px}.calendar-summary span{font-size:13px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}.calendar-weekday{text-align:center;padding:9px 0;color:#788271;font-size:12px}.calendar-day{position:relative;min-height:92px;padding:9px;text-align:left;vertical-align:top;border:1px solid #e9dfce;border-radius:12px;background:#fffdf8;color:#405040;cursor:pointer}.calendar-day.outside{opacity:.45;background:#f6f2e9}.calendar-day.today{outline:2px solid #87a06d;outline-offset:-2px}.calendar-day.has-session{background:#f5f3e8}.calendar-day-number{display:block;font-size:14px;font-weight:700}.calendar-day-count{display:block;margin-top:7px;color:#bc795c;font-size:11px}.calendar-day-label{display:block;overflow:hidden;margin-top:4px;color:#6b7769;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.calendar-legend{display:flex;justify-content:space-between;color:#718070;font-size:12px}
@media(max-width:760px){.feature-stats{gap:7px}.feature-stats>div{padding:14px 11px}.feature-stats b{font-size:21px}.feature-stats span{font-size:11px}.feature-paper{padding:18px 15px}.coach-note-list{grid-template-columns:1fr}.calendar-page-head{align-items:flex-start}.calendar-day{min-height:70px;padding:6px 4px}.calendar-day-count{font-size:9px}.calendar-day-label{font-size:8px}.calendar-grid{gap:4px}.calendar-summary{gap:8px}.calendar-summary b{font-size:18px}.calendar-summary span{font-size:11px}.court-guide-card{padding:13px}.coach-guide-card{padding:16px;gap:11px}.coach-facts{gap:8px}.calendar-legend{font-size:10px}}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

@media (max-width: 760px) {
  .month-card .month-title,
  .month-card .month-focus {
    font-size: 9px;
  }

  .month-card .month-count {
    font-size: 16px;
  }

  .stat-label {
    font-size: 9px;
  }
}

.court-guide-card{justify-content:space-between}.court-guide-open{min-width:0;display:flex;align-items:center;gap:15px;flex:1;padding:0;text-align:left;border:0;background:transparent;color:inherit;cursor:pointer}.directory-actions{display:flex;gap:7px;flex:none}.directory-actions button{padding:7px 9px;border:1px solid #e7ddcc;border-radius:8px;background:#fffaf2;color:#647363;font-size:11px;cursor:pointer}.directory-actions button:hover{background:#eaf0df;color:#33493e}.coach-guide-body>p{margin:5px 0 10px;color:#788271;font-size:12px}.journey-year-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:36px 0 16px;padding-top:23px;border-top:1px dashed #d9cfbc}.journey-year-heading h2{margin:5px 0;color:#33493e;font-size:24px}.journey-year-heading p{margin:0;color:#718070;font-size:13px}
@media(max-width:760px){.directory-actions{gap:4px}.directory-actions button{padding:6px}.journey-year-heading{align-items:flex-start;flex-direction:column}.court-guide-open{gap:9px}}

.journey-full-row.has-records{background:#f0f5e8;border-color:#b7c99f;box-shadow:0 4px 13px #526b3d12}
.journey-full-row.has-records:before{width:5px;background:#668650}
.journey-full-row.no-records{background:#faf8f2;border-style:dashed;border-color:#d8d1c3}
.journey-full-row.no-records:before{width:4px;background:#d5b48d}
.journey-full-row.no-records .journey-full-month{color:#5c665d}
.journey-full-row .journey-empty{color:#657267;font-style:normal}
.journey-status{display:inline-flex;align-items:center;margin-top:10px;padding:4px 9px;border-radius:999px;font:600 11px var(--sans);letter-spacing:0}
.journey-status.is-written{background:#dce9cb;color:#385638}
.journey-status.is-empty{background:#eee9df;color:#6e6559}
@media(max-width:760px){.journey-full-row.has-records:before,.journey-full-row.no-records:before{width:4px}.journey-status{font-size:10px;margin-top:7px}}
.session-edit-button{display:block;margin:15px 0 0 auto;padding:9px 13px;border:1px solid #bdcda8;border-radius:999px;background:#eef3e5;color:#3f5b3d;font-size:12px}
.session-reflection{margin:12px 0;padding:13px 15px;border:1px dashed #d8cdb8;border-radius:12px;background:#fffcf5}
.session-reflection summary{color:#52664f;font-size:13px;font-weight:600;cursor:pointer}
.session-reflection .form-grid{margin-top:15px}
.session-reflection .field-wide{grid-column:1/-1}
.session-reflection textarea{width:100%;min-height:55px;padding:10px;border:1px solid #e4ddcf;border-radius:8px;background:#fffefa;color:#33493e;font:13px var(--sans);resize:vertical}
@media(max-width:760px){.session-edit-button{margin-top:10px}.session-reflection{padding:11px}.session-reflection .form-grid{grid-template-columns:1fr 1fr}}
.data-transfer{position:relative;font-size:12px;color:#496552}
.data-transfer summary{list-style:none;cursor:pointer;border:1px solid #dce4d5;border-radius:999px;background:#f2f5eb;padding:8px 12px;font-size:11px}
.data-transfer summary::-webkit-details-marker{display:none}
.data-transfer-menu{position:absolute;z-index:30;right:0;top:calc(100% + 8px);width:176px;padding:9px;background:#fffdf8;border:1px solid #e6e2d8;border-radius:12px;box-shadow:0 8px 24px #293b3418;display:grid;gap:5px}
.data-transfer-menu button{border:0;border-radius:8px;background:#f2f5eb;color:#385741;text-align:left;padding:9px 10px;font:500 12px var(--sans);cursor:pointer}
.data-transfer-menu button:hover{background:#e7efd9}
.data-transfer-menu small{color:#839087;font-size:10px;padding:3px 5px}
@media(max-width:760px){.data-transfer summary{padding:7px 9px;font-size:10px}.topbar-actions{gap:8px}}
