:root {
  color-scheme: light;
  --ink: #272F53;
  --muted: #595B70;
  --blue: #3B4675;
  --navy: #3B4675;
  --gold: #FFCD44;
  --edge: #DCDDE9;
  --soft: #F3F3F9;
  --focus: #495689;
  font: 1rem/1.65 "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background: #F3F3F9;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--blue); text-underline-offset: .2em; }
.skip { position: absolute; top: .25rem; left: .5rem; z-index: 2; padding: .45rem .7rem; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }
.app-header { background: white; border-bottom: 1px solid var(--edge); }
.mast, main { width: min(71rem, calc(100% - 3.5rem)); margin-inline: auto; }
.mast { display: flex; min-height: 4.25rem; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 750 1.22rem/1.1 system-ui,sans-serif; letter-spacing: -.045em; color: var(--ink); }
.brand-icon, .section-icon { flex: none; position: relative; display: inline-flex; align-items: center; justify-content: center; }
.brand-icon { width: 1.9rem; height: 1.9rem; gap: 2px; border-radius: .52rem; background: var(--navy); }
.brand-icon i, .sound i { width: 2px; border-radius: 2px; background: currentColor; height: .45rem; }
.brand-icon i { color: #FFCD44; }
.brand-icon i:nth-child(2), .sound i:nth-child(2) { height: .95rem; }
.brand-icon i:nth-child(3), .sound i:nth-child(3) { height: .68rem; }
.mast nav { display: flex; gap: 1.35rem; align-items: center; }
.mast nav a,.crumb a { text-decoration: none; color: var(--muted); }
.mast nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 650; }
.mast nav a:hover,.crumb a:hover { color: var(--blue); text-decoration: underline; }
.intro { padding: 1.35rem 0 1.75rem; }
.intro p,.panel p,footer p { margin: 0; }
.crumb { display: flex; align-items: center; gap: .45rem; margin-bottom: .7rem !important; font-size: .875rem; color: var(--muted); }
.crumb a { display: inline-flex; align-items: center; min-height: 2rem; }
h1,h2,h3 { color: var(--ink); margin: 0; line-height: 1.38; }
h1 { margin-bottom: .4rem; font-size: clamp(1.68rem, 4vw, 2.45rem); letter-spacing: -.035em; }
h2 { font-size: 1.19rem; font-weight: 740; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
.privacy-intro,.fine,.hint,.track-status,.help-links,footer { color: var(--muted); font-size: .9rem; }
.intro .privacy-intro { margin-top: .25rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(18rem, .86fr); gap: clamp(1rem, 2.4vw, 1.8rem); align-items: start; }
fieldset { display: grid; min-inline-size: 0; margin: 0; padding: 0; border: 0; gap: 1rem; }
.panel { min-width: 0; padding: clamp(1.15rem, 2.4vw, 1.75rem); background: white; border: 1px solid var(--edge); border-radius: 1.05rem; box-shadow: 0 3px 12px #20385006; }
.section-heading, .summary-title, .preview-heading { display: flex; align-items: center; gap: .7rem; }
.section-heading + .hint, .privacy .section-heading + p { margin: .7rem 0 1.2rem; }
.section-icon { width: 2.1rem; height: 2.1rem; border-radius: .64rem; color: #3B4675; background: #ECECF6; }
.book::before { content: ""; width: 1.05rem; height: .83rem; border: 1.5px solid currentColor; border-radius: 2px 3px 3px 2px; }
.book::after { content: ""; position: absolute; width: 1px; height: .82rem; left: 44%; background: currentColor; }
.section-icon.sound { color: #705520; background: #FFF5CF; gap: 2px; }
.lock::before { content: ""; position: absolute; top: .47rem; width: .64rem; height: .62rem; border: 1.5px solid currentColor; border-bottom: none; border-radius: .36rem .36rem 0 0; }
.lock::after { content: ""; position: absolute; top: .94rem; width: .9rem; height: .62rem; border: 1.5px solid currentColor; background: #ECECF6; border-radius: 2px; }
label { display: block; color: var(--ink); font-weight: 680; }
input, button, textarea { font: inherit; }
input:not([type=checkbox]), textarea { width: 100%; max-width: 100%; min-width: 0; color: var(--ink); background: #fcfdff; border: 1px solid #b6c3d0; border-radius: .53rem; }
input:not([type=checkbox]) { min-height: 2.8rem; padding: .45rem .65rem; }
textarea { display: block; line-height: 1.55; padding: .7rem .85rem; resize: vertical; }
textarea::placeholder { color: #69788b; opacity: 1; }
input:hover,textarea:hover { border-color: #75869b; }
input:focus, textarea:focus { background: white; }
.month-field { display: flex; justify-content: space-between; align-items: center; gap: .8rem; border-block: 1px solid #e7ecf0; padding-block: .65rem; }
.month-field input { width: auto; max-width: 65%; }
.field { margin-top: 1.1rem; }
.field label,.privacy label[for=phrase] { margin: 0 0 .35rem; }
.panel .fine { margin-top: .5rem; }
.optional-audio { padding: 0; }
summary { display: flex; align-items: center; justify-content: space-between; gap: .55rem; cursor: pointer; list-style: none; padding: clamp(1rem, 2.4vw, 1.55rem); border-radius: 1rem; }
summary::-webkit-details-marker { display: none; }
.summary-copy,.summary-hint { display: block; }
.summary-title strong { font-size: 1.05rem; }
.summary-hint { margin-top: .42rem; color: var(--muted); font-size: .9rem; }
.selection { display: inline-flex; flex: none; align-items: center; gap: .6rem; color: var(--muted); font-size: .875rem; }
.chevron { width: .62rem; height: .62rem; border: solid var(--muted); border-width: 0 1.75px 1.75px 0; transform: rotate(45deg); margin: -.25rem .12rem 0 0; }
details[open] .chevron { transform: rotate(225deg); margin-top: .25rem; }
.details-content { padding: 0 clamp(1rem, 2.4vw, 1.55rem) 1.35rem; }
.tracks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: .8rem 0 .4rem; }
.track { border: 1px solid var(--edge); border-radius: .65rem; padding: .8rem; min-width: 0; }
.track label { margin-bottom: .45rem; font-size: .95rem; }
.track input[type=file] { padding: .18rem; font-size: .875rem; min-height: 2.75rem; border: 0; background: var(--soft); }
.track input[type=file]::file-selector-button { border: 0; border-radius: .35rem; color: #3B4675; background: #dfe9f4; padding: .55rem .55rem; margin-right: .4rem; font: inherit; cursor: pointer; }
.track audio { width: 100%; margin: .55rem 0 0; }
.track-status { overflow-wrap: anywhere; }
.track-status:not(:empty) { margin-top: .3rem; }
.help-links { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.help-links a { display: inline-flex; align-items: center; min-height: 44px; }
button,.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.8rem; border: 1px solid #9eafc1; padding: .5rem .9rem; border-radius: .6rem; color: #3B4675; background: white; cursor: pointer; text-decoration: none; font-weight: 680; line-height: 1.4; text-align: center; }
button:not(:disabled):hover,.button:hover { background: #ECECF6; }
.primary { width: 100%; color: white; background: var(--blue); border-color: var(--blue); }
.primary:not(:disabled):hover,.button.primary:hover { color: white; border-color: #272F53; background: #272F53; }
button.primary:disabled { background: #e4e9f0; border-color: #e4e9f0; color: #595B70; cursor: default; }
button.text-button { background: transparent; border: none; color: var(--blue); text-decoration: underline; text-underline-offset: .23em; padding: .26rem .15rem; font-size: .9rem; }
.passline { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .5rem; }
.pass-actions { margin: .5rem 0 .65rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem .1rem; border-top: 1px solid var(--edge); cursor: pointer; font-size: .95rem; font-weight: 530; }
.check input { width: 1.12rem; height: 1.12rem; flex: none; margin: .19rem 0 0; accent-color: var(--blue); }
.review { min-width: 0; }
.preview-heading { justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.preview-heading span { font-size: .875rem; color: var(--muted); }
.paper-stage { padding: 1rem clamp(.8rem, 2.7vw, 1.7rem); border-radius: .65rem; background: #edf1f6; border: 1px solid #DCDDE9; }
.preview-paper { min-height: 12.5rem; padding: .95rem 1.1rem 1.15rem; border: 1px solid #DCDDE9; background: #fff; box-shadow: 0 3px 7px #213c5914; }
.preview-paper .imprint { display: inline-block; padding-top: .32rem; border-top: 2px solid var(--gold); color: var(--navy); font: 700 .78rem/1.4 system-ui,sans-serif; letter-spacing: -.02em; }
.preview-paper .paper-month { color: #795d2e; margin: .72rem 0 .12rem; font-size: .82rem; font-weight: 680; }
.preview-paper h3 { border-bottom: 1px solid #c8bea8; padding-bottom: .4rem; font: 670 clamp(1.03rem, 1.65vw, 1.32rem)/1.4 "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif; }
.paper-filler { color: #58677b; font-size: .83rem; margin: .8rem 0 .1rem; }
.paper-filler i { display: block; margin-top: .5rem; width: 67%; height: 2px; background: #e5e9ef; }
.paper-filler i:last-child { width: 40%; }
.preview-paper .paper-entry { margin-top: .62rem; overflow-wrap: anywhere; font-size: .94rem; color: #29374c; white-space: pre-wrap; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.preview-paper .paper-voices { margin-top: .75rem; color: #715728; font-size: .83rem; }
.make { padding-top: 1rem; }
.make .hint { min-height: 1.4em; margin-bottom: .55rem; }
.results { margin-top: 1rem; border-color: #a5bbcf; }
.section-icon.done { background: #ECECF6; color: #276354; }
.done::after { content: ""; width: .88rem; height: .44rem; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg); margin-top: -.1rem; }
.results .section-heading { margin-bottom: .6rem; }
.results #result-info,.results li,.results #try-reader { font-size: .95rem; }
.downloads { display: grid; gap: .5rem; margin: .8rem 0 0; }
#sharing { border-top: 1px solid var(--edge); padding-top: .9rem; margin-top: 1rem; }
ol { margin: .45rem 0; padding-left: 1.45rem; }
li + li { margin-top: .35rem; }
.clear-review { flex-basis: 100%; padding: .8rem 1rem; border: 1px solid var(--edge); border-radius: .7rem; background: #fff; }
.clear-review p { margin: 0 0 .5rem; }
.clear-review button { margin-right: .35rem; }
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; border-top: 1px solid var(--edge); margin-top: 1.35rem; padding: .8rem 0 2.5rem; }
:is(a,button,input,textarea,summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 52rem) {
  .workspace { grid-template-columns: minmax(0,1.35fr) minmax(16.5rem,.83fr); gap: .9rem; }
  .tracks { grid-template-columns: 1fr; }
  .mast, main { width: min(100% - 2rem, 71rem); }
}
@media (max-width: 44rem) {
  .workspace { display: block; }
  .review { margin-top: .9rem; }
  .mast { min-height: 3.4rem; gap: .55rem; }
  .mast nav { gap: .75rem; }
  .mast nav a { font-size: .83rem; }
  .intro { padding: .7rem 0 1rem; }
  .intro p:not(.crumb) { font-size: .94rem; }
  .intro .privacy-intro { font-size: .87rem; }
  .panel { padding: 1.05rem; border-radius: .85rem; }
  .optional-audio { padding: 0; }
  .summary-title { gap: .47rem; }
  .summary-title strong { font-size: 1rem; }
  .paper-stage { padding: .75rem 1rem; }
  .preview-paper { min-height: 9rem; }
  footer { display: block; }
  footer button { margin-top: .2rem; }
}
@media (max-width: 23rem) {
  .mast,main { width: calc(100% - 1.5rem); }
  .mast nav { gap: .5rem; }
  .brand { font-size: 1.08rem; gap: .3rem; }
  .brand-icon { width: 1.55rem; height: 1.55rem; }
  h1 { font-size: 1.5rem; }
  .summary-title .section-icon { display: none; }
}
