:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #172026;
  --muted: #65717a;
  --line: #d9e0e5;
  --accent: #0f7b7e;
  --accent-dark: #0a5558;
  --warn: #a85618;
  --ok: #1d7a44;
  --snow: #eaf3f6;
  --sky: #d9eef3;
  --sun: #f2bd4c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  line-height: 1.55;
}

button, input, select {
  font: inherit;
}

.app-header {
  min-height: 340px;
  padding: 58px clamp(20px, 5vw, 72px) 48px;
  background-image:
    linear-gradient(90deg, rgba(245, 250, 252, 0.98) 0%, rgba(245, 250, 252, 0.9) 24%, rgba(245, 250, 252, 0.48) 48%, rgba(245, 250, 252, 0.05) 74%),
    url("img/main.png");
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.header-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.header-copy p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  color: #3d4b52;
  font-size: 17px;
}


.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 24px clamp(16px, 4vw, 48px) 48px;
}

.filters, .resort-card, .metric, .message {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filters {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 18px;
}

.filter-block { margin-bottom: 18px; }

label, .label-row span, .sort-control label {
  display: block;
  margin-bottom: 8px;
  color: #34434a;
  font-size: 13px;
  font-weight: 700;
}

input[type="text"], select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c5d0d6;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

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

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

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

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

.check-option, .switch-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  color: #263238;
  font-size: 14px;
}

.check-option input, .switch-row input { width: 16px; height: 16px; }

.check-list {
  max-height: 170px;
  overflow: auto;
  padding-right: 4px;
}

.content { min-width: 0; }

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

.status-bar h2 {
  margin: 0;
  font-size: 24px;
}

.sort-control { min-width: 180px; }

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

.metric {
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.message {
  padding: 16px;
  margin-bottom: 16px;
  color: var(--warn);
}

.results {
  display: grid;
  gap: 14px;
}

.resort-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.location {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.resort-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.25;
}

.score-badge {
  min-width: 82px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eef7f6;
  color: var(--accent-dark);
  text-align: center;
}

.score-badge span { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.score-badge small { display: block; margin-top: 3px; font-size: 10px; }

.tag-row, .reason-list, .link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag, .reason, .caution {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 13px;
}

.tag { background: #edf2f4; color: #334148; }
.reason { background: #eaf6ee; color: var(--ok); }
.caution { background: #fff3e7; color: var(--warn); }

.features {
  margin: 10px 0;
  color: #3f4d54;
}

.link-row {
  align-content: start;
  justify-content: end;
  min-width: 180px;
}

.action-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.action-link.secondary { background: #3d5964; }
.action-link.subtle { background: #eef2f3; color: #253238; }

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resort-card { grid-template-columns: 1fr; }
  .link-row { justify-content: start; min-width: 0; }
}

@media (max-width: 560px) {
  .app-header { padding: 28px 16px 20px; }
  .layout { padding: 16px; }
  .status-bar { display: block; }
  .sort-control { margin-top: 14px; }
  .metrics { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  .card-title-row { display: block; }
  .score-badge { width: 76px; margin-bottom: 10px; }
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  color: #34434a;
  font-size: 13px;
  font-weight: 700;
}

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

.preset-button {
  min-height: 38px;
  border: 1px solid #b9cbd0;
  border-radius: 6px;
  background: #eef7f6;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.preset-button:hover,
.preset-button:focus-visible {
  border-color: var(--accent);
  background: #dff0ef;
}

input[type="search"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c5d0d6;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}


@media (max-width: 920px) {
  .app-header {
    min-height: 300px;
    background-position: 58% center;
  }
}

@media (max-width: 560px) {
  .app-header {
    min-height: 260px;
    padding: 32px 16px 28px;
    background-image:
      linear-gradient(90deg, rgba(245, 250, 252, 0.98) 0%, rgba(245, 250, 252, 0.86) 58%, rgba(245, 250, 252, 0.28) 100%),
      url("img/main.png");
    background-position: 62% center;
  }
}
