:root{--paper:#dfeaec;--ink:#101313;--muted:#9da8ab;--card:#ccdee2}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:Arial,'Apple SD Gothic Neo','Malgun Gothic',sans-serif}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #467782;outline-offset:5px}button{background:none}header{padding-top:70px;text-align:center}.brand{width:174px;padding:0;border:0}.brand svg{width:100%;display:block}main{max-width:1440px;margin:auto}.screen[hidden]{display:none}.screen{min-height:735px;text-align:center}.tools{height:570px;margin:62px 4% 0}.tools svg{height:100%;width:100%}.pill{border:1.5px solid var(--ink);border-radius:40px;min-height:34px;padding:6px 24px;font-size:16px;transition:background .2s,transform .2s}.pill:hover{background:#c6d9dd;transform:translateY(-2px)}.primary{background:#000;color:var(--paper);border-color:#000}.primary:hover{background:#28383b}.enter{width:282px;position:relative;margin:18px auto 0}.enter span{position:absolute;right:22px}.switch{display:flex;width:252px;border:1px solid #717a7d;border-radius:30px;padding:2px;margin:64px auto 0}.switch button{width:50%;border:0;border-radius:30px;padding:6px;font-size:11px}.switch .selected{background:#9fa7a9;color:white}.art-stage{height:355px;margin:50px auto 0;display:flex;align-items:center;justify-content:center;width:82%;overflow:hidden}canvas{display:block;width:100%;height:auto}.size-control{display:flex;align-items:center;gap:15px;width:380px;max-width:75%;margin:10px auto 0}.size-control span:first-child{font-size:16px}.size-control span:last-child{font-size:30px}input[type=range]{appearance:none;flex:1;min-width:0;background:transparent;height:30px;cursor:pointer}input[type=range]::-webkit-slider-runnable-track{height:2px;background:#101313}input[type=range]::-webkit-slider-thumb{appearance:none;background:#000;width:12px;height:12px;border-radius:50%;margin-top:-5px}input[type=range]::-moz-range-track{height:2px;background:#101313}input[type=range]::-moz-range-thumb{background:#000;width:12px;height:12px;border:0;border-radius:50%}.word-input{display:block;width:72%;border:1.5px solid;border-radius:40px;padding:6px 20px;background:transparent;text-align:center;font-size:16px;margin:37px auto 0}.word-input::placeholder{color:#99a5a8}.actions{display:flex;justify-content:center;gap:17px;margin:102px auto 0}.actions .pill{width:178px}footer{text-align:center;padding:42px 20px 48px}footer p{font-size:12px;margin:0 0 6px}footer small{font-size:10px}h1{font-size:29px;font-weight:600;margin:64px 0 52px}.gallery-wrap{position:relative;padding:0 12%}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.card{border:1px solid #202727;border-radius:25px;overflow:hidden;min-width:0}.card-art{height:133px;display:flex;align-items:center;padding:14px 24px}.card-info{background:var(--card);border-top:1px solid;padding:12px 16px 20px;min-height:110px}.card time{font-size:8px;color:#7e9197}.card h2{font-size:11px;margin:4px 0 10px}.card p{white-space:pre-wrap;font-size:10px;line-height:1.3;margin:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.page-arrow{position:absolute;top:43%;border:0;font-size:52px;font-weight:200;padding:0}.prev{left:5%}.next{right:5%}.page-arrow:disabled{opacity:.2;cursor:default}.pagination{display:flex;justify-content:center;gap:23px;margin:62px auto 0}.pagination button{width:9px;height:9px;border:0;border-radius:50%;background:#a5bec4;padding:0}.pagination button.active{background:#151a1b}.gallery-write{font-size:11px;border:0;margin-top:23px;text-decoration:underline;text-underline-offset:4px}dialog{border:1px solid;border-radius:24px;padding:30px;background:var(--paper);width:420px;max-width:90%}dialog::backdrop{background:#122a3055;backdrop-filter:blur(4px)}dialog h2{font-size:23px;margin:0 0 10px}dialog p{font-size:13px;color:#5d747b}dialog label{display:block;font-size:12px;margin:20px 0}dialog input,dialog textarea{display:block;width:100%;padding:10px;border:1px solid #758b90;border-radius:10px;background:transparent;margin-top:8px}dialog small{font-size:11px;color:#5d747b}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.dialog-actions .pill{font-size:13px}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);border-radius:30px;padding:12px 22px;background:#101313;color:white;font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s}.toast.show{opacity:1}@media(min-width:1600px){header{padding-top:7vh}.brand{width:220px}.screen{min-height:76vh}.tools{height:59vh}.art-stage{height:40vh;margin-top:6vh}.actions{margin-top:10vh}.gallery-wrap{padding:0 9%}.card-art{height:180px}.card-info{min-height:145px}.card p{font-size:13px}.card h2{font-size:14px}.card time{font-size:10px}footer{padding-top:55px}}@media(max-width:700px){header{padding-top:35px}.brand{width:125px}.screen{min-height:620px}.tools{height:420px;margin:35px 0 0}.tools svg{width:120%;margin-left:-10%}.enter{margin-top:25px}.switch{margin-top:44px}.art-stage{width:94%;height:280px;margin-top:30px}.size-control{margin-top:0}.word-input{width:88%;font-size:12px;margin-top:32px;padding:10px}.actions{margin-top:65px;gap:12px}.actions .pill{width:145px;font-size:14px}.cards{grid-template-columns:repeat(2,1fr);gap:12px}.gallery-wrap{padding:0 8%}.card{border-radius:18px}.card-art{height:100px;padding:10px}.card-info{padding:10px;min-height:115px}.card p{font-size:9px}.page-arrow{font-size:30px}.prev{left:0}.next{right:0}h1{margin:42px 0 35px;font-size:25px}.pagination{margin-top:32px}footer{padding-top:35px}footer small{display:block;max-width:340px;margin:auto;line-height:1.6}}

.art-stage{position:relative;cursor:text;overflow:hidden}
.art-stage canvas{pointer-events:none;transition:opacity .15s}
.art-stage.empty canvas{opacity:.14}
.type-input{position:absolute;inset:0;width:100%;height:100%;border:0;padding:0;background:transparent;color:transparent;caret-color:transparent;font-size:80px;cursor:text;outline:none!important;z-index:2}
.type-input::selection{background:#718f9826;color:transparent}
.type-surface{position:relative;width:100%;flex:none;line-height:0}
.caret-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden}
.type-caret{stroke:var(--ink);stroke-width:3;vector-effect:non-scaling-stroke;display:none;animation:caret-blink 1s step-end infinite}
.art-stage.empty .type-caret,.art-stage:focus-within .type-caret{display:block}
.type-help{font-size:11px;color:#71878c;margin:-12px 0 14px;text-align:center}
@keyframes caret-blink{0%,100%{opacity:1}50%{opacity:0}}
@media(prefers-reduced-motion:reduce){.type-caret{animation:none}}
@media(max-width:700px){.type-help{margin:-30px 0 22px;font-size:10px}.type-caret{stroke-width:2}}

.type-help.shake{animation:notice-shake .4s ease-in-out;color:#3f6069}
@keyframes notice-shake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-5px)}40%,80%{transform:translateX(5px)}}
@media(prefers-reduced-motion:reduce){.type-help.shake{animation:notice-emphasis .4s ease-in-out}}
@keyframes notice-emphasis{0%,100%{opacity:1}50%{opacity:.45}}

.field-caption{display:block;font-size:12px;font-weight:500;letter-spacing:.03em;line-height:1.5}
.field-caption span{font-size:10px;font-weight:400;color:#71878c;letter-spacing:.09em}
.name-caption{margin:30px auto 0;cursor:text}
#editor .art-stage{margin-top:8px}
.message-field{width:72%;margin:37px auto 0;text-align:left}
.message-field .word-input{width:100%;margin:10px 0 0}
@media(min-width:1600px){.name-caption{margin-top:4vh}}
@media(max-width:700px){.name-caption{margin-top:24px}.message-field{width:88%;margin-top:32px}.field-caption{font-size:11px}.field-caption span{font-size:9px}}

.message-field .author-input{margin-bottom:20px;text-align:left;max-width:200px}

.message-field{margin-top:40px}
@media(max-width:700px){.message-field{margin-top:32px}}

@media(max-width:700px){.type-input{font-size:16px}.message-field .word-input{font-size:16px}.type-help{padding:0 20px;line-height:1.6}}

.brand img{display:block;width:100%;height:auto}
.tools{display:flex;align-items:center;justify-content:center}
.tools img{display:block;width:100%;height:100%;object-fit:contain}
@media(max-width:700px){.tools{margin-left:5%;margin-right:5%;height:340px}.tools img{width:100%;margin:0}}

.actions{margin-top:48px}
@media(min-width:1600px){.actions{margin-top:5vh}}
@media(max-width:700px){.actions{margin-top:32px}}

.message-field .word-input::placeholder{font-size:13px}
@media(max-width:700px){.message-field .word-input::placeholder{font-size:12px}}

/* Center each whole section; keep author and message fields aligned internally. */
header{display:flex;justify-content:center;align-items:center}
.brand{display:block;flex:none}
main{width:100%;min-width:0;margin-inline:auto}
.switch,.art-stage,.message-field{margin-inline:auto}
.type-help{width:100%;margin-inline:auto}
.actions{width:max-content;max-width:calc(100% - 32px);margin-inline:auto;align-items:center;flex-wrap:nowrap}
.actions .pill{flex-shrink:1;min-width:0}
.message-field{display:block;text-align:left}
.message-field .field-caption,.message-field .author-input{margin-left:0;margin-right:0}

#guest-message{resize:none;overflow:hidden;min-height:36px;line-height:1.6;border-radius:22px;white-space:pre-wrap;overflow-wrap:anywhere}
.type-help{position:relative;top:-20px}
@media(max-width:700px){#guest-message{min-height:48px}.type-help{top:-16px}}

.gallery-write{display:block;width:240px;max-width:calc(100% - 40px);min-height:46px;margin:28px auto 0;padding:11px 24px;font-size:16px;text-decoration:none}
.idle-notice{text-align:center;font-size:11px;line-height:1.6;color:#71878c;margin:24px 20px 0}
.idle-notice[hidden]{display:none}
@media(max-width:700px){.gallery-write{width:220px;min-height:44px;font-size:15px}.idle-notice{font-size:10px}}

#home:not([hidden]) .tools img{animation:tools-float 7s ease-in-out infinite;transform-origin:50% 65%}
@keyframes tools-float{0%,100%{transform:translateY(0) rotate(-.35deg)}50%{transform:translateY(-9px) rotate(.35deg)}}
@media(max-width:700px){#home:not([hidden]) .tools img{animation-name:tools-float-mobile}}
@keyframes tools-float-mobile{0%,100%{transform:translateY(0) rotate(-.2deg)}50%{transform:translateY(-5px) rotate(.2deg)}}
@media(prefers-reduced-motion:reduce){#home:not([hidden]) .tools img{animation:none;transform:none}}

.tools .animated-tools{width:100%;height:100%;margin:0;overflow:visible}
.tool-motion{animation:needle-sway 3.2s ease-in-out infinite}
.tool-hook{animation-duration:3.8s}
.tool-yarn{animation:yarn-roll 4s ease-in-out infinite}
.tool-cable{animation:cable-wiggle 2.8s ease-in-out infinite;animation-delay:-1s}
.tool-markers{animation:markers-bounce 2.4s ease-in-out infinite;animation-delay:-.7s}
.tool-needle{animation:needle-sway 3.1s ease-in-out infinite;animation-delay:-1.4s}
.tool-pin{animation:pin-rock 3.6s ease-in-out infinite;animation-delay:-.8s}
.tool-needles{animation:long-needle-sway 4.5s ease-in-out infinite}
.tool-scissors{animation:scissors-rock 2.7s ease-in-out infinite;animation-delay:-.5s}
@keyframes needle-sway{0%,100%{transform:rotate(-1.5deg) translateY(0)}50%{transform:rotate(1.5deg) translateY(-5px)}}
@keyframes yarn-roll{0%,100%{transform:translateX(-4px) rotate(-4deg)}50%{transform:translateX(4px) rotate(4deg)}}
@keyframes cable-wiggle{0%,100%{transform:rotate(-1.5deg)}50%{transform:rotate(1.5deg) translateY(-4px)}}
@keyframes markers-bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes pin-rock{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2deg) translateY(-3px)}}
@keyframes long-needle-sway{0%,100%{transform:rotate(-.7deg)}50%{transform:rotate(.7deg) translateY(-4px)}}
@keyframes scissors-rock{0%,100%{transform:rotate(-2deg) translateY(0)}50%{transform:rotate(2deg) translateY(-5px)}}
#home[hidden] .tool-motion{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.tool-motion{animation:none;transform:none}}

.tool-hook{animation-duration:5s}.tool-yarn{animation-duration:5.5s}.tool-cable{animation-duration:4.5s}.tool-markers{animation-duration:4s}.tool-needle{animation-duration:4.8s}.tool-pin{animation-duration:5.2s}.tool-needles{animation-duration:6s}.tool-scissors{animation-duration:4.8s}

.message-field .word-input{font-size:13px}
@media(max-width:700px){.message-field .word-input{font-size:12px}}

.message-field .word-input{line-height:1.6;padding-block:8px;min-height:40px}
.message-field .author-input{height:40px}
#guest-message{min-height:40px}
@media(max-width:700px){.message-field .word-input{padding-block:9px;min-height:42px}.message-field .author-input{height:42px}#guest-message{min-height:42px}}

.message-field .word-input{transition:background-color .18s ease,box-shadow .18s ease}
.message-field .word-input:focus{outline:none;background-color:#f2f7f8;box-shadow:0 4px 14px #34545e12}
.message-field .field-caption:has(+ .word-input:focus){color:#345c67}
.message-field .field-caption:has(+ .word-input:focus) span{color:#345c67}
@media(prefers-reduced-motion:reduce){.message-field .word-input{transition:none}}

.actions .pill{font-size:13px}
@media(max-width:700px){.actions .pill{font-size:12px}}

#save,#save:hover{border-color:transparent}
#save:hover{box-shadow:none}

button:hover{outline:none;box-shadow:none}
.primary,.primary:hover{border-color:transparent}
button:focus-visible{outline:2px solid #467782;outline-offset:5px}

body.home-view{min-height:100svh;display:flex;flex-direction:column}
.home-view header{padding-top:clamp(20px,6svh,70px);flex:none}
.home-view main{flex:1;display:flex;flex-direction:column}
.home-view #home{min-height:0;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}
.home-view #home .tools{width:92%;height:clamp(160px,48svh,570px);margin:clamp(12px,3svh,40px) auto 0;flex:none}
.home-view .enter{flex:none;margin:clamp(12px,2svh,25px) auto 0}
.home-view footer{flex:none;padding:clamp(20px,4svh,42px) 20px 20px}
@media(max-width:700px){.home-view header{padding-top:24px}.home-view #home .tools{width:90%;height:42svh;max-height:340px;min-height:140px}.home-view footer{padding:24px 20px 18px}}

/* Fit the default editor and gallery into the viewport while allowing long content to grow. */
body:not(.home-view){min-height:100svh;display:flex;flex-direction:column}
body:not(.home-view) header{flex:none;padding-top:clamp(20px,4svh,54px)}
body:not(.home-view) main{flex:1;width:100%}
body:not(.home-view) .screen{min-height:0}
body:not(.home-view) footer{flex:none;padding:clamp(16px,3svh,32px) 20px 18px}
:is(#editor,#gallery) .switch{margin-top:clamp(18px,3svh,36px)}
#editor .art-stage{height:clamp(130px,29svh,320px);margin-top:8px}
#editor .type-surface{max-width:calc(29svh * 3.333333)}
#editor .type-help{top:0;margin:0 auto 16px}
#editor .message-field{margin-top:clamp(12px,2svh,24px)}
#editor .actions{margin-top:clamp(20px,3svh,36px);margin-bottom:16px}
#gallery h1{margin:clamp(18px,3svh,36px) 0 clamp(20px,3svh,36px);font-size:26px}
#gallery .cards{gap:clamp(10px,1.6svh,20px)}
#gallery .card-art{height:clamp(70px,12svh,150px)}
#gallery .card-info{min-height:0;padding:10px 14px 14px}
#gallery .pagination{margin-top:clamp(18px,3svh,32px)}
#gallery .gallery-write{margin-top:20px}
.idle-notice{margin-top:12px;margin-bottom:0}
@media(max-width:700px){
 body:not(.home-view) header{padding-top:20px}
 :is(#editor,#gallery) .switch{margin-top:22px}
 #editor .art-stage{height:clamp(120px,24svh,200px)}
 #editor .type-surface{max-width:calc(24svh * 3.333333)}
 #editor .type-help{margin:0 auto 12px;padding-inline:16px}
 #editor .message-field{margin-top:16px}
 #editor .actions{margin-top:24px}
 #gallery .card-art{height:clamp(60px,10svh,95px)}
 #gallery .card-info{padding:8px 10px 10px}
 #gallery .card h2{margin:3px 0 6px}
 #gallery .pagination{margin-top:18px}
 #gallery .gallery-write{margin-top:16px}
}

@media(max-width:700px){
 #gallery h1{margin:16px 0 20px;font-size:23px}
 #gallery .card-art{height:clamp(38px,6svh,64px)}
 #gallery .card-info{padding:6px 8px 8px}
 #gallery .card p{-webkit-line-clamp:2}
 #gallery .card h2{font-size:10px;margin:2px 0 5px}
 #gallery .gallery-write{min-height:40px;padding-block:8px}
}

/* Shared action button size across editor and gallery, on all screen widths. */
.actions .pill,#gallery .gallery-write{width:178px;min-width:178px;max-width:none;height:34px;min-height:34px;padding:6px 24px;font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box}
.actions{max-width:calc(100% - 32px);flex-wrap:wrap;gap:17px}
#gallery .gallery-write{display:flex;margin-inline:auto}

.enter,.actions .pill,#gallery .gallery-write{font-family:inherit;font-size:13px;font-weight:400;line-height:20px;letter-spacing:0}

.message-field .word-input{min-height:34px;padding-block:6px;line-height:19px}
.message-field .author-input{height:34px}
#guest-message{min-height:34px;line-height:19px}

#gallery{width:82%;margin-inline:auto;padding-top:clamp(20px,3svh,36px)}
.gallery-header{display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left}
#gallery h1{font-size:26px;line-height:1.2;margin:0 0 8px}
#gallery-summary{font-size:11px;color:#71878c;line-height:1.6;margin:0}
#gallery .gallery-write{margin:0;flex:none}
#gallery .idle-notice{font-size:10px;text-align:right;margin:12px 0 20px;line-height:1.6}
#gallery .gallery-wrap{padding:0}
#gallery .cards{gap:16px;align-items:start}
#gallery .card{border-color:#6d858b;border-radius:20px;text-align:left}
#gallery .card-art{height:clamp(80px,13svh,140px);padding:16px 22px}
#gallery .card-info{min-height:100px;padding:14px 16px;background:#ccdee299;border-color:#91a9af}
.card-meta{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}
#gallery .card h2{font-size:12px;margin:0;font-weight:500;overflow-wrap:anywhere}
#gallery .card time{font-size:9px;white-space:nowrap;flex:none}
#gallery .card p{font-size:12px;line-height:1.65;-webkit-line-clamp:2}
#gallery .card p.expanded{display:block;overflow:visible}
.read-more{border:0;padding:5px 0 0;font-size:11px;color:#456772;text-decoration:underline;text-underline-offset:3px}
.gallery-pages{display:flex;justify-content:center;align-items:center;gap:16px;margin:22px auto 8px}
#gallery .page-arrow{position:static;font-size:18px;width:32px;height:32px;line-height:1;display:grid;place-items:center;border-radius:50%}
#gallery .pagination{display:flex;align-items:center;gap:8px;margin:0}
#gallery .pagination button{width:28px;height:28px;border-radius:50%;background:transparent;font-size:11px;color:#456772}
#gallery .pagination button.active{background:#101313;color:#dfeaec}
#gallery .pagination span{color:#71878c;font-size:11px}
@media(max-width:700px){
 #gallery{width:88%;padding-top:24px}
 .gallery-header{align-items:flex-start;flex-wrap:wrap;gap:14px}
 #gallery h1{font-size:23px}
 #gallery .idle-notice{text-align:left;margin:12px 0 18px}
 #gallery .cards{grid-template-columns:1fr;gap:12px}
 #gallery .card{display:grid;grid-template-columns:36% 1fr;border-radius:16px}
 #gallery .card-art{height:auto;min-height:108px;padding:12px}
 #gallery .card-info{border-top:0;border-left:1px solid #91a9af;padding:12px;min-height:108px}
 .card-meta{display:block;margin-bottom:7px}
 #gallery .card h2{font-size:11px;margin-bottom:3px}
 #gallery .card time{font-size:8px}
 #gallery .card p{font-size:11px;line-height:1.6}
 .gallery-pages{margin-top:18px;gap:8px}
 #gallery .pagination{gap:4px}
}

#editor .actions{margin-top:48px}
@media(max-width:700px){#editor .actions{margin-top:40px}}

#gallery .idle-notice{text-align:center;margin:18px auto 0}
#gallery .gallery-header{margin-bottom:22px}
#gallery h1{margin-bottom:0}

#gallery .gallery-write{width:auto;min-width:0;max-width:none;height:auto;min-height:34px;padding:6px 0;border:0;border-radius:0;background:transparent;color:var(--ink);box-shadow:none;text-decoration:none}
#gallery .gallery-write:hover{background:transparent;transform:none;color:#456772;text-decoration:underline;text-underline-offset:4px}

#gallery .cards{margin-bottom:24px}
#gallery .idle-notice{margin-top:24px;margin-bottom:12px}

#gallery .gallery-header{margin-bottom:12px}
#gallery .idle-notice{text-align:center;margin:0 auto 22px}

.gallery-links{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-left:auto}
.gallery-links>span{font-size:12px;color:#71878c}
#gallery .gallery-links button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:0;min-height:34px;height:auto;max-width:none;margin:0;padding:6px 0;border:0;border-radius:0;background:transparent;color:var(--ink);font:inherit;font-size:13px;font-weight:400;line-height:20px;letter-spacing:0;box-shadow:none;text-decoration:none}
#gallery .gallery-links button:hover{background:transparent;transform:none;color:#456772;text-decoration:underline;text-underline-offset:4px}
@media(max-width:700px){.gallery-links{gap:10px}}

/* Lower the home CTA and shift the editor content below the version toggle. */
.home-view .enter{margin-top:clamp(36px,6svh,64px)}
#editor .art-stage{margin-top:clamp(64px,14svh,180px)}
@media(max-width:700px){
 .home-view .enter{margin-top:36px}
 #editor .art-stage{margin-top:clamp(36px,8svh,72px)}
}
@media(max-height:600px){#editor .art-stage{margin-top:32px}}

/* Place the home action lower, near the editor's action row. */
.home-view #home{justify-content:flex-start}
.home-view .enter{margin-top:auto;margin-bottom:16px}
.home-view #home .tools{margin-top:clamp(24px,5svh,64px)}
.home-view main{min-height:calc(83svh - clamp(20px,6svh,70px) - 55px)}
@media(max-width:700px){
 .home-view main{min-height:calc(83svh - 63px)}
 .home-view .enter{margin-top:auto;margin-bottom:16px}
 .home-view #home .tools{margin-top:24px}
}

/* Shared header origin and action dimensions for exact cross-screen alignment. */
.home-view header,body:not(.home-view) header{padding-top:clamp(20px,4svh,54px)}
#editor:not([hidden]){display:flow-root}
.home-view #home{justify-content:flex-start}
.home-view main{min-height:0}
.home-view .enter{width:178px;min-width:178px;height:34px;min-height:34px;padding:6px 24px;margin:32px auto 16px;font-size:13px;line-height:20px;display:inline-flex;justify-content:center;align-items:center}
.home-view .enter span{position:static;margin-left:10px}
@media(max-width:700px){.home-view header,body:not(.home-view) header{padding-top:20px}}

/* Bring the editor fields closer to the lowered version selector. */
:is(#editor,#gallery) .switch{margin-top:clamp(32px,5svh,54px)}
#editor .art-stage{margin-top:clamp(24px,5svh,64px)}
#editor .message-field{margin-top:12px}
@media(max-width:700px){
 :is(#editor,#gallery) .switch{margin-top:32px}
 #editor .art-stage{margin-top:24px}
 #editor .message-field{margin-top:10px}
}
@media(max-height:600px){#editor .art-stage{margin-top:16px}}

#editor .art-stage{height:clamp(160px,35svh,390px)}
#editor .type-surface{max-width:calc(35svh * 3.333333)}
#editor .message-field{margin-top:40px}
@media(max-width:700px){
 #editor .art-stage{height:clamp(140px,29svh,250px)}
 #editor .type-surface{max-width:calc(29svh * 3.333333)}
 #editor .message-field{margin-top:32px}
}

/* Final editor spacing: keep the large type, with a lighter gap above the fields. */
#editor .message-field{margin-top:24px}
@media(max-width:700px){#editor .message-field{margin-top:20px}}

#editor .type-help{font-size:13px}
@media(max-width:700px){#editor .type-help{font-size:12px}}

#gallery .card-info{display:flex;flex-direction:column}
#gallery .card-meta{min-height:20px}
#gallery .card-meta h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#gallery .card p{min-height:3.3em}
#gallery .card-more{height:24px;flex:none;margin-top:3px}
#gallery .read-more{font-size:11px;line-height:19px;padding:5px 0 0}
#gallery .read-more[hidden]{display:none}
@media(max-width:700px){#gallery .card-meta{min-height:32px}#gallery .card p{min-height:3.2em}}

.home-view #home .tools{width:98%;height:clamp(190px,56svh,660px)}
@media(max-width:700px){.home-view #home .tools{width:98%;height:49svh;max-height:400px;min-height:160px}}

#editor .message-field{margin-top:4px}
@media(max-width:700px){#editor .message-field{margin-top:4px}}

#editor .message-field{margin-top:-16px}
@media(max-width:700px){#editor .message-field{margin-top:-16px}}

/* Compact version selector in the site's ink-and-paper palette. */
:is(#editor,#gallery) .switch{width:224px;min-height:36px;padding:3px;gap:3px;border:1px solid #73898e;border-radius:24px;background:transparent}
:is(#editor,#gallery) .switch button{flex:1;width:auto;min-width:0;min-height:28px;padding:5px 12px;border:0;border-radius:20px;font-size:12px;font-weight:400;line-height:18px;color:#536d74;transition:background-color .18s ease,color .18s ease}
:is(#editor,#gallery) .switch button:hover{background:#cbdde1;color:#101313}
:is(#editor,#gallery) .switch button.selected{background:#101313;color:#dfeaec}
:is(#editor,#gallery) .switch button:focus-visible{outline:2px solid #467782;outline-offset:2px}
@media(max-width:700px){:is(#editor,#gallery) .switch{width:216px;min-height:40px}:is(#editor,#gallery) .switch button{min-height:32px}}
@media(prefers-reduced-motion:reduce){:is(#editor,#gallery) .switch button{transition:none}}

:is(#editor,#gallery) .switch{position:relative;isolation:isolate;gap:0}
:is(#editor,#gallery) .switch::before{content:'';position:absolute;z-index:-1;top:3px;bottom:3px;left:3px;width:calc((100% - 6px)/2);border-radius:20px;background:#101313;transform:translateX(0);transition:transform .25s ease-in-out}
:is(#editor,#gallery) .switch:has(button[data-version="pattern"][aria-pressed="true"])::before{transform:translateX(100%)}
:is(#editor,#gallery) .switch button,:is(#editor,#gallery) .switch button:hover{background:transparent;color:#536d74}
:is(#editor,#gallery) .switch button.selected,:is(#editor,#gallery) .switch button.selected:hover{background:transparent;color:#dfeaec}
@media(prefers-reduced-motion:reduce){:is(#editor,#gallery) .switch::before{transition:none}}

#editor .type-help{top:-12px}

#editor .art-stage{height:clamp(180px,39svh,430px)}
#editor .type-surface{max-width:calc(39svh * 3.333333)}
@media(max-width:700px){#editor .art-stage{height:clamp(150px,32svh,280px)}#editor .type-surface{max-width:calc(32svh * 3.333333)}}

#gallery{padding-top:clamp(32px,7svh,72px);display:flow-root}
#gallery[hidden]{display:none}

.gallery-heading{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.gallery-count{font-size:11px;font-weight:400;color:#71878c;line-height:1.5;white-space:nowrap}

#gallery .card-more{display:flex;align-items:center;gap:12px}
#gallery .card-download{margin-left:auto;font-size:11px;color:inherit;text-underline-offset:3px}
#gallery-more{margin:0 auto 24px;font-size:13px}
@media(max-width:700px){.gallery-heading{gap:8px}.gallery-count{font-size:10px}}

.gallery-navigation{display:flex;flex-direction:column;align-items:flex-end;gap:4px;margin-left:auto}
#gallery .gallery-navigation .gallery-links{margin:0}
#gallery .gallery-navigation .idle-notice{margin:0;text-align:right;font-size:10px;line-height:1.6;color:#71878c}
#gallery .gallery-header{align-items:center;margin-bottom:24px}
@media(max-width:700px){.gallery-navigation{align-items:flex-start;width:100%;margin-left:0}#gallery .gallery-navigation .gallery-links{justify-content:flex-start}#gallery .gallery-navigation .idle-notice{text-align:left;font-size:10px}}
