:root {
  --ground: #F5F5F2;
  --surface: #FFFFFF;
  --line: #E2E0DA;
  --ink: #1B1D22;
  --muted: #5C5F66;
  --accent: #2F3B8F;
  --accent-soft: #E6E8F4;
  --warn-ink: #6B3A0B;
  --warn-soft: #FBEFDF;
  --ok: #1E6B45;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif; line-height: 1.7; }
a { color: var(--accent); }
header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 16px 24px; border-bottom: 1px solid var(--line); background: #FBFBF9; }
.logo { font-family: "Hiragino Mincho ProN", "Noto Serif JP", serif; font-size: 24px; font-weight: 700; letter-spacing: .12em; text-decoration: none; color: var(--ink); }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.badge.local { background: #ECEBE6; color: var(--muted); }
main { max-width: 960px; margin: 0 auto; padding: 32px 24px 80px; display: flex; flex-direction: column; gap: 28px; }
h1 { font-family: "Hiragino Mincho ProN", "Noto Serif JP", serif; font-size: 30px; margin: 0; }
h2 { font-size: 18px; margin: 0 0 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input[type=text], input[type=date], input[type=password] { min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px; font-weight: 400; border: 1px solid #C9C6BE; border-radius: 10px; background: #fff; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.thumbs figure { margin: 0; }
.thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; display: block; background: #ECEBE6; }
.thumbs figcaption { font-size: 12px; color: var(--muted); }
.thumbs figcaption.over { color: var(--warn-ink); font-weight: 700; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); }
.choice.public:has(input:checked) { border-color: #8A4B0F; }
.choice input { width: 20px; height: 20px; margin-top: 3px; }
.note { padding: 16px; border-radius: 12px; font-size: 14px; }
.note.private { background: var(--accent-soft); color: #1F2866; }
.note.public { background: var(--warn-soft); color: var(--warn-ink); }
.check { display: flex; gap: 10px; align-items: center; min-height: 40px; font-size: 15px; }
.check input { width: 20px; height: 20px; }
button.primary { min-height: 52px; padding: 0 28px; border: none; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
button.primary:disabled { background: #D6D3CB; color: #4A4D54; cursor: not-allowed; }
button.secondary { min-height: 44px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 999px; background: #fff; font: inherit; cursor: pointer; }
.log { font-family: ui-monospace, monospace; font-size: 13px; white-space: pre-wrap; background: #16181C; color: #EDECE8; border-radius: 10px; padding: 14px; max-height: 260px; overflow: auto; }
.result dt { color: var(--muted); font-size: 13px; margin-top: 12px; }
.result dd { margin: 2px 0 0; word-break: break-all; font-family: ui-monospace, monospace; font-size: 13px; }
.error { color: #9B1C1C; font-weight: 700; }
.hidden { display: none !important; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery img { width: 100%; border-radius: 10px; display: block; background: #ECEBE6; }

/* ---- general-audience layout ---- */
.tagline { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; line-height: 1.7; }
h3 { font-size: 14px; margin: 16px 0 8px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
a.button { display: inline-flex; align-items: center; text-decoration: none; }
a.button.primary { min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }
.picker { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; border: 2px dashed #B8B5AC; border-radius: 14px; background: #FBFBF9; text-align: center; }
.picker p { margin: 0; }
.picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.picker-main { font-size: 16px; font-weight: 700; color: var(--accent); }
.picker-sub { font-size: 13px; color: var(--muted); }
.thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; display: block; background: #ECEBE6; }
.note { margin-top: 16px; }
progress { width: 100%; height: 10px; accent-color: var(--accent); }
details.inline { margin-top: 12px; }
details.inline summary { cursor: pointer; font-weight: 600; min-height: 32px; }
details.tech { border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); }
details.tech summary { cursor: pointer; font-size: 13px; min-height: 32px; }
details.tech .tech-body { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.tech-list { margin: 0; }
.tech-list dt { color: var(--muted); font-size: 12px; margin-top: 10px; }
.tech-list dd { margin: 2px 0 0; word-break: break-all; font-family: ui-monospace, monospace; font-size: 12px; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, monospace; font-size: 13px; }
/* Masked passphrase field: type="text" so Japanese input (IME) stays available */
.pass-wrap { position: relative; display: flex; }
.pass-wrap input { flex: 1 1 auto; min-width: 0; padding-right: 52px; font-kerning: none; font-variant-ligatures: none; }
/* Hidden mode: the real text and caret are transparent; evenly spaced dots and our own caret are drawn on top (see reveal.js). */
.pass-wrap input.is-masked { color: transparent; caret-color: transparent; }
.pass-wrap input.is-masked::selection { color: transparent; background: transparent; }
.pass-dots { position: absolute; left: 13px; right: 52px; top: 0; bottom: 0; display: flex; align-items: center; overflow: hidden; pointer-events: none; }
.pass-wrap:not(.masked) .pass-dots { display: none; }
.pass-track { position: relative; display: inline-flex; align-items: center; height: 20px; }
.pass-cell { position: relative; width: 14px; height: 14px; flex: 0 0 14px; }
.pass-cell::after { content: ""; position: absolute; left: 3.5px; top: 3.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.pass-caret { position: absolute; top: 0; width: 1.5px; height: 20px; background: var(--ink); visibility: hidden; }
.pass-wrap.masked.focused .pass-caret { visibility: visible; animation: towa-blink 1.06s steps(1) infinite; }
@keyframes towa-blink { 50% { opacity: 0; } }
button.eye { position: absolute; top: 50%; right: 2px; transform: translateY(-50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
button.eye:hover { color: var(--ink); background: #F0EFEA; }
button.eye:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
button.eye[aria-pressed="true"] { color: var(--accent); }
a.button.secondary-link { min-height: 52px; padding: 0 24px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); background: #fff; }
.memo { margin: 12px 0 0; padding: 12px 14px; background: #fff; border: 1px solid #A9AFD3; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.inline-field { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
select { min-height: 44px; padding: 0 10px; font: inherit; font-size: 15px; border: 1px solid #C9C6BE; border-radius: 10px; background: #fff; color: var(--ink); }
.choice-body { display: flex; flex-direction: column; gap: 4px; }
.choice-sub { font-size: 13px; color: var(--muted); }
.facts-list { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }
.facts-list li { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; }
.fact-label { color: var(--muted); font-size: 12px; padding-top: 2px; }
.price-line { margin: -12px 0 0; font-size: 14px; color: var(--ink); }
.pay-line { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.checkout-mount { margin: 16px 0; min-height: 120px; }
.picker.disabled { opacity: .5; cursor: not-allowed; }
.optional { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px; }
textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 16px; font-weight: 400; line-height: 1.7; border: 1px solid #C9C6BE; border-radius: 10px; background: #fff; resize: vertical; }
select { width: 100%; }
.letter-input { margin-top: 16px; }
.letter-input summary { cursor: pointer; font-weight: 600; min-height: 32px; color: #7A3E31; }
.count { text-align: right; margin: 4px 0 0; color: var(--muted); }
.display-choice { margin-bottom: 14px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; }
.preview-head h3 { margin: 0; }
.letter-toggle.small-toggle { min-height: 36px; padding: 0 14px; font-size: 13px; }
.preview { border-radius: 12px; overflow: hidden; }
.inline-field select { width: auto; }
.warn-text { color: var(--warn-ink); font-weight: 600; }
.choose-title { margin: 0 0 4px; font-size: 15px; }
.picker-drop-hint { display: none; font-size: 12px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .picker-drop-hint { display: block; } }
.picker-drop-now { display: none; font-size: 15px; font-weight: 700; color: var(--accent); }
.picker.dragging { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.picker.dragging .picker-sub, .picker.dragging .picker-drop-hint { display: none; }
.picker.dragging .picker-drop-now { display: block; }
.photo-count-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.photo-count-row p { margin: 12px 0 0; }
.text-button { min-height: 36px; padding: 0 8px; border: none; background: none; color: var(--accent); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.thumb { position: relative; }
.thumb-remove { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: none; border-radius: 50%; background: rgba(27, 29, 34, .72); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.thumb-remove:hover { background: rgba(27, 29, 34, .9); }
.thumb-remove:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.thumbs.locked .thumb-remove { display: none; }
.thumb-badge { position: absolute; left: 4px; bottom: 8px; padding: 2px 7px; border-radius: 999px; background: rgba(27, 29, 34, .72); color: #fff; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; pointer-events: none; }
.notice { color: var(--ink); background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }
.refund-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.refund-box p { margin: 0; }
.refund-confirm { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid #E3C9A8; background: var(--warn-soft); border-radius: 12px; }
button.primary.danger { background: #8A3B12; }
.pick-button { min-height: 48px; padding: 0 28px; border: 1.5px solid var(--accent); border-radius: 999px; background: #fff; color: var(--accent); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.pick-button:hover { background: var(--accent-soft); }
.pick-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick-button:disabled { cursor: not-allowed; }
.picker .picker-drop-hint { font-size: 13px; line-height: 1.6; }
.size-note, .perma-howto { margin-top: 10px; font-size: 14px; }
.size-note p, .perma-howto ul { margin: 6px 0 0; }
.perma-howto ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.fail-box { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.fail-box p { margin: 0; }
.fail-summary { font-size: 16px; font-weight: 700; }
.fail-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.fail-option { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #FBFBF9; }
.fail-option h3 { margin: 0; font-size: 15px; }
.fail-option .refund-confirm { align-self: stretch; }
.size-note h4 { margin: 12px 0 4px; font-size: 14px; }
.size-note ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
#preview.untitled :is(.cover-title, .plate-title, .plate-sub, .end-title) { opacity: .45; }
#untitledNote { margin: 8px 0 0; }
.picker-sub { white-space: pre-line; }
.date-field { display: flex; flex-direction: column; gap: 6px; }
.date-field input[type=date]:disabled { opacity: .45; }
.small-check { min-height: 32px; font-size: 14px; font-weight: 400; }
.small-check input { width: 18px; height: 18px; }
.terms-check { align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.7; }
.terms-check input { margin-top: 3px; flex: 0 0 auto; }
.site-footer { max-width: 960px; margin: 0 auto; padding: 0 24px 40px; font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer { display: flex; gap: 20px; flex-wrap: wrap; }
.header-link { margin-left: auto; font-size: 14px; color: var(--accent); text-decoration: none; padding: 6px 0; }
.header-link:hover { text-decoration: underline; }
#mineNote { margin: 10px 0 0; }
#mineNote .text-button { font-size: 13px; min-height: 0; padding: 0 2px; }
.order-summary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 16px; padding: 14px 16px; border: 1px solid var(--line, #E3E0D8); border-radius: 12px; font-size: 14px; line-height: 1.7; }
.order-summary dt { font-weight: 600; }
.order-summary dd { margin: 0; }
@media (max-width: 600px) { .order-summary { grid-template-columns: 1fr; gap: 0; } .order-summary dd { margin-bottom: 8px; } }
.phrase { display: inline-block; }
