:root {
  --brand: #0f766e;
  --brand-dark: #0b5f59;
  --navy: #10233f;
  --ink: #172033;
  --muted: #667085;
  --line: #dce3ea;
  --soft: #f4f7fa;
  --paper: #ffffff;
  --warm: #fbfaf7;
  --warning: #b54708;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(16, 35, 63, .14);
  --small-shadow: 0 6px 18px rgba(16, 35, 63, .08);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #eef2f6; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button, select, input[type="color"], input[type="range"] { cursor: pointer; }
a { color: #146c82; text-underline-offset: 3px; }
img { max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #f7c948; outline-offset: 2px; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 9999; padding: 11px 15px; border-radius: 9px; background: #fff; color: var(--ink); box-shadow: var(--shadow); font-weight: 800; }
.skip-link:focus { top: 14px; }
.eyebrow { margin: 0 0 4px; color: var(--brand); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }

.studio-header { position: sticky; top: 0; z-index: 100; min-height: 72px; display: grid; grid-template-columns: 210px minmax(200px, 1fr) auto auto; align-items: center; gap: 20px; padding: 12px 18px; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.studio-brand { display: inline-flex; align-items: center; }
.studio-brand img { width: 190px; height: auto; display: block; }
.project-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.project-identity input { width: min(280px, 48vw); border: 0; border-bottom: 1px solid transparent; padding: 8px 6px; color: var(--ink); background: transparent; font-weight: 750; }
.project-identity input:hover, .project-identity input:focus { border-color: #aab8c5; }
.save-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.save-state i, .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 3px rgba(18, 183, 106, .12); }
.save-state.is-saving i { background: #f79009; box-shadow: 0 0 0 3px rgba(247, 144, 9, .13); }
.header-links { display: flex; align-items: center; gap: 14px; }
.header-links a { color: #475467; font-size: .83rem; font-weight: 700; text-decoration: none; }
.header-links a:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.button, .icon-button, .zoom-value, .text-button { border: 0; background: none; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 10px; color: var(--ink); font-weight: 800; white-space: nowrap; }
.button-primary { color: #fff; background: linear-gradient(135deg, #0f766e, #0b5f59); box-shadow: 0 6px 16px rgba(15, 118, 110, .22); }
.button-primary:hover { background: linear-gradient(135deg, #0d6b64, #084f4a); }
.button-secondary { background: #fff; border: 1px solid #cdd6df; }
.button-secondary:hover, .button-ghost:hover { background: var(--soft); }
.button-small { min-height: 34px; padding: 6px 10px; font-size: .78rem; background: #fff; border: 1px solid #cbd5df; }
.button-block { width: 100%; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: #475467; }
.icon-button:hover { background: var(--soft); color: var(--ink); }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.text-button { padding: 4px 0; color: var(--brand); font-size: .8rem; font-weight: 800; }
.text-button:hover { text-decoration: underline; }
.text-button.danger { color: var(--danger); }

.studio-shell { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 250px minmax(480px, 1fr) 330px; background: #e9eef4; border-bottom: 1px solid var(--line); }
.template-sidebar, .inspector { min-width: 0; background: #fff; }
.template-sidebar { border-right: 1px solid var(--line); padding: 18px 14px; overflow: auto; max-height: calc(100vh - 72px); position: sticky; top: 72px; }
.inspector { border-left: 1px solid var(--line); max-height: calc(100vh - 72px); position: sticky; top: 72px; overflow: hidden; }
.sidebar-heading, .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sidebar-heading h1, .panel-heading h2 { margin: 0; color: var(--ink); font-size: 1.08rem; line-height: 1.2; }
.count-badge { min-width: 30px; height: 26px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 999px; color: #0b5f59; background: #e7f6f4; font-size: .72rem; font-weight: 850; }
.search-field { height: 40px; display: flex; align-items: center; gap: 8px; margin: 15px 0 12px; padding: 0 11px; border: 1px solid #cfd8e2; border-radius: 10px; background: #fbfcfd; color: #667085; }
.search-field svg { width: 18px; flex: 0 0 auto; }
.search-field input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .84rem; }
.filter-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: thin; }
.filter-scroll button { border: 1px solid #d7dfe7; border-radius: 999px; padding: 6px 9px; color: #566576; background: #fff; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.filter-scroll button.is-active { color: #fff; background: var(--navy); border-color: var(--navy); }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.template-card { padding: 6px; border: 1px solid #d7dfe7; border-radius: 11px; background: #fff; color: var(--ink); text-align: left; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.template-card:hover { transform: translateY(-1px); border-color: #8fa2b5; box-shadow: var(--small-shadow); }
.template-card.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(15, 118, 110, .15); }
.template-card canvas { display: block; width: 100%; aspect-ratio: 1 / 1.414; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px #edf1f4; }
.template-card strong { display: block; margin: 6px 2px 0; font-size: .72rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-card small { display: block; margin: 2px; color: var(--muted); font-size: .62rem; }
.template-empty { grid-column: 1 / -1; padding: 28px 10px; color: var(--muted); text-align: center; font-size: .84rem; }

.canvas-workspace { min-width: 0; min-height: calc(100vh - 72px); display: grid; grid-template-rows: auto 1fr auto; }
.canvas-toolbar { min-height: 54px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 8px 16px; background: #f9fbfc; border-bottom: 1px solid var(--line); }
.toolbar-group { display: flex; align-items: center; gap: 8px; min-width: 0; }
.toolbar-group > label:not(.toolbar-check) { color: var(--muted); font-size: .72rem; font-weight: 750; }
.toolbar-group select { height: 34px; border: 1px solid #ccd6e0; border-radius: 8px; padding: 0 28px 0 9px; background: #fff; color: var(--ink); font-size: .76rem; font-weight: 700; }
.toolbar-end { justify-content: flex-end; }
.toolbar-title { min-width: 150px; text-align: center; }
.toolbar-title strong, .toolbar-title span { display: block; }
.toolbar-title strong { font-size: .8rem; }
.toolbar-title span { color: var(--muted); font-size: .68rem; }
.toolbar-check { display: inline-flex; align-items: center; gap: 6px; color: #566576; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.toolbar-check input { width: 15px; height: 15px; accent-color: var(--brand); }
.zoom-value { min-width: 48px; height: 32px; padding: 0 7px; border-radius: 7px; color: #475467; background: #fff; border: 1px solid #d5dee7; font-size: .72rem; font-weight: 800; }
.canvas-stage { min-height: 640px; display: flex; align-items: flex-start; justify-content: center; padding: 30px; overflow: auto; background: radial-gradient(circle at 50% 12%, #f8fafc 0, #e9eef4 52%, #e4eaf0 100%); }
.canvas-paper { position: relative; flex: 0 0 auto; background: #fff; box-shadow: 0 20px 48px rgba(16, 35, 63, .19), 0 0 0 1px rgba(16, 35, 63, .05); transform-origin: top center; transition: width .16s ease, height .16s ease; }
.canvas-paper canvas { display: block; width: 100%; height: 100%; }
.canvas-paper::after { content: ""; position: absolute; inset: 5.5%; border: 1px dashed rgba(15, 118, 110, .42); pointer-events: none; opacity: 0; }
.canvas-paper.show-safe-area::after { opacity: 1; }
.workspace-status { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 14px; color: var(--muted); background: #f9fbfc; border-top: 1px solid var(--line); font-size: .68rem; }
.workspace-status span { display: inline-flex; align-items: center; gap: 7px; }

.inspector-tabs { height: 58px; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.inspector-tabs button { position: relative; display: grid; place-items: center; align-content: center; gap: 2px; border: 0; color: #667085; background: #fff; font-size: .68rem; font-weight: 750; }
.inspector-tabs button svg { width: 19px; height: 19px; }
.inspector-tabs button::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 2px; border-radius: 2px; background: transparent; }
.inspector-tabs button.is-active { color: var(--brand); }
.inspector-tabs button.is-active::after { background: var(--brand); }
.inspector-body { height: calc(100vh - 130px); overflow: auto; }
.inspector-panel { padding: 18px 16px 28px; }
.form-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e7ecf1; }
.form-section > h3 { margin: 0 0 11px; color: #344054; font-size: .79rem; }
.field { display: grid; gap: 5px; margin: 0 0 11px; min-width: 0; }
.field > span { display: flex; justify-content: space-between; gap: 8px; color: #475467; font-size: .7rem; font-weight: 750; }
.field > span b { color: var(--brand); }
.field input:not([type="color"]):not([type="range"]), .field textarea, .field select { width: 100%; border: 1px solid #cfd8e2; border-radius: 8px; padding: 9px 10px; color: var(--ink); background: #fff; font-size: .79rem; }
.field textarea { resize: vertical; line-height: 1.45; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #9fb0c0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.color-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color-fields input[type="color"] { width: 100%; height: 40px; padding: 3px; border: 1px solid #cfd8e2; border-radius: 8px; background: #fff; }
.range-field input[type="range"] { width: 100%; accent-color: var(--brand); }
.upload-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px; border: 1px dashed #b9c7d4; border-radius: 10px; background: #f9fbfc; }
.upload-row .danger { grid-column: 3; }
.upload-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: #e7f6f4; }
.upload-row strong, .upload-row small { display: block; }
.upload-row strong { font-size: .75rem; }
.upload-row small { color: var(--muted); font-size: .63rem; }
.switch-row { min-height: 49px; display: grid; grid-template-columns: 1fr 38px; align-items: center; gap: 12px; padding: 7px 0; color: #344054; }
.switch-row span strong, .switch-row span small { display: block; }
.switch-row span strong { font-size: .75rem; }
.switch-row span small { color: var(--muted); font-size: .65rem; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; width: 36px; height: 21px; border-radius: 999px; background: #c7d0d9; transition: background .16s ease; }
.switch-row i::after { content: ""; position: absolute; width: 17px; height: 17px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .16s ease; }
.switch-row input:checked + i { background: var(--brand); }
.switch-row input:checked + i::after { transform: translateX(15px); }
.format-help { margin-top: 16px; padding: 13px; border-radius: 10px; color: #475467; background: #f4f8fb; border-left: 4px solid #3b82a0; }
.format-help strong { display: block; color: var(--ink); font-size: .76rem; }
.format-help p { margin: 4px 0 0; font-size: .7rem; }

.guide-content { max-width: 1180px; margin: 0 auto; padding: 60px 28px 44px; background: #fff; }
.breadcrumbs { margin-bottom: 24px; color: var(--muted); font-size: .82rem; }
.breadcrumbs a { text-decoration: none; }
.guide-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: center; padding: 34px; border: 1px solid #dfe7ec; border-radius: 24px; background: linear-gradient(135deg, #f5fbfa, #f7fafc 55%, #fffaf0); }
.guide-hero h2 { max-width: 820px; margin: 4px 0 12px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.9rem, 3.8vw, 3.15rem); line-height: 1.08; letter-spacing: -.025em; }
.guide-hero p { max-width: 860px; margin: 0; color: #4f6070; font-size: 1.03rem; }
.guide-facts { display: grid; gap: 10px; }
.guide-facts span { padding: 15px 17px; border: 1px solid #dbe5e7; border-radius: 13px; color: #516170; background: rgba(255, 255, 255, .86); font-size: .82rem; }
.guide-facts strong { display: block; color: var(--brand-dark); font-size: 1.3rem; }
.answer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 56px; }
.answer-grid article { position: relative; padding: 23px; border: 1px solid #e0e7ed; border-radius: 16px; background: #fff; box-shadow: var(--small-shadow); }
.answer-grid article > span { display: inline-grid; place-items: center; width: 31px; height: 31px; margin-bottom: 9px; border-radius: 9px; color: #0b5f59; background: #e7f6f4; font-size: .72rem; font-weight: 850; }
.answer-grid h3 { margin: 0 0 7px; color: var(--navy); font-size: 1.02rem; }
.answer-grid p { margin: 0; color: #5d6c7a; font-size: .9rem; }
.guide-section { margin: 56px 0; scroll-margin-top: 90px; }
.guide-section h2, .responsible-note h2 { margin: 0 0 13px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 2.5vw, 2.25rem); line-height: 1.2; }
.guide-section h3 { color: var(--navy); }
.guide-section p, .guide-section li, .responsible-note p { color: #4c5e6e; font-size: 1rem; }
.step-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0 0; padding: 0; }
.step-grid li { display: flex; gap: 12px; padding: 18px; border-radius: 14px; background: #f6f8fa; }
.step-grid li > span { flex: 0 0 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-weight: 850; }
.step-grid h3 { margin: 3px 0 5px; font-size: .94rem; }
.step-grid p { margin: 0; font-size: .84rem; }
.split-guide { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .7fr); gap: 34px; align-items: center; }
.split-guide.reverse { grid-template-columns: minmax(270px, .7fr) minmax(0, 1.5fr); }
.research-note, .privacy-card { padding: 24px; border-radius: 17px; }
.research-note { color: #633400; background: #fff8e8; border: 1px solid #f1d49e; }
.research-note strong, .privacy-card strong { display: block; margin-bottom: 8px; font-size: 1.02rem; }
.research-note p { margin: 0; color: #6d4b20; font-size: .91rem; }
.privacy-card { color: #d9f6f1; background: linear-gradient(145deg, #123c44, #0f5c5a); box-shadow: var(--small-shadow); }
.privacy-card ul { margin: 0; padding-left: 19px; }
.privacy-card li { margin: 7px 0; color: #d9f6f1; font-size: .86rem; }
.check-list { padding-left: 20px; }
.check-list li { margin: 8px 0; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid #dce4ea; border-radius: 14px; }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 650px; }
.table-wrap th, .table-wrap td { padding: 13px 15px; border-bottom: 1px solid #e4e9ee; text-align: left; }
.table-wrap thead th { color: #fff; background: var(--navy); }
.table-wrap tbody th { color: var(--navy); background: #f6f8fa; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 20px; }
.check-grid div { padding: 19px; border: 1px solid #dfe6ec; border-radius: 13px; background: #fbfcfd; }
.check-grid strong, .check-grid span { display: block; }
.check-grid strong { color: var(--navy); }
.check-grid span { margin-top: 5px; color: #596a79; font-size: .88rem; }
.faq-list { display: grid; gap: 10px; margin-top: 18px; }
.faq-list details { border: 1px solid #dce4ea; border-radius: 12px; background: #fff; }
.faq-list summary { padding: 15px 18px; color: var(--navy); font-weight: 800; cursor: pointer; }
.faq-list details p { margin: 0; padding: 0 18px 17px; font-size: .92rem; }
.responsible-note { margin: 54px 0; padding: 26px 28px; border-left: 5px solid var(--brand); border-radius: 13px; background: #f0f8f7; }
.responsible-note h2 { font-size: 1.45rem; }
.responsible-note p { margin: 0; }
.related-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 42px; padding: 20px; border: 1px solid #dfe6ec; border-radius: 15px; background: #f8fafb; }
.related-links strong { margin-right: 5px; color: var(--navy); }
.related-links a { padding: 7px 10px; border-radius: 8px; color: #285469; background: #fff; border: 1px solid #dfe6ec; font-size: .84rem; font-weight: 750; text-decoration: none; }
.tool-ad-container { width: 100%; max-width: 970px; min-height: 290px; display: grid; align-content: start; margin: 58px auto 12px; padding-top: 16px; border-top: 1px solid #e2e8ed; text-align: center; overflow: hidden; overflow-anchor: none; }
.ad-label { display: block; margin-bottom: 6px; color: #7b8794; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; }
.tool-site-ad { display: block; min-height: 250px; }

.studio-footer { padding: 26px 24px; color: #dce7ea; background: #102d35; text-align: center; }
.studio-footer a { color: #fff; text-decoration: none; }
.studio-footer a:hover { color: #f7c948; }
.studio-footer p { margin: 8px 0 0; color: #b8c8cd; font-size: .78rem; }

.studio-dialog { width: min(720px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 28px 80px rgba(16, 35, 63, .28); overflow: auto; }
.studio-dialog::backdrop { background: rgba(12, 25, 43, .64); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 1.22rem; }
.dialog-header p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 22px 20px; border-top: 1px solid var(--line); }
.preview-dialog { width: min(780px, calc(100vw - 28px)); }
.preview-stage { max-height: 68vh; display: grid; place-items: center; padding: 22px; overflow: auto; background: #e9eef3; }
.preview-stage canvas { width: min(480px, 100%); height: auto; display: block; background: #fff; box-shadow: var(--shadow); }
.export-options { display: grid; gap: 9px; padding: 18px 22px 10px; }
.export-option { display: grid; grid-template-columns: auto 50px 1fr; align-items: center; gap: 11px; padding: 13px; border: 1px solid #d8e0e7; border-radius: 11px; background: #fff; cursor: pointer; }
.export-option:has(input:checked), .export-option.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(15, 118, 110, .12); }
.export-option input { accent-color: var(--brand); }
.format-icon { width: 48px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: #d23f31; font-size: .73rem; font-weight: 900; }
.format-png { background: #315aa8; }
.format-header { background: #0f766e; font-size: .62rem; }
.export-option strong, .export-option small { display: block; }
.export-option strong { font-size: .82rem; }
.export-option small { color: var(--muted); font-size: .68rem; }
.export-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 22px; }
.export-note { margin: 0 22px 14px; padding: 11px 12px; color: #6f4e1f; background: #fff8e8; border-radius: 9px; font-size: .72rem; }
.progress-dialog { width: min(400px, calc(100vw - 28px)); padding: 30px; text-align: center; }
.progress-ring { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 15px; border: 7px solid #dce9e7; border-top-color: var(--brand); border-radius: 50%; }
.progress-ring span { color: var(--brand-dark); font-weight: 850; }
.progress-dialog h2 { margin: 0 0 6px; font-size: 1.15rem; }
.progress-dialog p { margin: 0 0 16px; color: var(--muted); font-size: .8rem; }
.progress-bar { height: 7px; overflow: hidden; border-radius: 99px; background: #e9eef2; }
.progress-bar span { display: block; width: 0; height: 100%; background: var(--brand); transition: width .2s ease; }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 9999; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 360px; padding: 12px 15px; border-radius: 10px; color: #fff; background: #152b3d; box-shadow: var(--shadow); font-size: .8rem; animation: toast-in .2s ease; }
.toast.error { background: #8f251f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1260px) {
  .studio-header { grid-template-columns: 190px minmax(180px, 1fr) auto; }
  .header-links { display: none; }
  .studio-shell { grid-template-columns: 220px minmax(440px, 1fr) 305px; }
  .template-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1040px) {
  .studio-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .inspector { grid-column: 1 / -1; max-height: none; position: static; border-top: 1px solid var(--line); border-left: 0; }
  .inspector-body { height: auto; max-height: 680px; }
  .inspector-panel { max-width: 760px; margin: 0 auto; }
  .canvas-stage { min-height: 620px; }
}

@media (max-width: 760px) {
  .studio-header { min-height: 64px; grid-template-columns: 152px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
  .studio-brand img { width: 150px; }
  .project-identity { display: none; }
  .header-actions { gap: 4px; }
  .desktop-action { display: none; }
  .header-actions .icon-button { width: 36px; height: 38px; }
  .button-primary { min-height: 40px; padding: 8px 12px; }
  .studio-shell { display: block; min-height: auto; }
  .template-sidebar, .inspector { position: static; max-height: none; border: 0; }
  .template-sidebar { padding: 15px 12px; }
  .template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .template-card:nth-of-type(n+7) { display: none; }
  .canvas-workspace { min-height: auto; }
  .canvas-toolbar { grid-template-columns: 1fr auto; gap: 8px; padding: 8px 10px; }
  .toolbar-title { display: none; }
  .toolbar-end .toolbar-check { display: none; }
  .canvas-stage { min-height: 520px; padding: 20px 12px; }
  .workspace-status { font-size: .62rem; }
  .workspace-status span:last-child { display: none; }
  .guide-content { padding: 42px 17px 32px; }
  .guide-hero { grid-template-columns: 1fr; gap: 22px; padding: 24px 20px; }
  .guide-facts { grid-template-columns: repeat(3, 1fr); }
  .guide-facts span { padding: 11px; }
  .guide-facts strong { font-size: 1rem; }
  .answer-grid, .step-grid, .check-grid { grid-template-columns: 1fr; }
  .split-guide, .split-guide.reverse { grid-template-columns: 1fr; }
  .privacy-card { order: 2; }
  .guide-section { margin: 42px 0; }
  .tool-ad-container { min-height: 150px; margin-top: 44px; }
  .tool-site-ad { min-height: 100px; }
  .export-settings { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .canvas-toolbar { display: flex; justify-content: space-between; }
  .toolbar-group:first-child .toolbar-check { display: none; }
  .toolbar-end .icon-button:first-child, .toolbar-end .icon-button:nth-of-type(3) { display: none; }
  .canvas-stage { min-height: 440px; }
  .field-row, .color-fields { grid-template-columns: 1fr; }
  .guide-facts { grid-template-columns: 1fr; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions .button { flex: 1; }
  .export-option { grid-template-columns: auto 42px 1fr; padding: 10px; }
  .format-icon { width: 40px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .studio-header, .template-sidebar, .inspector, .canvas-toolbar, .workspace-status, .guide-content, .studio-footer, .toast-region { display: none !important; }
  body, .studio-shell, .canvas-workspace, .canvas-stage { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .canvas-paper { width: 100% !important; height: auto !important; box-shadow: none !important; }
}
