:root{--ink:#233832;--muted:#5e6b5d;--paper:#f7f5ef;--orange:#ca603c;--line:#dedfd5;--serif:Georgia,'Times New Roman',serif;--sans:'Arial',system-ui,sans-serif}*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:24px}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:15px;line-height:1.6}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}a{color:inherit;text-decoration:none}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #d76640;outline-offset:4px}h1,h2,h3,p{margin-top:0}h1,h2{font-family:var(--serif);font-weight:400;letter-spacing:-1.7px;line-height:1.1}h3{font-size:18px;font-weight:500;letter-spacing:-.35px}img{display:block;max-width:100%}.site-header{max-width:1440px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:28px 6%;border-bottom:1px solid var(--line)}.brand{display:flex;gap:12px;align-items:center;font-weight:700;line-height:1.05;font-size:19px;letter-spacing:-.7px}.brand-dot{color:var(--orange)}.brand-mark{font-family:var(--serif);font-size:48px;font-weight:400;letter-spacing:-8px;position:relative;line-height:1}.brand-mark>span{position:relative;top:4px}.brand-mark i{position:absolute;right:-6px;top:-5px;font-size:20px;font-style:normal;color:var(--orange);letter-spacing:0}.brand>span:last-child{margin-left:8px}.site-header nav{display:flex;gap:35px;font-size:13px}.site-header nav a:hover,.text-link:hover{color:var(--orange)}.language-button{border:1px solid #ccd0c7;border-radius:100px;padding:9px 16px;background:transparent;font-size:12px;color:var(--ink)}.language-button span{margin-left:12px}.hero{max-width:1440px;margin:auto;padding:66px 6% 76px;display:grid;grid-template-columns:1fr 1fr;min-height:680px;overflow:hidden}.eyebrow{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:1.6px;display:flex;align-items:center;gap:9px;margin-bottom:20px}.tiny-star{color:var(--orange);font-size:24px;line-height:1}.hero h1{font-size:clamp(54px,5.7vw,82px);position:relative;margin-bottom:26px;line-height:1.02;letter-spacing:-3.4px}.hero h1 em,.how-section h2 em{font-weight:400;color:var(--orange)}.scribble{position:absolute;bottom:-20px;left:0;width:260px;height:20px;fill:none;stroke:var(--orange);stroke-width:1.6}.hero-copy>p{max-width:365px;font-size:14px;color:#5e6b5d;line-height:1.85;margin:35px 0 26px}.button{display:inline-flex;align-items:center;justify-content:center;gap:25px;padding:15px 22px;border-radius:5px;border:1px solid transparent;font-size:12px;font-weight:600;line-height:1.4;transition:background .2s,transform .2s}.button:hover{transform:translateY(-2px)}.primary{background:var(--ink);color:#fff}.primary:hover{background:#39584c}.secondary{border-color:#cdd0c6;background:transparent;color:var(--ink)}.secondary:hover{background:#eaece3}.hero-note{display:flex;gap:7px;align-items:center;color:#5e6b5d;font-size:9px;margin-top:19px}.hero-note>span:nth-of-type(odd){color:#59765f;margin-left:8px}.hero-note>span:first-child{margin-left:0}.hero-art{position:relative;margin-left:10px;min-height:490px}.paper-sheet{position:absolute;background:#fffefa;box-shadow:2px 10px 25px #293a3020;border:1px solid #e2e3da;overflow:hidden}.hero-grid{width:245px;height:335px;left:0;top:58px;transform:rotate(-13deg);background:#f4f3e8}.hero-grid img{width:100%;height:100%;object-fit:cover}.hero-grid>span{position:absolute;bottom:20px;left:35px;font-family:var(--serif);font-style:italic;font-size:20px;color:#587b70}.hero-plan{width:275px;height:365px;left:110px;top:18px;transform:rotate(8deg);padding:25px;background:#fcfaf5;z-index:2}.paper-mini-title{font-family:var(--serif);font-size:25px;line-height:1.1;border-bottom:2px solid #4b604e;padding-bottom:13px;letter-spacing:-1px}.paper-mini-title>span{display:block;font-family:var(--sans);font-size:8px;letter-spacing:.1px;margin-top:5px;color:#5e6b5d}.mini-week>div{height:31px;border-bottom:1px solid #dde0d3;display:flex;gap:20px;align-items:center}.mini-week b{font-size:7px;letter-spacing:1px;min-width:25px;font-weight:500}.mini-week i{font-family:var(--serif);font-size:12px;color:#779068}.mini-notes{font-family:var(--serif);font-style:italic;font-size:10px;margin-top:14px;display:flex;justify-content:space-between}.mini-notes span{font-size:28px;color:#cf886a}.hero-color{width:210px;height:285px;left:295px;top:178px;transform:rotate(13deg);z-index:3}.hero-color img{height:100%;width:100%;object-fit:cover}.sunburst{position:absolute;right:-5px;top:-5px;color:#e5a654;font-size:105px;line-height:1;transform:rotate(10deg);z-index:4}.yellow-sticker{position:absolute;left:17px;top:340px;z-index:5;background:#eed384;width:88px;height:88px;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:12px;line-height:1.1;font-weight:700;transform:rotate(-14deg)}.art-caption{position:absolute;bottom:-9px;left:137px;font-family:var(--serif);font-style:italic;font-size:16px;transform:rotate(-4deg);color:#5e6b5d}.art-caption>span:last-child{font-family:var(--sans);font-size:55px;position:absolute;left:155px;bottom:-7px;transform:rotate(-20deg)}.promise-strip{background:#eaece3;border-top:1px solid #dde0d4;border-bottom:1px solid #dde0d4;padding:18px 6%;display:flex;justify-content:space-between;gap:24px;font-size:10px;color:#61705e}.promise-strip>span:first-child{color:#3f5949}.section{max-width:1440px;margin:auto;padding:72px 6%}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:30px;margin-bottom:28px}.section-heading .eyebrow{margin-bottom:13px}.section-heading h2{font-size:39px;margin:0}.section-heading p{font-size:12px;line-height:1.8;color:var(--muted);white-space:pre-line;margin:0;max-width:300px}.category-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}.category-card{border:1px solid #dde0d6;min-height:180px;padding:23px 18px;position:relative;border-radius:7px;background:#f9f9f2;transition:transform .2s,box-shadow .2s}.category-card:hover{transform:translateY(-5px);box-shadow:0 5px 20px #2338320b}.category-icon{font-size:29px;display:flex;width:42px;height:42px;align-items:center;justify-content:center;background:var(--card);border-radius:50%;color:var(--accent);margin-bottom:17px}.category-card h3{font-size:13px;font-weight:500;line-height:1.4;min-height:36px;margin-bottom:8px}.category-count{display:block;font-size:8px;color:#5e6b5d}.category-go{position:absolute;right:13px;bottom:13px;font-size:14px}.blue{--card:#dde8ed;--accent:#55788a}.rose{--card:#edddd5;--accent:#ad7469}.yellow{--card:#f0e5ba;--accent:#9c8448}.green{--card:#e0e7d6;--accent:#7d925b}.lavender{--card:#e3e1ef;--accent:#8982a5}.peach{--card:#efdfcf;--accent:#bd8d63}.featured-section{padding-top:9px}.text-link{font-size:11px;border-bottom:1px solid #bdc4b5;padding-bottom:5px;white-space:nowrap}.template-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px}.template-art{height:245px;background:var(--card);position:relative;border-radius:7px;overflow:hidden;display:flex;align-items:center;justify-content:center}.template-art img{height:84%;width:auto;max-width:75%;box-shadow:3px 5px 12px #263b3023;transform:rotate(-5deg);transition:transform .25s}.template-card:nth-child(even) .template-art img{transform:rotate(5deg)}.template-card:hover .template-art img{transform:rotate(0) scale(1.04)}.card-arrow{position:absolute;right:12px;bottom:12px;width:27px;height:27px;border:1px solid #fff8;border-radius:50%;background:#fff9;display:flex;align-items:center;justify-content:center;font-size:15px}.popular-badge{position:absolute;left:12px;top:12px;background:#fbf9f1;border-radius:100px;padding:4px 10px;font-size:8px;color:#5f6d60}.card-meta{margin-top:17px;display:flex;justify-content:space-between;font-size:9px;color:#5e6b5d}.card-meta>span:last-child{color:#455c4d}.template-card h3{font-size:18px;font-family:var(--serif);margin:5px 0 8px}.template-card p{font-size:11px;line-height:1.7;color:#5e6b5d;max-width:245px;margin:0}.how-section{padding:62px max(6%,calc((100% - 1267px)/2));margin:5px 0 0;background:#e9ece2;border-block:1px solid #dde2d3;display:grid;grid-template-columns:1fr 1fr;gap:80px}.how-section h2{font-size:45px;margin-bottom:22px}.how-section>div>p{font-size:12px;color:#5e6b5d;max-width:320px;line-height:1.8}.how-section ol{list-style:none;padding:0;margin:0;max-width:425px}.how-section li{display:flex;gap:25px;align-items:start;padding:17px 0;border-bottom:1px solid #cfd7c5}.how-section li:first-child{padding-top:0}.how-section li:last-child{border-bottom:0}.how-section li>span{font-family:var(--serif);font-style:italic;font-size:28px;color:#647151;line-height:1}.how-section li h3{font-family:var(--serif);font-size:21px;margin-bottom:7px}.how-section li p{font-size:11px;color:#5e6b5d;margin:0}.closing-note{text-align:center;padding:72px 20px}.closing-note>span{font-size:43px;color:var(--orange);display:block;margin-bottom:15px}.closing-note h2{font-size:39px;margin-bottom:13px}.closing-note p{font-size:12px;color:var(--muted);margin-bottom:24px}.site-footer{padding:40px 6% 23px;border-top:1px solid var(--line);background:#f0f0e8}.footer-wordmark{font-family:var(--serif);font-size:26px;letter-spacing:-1px}.footer-wordmark span{color:var(--orange);margin-left:15px;font-family:var(--sans)}.site-footer>p{font-size:11px;color:#5e6b5d;margin-top:6px}.site-footer>div{display:flex;justify-content:space-between;font-size:9px;color:#5e6b5d;margin-top:36px}.skip-link{position:absolute;top:-100px;left:12px;z-index:20;background:#fff;padding:10px}.skip-link:focus{top:12px}.breadcrumb{font-size:11px;color:#5e6b5d;display:inline-block;margin-bottom:30px}.category-page{min-height:620px}.category-page h1{font-size:58px;margin-bottom:18px}.page-intro{max-width:590px;color:var(--muted);margin-bottom:42px}.category-page .template-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.category-page .template-art{height:330px}.category-page .eyebrow{margin-top:12px}.editor-page{max-width:1600px;padding:35px 5% 65px;margin:auto}.editor-title{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:32px}.editor-title .eyebrow{margin-bottom:12px}.editor-title h1{font-size:42px;margin-bottom:9px}.editor-title p{font-size:12px;color:var(--muted);margin:0}.local-badge{font-size:9px;white-space:nowrap;display:flex;align-items:center;gap:7px;border:1px solid #dfe3d7;padding:8px 12px;border-radius:100px}.local-badge>span:first-child,.live-dot{width:6px;height:6px;border-radius:50%;background:#7e9a68;display:inline-block}.editor-layout{display:grid;grid-template-columns:245px minmax(280px,1fr) 205px;gap:25px;align-items:start}.control-panel{background:#fffefa;border:1px solid var(--line);border-radius:8px;overflow:hidden}.control-heading{display:flex;justify-content:space-between;align-items:center;padding:21px 20px;border-bottom:1px solid var(--line)}.control-heading h2{font-family:var(--sans);font-size:15px;letter-spacing:-.2px;margin:0}.quiet-button{border:0;background:none;color:#53664d;font-size:10px;padding:0;text-decoration:underline;text-underline-offset:3px}#controls{padding:17px 20px}.field{margin-bottom:17px}.field:last-child{margin-bottom:0}.field label{display:block;font-size:10px;font-weight:600;margin-bottom:7px}.field input:not([type=checkbox]),.field select,.field textarea{width:100%;border:1px solid #d9ddd2;border-radius:4px;background:#fbfbf6;color:var(--ink);padding:10px;font-size:11px;line-height:1.4}.field textarea{resize:vertical;min-height:90px}.field input[type=color]{height:39px;padding:5px}.field small{display:block;font-size:9px;color:var(--muted);margin-top:6px}.field input:invalid{border-color:#be6046}.checkbox-field{display:flex;flex-direction:row-reverse;justify-content:end;gap:8px;align-items:center}.checkbox-field label{margin:0;flex:1}.checkbox-field input{accent-color:var(--ink)}.control-footer{border-top:1px solid var(--line);padding:14px 20px}.control-footer p{font-size:9px;line-height:1.6;color:#5e6b5d;margin:0}.control-footer .button{width:100%;font-size:10px;padding:10px;margin-top:15px}.preview-area{border-radius:8px;background:#e8eae2;padding:16px 22px 17px;border:1px solid #dfe2d8;min-width:0}.preview-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:8px;color:#5e6b5d;letter-spacing:.5px;margin-bottom:19px}.preview-toolbar>span:first-child{display:flex;gap:6px;align-items:center}.paper-preview{background:#fff;box-shadow:0 7px 18px #304c3320;width:100%;max-width:560px;margin:auto;line-height:0}.paper-preview>svg{width:100%;height:auto;display:block}.print-tip{text-align:center;font-size:8px;line-height:1.5;color:#5e6b5d;margin-top:16px}.export-panel{padding:20px 0}.export-panel>.tiny-star{font-size:35px}.export-panel h2{font-size:27px;line-height:1.2;margin:16px 0 12px;letter-spacing:-.7px}.export-panel>p{font-size:11px;color:#5e6b5d;line-height:1.8}.export-panel>.button{width:100%;font-size:10px;gap:10px;padding:13px 10px}.export-panel .small-note{font-size:9px;margin:12px 0 20px}.share-button{display:block;margin:20px auto 28px;text-align:center}.export-facts{padding-top:20px;border-top:1px solid var(--line);display:grid;gap:8px;font-size:9px;color:#5e6b5d}.related-section{border-top:1px solid var(--line)}.related-section h2{font-size:32px}.prose{max-width:850px;min-height:65vh}.prose h1{font-size:50px;margin-bottom:35px}.prose h2{font-size:28px;margin-top:35px}.prose p{font-size:14px;color:#56654e;line-height:1.9}.error-message{font-size:12px;color:#a33e2d;background:#fff0e9;padding:12px;border-radius:5px;margin-top:15px}#toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:100;padding:13px 21px;border-radius:6px;background:#233832;color:#fff;font-size:12px;transition:opacity .2s,transform .2s;box-shadow:0 4px 18px #0002;max-width:90vw;width:max-content}#toast.visible{opacity:1;transform:translate(-50%,0)}[hidden]{display:none!important}html[lang=zh-CN] h1,html[lang=zh-CN] h2{letter-spacing:0;line-height:1.25}html[lang=zh-CN] .hero h1{font-size:67px}html[lang=zh-CN] .hero-note{font-size:10px}html[lang=zh-CN] .category-card h3{min-height:22px}@media(min-width:1600px){.promise-strip{justify-content:center;gap:110px}}@media(max-width:1100px){.hero{padding-top:55px;min-height:610px}.hero-art{transform:scale(.85);transform-origin:0 30px}.hero h1{font-size:67px}.category-grid{grid-template-columns:repeat(3,1fr)}.category-card{min-height:165px}.category-card h3{min-height:0}.template-art{height:210px}.editor-layout{grid-template-columns:225px minmax(280px,1fr);gap:22px}.export-panel{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px 30px;padding:20px;background:#eceee5;border-radius:8px}.export-panel>.tiny-star,.export-facts{display:none}.export-panel h2{margin:0;grid-column:1}.export-panel>p{grid-column:1;margin:0}.export-panel>#print{grid-column:2;grid-row:1}.export-panel>.small-note{grid-column:2;margin:0}.export-panel>#download{grid-column:2}.export-panel>.share-button{grid-column:1;grid-row:3;margin:0;text-align:left}.local-badge{display:none}}@media(max-width:760px){.site-header{padding:22px 6%}.site-header nav{gap:20px;font-size:11px}.site-header nav a:nth-child(2){display:none}.brand{font-size:16px}.brand-mark{font-size:40px}.hero{grid-template-columns:1fr;padding-top:42px;padding-bottom:40px;min-height:auto}.hero h1{font-size:65px}.hero-copy>p{max-width:330px}.hero-art{height:425px;min-height:425px;margin:32px auto 0;width:500px;transform:scale(.8);transform-origin:0 0;margin-bottom:-80px}.hero .eyebrow{font-size:9px}.promise-strip{flex-wrap:wrap;justify-content:center;text-align:center;gap:10px 24px;padding:15px;font-size:9px}.promise-strip>span:first-child{width:100%}.section{padding:47px 6%}.section-heading{align-items:start;flex-direction:column;gap:15px}.section-heading h2{font-size:34px}.section-heading p{font-size:11px}.category-grid{grid-template-columns:repeat(2,1fr);gap:10px}.category-card{padding:18px;min-height:155px}.category-count{font-size:9px}.category-card h3{font-size:14px}.template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:27px 14px}.template-art{height:220px}.template-card h3{font-size:18px}.template-card p{font-size:10px}.card-meta{font-size:8px}.featured-section{padding-top:5px}.how-section{grid-template-columns:1fr;padding:42px 6%;gap:30px}.how-section h2{font-size:38px}.how-section ol{max-width:none}.closing-note{padding:52px 6%}.closing-note h2{font-size:34px}.site-footer{padding:30px 6% 20px}.site-footer>div{font-size:8px;gap:20px}.category-page h1{font-size:42px}.category-page .template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.category-page .template-art{height:245px}.editor-page{padding:25px 5% 40px}.editor-title h1{font-size:35px}.editor-layout{grid-template-columns:1fr}.control-panel{grid-row:2}#controls{display:grid;grid-template-columns:1fr 1fr;gap:16px}#controls .field{margin:0}.field:has(textarea){grid-column:1/-1}.preview-area{grid-row:1;padding:15px 20px}.paper-preview{max-width:400px}.export-panel{grid-row:3}.editor-title p{font-size:11px}.export-panel h2{font-size:25px}.export-panel>p{font-size:10px}.prose h1{font-size:39px}}@media(max-width:400px){.hero-art{transform:scale(.65);margin-bottom:-140px}.hero h1{font-size:59px}html[lang=zh-CN] .hero h1{font-size:55px}.template-art{height:185px}.category-page .template-art{height:200px}.language-button{padding:7px 10px}.site-header nav{margin-left:10px}.export-panel{display:block}.export-panel>*{margin-bottom:14px!important}.export-panel>.share-button{margin:auto!important}.preview-toolbar{font-size:7px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important}}@media print{html,body{margin:0!important;padding:0!important;background:white!important;width:auto!important;min-width:0!important}body>*:not(main),main>*:not(.editor-page),.editor-page>*:not(.editor-layout),.editor-layout>*:not(.preview-area),.preview-area>*:not(#preview){display:none!important}main,.editor-page,.editor-layout,.preview-area{display:block!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;max-width:none!important;min-height:0!important;background:white!important}#preview{margin:0!important;max-width:none!important;box-shadow:none!important;break-inside:avoid;page-break-inside:avoid}#preview > svg,#preview .print-page > svg{display:block!important;max-width:none!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}#toast{display:none!important}}

/* Flat graph discovery: all concrete types stay visible, with direct sibling links. */
.catalog-hint{max-width:65ch;color:var(--muted);margin:0 0 32px;line-height:1.7}



.legacy-notice{padding:14px 18px;background:#fff4d2;border-radius:8px;line-height:1.6;margin-bottom:24px}
@media print{.legacy-notice{display:none!important}}

.graph-catalog .template-art img,.graph-catalog .template-card:hover .template-art img{transform:none;object-fit:contain}

.discovery-links{display:flex;flex-wrap:wrap;gap:12px 22px;align-items:center}

.grid-group-nav{display:flex;flex-wrap:wrap;gap:.65rem;margin:1.5rem 0 2.75rem}.grid-group-nav a{padding:.6rem .85rem;border:1px solid var(--line,#d8dfd7);border-radius:999px;color:inherit;text-decoration:none;font-size:.85rem}.grid-group-nav a:hover{background:#e6eee7}.grid-paper-group{scroll-margin-top:2rem;margin:0 0 3.5rem}.grid-paper-group h2{font-size:clamp(1.4rem,2.5vw,2rem);margin-bottom:1.3rem}

/* Artwork-first coloring discovery; previews remain upright and high-contrast. */
.coloring-catalog .template-art img,.coloring-catalog .template-card:hover .template-art img{transform:none;object-fit:contain;height:94%;max-width:92%;box-shadow:0 2px 8px #263b3018}.coloring-catalog .template-art{background:#eee7dc}.coloring-catalog .grid-paper-group{margin-bottom:56px}.coloring-editor .editor-title p{max-width:75ch}.coloring-card p{max-width:unset}.coloring-catalog .catalog-hint{margin-top:32px}

.coloring-jump-label{flex-basis:100%;font-size:.85rem;color:var(--muted)}.coloring-series-group .section-heading h2{margin-bottom:0}

/* Game packs use a separate physical page for every complete SVG. */
.paper-preview.game-pages{background:transparent;box-shadow:none;display:flex;flex-direction:column;gap:22px;line-height:0}
.game-pages .print-page{width:100%;background:white;box-shadow:0 7px 18px #304c3320;flex:none}
.game-pages .print-page>svg{display:block;width:100%;height:auto}
.game-page-count{font-size:10px;line-height:1.5;color:var(--muted);margin:0 0 14px;text-align:center}
.svg-page-field{margin:18px 0 10px}.game-import{display:block;margin:14px auto}.games-editor #export-config{margin-top:14px}
@media(max-width:1100px){.svg-page-field{grid-column:2;margin:0}.games-editor #export-config,.games-editor #import-config{align-self:start;margin:0}.games-editor .export-panel{align-items:start}.games-editor .export-panel>#download{grid-row:auto}}
@media(max-width:400px){.svg-page-field{margin-top:16px}}
@media print{
 #preview.game-pages{display:block!important;gap:0!important;height:auto!important;break-inside:auto!important;page-break-inside:auto!important;background:white!important}
 #preview.game-pages .print-page{display:block!important;box-shadow:none!important;border:0!important;margin:0!important;padding:0!important;break-inside:avoid!important;page-break-inside:avoid!important;break-after:page;page-break-after:always;overflow:hidden}
 #preview.game-pages .print-page:last-child{break-after:auto;page-break-after:auto}
}
/* Language chooser: isolated native names, keyboard focus and logical layout. */
#language {display:inline-flex;align-items:center;gap:.45rem;white-space:nowrap;position:relative;max-width:100%;font-size:.82rem}
#language svg {flex:none}
.language-menu {position:absolute;inset-inline-end:1.5rem;top:calc(100% - .5rem);width:17rem;max-width:calc(100vw - 2rem);max-height:min(80vh,38rem);overflow-y:auto;background:#fffdf8;border:1px solid #e8e4da;border-radius:1rem;box-shadow:0 14px 40px #253a2624;padding:.55rem;z-index:1000}
.language-menu[hidden] {display:none}
.language-menu button {display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%;min-height:2.8rem;text-align:start;border:0;border-radius:.6rem;background:transparent;color:#404640;padding:.6rem .85rem;font:inherit;cursor:pointer}
.language-menu button:hover,.language-menu button:focus-visible {background:#eeeae0;outline:2px solid #668069;outline-offset:-2px}
.language-menu button[aria-checked="true"] {background:#e5efdf;color:#446737;font-weight:650}
.locale-check {visibility:hidden;flex:none}.language-menu button[aria-checked="true"] .locale-check {visibility:visible}
.language-menu button[dir="rtl"] {flex-direction:row-reverse;text-align:right}
header,.site-header {position:relative}
[dir="rtl"] body {font-family:Arial,"Noto Sans Arabic",sans-serif}
[dir="rtl"] .field label,[dir="rtl"] .field small,[dir="rtl"] .editor-error {text-align:right}
#preview,.paper-preview,.print-page {direction:ltr}
#preview text {unicode-bidi:plaintext}
input[type="number"],input[type="date"],input[type="month"] {direction:ltr;unicode-bidi:isolate}
@media(max-width:600px){#language>span:first-of-type{max-width:7rem;overflow:hidden;text-overflow:ellipsis}.language-menu{inset-inline-end:1rem;top:100%}}
@media print{.language-menu{display:none!important}}
#language span {margin:0}
.site-header {gap:1rem}.site-header nav {min-width:0}.site-header nav a {overflow-wrap:anywhere}
.editor-title h1,.template-card h3,.category-card h3 {overflow-wrap:anywhere}
html[lang^="zh"] h1,html[lang^="zh"] h2,html[lang="ja"] h1,html[lang="ja"] h2,html[lang="ko"] h1,html[lang="ko"] h2 {letter-spacing:0;line-height:1.3}
html[lang="ar"] h1,html[lang="ar"] h2,html[lang="ar"] h3 {font-family:Arial,"Noto Sans Arabic",sans-serif;letter-spacing:0;line-height:1.5}
@media(max-width:600px){.site-header{gap:.6rem}.site-header nav{font-size:10px}#language>span:first-of-type{max-width:4.3rem}.language-button{padding:7px 9px}.brand{flex-shrink:0}}
@media(max-width:360px){#language>span:first-of-type{display:none}}
/* Intrinsic select/label widths must not enlarge responsive editor tracks. */
.editor-layout > *,#controls > * {min-width:0}
.field input:not([type=checkbox]),.field select,.field textarea {min-width:0;max-width:100%}
@media(max-width:760px){.editor-layout{grid-template-columns:minmax(0,1fr)}#controls{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Timetable option groups keep help out of the checkbox label's layout. */
.school-notes-group,.school-fit-field{min-width:0;grid-column:1/-1;margin-bottom:17px}
.school-notes-group>.field:last-child{margin-top:12px}
.school-notes-group>.checkbox-field{margin-bottom:0}
.field.school-fit-field{display:block;position:relative}
.school-option-row{display:flex;align-items:center;gap:8px;min-width:0}
.school-option-row>input{flex:0 0 auto;margin:3px;accent-color:var(--ink)}
.school-option-row>label{flex:1;min-width:0;margin:0;word-break:normal;overflow-wrap:normal}
.school-fit-help{flex:0 0 28px;width:28px;height:28px;border:1px solid var(--line);border-radius:50%;padding:0;background:#fbfbf6;color:var(--muted);font-size:12px;line-height:1}
.field .school-fit-tooltip{position:absolute;z-index:5;inset-inline:0;bottom:100%;margin:0;padding:12px;border:1px solid var(--line);border-radius:5px;background:#fffefa;box-shadow:0 3px 12px #23383220;font-size:11px;line-height:1.6;font-weight:400;white-space:normal;overflow-wrap:break-word}
@media(max-width:760px){#controls .school-notes-group{margin:0}#controls .school-notes-group>.field:last-child{margin-top:12px}}
@media(pointer:coarse){.school-fit-help{flex-basis:44px;width:44px;height:44px}}
/* Shared navigation stays readable in every locale, independent of editor UI. */
.site-footer.shared-footer{padding:48px 6% 24px;text-align:start}
.shared-footer>.footer-grid{display:grid;grid-template-columns:minmax(0,1.3fr) repeat(3,minmax(0,1fr));gap:32px;margin:0;font-size:14px;line-height:1.65;color:var(--ink)}
.footer-grid>*{min-width:0}
.shared-footer h2{font-family:var(--sans);font-size:14px;line-height:1.5;letter-spacing:0;margin:0 0 12px;font-weight:700}
.shared-footer ul{list-style:none;padding:0;margin:0;display:grid;gap:7px}
.shared-footer li{margin:0;min-width:0}
.shared-footer a{overflow-wrap:anywhere}
.shared-footer a:not(.footer-wordmark){display:inline-block;padding-block:3px;text-decoration:none}
.shared-footer a:hover{text-decoration:underline;text-underline-offset:3px}
.shared-footer a:focus-visible,.support-page a:focus-visible{outline:2px solid var(--orange);outline-offset:4px;border-radius:2px}
.shared-footer .footer-wordmark{display:block;max-width:240px;font-size:28px;line-height:1.15;letter-spacing:-.7px}
.shared-footer .footer-wordmark span{margin-left:0;margin-inline-start:8px}
.shared-footer p{font-size:14px;line-height:1.75;color:var(--muted);margin:12px 0 0;max-width:34ch}
.shared-footer .contact-email{font-size:14px;margin-top:12px;max-width:100%;unicode-bidi:isolate}
.shared-footer .footer-about>p{font-size:13px;margin-top:5px}
.shared-footer>.footer-bottom{font-size:13px;line-height:1.6;display:flex;flex-wrap:wrap;gap:12px 24px;justify-content:space-between;border-top:1px solid var(--line);padding-top:20px;margin-top:32px;color:var(--muted)}
.support-page{max-width:980px;margin-inline:auto;overflow-wrap:anywhere}
.support-page h1{font-size:clamp(32px,5vw,50px);line-height:1.2}
.support-page h2{line-height:1.35}
.support-page p{font-size:16px;line-height:1.85}
.support-page section{scroll-margin-top:24px}
.support-page a{text-decoration:underline;text-underline-offset:3px}
.support-nav{display:flex;flex-wrap:wrap;gap:10px 24px;padding-block:18px;border-block:1px solid var(--line);font-size:14px;line-height:1.6}
.support-nav [aria-current]{font-weight:700}
.support-page .contact-email{display:inline-block;max-width:100%;unicode-bidi:isolate}
@media(max-width:1000px){.shared-footer>.footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 36px}}
@media(max-width:480px){.site-footer.shared-footer{padding:32px 6% 22px}.shared-footer>.footer-grid{grid-template-columns:minmax(0,1fr);gap:28px}.shared-footer>.footer-bottom{display:grid;gap:8px}.shared-footer .footer-wordmark{max-width:none}.shared-footer p{max-width:42ch}}
@media print{.site-footer.shared-footer{display:none!important}}

.exercise-credit-note{font-size:.9rem;line-height:1.6}.exercise-credit-note a,.exercise-credits a{text-decoration:underline;text-underline-offset:.15em}.exercise-credits section{margin-block:2rem}.exercise-credits p,.exercise-credits li{overflow-wrap:anywhere}

.share-feedback{min-width:0}.share-feedback .small-note{margin:8px 0;overflow-wrap:anywhere}.share-feedback [role="status"]:empty{margin:0}.share-feedback label{display:block;font-size:13px;margin-block:8px 4px}.share-feedback textarea{box-sizing:border-box;width:100%;max-width:100%;font:inherit;font-size:13px;padding:8px;border:1px solid var(--line);border-radius:6px;resize:vertical}
