* { box-sizing: border-box; }
        body { margin: 0; background: #f8f3e5; color: #183633; font: 1rem/1.65 system-ui, sans-serif; }
        main { width: min(70rem, 100% - 2rem); margin: 1.5rem auto 3rem; }
        @font-face { font-family: "Mochiy Pop One"; font-style: normal; font-weight: 400;
            src: url("data:font/woff2;base64,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") format("woff2"); }
        .logo { display: flex; align-items: baseline; gap: .11em; width: fit-content; max-width: 100%;
            margin: .45rem 0 1.2rem; padding: .16em .31em .22em; border: .065em solid #fffdf4; border-radius: .55em;
            background: linear-gradient(115deg, #ffe7aa 2%, #ffddca 39%, #bcead6 73%);
            color: #214e43; box-shadow: 0 .07em #9fc9ad;
            font: 400 clamp(1.65rem, 6.9vw, 3.9rem)/1.18 "Mochiy Pop One", "Hiragino Maru Gothic ProN", Meiryo, sans-serif; }
        .logo-kanji { display: inline-flex; white-space: nowrap; }
        .logo-island { display: inline-flex; align-items: center; gap: .14em; font-size: .66em; white-space: nowrap; }
        .logo-palm { flex: none; width: 1.45em; height: 1.2em; }
        .play-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; margin-top: .9rem; }
        .scene-panel { align-self: start; padding: clamp(.55rem, 1.2vw, 1rem); border-radius: 1.5rem; background: #163f38; }
        .scene-caption { display: block; color: #fff1c9; font-size: clamp(.95rem, 2.2vw, 1.5rem);
            font-weight: 900; margin: .35rem .35rem 0; }
        .scene { --sky: #c4eaf1; --sea: #34889a; --horizon: 49%; position: relative; aspect-ratio: 408 / 513;
            overflow: hidden; border-radius: 1rem; isolation: isolate; container-type: inline-size;
            background: linear-gradient(var(--sky) var(--horizon), var(--sea) var(--horizon)); }
        .scene::before { content: ''; position: absolute; inset: 69% 8% 10%; border-radius: 50%;
            background: #f7d995; box-shadow: 0 min(.55rem, 1.5cqw) #d4a252; }
        .scene::after { content: ''; position: absolute; right: 13%; top: 8%; width: 23%; aspect-ratio: 1;
            border-radius: 50%; background: #ffe3a3; z-index: -1; }
        .wave-lines { position: absolute; z-index: -1; top: var(--horizon); left: 0; width: 100%; height: 37%; }
        .stage-letter { position: absolute; z-index: 1; inset: 4.5% auto auto 5.5%; width: 32%; aspect-ratio: 1;
            display: grid; place-items: center; overflow: hidden; border-radius: 16%; background: #fffdf4;
            color: #173f36; font-size: min(19cqw, 5.25rem); line-height: 1; font-weight: 900; }
        .stage-letter:empty { display: none; }
        .palm, .person, .item { position: absolute; line-height: 1; }
        .palm { left: 16%; bottom: 27%; font-size: min(23cqw, 5.5rem); }
        .person { left: 47%; bottom: 18%; transform: translateX(-50%); font-size: min(14cqw, 3.5rem); }
        .item { left: 74%; bottom: 23%; transform: translateX(-50%); font-size: min(23cqw, 5.5rem);
            font-weight: 900; color: #1e3a37; }
        .item.multiple-props { left: 77%; width: max-content; white-space: nowrap;
            font-size: min(4.5rem, calc(24cqw / var(--prop-count))); }
        .reveal { animation: reveal .75s ease-out; }
        .drop { animation: drop .58s ease-in both; }
        .scene[data-character="船"]:not([data-series="mikkorin_rare"]) .materialize { animation-name: drop; animation-duration: .58s; animation-timing-function: ease-in; }
        .materialize { animation: materialize .55s ease-out both; }
        .scene[data-effect="flood"] { --sky: #a7dce8; --sea: #276d91; --horizon: 20%; }
        .scene[data-effect="flood"]::before { opacity: .25; }
        .scene[data-effect="fire"] { --sky: #ffcb8c; --sea: #765a61; }
        .scene:is([data-effect="void"], [data-effect="blackout"]) { background: #182724; }
        .scene:is([data-effect="void"], [data-effect="blackout"])::before,
        .scene:is([data-effect="void"], [data-effect="blackout"])::after,
        .scene:is([data-effect="void"], [data-effect="blackout"]) :is(.palm, .person, .wave-lines) { visibility: hidden; }
        .scene[data-effect="void"] .item { color: #f8f3e5; }
        .scene[data-asset="岩風呂"] .item { font-size: 0; width: min(28cqw, 6.75rem); aspect-ratio: 1; }
        .scene[data-asset="岩風呂"] .item::after {
            content: ''; position: absolute; inset: 0;
            background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cellipse cx='48' cy='65' rx='42' ry='23' fill='%235e666d'/%3E%3Cellipse cx='48' cy='61' rx='33' ry='15' fill='%234cb7cb'/%3E%3Cpath d='M20 61q8-5 16 0t16 0 16 0m-38 8q8-4 16 0t16 0' fill='none' stroke='%23c7f1f4' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='m8 65 12-5 10 9-4 11-14-3zm21 11 12-7 11 6v12l-18-3zm22-2 14-6 12 4-4 11-18 4zm25-7 8-9 8 4-4 12-13 5z' fill='%238b9297' stroke='%23555e65' stroke-width='2'/%3E%3C/svg%3E");
        }
        .scene:is([data-asset="灯台の光"], [data-asset="武器屋の大砲"], [data-asset="重装備の鎧"]) .item {
            font-size: 0; width: min(23cqw, 5.5rem); aspect-ratio: 1;
        }
        .scene:is([data-asset="灯台の光"], [data-asset="武器屋の大砲"], [data-asset="重装備の鎧"]) .item::after {
            content: ''; position: absolute; inset: 0; background: center / contain no-repeat;
        }
        .scene[data-asset="灯台の光"] .item::after {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23ffda70' opacity='.8' d='m36 16 26-7v22l-26-7zm-8 0L2 9v22l26-7z'/%3E%3Cpath fill='%23fff5db' stroke='%23254150' stroke-width='2' d='M24 24h16l6 33H18z'/%3E%3Cpath fill='%23c94740' d='M22 36h20l2 9H20zM19 15 32 4l13 11z'/%3E%3Cpath fill='%23ffd66a' stroke='%23254150' stroke-width='2' d='M23 15h18v10H23z'/%3E%3Cpath stroke='%23254150' stroke-width='2' d='M32 16v8m0 33V48'/%3E%3C/svg%3E");
        }
        .scene[data-asset="武器屋の大砲"] .item::after {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%2374452d' d='M10 35h35l8 14H12z'/%3E%3Cpath fill='%23394351' stroke='%23202a35' stroke-width='2' d='M11 24 52 8l6 13-42 16c-9 3-14-9-5-13z'/%3E%3Cpath fill='none' stroke='%237a8896' stroke-width='3' d='M17 26 48 14'/%3E%3Ccircle cx='32' cy='46' r='13' fill='%23ad7243' stroke='%23583925' stroke-width='4'/%3E%3Ccircle cx='32' cy='46' r='4' fill='%23583925'/%3E%3C/svg%3E");
        }
        .scene[data-asset="重装備の鎧"] .item::after {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23687786' stroke='%23374553' stroke-width='2' d='M24 8h16l13 8 6 12-11 7-3-4-2 26H21l-2-26-3 4-11-7 6-12z'/%3E%3Cpath fill='%23bac6cf' stroke='%234d5d6c' stroke-width='2' d='m24 9 8 10 8-10 6 10-4 15-10 6-10-6-4-15zm-3 31 11 5 11-5-1 7-10 5-10-5z'/%3E%3Cpath fill='none' stroke='%23e5eef2' stroke-width='2' d='m24 22 8 5 8-5m-8 6v9'/%3E%3C/svg%3E");
        }
        .scene[data-asset="緑の土管"] .item { font-size: 0; width: min(24cqw, 5.5rem); aspect-ratio: 1; }
        .scene[data-asset="緑の土管"] .item::after {
            content: ''; position: absolute; inset: 0; background: center / contain no-repeat
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M15 19h34v34c0 9-34 9-34 0z' fill='%23398858' stroke='%231d513b' stroke-width='2'/%3E%3Cpath d='M20 25v27' stroke='%2398d393' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M9 12h46v11c0 10-46 10-46 0z' fill='%2369b97a' stroke='%231d513b' stroke-width='2'/%3E%3Cellipse cx='32' cy='12' rx='23' ry='8' fill='%2398d393' stroke='%231d513b' stroke-width='2'/%3E%3Cellipse cx='32' cy='12' rx='16' ry='4' fill='%23204e3b'/%3E%3C/svg%3E");
        }
        .scene:is([data-accent="steam"], [data-accent="smoke"], [data-accent="heat"]) .item::before {
            content: ''; position: absolute; width: 58%; height: 60%; left: 21%; bottom: 57%; z-index: 1;
            background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 40'%3E%3Cpath d='M9 34c-10-10 10-12 1-23m15 23c-10-11 10-14 1-30m15 30c-10-10 10-12 1-23' fill='none' stroke='white' stroke-opacity='.85' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
            filter: drop-shadow(0 1px 2px #28546688);
            animation: vapor 1s ease-out both;
        }
        .scene[data-accent="smoke"] .item::before { filter: brightness(.45); }
        .scene[data-accent="heat"] .item::before { filter: sepia(1) saturate(5); }
        .scene[data-accent="light"] .item { text-shadow: 0 0 .8rem #fff5a4; }
        .scene[data-accent="rain"]:not([data-effect="void"], [data-effect="blackout"]) { --sky: #b0cbd9; --sea: #4b96ab; }
        .scene[data-accent="snow"]::before { background: #f0f9fc; box-shadow: 0 .4rem #bedce6; }
        @keyframes vapor { from { opacity: .4; transform: translateY(.2rem); } to { opacity: 1; transform: translateY(-.25rem); } }
        @media (prefers-reduced-motion: reduce) { .scene .item::before { animation: none; } }
        .scene[data-character="金"] .item { font-size: 0; width: min(22cqw, 5rem); aspect-ratio: 1; }
        .scene[data-character="金"] .item::after {
            content: ''; position: absolute; inset: 0;
            background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23bc741b' d='M3 51 9 35h20l6 16v5H3zm27 0 6-16h19l6 16v5H30zM17 31l6-16h18l6 16v6H17z'/%3E%3Cpath fill='%23ffd25d' d='M3 51 9 35h20l6 16zm27 0 6-16h19l6 16zM17 31l6-16h18l6 16z'/%3E%3Cpath fill='none' stroke='%23fff2a6' stroke-width='2' d='M11 39h15m13 0h13M25 19h13'/%3E%3C/svg%3E");
        }
        @keyframes reveal { from { filter: brightness(.12); } to { filter: brightness(1); } }
        @keyframes drop {
            0% { transform: translate(-50%, -10rem); }
            62%, 88%, 100% { transform: translate(-50%, 0); }
            75% { transform: translate(-50%, -.85rem); }
        }
        @keyframes materialize {
            from { opacity: 0; transform: translateX(-50%) scale(.45); filter: drop-shadow(0 0 .75rem #fff3bd); }
            70% { opacity: 1; transform: translateX(-50%) scale(1.1); }
            to { opacity: 1; transform: translateX(-50%) scale(1); filter: none; }
        }
        @media (prefers-reduced-motion: reduce) { .reveal, .drop, .materialize, .scene[data-character="船"]:not([data-series="mikkorin_rare"]) .materialize { animation: none; } }
        .edition-row { display: flex; justify-content: flex-end; }
        #start-waves { font-size: .85rem; margin-bottom: .65rem; }
        #audio-settings { margin: 0; padding: .25rem .55rem; font-size: .85rem; max-width: 100%; }
        #audio-settings label { display: flex; align-items: center; gap: .35rem; padding: .3rem 0; font-weight: normal; }
        #audio-settings input[type="range"] { padding: 0; accent-color: #215c4e; width: min(7rem, 28vw); }
        #audio-settings input[type="checkbox"] { width: auto; accent-color: #215c4e; }
        #audio-settings output { min-width: 3.2em; text-align: right; }
        form { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
        label { width: 100%; font-weight: bold; }
        input, button { font: inherit; border: 2px solid #2c6557; border-radius: .55rem; padding: .45rem .75rem; }
        input { width: 7rem; background: white; }
        button { background: #215c4e; color: white; cursor: pointer; font-weight: bold; }
        button:disabled { opacity: .65; cursor: wait; }
        button.secondary { background: transparent; color: #215c4e; }
        #error, #storage-note { color: #8e2d24; }
        details, #achievement { background: #fffdf7; border: 1px solid #dbd7c6; border-radius: .85rem;
            margin-top: 1rem; padding: .85rem 1rem; }
        #result, .result-placeholder { min-width: 0; background: #fffdf6; border: 1px solid #dbd7c6;
            border-radius: 1.5rem; padding: clamp(1rem, 3vw, 2rem); }
        .result-placeholder { color: #37645c; }
        .play-layout:has(#result:not([hidden])) .result-placeholder { display: none; }
        .result-label { display: block; color: #2f7265; font-size: .9rem; font-weight: 800; }
        #result p, #result h2 { margin: .35rem 0; overflow-wrap: anywhere; }
        #setup, #entry-event { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.65; }
        #setup, #punchline, #entry-event, #entry-ending { white-space: pre-line; }
        .result-ending { margin-top: 1rem; padding-top: .8rem; border-top: 2px solid #ded4bb; }
        #next-kanji { min-height: 3rem; margin-top: .9rem; padding-inline: 1.2rem; }
        @media (max-width: 43rem) { #next-kanji { width: 100%; } }
        .result-ending:has(#punchline:empty) { visibility: hidden; }
        #punchline { font-size: clamp(1.1rem, 2vw, 1.45rem); font-weight: 750; }
        .story-letter { animation: story-letter-in 45ms ease-out both; }
        .result-verdict.is-pending { visibility: hidden; }
        @keyframes story-letter-in { from { opacity: 0; } to { opacity: 1; } }
        @media (prefers-reduced-motion: reduce) {
            .story-letter { animation: none; }
        }
        #end-category { display: inline-block; margin-top: .65rem; border-radius: .55rem; padding: .1rem .65rem;
            background: #3c5274; color: white; font-size: .85rem; font-weight: 850; }
        #end-category[data-category="死亡"] { background: #902d36; }
        #end-category[data-category="生還"] { background: #17604a; }
        #end-category[data-category="遭難"] { background: #754d1a; }
        #end-category[data-category="？？？"] { background: #544477; }
        #result h2 { font-size: clamp(1.3rem, 2.5vw, 2rem); line-height: 1.3; }
        @media (max-width: 43rem) {
            .play-layout { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
            .scene { aspect-ratio: 1.35; }
            .stage-letter { width: 24%; font-size: min(14cqw, 4rem); }
            .scene::after { width: 17%; }
            .palm { font-size: min(17cqw, 4.5rem); }
            .person { font-size: min(10cqw, 2.75rem); }
            .item { font-size: min(16cqw, 4.25rem); }
            .result-placeholder { display: none; }
        }
        .fiction-note { color: #58645b; font-size: .8rem; }
        #status { color: #265e51; font-weight: bold; }
        summary { cursor: pointer; font-weight: bold; }
        #achievement { border-color: #b78226; background: #fff3cf; }
        #achievement h2 { margin: .25rem 0; }
        #achievement p { margin: .55rem 0; white-space: pre-line; }
        #guide-progress { width: 100%; height: 1.1rem; accent-color: #215c4e; }
        /* 図鑑達成記録は本文を読み返せる。節目は入力制限ではない。 */
        #guide-percent { color: #33685c; font-weight: 700; font-size: .85rem; }
        #guide-next { color: #20574b; font-weight: 750; line-height: 1.6; }
        #guide-milestone-help { font-size: .82rem; color: #597069; margin: .25rem 0 .75rem; }
        #guide-milestones { margin: .75rem 0; padding: .65rem .85rem; background: #fff9e9; }
        #guide-milestone-list { display: grid; gap: .65rem; margin-top: .75rem; }
        .guide-milestone-item { border-bottom: 1px solid #e4d7b5; padding-bottom: .65rem; }
        .guide-milestone-item:last-child { border-bottom: 0; }
        .guide-milestone-item h4 { margin: .1rem 0 .25rem; }
        .guide-milestone-item p { margin: .2rem 0; line-height: 1.55; white-space: pre-line; font-size: .9rem; }

        #guide-search { display: block; width: min(100%, 20rem); margin: .25rem 0; }
        #entries { list-style: none; padding: 0; display: grid;
            grid-template-columns: repeat(auto-fit, minmax(3rem, 1fr)); gap: .35rem; }
        #entries button, .locked { display: grid; place-items: center; width: 100%; min-height: 2.75rem; padding: .25rem; }
        .locked { color: #58645b; background: #f0ede3; border-radius: .55rem; }
        .guide-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
        .guide-controls button:disabled { cursor: default; }
        dialog { width: min(30rem, calc(100% - 2rem)); border: 1px solid #2c6557; border-radius: .85rem;
            background: #fffdf7; color: inherit; padding: 1rem 1.25rem; }
        dialog::backdrop { background: #18363399; }
        .rare-label { display: inline-block; width: fit-content; padding: .15rem .65rem; border: 1px solid #a67423;
            border-radius: .5rem; background: #ffedab; color: #5b3a08; font-size: .85rem; font-weight: 900; }
        .event-setup:has(.character-sprite[src]) { display: grid; grid-template-columns: minmax(0, 1fr) clamp(5rem, 20vw, 8rem);
            gap: .75rem; align-items: start; }
        .character-sprite { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; }
        .rare-label[data-rarity="NORMAL"] { background: #e8efea; border-color: #a1b3a8; color: #28463b; }
        .rare-label[data-rarity="ULTRA"], #entries .rare-entry[data-rarity="ULTRA"] { background: #ffe0d5; border-color: #b84b39; color: #7d291c; }
        .rare-label[data-rarity="CHANKOFU"], #entries .rare-entry[data-rarity="CHANKOFU"] { background: #ffe7c6; border-color: #ac6c33; color: #6b3d19; }
        .rare-label[data-rarity="MIKKORIN"], #entries .rare-entry[data-rarity="MIKKORIN"] { background: #d6edff; border-color: #4884a9; color: #235277; }
        .guide-rarity { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .65rem; }
        .guide-rarity select { max-width: 100%; min-height: 2.75rem; border: 1px solid #94b0a2; border-radius: .45rem;
            padding: .25rem .5rem; font: inherit; color: inherit; background: #fffdf7; }
        #entries.guide-stories { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
        #entries .guide-story { grid-column: span 2; display: grid; align-content: start; gap: .3rem; }
        #entries.guide-stories .guide-story { grid-column: auto; }
        .guide-story small { color: #385d53; }
        #entries .story-replay { padding: .4rem .55rem; font-size: .95rem; }
        #title-reasons { list-style: none; padding: 0; }
        #title-reasons li { padding: .65rem .75rem; border-bottom: 1px solid #d8c9ab; overflow-wrap: anywhere; }
        #title-reasons li[data-equipped="true"] { border-inline-start: .25rem solid #357a67; background: #e3eee2; }
        #title-reasons small { display: block; }
        .card-style { margin-block: .7rem; }
        .rare-label[data-rarity="SR"], #entries .rare-entry[data-rarity="SR"] { background: #c6f3ec; border-color: #45877d; color: #174f45; }
        .rare-label[data-rarity="SSR"], #entries .rare-entry[data-rarity="SSR"] { background: #eee0ff; border-color: #8763b1; color: #563279; }
        .rare-label[hidden] { display: none; }
        .rare-fx { position: absolute; pointer-events: none; inset: 0; z-index: 2; opacity: 0; }
        .scene[data-rare="gold"] .rare-fx {
            background: radial-gradient(circle at 74% 62%, #ffe08baf, transparent 43%),
                radial-gradient(circle at 65% 39%, #fff1a6 0 3px, transparent 4px),
                radial-gradient(circle at 82% 49%, #fff1a6 0 4px, transparent 5px),
                radial-gradient(circle at 53% 65%, #fff1a6 0 3px, transparent 4px);
            animation: rare-bloom 1.25s ease-out;
        }
        .scene[data-rare="orbit"] .rare-fx { inset: 32% 10% 23% 45%; border: .25rem solid #e5d8ff;
            border-left-color: transparent; border-right-color: #ffe99e; border-radius: 50%;
            box-shadow: 0 0 1.4rem #d1b3f3; animation: rare-orbit 1.3s ease-out; }
        .scene[data-rare="wave"] .rare-fx {
            background: radial-gradient(ellipse at 72% 77%, transparent 23%, #c2fff9b8 24% 27%, transparent 28% 33%,
                #e5fff8ae 34% 36%, transparent 37%);
            animation: rare-bloom 1.35s ease-out reverse;
        }
        @keyframes rare-bloom { 0% { opacity: 0; transform: scale(.85); } 28% { opacity: .8; } 100% { opacity: 0; transform: scale(1.08); } }
        @keyframes rare-orbit { 0% { opacity: 0; transform: rotate(-45deg) scale(.7); }
            35% { opacity: .8; } 100% { opacity: 0; transform: rotate(135deg) scale(1.2); } }
        #entries .rare-entry { color: #5b3a08; border-color: #a67423; background: #fff2bd; }
        #entries .rare-entry::after { content: '✦'; font-size: .65em; line-height: 1; }
        #entries .new-guide-slot { background: #e3f3ec; }
        #guide-page[data-new-page="true"] { color: #235d4d; background: #e3f3ec; border-radius: .4rem; padding: .15rem .4rem; }
        #achievement[data-major="true"] { background: #ffedab; border-width: 2px; }
        #achievement.guide-open { transform-origin: top; animation: guide-open .6s ease-out; }
        #achievement.guide-open[data-major="true"] { animation: guide-major .95s ease-out; }
        #guide.guide-open #guide-page { animation: guide-open .6s ease-out; }
        @keyframes guide-open { from { opacity: .45; transform: perspective(40rem) rotateX(-24deg) translateY(-.35rem); } }
        @keyframes guide-major {
            from { opacity: .4; transform: perspective(40rem) rotateX(-28deg) translateY(-.5rem); }
            45% { box-shadow: 0 0 1.4rem #e4b44066; }
            to { box-shadow: 0 0 0 #e4b44000; }
        }
        .effects-reduced :is(.rare-fx, .guide-open, .scene, .scene .item, .story-letter, .result-verdict),
        .effects-reduced .scene .item::before, .effects-reduced #guide #guide-page { animation: none !important; }
        @media (prefers-reduced-motion: reduce) {
            .scene[data-rare] .rare-fx, #achievement.guide-open, #achievement.guide-open[data-major="true"],
            #guide.guide-open #guide-page { animation: none; }
        }
        .tribute-panel { margin: .1rem 0 .8rem; padding: clamp(.8rem, 3vw, 1.4rem); border: 2px solid #d3a34a;
            border-radius: 1rem; background: #15182c; color: #fff7df; }
        .tribute-badge { display: inline-block; border: 1px solid #e6b75b; border-radius: 99px; padding: .25rem .75rem;
            background: #332436; color: #ffe298; font-weight: 900; }
        .tribute-chapter { color: #e1c98b; font-size: .85rem; }
        .tribute-art { height: clamp(5rem, 16vw, 8rem); position: relative; display: grid; place-items: center;
            overflow: hidden; margin: .65rem 0; border: 1px solid #725640; border-radius: .65rem;
            background: radial-gradient(ellipse at 50% 75%, #714b53, #292944 60%, #171a30); }
        .tribute-symbol, .tribute-orbit { grid-area: 1 / 1; }
        .tribute-symbol { font-size: clamp(2.7rem, 8vw, 4.8rem); line-height: 1.1; font-weight: 900;
            color: #ffe29c; text-shadow: 0 0 1.4rem #f4ab78; }
        .tribute-art[data-effect="fall-glyph"] { background: repeating-linear-gradient(0deg, #fff0d9, #fff0d9 16px, #dec5aa 17px); }
        .tribute-art[data-effect="fall-glyph"] .tribute-symbol { color: #3b2d42; animation: tribute-fall .65s ease-out both; }
        .tribute-orbit { display: none; color: #ffe4a8; border: 1px solid #ffe4a8; border-radius: 50%;
            width: min(92%, 15rem); text-align: center; padding: .7rem 0; }
        .tribute-art:is([data-effect="spinning-type"], [data-effect="star-characters"]) .tribute-orbit {
            display: block; animation: tribute-orbit 2.8s ease-in-out both; }
        .tribute-art[data-effect="star-characters"] .tribute-orbit { border-color: transparent; letter-spacing: .32em; }
        .tribute-art[data-effect="kayak-pun"] { background: linear-gradient(#292944 56%, #2d6e79 57%, #123d60); }
        .tribute-art[data-effect="kayak-pun"] .tribute-symbol { animation: tribute-kayak .8s ease-out both; }
        .tribute-art[data-effect="credits"] { background: radial-gradient(ellipse, #684636, #1b1829 74%); }
        .tribute-art[data-effect="credits"] .tribute-symbol { font-size: clamp(1.7rem, 6vw, 3.4rem); }
        .tribute-panel h2 { color: #ffe8ad; overflow-wrap: anywhere; }
        .tribute-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
        .tribute-controls { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
        .tribute-controls button { min-height: 2.75rem; }
        .tribute-note { color: #f4e4bd; font-size: .82rem; }
        .tribute-note a { color: #ffe7a8; }
        .tribute-mode > :is(.result-label, .event-setup, #entry-ending, #entry-rare),
        .tribute-mode #result-ending > :is(.result-label, #punchline, .result-verdict, #result-fiction) { display: none; }
        #result.tribute-mode #result-ending { visibility: visible; padding-top: 0; border: 0; }
        #entries .tribute-entry { background: #30233e; border-color: #d3a34a; color: #ffeaad; }
        #entries .tribute-entry::after { content: '✦'; font-size: .7em; }
        @keyframes tribute-fall { from { transform: translateY(-5rem) scale(.9); opacity: .25; } }
        @keyframes tribute-orbit { from { transform: rotate(-28deg) scale(.7); opacity: .35; } }
        @keyframes tribute-kayak { from { transform: translateX(9rem); opacity: .25; } }
        .effects-reduced .tribute-art * { animation: none !important; }
        @media (prefers-reduced-motion: reduce) { .tribute-art * { animation: none !important; } }
        .update-menu, .credit-links, .story-controls, .record-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
        .update-menu { margin:.7rem 0; }
        .update-links { display: inline-flex; gap: .5rem; flex-wrap: wrap; }
        .update-links button { min-height: 2.75rem; }
        .history-dot { display: inline-block; width: .55rem; height: .55rem; margin-inline-start: .35rem;
            border-radius: 50%; background: #b7353d; vertical-align: .1em; }
        .history-dot[hidden] { display: none; }
        #update-history article { padding: .9rem 0; border-block-start: 1px solid #d8bf99; overflow-wrap: anywhere; }
        #update-history article h3 { margin: .2rem 0; color: #4a3725; }
        #update-history article ul { padding-inline-start: 1.35rem; margin: .4rem 0 0; }
        #update-history time { color: #6b5138; font-weight: 700; font-variant-numeric: tabular-nums; }
        .history-new { margin-inline-start: .5rem; color: #9a2d36; font-size: .8rem; font-weight: 800; }
        .update-dialog { width:min(92vw, 42rem); max-height:88dvh; overflow:auto; color:#233c37; background:#fff9e9; border:2px solid #967552; border-radius:1rem; padding:clamp(.8rem,3vw,1.7rem); }
        .update-dialog::backdrop { background:#101e2cd9; }
        .update-dialog p { line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
        .story-page { padding:clamp(.7rem,3vw,1.5rem); border-radius:.7rem; background:#15263a; color:#fff2d6; }
        [data-mood="sea"] .story-page { background:#1d4554; }
        [data-mood="sun"] .story-page { background:#583b41; }
        .story-controls { margin-top:.7rem; }
        .update-dialog canvas { display:block; width:100%; height:auto; margin:.8rem 0; }
        #records-dialog .record-actions a { display: inline-flex; align-items: center; min-height: 2.75rem;
            padding: .35rem .8rem; border: 1px solid #947855; border-radius: .55rem; color: #285a50; }
        #equip-title { max-width: 100%; }
        .island-collection-controls, .island-profile-stats { display: flex; flex-wrap: wrap; gap: .65rem 1.15rem; }
        .island-collection-controls label { flex: 1 1 11rem; }
        .island-collection-controls :is(input, select) { width: 100%; }
        #open-residents, #open-profile { max-width: 100%; min-height: 2.75rem; margin-block: .4rem; }
        #residents-list details, #profile-ready .profile-reading { margin-block: .65rem; padding: .6rem .8rem;
            border: 1px solid #d3bea0; border-radius: .65rem; background: #fffdf4; overflow-wrap: anywhere; }
        #residents-list summary { font-weight: 750; cursor: pointer; padding-block: .35rem; }
        .resident-portraits { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .45rem; }
        .resident-portraits img { width: 5.25rem; height: 5.25rem; object-fit: contain; image-rendering: pixelated; }
        .resident-scenes { list-style: none; margin: .5rem 0 0; padding: 0; }
        .resident-scenes li + li { margin-top: .35rem; }
        .resident-scenes button { min-height: 2.75rem; width: 100%; text-align: start; overflow-wrap: anywhere; }
        #profile-ready .profile-reading h3 { margin-block: .35rem; }
        .island-profile-stats > div { flex: 1 1 10rem; }
        .island-profile-stats ul { padding-inline-start: 1.35rem; }
        #profile-x { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: .65rem; }
        .credit-links { margin:1rem 0; padding:.8rem; background:#f2e4cc; border:1px solid #ad8c63; border-radius:.65rem; }
        .credit-links a { color:#254f4a; }
        .special-portraits { display:flex; justify-content:center; gap:.4rem; min-width:0; }
        .special-portraits[hidden] { display:none; }
        .special-portraits img { max-width:48%; width:9rem; height:8rem; object-fit:contain; }
        .special-portraits[data-rank="CHANKORIN"] { background:linear-gradient(90deg,#f5cb8d80,#a5ddff80); border-radius:1rem; }
        .special-portraits[data-rank="CHANKORIN"] img { animation: portrait-in .55s ease-out both; }
        .special-portraits[data-rank="CHANKORIN"] img:first-child { --portrait-from:-2rem; }
        .special-portraits[data-rank="CHANKORIN"] img:last-child { --portrait-from:2rem; }
        .special-portraits[data-rank="MOJINSON"] { background:radial-gradient(ellipse at bottom,#d5d7ae,transparent 68%); }
        .special-portraits[data-rank="MOJINSON"] img { animation: portrait-in .55s ease-out both; --portrait-from:-1rem; }
        .special-portraits[data-rank="MASAMI"] img { animation: portrait-hop .65s ease-out both; }
        .special-portraits[data-rank="HIYOKO"] { background:conic-gradient(from 150deg at 50% 0,#fff4b6 0 60deg,transparent 62deg); }
        .special-portraits[data-rank="HIYOKO"] img { animation: portrait-in .6s ease-out both; }
        #result[data-rank="SSR"] .result-ending {
            border:2px solid #9880bd; border-radius:.7rem; padding:.65rem;
            background:linear-gradient(120deg,#ffecd5,#efdcff 45%,#d9efff);
        }
        #result[data-rank="CHANKORIN"] .result-ending { border:2px solid #d693b5; border-radius:.7rem; padding:.65rem; }
        .scene[data-rare="rainbow"] .rare-fx {
            inset:20%; border:.25rem solid #fff2ad; border-radius:50%;
            box-shadow:0 0 .7rem #ffd985, 0 0 1.5rem #daabf9, 0 0 2.2rem #86e7f2;
            animation:rare-orbit 1.5s ease-out;
        }
        .effects-reduced .scene[data-rare="rainbow"] .rare-fx { animation:none; }
        @media (prefers-reduced-motion:reduce) { .scene[data-rare="rainbow"] .rare-fx { animation:none; } }
        @keyframes portrait-in { from { transform:translateX(var(--portrait-from,0)); opacity:.15; } }
        @keyframes portrait-hop { 0% {transform:translateY(.4rem) scaleY(.9)} 42% {transform:translateY(-.75rem)} 100% {transform:none} }
        .effects-reduced .special-portraits img { animation:none; }
        @media (prefers-reduced-motion:reduce) { .special-portraits img { animation:none!important; } }
        .ultra-panel, .ultra-after {
            color: #fff3d0; background: #111a2d; border: 2px solid #d9aa5b;
            border-radius: .8rem; padding: .7rem; overflow-wrap: anywhere;
        }
        .ultra-panel { text-align: center; }
        .ultra-panel h2, .ultra-panel p, .ultra-after p { margin: .35rem 0; }
        .ultra-panel h2 { color: #ffe3a1; font-size: clamp(1.15rem, 4vw, 1.55rem); }
        .ultra-panel canvas, .ultra-after canvas { display: block; width: 100%; height: auto; border-radius: .45rem; }
        .ultra-panel canvas { max-width: 19rem; margin: .35rem auto; }
        .ultra-panel button, #ultra-replay { min-height: 2.75rem; margin-top: .45rem; }
        .ultra-after { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr);
            align-items: center; gap: .65rem; margin: .7rem 0; }
        .ultra-after strong { display: block; color: #ffe3a1; }
        .ultra-after[hidden] { display: none; }
        #result.ultra-playing > :not(#ultra-result) { display: none; }
        @media (max-width: 370px) { .ultra-after { grid-template-columns: minmax(0, 4.5rem) minmax(0, 1fr); } }
        .share-actions { border-top: 1px solid #dbd7c6; margin-top: .85rem; padding-top: .75rem; }
        .share-buttons { display: flex; flex-wrap: wrap; gap: .45rem; }
        .share-buttons button, .share-buttons a { min-height: 2.75rem; }
        .share-buttons a { display: inline-flex; align-items: center; padding: .4rem .75rem; border: 2px solid #2c6557;
            border-radius: .55rem; color: #215c4e; font-weight: bold; text-decoration: none; }
        .share-actions small { display: block; margin-top: .45rem; color: #37645c; }
        .share-actions [hidden] { display: none; }
        .share-actions textarea { display: block; width: 100%; min-height: 7rem; font: inherit; padding: .4rem; }
        .share-actions .share-file { display: block; margin: .4rem 0; color: #215c4e; overflow-wrap: anywhere; }
        .share-probe { position: fixed; visibility: hidden; pointer-events: none; }
    
        .rare-label[data-rarity="MOJIMOJI"], #entries .rare-entry[data-rarity="MOJIMOJI"] { background:#f2ddff; border-color:#a157cb; color:#65217e; }
        .rare-label[data-rarity="MOJINTOU"], #entries .rare-entry[data-rarity="MOJINTOU"] { background:#dcfff0; border-color:#249b74; color:#166948; }
        #result[data-rank="MOJIMOJI"] .result-ending { border:2px dashed #a157cb; border-radius:.7rem; padding:.65rem; }
        #result[data-rank="MOJINTOU"] .result-ending { border:2px solid #249b74; border-radius:.7rem; padding:.65rem; background:linear-gradient(135deg,#d4fbed35,transparent); }


/* 「達成の思い出」: 旧セーブの発見済み漢字で自動復元される読み返し画面 */
#open-memories { min-height: 2.75rem; }
#memories-counter { font-size: .83em; opacity: .85; }
.memories-dialog { width: min(94vw, 45rem); }
.memories-dialog h2 { margin: 0 0 .6rem; }
.memories-intro, .memories-footnote { font-size: .9rem; color: #4e615a; }
.memories-status { font-weight: 850; color: #215f4f; margin: .75rem 0 .3rem; }
#memories-progress { width: 100%; height: 1rem; accent-color: #317f69; }
.memories-next { padding: .55rem .75rem; border-radius: .55rem; background: #e6f3e9; color: #245c46; font-weight: 750; }
.memories-subheading { border-bottom: 2px solid #d9bf82; margin: 1.35rem 0 .65rem; padding-bottom: .4rem; }
.memories-list { display: grid; gap: .85rem; }
.memories-entry { border: 1px solid #d9ceae; border-left: .3rem solid #bc924a; background: #fffdf5; border-radius: .75rem; padding: .8rem 1rem; }
.memories-entry[data-major="true"] { border-left-color: #32755b; background: #f2faf3; }
.memories-entry-number { font-size: .8rem; color: #526c5e; font-weight: 750; }
.memories-entry h4 { margin: .15rem 0 .55rem; font-size: 1.04rem; line-height: 1.4; }
.memories-entry p { margin: .3rem 0; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.memories-empty { padding: 1.2rem; text-align: center; background: #fff9e8; border-radius: .7rem; }
@media (max-width: 38rem) { .memories-entry { padding: .7rem .8rem; } }

/* 今日の漢字ヒント：セーブとは独立したローカル日付による解放 */
.daily-hint-dialog { width:min(92vw, 34rem); max-height:min(88vh, 850px); }
.daily-hint-dialog h2 { margin-top:0; }
.daily-hint-date { color:#55705d; font-size:.86rem; font-weight:750; }
.daily-hint-count { display:inline-block; padding:.25rem .65rem; border-radius:100px; background:#ecf3e8; color:#325a43; font-size:.85rem; font-weight:700; }
.daily-hint-card { margin:1.1rem 0; padding:1.2rem; border:2px solid #ceaa69; border-radius:.95rem; background:linear-gradient(145deg,#fff8de,#fffdf3); color:#352f28; font-weight:800; line-height:1.75; font-size:1.16rem; white-space:pre-wrap; overflow-wrap:anywhere; }
.daily-hint-actions {display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; margin:1rem 0;}
.daily-hint-actions form {margin:0;}
.daily-hint-warning { color:#9f4a39; font-weight:700; }
.daily-hint-dialog small {display:block; color:#526559; line-height:1.6;}
#daily-hint-status { font-weight:750; color:#2a6751;}
