:root {
  --bg: #f5f6f9;
  --surface: #ffffff;
  --muted: #7a8094;
  --text: #111625;
  --accent: #7bc6c4;
  --accent-2: #f5b0c4;
  --accent-3: #c7d36f;
  --border: #e1e6f0;
  --shadow: 0 14px 45px rgba(0, 0, 0, 0.06), 0 10px 18px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 20%, #fdf1f6 0%, #f5f6f9 35%, #eef6f4 80%);
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero__text h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  margin: 8px 0 10px;
}

.hero__text .lede {
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.6;
}

.hero__chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(123, 198, 196, 0.12);
  color: #1b4442;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}

.hero__panel {
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.climate-card ul {
  padding-left: 20px;
  margin: 12px 0 0;
  color: #2f3650;
  line-height: 1.6;
}

.climate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.climate-chip {
  background: rgba(123, 198, 196, 0.12);
  border: 1px dashed rgba(123, 198, 196, 0.45);
  color: #1b4442;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px 22px;
  box-shadow: 0 10px 32px rgba(31, 47, 70, 0.06);
  margin-bottom: 16px;
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel h2, .panel h3 {
  margin: 4px 0;
  font-weight: 700;
}

.badge {
  background: rgba(123, 198, 196, 0.16);
  color: #0e3b39;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
}

.badge--muted {
  background: rgba(122, 128, 148, 0.14);
  color: #2f3650;
}

.command-palette {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.command-palette__group {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(150deg, #ffffff 0%, #f5f9ff 80%);
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(13, 37, 55, 0.05);
}

.group-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.group-heading h3 {
  margin: 2px 0;
}

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

.chip--ghost {
  background: #f8fafc;
  color: #1c2638;
  border: 1px dashed var(--border);
  font-weight: 700;
  padding: 6px 10px;
}

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

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(123, 198, 196, 0.14);
  border: 1px solid rgba(123, 198, 196, 0.4);
  font-weight: 700;
  color: #103132;
  cursor: pointer;
  transition: all 0.15s ease;
}

.checkbox-row input[type="checkbox"],
.checkbox-row input[type="radio"] {
  accent-color: #68b5b2;
}

.checkbox-row label:hover {
  background: rgba(104, 181, 178, 0.2);
  border-color: #68b5b2;
}

.checkbox-row--inline {
  flex-wrap: nowrap;
  gap: 6px;
}

.pill-check {
  background: rgba(141, 150, 193, 0.1);
  border: 1px solid rgba(112, 126, 174, 0.4);
  color: #1f2f44;
}

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

.palette-actions__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.palette-actions__row .pill-check {
  background: rgba(104, 181, 178, 0.14);
  border-color: rgba(104, 181, 178, 0.6);
}

.axes-shell {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.axes-shell--vertical {
  grid-template-columns: minmax(320px, 0.9fr) 1.1fr;
  align-items: stretch;
}

.axes-shell--horizontal {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
}

.axes-shell--horizontal .axes-visual {
  order: 1;
}

.axes-shell--horizontal .axes-controls {
  order: 2;
}

.axes-controls {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(150deg, #ffffff 0%, #f1f7ff 100%);
  display: grid;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(15, 29, 52, 0.06);
}

.axes-controls--horizontal {
  border-style: dashed;
  background: linear-gradient(145deg, #f8fbff 0%, #ffffff 100%);
}

.compact-note {
  margin: 0;
  font-size: 13px;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}


.axis-chip {
  display: grid;
  gap: 10px;
  font-weight: 700;
  color: #1f2f44;
  background: rgba(123, 198, 196, 0.12);
  border: 1px solid rgba(123, 198, 196, 0.4);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.2;
}

.axis-chip__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.axis-chip__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dual-range {
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dual-range--horizontal {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "min track max";
  gap: 10px;
  align-items: center;
}

.dual-range--vertical {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "max" "track" "min";
  justify-items: center;
  gap: 10px;
  height: 210px;
  padding: 12px 8px;
}

.axis-chip input[type="range"] {
  width: 100%;
  accent-color: #68b5b2;
  height: 4px;
  grid-area: track;
  position: relative;
}

.dual-range--vertical input[type="range"] {
  writing-mode: bt-lr;
  transform: rotate(180deg);
  height: 100%;
  width: auto;
}

.dual-range--horizontal input[type="range"] {
  align-self: center;
}

.dual-range .range-end:first-of-type { grid-area: min; }
.dual-range .range-end:last-of-type { grid-area: max; }

.axis-chip input[type="range"]::-webkit-slider-thumb {
  height: 16px;
  width: 16px;
  background: #0e3b39;
  border-radius: 50%;
  border: 2px solid #e0f3f0;
}

.axis-chip input[type="range"]::-moz-range-thumb {
  height: 16px;
  width: 16px;
  background: #0e3b39;
  border-radius: 50%;
  border: 2px solid #e0f3f0;
}

.range-end {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.control-value {
  font-size: 13px;
  color: var(--muted);
}

.axes-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.btn {
  background: #103132;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: 0 10px 18px rgba(16, 49, 50, 0.2);
}

.btn--ghost {
  background: #f8fafc;
  color: #1f2f44;
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn:hover { transform: translateY(-1px); }

.axes-visual {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(12, 28, 48, 0.07);
  display: grid;
  gap: 10px;
}

.axes-legend {
  font-weight: 700;
  color: #1f2f44;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

#parallelChart {
  width: 100%;
  height: auto;
}

.axis-filter-label {
  font-weight: 700;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.axis-selection {
  fill: rgba(104, 181, 178, 0.18);
  stroke: #68b5b2;
  stroke-width: 1.5px;
}

.axis-selection-group .tick text {
  font-size: 11px;
  fill: #5b6c82;
}

.axis-handle {
  fill: #0e3b39;
  stroke: #ffffff;
  stroke-width: 2px;
  cursor: grab;
  touch-action: none;
}

.axis-handle:active {
  cursor: grabbing;
}

.axis-hit {
  touch-action: none;
}

.axes-ranking {
  display: grid;
  gap: 8px;
}

.rank-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(123, 198, 196, 0.08), #ffffff);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rank-card .meta {
  color: var(--muted);
  font-size: 13px;
}

.rank-card strong { color: #0e3b39; }

.tabs {
  display: inline-flex;
  background: #f3f5fa;
  border-radius: 12px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 14px;
}

.tab {
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  color: #4d5568;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab.active {
  background: #ffffff;
  color: #0c1b2b;
  box-shadow: 0 8px 18px rgba(25, 39, 52, 0.12);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f6fbfb 100%);
  box-shadow: 0 14px 30px rgba(15, 30, 48, 0.07);
  display: grid;
  gap: 8px;
}

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

.card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.stat-card {
  background: #f6fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  color: #1c2638;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.stat-card strong {
  font-size: 14px;
}

.card__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #fff7fb;
  border-radius: 12px;
  border: 1px solid #f3d6e4;
  color: #402a3a;
}

.note-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-2);
  border-radius: 50%;
  margin-top: 5px;
}

.pill {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #0d2330;
}

.pill--sun { background: rgba(123, 198, 196, 0.28); }
.pill--water { background: rgba(245, 176, 196, 0.3); }
.pill--season { background: rgba(199, 211, 111, 0.32); }

.card ul {
  margin: 0;
  padding-left: 16px;
  color: #2c3447;
  line-height: 1.5;
}

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

.timeline {
  display: grid;
  gap: 12px;
}

.timeline__item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(17, 26, 38, 0.06);
}

.timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.timeline__detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 8px;
  color: #2c3447;
}

.timeline__badge {
  padding: 6px 10px;
  background: rgba(122, 128, 148, 0.16);
  border-radius: 10px;
  font-weight: 700;
}

.timeline__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}

.action-chip {
  padding: 8px 10px;
  border-radius: 12px;
  background: #eef6f4;
  border: 1px solid var(--border);
  font-weight: 700;
  color: #0e3b39;
}

.detail-card {
  background: #f8faff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.care-table {
  overflow-x: auto;
}

.care-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.care-table th, .care-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.care-table th {
  background: #f3f5fa;
  font-weight: 700;
}

.care-table tr:last-child td { border-bottom: none; }

.virtual-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 16px;
  align-items: start;
}

.virtual-control {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(160deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 10px 26px rgba(20, 34, 52, 0.08);
}

.virtual-control label {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  font-weight: 600;
}

.grid-size {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.grid-size input {
  width: 64px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fdfdff;
  font-weight: 600;
}

.virtual-control select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fdfdff;
}

.virtual-meta {
  margin-top: 12px;
  padding: 10px;
  background: rgba(199, 211, 111, 0.18);
  border-radius: 10px;
  color: #27300f;
  font-weight: 600;
}

.virtual-layout {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(18, 34, 54, 0.08);
  display: grid;
  gap: 16px;
}

.virtual-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.virtual-actions .btn {
  background: linear-gradient(120deg, #8fdcc8 0%, #74b8ff 100%);
  color: #0f1b2b;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(26, 112, 178, 0.25);
}

.virtual-actions .btn:hover {
  transform: translateY(-1px);
}

.virtual-layout__grid {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(123, 198, 196, 0.08);
}

.plot-grid {
  display: grid;
  gap: 6px;
  grid-template-rows: repeat(var(--rows), minmax(42px, 1fr));
  grid-template-columns: repeat(var(--cols), minmax(42px, 1fr));
}

.plot-cell {
  border: 1px dashed #b6c1d5;
  border-radius: 10px;
  background: #f8fbff;
  color: #1e2533;
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.plot-cell:hover {
  background: #e6f2ff;
  border-color: #9bbcf3;
}

.plot-cell.assigned {
  background: #f3e7ff;
  border-color: #c89df7;
  color: #3a265d;
}

.plot-cell.highlighted {
  background: #ffe3f0;
  border-color: #f28fb0;
}

.layout-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #f3f5fa;
  border: 1px solid var(--border);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.layout-section {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(123, 198, 196, 0.06);
}

.layout-section h4 {
  margin: 0 0 6px;
}

.layout-section ul {
  margin: 0;
  padding-left: 16px;
  color: #2c3447;
  line-height: 1.5;
}

.highlight {
  background: rgba(245, 176, 196, 0.28) !important;
  border-color: #f28fb0;
}

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

@media (max-width: 620px) {
  .tabs {
    flex-wrap: wrap;
  }
}
