/* Shared shell: local system fonts, restrained motion, and a consistent tool hierarchy. */
html[data-theme]{--ui-accent:#087d78;--studio-start:#197f7b;--studio-end:#3e929c;--studio-glow:#228b8510;--ui-bg:#f0f3f2;--ui-soft:#f5f7f6;--ui-border:#d8e2df}
html[data-theme=dark]{--ui-bg:#0d141b;--ui-surface:#141e27;--ui-soft:#111a23;--ui-text:#ebf1f2;--ui-muted:#a3b3bc;--ui-border:#2a3944;--ui-accent:#8dd8ca;--studio-start:#217e77;--studio-end:#2b7f90;--studio-glow:#3fbc9c12}
html[data-theme=red]{--ui-bg:#1a111a;--ui-surface:#261b26;--ui-soft:#201620;--ui-text:#fff0f4;--ui-muted:#c2a5b5;--ui-border:#463040;--ui-accent:#ffabc1;--studio-start:#b43f66;--studio-end:#985780;--studio-glow:#d95f8818}
html[data-theme] body{background:radial-gradient(ellipse at 10% 0,var(--studio-glow),transparent 48%),var(--ui-bg)}
*{box-sizing:border-box}a,button,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}
html[data-theme] .studio-header{padding:16px 24px;min-height:84px;gap:24px;flex-wrap:wrap}
html[data-theme] .studio-header .brand{font-size:1rem;letter-spacing:-.03em;white-space:nowrap}
html[data-theme] .studio-mark{width:34px;height:34px;border-radius:10px;transform:none;font-size:1.15rem;box-shadow:none}
html[data-theme] .studio-header .credit{padding-left:46px;font-size:.55rem;letter-spacing:.12em;margin-top:0}
html[data-theme] .studio-header .tool-tabs{border:0;background:transparent;gap:2px;padding:0;border-radius:0;max-width:100%}
html[data-theme] .tool-tabs .tool-tab{padding:9px 13px;min-height:40px;font-size:.76rem;border-radius:8px;white-space:nowrap}
html[data-theme] .tool-tabs .tool-tab[aria-current=page]{background:var(--studio-glow);box-shadow:inset 0 -2px var(--ui-accent);border-color:transparent;color:var(--ui-accent)}
html[data-theme] .studio-toolbar{padding:10px 24px;background:var(--ui-soft)}
html[data-theme] button,html[data-theme] .button{transition:background .16s,border-color .16s,box-shadow .16s;cursor:pointer}
html[data-theme] :is(button,.button):disabled{cursor:default}
html[data-theme] :is(button,.button).primary{background:linear-gradient(115deg,var(--studio-start),var(--studio-end));color:#fff;border:1px solid transparent;border-radius:9px;box-shadow:0 3px 12px #0001}
html[data-theme] :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
html[data-theme] dialog{border:1px solid var(--ui-border);border-radius:18px;background:var(--ui-surface);color:var(--ui-text);padding:28px;max-width:min(620px,calc(100vw - 32px));max-height:85vh;overflow:auto;box-shadow:0 25px 100px #0005}
dialog::backdrop{background:#060b15b0;backdrop-filter:blur(5px)}
.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:fixed;top:10px;left:12px;z-index:999;padding:12px 20px;background:var(--ui-surface);color:var(--ui-text);transform:translateY(-160%);border:1px solid var(--ui-accent);border-radius:8px}.skip-link:focus{transform:none}
html[data-theme] .studio-home main{max-width:1520px;padding:0 5% 28px}
.home-hero{display:grid;grid-template-columns:1.06fr 1fr;gap:70px;align-items:center;min-height:580px;padding:70px 0 56px}
.hero-copy .studio-eyebrow{font-size:.66rem;letter-spacing:.14em;display:flex;gap:10px;align-items:center}
.live-dot{height:7px;width:7px;border-radius:50%;background:var(--ui-accent);box-shadow:0 0 0 4px var(--studio-glow)}
html[data-theme] .home-hero h1{font-size:clamp(2.8rem,5.3vw,5.4rem);line-height:1.06;letter-spacing:-.065em;margin:23px 0;color:var(--ui-text);font-weight:650}
.home-hero h1 em{font-family:Georgia,serif;font-weight:400;letter-spacing:-.055em;color:var(--ui-accent)}
.hero-description{font-size:1rem;line-height:1.9;color:var(--ui-muted);max-width:470px}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:30px}.hero-actions a{font-size:.83rem;padding:14px 20px;text-decoration:none;display:flex;align-items:center;gap:24px;border-radius:9px}.hero-actions a.quiet{border:1px solid var(--ui-border);background:var(--ui-surface);color:var(--ui-text)}
.hero-points{display:flex;gap:22px;margin-top:26px;color:var(--ui-muted);font-size:.68rem}.hero-points span:before{content:'✓';margin-right:6px;color:var(--ui-accent)}
.hero-art{position:relative;height:460px;isolation:isolate;user-select:none}
.art-orbit{position:absolute;inset:25px 0;border:1px solid var(--ui-border);border-radius:50%;z-index:-1;background:radial-gradient(ellipse,var(--studio-glow),transparent 70%)}
.hero-document{position:absolute;top:10px;left:4%;width:69%;padding:26px;background:#eee8db;color:#222c2d;transform:rotate(-7deg);box-shadow:0 24px 50px #0004;border:1px solid #d8d1c2}
.mini-edition{font-size:.48rem;letter-spacing:.16em;text-align:center;color:#505753}.mini-masthead{font:bold 2.3rem Georgia,serif;letter-spacing:-.07em;text-align:center;margin-top:7px}.mini-rule{height:4px;border-top:2px solid #273431;border-bottom:1px solid #273431;margin:12px 0}
.hero-document h2{font:bold 2.15rem/1.04 Georgia,serif;margin:14px 0;letter-spacing:-.05em}
.city-illustration{height:135px;background:linear-gradient(#9ab7b1,#d3d7c0);display:flex;align-items:flex-end;gap:5px;padding:20px 12px 0;position:relative;overflow:hidden}
.city-illustration i{width:15%;height:60%;background:repeating-linear-gradient(0deg,transparent 0 9px,#aac3b04d 9px 11px),#45615e}.city-illustration i:nth-child(2n){height:80%;background-color:#65827a}.city-illustration i:nth-child(3){height:100%}.city-illustration i:nth-child(5){height:40%}.city-illustration span{position:absolute;bottom:0;left:0;right:0;background:#283e3a;color:#e9f0dc;font-size:.4rem;text-align:center;padding:5px;letter-spacing:.1em}
.mini-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;font:9px/1.6 Georgia,serif;margin-top:8px}.mini-columns p{margin:0}
.hero-profile{position:absolute;right:0;bottom:30px;width:43%;background:#1d4947;border:1px solid #49766f;color:#e3eee3;border-radius:8px;padding:24px;transform:rotate(7deg);box-shadow:0 22px 46px #0005}
.hero-profile>span{font-size:.48rem;letter-spacing:.15em;color:#b0cbc0}.profile-monogram{display:grid;place-items:center;height:115px;margin:18px 0;background:radial-gradient(ellipse at 70% 20%,#719a82,#2f6863);font:italic 60px Georgia;color:#c9d9ba;border:1px solid #709581}
.hero-profile h3{font:24px Georgia;margin:0}.hero-profile p{font-size:.6rem;line-height:1.7;color:#c2d8d0}.profile-line{height:1px;background:#4c7167;margin:18px 0}.hero-profile small{font-size:.45rem;letter-spacing:.12em}.art-label{position:absolute;bottom:0;left:4%;font-size:.52rem;letter-spacing:.18em;color:var(--ui-muted)}
.section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin:30px 0 24px}.section-heading h2,.home-bottom h2{font-size:1.7rem;font-weight:600;letter-spacing:-.045em;margin:8px 0 0}.section-heading>p{font-size:.79rem;color:var(--ui-muted);margin:0}
.tool-card-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:18px}.tool-card{grid-column:span 2;display:flex;flex-direction:column;padding:28px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:15px;color:var(--ui-text);text-decoration:none;min-width:0;transition:border-color .2s,transform .2s}
.tool-card:hover{border-color:var(--ui-accent);transform:translateY(-3px)}.tool-card.featured-document,.tool-card.featured-character{grid-column:span 3;background:linear-gradient(130deg,var(--studio-glow),transparent 80%),var(--ui-surface)}
.card-icon{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--ui-border);border-radius:11px;background:var(--ui-soft);color:var(--ui-accent);font:22px Georgia}
.card-top{display:flex;justify-content:space-between;align-items:center}.new-label{font-size:.54rem;font-weight:700;letter-spacing:.13em;background:var(--studio-glow);border:1px solid var(--ui-border);padding:6px 9px;border-radius:20px;color:var(--ui-accent)}
.tool-card h3{font-size:1.1rem;letter-spacing:-.025em;font-weight:650;margin:22px 0 10px}.tool-card p{color:var(--ui-muted);line-height:1.8;font-size:.8rem;margin:0 0 25px;max-width:390px}.card-link{margin-top:auto;font-size:.76rem;font-weight:650;color:var(--ui-accent)}
.template-pills{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:26px}.template-pills span{padding:4px 9px;border:1px solid var(--ui-border);border-radius:5px;font-size:.62rem;color:var(--ui-muted)}
.home-bottom{display:grid;grid-template-columns:1fr 1fr;gap:60px;padding:60px 0}.home-bottom p{font-size:.83rem;color:var(--ui-muted);line-height:1.8}.privacy-note{padding:28px;border-left:1px solid var(--ui-border)}.privacy-symbol{color:var(--ui-accent);font-size:2rem}.privacy-note h3{margin:8px 0;font-size:1rem}.home-footer{padding:22px 0;border-top:1px solid var(--ui-border);display:flex;justify-content:space-between;align-items:center;gap:16px;font-size:.8rem}.home-footer small{color:var(--ui-muted);font-size:.67rem}.home-footer>div{display:flex;gap:8px;flex-wrap:wrap}.home-footer button{font-size:.67rem}
.recent-draft{display:flex;align-items:center;gap:14px;padding:14px 0;text-decoration:none;color:var(--ui-text);border-bottom:1px solid var(--ui-border);font-size:.85rem}.recent-draft small{display:block;font-size:.67rem;color:var(--ui-muted)}.recent-draft>span:last-child{margin-left:auto;color:var(--ui-accent)}
@media(min-width:1500px){html[data-theme] .studio-header,html[data-theme] .studio-toolbar{padding-left:32px;padding-right:32px}}
@media(max-width:1100px){html[data-theme] .studio-header{gap:14px}.home-hero{gap:30px}.hero-art{height:400px}.hero-profile{padding:16px}.hero-document{padding:19px}.hero-document h2{font-size:1.8rem}.mini-masthead{font-size:1.9rem}}
@media(max-width:800px){html[data-theme] .studio-header{padding:14px 16px}html[data-theme] .studio-header .tool-tabs{width:100%;margin:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;justify-content:flex-start}.home-hero{grid-template-columns:1fr;padding:44px 0;min-height:0}.hero-copy{max-width:600px}.hero-art{max-width:460px;width:100%;margin:10px auto 0;height:420px}.tool-card-grid{grid-template-columns:1fr 1fr}.tool-card,.tool-card.featured-character,.tool-card.featured-document{grid-column:auto}.tool-card:last-child{grid-column:1/-1}.home-bottom{gap:20px}.section-heading{align-items:flex-start;flex-direction:column;gap:8px}.home-footer{flex-wrap:wrap}}
@media(max-width:520px){html[data-theme] .studio-home main{padding:0 20px 24px}.hero-points{gap:10px;flex-wrap:wrap}.hero-art{height:375px}.hero-document{width:74%;padding:18px;left:0}.hero-profile{width:46%;bottom:15px}.hero-profile h3{font-size:19px}.city-illustration{height:110px}.profile-monogram{height:85px;font-size:45px}.tool-card-grid,.home-bottom{grid-template-columns:1fr}.tool-card{padding:24px}.privacy-note{border-left:0;border-top:1px solid var(--ui-border);padding:24px 0}.home-bottom{padding:40px 0 20px}.hero-actions a{padding:12px 15px;gap:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}.tool-card:hover{transform:none}}

/* Six-module toolkit */
.tool-card.featured-map,.tool-card.featured-document,.tool-card.featured-character{grid-column:span 2;background:linear-gradient(130deg,var(--studio-glow),transparent 80%),var(--ui-surface)}
@media(max-width:800px){.tool-card.featured-map,.tool-card.featured-document,.tool-card.featured-character,.tool-card:last-child{grid-column:span 1}}

.photo-history-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;background:var(--ui-soft);border-bottom:1px solid var(--ui-border)}
.photo-history-bar .hint{margin-left:auto;font-size:.7rem}.photo-history-bar label{font-size:.78rem}.photo-history-bar button{font-size:.76rem} .crop-overlay[hidden]{display:none!important}
@media(max-width:700px){.photo-history-bar{gap:8px;padding:10px}.photo-history-bar .hint{display:none}}
