:root{color-scheme:light;--ink:#24332c;--muted:#738077;--paper:#f8f8f1;--line:#e5e9e1;--green:#3f8a66;--soft:#e6f1e9;--theme-base:#fbfaf3;--theme-outer:#e7efe3;--theme-ink:#273b30;--theme-accent:#438b48;--theme-second:#dce899;--theme-third:#f3b2a4;--theme-pale:#eef4e7}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}a{color:inherit;text-decoration:none}[hidden]{display:none!important}:focus-visible{outline:3px solid #46a483;outline-offset:3px}
.button{border:0;border-radius:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;font-weight:700;letter-spacing:.01em;transition:transform .18s ease,background .18s ease,box-shadow .18s ease}.button:hover:not(:disabled){transform:translateY(-2px)}.button-dark{background:#253a2c;color:#fff}.button-dark:hover{background:#365e45}.button-accent{background:#438a69;color:#fff;box-shadow:0 8px 18px rgba(45,113,76,.16)}.button-accent:hover{background:#367a5b}.button-soft{background:#e9f3ec;color:#2d6748}.button-outline{background:#fff;border:1px solid #ccd9cd;color:#31523b}.text-button{border:0;background:none;color:#2d7653;font-weight:700;padding:8px 0;text-align:left}.text-button:hover{text-decoration:underline}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.18em;color:#568568;margin:0 0 8px}.muted{color:#7b847d}.tiny{font-size:12px;line-height:1.6}

/* Management prototype */
.admin-body{font-family:"Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic",sans-serif;color:var(--ink);background:#f5f7f2;font-size:14px;line-height:1.65}.admin-topbar{position:sticky;top:0;z-index:50;min-height:75px;padding:0 32px;display:flex;justify-content:space-between;align-items:center;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 2px 14px rgba(29,54,35,.025)}.brand{display:flex;align-items:center;gap:12px;font-size:25px;font-weight:800;letter-spacing:-.06em;color:#264a34}.brand-sub{display:block;font-size:10px;font-weight:700;letter-spacing:.12em;line-height:1.1;color:#6d866e}.brand-mark{display:flex;align-items:center;justify-content:center;gap:2px;width:34px;height:34px;border-radius:11px;background:#e5f1e8;transform:rotate(-8deg)}.brand-mark i{width:7px;height:13px;border-radius:50% 50% 40% 40%;background:#4fa778}.brand-mark i:nth-child(2){height:19px;background:#c8d9a4}.brand-mark i:nth-child(3){height:11px;background:#f6b6a0}.topbar-right{display:flex;align-items:center;gap:18px}.prototype-pill{display:inline-flex;align-items:center;background:#f0f5ec;color:#64816b;border-radius:100px;padding:5px 10px;font-size:11px;font-weight:700}.role-switch{font-size:12px;font-weight:700;color:#6a746a;display:flex;align-items:center;gap:8px}.role-switch select{border:1px solid #d6dfd4;border-radius:9px;background:#fff;padding:8px 28px 8px 10px;color:#294433;font-weight:700}.admin-shell{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:calc(100vh - 75px)}.admin-sidebar{border-right:1px solid var(--line);background:#fbfcf9;padding:34px 18px;display:flex;flex-direction:column}.sidebar-eyebrow{font-size:10px;letter-spacing:.18em;color:#a0afa0;font-weight:800;margin:0 16px 18px}.sidebar-link{border:0;border-radius:12px;padding:13px 16px;background:transparent;text-align:left;color:#617566;font-weight:700}.sidebar-link.active{background:#e8f2e9;color:#2c6745}.nav-icon{font-size:17px;margin-right:8px}.sidebar-note{position:relative;overflow:hidden;margin:54px 4px 0;background:#eaf0e2;border-radius:17px;padding:27px 18px 20px;color:#385c42}.sidebar-note-icon{font-size:34px;color:#62a177;margin-bottom:20px}.sidebar-note strong{font-size:14px}.sidebar-note p{font-size:12px;line-height:1.8;margin:8px 0 0;color:#64816b}.sidebar-bottom{margin:auto 10px 6px;padding-top:30px;color:#9aa69b;font-size:11px;line-height:1.8}.admin-main{max-width:1530px;width:100%;padding:42px 44px 80px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:34px}.page-heading h1,.case-context h1{font-size:31px;letter-spacing:-.04em;line-height:1.35;margin:0 0 8px}.page-heading .muted{margin:0}.summary-strip{display:flex;align-items:center;gap:30px;background:#e5efe6;border-radius:18px;padding:19px 26px;margin-bottom:35px;max-width:760px}.summary-strip>div{display:flex;align-items:baseline;gap:14px;white-space:nowrap;color:#4a7656;font-size:12px;font-weight:700}.summary-strip strong{font-size:25px;color:#31563c}.summary-strip p{margin:0;color:#577364;font-size:13px}.list-header{display:flex;align-items:baseline;justify-content:space-between;margin:0 0 14px}.list-header h2{font-size:17px;margin:0}.list-header span{font-size:12px}.case-list{display:grid;gap:10px}.case-row{border:1px solid #e5ebe3;border-radius:17px;display:flex;align-items:center;width:100%;padding:20px 20px;text-align:left;background:#fff;box-shadow:0 5px 20px rgba(32,55,36,.026);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.case-row:hover{transform:translateY(-2px);border-color:#c1d8c5;box-shadow:0 12px 26px rgba(32,55,36,.07)}.case-avatar{width:50px;height:50px;border-radius:15px;background:#edf5ec;flex:none;position:relative;margin-right:18px}.case-avatar i{position:absolute;border-radius:50%;background:#7fbf94}.case-avatar i:first-child{width:17px;height:17px;left:11px;top:12px}.case-avatar i:nth-child(2){width:18px;height:18px;left:23px;top:18px;background:#e6c99a;opacity:.8}.case-avatar i:nth-child(3){width:23px;height:7px;left:13px;top:33px;border-radius:100px;background:#abcbaa}.case-main{display:grid;gap:2px;flex:1;min-width:0}.case-main strong{font-size:17px}.case-venue{font-size:11px;font-weight:800;color:#659675}.case-small{color:#87938a;font-size:11px}.case-end{display:grid;justify-items:end;gap:5px}.case-end small{color:#a1aca2;font-size:10px}.case-arrow{font-size:19px;color:#aac2b0;margin-left:30px}.status-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:100px;padding:5px 11px;background:#f0eee5;color:#827451;font-size:11px;font-weight:800;white-space:nowrap}.status-pill.is-published{background:#e1f1e6;color:#3f865a}.prototype-callout{max-width:760px;margin:35px 0 0;border-left:3px solid #81b99a;padding:7px 0 7px 18px;color:#6b7d6d;font-size:12px}.prototype-callout strong{display:block;color:#3e5e47;margin-bottom:4px}.prototype-callout p{margin:0;line-height:1.8}.empty-state{border:1px dashed #cddaca;border-radius:16px;background:#fff;text-align:center;padding:48px;color:#89988b}
.case-context{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:17px 0 28px}.case-context .muted{font-size:12px;margin:0}.process-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:0 0 25px;background:#edf2ea;padding:5px;border-radius:13px}.step{display:flex;align-items:center;justify-content:center;gap:7px;padding:9px 6px;border-radius:9px;color:#89998b;font-size:11px;font-weight:700;white-space:nowrap}.step.active{background:#fff;color:#326347;box-shadow:0 2px 7px rgba(45,83,51,.07)}.step b{display:inline-grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#d9e4d9;color:#688573;font-size:10px}.step.active b{background:#438a66;color:#fff}.detail-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);gap:22px;align-items:start}.editor-column,.preview-column{display:grid;gap:22px;min-width:0}.panel{border:1px solid #e4ebe2;background:#fff;border-radius:20px;box-shadow:0 6px 24px rgba(25,57,36,.025);padding:26px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.section-heading h2{margin:0;font-size:19px;letter-spacing:-.03em}.subtle-badge{border:1px solid #e0ebe0;border-radius:100px;padding:5px 10px;font-size:10px;color:#719578;font-weight:800;white-space:nowrap}.panel-lead{color:#78847b;font-size:12px;line-height:1.75;margin:0 0 23px}.session-dots{display:flex;flex-wrap:wrap;gap:8px}.session-chip{display:inline-flex;align-items:center;gap:7px;background:#f5f7f4;border:1px solid #e9eee8;border-radius:100px;padding:7px 10px;font-size:10px;color:#859085;font-weight:700}.session-chip span{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#e3e9e0;font-size:10px}.session-chip.done{background:#edf6ed;color:#447e55;border-color:#dceadd}.session-chip.done span{background:#73b58a;color:#fff}.field-group{display:grid;gap:7px;margin-bottom:18px}.field-group label,.modal label{font-size:12px;font-weight:800;color:#36533d}.field-group textarea,.modal input{width:100%;border:1px solid #dce5db;border-radius:11px;background:#fcfdfb;padding:12px 13px;color:#2e3e32;outline:none;resize:vertical;font-size:13px;line-height:1.75;transition:border-color .18s ease,box-shadow .18s ease}.field-group textarea:focus,.modal input:focus{border-color:#67ac7e;box-shadow:0 0 0 3px #e7f3e9}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}.check-row{display:flex;align-items:flex-start;gap:9px;font-size:12px;color:#56675b;font-weight:600;line-height:1.6}.check-row input{accent-color:#4d9b6c;margin-top:3px;width:16px;height:16px;flex:none}.form-actions{display:flex;align-items:center;gap:15px;margin-top:26px;flex-wrap:wrap}.form-actions .muted{font-size:11px}.preview-panel{background:#fdfefb}.theme-list{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:-5px 0 22px}.theme-card{border:1px solid #e3e9df;background:#fff;border-radius:10px;padding:8px 5px;display:grid;justify-items:center;gap:4px;color:#768278;font-size:10px;font-weight:700}.theme-card.selected{border-color:#438a66;box-shadow:0 0 0 2px #d6ebda;color:#2d6544}.theme-swatch{display:flex;align-items:center;justify-content:center;width:46px;height:25px}.theme-swatch i{display:block;width:17px;height:17px;border-radius:50%;background:var(--c1);margin-right:-5px;border:1px solid rgba(0,0,0,.025)}.theme-swatch i:nth-child(2){background:var(--c2)}.theme-swatch i:nth-child(3){background:var(--c3)}.phone-frame{position:relative;width:min(100%,390px);height:650px;margin:auto;background:#fff;border:9px solid #24332d;border-radius:38px;overflow:hidden;box-shadow:0 22px 40px rgba(29,57,39,.18)}.phone-notch{position:absolute;top:0;left:50%;transform:translateX(-50%);z-index:10;width:110px;height:20px;border-radius:0 0 16px 16px;background:#24332d}.phone-frame iframe{border:0;width:100%;height:100%;background:#fff}.toast{position:fixed;bottom:25px;left:50%;z-index:100;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#263d2e;color:#fff;padding:11px 18px;border-radius:12px;box-shadow:0 10px 28px rgba(0,0,0,.17);font-size:12px;max-width:min(90vw,480px);transition:opacity .2s ease,transform .2s ease}.toast.show{opacity:1;transform:translate(-50%,0)}.modal,.cta-dialog{border:0;border-radius:19px;padding:26px;max-width:min(94vw,490px);box-shadow:0 22px 70px rgba(11,34,18,.25);color:#2d4032}.modal::backdrop,.cta-dialog::backdrop{background:rgba(24,44,31,.45)}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.modal-head h2{font-size:20px;margin:0}.close-button{border:0;background:#f0f3ef;border-radius:50%;width:31px;height:31px;font-size:20px;line-height:1}.modal form>label,.modal .field-row>label{display:grid;gap:6px;margin-top:15px}.modal .field-row{margin-top:0}.modal input{height:44px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:23px}.publish-checklist{display:grid;gap:11px;margin-top:18px}.publish-checklist .check-row{font-size:13px}

/* Direct note authoring */
.entry-chapter{padding:23px 0 14px;border-top:1px solid var(--line)}
.entry-chapter:first-child{padding-top:3px;border-top:0}
.entry-chapter-heading{display:flex;align-items:center;gap:11px;margin-bottom:18px}
.entry-chapter-heading h3{font-size:17px;line-height:1.5;letter-spacing:-.02em;margin:0}
.entry-number{display:grid;place-items:center;flex:none;width:35px;height:35px;border-radius:11px;background:#e5f0e8;color:#32724d;font-size:13px;font-weight:900}
.entry-number-letter{background:#f1eee0;color:#83915d}
.entry-field-label{font-size:12px;font-weight:800;color:#36533d}
.entry-list{display:grid;gap:9px}
.entry-item{display:grid;grid-template-columns:49px minmax(0,1fr);align-items:start;gap:10px}
.entry-item label{font-size:11px;font-weight:800;color:#6f9078;padding-top:13px;white-space:nowrap}
.entry-item textarea{min-height:70px}
.entry-add{justify-self:start;border:1px dashed #b8d3bf;border-radius:9px;background:#f7fbf7;color:#3d7855;padding:8px 12px;font-size:11px;font-weight:800;margin-top:3px}
.entry-add:hover{background:#eaf4eb}
.entry-summary-field{margin:0 0 27px;padding:13px 15px 15px;border-left:3px solid #a9cbb2;border-radius:0 10px 10px 0;background:#f5f9f4}
.entry-summary-field textarea{background:#fff}
@media (max-width:620px){.entry-item{grid-template-columns:1fr;gap:3px}.entry-item label{padding-top:0}.entry-chapter{padding:21px 0 12px}}

/* Couple-facing note */
.mutual-summary{margin:24px 0 0;padding:16px 18px;border:1px dotted var(--theme-accent);border-radius:12px;background:var(--theme-base);color:var(--theme-accent);text-align:center;font-size:15px;font-weight:800;line-height:1.65;white-space:pre-line;overflow-wrap:anywhere}
.note-body{font-family:"Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic",sans-serif;background:var(--theme-outer);color:var(--theme-ink);font-size:16px;line-height:1.85}.note-wrap{max-width:620px;margin:auto;background:var(--theme-base);min-height:100vh;box-shadow:0 10px 70px rgba(34,54,40,.06);overflow:hidden;position:relative}.note-topbar{height:59px;position:sticky;top:0;z-index:40;display:flex;align-items:center;justify-content:space-between;padding:0 22px;background:color-mix(in srgb,var(--theme-base) 93%,white);border-bottom:1px solid color-mix(in srgb,var(--theme-accent) 16%,transparent);backdrop-filter:blur(18px)}.note-logo{font-size:18px;letter-spacing:-.06em;font-weight:800;line-height:1;color:var(--theme-ink)}.note-logo span{font-size:8px;letter-spacing:.08em;display:block;margin-top:4px;font-weight:600}.toc-button{border:1px solid color-mix(in srgb,var(--theme-accent) 25%,transparent);border-radius:100px;background:var(--theme-base);padding:6px 12px;font-size:10px;color:var(--theme-ink);display:flex;align-items:center;gap:6px;font-weight:700}.toc-dot{width:6px;height:6px;border-radius:50%;background:var(--theme-accent)}.toc-menu{position:sticky;top:59px;z-index:39;display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--theme-base);border-bottom:1px solid #e6e6dd;box-shadow:0 10px 20px rgba(25,50,31,.06);padding:12px 15px}.toc-menu a{padding:7px 5px;font-size:10px;line-height:1.4}.toc-menu a:hover{text-decoration:underline}.toc-menu span{font-size:9px;font-weight:800;color:var(--theme-accent);margin-right:7px}.demo-banner{background:#273c2e;color:#fff;font-size:9px;letter-spacing:.02em;text-align:center;padding:5px}.chapter-progress{height:3px;position:sticky;top:59px;z-index:38;background:transparent}.chapter-progress span{display:block;width:10%;height:100%;background:var(--theme-accent);transition:width .5s ease}.note-section{position:relative;isolation:isolate;overflow:hidden}.note-inner{position:relative;z-index:2;margin:auto;width:min(100% - 48px,480px)}.note-kicker{font-size:9px;font-weight:800;letter-spacing:.19em;color:var(--theme-accent);line-height:1.6;margin:0 0 14px}.note-section h2{font-family:"Hiragino Mincho ProN","Yu Mincho",serif;line-height:1.45;letter-spacing:-.045em;font-weight:700}.note-section p{overflow-wrap:anywhere}.cover-section{min-height:min(820px,calc(100svh - 59px));padding:92px 0 60px;display:flex;align-items:center}.cover-content{position:relative;z-index:2;width:min(100% - 52px,480px);margin:auto}.cover-overline{font-size:10px;font-weight:700;letter-spacing:.09em;margin:0 0 75px}.cover-overline span{float:right}.cover-label{font-size:10px;letter-spacing:.18em;margin:0 0 12px;color:var(--theme-accent);font-weight:700}.cover-section h1{font-size:clamp(49px,12vw,77px);font-weight:780;line-height:1.04;letter-spacing:-.07em;margin:0 0 29px;color:var(--theme-ink)}.cover-couple{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:19px;font-weight:800;letter-spacing:.03em;margin:0 0 24px}.cover-couple em{font-style:normal;color:var(--theme-accent);font-size:15px}.cover-intro{font-size:13px;line-height:1.9;max-width:360px;margin:0 0 45px}.start-link{display:inline-flex;align-items:center;justify-content:space-between;gap:26px;min-width:166px;border-bottom:1px solid var(--theme-ink);padding-bottom:8px;font-size:11px;font-weight:800}.start-link span{font-size:20px;line-height:1}.draft-ribbon{position:absolute;top:26px;right:-39px;background:var(--theme-accent);color:#fff;z-index:4;transform:rotate(35deg);font-size:9px;padding:6px 42px;font-weight:700}.cover-art{position:absolute;inset:0;z-index:1;pointer-events:none}.cover-shape{position:absolute;display:block;filter:saturate(.9);animation:coverFloat 8s ease-in-out infinite alternate}.cover-shape-a{width:145px;height:132px;border-radius:57% 43% 66% 34% / 36% 58% 42% 64%;background:var(--theme-second);right:-34px;top:15%;opacity:.75}.cover-shape-b{width:68px;height:68px;border-radius:50%;background:var(--theme-accent);right:24%;top:17%;opacity:.73;animation-delay:-1.2s}.cover-shape-c{width:135px;height:120px;border-radius:42% 58% 48% 52% / 69% 38% 62% 31%;background:var(--theme-third);right:-34px;bottom:18%;opacity:.72;animation-delay:-2.5s}.cover-shape-d{width:33px;height:33px;border-radius:50%;background:var(--theme-accent);left:8%;bottom:13%;opacity:.38;animation-delay:-3s}.cover-shape-e{width:70px;height:70px;border:13px solid var(--theme-second);border-radius:44% 56% 39% 61%;right:28%;bottom:11%;opacity:.5;animation-delay:-1.8s}.cover-line{position:absolute;width:150px;height:150px;border:2px solid var(--theme-accent);border-top:0;border-right:0;border-radius:50%;right:9%;top:31%;opacity:.23;transform:rotate(17deg)}@keyframes coverFloat{from{transform:translateY(0) rotate(-5deg)}to{transform:translateY(13px) rotate(5deg)}}
.supporter-section{padding:126px 0 110px;background:color-mix(in srgb,var(--theme-pale) 62%,var(--theme-base))}.supporter-section h2{font-size:33px;margin:0 0 33px}.letter-card{background:var(--theme-base);border:1px solid color-mix(in srgb,var(--theme-accent) 17%,transparent);border-radius:4px 34px 4px 30px;padding:32px 28px 30px;box-shadow:0 15px 30px rgba(30,55,33,.045);position:relative}.letter-card p{font-size:14px;line-height:2.15;margin:0 0 15px}.letter-card .letter-sign{font-size:10px;margin:28px 0 0;letter-spacing:.12em;color:var(--theme-accent)}.letter-sign b{font-size:12px;letter-spacing:0;margin-left:8px}.letter-mark{font-family:Georgia,serif;font-size:74px;color:var(--theme-second);position:absolute;top:-31px;right:28px;line-height:1}.content-section{padding:112px 0 115px;min-height:500px}.content-section:nth-of-type(even){background:color-mix(in srgb,var(--theme-pale) 35%,var(--theme-base))}.note-section-head{display:flex;align-items:flex-start;gap:17px;margin-bottom:33px}.chapter-number{font-size:11px;font-weight:900;letter-spacing:.1em;color:var(--theme-accent);border:1px solid color-mix(in srgb,var(--theme-accent) 35%,transparent);width:35px;height:35px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:3px}.note-section-head .note-kicker{margin:0 0 7px}.note-section-head h2{font-size:clamp(27px,7vw,34px);margin:0}.section-copy{border-left:2px solid var(--theme-accent);padding:0 0 0 22px}.note-bullets{list-style:none;margin:0;padding:0}.note-bullets li{position:relative;margin:0 0 20px;padding-left:17px;font-size:15px;line-height:1.95}.note-bullets li:last-child{margin-bottom:0}.note-bullets li::before{content:"";position:absolute;width:5px;height:5px;border-radius:50%;background:var(--theme-accent);top:13px;left:0}.section-copy .note-bullets li{font-size:17px;padding-left:0}.section-copy .note-bullets li::before{display:none}.section-deck{font-size:13px;color:color-mix(in srgb,var(--theme-ink) 65%,white);margin:-15px 0 27px}.person-stack,.message-stack{display:grid;gap:16px}.person-card,.mutual-card{border-radius:24px 4px 24px 4px;background:var(--theme-base);border:1px solid color-mix(in srgb,var(--theme-accent) 15%,transparent);padding:25px 23px;position:relative;overflow:hidden}.person-card h3{font-size:17px;margin:0 0 16px;position:relative;z-index:2}.person-card .note-bullets{position:relative;z-index:2}.person-ornament{position:absolute;right:-20px;top:-30px;width:94px;height:92px;border-radius:36% 64% 61% 39%;background:var(--theme-second);opacity:.48}.person-card:nth-child(2) .person-ornament{background:var(--theme-third);border-radius:57% 43% 32% 68%}.mutual-card{background:color-mix(in srgb,var(--theme-pale) 76%,var(--theme-base));border:none;border-radius:10px 30px 10px 30px}.mutual-card:nth-child(2){border-radius:30px 10px 30px 10px}.mutual-label{font-size:11px;font-weight:800;color:var(--theme-accent);margin:0 0 15px}.mutual-card .note-bullets li{font-size:15px}.similar-grid{display:grid;gap:12px}.comparison-card{position:relative;border-top:1px solid color-mix(in srgb,var(--theme-accent) 34%,transparent);padding:22px 3px 18px}.comparison-card h3,.balance-card h3{font-size:15px;margin:0 0 13px}.comparison-card .note-bullets li{font-size:14px;margin-bottom:11px}.comparison-card p,.balance-card p{font-size:14px;margin:0;line-height:2}.comparison-glyph{position:absolute;right:5px;top:12px;font-size:27px;color:var(--theme-accent);font-weight:300;opacity:.5}.balance-card{margin-top:12px;padding:24px 24px 26px;border-radius:3px 28px 3px 28px;background:var(--theme-pale);position:relative}.balance-line{display:block;width:45px;height:3px;border-radius:100px;background:var(--theme-accent);margin:0 0 19px}.tip-list{display:grid;gap:11px}.tip-card{position:relative;display:flex;gap:15px;align-items:flex-start;background:var(--theme-base);border:1px solid color-mix(in srgb,var(--theme-accent) 17%,transparent);border-radius:5px 23px 5px 23px;padding:19px 21px;overflow:hidden}.tip-card:nth-child(2n){border-radius:23px 5px 23px 5px}.tip-num{font-size:10px;letter-spacing:.1em;color:var(--theme-accent);font-weight:900;margin-top:6px}.tip-card p{font-size:14px;line-height:1.85;margin:0;position:relative;z-index:1}.tip-card i{width:37px;height:37px;position:absolute;right:-7px;bottom:-9px;background:var(--theme-second);opacity:.46;border-radius:43% 57% 28% 72%}.future-line{border-left:1px solid color-mix(in srgb,var(--theme-accent) 34%,transparent);margin-left:10px;padding:4px 0 3px 29px}.future-item{position:relative;padding:0 0 25px}.future-item:last-child{padding-bottom:0}.future-dot{position:absolute;left:-36px;top:8px;width:13px;height:13px;background:var(--theme-second);border:3px solid var(--theme-base);border-radius:50%;box-shadow:0 0 0 1px var(--theme-accent)}.future-item p{font-size:16px;margin:0;line-height:1.95}.closing-section{padding:165px 0 160px;min-height:650px;background:color-mix(in srgb,var(--theme-pale) 76%,var(--theme-base));display:flex;align-items:center;text-align:center}.closing-section .note-inner{max-width:400px}.closing-section h2{font-size:30px;margin:0 0 29px}.closing-text p{font-family:"Hiragino Mincho ProN","Yu Mincho",serif;font-size:21px;line-height:2.05;font-weight:600;margin:0}.closing-sign{font-size:10px;letter-spacing:.16em;color:var(--theme-accent);margin:42px 0 0}.closing-art{position:absolute;inset:0;z-index:1;pointer-events:none}.cta-section{padding:105px 0 115px;background:var(--theme-base);text-align:left}.cta-section .note-inner{border-top:1px solid color-mix(in srgb,var(--theme-accent) 30%,transparent);padding-top:36px}.cta-section h2{font-size:29px;margin:0 0 18px}.cta-section p:not(.note-kicker){font-size:14px;line-height:1.9;margin:0 0 20px;max-width:365px}.paid-label{display:inline-block;font-size:11px;color:var(--theme-accent);font-weight:800;margin:0 0 18px}.note-cta-button{display:flex;align-items:center;justify-content:space-between;gap:20px;background:var(--theme-ink);border:0;border-radius:100px;color:#fff;font-size:12px;font-weight:800;padding:13px 19px;width:min(100%,280px)}.note-cta-button span{font-size:18px;line-height:1}.note-footer{display:flex;justify-content:space-between;align-items:center;background:var(--theme-ink);color:#fff;padding:26px 24px;font-size:10px;letter-spacing:.07em}.note-footer a{text-decoration:underline;text-underline-offset:4px}.note-empty{text-align:center;display:grid;justify-items:center;align-content:center;min-height:70vh;padding:35px}.note-empty h1{font-size:29px;margin:0}.note-empty p{font-size:14px;margin-bottom:25px}.empty-copy{color:#8d988e;font-size:13px!important}.cta-dialog{font-family:"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif}.cta-dialog p{font-size:14px;line-height:1.9}.cta-dialog .button{margin-top:8px}.embedded .note-topbar{height:46px;padding:0 13px}.embedded .toc-menu{top:46px}.embedded .demo-banner{display:none}.embedded .chapter-progress{top:46px}.embedded .cover-section{min-height:650px}.embedded .cover-content{width:calc(100% - 38px)}.embedded .cover-section h1{font-size:52px}.embedded .note-inner{width:calc(100% - 38px)}
.motif-cluster{position:absolute;z-index:1;width:220px;height:220px;pointer-events:none;opacity:.75;top:10%;right:-105px;transform:rotate(-9deg)}.motif-left{left:-125px;right:auto;top:15%;transform:rotate(10deg)}.motif-center{left:50%;right:auto;top:50%;transform:translate(-50%,-50%) scale(1.6);opacity:.4}.motif{position:absolute;display:block;width:55px;height:55px;background:var(--theme-second);border-radius:40% 60% 53% 47% / 60% 41% 59% 40%;opacity:.6;animation:motifDrift 10s ease-in-out infinite alternate}.motif-1{top:8%;left:8%;width:74px;height:69px;background:var(--theme-second)}.motif-2{top:17%;left:50%;width:33px;height:33px;background:var(--theme-accent);border-radius:50%;opacity:.35;animation-delay:-2s}.motif-3{top:43%;left:24%;width:50px;height:48px;background:var(--theme-third);border-radius:32% 68% 46% 54%;animation-delay:-3s}.motif-4{top:52%;left:65%;width:43px;height:60px;background:var(--theme-second);border-radius:50% 30% 60% 40%;animation-delay:-1s}.motif-5{top:75%;left:9%;width:26px;height:26px;background:var(--theme-accent);opacity:.24;animation-delay:-4s}.motif-6{top:77%;left:50%;width:68px;height:26px;background:var(--theme-third);border-radius:50%;animation-delay:-5s}.motif-7{top:30%;left:5%;width:18px;height:18px;background:var(--theme-accent);opacity:.4}.motif-8{top:6%;left:76%;width:49px;height:33px;background:var(--theme-third);border-radius:47% 53% 65% 35%}.motif-9{top:81%;left:85%;width:32px;height:32px;background:var(--theme-second);border-radius:50%}@keyframes motifDrift{from{transform:translate(0,0) rotate(-4deg)}to{transform:translate(5px,9px) rotate(7deg)}}.reveal.visible .note-inner{animation:riseIn .7s ease both}@keyframes riseIn{from{opacity:.45;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
@media (max-width:1170px){.admin-main{padding:32px 24px 65px}.detail-layout{grid-template-columns:minmax(0,1fr) minmax(320px,.9fr)}.panel{padding:21px}}
@media (max-width:900px){.admin-shell{grid-template-columns:1fr}.admin-sidebar{display:none}.detail-layout{grid-template-columns:1fr}.preview-column{max-width:650px;width:100%;margin:auto}.admin-main{max-width:740px}.phone-frame{height:690px}}
@media (max-width:620px){.admin-topbar{padding:12px 17px;min-height:68px}.brand{font-size:20px}.brand-mark{width:29px;height:29px}.topbar-right{gap:8px}.prototype-pill{display:none}.role-switch{font-size:0}.role-switch select{font-size:11px;max-width:159px}.admin-main{padding:25px 14px 50px}.page-heading{align-items:flex-start;flex-direction:column;gap:17px}.page-heading h1,.case-context h1{font-size:26px}.summary-strip{display:block;padding:16px}.summary-strip p{margin-top:5px}.case-row{padding:14px 12px}.case-avatar{width:37px;height:40px;border-radius:10px;margin-right:10px}.case-avatar i:first-child{left:7px;top:8px}.case-avatar i:nth-child(2){left:16px;top:14px}.case-avatar i:nth-child(3){left:8px;top:29px}.case-main strong{font-size:14px}.case-small{font-size:10px}.case-end small{display:none}.case-arrow{margin-left:8px}.process-steps{overflow-x:auto;grid-template-columns:repeat(4,minmax(97px,1fr))}.step{font-size:10px}.field-row{grid-template-columns:1fr;gap:0}.panel{padding:20px 17px}.case-context{align-items:flex-start;flex-direction:column;gap:10px}.phone-frame{height:650px}.modal .field-row{grid-template-columns:1fr}.note-inner{width:calc(100% - 42px)}.cover-content{width:calc(100% - 46px)}.cover-section{padding:80px 0 50px}.cover-overline{margin-bottom:65px}.supporter-section{padding:100px 0}.content-section{padding:93px 0 100px}.closing-section{padding:140px 0}.cta-section{padding:90px 0 100px}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.button,.case-row,.toast,.chapter-progress span{transition:none!important}.cover-shape,.motif,.reveal.visible .note-inner{animation:none!important}}
.note-wrap{overflow:clip}
.note-section{scroll-margin-top:72px}

/* Shared, selectable topics in chapter 02 */
.entry-chapter-help{margin:-4px 0 18px;color:#718273;font-size:12px;line-height:1.75}
.entry-person{border:1px solid #e0e9df;border-radius:16px;background:#fbfdfa;padding:18px;margin:0 0 16px}
.entry-person-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:13px}
.entry-person-head h4{margin:0;font-size:15px;color:#2f6243}
.entry-person-head p{margin:0;color:#839288;font-size:11px}
.entry-person-topic{border-top:1px solid #e3ebe2;padding:17px 0 19px}
.entry-person-topic-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:11px}
.entry-person-topic-top strong{font-size:12px;color:#426b4e}
.entry-remove{border:0;background:transparent;color:#8b7771;font-size:11px;text-decoration:underline;text-underline-offset:3px;padding:5px}
.entry-person-select,.entry-person-custom,.entry-person-comment{display:grid;gap:6px;color:#5c7861;font-size:11px;font-weight:800}
.entry-person-select select,.entry-person-custom input,.entry-person-comment textarea{width:100%;border:1px solid #dce5db;border-radius:10px;background:#fff;color:#2e3e32;padding:10px 12px;font-size:13px;line-height:1.7;outline:none}
.entry-person-select select:focus,.entry-person-custom input:focus,.entry-person-comment textarea:focus{border-color:#78ab84;box-shadow:0 0 0 3px #e6f1e8}
.entry-person-select select[aria-invalid="true"],.entry-person-custom input[aria-invalid="true"]{border-color:#c97066;box-shadow:0 0 0 3px #fae9e5}
.entry-person-custom{margin-top:10px}
.entry-topic-comments{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:16px 0 3px}
.entry-person-comment textarea{min-height:91px;resize:vertical}
.entry-add-category{margin-top:4px}
.person-topic+.person-topic{border-top:1px solid color-mix(in srgb,var(--theme-accent) 18%,transparent);padding-top:18px;margin-top:19px}
.person-topic h4{display:flex;align-items:center;gap:10px;margin:0 0 11px;color:var(--theme-accent);font-size:13px;line-height:1.5}
.person-topic-mark{display:block;flex:none;width:15px;height:15px;border-radius:36% 64% 56% 44%;background:var(--theme-second);box-shadow:6px -3px 0 -3px var(--theme-accent)}
.person-topic .note-bullets li{font-size:14px;margin-bottom:9px}
.shared-note-topics{display:grid;gap:14px}
.shared-note-topic{border:1px solid color-mix(in srgb,var(--theme-accent) 17%,transparent);border-radius:24px 4px 24px 4px;background:var(--theme-base);padding:24px 22px}
.shared-note-topic:nth-child(even){border-radius:4px 24px 4px 24px}
.shared-note-topic h3{display:flex;align-items:center;gap:11px;margin:0 0 18px;font-size:16px;color:var(--theme-accent)}
.shared-note-comments{display:grid;gap:16px}
.shared-note-comment{padding-left:16px;border-left:2px solid var(--theme-second)}
.shared-note-comment:nth-child(even){border-color:var(--theme-third)}
.shared-note-comment h4{margin:0 0 9px;font-size:12px;color:var(--theme-ink)}
.shared-note-comment .note-bullets li{font-size:14px;margin-bottom:8px}
@media(max-width:620px){.entry-person{padding:15px}.entry-person-head{display:block}.entry-person-head p{margin-top:3px}.entry-topic-comments{grid-template-columns:1fr}}

/* Paired heading and content fields for chapter 05 */
.entry-tip-legacy{margin:0 0 15px;padding:10px 12px;border-radius:10px;background:#f0f6ee;color:#58715d;font-size:11px;line-height:1.7}
.entry-tip{border:1px solid #e0e9df;border-radius:14px;background:#fbfdfa;padding:16px;margin-bottom:12px}
.entry-tip-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}
.entry-tip-top strong{font-size:12px;color:#426b4e}
.entry-tip-actions{display:flex;align-items:center;gap:5px}
.entry-tip-actions button{border:1px solid #dce8db;background:#fff;border-radius:8px;color:#52705a;font-size:11px;min-width:30px;min-height:30px;padding:4px 7px}
.entry-tip-actions button:disabled{opacity:.4;cursor:default}
.entry-tip label{display:grid;gap:6px;margin-top:10px;color:#5c7861;font-size:11px;font-weight:800}
.entry-tip input,.entry-tip textarea{width:100%;border:1px solid #dce5db;border-radius:10px;background:#fff;color:#2e3e32;padding:10px 12px;font-size:13px;line-height:1.7;outline:none}
.entry-tip textarea{resize:vertical;min-height:80px}
.entry-tip input:focus,.entry-tip textarea:focus{border-color:#78ab84;box-shadow:0 0 0 3px #e6f1e8}
.entry-tip input[aria-invalid="true"]{border-color:#c97066;box-shadow:0 0 0 3px #fae9e5}
.tip-copy{flex:1;position:relative;z-index:1;min-width:0}
.tip-copy h3{font-size:15px;line-height:1.6;margin:0 0 5px;font-weight:800;color:var(--theme-ink)}
.tip-copy h3:last-child{margin-bottom:0}
.tip-copy p{font-size:13px;line-height:1.85;color:color-mix(in srgb,var(--theme-ink) 86%,white)}

/* Operator venue catalog and case venue picker */
.mobile-admin-nav{display:none}
.venue-panel{max-width:760px;margin-bottom:34px}
.venue-panel .section-heading{margin-bottom:6px}
.venue-panel form>label{display:block;margin-bottom:7px;color:#36533d;font-size:12px;font-weight:800}
.venue-add-row{display:flex;align-items:stretch;gap:10px}
.venue-add-row input,.modal select{width:100%;border:1px solid #dce5db;border-radius:11px;background:#fcfdfb;padding:10px 13px;color:#2e3e32;outline:none;font-size:13px;line-height:1.6}
.venue-add-row input{max-width:450px;min-width:0}
.venue-add-row input:focus,.modal select:focus{border-color:#67ac7e;box-shadow:0 0 0 3px #e7f3e9}
.venue-add-row input[aria-invalid="true"]{border-color:#c97066;box-shadow:0 0 0 3px #fae9e5}
.venue-error{margin:9px 0 0;color:#a34c3f;font-size:12px}
.venue-list-heading{display:flex;align-items:baseline;justify-content:space-between;margin:0 0 14px;max-width:760px}
.venue-list-heading h2{font-size:17px;margin:0}
.venue-list-heading span{font-size:12px}
.venue-list{display:grid;gap:10px;max-width:760px}
.venue-row{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid #e5ebe3;border-radius:16px;background:#fff;padding:16px 19px}
.venue-row-main{display:grid;gap:2px;min-width:0}
.venue-row-main strong{font-size:15px;overflow-wrap:anywhere}
.venue-row-main span{font-size:11px}
.venue-in-use{font-size:11px;color:#8d9a8f;text-align:right;white-space:nowrap}
.venue-remove{border:1px solid #ead7d2;background:#fff;color:#a6594d;border-radius:9px;padding:8px 13px;font-size:12px;font-weight:700;flex:none}
.venue-remove:hover{background:#fff4f0}
.modal select{height:44px}
.modal input[readonly]{background:#f2f5f1;color:#627667}
.venue-help{margin:8px 0 0;color:#8b6740;font-size:12px;line-height:1.65}
#open-venues-from-dialog{font-size:12px;margin-top:3px}
@media(max-width:900px){.mobile-admin-nav{display:flex;gap:8px;margin:0 0 24px}.mobile-admin-link{border:1px solid #dce7da;background:#fff;border-radius:11px;color:#5e7865;padding:9px 14px;font-size:12px;font-weight:800}.mobile-admin-link.active{background:#e8f2e9;color:#2c6745;border-color:#e8f2e9}}
@media(max-width:620px){.venue-add-row{flex-direction:column}.venue-add-row input{max-width:none}.venue-row{align-items:flex-start;flex-direction:column;padding:14px 16px}.venue-in-use{text-align:left}.venue-remove{align-self:flex-start}}

/* Operator supporter catalog */
.supporter-admin-panel{max-width:760px;margin-bottom:34px}
.supporter-admin-panel .section-heading{margin-bottom:6px}
.supporter-admin-panel .panel-lead{margin-bottom:17px}
.supporter-add-fields{display:grid;grid-template-columns:1fr 1.4fr;gap:12px;margin-bottom:14px}
.supporter-add-fields label{display:grid;gap:7px;color:#36533d;font-size:12px;font-weight:800}
.supporter-add-fields input{width:100%;min-width:0;height:44px;border:1px solid #dce5db;border-radius:11px;background:#fcfdfb;padding:10px 13px;color:#2e3e32;outline:none;font-size:13px}
.supporter-add-fields input:focus{border-color:#67ac7e;box-shadow:0 0 0 3px #e7f3e9}
.supporter-add-fields input[aria-invalid="true"],#edit-supporter-form input[aria-invalid="true"]{border-color:#c97066;box-shadow:0 0 0 3px #fae9e5}
.supporter-admin-panel .button{margin-top:12px}
.supporter-list{display:grid;gap:10px;max-width:760px}
.supporter-admin-row{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #e5ebe3;border-radius:16px;background:#fff;padding:16px 19px}
.supporter-admin-main{display:grid;gap:3px;min-width:0}
.supporter-admin-main strong{font-size:15px;overflow-wrap:anywhere}
.supporter-admin-main span{font-size:11px;overflow-wrap:anywhere}
.supporter-admin-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.supporter-admin-actions .button{font-size:11px;padding:8px 11px;white-space:nowrap}
.supporter-admin-status{border-radius:100px;background:#f1eee9;color:#807568;font-size:11px;font-weight:800;padding:7px 10px;white-space:nowrap}
.supporter-admin-status.is-active{background:#e8f3e9;color:#3a7950}
#edit-supporter-form input{width:100%}
@media(max-width:620px){.supporter-add-fields{grid-template-columns:1fr}.supporter-admin-row{align-items:flex-start;flex-direction:column;padding:14px 16px}.supporter-admin-actions{justify-content:flex-start}}

/* Case overview editing */
.case-context-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.case-context-actions .button{white-space:nowrap}
@media(max-width:620px){.case-context-actions{justify-content:flex-start;width:100%}}

/* ノート一覧：見出しと各ノートで同じ列幅を使う */
.case-table-head,.case-row{display:grid;grid-template-columns:minmax(190px,2.2fr) minmax(170px,1.7fr) minmax(70px,.7fr) minmax(112px,.9fr) repeat(3,minmax(82px,.68fr));align-items:center;column-gap:16px}
.case-table-head{padding:0 20px 9px;color:#728174;font-size:12px;font-weight:800}
.case-row{min-height:80px;padding:16px 20px;cursor:pointer}
.case-cell{min-width:0}
.case-cell-name{display:grid;gap:3px}
.case-name-button{border:0;background:transparent;padding:0;text-align:left;color:inherit}
.case-name-button:focus-visible{outline:2px solid #438a66;outline-offset:3px;border-radius:3px}
.case-cell-name strong{font-size:16px;line-height:1.45}
.case-cell-name .case-venue{font-size:12px;font-weight:400;color:#718376}
.case-cell-public-url{font-size:10px;line-height:1.45;overflow-wrap:anywhere;cursor:default}
.case-public-link{display:block;color:#427f5b;text-decoration:none;overflow-wrap:anywhere;cursor:pointer}
.case-public-link:hover{color:#265b3e}
.case-public-pending{color:#a6aea8}
.case-cell-assignee{font-weight:400;color:#3e5145}
.case-cell-status{display:flex;align-items:center}
.case-cell-date{font-size:12px;color:#65766b;white-space:nowrap}
@media(max-width:1280px){
  .case-table-head{display:none}
  .case-row{grid-template-columns:repeat(6,minmax(0,1fr));column-gap:8px;row-gap:14px;padding:17px 18px}
  .case-cell-name{grid-column:1/-1}
  .case-cell-public-url{grid-column:1/-1}
  .case-cell-assignee,.case-cell-status{grid-column:span 3;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
  .case-cell-date{grid-column:span 2;display:flex;flex-direction:column;gap:4px;white-space:normal;overflow-wrap:anywhere;font-size:11px}
  .case-cell[data-label]::before{content:attr(data-label);display:block;color:#8b9b8d;font-size:10px;font-weight:700;line-height:1.2}
}

/* Collapsible desktop navigation */
.admin-shell{transition:grid-template-columns .2s ease}
.sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 4px 17px}
.sidebar-heading .sidebar-eyebrow{margin:0 0 0 12px}
.sidebar-toggle{display:grid;place-items:center;flex:none;width:34px;height:34px;border:1px solid #dce7da;border-radius:10px;background:#fff;color:#52735c;cursor:pointer;font-size:23px;line-height:1}
.sidebar-toggle:hover{background:#e8f2e9}
.sidebar-toggle:focus-visible{outline:3px solid #a4d4ae;outline-offset:2px}
.sidebar-link{display:flex;align-items:center;gap:8px;white-space:nowrap}
.sidebar-link .nav-icon{margin:0;min-width:20px;text-align:center}
.sidebar-link-label{overflow:hidden;text-overflow:ellipsis}
.admin-shell.sidebar-collapsed{grid-template-columns:72px minmax(0,1fr)}
.sidebar-collapsed .admin-sidebar{padding-left:12px;padding-right:12px}
.sidebar-collapsed .sidebar-heading{justify-content:center;margin-left:0;margin-right:0}
.sidebar-collapsed .sidebar-eyebrow,.sidebar-collapsed .sidebar-link-label{display:none}
.sidebar-collapsed .sidebar-link{justify-content:center;padding:13px 0}
.sidebar-collapsed .sidebar-link .nav-icon{min-width:0}
.list-header{justify-content:flex-end}
@media(max-width:900px){.admin-shell.sidebar-collapsed{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.admin-shell{transition:none}}
@media(max-width:620px){.case-row{padding:15px}.case-cell-name strong{font-size:15px}.case-cell-name .case-venue{font-size:11px}}

/* Note editing: the entire left side and the preview scroll independently. */
.case-context-main{min-width:0;flex:1}
.case-title-row{display:flex;align-items:center;gap:9px;min-width:0;margin:0 0 8px}
.case-title-row h1{min-width:0;margin:0;overflow-wrap:anywhere}
.case-edit-icon{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #d7e5d8;border-radius:10px;background:#fff;color:#4a8460;transition:background .18s ease,border-color .18s ease}
.case-edit-icon:hover{background:#e8f2e9;border-color:#a9cdb0}
.case-edit-icon svg{display:block;width:18px;height:18px}
.editor-overview .process-steps{margin-bottom:0}
@media(min-width:901px){
  body.detail-editing{height:100dvh;overflow:hidden}
  body.detail-editing .admin-shell{height:calc(100dvh - 75px);min-height:0}
  body.detail-editing .admin-sidebar{min-height:0;overflow-y:auto}
  body.detail-editing .admin-main{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;margin:0 auto;padding-top:18px;padding-bottom:18px}
  body.detail-editing #detail-view:not([hidden]){display:flex;flex:1;flex-direction:column;min-height:0}
  body.detail-editing .detail-layout{flex:1;min-height:0;overflow:hidden;align-items:stretch}
  body.detail-editing .editor-column,body.detail-editing .preview-column{min-height:0;overflow-y:auto;align-content:start;padding:0 10px 18px 0;scrollbar-width:thin;scrollbar-color:#bfd6c4 transparent;overscroll-behavior:contain}
  body.detail-editing .editor-overview .case-context{align-items:flex-start;flex-wrap:wrap;margin:17px 0 18px}
  body.detail-editing .editor-overview .process-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:1450px){body.detail-editing .editor-overview .process-steps{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){
  body.detail-editing{height:auto;overflow:auto}
  body.detail-editing .admin-shell{height:auto;min-height:calc(100dvh - 104px)}
  body.detail-editing .admin-main,body.detail-editing #detail-view,body.detail-editing .detail-layout,body.detail-editing .editor-column,body.detail-editing .preview-column{height:auto;min-height:0;overflow:visible}
}
@media(prefers-reduced-motion:reduce){.case-edit-icon{transition:none}}

/* The right pane is a viewport-sized phone preview; its iframe owns scrolling. */
@media(min-width:901px){
  body.detail-editing .preview-column{display:flex;flex-direction:column;gap:10px;overflow:hidden;align-content:initial;padding:0 10px 0 0}
  body.detail-editing .preview-panel{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden;padding:12px 16px}
  body.detail-editing .phone-stage{display:grid;place-items:center;flex:1 1 auto;min-height:0;min-width:0;width:100%}
  body.detail-editing .phone-frame{flex:none;height:100%;max-height:650px;width:auto;max-width:min(100%,390px);aspect-ratio:390 / 650;margin:0}
  body.detail-editing .phone-frame iframe{display:block;overflow:auto}
}
@media(max-width:900px){
  .phone-stage{display:grid;place-items:center;min-width:0}
  .phone-stage .phone-frame{width:min(100%,390px);height:min(650px,72dvh);margin:0}
}

/* Theme selection slides in from the right edge of the editor. */
.theme-drawer-handle{position:fixed;z-index:81;top:50%;right:0;display:grid;place-items:center;min-width:38px;min-height:102px;padding:12px 8px;border:1px solid #d4e4d6;border-right:0;border-radius:12px 0 0 12px;background:#fff;color:#356a49;box-shadow:-4px 4px 16px rgba(35,60,42,.11);font-size:12px;font-weight:800;writing-mode:vertical-rl;transform:translateY(-50%);transition:right .25s ease,background .18s ease}
.theme-drawer-handle:hover{background:#eaf3eb}
.theme-drawer-backdrop{position:fixed;z-index:79;inset:75px 0 0;background:rgba(25,43,31,.27)}
.theme-drawer{position:fixed;z-index:80;top:75px;right:0;width:min(340px,calc(100vw - 30px));height:calc(100dvh - 75px);overflow-y:auto;overscroll-behavior:contain;border-left:1px solid #d7e6d9;background:#fbfdf9;box-shadow:-10px 0 30px rgba(27,52,34,.13);padding:23px 19px;transform:translateX(105%);visibility:hidden;pointer-events:none;transition:transform .25s ease,visibility .25s ease}
.theme-drawer-open .theme-drawer{transform:translateX(0);visibility:visible;pointer-events:auto}
.theme-drawer-open .theme-drawer-handle{right:min(340px,calc(100vw - 30px))}
.theme-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:19px}
.theme-drawer-head h2{font-size:18px;margin:0;color:#294734}
.theme-drawer-close{display:grid;place-items:center;width:36px;height:36px;flex:none;border:1px solid #dbe7db;border-radius:9px;background:#fff;color:#4b7657;font-size:19px;line-height:1}
.theme-drawer .theme-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.theme-drawer .theme-card{min-height:80px;padding:12px 8px;font-size:12px}
@media(prefers-reduced-motion:reduce){.theme-drawer,.theme-drawer-handle{transition:none}}
.embedded .draft-ribbon{display:none}

.process-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(min-width:901px){
  body.detail-editing .editor-overview .process-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:620px){.process-steps{grid-template-columns:repeat(3,minmax(97px,1fr))}}
/* Keep the management header visible and place note links before its main action. */
.admin-topbar .topbar-right{margin-left:auto;min-width:0;gap:12px}
.topbar-actions{display:flex;align-items:center;gap:6px;flex:none}
.topbar-actions .button{min-height:40px;padding:8px 13px;font-size:12px;line-height:1.35;white-space:nowrap}
@media(max-width:1100px){
  .admin-topbar .brand-sub{display:none}
  .admin-topbar .brand{gap:8px}
  .admin-topbar .topbar-right{gap:8px}
  .topbar-actions .button{padding:8px 10px;font-size:11px}
}
@media(max-width:900px){
  .admin-topbar{height:104px;min-height:104px;padding:8px 16px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:35px 40px;row-gap:5px}
  .admin-topbar .brand{grid-column:1;grid-row:1;justify-self:start}
  .admin-topbar .topbar-right{display:contents}
  .admin-topbar .role-switch{grid-column:2;grid-row:1;justify-self:end}
  .admin-topbar .topbar-actions{grid-column:1 / -1;grid-row:2;justify-self:end}
  .admin-shell{min-height:calc(100dvh - 104px)}
  .theme-drawer-backdrop{top:104px}
  .theme-drawer{top:104px;height:calc(100dvh - 104px)}
  .admin-topbar:not(:has(#topbar-actions:not([hidden]))){height:68px;min-height:68px;grid-template-rows:1fr}
  body:not(.detail-editing) .admin-shell{min-height:calc(100dvh - 68px)}
  body:not(.detail-editing) .theme-drawer-backdrop{top:68px}
  body:not(.detail-editing) .theme-drawer{top:68px;height:calc(100dvh - 68px)}
}
@media(max-width:620px){
  .admin-topbar{padding-left:12px;padding-right:12px}
  .admin-topbar .brand{gap:7px}
  .admin-topbar .role-switch select{width:94px;min-width:0;max-width:none;padding:7px 18px 7px 7px;font-size:11px}
  .topbar-actions .button{min-height:36px;padding:7px 8px;font-size:11px;letter-spacing:-.025em}
}
@media(max-width:390px){
  .admin-topbar{padding-left:9px;padding-right:9px}
  .admin-topbar .brand-mark{display:none}
  .admin-topbar .brand{font-size:20px}
  .admin-topbar .role-switch select{width:84px;padding-left:5px}
  .topbar-actions{gap:5px}
  .topbar-actions .button{font-size:10px;padding:7px 6px}
}
@media(max-width:350px){.topbar-actions .button{font-size:9px;padding:7px 4px}}

/* Let the phone stand directly on the editor background. Match the iPhone 17 body ratio. */
.preview-panel{border:0;border-radius:0;background:transparent;box-shadow:none;padding:0}
.phone-frame{aspect-ratio:715 / 1496;isolation:isolate}
.phone-frame iframe{display:block;border-radius:29px;clip-path:inset(0 round 29px)}
.embedded .cover-section h1{font-size:clamp(34px,15vw,52px)}
@media(min-width:901px){
  body.detail-editing .preview-panel{padding:0}
  body.detail-editing .phone-frame{width:auto;max-width:100%;aspect-ratio:715 / 1496}
}
@media(max-width:900px){
  .phone-stage .phone-frame{width:auto;max-width:100%;aspect-ratio:715 / 1496}
}

/* Deletion is available only to operators and requires a second confirmation. */
.button-delete-note{min-height:36px;padding:7px 11px;border:1px solid #e7c7c1;background:#fff;color:#9d4b43;font-size:12px}
.button-delete-note:hover:not(:disabled){background:#fff2ef}
.button-delete-confirm{background:#a84942;color:#fff}
.button-delete-confirm:hover:not(:disabled){background:#8f3b35}

/* Keep the external link available only for an actually published snapshot. */
.publication-state{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:100px;background:#f0eee5;color:#827451;font-size:11px;font-weight:800;white-space:nowrap}
.publication-state.is-live{background:#e1f1e6;color:#3f865a}

/* The deadline sort stays available when the table headings are hidden. */
.due-sort-button{display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;padding:2px 0;color:inherit;font:inherit;font-weight:800;cursor:pointer}
.due-sort-button:hover{color:#2c6745}
.due-sort-button:focus-visible{outline:2px solid #438a66;outline-offset:3px;border-radius:3px}
.due-sort-button [data-sort-arrow]{font-size:10px;line-height:1}
.mobile-due-sort{display:none}
.due-date-value{display:inline-flex;align-items:center;gap:4px}
.overdue-mark{font-size:13px;line-height:1}
@media(max-width:1280px){.list-header{justify-content:space-between}.mobile-due-sort{display:inline-flex;color:#607466;font-size:12px}}
#delete-case-summary{font-size:14px;line-height:1.7;margin:20px 0 8px;overflow-wrap:anywhere}

/* Couple details in the new-note and overview dialogs. */
.modal{max-height:calc(100dvh - 32px);overflow-y:auto}
.person-name-fields{min-width:0;margin:18px 0 0;padding:0;border:0}
.person-name-fields legend{padding:0;color:#36533d;font-size:13px;font-weight:800}
.modal .person-name-fields .field-row>label{display:grid;gap:6px;margin-top:8px}
.name-fields-help{margin:10px 0 0;color:#78847b;font-size:11px;line-height:1.6}

/* Keep list and catalog headings at a stable top position as rows are added. */
body:not(.detail-editing) .admin-main{margin:0 auto;align-self:start}
.summary-strip{width:max-content;max-width:100%}

/* Compact text-only brand and place the note count beside the list title. */
.admin-topbar .brand{gap:10px;white-space:nowrap}
.admin-topbar .brand-sub{display:inline-block;font-size:11px;line-height:1.2;letter-spacing:.06em}
.list-title-row{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.list-title-row h1{margin:0}
.list-title-row .summary-strip{margin:0;padding:8px 16px;border-radius:13px}
.list-title-row .summary-strip>div{gap:10px}
.list-title-row .summary-strip strong{font-size:20px}
@media(max-width:620px){
  .admin-topbar .brand{gap:6px}
  .admin-topbar .brand-sub{font-size:9px;letter-spacing:0}
  .list-title-row{gap:12px}
  .list-title-row .summary-strip{padding:7px 11px}
  .list-title-row .summary-strip strong{font-size:17px}
}

/* Align publish confirmation checkboxes with their labels. */
.modal .publish-checklist .check-row { align-items: center; }
.modal .publish-checklist .check-row input[type="checkbox"] { width: 16px; height: 16px; margin: 0; padding: 0; flex: 0 0 16px; }

/* Public URLs without a published note show only a 404 page. */
.note-body.is-not-found { background: #f7f7f7; color: #292b2d; }
.note-body.is-not-found .note-wrap { max-width: none; min-height: 100dvh; background: transparent; box-shadow: none; }
.note-body.is-not-found .note-topbar,
.note-body.is-not-found .toc-menu,
.note-body.is-not-found .demo-banner,
.note-body.is-not-found .chapter-progress,
.note-body.is-not-found .note-footer { display: none; }
.note-body.is-not-found .note-empty { min-height: 100dvh; gap: 12px; padding: 24px; }
.note-body.is-not-found .error-code { font-size: clamp(56px, 12vw, 88px); font-weight: 800; line-height: 1; letter-spacing: -.06em; }
.note-body.is-not-found .note-empty h1 { font-family: inherit; font-size: clamp(20px, 5vw, 28px); }
.note-body.is-not-found .note-empty p { margin: 0; color: #777a7d; }
