:root {
  --paper:#fdfbf8; --side:#f6f1ee; --ink:#302727; --muted:#79696c;
  --accent:#9d405e; --tint:#efdcdf; --line:#e6dcd8; --rail:216px;
  --display:Baskerville,"Iowan Old Style","Times New Roman",serif;
  --sans:"Helvetica Neue",Arial,sans-serif;
}
* {box-sizing:border-box}
body {margin:0; background:var(--paper); color:var(--ink); font:16px/1.5 var(--sans); -webkit-font-smoothing:antialiased}
a {color:inherit; text-decoration:none}
button,select,textarea,input {font:inherit; color:inherit}
button {cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {outline:3px solid #a54a70; outline-offset:4px}
button {border:0}
h1,h2,h3,p {margin:0}
[hidden] {display:none!important}
.ic {width:20px;height:20px;flex:none;vertical-align:middle}
.skip {position:fixed;top:-100px;left:20px;z-index:9;padding:8px;background:white}
.skip:focus {top:12px}
#sidebar {position:fixed;inset:0 auto 0 0;width:var(--rail);padding:33px 17px 24px;background:var(--side);border-right:1px solid var(--line);z-index:5;display:flex;flex-direction:column;overflow:auto}
.brandrow {padding:0 5px 35px;display:flex;align-items:center;justify-content:space-between}
.brand {display:inline-flex;align-items:center;gap:6px}
.brand span {font:500 44px/.92 var(--display);letter-spacing:-3.2px}
.brand i {font-size:.65em;color:var(--accent);letter-spacing:-1.2px}
#sidebar nav {display:flex;flex:1;flex-direction:column;gap:5px}
#sidebar nav a {display:flex;align-items:center;gap:13px;min-height:43px;padding:10px 14px;font-size:14px;border-radius:11px;transition:background .15s}
#sidebar nav a .ic {width:19px;height:19px;color:#74666a}
#sidebar nav a:hover {background:#ede5e2}
#sidebar nav a[aria-current] {color:#843850;background:var(--tint);font-weight:600}
#sidebar nav a[aria-current] .ic {color:#973e5d}
#sidebar nav a:last-child {margin-top:auto}
.mobilebar,.shade,.menu-close {display:none}
main {margin:0 auto 0 var(--rail);padding:28px clamp(22px,3vw,52px) 80px;max-width:1700px;min-height:100svh}
.hero {position:relative;isolation:isolate;overflow:hidden;border-radius:19px;display:flex;align-items:center;min-height:clamp(310px,26vw,445px);background:#f2e5db}
.cover {position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;object-position:70% 50%}
.herocopy {padding:37px clamp(25px,3.7vw,64px);max-width:67%}
h1,h2 {font-family:var(--display);font-weight:400;letter-spacing:-.05em;line-height:1.04}
.hero h1 {font-size:clamp(48px,4.6vw,82px);line-height:.99}
.hero h1 em {display:block;color:#8a5767;font-weight:400}
.herocopy p {font-size:clamp(14px,1.1vw,18px);line-height:1.52;color:#5e4c4e;margin:17px 0 21px}
.primary,.upload {display:inline-flex;align-items:center;justify-content:center;gap:13px;padding:13px 20px;min-height:44px;border-radius:30px;background:var(--accent);color:#fff7f8;font-weight:550;font-size:14px;line-height:1.25}
.primary:hover {background:#82314d}
.primary .ic {width:16px;height:16px}
.hero-detail {position:absolute;right:16px;bottom:14px;display:flex;align-items:center;gap:6px;font-size:11px;padding:6px 11px;border-radius:50px;background:#fffaf3d9;color:#523d42}
.hero-detail .ic {width:13px;height:13px}
.collection {margin-top:clamp(34px,3.25vw,60px)}
.sectionhead {display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:19px}
h2 {font-size:clamp(35px,3.15vw,56px)}
.more {display:flex;align-items:center;gap:7px;color:#87455c;font-weight:550;font-size:14px;min-height:40px}
.more .ic {width:16px;height:16px}
.more:hover,.back:hover {text-decoration:underline;text-underline-offset:3px}
.grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 16px}
.card {position:relative;min-width:0}
.cardlink {display:block;border-radius:14px}
.frame {position:relative;overflow:hidden;aspect-ratio:9/16;border-radius:14px;background:#f1e4df}
.frame img {display:block;width:100%;height:100%;object-fit:cover;transition:transform .35s}
.cardlink:hover img {transform:scale(1.023)}
.save {display:grid;place-items:center;width:40px;height:40px;border-radius:50%;color:#4e3d42;background:#fffaf4ed}
.card .save {position:absolute;top:10px;right:10px}
.save .ic {width:16px;height:16px}
.save:hover,.save[aria-pressed=true] {background:#f4d7e1;color:#843650}
.save[aria-pressed=true] .ic {fill:currentColor}
.duration {position:absolute;left:10px;bottom:10px;padding:4px 9px;background:#38282aa8;color:white;border-radius:30px;display:flex;align-items:center;gap:5px;font-size:12px}
.duration .ic {width:12px;height:12px;fill:white}
.caption {padding:11px 1px 0}
.caption h3 {font:500 clamp(16px,1.25vw,22px)/1.27 var(--sans);letter-spacing:-.035em}
.caption p,.genre,.meta,.formfoot span {color:var(--muted);font-size:13px}
.caption p {margin-top:3px}
.pagehead {margin:20px 0 30px}
.pagehead h1,.story h1 {font-size:clamp(50px,5.4vw,85px)}
.pagehead p,.empty p {color:var(--muted);max-width:60ch;margin-top:12px;line-height:1.6}
.composer,.editor,.empty {border:1px solid var(--line);background:#fffdfb;border-radius:20px;padding:clamp(17px,2.2vw,36px)}
.composer {max-width:960px}
.choices,.formfoot {display:flex;flex-wrap:wrap;gap:15px;align-items:center}
.choices {margin-bottom:19px}
label {display:block;font-weight:550;font-size:14px}
select,textarea {display:block;background:var(--paper);border:1px solid #d9ccca;border-radius:9px;padding:9px 12px}
select {margin-top:5px;min-height:44px}
textarea {margin:6px 0 15px;resize:vertical;width:100%;min-height:94px;font-size:16px}
.formfoot {justify-content:space-between}
.message {margin-top:16px;border-top:1px solid var(--line);padding-top:16px;white-space:pre-wrap;overflow-wrap:anywhere}
.message strong {font-size:14px}
.message p {margin:7px 0}
.textbtn {color:#843b55;text-decoration:underline;text-underline-offset:3px;background:transparent;padding:8px 0;font-size:14px}
.editor {display:grid;grid-template-columns:minmax(160px,1fr) minmax(180px,1fr);gap:30px;max-width:830px}
.editor-preview {background:#f6ede7;display:grid;place-items:center;border-radius:11px;overflow:hidden;min-height:180px}
.editor canvas {display:block;max-width:100%;max-height:58svh;width:auto;height:auto}
.adjustments {align-self:center}
.adjustments label {margin:0 0 20px}
.upload {position:relative;cursor:pointer;color:#803750;background:var(--tint)}
.upload input {position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}
.upload:focus-within {outline:2px solid var(--accent)}
input[type=range] {width:100%;display:block;accent-color:var(--accent)}
#download {display:flex;margin:12px 0}
#editstatus {color:var(--muted);font-size:13px}
.empty {max-width:680px}
.empty .primary {margin-top:20px}
.back {display:inline-flex;align-items:center;min-height:44px;color:#835267;font-size:14px;margin:0 0 16px}
.detail {display:grid;grid-template-columns:minmax(210px,.85fr) minmax(0,1fr);align-items:center;gap:clamp(24px,4vw,72px);max-width:1060px}
.detail-media {justify-self:center;width:min(100%,42svh);aspect-ratio:9/16;background:#f3e5dd;border-radius:18px;overflow:hidden}
.detail-media img,.detail-media video {display:block;width:100%;height:100%;object-fit:contain}
.story h1 {margin:7px 0 9px}
.story h2 {font:550 17px var(--sans);letter-spacing:-.02em;margin:27px 0 9px}
.story p:not(.meta):not(.genre) {color:#68585c;line-height:1.62}
.story-actions {display:flex;align-items:center;gap:12px;margin-top:24px}
.story-actions .save {border:1px solid var(--line);width:45px;height:45px}
.meta {font-size:13px;color:var(--accent)}
.meta span {margin:0 4px}
@media(min-width:1950px){main{margin-inline:auto}}
@media(max-width:1120px) and (min-width:761px){:root{--rail:178px}#sidebar{padding-inline:10px}.grid{gap:20px 12px}.herocopy{padding-inline:28px}.hero h1{font-size:clamp(39px,4.4vw,52px)}}
@media(max-width:760px){
  .mobilebar{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;min-height:60px;padding:4px 14px;background:#fcf9f6f5;border-bottom:1px solid var(--line)}
  .mobilebar .brand span{font-size:35px}
  .menu-toggle,.menu-close,.mobile-create{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:transparent}
  .mobile-create{color:var(--accent);background:var(--tint);width:39px;height:39px}
  #sidebar{transform:translateX(-102%);visibility:hidden;transition:transform .22s,visibility .22s;width:min(282px,83vw);padding:19px 15px;z-index:6}
  #sidebar.opened{visibility:visible;transform:none}
  .brandrow{padding:0 0 27px}
  #sidebar nav a{min-height:48px}
  .shade:not([hidden]){position:fixed;inset:0;z-index:4;display:block;background:#3e2f3452}
  .locked{overflow:hidden}
  main{margin:0;padding:14px 14px 48px;min-height:calc(100svh - 60px)}
  .hero{min-height:340px}.herocopy{max-width:72%}
  .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 12px}
  .pagehead{margin:14px 0 24px}.pagehead h1,.story h1{font-size:49px}
  .sectionhead{margin-bottom:14px}
  .card .save{right:5px;top:5px;width:44px;height:44px;background:radial-gradient(circle,#fffbf4ed 53%,transparent 55%)}
  .card .save[aria-pressed=true]{background:radial-gradient(circle,#f4d7e1 53%,transparent 55%)}
}
@media(max-width:520px){
  .hero{min-height:443px;align-items:end;border-radius:16px}.cover{height:66%;object-position:83% 35%}
  .hero:after{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(0deg,#f4e8e0 0%,#f4e8e0 31%,#f4e8e0e8 44%,transparent 68%)}
  .herocopy{padding:0 19px 22px;max-width:100%}.hero h1{font-size:clamp(40px,10.4vw,54px)}
  .herocopy p{font-size:14px;margin:11px 0 15px}.hero-detail{right:10px;top:10px;bottom:auto;font-size:10px}
  h2{font-size:35px}.more{font-size:13px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 10px}
  .caption{padding-top:8px}.caption h3{font-size:16px}.caption p{font-size:12px}.frame{border-radius:11px}
  .choices{gap:8px}.choices label{font-size:12px}.choices select{padding:7px 5px;font-size:14px}
  .editor,.detail{grid-template-columns:1fr;gap:22px}.editor canvas{max-height:48svh}
  .detail-media{width:min(100%,33svh)}.back{margin-bottom:9px}
  .hero .primary{padding:12px 17px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.hero-secondary {display:inline-flex;align-items:center;gap:4px;margin-left:12px;font-size:14px;color:#613a47}
.hero-secondary .ic {width:15px;height:15px}
.theme-index {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.theme-index a {display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;padding:10px;background:#faf5f1}
.theme-index a:hover,.theme-menu a:hover {background:var(--tint)}
.theme-index img {height:64px;width:45px;border-radius:8px;object-fit:cover}
.theme-index span {font-size:15px;font-weight:550;line-height:1.25}
.theme-index small {display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:5px}
.theme-index .ic {width:14px;height:14px;margin-left:auto;color:var(--accent)}
.theme-menu {display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px}
.theme-menu a {padding:10px 16px;border-radius:24px;font-size:14px;background:var(--side)}
.theme-menu a[aria-current] {color:#733249;background:var(--tint)}
.guide ol {display:grid;grid-template-columns:repeat(3,1fr);gap:30px;margin:22px 0 0;padding:22px 0 0 23px;border-top:1px solid var(--line)}
.guide li {padding:0 8px 0 2px}
.guide li::marker {color:var(--accent)}
.guide p,.faq p {color:var(--muted);margin:7px 0 0;max-width:68ch}
.faq details {padding:16px 0;border-bottom:1px solid var(--line)}
.faq h2 {margin-bottom:12px}
.faq summary {cursor:pointer;font-weight:550}
.faq a {color:var(--accent);text-decoration:underline}
@media (max-width:1250px) {.theme-index{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:620px) {.guide ol{grid-template-columns:1fr;gap:16px}.theme-index{gap:8px}.theme-index a{padding:7px;gap:7px}.theme-index small{font-size:11px}.theme-index img{width:35px;height:52px}.theme-index span{font-size:14px}.theme-index .ic{display:none}}
