:root {
  color-scheme: light;
  --paper: #fcfcf8;
  --forest: #193f34;
  --ink: #1d302a;
  --muted: #5c6a60;
  --rule: #dce2d9;
  --sage: #e5eddc;
  --width: 460px;
  font-family: "Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",system-ui,sans-serif;
  color: var(--ink);
  background: #e6ebe4;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
* {box-sizing:border-box}
body {margin:0}
button, input {font:inherit}
button, a {touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button {border:0;background:none;color:inherit;cursor:pointer}
a {color:inherit;text-decoration:none}
button:focus-visible, a:focus-visible, input:focus-visible {outline:3px solid #c75430;outline-offset:2px}
button:active, a:active {opacity:.78}
h1,h2,p {margin:0}
svg {width:20px;height:20px;flex:none}
[lang="ja"] {font-family:"Hiragino Kaku Gothic ProN","Yu Gothic","Meiryo","Noto Sans JP",sans-serif;line-break:strict}
[hidden] {display:none!important}
.app {max-width:var(--width);min-height:100vh;min-height:100dvh;margin:auto;background:var(--paper);position:relative}
.mast {height:64px;padding:env(safe-area-inset-top) 20px 0;display:flex;align-items:center;justify-content:space-between;gap:8px}
.brand {display:flex;align-items:center;min-height:44px;gap:8px;color:var(--forest);white-space:nowrap}
.brand img {width:29px;height:29px}
.brand b {font-size:21px;font-weight:850;letter-spacing:-1.7px}
.brand span {border-left:1px solid #bbc7b9;padding-left:9px;margin-left:2px;font-size:15px;line-height:17px;letter-spacing:-.6px;font-weight:600}
.country {display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px;font-weight:650;white-space:nowrap}
.country i {width:20px;height:14px;border:1px solid #d2d7cd;background:white;display:grid;place-items:center;border-radius:3px}
.country i::after {content:"";width:7px;height:7px;background:#c74343;border-radius:50%}
main {padding:0 18px calc(98px + env(safe-area-inset-bottom))}
.common-phrases h1,.place-title {margin:9px 0 12px;font-size:26px;line-height:1.3;letter-spacing:-1.5px;color:var(--forest)}
.japan-cover h1 {margin:9px 0 12px;font-size:26px;line-height:1.3;letter-spacing:-1.5px;color:var(--forest)}
.japan-cover p,.place-sign,.desk-caption,.chapter-index {display:none}
.common-phrases .phrase-row {border-color:#e0e5db}
.common-phrases .open-row {gap:0;padding:6px 2px}
.common-phrases .pronunciation {font-size:19px}
.common-phrases .original {font-size:13px}
.common-phrases + .phrase-section .section-title {margin-top:25px}
.place-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;padding:0 12px;background:#edf2e8;border-radius:12px}
.place-link {display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:64px;padding:9px 2px;border-bottom:1px solid var(--rule)}
.place-link b,.place-link small {display:block}
.place-link b {font-size:16px;color:var(--forest);letter-spacing:-.6px}
.place-link small {margin-top:4px;color:var(--muted);font-size:13px;line-height:1.4}
.place-link:nth-last-child(-n+2) {border-bottom-color:transparent}
.place-link i,.back-home span {font-style:normal;font-size:21px;line-height:1;color:#68816c}
.back-home {display:inline-flex;gap:5px;align-items:center;min-height:44px;font-size:14px;color:var(--muted);font-weight:650}
.place-title {margin:0;background:var(--sage);border-radius:12px;padding:15px 16px}
.destination-link {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:18px;padding:16px 18px;border:1px solid var(--rule);border-radius:14px;background:var(--sage)}
.destination-link strong,.destination-link small {display:block}
.destination-link strong {color:var(--forest);font-size:24px;letter-spacing:-1px}
.destination-link small {margin-top:6px;font-size:14px;line-height:1.5;color:var(--muted);word-break:keep-all}
.destination-link img {width:29%;height:auto;mix-blend-mode:multiply}
.destination-link picture {width:29%;flex:none}
.destination-link picture img {width:100%;display:block}
.destination-topics {display:flex;flex-wrap:wrap;gap:2px 18px;margin-top:16px}
.destination-topics a {display:inline-flex;align-items:center;min-height:44px;color:var(--forest);font-size:15px;text-decoration:underline;text-underline-offset:4px}
.scene-links {display:flex;flex-wrap:wrap;gap:2px 12px;margin:6px 2px 0}
.scene-links a {display:inline-flex;align-items:center;min-height:44px;color:var(--forest);font-size:14px;font-weight:650;text-decoration:underline;text-decoration-color:#a8b8a9;text-underline-offset:4px}
.phrase-section[id] {scroll-margin-top:14px}
.phrase-section:focus {outline:none}
.cover {background:var(--sage);border-radius:13px;display:flex;align-items:center;position:relative;overflow:hidden;min-height:77px;padding:14px 18px}
.cover h1 {font-size:29px;font-weight:800;color:var(--forest);letter-spacing:-1.8px}
.cover img {position:absolute;right:16px;bottom:0;height:98%;width:33%;object-fit:contain;object-position:right bottom;mix-blend-mode:multiply;pointer-events:none}
.segments {position:sticky;top:0;z-index:2;display:grid;grid-template-columns:1.5fr repeat(3,1fr);margin-top:9px;background:var(--paper);border-bottom:1px solid var(--rule)}
.segments a {display:grid;place-items:center;min-height:47px;color:var(--muted);font-size:15px;font-weight:580;border-bottom:3px solid transparent}
.segments a[aria-current] {border-bottom-color:var(--forest);color:var(--forest);font-weight:750}
.section-title {display:flex;align-items:center;justify-content:space-between;gap:10px;margin:22px 2px 10px}
.section-title h2 {font-size:20px;line-height:1.35;letter-spacing:-1.2px;font-weight:780}
.section-title>span,.section-title>svg {font-size:13px;color:var(--muted)}
.icon-btn {min-height:44px;min-width:44px;display:inline-grid;place-items:center;border-radius:12px;padding:6px}
.save {color:#647167}
.save[aria-pressed=true] {color:var(--forest)}
.save[aria-pressed=true] svg {fill:#caddbd}
.reading {font-size:14px;line-height:1.55;color:var(--muted);word-break:keep-all;overflow-wrap:anywhere}
.actions {display:flex;align-items:center;gap:8px}
.listen {display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 14px;min-height:44px;border-radius:9px;font-size:14px;font-weight:700;color:white;background:var(--forest)}
.listen[aria-pressed=true] {background:#355b48}
.listen svg {width:17px;height:17px}
.phrase-row {display:flex;align-items:center;gap:6px;border-bottom:1px solid var(--rule)}
.open-row {text-align:left;min-width:0;flex:1;padding:12px 2px;display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.row-meaning {font-size:15px;line-height:1.4;color:#374b40;letter-spacing:-.35px}
.pronunciation {font-size:20px;line-height:1.43;font-weight:730;color:var(--forest);letter-spacing:-.65px;word-break:keep-all;overflow-wrap:anywhere}
.original {font-size:13px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.open-row small,.reply-label {font-size:12px;line-height:1.4;color:#496952;font-weight:680}
.open-row small {margin-bottom:1px}
.audio-icon {color:#3c5946}
.audio-icon[aria-pressed=true] {background:#e6eddf}
.count-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px}
.count-item {display:grid;grid-template-columns:auto 1fr;align-items:baseline;text-align:left;gap:1px 7px;min-height:55px;border-bottom:1px solid var(--rule);padding:8px 0}
.count-item>span:first-child {grid-row:span 2;color:var(--muted);font-size:14px;font-variant-numeric:tabular-nums}
.count-item .pronunciation {font-size:17px}
.count-ja {grid-column:2;font-size:12px;color:var(--muted)}
.count-tip {margin:10px 0 0;padding-bottom:12px;font-size:14px;line-height:1.6;color:var(--muted);word-break:keep-all}
.phrase-section + .phrase-section {margin-top:26px}
.exchange {border:1px solid var(--rule);border-radius:10px;overflow:hidden;margin-bottom:12px}
.staff-line,.replies {padding:0 12px}
.staff-line {background:#fff}
.staff-line .phrase-row,.replies .phrase-row:last-child {border:0}
.replies {background:#edf3e8;padding-top:9px;border-top:1px solid var(--rule)}
.replies .open-row {padding:6px 2px 9px}
.replies .phrase-row + .phrase-row .open-row {padding-top:9px}
#navigation {position:fixed;z-index:3;inset:auto 0 0;max-width:var(--width);margin:auto;background:var(--paper);border-top:1px solid var(--rule);display:grid;grid-template-columns:repeat(3,1fr);padding:4px 14px calc(5px + env(safe-area-inset-bottom))}
#navigation a {min-height:53px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#687268;font-size:12px;font-weight:550}
#navigation a[aria-current] {color:var(--forest);font-weight:780}
#navigation a[aria-current] svg {stroke-width:2.2;fill:#dbe8cf}
.subpage {padding:12px 2px}
.subpage h1 {font-size:28px;letter-spacing:-1.5px;color:var(--forest);margin-bottom:15px}
.sub-note {color:var(--muted);font-size:14px;margin:14px 0 6px}
.searchbox {display:flex;align-items:center;gap:10px;padding:0 12px;border:1px solid #a4b5a5;border-radius:10px;background:white;color:var(--muted)}
.searchbox input {width:100%;padding:13px 0;border:0;background:none;color:var(--ink);min-width:0;font-size:16px}
.result-list {border-top:1px solid var(--rule)}
.empty {text-align:center;padding:45px 6px;color:var(--muted)}
.empty h2 {margin:12px 0 7px;color:var(--ink);font-size:18px;letter-spacing:-.7px}
.empty p {font-size:14px;line-height:1.5}
.empty a {display:inline-flex;align-items:center;min-height:44px;color:var(--forest);text-decoration:underline;font-weight:700;font-size:14px}
.modal-open {overflow:hidden}
dialog {background:transparent;color:var(--ink);padding:0;border:0;margin:auto auto 0;width:min(100%,var(--width));max-width:100%;max-height:94vh;max-height:94dvh;overflow:auto;border-radius:23px 23px 0 0}
dialog::backdrop {background:rgb(21 40 29 / 53%)}
.sheet {padding:8px 22px calc(22px + env(safe-area-inset-bottom));background:var(--paper);min-height:min(56dvh,440px);display:flex;flex-direction:column}
.sheet-top {display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:14px;font-weight:650}
.sheet-top .icon-btn {margin-right:-7px}
.display-phrase {flex:1;display:flex;flex-direction:column;justify-content:center;padding:20px 0}
.display-phrase h2 {font-weight:730;font-size:clamp(33px,10.5vw,51px);line-height:1.34;letter-spacing:-1px;color:var(--forest);overflow-wrap:anywhere}
.display-phrase .reading {margin-top:12px;font-size:16px}
.detail-ko {font-size:19px;line-height:1.5;margin-top:6px;font-weight:640;letter-spacing:-.6px}
.sheet .actions {justify-content:space-between}
#notice {position:fixed;z-index:9;left:50%;bottom:calc(75px + env(safe-area-inset-bottom));transform:translateX(-50%);width:max-content;max-width:90vw;pointer-events:none;background:#1c3e30;color:white;border-radius:10px;font-size:14px;padding:10px 16px;opacity:0}
#notice.visible {opacity:1}
@media (max-width:350px) {main,.mast {padding-left:16px;padding-right:16px}.brand span {font-size:14px}.count-item .pronunciation {font-size:16px}.count-grid {column-gap:8px}.section-title>span {font-size:12px}}
@media (min-width:480px) {.app {box-shadow:0 0 0 1px #d8dfd4}.mast {height:68px}.section-title{margin-top:24px}}
@media (prefers-reduced-motion:no-preference) {dialog[open] .sheet {animation:rise .16s ease-out}@keyframes rise {from{transform:translateY(16px);opacity:.7}to{transform:translateY(0);opacity:1}}}
