:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #172c23;
  background: #eef2ed;
  --studio-green: #244d3f;
  --studio-line: #c9d5ca;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.studio-wrap { width: min(75rem, calc(100% - 2rem)); margin: auto; }
.studio-header { background: #183c31; color: #fff; }
.studio-header .studio-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.studio-header a { color: inherit; }
.studio-brand { font-weight: 800; letter-spacing: .06em; text-decoration: none; }
main { padding-block: clamp(1.25rem, 4vw, 3rem); }
h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 1rem; }
h2 { margin: 0 0 .7rem; font-size: 1.3rem; }
p { line-height: 1.5; }
a { color: #245140; text-underline-offset: .15em; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 700; margin-bottom: .3rem; }
fieldset label { display: inline-flex; gap: .4rem; align-items: center; min-height: 44px; margin-inline-end: 1rem; }
button, input, select, textarea { font: inherit; }
button, input:not([type=radio]), select, textarea { min-height: 44px; padding: .55rem .7rem; border: 1px solid var(--studio-line); border-radius: .5rem; background: #fff; color: inherit; }
button { cursor: pointer; font-weight: 650; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #286c56; outline-offset: 3px; }
.studio-options, .studio-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.studio-option { text-align: left; padding: 1rem; }
.studio-option strong, .studio-option span { display: block; }
.studio-option span { font-weight: 400; margin-top: .25rem; }
.studio-option[aria-pressed=true] { border: 2px solid var(--studio-green); background: #e1ece3; }
.studio-panel { background: #fff; border: 1px solid var(--studio-line); border-radius: .8rem; padding: clamp(.8rem, 3vw, 1.4rem); margin-top: 1rem; min-width: 0; }
.studio-panel label { display: block; font-weight: 650; margin: .65rem 0 .25rem; }
.studio-panel input, .studio-panel textarea, .studio-panel select { width: 100%; }
.studio-panel input[type=color] { padding: .25rem; }
.studio-panel textarea { resize: vertical; }
.studio-panel details { margin-top: .9rem; }
.studio-panel summary { cursor: pointer; font-weight: 650; min-height: 44px; align-content: center; }
.studio-design, .studio-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.studio-design > div { flex: 1 1 8rem; }
.studio-note { color: #466156; }
.studio-media { margin: .7rem 0; }
.studio-media button { margin-top: .35rem; }
.studio-section { background: #f5f7f3; padding: .75rem; margin: .6rem 0; border-radius: .5rem; }
.studio-section .studio-actions { margin-top: .45rem; }
.studio-primary { background: var(--studio-green); color: #fff; }
.studio-status { margin-bottom: 0; font-weight: 650; }
.studio-status:empty { margin: 0; }
.studio-preview { border: 1px solid var(--studio-line); border-top: .45rem solid var(--page-accent, #244d3f); border-radius: .5rem; overflow: hidden; overflow-wrap: anywhere; }
.studio-preview[data-font=serif] { font-family: Georgia, serif; }
.studio-preview .page-intro, .studio-preview .page-content { margin: 0; }
.page-intro, .page-content { padding: clamp(.75rem, 3vw, 1.3rem); }
.page-intro p, .page-content p { white-space: pre-wrap; margin: .4rem 0; }
.page-content { border-top: 1px solid var(--studio-line); }
.page-content h3 { margin: 0 0 .35rem; }
.page-logo { display: block; width: auto; max-width: 100%; max-height: 4rem; object-fit: contain; margin-bottom: .7rem; }
.page-media { display: flex; height: clamp(8rem, 32vw, 16rem); margin: 0; background: #f3f5f1; }
.page-photo { width: 100%; min-width: 0; height: 100%; object-fit: contain; }
.page-media.has-decor .page-photo { width: 80%; }
.page-decor { width: 20%; height: 100%; object-fit: cover; }
@media (max-width: 48rem) { .studio-columns { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 32rem) { .studio-options { grid-template-columns: 1fr; gap: .5rem; } }

#studio-login button, #studio-account-actions, .studio-file-actions { margin-top: .75rem; }
.studio-status:not(:empty) { position: sticky; bottom: .5rem; background: #eef2ed; padding: .6rem; border: 1px solid var(--studio-line); border-radius: .45rem; }
