[data-editor-desk]{grid-template-columns:minmax(0,.93fr) minmax(0,1.07fr);gap:0;align-items:start;font-family:var(--sans)}
[data-editor-desk] > .studio-panel{min-width:0}
[data-editor-desk] .studio-paper{border-left:1px solid var(--line);background:var(--paper-2)}
[data-editor-desk] .studio-paper .studio-toolbar{align-items:flex-start}
[data-editor-desk] .studio-canvas{display:block;object-fit:contain;width:100%;max-height:min(60vh,610px);margin:auto;background:var(--paper);border:1px solid var(--line);border-radius:8px}
[data-editor-desk][data-layout="template"] .studio-canvas{height:auto}
[data-editor-desk] .editor-tools{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
[data-editor-desk] .editor-tools > :is(button,a),[data-editor-desk] .common-button{min-height:40px}
[data-editor-desk] .studio-field{min-width:0;font-weight:700}
[data-editor-desk] .studio-field :is(input:not([type=checkbox]):not([type=color]):not([type=range]),select,textarea){max-width:100%;min-width:0;background:var(--paper);font-weight:400}
[data-editor-desk] :is(input,select,textarea,summary,button,a):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
[data-editor-desk] .studio-line{min-width:0}
[data-editor-desk] .study-references:empty,[data-editor-desk] [hidden]{display:none!important}
[data-editor-desk] .study-references{display:flex;flex-wrap:wrap;gap:8px}
[data-editor-desk] .study-references figure{min-width:0;margin:0}
[data-editor-desk] .study-references .studio-ref{width:min(98px,24vw);height:92px;object-fit:contain}
[data-editor-desk] .editor-jump{display:none}
[data-editor-desk] details.editor-fold{border-block-start:1px solid var(--line);padding-block-start:9px}
[data-editor-desk] details.editor-fold > summary{cursor:pointer;font-weight:700;color:var(--berry-ink);margin-bottom:8px}
[data-gf-tool="oc-outfit-ideas"] > [data-catalog],[data-gf-tool="oc-pose-ideas"] > [data-catalog]{display:none}
[data-study-library] [data-catalog]{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:385px;overflow:auto;margin:0;padding:2px 3px 3px;scrollbar-gutter:stable}
[data-study-library] .studio-example{padding:0;min-width:0}
[data-study-library] .render-thumb{min-height:0;aspect-ratio:1.9;display:grid;place-items:center;overflow:hidden}
[data-study-library] .render-thumb canvas{width:100%;height:auto}
[data-study-library] .example-copy{padding:6px;min-width:0}
[data-study-library] .example-copy h3{font-size:.9rem;line-height:1.15;margin:3px 0}
[data-study-library] .example-copy p:not(.example-tag){font-size:.81rem;line-height:1.24;margin-block:4px}
[data-study-library] .example-copy .common-button{font-size:.78rem;padding-inline:7px}
[data-study-library] .example-tag{font-size:.7rem}
[data-editor-desk] .studio-code{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:720px){
  [data-editor-desk].studio-desk{grid-template-columns:minmax(0,1fr)}
  [data-editor-desk].studio-desk > .studio-paper{grid-row:auto;border-left:0;border-top:1px solid var(--line);border-bottom:0}
  [data-editor-desk] > .studio-panel{padding:13px}
  [data-editor-desk].studio-desk > .studio-paper .studio-canvas{height:auto;max-height:360px}
  [data-editor-desk] .editor-jump{display:inline-flex;align-items:center;min-height:36px;color:var(--berry-ink);font-weight:700}
  [data-editor-desk] .studio-field :is(input:not([type=checkbox]):not([type=color]):not([type=range]),select,textarea){font-size:16px}
  [data-editor-desk] :is(.studio-grid2,.studio-grid3,.studio-grid4){grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
}
@media(max-width:380px){
 [data-editor-desk] :is(.studio-grid3,.studio-grid4){grid-template-columns:minmax(0,1fr)}
}

[data-oc-editor-guide]{margin-block:25px;scroll-margin-top:80px}
[data-oc-editor-guide] > h2{margin-bottom:5px}
[data-oc-editor-guide] > p{color:var(--muted);margin:0 0 12px}
.editor-example-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;max-width:780px}
.editor-example-grid[data-pair]{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none}
.editor-example-grid figure{min-width:0;margin:0;padding:8px;background:var(--white);border:1px solid var(--line);border-radius:8px}
.editor-example-grid a{display:block}
.editor-example-grid img{display:block;width:100%;height:auto;max-height:440px;object-fit:contain;background:var(--paper-2);border-radius:5px}
.editor-example-grid[data-pair] img{aspect-ratio:4/3}
.editor-example-grid figcaption{margin-top:6px;color:var(--muted);font-size:.87rem}
.editor-example-grid figcaption strong{display:block;color:var(--ink);font-weight:800;margin-bottom:2px}
.editor-how ol{list-style:decimal;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 16px;padding-left:21px}
.editor-how li{padding-left:1px}
.editor-how li::marker{color:var(--berry-ink);font-weight:800}
.editor-how strong{display:block}
.editor-how p{font-size:.90rem;color:var(--muted);margin:2px 0 0}
@media(max-width:600px){.editor-how ol{grid-template-columns:minmax(0,1fr);gap:6px}.editor-example-grid[data-pair] figure{padding:5px}}

/* The introduction belongs to this editor page. */
.shell:has(> [data-gf-tool="oc-template"]) > .studio-intro h1{font-size:clamp(1.85rem,3vw,2.5rem);line-height:1.08}
@media(min-width:900px){.shell:has(> [data-gf-tool="oc-template"]) > .studio-intro h1{white-space:nowrap}}
@media(max-width:720px){.shell:has(> [data-gf-tool="oc-template"]) > .studio-intro h1{font-size:28px;white-space:normal}}
[data-editor-desk].studio-desk{border:2px solid var(--ink);box-shadow:0 5px 0 var(--ink);margin-block-end:5px}
[data-editor-desk] > .studio-paper{background-color:var(--paper-2);background-image:radial-gradient(#dac9b6 1px,transparent 1px);background-size:15px 15px}
[data-editor-desk] .primary-button,.template-mobile-bar .primary-button{border:2px solid var(--ink);box-shadow:0 2px 0 var(--ink);font-weight:800}
[data-editor-desk] .primary-button:not(:disabled):active,.template-mobile-bar .primary-button:active{transform:translateY(2px);box-shadow:none}
.editor-member-note{margin:0;font-size:.89rem;color:var(--muted)}
.editor-member-note button{cursor:pointer;border:0;background:none;padding:4px 0;color:var(--berry-ink);text-decoration:underline;font:inherit;font-weight:800}
.editor-member-note button:focus-visible,.editor-segments button:focus-visible,.study-presets button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.editor-member-note button + span{margin-inline-start:.35rem}
[data-editor-desk] > .studio-paper .studio-canvas{border:2px solid var(--ink);box-shadow:0 2px 0 var(--ink)}

.editor-layout-picker{display:grid;gap:6px}
.editor-layout-picker > p{font-size:.9rem;font-weight:800;margin:0}
.editor-segments{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.editor-segments button{min-width:0;padding:8px 6px;text-align:left;display:grid;gap:4px;align-content:start;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);font:800 .87rem/1.15 var(--sans);cursor:pointer;overflow-wrap:break-word}
.editor-segments button span{font-size:.72rem;font-weight:600;color:var(--muted)}
.editor-segments button[aria-pressed=true]{background:var(--lav);color:var(--berry-ink);border-color:var(--berry-ink);box-shadow:0 0 0 1px var(--berry-ink)}
[data-template-next] > summary{cursor:pointer;color:var(--berry-ink);font-weight:800}
[data-template-next][open] > summary{margin-block-end:8px}
[data-template-secondary-actions]:empty,.template-mobile-bar{display:none}
@media(max-width:720px){
  .template-mobile-bar{position:fixed;z-index:8;inset:auto 0 0;display:flex;justify-content:center;gap:7px;background:var(--paper);border-top:1px solid var(--line);padding:7px 10px calc(7px + env(safe-area-inset-bottom,0px));box-shadow:0 -4px 15px #2d1e2f12}
  .template-mobile-bar > *{min-height:38px}
  body:has(.template-mobile-bar){padding-bottom:calc(66px + env(safe-area-inset-bottom,0px))}
  html:has(.template-mobile-bar){scroll-padding-bottom:calc(66px + env(safe-area-inset-bottom,0px))}
  body:has([data-editor-desk] :is(input,textarea,select):focus) .template-mobile-bar,body:has(.editor-footer-in-view) .template-mobile-bar:not(:focus-within){visibility:hidden;pointer-events:none}
}

@media print {
  body[data-print-template] {
    margin: 0;
    padding: 0;
    background: white;
  }

  .template-mobile-bar,
  body[data-print-template] > :not(#main),
  body[data-print-template] #main > .shell > :not([data-gf-tool="oc-template"]),
  body[data-print-template] [data-gf-tool="oc-template"] > :not(#character-template),
  body[data-print-template] #character-template > :not([data-print-panel]),
  body[data-print-template] #character-template [data-print-panel] > :not([data-template-canvas]) {
    display: none !important;
  }

  body[data-print-template] :is(#main, #main > .shell, [data-gf-tool="oc-template"], #character-template, #character-template [data-print-panel]) {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }

  body[data-print-template] #character-template [data-print-panel] > canvas[data-template-canvas] {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 4px);
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
  }
}

[data-gf-tool="oc-template"] [data-template-groups] .studio-grid2{margin-top:8px}
[data-gf-tool="oc-template"] .template-palette{margin-top:8px;align-items:end}
[data-gf-tool="oc-template"] .template-palette .studio-field{min-width:0;flex:1 1 72px}

[data-template-canvas][hidden]{display:none}
[data-editor-desk][data-layout="template"] .template-first-sheet{max-height:none;padding:clamp(1rem,2.5vw,2rem);background:#fbf7ef;color:#30232a;border-top:5px solid #8b3d59}
.template-first-sheet h3{font-size:clamp(1.5rem,3vw,2.8rem);margin:0}.template-first-sheet p{margin:0 0 1rem}.template-first-sheet section{padding:.6rem .75rem;border-inline-start:3px solid #8b3d59;background:#fff;margin:.75rem 0}.template-first-sheet h4{margin:0;color:#762845}.template-first-sheet ul{list-style:none;padding:0;margin:.3rem 0 0}.template-first-sheet li{display:flex;align-items:center;gap:.5rem}.template-first-sheet li::after{content:"";flex:1;border-bottom:1px solid #e5d5da}.template-first-palette{display:flex;gap:.3rem;margin-top:.4rem}.template-first-palette span{width:1rem;height:.65rem;background:#466c6b}.template-first-palette span:nth-child(2){background:#c77f4d}.template-first-palette span:nth-child(3){background:#e0c196}
