:root {
  --paper: #f3f0e8;
  --paper-2: #faf8f3;
  --ink: #1a211e;
  --ink-soft: #5e675f;
  --line: rgba(26, 33, 30, 0.14);
  --line-strong: rgba(26, 33, 30, 0.28);
  --pine: #1b3832;
  --tide: #3c625c;
  --measure: 1080px;
  --gutter: 20px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  color: inherit;
}

::selection {
  background: #d7e3de;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header,
.toolbar-inner,
main,
.site-footer {
  width: min(var(--measure), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 52px 0 28px;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 14px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.langs a {
  color: var(--ink-soft);
  text-decoration: none;
}

.langs a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mark {
  margin: 0 0 8px;
  color: var(--tide);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

html[lang^="zh"] body {
  font-family: "Noto Sans SC", "Zen Kaku Gothic New", sans-serif;
}

html[lang^="zh"] h2,
html[lang^="zh"] .count {
  font-family: "Noto Serif SC", "Shippori Mincho", serif;
}

html[lang^="ko"] body {
  font-family: "Noto Sans KR", "Zen Kaku Gothic New", sans-serif;
}

html[lang^="ko"] h2,
html[lang^="ko"] .count {
  font-family: "Noto Serif KR", "Shippori Mincho", serif;
}

html[lang^="zh"] .mark,
html[lang^="ko"] .mark {
  letter-spacing: 0.04em;
}

h1 {
  margin: 0;
  font-family: "Shippori Mincho", serif;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}

.dek {
  margin: 0;
  max-width: 14rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.75;
  text-align: right;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}

.filters {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.chip:hover {
  color: var(--ink);
  background: rgba(26, 33, 30, 0.05);
}

.chip[aria-pressed="true"] {
  background: var(--pine);
  color: #f6f3ec;
}

.search-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
}

.search input {
  width: 11.5rem;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
}

.search input::placeholder {
  color: #8b918c;
}

.search input:focus,
.chip:focus-visible,
.text-button:focus-visible,
.card-hit:focus-visible,
.action:focus-visible,
.dialog-bar button:focus-visible {
  outline: 2px solid var(--tide);
  outline-offset: 3px;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-button[aria-pressed="true"] {
  color: var(--ink);
}

main {
  padding-top: 28px;
}

.result-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: baseline;
  margin: 0 0 16px;
}

.count {
  margin: 0;
  font-family: "Shippori Mincho", serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.season-note,
.empty,
.site-footer {
  color: var(--ink-soft);
}

.season-note,
.empty {
  margin: 0;
  font-size: 0.88rem;
}

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

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}

.card.is-off {
  background: #ece9e1;
}

.card-hit {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.photo-wrap {
  position: relative;
}

.card-photo,
.detail-photo {
  display: block;
  width: 100%;
  object-fit: cover;
  background: #e4dfd4;
}

.photo-credit {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 4px 8px;
  background: rgba(20, 24, 22, 0.48);
  color: #f6f3ec;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: right;
}

.card-photo {
  aspect-ratio: 3 / 2;
}

.card-photo-empty {
  position: relative;
  overflow: hidden;
  background: #d7e4df;
}

.card-photo-empty svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card.is-off .card-photo {
  filter: grayscale(0.55);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 20px 18px;
}

.card-hit:hover {
  background: var(--paper-2);
}

.card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.area {
  color: var(--tide);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.badge {
  color: var(--ink-soft);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.badge-rain,
.badge-part {
  color: var(--pine);
}

h2 {
  margin: 14px 0 8px;
  font-family: "Shippori Mincho", serif;
  font-size: 1.38rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.summary,
.meta,
.lead,
.note {
  margin: 0;
}

.summary {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.75;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-top: auto;
  padding-top: 18px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.meta span:not(:last-child)::after {
  content: " / ";
  color: rgba(26, 33, 30, 0.35);
}

.site-footer {
  padding: 28px 0 56px;
  font-size: 0.82rem;
  line-height: 1.8;
}

.site-footer p {
  max-width: 40rem;
  margin: 0;
}

dialog {
  width: min(520px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: 0 32px 28px;
  overflow: auto;
  border: 0;
  border-radius: 2px;
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(20, 28, 26, 0.2);
}

dialog::backdrop {
  background: rgba(22, 28, 26, 0.46);
}

.dialog-bar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  margin: 0;
}

.dialog-bar button {
  padding: 4px 10px;
  border: 0;
  background: rgba(250, 248, 243, 0.92);
  color: var(--ink-soft);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.dialog-bar button:hover {
  color: var(--ink);
}

.detail-photo {
  width: calc(100% + 64px);
  height: 220px;
  margin: 0 -32px 20px;
}

.kicker {
  margin: 0;
  color: var(--tide);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

#detail h2 {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.1rem);
}

.lead {
  margin-top: 14px;
  font-size: 1rem;
}

.note {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--pine);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.facts {
  display: grid;
  grid-template-columns: 4.75em 1fr;
  margin: 26px 0 0;
}

.facts dt,
.facts dd {
  margin: 0;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.facts dt {
  color: var(--ink-soft);
}

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

.action {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
}

.action:hover {
  border-color: var(--ink);
}

.action-primary {
  border-color: var(--pine);
  background: var(--pine);
  color: #f6f3ec;
}

.action-primary:hover {
  background: #142c27;
  border-color: #142c27;
}

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

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 32px 0 22px;
  }

  .dek {
    text-align: left;
  }

  .toolbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .filters {
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 28px), transparent);
  }

  .search-row {
    justify-content: space-between;
  }

  .search {
    flex: 1;
  }

  .search input {
    width: 100%;
  }

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

  dialog {
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    margin-top: auto;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
    padding: 0 22px 28px;
    border-radius: 2px 2px 0 0;
  }

  .detail-photo {
    width: calc(100% + 44px);
    height: 190px;
    margin: 0 -22px 18px;
  }
}
