@font-face { font-family: "Libre Baskerville"; src: url("../fonts/LibreBaskerville[wght].ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("../fonts/LibreBaskerville-Italic[wght].ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("../fonts/GreatVibes-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Noto Sans JP"; src: url("../fonts/NotoSansJP-Regular-Latin.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans JP"; src: url("../fonts/NotoSansJP-Medium-Latin.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --ink: #22252b;
  --graphite: #6b6f78;
  --paper: #fff;
  --rule: #d9dcd5;
  --field: #c9ccc4;
  --error: #a33a2c;
  --placeholder: #9a9ea6;
  --bar: #e3e5e0;
  --mist: #eef2ec;
  --accent: #5f7a5c;
  --accent2: #b08d57;
  --serif: "Libre Baskerville", Georgia, serif;
  --sans: "Noto Sans JP", system-ui, sans-serif;
  --script: "Great Vibes", cursive;
}
body[data-theme="blush"] { --mist: #f7ece8; --accent: #b0645a; --accent2: #c9a46a; }
body[data-theme="confetti"] { --mist: #eaf2fb; --accent: #2f6db5; --accent2: #e0753a; }
body[data-theme="navygold"] { --mist: #eef1f6; --accent: #1f3557; --accent2: #b8924a; }
body[data-theme="rose"] { --mist: #f6ecef; --accent: #8c3b52; --accent2: #3c4f76; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 400 16px/26px var(--sans); -webkit-font-smoothing: antialiased; }
p, h1, h2, ul, ol { margin: 0; padding: 0; }
a { color: var(--accent); }
button, input, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.header { display: flex; justify-content: space-between; align-items: baseline; padding-top: 28px; }
.header__logo { font: 400 20px/26px var(--serif); }
.header__tag { font-size: 14px; line-height: 22px; color: var(--graphite); }

.hero { display: flex; align-items: flex-end; gap: 56px; padding: 56px 0 48px; }
.tiles { display: flex; flex-direction: column; flex: none; font-weight: 400; }
.tiles__line { display: flex; }
.tiles__line + .tiles__line { margin-top: -1.5px; }
.tile { position: relative; display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-left: -1.5px; border: 1.5px solid var(--ink); background: var(--paper); font: 400 40px/40px var(--serif); }
.tiles__line > .tile:first-child { margin-left: 0; }
.tile i { position: absolute; left: 3.5px; top: 0.5px; font: 500 12px/12px var(--sans); font-style: normal; color: var(--accent); }
.tiles__gap { flex: none; width: 25.5px; margin-left: -1.5px; }
.hero__lead { display: flex; flex-direction: column; gap: 14px; width: 420px; flex: 0 1 420px; padding-bottom: 6px; }
.hero__text { font-size: 17px; line-height: 27px; }
.note { display: flex; gap: 10px; font-size: 14px; line-height: 22px; color: var(--graphite); }
.note::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: var(--accent); }
.note--step { gap: 8px; padding-left: 48px; }
.note--step::before { width: 8px; height: 8px; }

.cols { display: flex; align-items: flex-start; gap: 80px; }
.sheet { flex: 0 1 680px; min-width: 0; padding: 8px 48px; background: var(--paper); border-radius: 2px; }
.step { display: flex; flex-direction: column; gap: 18px; padding: 36px 0; }
.locked .step { border-top: 1px solid var(--rule); }
.locked:disabled { opacity: 0.5; }
.step__title { display: flex; align-items: center; gap: 14px; font: 400 22px/29px var(--serif); }
.mark { flex: none; width: 34px; height: 34px; padding: 0 0 0 2.5px; border: 1.5px solid var(--accent2); font: 500 12px/12px var(--sans); color: var(--accent2); }
.step__help { padding-left: 48px; font-size: 14px; line-height: 22px; color: var(--graphite); }

.input { display: block; width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--field); border-radius: 6px; background: var(--paper); font-size: 16px; line-height: 26px; text-overflow: ellipsis; appearance: none; -webkit-appearance: none; }
.input::placeholder { color: var(--placeholder); opacity: 1; }
.input--code { letter-spacing: 1.92px; text-transform: uppercase; }
.input--code::placeholder { letter-spacing: 1.92px; }
.input--word { letter-spacing: 1.28px; text-transform: uppercase; }
.input--area { height: auto; padding: 10px 14px; resize: vertical; }
.code-row { display: flex; gap: 12px; }
.code-row .input { flex: 1 1 auto; min-width: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 120px; height: 46px; padding: 0; border: 0; border-radius: 999px; font: 500 16px/16px var(--sans); text-decoration: none; white-space: nowrap; }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--accent { background: var(--accent); color: var(--paper); }
.btn--ghost { border: 1px solid var(--accent); background: transparent; color: var(--accent); }
.btn--large { width: 100%; height: 52px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn[hidden] { display: none; }

.status { font-size: 14px; line-height: 22px; color: var(--graphite); }
.status:empty { display: none; }
.status.ok { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.status.ok::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.status.err { color: var(--error); }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; line-height: 21px; font-weight: 500; }
.field__label small { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--graphite); }

.tips { list-style: none; font-size: 14px; line-height: 22px; color: var(--graphite); }
.tips li::before { content: "•  "; white-space: pre; }

.words { list-style: none; }
.word { display: grid; grid-template-columns: 22px 200px minmax(0, 1fr) 28px; column-gap: 10px; row-gap: 4px; align-items: start; padding: 6px 0; }
.word__idx { display: flex; align-items: center; justify-content: flex-end; height: 46px; font-size: 13px; line-height: 20px; color: var(--graphite); }
.word__cells { display: flex; gap: 2px; height: 7px; margin-top: 4px; }
.word__cells i { width: 7px; height: 7px; border: 1px solid var(--accent2); }
.word__del { width: 28px; height: 46px; padding: 0; border: 0; background: none; font-size: 20px; line-height: 46px; color: var(--graphite); }
.word__msg { grid-column: 2 / 5; font-size: 13px; line-height: 20px; color: var(--error); }
.word__msg:empty { display: none; }
.word.has-msg .input--word { border: 1.5px solid var(--error); padding: 0 13.5px; }

.list-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; }
.paste summary { font-size: 14px; line-height: 22px; color: var(--accent); text-decoration: underline; cursor: pointer; list-style: none; }
.paste summary::-webkit-details-marker { display: none; }
.paste[open] { flex: 1 1 100%; }
.paste[open] summary { text-align: right; }
.paste__panel { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 12px; }
.paste__help { font-size: 14px; line-height: 22px; color: var(--graphite); }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.option { min-width: 0; }
.option--wide { grid-column: 1 / -1; }
.option__label { margin-bottom: 6px; font-size: 14px; line-height: 21px; font-weight: 500; }
.seg { display: flex; padding: 3px; border: 1px solid var(--field); border-radius: 999px; }
.seg__opt { display: flex; flex: 1 1 0; min-width: 0; }
.seg__opt input, .swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.seg__opt span { display: flex; align-items: center; justify-content: center; width: 100%; padding: 7px 14px; border-radius: 999px; font-size: 14px; line-height: 22px; text-align: center; cursor: pointer; }
.seg__opt input:checked + span { background: var(--ink); color: var(--paper); }
.seg__opt input:focus-visible + span, .swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatches { display: flex; gap: 8px; }
.swatch { position: relative; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; }
.swatch span { position: absolute; inset: 4px; border-radius: 50%; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.swatch--sage span { background: linear-gradient(135deg, #5f7a5c 0 60%, #b08d57 60% 100%); }
.swatch--blush span { background: linear-gradient(135deg, #b0645a 0 60%, #c9a46a 60% 100%); }
.swatch--confetti span { background: linear-gradient(135deg, #2f6db5 0 60%, #e0753a 60% 100%); }
.swatch--navygold span { background: linear-gradient(135deg, #1f3557 0 60%, #b8924a 60% 100%); }
.swatch--rose span { background: linear-gradient(135deg, #8c3b52 0 60%, #3c4f76 60% 100%); }

.side { display: flex; flex-direction: column; gap: 22px; flex: 0 0 360px; width: 360px; position: sticky; top: 24px; }
.preview { display: flex; flex-direction: column; align-items: center; height: 466px; padding: 34px 26px 26px; background: var(--paper); box-shadow: 0 1px 0 rgba(34, 37, 43, 0.06), 0 18px 40px -18px rgba(34, 37, 43, 0.3); text-align: center; overflow: hidden; }
.preview__kicker { font: 400 10px/13px var(--serif); letter-spacing: 2px; color: var(--accent2); text-transform: uppercase; }
.preview__names { padding: 8px 0 4px; max-width: 100%; font: 400 46px/51px var(--script); color: var(--accent); white-space: nowrap; }
.preview__date { font: italic 400 12px/16px var(--serif); white-space: pre-wrap; }
.preview__title { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 0 16px; font: 400 13px/17px var(--serif); letter-spacing: 2.34px; }
.preview__title::before, .preview__title::after { content: ""; flex: 1 1 0; height: 1px; background: var(--accent2); }
.preview__grid { display: grid; grid-template-columns: repeat(11, 14px); grid-auto-rows: 14px; flex: none; }
.preview__grid b { outline: 0.8px solid var(--ink); outline-offset: -0.4px; background: var(--paper); }
.preview__clues { display: flex; gap: 18px; width: 100%; padding-top: 18px; }
.preview__clues > span { display: flex; flex-direction: column; gap: 9px; flex: 1 1 0; }
.preview__clues i { display: block; height: 5px; border-radius: 3px; background: var(--bar); }
.preview__clues i:nth-child(3n) { width: 90px; }
.is-empty { opacity: 0.35; }

.make { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.make__count { display: flex; justify-content: space-between; font-size: 14px; line-height: 22px; }
.make__state { color: var(--graphite); }
.make__state.ok { color: var(--accent); }
.make__bar { height: 4px; border-radius: 2px; background: var(--rule); }
.make__bar span { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--accent); }
.make__btn { margin-top: 18px; }
.make__caption { padding-top: 2px; font-size: 13px; line-height: 20px; color: var(--graphite); text-align: center; }
.make__note { font-size: 13px; line-height: 20px; color: var(--accent); text-align: center; }

.ready { display: flex; flex-direction: column; gap: 14px; padding: 0 4px; }
.ready[hidden] { display: none; }
.ready__title { font: 400 20px/29px var(--serif); color: var(--accent); }
.ready__checks { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.ready__checks li { display: flex; gap: 10px; font-size: 14px; line-height: 22px; }
.ready__checks li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border: 1.2px solid var(--accent); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%235F7A5C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") -1.2px -1.2px / 16px 16px no-repeat; }
.ready .btn--ghost { width: 100%; }
.ready__note { font-size: 13px; line-height: 20px; color: var(--graphite); }
body.is-ready .make { display: none; }

.dock { display: none; }

.footer { width: min(1120px, calc(100% - 64px)); margin: 0 auto; padding: 56px 0 48px; font-size: 13px; line-height: 20px; color: var(--graphite); }
.footer p + p { margin-top: 2px; }
.footer__links { padding-top: 6px; }

.legal { display: flex; flex-direction: column; gap: 28px; width: min(680px, 100%); margin: 0 auto; padding-top: 56px; }
.legal .tiles { flex-direction: row; }
.legal .tile { width: 44px; height: 44px; font-size: 24px; line-height: 24px; }
.legal .tile:first-child { margin-left: 0; }
.legal .tile i { left: 1.5px; top: -1.5px; font-size: 10px; line-height: 12px; }
.legal__sheet { padding: 8px 48px; background: var(--paper); border-radius: 2px; }
.legal__sec { display: flex; flex-direction: column; gap: 10px; padding: 32px 0; }
.legal__sec + .legal__sec { border-top: 1px solid var(--rule); }
.legal__sec h2 { font: 400 22px/29px var(--serif); }
.legal__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; line-height: 22px; }
.legal__meta span { font-size: 13px; line-height: 20px; color: var(--graphite); }

@media (min-width: 1024px) and (max-width: 1199px) {
  .cols { gap: 48px; }
  .hero { gap: 40px; }
}

@media (max-width: 1023px) {
  .page, .footer { width: auto; max-width: 712px; padding-left: 16px; padding-right: 16px; }
  .header { padding-top: 18px; }
  .header__tag { font-size: 13px; line-height: 20px; }
  .hero { flex-direction: column; align-items: stretch; gap: 22px; padding: 32px 0 28px; }
  .hero .tiles__line:first-child { flex-wrap: wrap; width: 171.5px; }
  .tiles__gap { flex-basis: 100%; width: 0; height: 0; margin: 0; }
  .tiles__gap ~ .tile { margin-top: -1.5px; }
  .tiles__gap + .tile { margin-left: 0; }
  .tile { width: 44px; height: 44px; font-size: 24px; line-height: 24px; }
  .tile i { left: 1.5px; top: -1.5px; font-size: 10px; line-height: 12px; }
  .hero__lead { width: auto; flex: none; gap: 12px; padding-bottom: 0; }
  .hero__text { font-size: 16px; line-height: 26px; }
  .cols { flex-direction: column; align-items: stretch; gap: 0; }
  .sheet { flex: none; padding: 0 18px; }
  .step { gap: 16px; padding: 28px 0; }
  .step__title { gap: 12px; font-size: 19px; line-height: 25px; }
  .step__help, .note--step { padding-left: 0; }
  .code-row { gap: 10px; }
  .fields { grid-template-columns: 1fr; }
  .word { grid-template-columns: 18px minmax(0, 1fr) 24px; grid-template-areas: "i w x" ". c c" ". m m"; row-gap: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .word__idx { grid-area: i; }
  .word__word { grid-area: w; }
  .word__clue { grid-area: c; margin-top: 8px; }
  .word__del { grid-area: x; width: 24px; }
  .word__msg { grid-area: m; margin-top: 6px; }
  .list-actions { padding-top: 4px; }
  .options { grid-template-columns: 1fr; gap: 16px; }
  .seg__opt span { padding: 7px 6px; font-size: 13px; line-height: 21px; }
  .side { position: static; width: auto; flex: none; gap: 0; padding-top: 28px; }
  .preview { height: auto; padding: 22px 18px; box-shadow: 0 18px 40px -18px rgba(34, 37, 43, 0.3); }
  .preview__names { padding: 6px 0 2px; font-size: 38px; line-height: 42px; }
  .preview__title { padding: 12px 0 0; }
  .preview__grid, .preview__clues { display: none; }
  .make { gap: 0; padding: 0; }
  .make > :not(.make__msg) { display: none; }
  .make__msg { margin-top: 16px; }
  .make__msg:empty { display: none; }
  .ready { margin-top: 20px; padding: 24px 18px; background: var(--paper); }
  .dock { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; margin-top: 28px; padding: 12px 16px 18px; border-top: 1px solid var(--rule); background: var(--paper); }
  .dock__text { flex: 1 1 auto; min-width: 0; }
  .dock__count { font-size: 15px; line-height: 24px; font-weight: 500; }
  .dock__count.ok { color: var(--accent); }
  .dock__note { font-size: 13px; line-height: 20px; color: var(--accent); }
  .footer { padding-top: 28px; padding-bottom: 24px; }
  .legal { gap: 22px; padding-top: 32px; }
  .legal__sheet { padding: 4px 18px; }
  .legal__sec { padding: 24px 0; }
  .legal__sec h2 { font-size: 19px; line-height: 25px; }
}
body.is-ready .dock__note { color: var(--graphite); }
