/* 折光所 · 作品取色画廊 */
:root {
  --rf-bg: #f7f4f7;
  --rf-label: #fffdfe;
  --rf-ink: #5d4d61;
  --rf-muted: #756679;
  --rf-pink: #e7bfd1;
  --rf-aqua: #b9d9dd;
  --rf-violet: #c5b8d8;
  --rf-line: rgba(93, 77, 97, 0.18);
  --active-glow: transparent;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--rf-ink);
  background: var(--rf-bg);
  font-family: "PingFang SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-shell {
  border-bottom: 1px solid var(--rf-line);
  background: rgba(247, 244, 247, 0.96);
}
.shell-row {
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  min-height: 44px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
}
.brand strong {
  font-family: "Kaiti SC", "Songti SC", serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.2em;
}
.brand span { font-size: 12px; letter-spacing: 0.16em; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 13px; }
.site-nav a, .site-nav span { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.site-nav [aria-current="page"] { font-weight: 650; border-bottom: 2px solid var(--rf-ink); }

main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.gallery-shell {
  position: relative;
  isolation: isolate;
  padding: 26px 0 48px;
}
.gallery-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -8vw -36px;
  background: radial-gradient(62% 54% at 50% 36%, var(--active-glow) 0%, transparent 72%);
  opacity: 0.72;
  transition: background 360ms ease, opacity 360ms ease;
  pointer-events: none;
}
.gallery-note { margin: 0 0 14px; color: var(--rf-muted); font-size: 12.5px; line-height: 1.8; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--rf-muted);
  font: 650 10px/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.16em;
}
.load-state { margin: 24px 0; color: var(--rf-muted); font-size: 13px; }
.load-state[hidden] { display: none; }

.work-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 20px;
  align-items: start;
}
.work-card {
  min-width: 0;
  overflow: hidden;
  display: block;
  color: inherit;
  background: var(--rf-label);
  border: 1px solid var(--rf-line);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 18px 38px rgba(79, 57, 81, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 24px 46px rgba(79, 57, 81, 0.13); }
.work-card:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 3px; }
.work-cover { aspect-ratio: 1; overflow: hidden; background: #eee9ee; }
.work-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.work-label { min-height: 112px; padding: 14px 15px 16px; border-top: 1px solid var(--rf-line); }
.work-label small {
  display: block;
  color: var(--rf-muted);
  font: 650 10px/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.1em;
}
.work-label h2 { margin: 7px 0 5px; font: 600 18px/1.4 "Kaiti SC", "Songti SC", serif; letter-spacing: 0.06em; }
.work-label p { margin: 0; color: var(--rf-muted); font-size: 12px; line-height: 1.7; }

.recipes { display: grid; gap: 22px; padding: 12px 0 64px; }
.recipe-card {
  scroll-margin-top: 20px;
  padding: clamp(20px, 4vw, 34px);
  background: var(--rf-label);
  border: 1px solid var(--rf-line);
  border-radius: 14px;
}
.recipe-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.recipe-head small { color: var(--rf-muted); font: 650 10px/1.4 ui-monospace, monospace; letter-spacing: 0.1em; }
.recipe-head h2 { margin: 5px 0 0; font: 600 clamp(23px, 3vw, 32px)/1.35 "Kaiti SC", "Songti SC", serif; letter-spacing: 0.08em; }
.recipe-level { padding: 8px 11px; border: 1px solid var(--rf-line); border-radius: 7px; font-size: 12px; white-space: nowrap; }
.recipe-description { max-width: 820px; margin: 20px 0 0; font-size: 14px; line-height: 2; }
.recipe-reason { max-width: 820px; margin: 9px 0 0; color: var(--rf-muted); font-size: 12.5px; line-height: 1.9; }
.reference-title { margin: 24px 0 11px; font-size: 12px; font-weight: 650; letter-spacing: 0.08em; }
.reference-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 190px)); gap: 12px; }
.reference-strip img { width: 100%; height: auto; aspect-ratio: 2 / 3; display: block; object-fit: cover; border: 1px solid var(--rf-line); border-radius: 9px; }
.recipe-date { margin: 16px 0 0; color: var(--rf-muted); font: 10px/1.6 ui-monospace, "SFMono-Regular", Menlo, monospace; }

.site-foot {
  width: min(1120px, calc(100% - 40px));
  min-height: 96px;
  margin: 0 auto;
  border-top: 1px solid var(--rf-line);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--rf-muted);
}
.site-foot strong { color: var(--rf-ink); font: 600 17px/1.4 "Kaiti SC", "Songti SC", serif; letter-spacing: 0.12em; }
.site-foot span { font-size: 11px; }
.sister-links { margin-left: auto; }
.sister-links a { text-underline-offset: 3px; }

.log-main { width: min(900px, calc(100% - 40px)); padding: 38px 0 64px; }
.log-title { margin: 0 0 28px; font: 600 clamp(28px, 4vw, 42px)/1.3 "Kaiti SC", "Songti SC", serif; letter-spacing: 0.08em; }
.log-release { margin: 0 0 28px; padding: 20px; background: var(--rf-label); border: 1px solid var(--rf-line); border-radius: 12px; }
.log-release h2 { margin: 0 0 12px; font-size: 16px; }
.log-release time { color: var(--rf-muted); font: 10px/1.4 ui-monospace, monospace; }
.log-release ul { margin: 0; padding-left: 1.25em; }
.log-release li { margin-top: 8px; font-size: 13px; line-height: 1.8; }

@media (max-width: 620px) {
  .shell-row, main, .site-foot { width: min(100% - 28px, 1120px); }
  .shell-row { min-height: 68px; gap: 10px; }
  .brand { gap: 7px; }
  .brand strong { font-size: 22px; letter-spacing: 0.14em; }
  .brand span { font-size: 9px; letter-spacing: 0.08em; }
  .site-nav { gap: 10px; font-size: 12px; }
  .gallery-shell { padding-top: 30px; }
  .gallery-shell::before { inset-inline: -14px; }
  .work-gallery { grid-template-columns: 1fr; }
  .work-card { min-height: 44px; }
  .recipe-head { align-items: flex-start; flex-direction: column; }
  .reference-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot { min-height: 92px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 3px; }
  .sister-links { margin-left: 0; }
}

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