:root {
  color-scheme: light;
  --ink: #2b2b28;
  --ink-soft: #63655f;
  --line: #e3e8e2;
  --paper: #fff;
  --paper-soft: #f7faf6;
  --bg: #f3f6f2;
  --accent: #3d7a55;
  --accent-strong: #2f6243;
  --accent-soft: #e9f3eb;
  --warn: #a35a00;
  --warn-soft: #fff4e5;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
.top { display: flex; align-items: baseline; gap: .75rem; padding: .75rem 16px; max-width: 960px; margin: 0 auto; }
.brand { white-space: nowrap; font-weight: 800; color: var(--accent-strong); text-decoration: none; font-size: 1.1rem; padding-block: .35rem; }
.crumb { color: var(--ink-soft); }
.crumb::before { content: "／"; margin-right: .5rem; }
.intro, main, .foot { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.intro h1 { color: var(--accent-strong); margin: 4px 0 2px; font-size: 1.5rem; }
.lead { margin: 0; }
.safe { margin: 8px 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); font-size: .92rem; }
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; }
.stepper a { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-soft); text-decoration: none; font-size: .9rem; }
.stepper .no { width: 24px; height: 24px; font-size: .85rem; background: var(--line); color: var(--ink-soft); }
.stepper li.done a { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); }
.stepper li.done .no { background: var(--accent); color: var(--paper); font-size: 0; }
.stepper li.done .no::after { content: "✓"; font-size: .85rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; padding: 16px; margin: 0 0 16px; scroll-margin-top: 8px; }
.card h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--accent-strong); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--paper); font-size: 1rem; flex: none; }
.count { font-size: .9rem; color: var(--ink-soft); font-weight: normal; }
.tips { margin: 0 0 12px; padding-left: 1.2em; }
.hint, .note { color: var(--ink-soft); font-size: .92rem; margin: 4px 0 8px; }
.mode-note:empty::before { content: "\00a0"; } 
.sub-h { font-size: 1rem; margin: 20px 0 4px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--ink); }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file span, button.main, button.sub { display: inline-block; border: none; border-radius: 10px; cursor: pointer; font: inherit; }
.file span, button.main { background: var(--accent); color: var(--paper); padding: 10px 18px; font-weight: bold; }
.file span:hover, button.main:hover { background: var(--accent-strong); }
button.main { font-size: 1.1rem; padding: 12px 24px; }
button.main.small { font-size: 1rem; padding: 6px 14px; }
button.main:disabled { opacity: .6; cursor: progress; }
button.sub { background: var(--paper-soft); color: var(--ink); padding: 6px 12px; border: 1px solid var(--line); min-height: 40px; }
button.sub:hover:not(:disabled) { border-color: var(--accent); }
button.sub:disabled { opacity: .45; cursor: not-allowed; }
.file input:focus-visible + span, button:focus-visible, .slot:focus-visible, #canvas:focus-visible, .stepper a:focus-visible { outline: 3px solid #f2b640; outline-offset: 2px; }
.pages { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.pages button[aria-pressed] { border: 2px solid var(--line); background: var(--paper); padding: 2px; border-radius: 8px; cursor: pointer; }
.pages button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pages img { display: block; height: 72px; border-radius: 6px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 8px; }
.slot { border: 2px solid var(--line); border-left-width: 6px; border-radius: 10px; padding: 6px; background: var(--paper); text-align: left; font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.slot[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.slot .name { font-size: .88rem; font-weight: bold; display: flex; justify-content: space-between; gap: 4px; }
.slot .done { color: var(--accent); }
.slot .thumb { height: 64px; display: grid; place-items: center; background: var(--paper-soft); border: 1px dashed var(--line); border-radius: 6px; overflow: hidden; color: var(--ink-soft); font-size: .8rem; text-align: center; padding: 0 4px; }
.slot .thumb img { max-height: 64px; max-width: 100%; }
.slot .cap-label { font-size: .75rem; color: var(--ink-soft); }
.slot input { font: inherit; font-size: .9rem; width: 100%; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
.tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 8px 0; padding: 8px; background: var(--paper-soft); border-radius: 8px; }
.tools input[type="range"] { vertical-align: middle; width: 140px; accent-color: var(--accent); }
.tools input[type="checkbox"], .row input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }
.stage { position: relative; border: 1px dashed var(--line); border-radius: 8px; min-height: 120px; overflow: hidden; background: var(--paper-soft); }
#canvas { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.empty[hidden] { display: none; } 
.empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--ink-soft); }
.kbd-hint { font-size: .82rem; }
@media (pointer: coarse) { .kbd-hint { display: none; } } 
label { display: block; margin: 8px 0; }
input:not([type]), input[type="text"], textarea, select {
  display: block; width: 100%; font: inherit; padding: 6px 8px; margin-top: 2px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink);
}
input:not([type]):focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; }
.row > label:first-child { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.row > label:nth-child(2) { flex: 1 1 260px; }
.row > label.narrow { flex: 0 0 120px; }
.tools label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 .wide { grid-column: 1 / -1; }
code { background: var(--paper-soft); border: 1px solid var(--line); padding: 0 4px; border-radius: 4px; }
.paste { margin: 4px 0 8px; padding: 12px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
.paste > summary { cursor: pointer; color: var(--accent-strong); font-weight: bold; }
.steps { margin: 8px 0; padding-left: 1.4em; }
.steps li { margin: 6px 0; }
.peek { margin: 4px 0; }
.peek summary { cursor: pointer; color: var(--ink-soft); font-size: .9rem; }
#prompt { font-size: .82rem; }
.check { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.check li { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); font-size: .88rem; background: var(--paper-soft); }
.check li.ok { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); }
.check li.ok::before { content: "✓ "; }
.warnings { margin: 0 0 10px; padding: 8px 12px 8px 2em; color: var(--warn); background: var(--warn-soft); border-radius: 8px; }
.warnings:empty { display: none; }
.answers { margin: 8px 0; font-size: 1rem; }
.answers.stop { color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 8px 12px; font-weight: bold; }
.foot { color: var(--ink-soft); font-size: .82rem; padding-bottom: 32px; }
.foot a { color: var(--accent-strong); }
@media (max-width: 560px) {
  .top { flex-wrap: wrap; row-gap: 0; }
  .crumb { font-size: .85rem; }
  .grid3 { grid-template-columns: 1fr; }
  .intro h1 { font-size: 1.3rem; }
  .stepper a { font-size: .82rem; padding-right: 8px; }
}
.sister { margin: 8px 0 12px; }
.sister h2 { font-size: .85rem; margin: 0 0 .4rem; color: var(--ink-soft); }
.sister ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .1rem 1rem; }
.sister a { display: inline-block; padding-block: .35rem; color: var(--accent); font-weight: 700; text-decoration: none; margin-right: .5rem; }
.sister a:hover { color: var(--accent-strong); text-decoration: underline; }
.sister span { font-size: .78rem; color: var(--ink-soft); }
.photo { position: relative; margin: 0; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.photo img { height: 96px; border-radius: 6px; border: 1px solid var(--line); }
.pno { position: absolute; top: 4px; left: 6px; background: var(--accent); color: var(--paper); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-weight: bold; }
button.sub.small { min-height: 32px; padding: 2px 10px; font-size: .9rem; }
.status { min-height: 1.5em; margin: 10px 0 4px; font-weight: bold; }
.status.warn { color: var(--warn); background: var(--warn-soft); padding: 8px 12px; border-radius: 8px; }
.status.ok { color: var(--accent-strong); }
.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.answers { font-size: .95rem; }
#step3 { position: relative; }
.preview-wrap { position: relative; max-width: 820px; margin: 8px auto 0; }
.preview { width: 100%; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.pv-page { width: 794px; height: 1123px; padding: 30px 48px 27px; transform-origin: 0 0; color: #111; font-family: "UD デジタル 教科書体 NK-R", "UD Digi Kyokasho NK-R", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif; font-size: 16px; overflow: hidden; position: relative; }
.pv-head { border-bottom: 3px solid #1F4E79; padding-bottom: 2px; white-space: nowrap; overflow: hidden; }
.pv-small { font-size: 12px; }
.pv-title { color: #1F4E79; font-size: 20px; font-weight: bold; }
.pv-name { font-size: 15px; }
.pv-toi { font-size: 13px; margin: 5px 0; }
.pv-toi b { color: #D97706; }
.pv-mats { display: flex; }
.pv-mat { border: 1px solid #B0BEC5; padding: 2px 4px; min-width: 0; }
.pv-mat .pv-img { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 0; min-height: 0; }
.pv-mat img { display: block; width: 100%; height: auto; }
.pv-cap { font-size: 11px; color: #1F4E79; line-height: 1.3; }
.pv-badge { background: #1F4E79; color: #fff; font-weight: bold; padding: 0 4px; font-size: 13px; }
.pv-bar { background: #1F4E79; color: #fff; font-weight: bold; padding: 1px 4px; }
.pv-q { white-space: nowrap; position: relative; }
.pv-blank { white-space: pre; position: relative; font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; min-height: 0; border-radius: 3px; cursor: pointer; }
.pv-hint { display: none; position: absolute; left: 2.1em; top: 50%; transform: translateY(-50%); font-size: .8em; color: #9AA5B1; white-space: nowrap; pointer-events: none; }
.show-ans .pv-hint { display: inline; }
.pv-words { border: 1px dashed #1F4E79; font-size: 13px; padding: 4px 8px; margin: 8px 0 4px; }
.pv-talk { width: 100%; border-collapse: collapse; font-size: 14px; }
.pv-talk td { padding: 2px 6px; }
.pv-th { font-size: 12px; color: #1F4E79; }
.pv-th.c { text-align: center; }
.pv-who { color: #1F4E79; font-weight: bold; text-align: center; width: 12%; }
.pv-say { background: #FFF8E1; border: 1px solid #F9A825; height: 37px; }
.pv-box { border: 1px solid #1F4E79; width: 11.5%; text-align: center; padding: 0 !important; }
.pv-ans { width: 100%; height: 100%; min-height: 34px; background: none; border: 0; font: inherit; color: transparent; cursor: pointer; border-radius: 0; padding: 0; }
.show-ans .pv-ans { color: #9AA5B1; }
.pv-sum { border: 1px solid #1F4E79; }
.pv-sum + .pv-sum { border-top: none; }
.ed { outline: none; border-radius: 3px; cursor: text; white-space: pre; }
.ed:empty { display: inline-block; min-width: .6em; }
.ed:hover, .pv-blank:hover, .pv-ans:hover, .pv-img:hover { background: rgba(43,108,176,.10); box-shadow: 0 0 0 1px rgba(43,108,176,.45); }
.ed:focus, .pv-blank:focus-visible, .pv-ans:focus-visible, .pv-img:focus-visible, .pv-blank.on, .pv-img.on { background: rgba(217,119,6,.10); box-shadow: 0 0 0 2px #D97706; outline: none; }
.ed.ph:empty::before { content: attr(data-ph); color: #9AA5B1; }
.pv-line-tools { position: absolute; right: -44px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; opacity: 0; }
.pv-q:hover .pv-line-tools, .pv-q:focus-within .pv-line-tools { opacity: 1; }
@media (hover: none) { .pv-line-tools { opacity: .55; } }
.pv-line-tools button { width: 20px; height: 20px; min-height: 0; padding: 0; font-size: 13px; line-height: 1; border-radius: 4px; border: 1px solid #B0BEC5; background: #fff; color: #1F4E79; cursor: pointer; }
.pv-add { font-size: 12px; color: #2b6cb0; background: none; border: 1px dashed #9AB; border-radius: 4px; padding: 0 6px; min-height: 0; cursor: pointer; margin: 1px 0 1px 1em; opacity: .7; }
.pv-add:hover { opacity: 1; }
.ans-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: .92rem; }
.how li { margin: 2px 0; }
.pop { position: absolute; z-index: 30; background: var(--paper, #fff); border: 1px solid var(--accent); border-radius: 10px; padding: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.18); width: min(340px, calc(100vw - 32px)); }
.pop label { display: block; font-size: .9rem; margin-bottom: 6px; }
.pop input { width: 100%; }
.pop .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sel-blank { position: absolute; z-index: 31; }
.sel-blank[hidden], .pop[hidden] { display: none !important; }
.crop-modal { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.crop-modal[hidden] { display: none; }
.crop-modal .crop-box { max-width: 1000px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; }
.crop-box { border: 1px solid var(--accent); border-radius: 10px; padding: 8px; margin: 0; background: var(--paper, #fff); }
.crop-box .pages img { height: 56px; }
#canvas { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
:root {
  --pop-navy: #2a2350; --pop-cream: #fff8e7; --pop-tomato: #ff6b4a; --pop-sun: #ffc93c; --pop-sky: #4cb8f5; --pop-mint: #2fbf8f;
  --pop-head: "UD デジタル 教科書体 N", "UD Digi Kyokasho N", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Yu Gothic UI", sans-serif;
  --ink: #2a2350; --ink-soft: #5d5780; --line: #d9d3c4; --paper-soft: #fffdf6; --bg: #fff8e7;
  --accent: #2a2350; --accent-strong: #2a2350; --accent-soft: #fff1c9;
}
html { background: var(--pop-cream); }
body { overflow-x: clip; background-color: var(--pop-cream); background-image: radial-gradient(rgba(42, 35, 80, .07) 1.2px, transparent 1.3px); background-size: 22px 22px; color: var(--pop-navy); }
.top { align-items: center; padding-top: .9rem; padding-bottom: .4rem; }
.brand { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--pop-head); font-weight: 700; color: var(--pop-navy); font-size: 1.12rem; }
.brand::before { content: ""; width: 1.9rem; height: 1.9rem; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M6 18 L20 7 L34 18 V35 H6 Z' fill='%23ffc93c' stroke='%232a2350' stroke-width='3' stroke-linejoin='round'/%3E%3Crect x='16' y='24' width='8' height='11' fill='%23ff6b4a' stroke='%232a2350' stroke-width='2.5'/%3E%3Ccircle cx='20' cy='16' r='3.4' fill='%23fff' stroke='%232a2350' stroke-width='2.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.brand:hover { color: var(--pop-tomato); }
.crumb { font-family: var(--pop-head); font-weight: 700; color: var(--pop-navy); background: #fff; border: 2px solid var(--pop-navy); border-radius: 999px; padding: .05rem .8rem; font-size: .92rem; }
.crumb::before { content: none; }
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1rem; align-items: center; padding: 1rem 0 .6rem; }
.intro .hero h1 { margin: 0; color: var(--pop-navy); font-family: var(--pop-head); font-weight: 700; font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.6rem); line-height: 1.3; letter-spacing: .01em; word-break: auto-phrase; }
.hero h1 span { display: inline-block; }
.hero h1 .l1 { font-size: .62em; display: block; color: #4d476e; }
.hero h1 .l2 { background: linear-gradient(transparent 60%, var(--pop-sun) 60%); padding: 0 .2rem; }
.hero .lead { margin: .8rem 0 0; font-size: 1.02rem; max-width: 34em; color: #4d476e; }
.hero .lead b { color: var(--pop-navy); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.chips li { font-weight: 700; font-size: .88rem; background: #fff; border: 2px solid var(--pop-navy); border-radius: 999px; padding: .05rem .75rem; }
.chips li:nth-child(1) { transform: rotate(-2deg); } .chips li:nth-child(3) { transform: rotate(2deg); }
.hero-art { width: 100%; max-width: 330px; justify-self: end; }
.stepper { margin: .6rem 0 1.2rem; gap: 8px; }
.stepper a { border: 2px solid var(--pop-navy); background: #fff; color: var(--pop-navy); font-weight: 700; padding: 4px 14px 4px 4px; }
.stepper .no { background: #fff1c9; color: var(--pop-navy); border: 2px solid var(--pop-navy); }
.stepper li.done a { background: var(--pop-sun); border-color: var(--pop-navy); color: var(--pop-navy); box-shadow: 2px 2px 0 var(--pop-navy); }
.stepper li.done .no { background: var(--pop-mint); color: #fff; }
.card { background: #fff; border: 3px solid var(--pop-navy); border-radius: 20px; box-shadow: 6px 6px 0 var(--pop-navy); padding: 18px 20px 20px; margin: 0 0 26px; }
.card h2 { font-family: var(--pop-head); font-weight: 700; color: var(--pop-navy); font-size: 1.25rem; }
.card h2 .no { width: 2rem; height: 2rem; border: 2px solid var(--pop-navy); background: var(--pop-tomato); color: #fff; font-weight: 700; transform: rotate(-6deg); }
#step2 h2 .no { background: var(--pop-sky); transform: rotate(5deg); }
#step3 h2 .no { background: var(--pop-mint); }
.tips li::marker { color: var(--pop-tomato); }
.file span, button.main { border: 3px solid var(--pop-navy); border-radius: 16px; background: var(--pop-tomato); color: #fff; box-shadow: 4px 4px 0 var(--pop-navy); font-family: var(--pop-head); letter-spacing: .03em; transition: transform .06s, box-shadow .06s; }
.file span:hover, button.main:hover:not(:disabled) { background: #f45a38; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--pop-navy); }
button.main:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--pop-navy); }
button.main.small { border-width: 2px; border-radius: 12px; box-shadow: 3px 3px 0 var(--pop-navy); }
#saveBtn { background: var(--pop-sky); color: var(--pop-navy); }
#saveBtn:hover:not(:disabled) { background: #36acee; }
button.main:disabled { box-shadow: none; opacity: .5; }
button.sub { border: 2px solid var(--pop-navy); background: #fff; color: var(--pop-navy); border-radius: 999px; font-weight: 600; }
button.sub:hover:not(:disabled) { border-color: var(--pop-navy); background: #fff7dc; }
button.sub[aria-pressed="true"] { background: var(--pop-sun); font-weight: 800; box-shadow: 2px 2px 0 var(--pop-navy); }
.file input:focus-visible + span, button:focus-visible, .slot:focus-visible, #canvas:focus-visible, .stepper a:focus-visible { outline: 3px solid var(--pop-sky); }
.status.ok { color: #1d7a5a; }
.paste { border: 2px dashed var(--pop-navy); background: #fffdf6; border-radius: 16px; }
.paste > summary { color: var(--pop-navy); font-family: var(--pop-head); }
textarea, input:not([type]), input[type="text"] { border: 2px solid var(--pop-navy); border-radius: 12px; }
input:not([type]):focus, textarea:focus { outline: 3px solid var(--pop-sky); border-color: var(--pop-navy); }
.ans-toggle input { accent-color: var(--pop-tomato); width: 18px; height: 18px; }
.warnings { border: 2px solid #e0a040; }
.pages { gap: 16px; margin-top: 16px; align-items: flex-start; }
.photo { gap: 8px; }
.photo-zoom { display: block; padding: 0; border: 3px solid var(--pop-navy); border-radius: 12px; background: #fff; cursor: zoom-in; overflow: hidden; box-shadow: 4px 4px 0 rgba(42, 35, 80, .25); }
.photo-zoom:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(42, 35, 80, .35); }
.photo .photo-zoom img { display: block; height: 240px; width: auto; max-width: min(420px, calc(100vw - 80px)); object-fit: contain; border: 0; border-radius: 0; }
.pno { top: 8px; left: 8px; width: 30px; height: 30px; border: 2px solid var(--pop-navy); background: var(--pop-sun); color: var(--pop-navy); font-size: 1.05rem; }
.photo-view { position: fixed; inset: 0; z-index: 50; background: rgba(42, 35, 80, .75); display: grid; place-items: center; padding: 16px; gap: 12px; grid-template-rows: 1fr auto; }
.photo-view[hidden] { display: none; }
.photo-view img { max-width: 100%; max-height: calc(100vh - 100px); object-fit: contain; background: #fff; border: 3px solid #fff; border-radius: 8px; }
.crop-box { border: 3px solid var(--pop-navy); border-radius: 18px; }
.crop-box .pages img { height: 72px; }
.preview { border: 0; box-shadow: 0 0 0 2px var(--pop-navy), 8px 8px 0 rgba(42, 35, 80, .18); border-radius: 2px; }
.pop { border: 3px solid var(--pop-navy); border-radius: 16px; box-shadow: 5px 5px 0 var(--pop-navy); }
.pop-h { margin: 0 0 6px; font-family: var(--pop-head); font-weight: 700; }
.pop-lab { font-size: .88rem; font-weight: 700; align-self: center; margin-right: 4px; min-width: 6.5em; }
.pop .row.seg { align-items: center; margin-top: 6px; }
.pop .note { margin: 8px 0 0; }
.pv-sumbox { position: relative; }
.pv-sumbtn { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; min-height: 0; border-radius: 0; font: inherit; text-align: left; }
.pv-sumbtn:hover { background: rgba(43, 108, 176, .06); box-shadow: 0 0 0 1px rgba(43, 108, 176, .45); }
.pv-sumbtn:focus-visible, .pv-sumbtn.on { background: rgba(217, 119, 6, .06); box-shadow: 0 0 0 2px #D97706; outline: none; }
.pv-grip { position: absolute; left: 50%; bottom: -11px; width: 70px; height: 18px; margin-left: -35px; border: 2px solid var(--pop-navy); border-radius: 999px; background-color: var(--pop-sun); cursor: ns-resize; touch-action: none;
  background-image: linear-gradient(var(--pop-navy), var(--pop-navy)), linear-gradient(var(--pop-navy), var(--pop-navy)); background-size: 30px 2px; background-repeat: no-repeat; background-position: center 4px, center 9px; }
.foot { color: #5d5780; border-top: 2px dashed rgba(42, 35, 80, .3); padding-top: 18px; margin-top: 8px; }
.sister h2 { font-family: var(--pop-head); color: var(--pop-navy); }
.sister a, .foot a { color: var(--pop-navy); text-decoration-color: var(--pop-tomato); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sister a:hover { color: var(--pop-tomato); }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding-top: .4rem; }
  .hero-art { display: none; }
  .card { padding: 14px 14px 16px; box-shadow: 4px 4px 0 var(--pop-navy); border-radius: 16px; }
  .pages { display: grid; grid-template-columns: 1fr; gap: 14px; }
  .photo { display: flex; }
  .photo-zoom { width: 100%; }
  .photo .photo-zoom img { width: 100%; height: auto; max-height: 420px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .chips li, .card h2 .no { transform: none; } }
