:root {
  color-scheme: light;
  --paper: #faf8f1;
  --water: #eaf4f0;
  --ink: #193b3b;
  --muted: #47615c;
  --accent: #226967;
  --accent-dark: #164e4e;
  --line: #b4cdc4;
  --white: #fffef9;
  --display: 'Noto Serif CJK JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --body: 'Noto Sans CJK JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.8 var(--body); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #986124; outline-offset: 4px; }
figure, h1, h2, p { margin: 0; }
.shell { width: min(1240px, 90%); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 1; background: var(--white); padding: 10px 16px; }
.skip:focus { top: 8px; }
.proposal { background: #e7eeea; color: var(--muted); text-align: center; padding: 6px 12px; font-size: 11px; }
.proposal span { margin-inline: 4px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: baseline; gap: 14px; font: 600 28px/1.15 Georgia, serif; letter-spacing: .065em; }
.wordmark span { color: var(--muted); font: 500 12px/1.4 var(--body); letter-spacing: .09em; white-space: nowrap; }
.header-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent-dark); font-size: 13px; }
.header-link:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); grid-template-areas: 'media copy'; align-items: center; gap: clamp(36px, 6.2vw, 102px); padding-block: clamp(32px, 4vw, 60px) clamp(52px, 6vw, 88px); }
.hero-copy { grid-area: copy; padding-bottom: 16px; }
.eyebrow { color: var(--accent-dark); font-size: 13px; font-weight: 600; letter-spacing: .13em; margin-bottom: 13px; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: .02em; }
h1 { font-size: clamp(35px, 4.35vw, 68px); line-height: 1.38; }
h2 { font-size: clamp(30px, 3.1vw, 44px); line-height: 1.45; }
.intro { margin-top: clamp(18px, 2.35vw, 30px); color: var(--muted); line-height: 2; }
.text-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 44px; border-bottom: 1px solid var(--accent); color: var(--accent-dark); font-size: 14px; font-weight: 600; }
.text-link:hover { border-color: currentColor; color: #8a531f; }
.hero-copy .text-link { margin-top: 19px; }
.hero-media { grid-area: media; min-width: 0; }
.hero-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.hero-media figcaption { margin-top: 7px; color: var(--muted); font-size: 11px; }

.selection { background: var(--water); padding-block: clamp(68px, 9vw, 140px); }
.choice-layout, .making-layout, .confirm-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 7vw, 110px); }
.choice-copy > p:last-child, .confirm-layout > div:first-child p:last-child { max-width: 28em; margin-top: 21px; color: var(--muted); line-height: 2; }
.choice-example { min-width: 0; max-width: 565px; width: 100%; justify-self: end; }
.form-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.form-controls button { min-height: 52px; padding: 8px 4px; cursor: pointer; color: var(--accent-dark); background: var(--white); border: 1px solid var(--line); border-radius: 4px; font-size: 14px; font-weight: 600; }
.form-controls button:hover { border-color: var(--accent); background: #f0f8f5; }
.form-controls button[aria-pressed='true'] { color: white; background: var(--accent); border-color: var(--accent); }
.drawing { margin-top: 12px; background: radial-gradient(ellipse at 50% 32%, #edf9f7, #fafdf9 70%); border: 1px solid var(--line); border-radius: 6px; padding: 18px 22px 16px; }
.drawing svg { display: block; width: min(100%, 260px); height: auto; margin-inline: auto; overflow: visible; }
.drawing figcaption { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 4px 15px; margin-top: 8px; color: var(--muted); }
.diagram-status strong, .diagram-status span { display: block; }
.diagram-status strong { color: var(--accent-dark); font-size: 15px; }
.diagram-status span { font-size: 13px; }
.diagram-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.diagram-label { font-size: 11px; }
.motion-toggle { min-height: 32px; padding: 2px 0; border: 0; background: transparent; color: var(--accent-dark); cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.motion-toggle:hover { color: #8a531f; }
.guide { stroke: var(--line); fill: none; stroke-dasharray: 4 7; }
.glass-line { stroke: var(--accent); stroke-width: 2; fill: none; }
.glass-fill { fill: url(#optic); }
.optic-line { stroke: #a26b25; stroke-width: 2; fill: none; }
svg g[hidden] { display: none; }

.making { padding-block: clamp(72px, 10vw, 158px); }
.making-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.pattern-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.pattern-media figcaption { margin-top: 8px; color: var(--muted); font-size: 11px; }
.pattern-intro { max-width: 34em; margin-top: 19px; color: var(--muted); line-height: 1.95; }
.pattern-list { margin: 23px 0 13px; border-top: 1px solid var(--line); }
.pattern-list div { display: grid; grid-template-columns: 5.5em 1fr; gap: 10px; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.pattern-list dt { color: var(--accent-dark); font-weight: 600; }
.pattern-list dd { margin: 0; color: var(--muted); }
.confirmation { background: #eef3eb; padding-block: clamp(74px, 9vw, 144px); }
.official-actions { align-self: center; border: 1px solid var(--line); border-radius: 6px; background: #f9fbf5; padding: clamp(21px, 3vw, 42px); }
.visit-address { margin-bottom: 17px; color: var(--muted); font-size: 14px; }
.official-actions a { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }
.primary-link { min-height: 61px; border-radius: 4px; padding: 13px 19px; color: white; background: var(--accent); }
.primary-link:hover { background: var(--accent-dark); }
.secondary-link { min-height: 52px; color: var(--accent-dark); border-bottom: 1px solid var(--line); font-size: 14px; }
.secondary-link:hover { border-color: var(--accent); }
.official-actions p:last-child { margin-top: 13px; color: var(--muted); font-size: 12px; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; min-height: 76px; padding-block: 12px; font-size: 13px; }
.site-footer p { color: var(--ink); font-weight: 600; }
.site-footer p span { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
.site-footer a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--accent-dark); }

@media (max-width: 700px) {
  .shell { width: 90%; }
  .site-header { min-height: 60px; gap: 9px; }
  .wordmark { font-size: 24px; gap: 8px; }
  .wordmark span, .header-link { font-size: 11px; }
  .header-link { gap: 3px; white-space: nowrap; }
  .hero { grid-template-columns: 1fr; grid-template-areas: 'copy' 'media'; gap: 20px; padding-block: 24px 35px; }
  .hero-copy { padding-bottom: 0; }
  .eyebrow { font-size: 12px; margin-bottom: 8px; }
  h1 { font-size: clamp(34px, 8.9vw, 48px); line-height: 1.34; }
  .intro { font-size: 14px; margin-top: 13px; }
  .hero-copy .text-link { margin-top: 7px; }
  .hero-media figcaption { font-size: 10px; }
  .choice-layout, .making-layout, .confirm-layout { grid-template-columns: 1fr; gap: 26px; }
  .choice-example { justify-self: start; }
  .choice-copy > p:last-child, .confirm-layout > div:first-child p:last-child { margin-top: 14px; font-size: 15px; }
  .drawing { padding: 12px 15px; }
  .drawing svg { width: min(100%, 208px); }
  .pattern-media { grid-row: 2; }
  .selection, .making, .confirmation { padding-block: clamp(62px, 12vw, 86px); }
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { transition: opacity 1.05s ease, transform 1.1s cubic-bezier(.2, .65, .3, 1); }
  .reveal-pending { opacity: .38; transform: translateY(24px); transition: none; }
  .reveal-pending:focus-within { opacity: 1; transform: none; }
  .form-controls button { transition: color .18s ease, background-color .18s ease, border-color .18s ease; }
  .vessel-motion { transform-box: fill-box; transform-origin: center 80%; animation: vessel-settle .72s cubic-bezier(.2, .65, .3, 1) both; }
  .motion-enabled .vessel-float { transform-origin: center; animation: vessel-float 6s ease-in-out infinite; }
  .motion-paused .vessel-float { animation-play-state: paused; }
  .motion-paused .vessel-motion { animation: none; }
}

@keyframes vessel-settle {
  0% { opacity: .52; transform: translateY(9px) rotate(-2deg) scale(.97); }
  62% { opacity: 1; transform: translateY(-3px) rotate(.7deg); }
  100% { opacity: 1; transform: none; }
}

@keyframes vessel-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-7px) rotate(1.1deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
