/* Application surfaces only. Artwork and inline text retain document styling. */
:root{font-size:4.233333mm;--ui-bg:#edf0f5;--ui-panel:#fff;--ui-rail:#f7f8fb;--ui-input:#f4f6fa;--ui-text:#232838;--ui-muted:#667084;--ui-line:#dfe4ee;--ui-accent:#6c5ce7;--ui-active:#eeeaff;--navy:var(--ui-text);--border:var(--ui-line);--muted:var(--ui-muted);font-family:'Pretendard','Malgun Gothic',sans-serif}
:root[data-theme=dark]{--ui-bg:#15171d;--ui-panel:#20232c;--ui-rail:#191c24;--ui-input:#2a2e39;--ui-text:#eef0f7;--ui-muted:#a8afc2;--ui-line:#363c4b;--ui-accent:#aa9dff;--ui-active:#39324f;--navy:var(--ui-text);--border:var(--ui-line);--muted:var(--ui-muted);background:var(--ui-bg);color:var(--ui-text)}
html[data-theme] .editor-header,html[data-theme] .setup-panel,html[data-theme] dialog{background:var(--ui-panel);color:var(--ui-text)}
html[data-theme] button,html[data-theme] input,html[data-theme] select,html[data-theme] textarea:not(.inline-text-editor){background:var(--ui-input);color:var(--ui-text);border-color:var(--ui-line);border-radius:2.38125mm;min-height:11.1125mm;font-size:3.704167mm}
html[data-theme] button{transition:background .15s,border-color .15s,box-shadow .15s;font-weight:550}
html[data-theme] button:hover{background:var(--ui-active);border-color:var(--ui-accent)}
html[data-theme] input,html[data-theme] select,html[data-theme] textarea:not(.inline-text-editor){font-size:4.233333mm}
html[data-theme] label{font-size:3.704167mm;gap:2.116667mm;color:var(--ui-muted)}
html[data-theme] input[type=checkbox]{min-height:4.7625mm;accent-color:var(--ui-accent)}
html[data-theme] button:focus-visible,html[data-theme] input:focus-visible,html[data-theme] select:focus-visible,html[data-theme] summary:focus-visible{outline:0.529167mm solid var(--ui-accent);outline-offset:0.79375mm}
.editor-header{height:20.108333mm;min-height:20.108333mm;padding:3.175mm 6.35mm;gap:6.35mm;border-bottom:0.264583mm solid var(--ui-line)}
.brand{gap:2.645833mm;font-size:4.233333mm;letter-spacing:-.04em}
html[data-theme] .brand-symbol{background:#7261d9;color:#fff;width:10.054167mm;height:10.054167mm;border-radius:3.175mm;font-size:7.14375mm;box-shadow:inset 0 0.264583mm 0 #ffffff30}
.brand small{display:block;font-size:2.645833mm;letter-spacing:.13em;color:var(--ui-muted);margin-top:1.058333mm}
.document-title{border-left:0.264583mm solid var(--ui-line);padding-left:5.820833mm}
.document-title input{background:transparent!important;border-color:transparent!important;width:min(23vw,79.375mm);max-width:79.375mm;font-size:3.96875mm;min-height:7.408333mm;padding:0.264583mm 1.058333mm}
.document-title input:focus{background:var(--ui-input)!important}
.document-title span{font-size:3.175mm;color:var(--ui-muted);padding-left:1.058333mm;margin-top:1.058333mm}
.header-actions{gap:2.116667mm;align-items:center}
.header-actions button{padding:2.645833mm 3.704167mm;white-space:nowrap}
html[data-theme] .header-actions .primary,html[data-theme] .primary{background:#8b78ef;color:#fff;border-color:#8b78ef;font-weight:650;box-shadow:0 0.79375mm 2.645833mm #0002}
html[data-theme] .primary:hover{background:#7763dc;border-color:#aa9dff}
#open-shortcuts,#theme-toggle{background:transparent;border-color:transparent;color:var(--ui-muted)}
.editor-layout{grid-template-columns:100.541667mm minmax(0,1fr);height:calc(100dvh - 20.108333mm);min-height:148.166667mm}
.setup-panel{padding-left:20.108333mm;scrollbar-color:var(--ui-line) transparent;border-right:0.264583mm solid var(--ui-line)}
html[data-theme] .panel-tabs{top:20.108333mm;width:20.108333mm;background:var(--ui-rail);border-color:var(--ui-line);padding:3.175mm 2.116667mm;gap:1.322917mm}
html[data-theme] .panel-tabs button{border:0;border-radius:2.910417mm;background:transparent;color:var(--ui-muted);height:16.933333mm;min-height:16.933333mm;padding:2.116667mm 0;font-size:3.175mm;box-shadow:none}
html[data-theme] .panel-tabs button:hover{background:var(--ui-input);color:var(--ui-text)}
html[data-theme] .panel-tabs button[aria-pressed=true]{background:var(--ui-active);color:var(--ui-accent);box-shadow:none}
.panel-tabs b{display:flex;align-items:center;justify-content:center;height:6.35mm;margin:0 0 1.5875mm;font-size:5.820833mm}
.panel-tabs svg{width:5.820833mm;height:5.820833mm;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.panel-section{padding:6.35mm 5.291667mm}
.panel-section h2{font-size:4.497917mm;font-weight:650;letter-spacing:-.035em;margin-bottom:5.291667mm}
.panel-section h3{font-size:3.96875mm}
html[data-theme] .section-heading>span,html[data-theme] .library-heading>span{font-size:3.175mm;background:var(--ui-input);color:var(--ui-muted);padding:1.058333mm 2.38125mm;border-radius:5.291667mm}
html[data-theme] .workspace{padding:4.233333mm 7.408333mm 3.704167mm;background-color:var(--ui-bg);background-image:radial-gradient(#858ca023 0.185208mm,transparent 0.185208mm);background-size:4.7625mm 4.7625mm}
.workspace-toolbar{padding:2.38125mm 3.175mm;border:0.264583mm solid var(--ui-line);border-radius:3.439583mm;background:var(--ui-panel);box-shadow:0 1.322917mm 5.291667mm #0000000a;margin-bottom:3.704167mm;min-height:15.345833mm}
.workspace-toolbar button{background:transparent;border-color:transparent;min-height:9.525mm}
.workspace-toolbar .guide-toggle{font-size:3.704167mm}
.toolbar-divider{background:var(--ui-line)}
.zoom-buttons output{font-size:3.439583mm;color:var(--ui-muted)}

.tag-button{padding:1.5875mm 3.175mm;border-radius:5.291667mm;font-size:3.175mm;background:var(--ui-input,#1e293b);color:var(--ui-muted,#94a3b8);border:0.264583mm solid var(--ui-line,#334155);cursor:pointer;white-space:nowrap}
.tag-button[aria-pressed="true"]{background:var(--ui-accent,#38bdf8);color:#0f172a;font-weight:bold;border-color:var(--ui-accent,#38bdf8)}
.template-item-card{display:flex;flex-direction:column;background:var(--ui-input,#1e293b);border:0.264583mm solid var(--ui-line,#334155);border-radius:2.645833mm;overflow:hidden;cursor:pointer;transition:transform 0.15s,border-color 0.15s;text-align:left;padding:0}
.template-item-card:hover{transform:translateY(-0.529167mm);border-color:var(--ui-accent,#38bdf8)}
.template-thumb{height:26.458333mm;display:flex;align-items:center;justify-content:center;padding:2.116667mm;background:var(--ui-bg,#0f172a)}
.template-thumb svg{max-height:100%;max-width:100%;box-shadow:0 1.058333mm 3.175mm rgba(0,0,0,0.3)}
.template-info{padding:2.645833mm 3.175mm}
.template-info strong{display:block;font-size:3.704167mm;color:var(--ui-text,#f8fafc);margin-bottom:0.529167mm}
.template-info .badge{display:inline-block;font-size:2.910417mm;color:var(--ui-accent,#38bdf8);margin-bottom:1.058333mm}
.template-info p{margin:0;font-size:2.910417mm;color:var(--ui-muted,#94a3b8);line-height:1.4}

.spread-info{margin:0 0 2.645833mm;gap:2.116667mm;justify-content:center}
html[data-theme] .spread-info button{border:0;background:transparent;font-size:3.175mm;color:var(--ui-muted);padding:1.322917mm 3.175mm;min-height:7.9375mm;border-radius:5.291667mm}
html[data-theme] .spread-info button:hover{background:var(--ui-active);color:var(--ui-accent)}
.canvas-scroll{padding:4.233333mm 2.645833mm 5.820833mm}
html[data-theme] #cover-canvas{outline:0.264583mm solid #a2a8b280;outline-offset:1.322917mm;box-shadow:0 3.96875mm 13.229167mm #0005;background:#fff}
html[data-theme] .canvas-footer,html[data-theme] .status,html[data-theme] .gesture-help,html[data-theme] .check-strip p,html[data-theme] .check-strip summary{font-size:3.175mm;color:var(--ui-muted)}
.canvas-footer{padding-top:3.704167mm;line-height:1.6}
.gesture-help{max-width:201.083333mm;margin:0 auto;line-height:1.6;padding:1.058333mm 0 2.116667mm}
.status{padding:2.116667mm 0 0;min-height:7.408333mm;border-top:0.264583mm solid var(--ui-line);margin-top:2.116667mm}
html[data-theme] .template-card{border-radius:3.175mm;border:0.264583mm solid var(--ui-line);background:var(--ui-input)}
html[data-theme] .template-card #template-art{padding:6.35mm 4.7625mm;background:var(--ui-bg)}
.template-description{padding:4.233333mm}.template-description strong{font-size:4.233333mm}
html[data-theme] .template-description>span,html[data-theme] .template-help,html[data-theme] .library-intro{font-size:3.439583mm;color:var(--ui-muted);line-height:1.65}
html[data-theme] .template-description>b{color:var(--ui-accent);border-color:var(--ui-line);font-size:3.704167mm;padding-top:3.704167mm}
html[data-theme] .upload-photo,html[data-theme] #edit-on-canvas{background:var(--ui-active);border:0.264583mm solid var(--ui-line);color:var(--ui-accent);min-height:12.170833mm}
.asset-kinds{background:var(--ui-bg);padding:1.058333mm;gap:0.79375mm;border-radius:2.910417mm}
html[data-theme] .asset-kinds button{background:transparent;border-color:transparent;font-size:3.439583mm;border-radius:2.116667mm;min-height:10.583333mm}
html[data-theme] .asset-kinds button[aria-pressed=true]{background:var(--ui-panel);color:var(--ui-accent);border-color:var(--ui-line);box-shadow:0 0.529167mm 1.322917mm #0002}
html[data-theme] .photo-topics button,html[data-theme] .shape-grid button{background:var(--ui-input);border-color:var(--ui-line);color:var(--ui-muted);border-radius:2.645833mm;font-size:3.439583mm}
html[data-theme] .photo-topics button:hover,html[data-theme] .photo-topics button[aria-pressed=true],html[data-theme] .shape-grid button:hover{background:var(--ui-active);border-color:var(--ui-accent);color:var(--ui-accent);box-shadow:none}
.photo-topics{gap:2.116667mm}.photo-topics button{min-height:11.1125mm}.photo-topics button>span{font-size:4.233333mm}
html[data-theme] .topic-heading strong{font-size:3.704167mm;color:var(--ui-text)}.topic-heading>span{font-size:3.175mm;color:var(--ui-muted)}
.photo-results{gap:4.7625mm 3.175mm}.photo-results button{height:33.866667mm;border-radius:2.645833mm}
html[data-theme] .photo-results button{background:var(--ui-bg)}
html[data-theme] .asset-caption{font-size:3.439583mm;color:var(--ui-text);margin-top:2.38125mm}
html[data-theme] .photo-results a{font-size:3.175mm;color:var(--ui-muted)}
html[data-theme] #photo-status,html[data-theme] .asset-rights,html[data-theme] .photo-license,html[data-theme] .photo-empty-note{font-size:3.175mm;color:var(--ui-muted)}
html[data-theme] .shape-filter button{font-size:3.439583mm;padding:1.5875mm 3.175mm;min-height:8.995833mm;background:var(--ui-input);color:var(--ui-muted)}
html[data-theme] .shape-filter button[aria-pressed=true]{background:var(--ui-active);color:var(--ui-accent)}
.shape-grid{gap:2.645833mm}.shape-grid button{padding:4.7625mm 1.322917mm 3.175mm}.shape-grid svg{width:8.466667mm;height:8.466667mm}
html[data-theme] .shape-grid button span{font-size:3.175mm;letter-spacing:0;color:var(--ui-muted)}
html[data-theme] #shape-search{font-size:4.233333mm;background:var(--ui-input);border-color:var(--ui-line)}
.selection-section .field-pair{gap:3.175mm}.selection-section .field-pair button{font-size:3.439583mm;min-height:10.583333mm}
html[data-theme] .selection-label{color:var(--ui-accent);font-size:3.439583mm;margin-bottom:4.233333mm}
html[data-theme] .font-preview{background:var(--ui-bg);color:var(--ui-text);border-color:var(--ui-line);padding:4.233333mm;border-radius:2.645833mm;font-size:6.35mm;line-height:1.6}
html[data-theme] .font-status,html[data-theme] .font-credit,html[data-theme] .stack-hint{font-size:3.175mm;color:var(--ui-muted);line-height:1.6}
.precise-controls summary{font-size:3.704167mm!important;padding:1.058333mm 0}
html[data-theme] .delete-button{font-size:3.439583mm;color:#dc8793;background:transparent;border-color:var(--ui-line)}
html[data-theme] .layers button{border-radius:2.38125mm;background:transparent;color:var(--ui-text);padding:3.175mm 2.645833mm;min-height:15.345833mm}
html[data-theme] .layers button[aria-pressed=true]{background:var(--ui-active);border-color:var(--ui-accent)}
.layer-icon{display:grid;place-items:center;background:var(--ui-input);border-radius:1.5875mm;width:7.9375mm;height:8.466667mm;color:var(--ui-muted)}
.layer-text{font-size:3.704167mm}.layers small,.layer-help{font-size:3.175mm}
html[data-theme] dialog{border:0.264583mm solid var(--ui-line);border-radius:4.7625mm;box-shadow:0 8.466667mm 26.458333mm #0007}
dialog::backdrop{background:#0b0c14b8;backdrop-filter:blur(1.058333mm)}
html[data-theme] .ai-tools button{background:var(--ui-input);border-color:var(--ui-line);border-radius:3.175mm;padding:3.96875mm}
html[data-theme] .ai-tools strong{color:var(--ui-text)}
@media(min-width:180.18125mm) and (max-width:291.041667mm){.editor-layout{grid-template-columns:87.3125mm minmax(0,1fr)}.setup-panel{padding-left:17.991667mm}html[data-theme] .panel-tabs{width:17.991667mm}.panel-section{padding:5.291667mm 4.233333mm}.editor-header{padding-inline:4.233333mm;gap:4.233333mm}.brand small{display:none}.document-title{padding-left:3.175mm}.document-title input{width:17vw}.header-actions button{padding-inline:2.645833mm}html[data-theme] .workspace{padding-inline:4.7625mm}.photo-results button{height:29.104167mm}}
@media(max-width:179.916667mm){
 .editor-header{height:auto;min-height:32.808333mm;flex-wrap:wrap;padding:3.175mm;gap:2.645833mm}.brand small{display:none}.brand-symbol{width:8.466667mm;height:8.466667mm}.document-title{padding-left:3.175mm}.document-title input{width:100%;font-size:3.704167mm}.document-title span{font-size:3.175mm}
 .header-actions{width:100%;display:flex;gap:1.322917mm;overflow-x:auto}.header-actions button{padding:2.116667mm 1.5875mm;font-size:3.175mm;min-height:10.583333mm;flex:0 0 auto}#open-shortcuts{margin-right:auto}
 .editor-layout{display:flex;height:auto;min-height:0}.setup-panel{padding:19.05mm 0 0;border:0}
 html[data-theme] .panel-tabs{position:absolute;top:0;left:0;bottom:auto;width:100%;height:19.05mm;padding:1.322917mm 1.5875mm;display:flex;flex-direction:row;overflow-x:auto;gap:1.058333mm;border-bottom:0.264583mm solid var(--ui-line)}
 html[data-theme] .panel-tabs button{min-width:16.404167mm;flex:1 0 16.404167mm;height:15.875mm;min-height:15.875mm;font-size:3.175mm;padding:1.852083mm 0}.panel-tabs b{margin-bottom:1.058333mm}
 .panel-section{padding:4.7625mm 4.233333mm;max-height:79.375mm}.panel-section.selection-section{max-height:95.25mm}.panel-section h2{font-size:4.233333mm;margin-bottom:3.704167mm}
 html[data-theme] .workspace{padding:3.175mm;min-height:116.416667mm;height:calc(100dvh - 44.979167mm)}.workspace-toolbar{padding:1.5875mm 2.116667mm;min-height:12.7mm;margin-bottom:2.116667mm}.canvas-scroll{padding:3.175mm 1.5875mm;min-height:42.333333mm}
 .spread-info{margin-bottom:0}.spread-info button{font-size:3.175mm}.canvas-footer{font-size:3.175mm}.gesture-help{display:none}
 .photo-results{grid-template-columns:repeat(3,minmax(0,1fr));gap:3.175mm 2.116667mm}.photo-results button{height:26.458333mm}.photo-topics{grid-template-columns:repeat(3,minmax(0,1fr))}.shape-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .template-card{max-width:60.854167mm}.template-description{padding:3.175mm}.template-card #template-art{padding:3.175mm!important}
}
@media(prefers-reduced-motion:reduce){html[data-theme] button{transition:none}}

@media(max-width:179.916667mm){.workspace-toolbar{flex-wrap:wrap;gap:1.5875mm}.history-buttons,.zoom-buttons{gap:0.79375mm;flex-shrink:0}.workspace-toolbar button{padding:1.5875mm 2.116667mm;min-width:8.466667mm;white-space:nowrap}.guide-toggle{white-space:nowrap;flex-shrink:0}.toolbar-divider{margin-inline:1.058333mm}#canvas-stage{margin-block:0!important}}

html[data-theme] .spine-footer-button{width:100%;min-height:11.641667mm;margin-top:3.704167mm;padding:2.645833mm 3.175mm;border:0.264583mm solid var(--ui-line);border-radius:2.645833mm;background:var(--ui-active);color:var(--ui-accent);font-size:3.704167mm}

@media(max-width:179.916667mm){
 .editor-layout{display:flex;flex-direction:column;height:auto;min-height:0}
 .workspace{order:1;width:100%;height:calc(100dvh - 40.745833mm);min-height:105.833333mm;max-height:none;overflow:hidden;padding:2.645833mm 2.645833mm 2.116667mm}
 .setup-panel{order:2;width:100%;height:auto;overflow:visible}
 .workspace-toolbar{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:1.5875mm;width:100%;min-width:0;min-height:0}
 .history-buttons{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;width:100%;max-width:100%;min-width:0;gap:0.79375mm}
 .zoom-buttons{display:flex;flex:0 1 auto;justify-content:flex-end;width:100%;max-width:100%;min-width:0;gap:1.058333mm}
 .history-buttons #grid-step{width:19.05mm!important;min-width:19.05mm;max-width:19.05mm;flex:0 0 19.05mm;align-self:flex-start}
 .workspace-toolbar button{min-width:10.583333mm;min-height:10.583333mm;padding:1.5875mm;white-space:nowrap}
 .workspace-toolbar .toolbar-divider{margin-inline:0.529167mm}
 .canvas-scroll{width:100%;min-width:0;min-height:47.625mm;padding:2.116667mm 0.529167mm 3.175mm}
 .canvas-stage{max-width:100%;flex-shrink:0}
 .panel-section{max-height:min(55dvh,111.125mm)}
 .panel-section.selection-section{max-height:min(60dvh,127mm)}
}
