:root {
  --page: #e8f1e8;
  --paper: #f8fbf5;
  --paper-strong: #ffffff;
  --ink: #24352d;
  --muted: #708178;
  --line: #cbd9ce;
  --line-strong: #a9c0ad;
  --accent: #197d78;
  --accent-2: #d96961;
  --accent-soft: #d4ebe1;
  --shadow: 0 24px 70px rgba(49, 84, 66, .14);
  --radius: 18px;
  --sans: ui-rounded, "Avenir Next", -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--page); color: var(--ink); font-family: var(--sans); letter-spacing: 0; }
body { background: radial-gradient(circle at 5% 0%, rgba(255,255,255,.86), transparent 34rem), linear-gradient(135deg, #eff7ed 0%, #e5f0e8 52%, #d9e8df 100%); }
button, input { font: inherit; }
button { border: 0; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(217,105,97,.42); outline-offset: 2px; }

.app-shell { width: min(1480px, 100%); min-height: 100vh; margin: 0 auto; padding: 22px 28px 28px; }
.topbar { position: sticky; top: 0; z-index: 40; min-height: 68px; display: grid; grid-template-columns: 190px 1fr 220px; align-items: center; gap: 24px; margin: -22px -28px 20px; padding: 12px 28px; border-bottom: 1px solid rgba(169,192,173,.48); background: rgba(232,241,232,.94); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand strong { display: block; font-size: 15px; line-height: 1.05; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .14em; }
.brand-mark { width: 36px; height: 36px; display: flex; align-items: end; justify-content: center; gap: 3px; padding: 7px; border: 1px solid #a9c4ae; border-radius: 12px 12px 12px 4px; background: #f9fcf7; box-shadow: 4px 4px 0 #c0d9c4; }
.brand-mark i { width: 5px; border-radius: 4px 4px 1px 1px; background: var(--accent); transform-origin: bottom; }
.brand-mark i:nth-child(1) { height: 12px; }.brand-mark i:nth-child(2) { height: 19px; background: var(--accent-2); }.brand-mark i:nth-child(3) { height: 9px; background: #e5c354; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 11px; }
.step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; background: transparent; color: var(--muted); text-align: left; }
.step b { font-family: var(--mono); font-size: 10px; font-weight: 500; }.step span { font-size: 12px; font-weight: 650; }
.step.is-active { color: var(--ink); }.step.is-active b { color: var(--accent); }.step.is-done b { color: var(--accent-2); }
.step-line { width: 30px; height: 1px; background: var(--line); }
.top-actions { position: relative; display: flex; align-items: center; justify-content: end; gap: 8px; }
.icon-btn, .more-btn { height: 38px; border: 1px solid var(--line); border-radius: 11px; background: rgba(249,252,247,.74); color: var(--muted); }
.icon-btn { width: 38px; font-size: 22px; line-height: 1; }.icon-btn:disabled { opacity: .35; cursor: default; }.icon-btn:not(:disabled):hover { background: var(--paper-strong); color: var(--ink); }
.more-btn { padding: 0 12px; font-size: 12px; font-weight: 700; }.more-btn span { margin-left: 6px; color: var(--accent); }
.more-menu { position: absolute; z-index: 50; top: 45px; right: 0; min-width: 160px; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.97); box-shadow: var(--shadow); }.more-menu button { width: 100%; padding: 10px; border-radius: 9px; background: transparent; text-align: left; font-size: 12px; }.more-menu button:hover { background: var(--accent-soft); }
.topbar { grid-template-columns: 1fr auto; }
.export-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 11px; background: var(--accent); color: #fff; box-shadow: 0 7px 18px rgba(25,125,120,.2); }
.export-btn span { font-size: 17px; line-height: 1; }.export-btn b { font-size: 12px; }.export-btn:hover { background: #126b67; }

.studio { display: grid; grid-template-columns: minmax(278px, 330px) minmax(430px, 1fr) minmax(190px, 230px); gap: 22px; align-items: start; }
.sidebar { min-height: calc(100vh - 120px); border: 1px solid rgba(169,192,173,.65); border-radius: 22px; background: rgba(248,251,245,.75); box-shadow: 0 10px 35px rgba(49,84,66,.07); }
.left-sidebar { padding: 25px 20px 18px; display: flex; flex-direction: column; overflow: hidden; }.right-sidebar { padding: 16px; min-height: 0; background: transparent; border: 0; box-shadow: none; }
.panel-scroll { flex: 1; min-height: 0; overflow: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.tool-section { margin: 0 0 24px; }.tool-section.hidden { display: none; }.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 11px; font-size: 12px; font-weight: 800; }.section-heading small { color: var(--muted); font-size: 10px; font-weight: 500; }
.base-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }.base-option { aspect-ratio: 1; padding: 5px; border: 1px solid #c8d4de; border-radius: 13px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }.base-option:hover { border-color: #4ab6d3; transform: translateY(-2px); }.base-option.is-active { border: 3px solid #39afd0; padding: 3px; background: #fff; box-shadow: 0 0 0 3px rgba(57,175,208,.18); }.base-option canvas { display: block; width: 100%; height: 100%; border-radius: 8px; }
.segmented { display: grid; gap: 0; padding: 2px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: rgba(231,240,233,.72); }.segmented.two { grid-template-columns: repeat(2, 1fr); }.segmented.three { grid-template-columns: repeat(3, 1fr); }.segmented.four { grid-template-columns: repeat(4, 1fr); }.segmented button, .filter-chip, .layer-buttons button { min-height: 34px; padding: 6px 5px; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }.segmented button + button { border-left: 1px solid rgba(169,192,173,.48); border-radius: 0 7px 7px 0; }.segmented button:first-child { border-radius: 7px 0 0 7px; }.segmented button.is-active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }.segmented button.is-active + button, .segmented button + button.is-active { border-left-color: transparent; }.segmented button:focus-visible { position: relative; z-index: 1; }
.fill-content { width: 100%; min-width: 0; max-width: 100%; margin-top: 15px; overflow-x: hidden; }.swatch-row { display: grid; grid-template-columns: repeat(6, 32px); justify-content: start; gap: 8px; margin-top: 10px; align-items: center; }.swatch { position: relative; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(35,53,45,.14); border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }.swatch:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.32), 0 4px 10px rgba(49,84,66,.14); }.swatch.is-active { outline: 2px solid var(--accent); outline-offset: 2px; }.swatch-custom { position: relative; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(35,53,45,.18); border-radius: 50%; outline: 2px solid rgba(25,125,120,.18); outline-offset: 2px; background: conic-gradient(from -90deg, #ff5959 0deg, #ffb13d 51deg, #ffe23f 102deg, #6dd174 153deg, #4dd0e1 204deg, #4f7dff 255deg, #b65dff 306deg, #ff5959 360deg); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, outline-color .18s ease; }.swatch-custom::before { content: ""; position: absolute; left: 50%; top: 50%; width: 56%; height: 56%; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(35,53,45,.12); }.swatch-custom::after { content: "+"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--sans); font-weight: 800; font-size: 14px; line-height: 1; color: var(--ink); text-shadow: 0 1px 2px rgba(255,255,255,.8); pointer-events: none; }.swatch-custom:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(49,84,66,.16); outline-color: rgba(25,125,120,.42); }.swatch-custom.is-active { outline-color: var(--accent); }.control-row { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 5px; color: var(--muted); font-size: 11px; }.control-row output { color: var(--ink); font-family: var(--mono); font-size: 10px; }
.inline-color-picker { width: min(100%, 320px); margin: 10px 0 2px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--paper-strong); box-shadow: 0 8px 24px rgba(49,84,66,.12); }.inline-color-picker[hidden] { display: none; }.inline-color-surface { position: relative; height: 142px; overflow: hidden; border-radius: 8px; background: linear-gradient(to bottom, transparent, #000), linear-gradient(to right, #fff, transparent), hsl(var(--picker-hue) 100% 50%); cursor: crosshair; touch-action: none; }.inline-color-cursor { position: absolute; width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(20,30,25,.75), 0 2px 5px rgba(20,30,25,.3); transform: translate(-50%, -50%); pointer-events: none; }.inline-color-hue { width: 100%; height: 22px; margin: 9px 0 7px; appearance: none; background: transparent; }.inline-color-hue::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(to right, #f33, #ff0, #0f0, #0ff, #33f, #f0f, #f33); }.inline-color-hue::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -5px; appearance: none; border: 2px solid #fff; border-radius: 50%; background: hsl(var(--picker-hue) 100% 50%); box-shadow: 0 0 0 1px rgba(35,53,45,.32); }.inline-color-hue::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(to right, #f33, #ff0, #0f0, #0ff, #33f, #f0f, #f33); }.inline-color-hue::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; background: hsl(var(--picker-hue) 100% 50%); box-shadow: 0 0 0 1px rgba(35,53,45,.32); }.inline-color-footer { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 7px; align-items: center; }.inline-color-preview { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; }.inline-color-hex { min-width: 0; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }.inline-color-done { min-height: 32px; padding: 0 11px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; }
input[type=range] { display: block; width: 100%; min-width: 0; max-width: 100%; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.pattern-control-label { margin-top: 16px; }.pattern-control-label:first-child { margin-top: 0; }.pattern-choice { margin-bottom: 2px; }.pattern-shape-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }.pattern-shape-option { min-width: 0; min-height: 54px; display: grid; place-items: center; padding: 5px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }.pattern-shape-option.is-active { border: 2px solid var(--accent); padding: 4px 3px; box-shadow: 0 0 0 3px var(--accent-soft); }.pattern-shape-thumb { display: block; width: 36px; height: 36px; margin: 0 auto; }.pattern-shape-option small { display: none; }.pattern-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }.pattern-colors .control-row { margin: 0 0 7px; }.pattern-colors .swatch-row { grid-template-columns: repeat(3, 28px); gap: 7px; margin-top: 0; }.pattern-colors .swatch, .pattern-colors .swatch-custom { width: 28px; height: 28px; }.asset-grid { width: 100%; min-width: 0; max-width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; overflow-x: hidden; }.asset-option { width: 100%; min-width: 0; max-width: 100%; aspect-ratio: 1; overflow: hidden; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }.asset-option.is-active { border: 2px solid var(--accent); padding: 2px; box-shadow: 0 0 0 3px var(--accent-soft); }.asset-thumb { position: relative; display: block; width: 100%; min-width: 0; height: 100%; min-height: 0; overflow: hidden; border-radius: 6px; }.asset-thumb > img, .asset-thumb > i { position: absolute; inset: 0; display: block; width: 100%; min-width: 0; max-width: 100%; height: 100%; min-height: 0; max-height: 100%; object-fit: cover; }.asset-thumb span { position: absolute; left: 5px; right: 5px; bottom: 4px; overflow: hidden; color: #fff; font-size: 8px; font-weight: 800; text-align: left; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.55); }
.asset-browser { position: relative; width: 100%; min-width: 0; }.asset-browser.is-loading .asset-grid { visibility: hidden; }.asset-load-status { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 112px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(248,251,245,.98); color: var(--muted); text-align: center; }.asset-load-status[hidden] { display: none; }.asset-load-spinner { width: 22px; height: 22px; margin-bottom: 9px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: asset-spin .8s linear infinite; }.asset-load-status strong { color: var(--ink); font-size: 11px; }.asset-load-status small { margin-top: 3px; font-family: var(--mono); font-size: 9px; }.asset-load-status progress { width: min(100%, 180px); height: 4px; margin-top: 11px; overflow: hidden; border: 0; border-radius: 99px; background: var(--line); appearance: none; }.asset-load-status progress::-webkit-progress-bar { border-radius: 99px; background: var(--line); }.asset-load-status progress::-webkit-progress-value { border-radius: 99px; background: var(--accent); }.asset-load-status progress::-moz-progress-bar { border-radius: 99px; background: var(--accent); }.asset-load-status button { min-height: 32px; margin-top: 11px; padding: 0 18px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; }.asset-load-status button[hidden] { display: none; }.asset-browser.is-error .asset-load-spinner { display: none; }@keyframes asset-spin { to { transform: rotate(360deg); } }
.upload-wide { width: 100%; min-height: 42px; margin-top: 11px; border: 1px dashed var(--line-strong); border-radius: 11px; background: rgba(255,255,255,.45); color: var(--accent); font-size: 11px; font-weight: 800; }.upload-wide span { font-size: 18px; vertical-align: -1px; margin-right: 4px; }.upload-wide:hover { background: #fff; border-color: var(--accent); }
.sticker-heading { align-items: center; }.sticker-heading > span { flex: 0 0 auto; }.sticker-heading small { margin-right: auto; }.section-action { display: inline-flex; align-items: center; gap: 3px; min-height: 28px; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-strong); color: var(--accent); font-size: 10px; font-weight: 800; white-space: nowrap; }.section-action span { font-size: 14px; line-height: 1; }.section-action:hover { border-color: var(--accent); background: var(--accent-soft); }
.field-note { margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }.mini-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; margin-top: 10px; }.mini-actions button { min-height: 33px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); font-size: 10px; font-weight: 750; }.mini-actions button:last-child { color: var(--accent-2); }
.filter-row { display: flex; gap: 5px; overflow: auto; padding: 2px 0 9px; scrollbar-width: none; }.filter-row::-webkit-scrollbar { display:none; }.filter-chip { flex: 0 0 auto; min-height: 29px; padding-inline: 10px; border: 1px solid var(--line); }.sticker-grid { --sticker-row-size: 66px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: var(--sticker-row-size); align-content: start; gap: 7px; max-height: calc(var(--sticker-row-size) + var(--sticker-row-size) + 7px); padding-right: 2px; overflow-y: auto; overscroll-behavior: contain; }.sticker-option { min-width: 0; height: 100%; aspect-ratio: auto; display: grid; place-items: center; overflow: hidden; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 26px; }.sticker-option:hover { transform: translateY(-1px); border-color: var(--accent-2); }.sticker-option small { display: block; max-width: 100%; overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }.sticker-mask-thumb, .sticker-image-thumb { width: 68%; aspect-ratio: 1; }.sticker-mask-thumb { background: #8a919f; -webkit-mask: var(--sticker-mask) center / contain no-repeat; mask: var(--sticker-mask) center / contain no-repeat; }.sticker-image-thumb { display: block; object-fit: contain; }
.decoration-color-control { margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--line); }.decoration-color-control[hidden] { display: none; }
.color-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 8px; align-items: center; }.color-field { min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.section-heading-actions { display: inline-flex; align-items: center; gap: 12px; }.text-btn { padding: 2px 0; background: transparent; color: var(--accent-2); font-size: 10px; font-weight: 800; }.collapse-controls-btn { color: var(--accent); }.layer-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 13px; padding: 4px; border-radius: 12px; background: #e4eee6; }.layer-buttons button { border: 1px solid transparent; }.layer-buttons button.is-active { border-color: var(--line); }
.flip-button { width: 100%; min-height: 36px; margin-top: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-strong); color: var(--accent); font-size: 11px; font-weight: 800; cursor: pointer; transition: background .18s ease, border-color .18s ease; }.flip-button:hover, .flip-button.is-active { border-color: var(--accent); background: #e8f1ea; }
.note-card { display: flex; gap: 9px; padding: 13px; border: 1px solid #e8d99b; border-radius: 13px; background: #fff7d8; color: #655936; }.note-icon { color: #d19b21; }.note-card p { margin: 0; font-size: 10px; line-height: 1.55; }.export-card { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }.export-stamp { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--accent-2); border-radius: 50%; color: var(--accent-2); font-family: var(--mono); font-size: 11px; font-weight: 800; line-height: .85; text-align: center; transform: rotate(-9deg); }.export-stamp small { font-size: 7px; letter-spacing: .12em; }.export-card strong { font-size: 11px; }.export-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }.preview-button { width: 100%; min-height: 42px; margin-top: 11px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; }.preview-button span { margin-right: 5px; }

.canvas-column { position: sticky; top: 92px; z-index: 20; min-width: 0; align-self: start; display: flex; flex-direction: column; align-items: center; padding: 16px 0 12px; }.canvas-toolbar, .canvas-caption { width: min(100%, 620px); display: flex; justify-content: space-between; align-items: center; padding: 0 6px; color: var(--muted); font-family: var(--mono); font-size: 10px; }.canvas-status { display: inline-flex; align-items: center; gap: 6px; }.canvas-status i { width: 7px; height: 7px; border-radius: 50%; background: #65a56d; box-shadow: 0 0 0 4px rgba(101,165,109,.15); }.canvas-frame { position: relative; width: min(100%, 620px); margin: 13px 0 10px; padding: 13px; border: 1px solid rgba(144,174,151,.62); border-radius: 22px; background: rgba(248,251,245,.92); box-shadow: var(--shadow); }.canvas-frame::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255,255,255,.88); border-radius: 17px; pointer-events: none; }.canvas-frame canvas { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 13px; background: #fff; touch-action: none; }.canvas-caption { padding-bottom: 7px; }.canvas-caption span:last-child { color: var(--accent); }.mobile-actions { display: flex; gap: 8px; width: min(100%, 620px); margin-top: auto; padding: 16px 6px 0; }.secondary-btn, .primary-btn, .danger-btn { min-height: 45px; padding: 0 18px; border-radius: 12px; font-size: 12px; font-weight: 800; }.secondary-btn { border: 1px solid var(--line-strong); background: rgba(255,255,255,.72); color: var(--ink); }.secondary-btn:disabled { opacity: .4; cursor: default; }.primary-btn { flex: 1; background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(25,125,120,.2); }.primary-btn:hover { background: #126b67; }.primary-btn span { margin-left: 12px; font-size: 18px; vertical-align: -1px; }.danger-btn { background: #b9554e; color: #fff; }.danger-btn:hover { background: #9f4640; }
.editor-tabs { position: sticky; z-index: 20; bottom: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; width: min(100%, 620px); margin-top: auto; padding: 5px; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(248,251,245,.9); box-shadow: 0 10px 28px rgba(49,84,66,.12); backdrop-filter: blur(16px); }
.editor-tab { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; background: transparent; color: var(--muted); }
.editor-tab span { width: 20px; font-size: 18px; line-height: 1; text-align: center; }.editor-tab b { font-size: 12px; }.editor-tab.is-active { background: var(--accent); color: #fff; box-shadow: 0 5px 14px rgba(25,125,120,.22); }
.progress-card, .tips-card, .privacy-card { margin-bottom: 14px; padding: 15px; border: 1px solid rgba(169,192,173,.72); border-radius: 15px; background: rgba(248,251,245,.72); }.progress-card .section-heading { margin-bottom: 9px; }.progress-card strong { color: var(--accent); font-family: var(--mono); font-size: 11px; }.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #d9e6da; }.progress-track i { display: block; width: 25%; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }.progress-card p, .tips-card p, .privacy-card p { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }.tip-kicker { display: block; margin-bottom: 8px; color: var(--accent-2); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .13em; }.tips-card strong { display: block; font-size: 12px; }.privacy-card { display: flex; align-items: center; gap: 10px; }.privacy-card > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 18px; }.privacy-card p { margin-top: 3px; }.privacy-card strong { font-size: 11px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; transform: translate(-50%, 20px); max-width: min(90vw, 360px); padding: 11px 16px; border-radius: 99px; background: #24352d; color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 9px 30px rgba(36,53,45,.24); }.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.export-result { display: grid; grid-template-columns: 64px 1fr; gap: 11px; align-items: center; margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--accent-soft); }.export-result[hidden] { display:none; }.export-result img { width: 64px; height: 64px; border-radius: 9px; object-fit: cover; }.export-result strong { font-size: 11px; }.export-result p { margin: 3px 0 5px; color: var(--muted); font-size: 9px; }.save-link { color: var(--accent); font-size: 10px; font-weight: 800; text-decoration: none; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }.modal[hidden] { display: none; }.modal-backdrop { position: absolute; inset: 0; background: rgba(24,42,32,.58); backdrop-filter: blur(8px); }.preview-modal, .confirm-modal { position: relative; width: min(100%, 510px); padding: 20px; border: 1px solid rgba(255,255,255,.58); border-radius: 22px; background: #f8fbf5; box-shadow: 0 30px 90px rgba(15,35,25,.3); }.preview-modal header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 15px; }.preview-modal h2, .confirm-modal h2 { margin: 7px 0 0; font-size: 23px; }.close-btn { width: 35px; height: 35px; border-radius: 50%; background: #e3ede4; color: var(--muted); font-size: 23px; }.preview-art { width: min(100%, 390px); margin: 0 auto; padding: 9px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }.preview-art canvas { display: block; width: 100%; height: auto; border-radius: 9px; }.preview-actions { display: flex; gap: 9px; margin-top: 16px; }.preview-actions > * { flex: 1; }.confirm-modal { width: min(100%, 390px); text-align: center; padding: 30px 25px 24px; }.confirm-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; background: #f8e3df; color: var(--accent-2); font-size: 25px; }.confirm-modal p { margin: 10px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }

@media (max-width: 1080px) { .app-shell { padding-inline: 18px; }.studio { grid-template-columns: minmax(265px, 310px) minmax(390px, 1fr); }.right-sidebar { display: none; }.topbar { grid-template-columns: 1fr auto; gap: 12px; } }
@media (max-width: 720px) { body { background: var(--page); }.app-shell { min-height: 100svh; padding: max(12px, env(safe-area-inset-top)) 12px max(96px, env(safe-area-inset-bottom) + 80px); }.topbar { position: sticky; top: 0; z-index: 40; min-height: 58px; grid-template-columns: 1fr auto; gap: 10px; margin: calc(-1 * max(12px, env(safe-area-inset-top))) -12px 0; padding: max(12px, env(safe-area-inset-top)) 12px 7px; border-bottom: 1px solid rgba(169,192,173,.48); background: rgba(232,241,232,.9); backdrop-filter: blur(16px); }.brand { gap: 8px; }.brand-mark { width: 32px; height: 32px; padding: 6px; }.brand strong { font-size: 13px; }.brand small { font-size: 8px; }.stepper { grid-column: 1 / -1; grid-row: 2; order: 3; width: 100%; justify-content: space-between; gap: 3px; padding: 5px 1px 2px; }.step { flex: 1; justify-content: center; gap: 4px; padding: 6px 2px; }.step b { font-size: 9px; }.step span { font-size: 11px; }.step-line { flex: 0 0 15px; }.top-actions { justify-content: end; }.top-actions .icon-btn { display: none; }.more-btn { height: 35px; font-size: 11px; }.studio { display: flex; flex-direction: column; }.canvas-column { order: 1; position: sticky; top: 104px; z-index: 25; align-self: stretch; padding: 8px 4px 12px; background: rgba(232,241,232,.94); backdrop-filter: blur(16px); }.left-sidebar { order: 2; min-height: 0; margin-top: 14px; padding: 16px 14px 13px; border-radius: 18px; }.left-sidebar h1 { max-width: none; margin: 8px 0 4px; font-size: 21px; }.panel-copy { margin-bottom: 15px; font-size: 11px; }.canvas-toolbar, .canvas-caption { display: none; }.canvas-frame { width: min(100%, calc(100vw - 34px), 42svh); margin: 0 auto; padding: 7px; border-radius: 16px; }.canvas-frame::before { inset: 4px; border-radius: 12px; }.canvas-frame canvas { border-radius: 9px; }.mobile-actions { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; margin: 0; padding: 7px; border: 1px solid rgba(169,192,173,.75); border-radius: 16px; background: rgba(248,251,245,.9); box-shadow: 0 14px 35px rgba(49,84,66,.2); backdrop-filter: blur(16px); opacity: 0; transform: translateY(calc(100% + 24px)); pointer-events: none; transition: opacity .2s ease, transform .25s ease; }.mobile-actions.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }.secondary-btn, .primary-btn { min-height: 41px; }.left-sidebar { display: flex; }.panel-scroll { max-height: none; overflow: visible; }.tool-section { margin-bottom: 18px; }.base-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; overflow: visible; padding: 3px 2px 5px; }.base-option { min-width: 0; }.segmented button { min-height: 36px; }.right-sidebar { display: none; }.more-menu { top: 42px; }.preview-modal { padding: 15px; }.preview-modal h2 { font-size: 20px; }.modal { padding: 12px; } }
@media (max-width: 720px) { .export-btn { height: 35px; padding-inline: 10px; gap: 5px; }.export-btn span { font-size: 15px; }.export-btn b { font-size: 11px; }.editor-tabs { position: fixed; z-index: 36; left: 0; right: 0; bottom: 0; width: auto; margin: 0; padding: 5px 12px max(5px, env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: rgba(248,251,245,.97); box-shadow: 0 -8px 26px rgba(49,84,66,.18); backdrop-filter: blur(16px); }.editor-tab { min-height: 46px; }.toast { bottom: max(86px, env(safe-area-inset-bottom) + 78px); } }
@media (max-width: 720px) { .tool-section#stickerSection:not(.hidden) { position: relative; z-index: 0; display: flow-root; }.sticker-grid { --sticker-row-size: clamp(64px, calc((100vw - 75px) / 4), 80px); grid-auto-rows: var(--sticker-row-size); }.sticker-option { min-height: 0; aspect-ratio: auto; }.sticker-option[hidden] { display: none; }.tool-section#stickerControlsSection { position: relative; z-index: 1; clear: both; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); background: var(--paper); } }
@media (max-width: 720px) { .asset-grid { max-height: min(190px, calc((100vw - 51px) / 2 + 7px)); padding-right: 2px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; } }

.canvas-frame canvas { z-index: 1; }
@media (max-width: 720px) { .left-sidebar, .panel-scroll, .tool-section { width: 100%; min-width: 0; } }
@media (max-width: 720px) {
  .left-sidebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 34; width: 100%; height: min(74svh, 680px); max-height: calc(100svh - 104px); min-height: 0; margin: 0; padding: 12px 12px calc(74px + env(safe-area-inset-bottom)); overflow: hidden; border: 1px solid rgba(169,192,173,.82); border-bottom: 0; border-radius: 22px 22px 0 0; background: rgba(248,251,245,.97); box-shadow: 0 -16px 42px rgba(49,84,66,.2); backdrop-filter: blur(18px); transform: translateY(calc(100% - 74px)); transition: transform .28s ease; }
  .left-sidebar.is-expanded { transform: translateY(0); }
  .sheet-grabber { display: block; width: 44px; height: 5px; margin: 0 auto 10px; padding: 0; border-radius: 99px; background: var(--line-strong); cursor: grab; touch-action: none; }
  .sheet-grabber:active { background: var(--accent); }
  .panel-scroll { height: 100%; max-height: none; padding: 0 2px 12px; overflow: auto; overscroll-behavior: contain; }
  .editor-tabs { z-index: 36; }
}
@media (min-width: 721px) { .sheet-grabber { display: none; } }
@media (max-width: 900px) {
  html, body { height: 100%; overflow: hidden; }
  .app-shell { height: 100svh; min-height: 0; overflow: hidden; }
  .studio { display: flex; flex-direction: column; }
  .canvas-column { order: 1; position: static; z-index: auto; align-self: stretch; padding: 8px 4px 12px; background: transparent; backdrop-filter: none; }
  .canvas-toolbar, .canvas-caption { display: none; }
  .canvas-frame { position: relative; width: min(100%, var(--mobile-preview-size, calc(100vw - 34px)), 620px); margin: 0 auto; padding: 7px; border-radius: 16px; background: rgba(248,251,245,.97); }
  .canvas-frame::before { inset: 4px; border-radius: 12px; }
  .canvas-frame canvas { border-radius: 9px; }
  .base-grid { display: flex; grid-template-columns: none; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 3px 2px 7px; scrollbar-width: none; }
  .base-grid::-webkit-scrollbar { display: none; }
  .base-option { flex: 0 0 92px; width: 92px; }
  .left-sidebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 34; width: 100%; height: min(74svh, 680px); max-height: min(680px, calc(100svh - 76px - clamp(112px, 24svh, 220px))); min-height: 0; margin: 0; padding: 12px 12px calc(74px + env(safe-area-inset-bottom)); overflow: hidden; border: 1px solid rgba(169,192,173,.82); border-bottom: 0; border-radius: 22px 22px 0 0; background: rgba(248,251,245,.97); box-shadow: 0 -16px 42px rgba(49,84,66,.2); backdrop-filter: blur(18px); transform: translateY(calc(100% - 74px)); transition: transform .28s ease; }
  .left-sidebar.is-expanded { transform: translateY(0); }
  .sheet-grabber { display: block; width: 44px; height: 5px; margin: 0 auto 10px; padding: 0; border-radius: 99px; background: var(--line-strong); cursor: grab; touch-action: none; }
  .panel-scroll { height: 100%; max-height: none; padding: 0 2px 12px; overflow: auto; overscroll-behavior: contain; }
  .editor-tabs { position: fixed; z-index: 36; left: 0; right: 0; bottom: 0; width: auto; margin: 0; padding: 5px 12px max(5px, env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: rgba(248,251,245,.97); box-shadow: 0 -8px 26px rgba(49,84,66,.18); backdrop-filter: blur(16px); }
  .editor-tab { min-height: 46px; }
  .sheet-grabber:active { background: var(--accent); }

  .left-sidebar:not(.is-decoration) { height: auto; }
  .left-sidebar:not(.is-decoration) .panel-scroll { height: auto; }
  .left-sidebar.is-decoration { height: min(64svh, 520px); }
  .left-sidebar.is-decoration .panel-scroll { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
  .left-sidebar.is-decoration #stickerSection:not(.hidden) { flex: 0 0 auto; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; }
  .left-sidebar.is-decoration .sticker-heading { flex: 0 0 auto; min-height: 28px; }
  .left-sidebar.is-decoration .filter-row { position: relative; z-index: 1; flex: 0 0 40px; min-height: 40px; overflow-x: auto; overflow-y: hidden; background: var(--paper); }
  .left-sidebar.is-decoration .sticker-grid { position: relative; z-index: 0; flex: 0 0 auto; min-height: 0; padding: 6px 2px 0 0; }
  .left-sidebar.is-decoration #stickerControlsSection:not(.hidden) { flex: 0 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; max-height: min(34svh, 280px); margin: auto 0 0; padding: 10px 2px 6px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); background: var(--paper); }
  .left-sidebar.is-decoration #stickerControlsSection .section-heading { grid-column: 1 / -1; margin-bottom: 3px; }
  .left-sidebar.is-decoration #stickerControlsSection > .control-row { margin: 6px 0 2px; }
  .left-sidebar.is-decoration #stickerControlsSection > .control-row:nth-child(2) { grid-column: 1; grid-row: 2; }
  .left-sidebar.is-decoration #stickerControlsSection > input:nth-child(3) { grid-column: 1; grid-row: 3; }
  .left-sidebar.is-decoration #stickerControlsSection > .control-row:nth-child(4) { grid-column: 2; grid-row: 2; }
  .left-sidebar.is-decoration #stickerControlsSection > input:nth-child(5) { grid-column: 2; grid-row: 3; }
  .left-sidebar.is-decoration #stickerControlsSection > .control-row:nth-child(6) { grid-column: 3; grid-row: 2; }
  .left-sidebar.is-decoration #stickerControlsSection > input:nth-child(7) { grid-column: 3; grid-row: 3; }
  .left-sidebar.is-decoration #stickerControlsSection input[type=range] { height: 14px; }
  .left-sidebar.is-decoration #stickerControlsSection .flip-button { grid-column: 1; grid-row: 5; min-height: 32px; margin-top: 8px; padding-block: 5px; }
  .left-sidebar.is-decoration #stickerControlsSection .decoration-color-control { grid-column: 1 / -1; grid-row: 4; margin-top: 7px; padding-top: 6px; }
  .left-sidebar.is-decoration #stickerControlsSection .decoration-color-control .control-row { margin: 5px 0 3px; }
  .left-sidebar.is-decoration #stickerControlsSection .layer-buttons { grid-column: 2 / -1; grid-row: 5; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

.inline-control-heading { align-items: center; }
.inline-control-heading .segmented { flex: 0 1 240px; width: min(100%, 240px); min-width: 0; margin-left: auto; }
.segmented.compact { padding: 2px; }
.segmented.compact button { min-height: 29px; padding: 4px 6px; font-size: 10px; }
#baseSection .section-heading small { display: none; }
.pattern-inline-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 7px; color: var(--muted); font-size: 11px; }
.pattern-inline-row > label { flex: 0 0 auto; }
.pattern-inline-row .segmented { flex: 0 1 240px; width: min(100%, 240px); min-width: 0; margin-left: auto; }
.pattern-colors { grid-template-columns: 1fr; gap: 14px; }
.pattern-colors .swatch-row { grid-template-columns: repeat(6, 28px); gap: 7px; }
