@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Libre+Caslon+Display&display=swap');
:root{font-family:'DM Sans',system-ui,sans-serif;color:#e7e8e3;background:#222624;font-synthesis:none;--accent:#deba80;--muted:#9aa39d;--line:#424843;--ink:#263129;--panel:#f3f4ef}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.5}button{border:0}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #c88c3b;outline-offset:3px}button,select,input{touch-action:manipulation}button{transition:background .15s,color .15s,border-color .15s}svg{flex-shrink:0}[hidden]{display:none!important}.topbar{height:86px;border-bottom:1px solid #414640;background:#242a26;display:flex;align-items:center;padding:0 32px;gap:36px}.brand{display:flex;align-items:center;gap:13px;flex-shrink:0}.brand-mark{width:37px;height:42px;border:1px solid #a5af9e;display:grid;place-items:center;font:32px 'Libre Caslon Display',Georgia,serif;color:#e4dbc7}.brand-name{font:32px 'Libre Caslon Display',Georgia,serif;display:flex;align-items:center;gap:23px;letter-spacing:-1px}.brand-sub{font:500 11px 'DM Sans',sans-serif;letter-spacing:2.2px;border-left:1px solid #566052;padding-left:23px;color:#b9c2b8}.header-note{font-size:14px;color:#a5aea6;flex:1}.header-actions{display:flex;gap:12px;margin-left:auto}.button{background:transparent;color:inherit;border:1px solid #5e665e;border-radius:5px;padding:10px 15px;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:42px;font-size:14px;font-weight:550}.button:hover{background:#ffffff0c}.button.primary{background:#deba80;color:#273029;border-color:#deba80}.button.primary:hover{background:#e8c995}.button.wide{width:100%}.layout{display:grid;grid-template-columns:minmax(0,1fr) 338px;min-height:calc(100dvh - 86px)}.studio{padding:29px 34px 0;min-width:0;display:flex;flex-direction:column}.workspace-top{display:flex;justify-content:space-between;align-items:center;gap:15px;min-height:49px;margin-bottom:23px}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:650;color:#9da89f}.workspace-top h1{font-size:18px;line-height:1.4;font-weight:500;margin:6px 0 0;max-width:34vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-badge{font-size:10px;letter-spacing:1px;border:1px solid #566158;border-radius:3px;padding:3px 6px;vertical-align:middle;color:#aeb8ae;margin-left:8px}.view-tabs{display:flex;padding:4px;background:#191e1b;border:1px solid #3d473f;border-radius:7px;gap:3px;flex-shrink:0}.view-tabs button{padding:8px 12px;background:transparent;color:#a5afa6;font-size:13px;border-radius:4px}.view-tabs button:hover{color:white}.view-tabs button.active{background:#4a554b;color:#fafaf5;box-shadow:0 1px 4px #0003}.canvas-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--line);border-bottom:0;padding:7px 10px;background:#292f2a;border-radius:7px 7px 0 0}.toolbar-group{display:flex;gap:3px;align-items:center}.tool{display:inline-flex;justify-content:center;align-items:center;width:34px;height:34px;flex-shrink:0;background:transparent;border-radius:4px;color:#afb9ae}.tool:hover{background:#ffffff10;color:white}.tool.active{color:#e9c795;background:#e2b9741c}.toolbar-divider{height:20px;border-left:1px solid #4d564c;margin:0 7px}#canvas-hint{font-size:12px;color:#a1ab9f;flex:1;text-align:center}.text-button{background:none;color:#aeb9ae;font-size:12px;padding:6px 0;display:inline-flex;align-items:center;gap:5px}.text-button:hover{color:#e5c895}.canvas-well{height:clamp(380px,54vh,680px);display:flex;align-items:center;justify-content:center;position:relative;min-height:180px;background:#171d19;border:1px solid var(--line);padding:28px;overflow:hidden;background-image:radial-gradient(ellipse at center,#232c24 0,transparent 70%)}.image-frame{position:relative;display:flex;align-items:center;justify-content:center;gap:20px;width:min(100%,calc((54vh - 56px) * var(--ratio,1.33)))}.image-pane{position:relative;min-width:0;flex:1;box-shadow:0 8px 30px #0003;overflow:hidden}.image-pane canvas{display:block;width:100%;height:100%;object-fit:contain}.study-pane #study,.study-pane #overlay{position:absolute;inset:0}.image-tag{position:absolute;z-index:2;left:12px;top:12px;font-size:10px;letter-spacing:1.2px;padding:5px 8px;border-radius:3px;background:#17201bd6;color:#fff;pointer-events:none;max-width:calc(100% - 24px)}#overlay{touch-action:none}.view-side{width:min(100%,calc((54vh - 56px) * var(--ratio,1.33) * 2 + 20px))}.view-side .image-pane{width:calc(50% - 10px)}.thumbnail{max-width:180px!important}.thumbnail.view-side{max-width:340px!important}.thumbnail .image-tag{display:none}.split-handle{position:absolute;top:0;bottom:0;width:3px;transform:translateX(-50%);background:#f6eee1;z-index:4;cursor:ew-resize;touch-action:none;box-shadow:0 0 3px #0005}.split-handle span{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:32px;height:40px;display:grid;place-items:center;border-radius:5px;background:#f7f1e8;color:#30382e;font-size:20px;box-shadow:0 2px 9px #0003}.image-meta{display:flex;justify-content:space-between;gap:12px;color:#96a292;font-size:11px;padding:11px 1px}.lock-symbol{padding:0 5px;color:#c5d0bf}.loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#1d271feb;color:#ead8b5;z-index:8;padding:14px 22px;border:1px solid #68765e;border-radius:6px;font-size:14px;box-shadow:0 5px 30px #0003;pointer-events:none}.drop-message{display:none;position:absolute;inset:10px;z-index:20;background:#26372bef;border:2px dashed #d9bc86;border-radius:5px;align-items:center;justify-content:center;flex-direction:column;gap:12px}.drop-message svg{width:32px;height:32px}.drop-message span{font-size:14px;color:#c1c9b9}.dragging .drop-message{display:flex}.value-panel{margin-top:14px}.value-heading{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:13px;font-size:10px;letter-spacing:1.5px;color:#b9c3b5}.value-heading #legend-hint{font-size:12px;letter-spacing:0;color:#919e8c}.value-scale{display:flex;gap:4px}.value-swatch{position:relative;background:var(--tone);color:var(--ink);height:69px;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;border-radius:2px;outline:1px solid #ffffff13;outline-offset:-1px}.value-swatch span{font-size:18px;font-weight:500}.value-swatch small{font-size:10px;opacity:.65}.value-swatch:hover{transform:translateY(-2px)}.value-swatch.selected{outline:3px solid #e3b36a;outline-offset:2px;z-index:1}.scale-endpoints{display:flex;justify-content:space-between;color:#8e9b87;font-size:10px;letter-spacing:1.4px;margin-top:10px}.studio-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #3b453a;margin-top:28px;padding:15px 0;color:#92a08b;font-size:12px}.studio-footer>span{max-width:70%;line-height:1.5}.sidebar{background:var(--panel);color:var(--ink);border-left:1px solid #566050;min-width:0}.sidebar-title{display:flex;justify-content:space-between;align-items:center;padding:22px 23px 18px;border-bottom:1px solid #d8ddd3;font-size:15px;font-weight:600}.chapter{font-size:10px;letter-spacing:1.1px;color:#818c7a;font-weight:500}.core-controls{padding:23px 23px 21px}.complexity-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.complexity-heading>label{font-size:16px;font-weight:600}.value-count{display:flex;align-items:baseline;gap:5px}.value-count output{font-size:34px;line-height:1;font-weight:450;letter-spacing:-2px}.value-count small{font-size:12px;color:#7c8875}.sidebar input[type=range]{width:100%;accent-color:#52674c;height:19px;cursor:pointer;margin:0}.range-labels{display:flex;justify-content:space-between;font-size:11px;color:#7f8a79;margin-top:6px}.mode-tabs{display:flex;padding:4px;margin-top:23px;border:1px solid #ccd3c6;border-radius:6px;background:#e6eae0;gap:4px}.mode-tabs button{width:50%;padding:10px 4px;background:transparent;border-radius:3px;color:#6c7864;font-size:14px;font-weight:550}.mode-tabs button span{display:block;font-size:11px;font-weight:400;margin-top:3px}.mode-tabs button.active{background:#fff;color:#354431;box-shadow:0 1px 4px #34422920}.muted{font-size:12px;line-height:1.6;color:#74806c;margin:12px 0 0}.section{border-top:1px solid #d7ddcf}.section summary{list-style:none;display:flex;justify-content:space-between;align-items:center;padding:17px 23px;cursor:pointer;font-size:14px;font-weight:550}.section summary::-webkit-details-marker{display:none}.section summary svg{color:#818d78;width:16px}.section[open] summary svg{transform:rotate(180deg)}.section-body{padding:0 23px 20px}.range-control{margin-top:2px}.range-control label{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin-bottom:12px}.range-control output{background:#e4e9db;color:#526349;padding:3px 7px;border-radius:3px;font-size:12px;min-width:30px;text-align:center}.toggle-row{display:flex;justify-content:space-between;align-items:center;gap:12px;position:relative;cursor:pointer;font-size:14px;line-height:1.4;margin:16px 0 5px}.toggle-row small{display:block;color:#79856f;font-size:11px;margin-top:4px}.toggle-row input{position:absolute;right:0;width:36px;height:22px;opacity:0;margin:0;cursor:pointer}.switch{width:34px;height:20px;background:#c8d0bf;border-radius:20px;flex-shrink:0;pointer-events:none}.switch:before{content:'';display:block;width:14px;height:14px;margin:3px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002;transition:transform .15s}.toggle-row input:checked+.switch{background:#526b49}.toggle-row input:checked+.switch:before{transform:translateX(14px)}.toggle-row input:focus-visible+.switch{outline:3px solid #bd9044;outline-offset:3px}#threshold-field{margin-top:20px}.field{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#6a775f;margin:0 0 15px}.field select{background:#fff;color:#35422d;border:1px solid #ccd4c3;border-radius:4px;padding:10px 8px;font-size:13px;min-height:40px;width:100%}.sidebar .button{border-color:#c5ceba;color:#4e6242;font-size:12px;margin-top:10px}.sidebar .button:hover{background:#e5ebdc}.sidebar .text-button{color:#7a866f;margin-top:6px}.sidebar .text-button:hover{color:#314729}.analysis-key{font-size:11px;padding:10px;background:#e4e9dc;margin-top:12px;white-space:pre}.distribution-row{display:grid;grid-template-columns:15px 1fr 42px;align-items:center;gap:10px;font-size:12px;margin:10px 0}.distribution-row>div{height:13px;background:#d9dfd1;border:1px solid #cbd3c2;border-radius:2px;overflow:hidden}.distribution-row i{display:block;height:100%;min-width:1px}.distribution-row>span:last-child{text-align:right;font-variant-numeric:tabular-nums}table{font-size:11px;width:100%;border-collapse:collapse;margin-top:16px}th,td{padding:9px 4px;text-align:right;border-bottom:1px solid #d5ddcc}th:first-child,td:first-child{text-align:left}th{font-weight:500;color:#7e8a72}.picker-card{margin:8px 20px 20px;border:1px solid #cbd4bf;border-radius:5px;padding:17px;background:#e9eddf}.picker-card .eyebrow{font-size:10px;color:#76856a;letter-spacing:1.4px}.picker-empty{font-size:12px;text-align:center;color:#7a896b;line-height:1.7;padding:24px 0 12px}.picker-empty svg{display:block;margin:0 auto 12px}.swatch{height:80px;margin:15px 0 12px;border-radius:3px;display:flex;align-items:flex-end;padding:9px}.swatch span{font-size:12px;letter-spacing:1px}.picker-card strong{font-size:13px;font-weight:550}.sample-values{display:grid;grid-template-columns:1fr 1.25fr;gap:10px 5px;margin-top:14px;font-size:11px;align-items:center}.sample-values>span{color:#728063}.sample-values b{font-weight:500;text-align:right}.sidebar-bottom{font-family:Georgia,serif;font-style:italic;font-size:12px;text-align:center;color:#859075;padding:3px 15px 25px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:100;background:#edf0e5;color:#283f21;padding:14px 22px;border-radius:7px;box-shadow:0 5px 30px #0005;max-width:min(90vw,650px);font-size:14px}.toast[hidden]{display:none}dialog{width:min(450px,calc(100vw - 30px));border:1px solid #a3b192;border-radius:9px;background:#f2f4eb;color:#31432b;padding:0;box-shadow:0 25px 100px #0007}dialog::backdrop{background:#131c18b3;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;padding:25px;border-bottom:1px solid #d4dccb}.dialog-heading .tool{color:#6c7c5f}.dialog-heading h2{font:30px 'Libre Caslon Display',Georgia,serif;margin:6px 0 0}.dialog-heading .eyebrow{color:#849273;font-size:10px}.dialog-content{padding:23px 25px 27px}.dialog-content .toggle-row{margin:20px 0}.dialog-content .button{margin-top:20px}.dialog-content .field{font-size:14px}.dialog-content .field select{font-size:14px}
@media(min-width:1700px){.layout{grid-template-columns:minmax(0,1fr) 370px}.studio{padding:35px 55px 0}.canvas-well{height:60vh}.image-frame{width:min(100%,calc((60vh - 56px)*var(--ratio,1.33)))}.view-side{width:min(100%,calc((60vh - 56px)*var(--ratio,1.33)*2 + 20px))}}
@media(max-width:1200px){.header-note{display:none}.topbar{padding:0 22px}.studio{padding:23px 22px 0}.layout{grid-template-columns:minmax(0,1fr) 310px}.workspace-top{align-items:flex-start;flex-direction:column;gap:14px}.workspace-top h1{max-width:50vw}.view-tabs{align-self:stretch}.view-tabs button{flex:1}.canvas-toolbar #canvas-hint{display:none}.canvas-well{padding:20px}.image-frame{width:min(100%,calc((54vh - 40px)*var(--ratio,1.33)))}.view-side{width:min(100%,calc((54vh - 40px)*var(--ratio,1.33)*2 + 20px))}.image-meta{font-size:10px}.image-meta>span:last-child{display:none}.sidebar-title,.section summary{padding-left:20px;padding-right:20px}.core-controls,.section-body{padding-left:20px;padding-right:20px}}
@media(max-width:1024px){.topbar{height:74px;padding:0 16px}.brand-sub{display:none}.brand-name{font-size:29px}.header-actions{gap:7px}.header-actions .button{padding:9px 11px;font-size:12px}.layout{display:flex;flex-direction:column}.studio{padding:20px 16px 0}.workspace-top{flex-direction:row;align-items:center;flex-wrap:wrap;margin-bottom:15px}.workspace-top h1{max-width:70vw}.view-tabs{margin-left:auto}.canvas-well{height:54vh;min-height:260px;padding:16px}.image-frame{width:min(100%,calc((54vh - 32px)*var(--ratio,1.33)))}.view-side{width:min(100%,calc((54vh - 32px)*var(--ratio,1.33)*2 + 20px))}.sidebar{border:0;margin-top:18px;display:grid;grid-template-columns:1fr 1fr}.sidebar-title{grid-column:1/-1}.core-controls{grid-column:1/-1;padding:22px;max-width:600px;width:100%;justify-self:center}.section{border-right:1px solid #d7ddcf}.section-body{padding:0 20px 18px}.picker-card{grid-column:1/-1}.sidebar-bottom{grid-column:1/-1}.value-panel{margin-top:8px}.studio-footer{margin-top:20px}.image-meta{padding:9px 0}.value-swatch{height:60px}.value-swatch span{font-size:16px}}
@media(max-width:500px){.brand-mark{width:29px;height:35px;font-size:28px}.brand{gap:8px}.header-actions .button span{display:none}.header-actions .button{width:39px;padding:8px}.workspace-top{gap:15px}.view-tabs{width:100%;margin:0}.view-tabs button{padding:8px 7px;font-size:12px}.canvas-well{height:42vh;min-height:235px;padding:12px}.image-frame{width:min(100%,calc((42vh - 24px)*var(--ratio,1.33)))}.view-side{gap:9px;width:min(100%,calc((42vh - 24px)*var(--ratio,1.33)*2 + 9px))}.image-tag{left:6px;top:6px;font-size:8px;padding:4px;letter-spacing:.7px}.view-side .image-tag{display:none}.sidebar{display:block}.core-controls{max-width:none}.value-heading #legend-hint{font-size:10px;max-width:140px;text-align:right}.value-heading{font-size:9px;letter-spacing:1px}.value-swatch small{font-size:9px}.studio-footer{gap:10px}.studio-footer>span{font-size:11px;max-width:62%}.studio-footer button{font-size:11px}.toolbar-divider{margin:0 3px}.tool{width:31px}.canvas-toolbar{padding:6px}.topbar{gap:10px}.sidebar .muted{font-size:13px}.section summary{font-size:15px}.field,.range-control label{font-size:14px}.section-body .button{font-size:14px}.picker-card{margin-top:20px}.sample-values{font-size:12px}}
.sidebar .field select,.range-control label{font-size:14px}.studio>.mobile-core{background:#eef1e7;color:#2b3825;border-radius:6px;margin:0 0 16px;padding:15px 18px;max-width:none;display:grid;grid-template-columns:1fr 1fr;gap:6px 18px}.mobile-core .complexity-heading{grid-column:1;grid-row:1;margin-bottom:0}.mobile-core .complexity-heading>label{font-size:14px}.mobile-core .value-count output{font-size:26px}.mobile-core #count{grid-column:1;grid-row:2;width:100%;accent-color:#52674c}.mobile-core .range-labels{grid-column:1;grid-row:3;font-size:10px}.mobile-core .mode-tabs{grid-column:2;grid-row:1/4;margin:0;align-self:center}.mobile-core .mode-tabs button{padding:9px 4px;font-size:13px}.mobile-core .mode-tabs button span{font-size:10px}.mobile-core .muted{grid-column:1/-1;font-size:11px;margin:4px 0 0}.mobile-core .value-count small{font-size:10px}
@media(min-width:1025px){.studio{position:sticky;top:0;align-self:start}.sidebar{min-height:calc(100dvh - 86px)}}
.color-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:15px}.color-presets button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:47px;border:1px solid #ccd4c3;background:transparent;border-radius:4px;color:#69785e;padding:5px 2px}.color-presets b{font-size:14px;font-weight:600}.color-presets span{font-size:11px}.color-presets button:hover{background:#e3e9db}.color-presets button.active{background:#52674c;color:white;border-color:#52674c}.value-scale.expanded{display:grid;grid-template-columns:repeat(auto-fit,minmax(54px,1fr));gap:6px}.value-scale.expanded .value-swatch{height:56px}.value-scale.expanded .value-swatch span{font-size:16px}.value-scale.expanded .value-swatch small{font-size:11px}.mobile-core .color-presets{grid-column:1/-1;grid-row:4;margin-top:8px}.mobile-core .muted{grid-row:5}.mobile-core .color-presets button{min-height:44px}.mobile-core .range-labels{font-size:9px;gap:4px}.mobile-core .range-labels span{white-space:nowrap}
.mobile-nav,.sample-peek,.tool-label{display:none}
dialog{max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
#export-preview{display:block;max-width:100%;max-height:170px;object-fit:contain;margin:18px auto 10px;background:#202822}
#export-ready .button{text-decoration:none;margin-top:10px}
#export-share{color:#3b4c32;border-color:#b5c3a7}
.split-handle{width:44px;background:transparent;box-shadow:none}
.split-handle::before{content:'';position:absolute;left:21px;top:0;bottom:0;width:2px;background:#f6eee1;box-shadow:0 0 3px #0005}
.split-handle span{width:44px;height:44px}
@media(pointer:coarse){
  .button,.tool,.text-button,.view-tabs button,.mode-tabs button{min-height:44px}
  .tool{min-width:44px}.canvas-toolbar,.toolbar-group{flex-wrap:wrap}
  .sidebar input[type=range],input[type=range]{height:44px}
  .field select,.sidebar .field select,.dialog-content .field select{font-size:16px;min-height:44px}
  .toggle-row{min-height:44px}.toggle-row input{width:44px;height:44px}
  .section summary{min-height:52px}.value-swatch:hover{transform:none}
}
@media(max-width:1024px){
  body{padding-bottom:calc(70px + env(safe-area-inset-bottom));-webkit-text-size-adjust:100%}
  .topbar{position:sticky;top:0;z-index:12;height:calc(74px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
  .header-actions .button{min-width:44px;min-height:44px}
  .mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:15;display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:6px max(12px,env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));background:#263028;border-top:1px solid #5c6857}
  .mobile-nav button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:48px;background:transparent;color:#e6e8de;font-size:14px;border-radius:5px}
  .mobile-nav button:hover,.mobile-nav button:focus-visible{background:#3e4c3d}
  .workspace-top,.sidebar-title,.picker-card{scroll-margin-top:calc(95px + env(safe-area-inset-top))}
  .canvas-toolbar{display:flex;flex-wrap:wrap;gap:4px 10px;padding:6px}
  .toolbar-group{display:grid;grid-template-columns:repeat(6,minmax(44px,1fr));gap:2px;width:100%;flex-basis:100%}
  .toolbar-divider{display:none}.toolbar-group .tool{width:100%;height:52px;flex-direction:column;gap:4px}
  .tool-label{display:block;font-size:11px;line-height:1.1}.canvas-toolbar #canvas-hint{display:block;flex:1;font-size:12px;line-height:1.4;text-align:left}
  .canvas-toolbar #reset{min-width:54px;min-height:44px;justify-content:center;font-size:13px}
  .view-tabs button{min-height:44px;font-size:13px}.mode-tabs button{min-height:48px}
  .mobile-core #count,.sidebar input[type=range]{min-height:44px}
  .mobile-core .range-labels{font-size:11px;gap:8px;flex-wrap:wrap}.mobile-core .range-labels span{white-space:normal}
  .mobile-core .color-presets span{font-size:12px}.mobile-core .muted{font-size:12px}
  .section summary{min-height:54px}.field select,.sidebar .field select,.dialog-content .field select{font-size:16px;min-height:44px}
  .sidebar .button,.sidebar .text-button,.toggle-row,.studio-footer .text-button,#clear-value{min-height:44px}
  .sample-peek{display:flex;align-items:center;gap:10px;margin:4px 0 12px;padding:8px 12px;background:#303b31;border:1px solid #52614d;border-radius:5px}
  #peek-swatch{width:42px;height:42px;border-radius:3px;border:1px solid #ffffff40;flex-shrink:0}
  .sample-peek b,.sample-peek small{display:block;font-size:13px}.sample-peek small{margin-top:4px;color:#b4c0ad}
  #peek-details{margin-left:auto;min-height:44px;font-size:13px}
  .value-scale{display:grid;grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:5px}
  .value-swatch{min-height:52px}.value-swatch small{font-size:11px}
  .sample-values{font-size:13px}.picker-card strong{font-size:15px}
  dialog{max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:min(460px,calc(100vw - 24px));margin:auto}
  .dialog-heading{position:sticky;top:0;background:#f2f4eb;z-index:2;padding:18px}.dialog-heading .tool{min-width:44px;min-height:44px}
  .dialog-content{padding:18px}.dialog-content .button{min-height:48px}
  .toast{bottom:calc(82px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100vw - 30px)}
}
@media(max-width:360px){
  .studio>.mobile-core{grid-template-columns:1fr}.mobile-core .complexity-heading{grid-column:1;grid-row:1}.mobile-core #count{grid-column:1;grid-row:2}
  .mobile-core .range-labels{grid-column:1;grid-row:3;flex-wrap:nowrap}.mobile-core .mode-tabs{grid-column:1;grid-row:4}
  .mobile-core .color-presets{grid-column:1;grid-row:5}.mobile-core .muted{grid-column:1;grid-row:6}
  .mobile-nav button{font-size:12px;gap:4px}.view-tabs button{font-size:12px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}} 
#paint-mixer-host{grid-column:1/-1;min-width:0}
.paint-mixer{scroll-margin-top:calc(95px + env(safe-area-inset-top))}
.paint-mixer>summary{font-size:15px}.paint-mixer[open]>summary>span[aria-hidden="true"]{transform:rotate(45deg)}
.mixer-intro{margin:0 0 16px}.paint-mixer .muted{color:#65725e}
.paint-mixer .paint-inventory,.mix-method{border-top:1px solid #d5ddcc;border-bottom:1px solid #d5ddcc;margin:15px 0}
.paint-mixer .paint-inventory>summary,.paint-mixer .mix-method>summary{padding:10px 0;min-height:44px;font-size:13px;gap:8px}
.paint-inventory>summary::before,.mix-method>summary::before{content:'›';font-size:19px}.paint-inventory[open]>summary::before,.mix-method[open]>summary::before{transform:rotate(90deg)}
#paint-total{margin-left:auto;font-size:11px;color:#64755a;white-space:nowrap}
.palette-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 10px}
.palette-presets button{background:#e2e8d9;border:1px solid #c6d0bb;border-radius:4px;color:#415637;min-height:44px;padding:6px;font-size:12px}
.palette-presets button:hover{background:#d6e0ca}
#paint-checks{padding-bottom:12px}#paint-checks label{display:flex;align-items:center;gap:9px;min-height:44px;cursor:pointer;font-size:13px;line-height:1.4}
#paint-checks input{width:19px;height:19px;margin:0;accent-color:#52674c;flex-shrink:0}
#paint-checks i,.mix-ingredient i{width:16px;height:25px;border:1px solid #0002;border-radius:3px;flex-shrink:0}
#paint-checks small,.mix-ingredient small{display:block;font-size:11px;color:#67765d;margin-top:2px}
.mix-status{padding:11px 12px;background:#e5eadc;border-left:2px solid #82946c;font-size:12px;line-height:1.6;color:#4a5d3f;margin:15px 0}
.mix-method a{display:inline-block;color:#48633a;font-size:12px;line-height:1.5;margin:10px 0 15px}.mix-method .muted{margin-top:0}
@media(max-width:1024px){.paint-mixer .section-body{max-width:620px;margin:auto}.paint-mixer .muted,#mix-notes,.mix-status{font-size:13px}.paint-mixer .mix-method>summary,.paint-mixer .paint-inventory>summary{font-size:14px}}

/* Paint ratios keep their true widths, including tiny additions. The legend
   provides full-size touch targets and labels for the smallest segments. */
.mix-kicker{font-size:10px;font-weight:650;letter-spacing:1.3px;color:#64745b}
.mix-selected{margin:22px 0 26px}#mix-target{height:94px;border-radius:6px;border:1px solid #0002;margin:10px 0 12px}
.mix-color-caption{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.mix-color-caption strong{font-size:13px;font-weight:500;line-height:1.5}.mix-color-caption>span{font-size:10px;color:#65725e;font-variant-numeric:tabular-nums;white-space:nowrap}
.mix-ratio-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}#mix-ratio{font-size:12px;font-weight:600;white-space:nowrap;color:#536449}
#mix-ratio-bar{display:flex;width:100%;height:54px;border-radius:7px;box-shadow:0 0 0 1px #0002;isolation:isolate;margin-bottom:12px}
#mix-ratio-bar button{padding:0;min-width:0;flex-shrink:0;position:relative;transition:opacity .15s;min-height:44px}
#mix-ratio-bar button:first-child{border-radius:7px 0 0 7px}#mix-ratio-bar button:last-child{border-radius:0 7px 7px 0}#mix-ratio-bar button:only-child{border-radius:7px}
#mix-ratio-bar button+button{box-shadow:inset 1px 0 #ffffff40}#mix-ratio-bar span{font-size:12px;font-weight:600}
#mix-ratio-bar [aria-pressed=true]{outline:2px solid #4c6440;outline-offset:3px;z-index:1}#mix-ratio-bar button:focus-visible{z-index:2}
.mix-ingredient{width:100%;display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;font-size:12px;line-height:1.45;padding:10px 7px;min-height:54px;background:transparent;color:#33472b;border-radius:5px;border:1px solid transparent}
.mix-ingredient i{display:grid;place-items:center;width:28px;height:30px;font-size:10px;font-style:normal;font-weight:600}.mix-ingredient b{font-size:13px;font-weight:550;font-variant-numeric:tabular-nums}.mix-ingredient small{font-size:10px}
.mix-ingredient:hover{background:#e7ecdf}.mix-ingredient[aria-pressed=true]{background:#e2e9d9;border-color:#a6b895}.mix-dimmed{opacity:.42}
.mix-ratio-hint{font-size:11px;margin-top:8px}.mix-process-heading{margin-top:24px}
#mix-notes{list-style:none;counter-reset:mix-step;padding:0;margin:14px 0 18px;font-size:12px;line-height:1.65;color:#53644a}
#mix-notes li{counter-increment:mix-step;position:relative;padding:0 0 17px 33px;min-height:35px}#mix-notes li:last-child{padding-bottom:0}
#mix-notes li:before{content:counter(mix-step);position:absolute;top:0;left:0;width:22px;height:22px;border:1px solid #c2ceb5;border-radius:50%;display:grid;place-items:center;background:#e8eddf;font-size:10px;font-weight:600;color:#617253}
#mix-notes li:not(:last-child):after{content:'';position:absolute;left:10px;top:27px;bottom:5px;border-left:1px solid #d2dcc7}
@media(max-width:1024px){.mix-kicker{font-size:11px}.mix-ingredient,.mix-color-caption strong{font-size:14px}.mix-ingredient small,.mix-color-caption>span{font-size:11px}.mix-ingredient b{font-size:14px}#mix-target{height:100px}#mix-ratio-bar{height:60px}}

/* Keep the primary upload action explicit on phones, where icons alone
   made opening the first reference difficult to discover. */
@media(max-width:1024px){
 .header-actions #upload{background:#deba80;border-color:#deba80;color:#273029;font-weight:600;min-height:46px}
 .header-actions #upload:hover{background:#e8c995}
 .header-actions #export{background:transparent;border-color:#697463;color:#e5e8df}
}
@media(max-width:500px){
 .topbar .brand-mark{display:none}.topbar .brand-name{font-size:27px;letter-spacing:-.7px}
 .header-actions #upload{width:auto;padding:10px 12px;gap:7px;font-size:13px;white-space:nowrap}
 .header-actions #upload span{display:inline}
 .header-actions #upload svg{width:18px;height:18px}
 .header-actions #export{width:44px;min-height:46px}
}

.color-presets{grid-template-columns:repeat(5,minmax(0,1fr))}#grid-controls{padding:12px 0 18px}#grid-controls .range-control+.range-control{margin-top:18px}

.tier-strip{display:flex;align-items:center;gap:15px;padding:10px 32px;background:#30392f;color:#becbb6;border-bottom:1px solid #495644;font-size:12px}.tier-strip>span:first-child{font-size:10px;font-weight:650;letter-spacing:1.2px;color:#e4c996}.tier-strip button{margin-left:auto;background:transparent;color:#efd4a3;border:1px solid #6a765c;border-radius:4px;padding:7px 12px;font-size:12px;min-height:36px;white-space:nowrap}
.pro-tag{display:inline-block;font-size:9px;letter-spacing:.7px;border:1px solid #b7c4a8;border-radius:3px;padding:2px 5px;color:#61734e;margin-left:8px}.section>summary>.pro-tag{margin-left:auto;margin-right:8px;order:1}.section>summary>svg,.section>summary>span[aria-hidden]{order:2}
.preset-pro{font-size:8px;letter-spacing:.8px;opacity:.75}.color-presets button{min-height:60px}
.pro-price{font-size:34px;color:#35482b;margin:20px 0 0}.pro-price small{display:block;font-size:12px;color:#6b795f;margin-top:5px}.pro-benefits{padding-left:20px;font-size:14px;line-height:1.8}.pro-availability{padding:13px;background:#e5eadc;color:#536647;border-radius:5px;font-size:13px;line-height:1.6}#pro-dialog .button{text-decoration:none}#pro-reason{font-size:14px;line-height:1.6}
@media(max-width:1024px){.tier-strip{padding:9px 16px;gap:8px;flex-wrap:wrap}.tier-strip #tier-context{order:3;flex-basis:100%;font-size:11px}.tier-strip button{min-height:44px}.tier-strip #tier-label{font-size:10px}}

#account-dialog input{padding:12px;border:1px solid #bcc8af;border-radius:4px;font-size:16px;width:100%;min-height:44px;background:white;color:#283c23}.account-sandbox{font-size:11px;letter-spacing:1px;color:#6b755e}#account-checkout-link{text-decoration:none}.tier-strip #account-open{margin-left:0}

body.has-paid-pro .pro-tag{display:none}

.support-footer{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 22px;padding:20px 20px 35px;border-top:1px solid var(--line);font-size:12px}.support-footer a,.support-footer button{color:#c7d0bf;min-height:44px;display:inline-flex;align-items:center}.policy-content{line-height:1.65}.policy-content h3{font-size:17px;margin-top:24px}.policy-content a,.account-management a{color:#38582c;overflow-wrap:anywhere}.policy-content li{margin-bottom:10px}.account-management{margin-top:20px;border-top:1px solid #c6cfbe;padding-top:16px}.account-management summary{cursor:pointer;min-height:44px}.account-management .button{text-decoration:none;display:flex;justify-content:center}.policy-page{background:#f3f4ef;color:#263129}.policy-page main{max-width:780px;margin:0 auto;padding:40px 24px}.policy-page h1{font:44px Georgia,serif}.policy-page a{color:#38582c}.policy-page nav{margin-top:32px;border-top:1px solid #c6cfbe;padding-top:24px}#help-dialog{max-width:720px;width:calc(100% - 32px)}@media(max-width:760px){.support-footer{padding-bottom:100px}#help-dialog h2{font-size:28px}}
/* Workspace refinements: image-first on phones, the same controls on every size. */
.complexity-stepper{display:flex;align-items:center;gap:8px}
.complexity-stepper input{min-width:0;flex:1}
.complexity-stepper button{width:36px;height:36px;flex-shrink:0;border:1px solid #bcc7b3;border-radius:5px;background:#fff;color:#354b2d;font-size:22px}
.complexity-stepper button:disabled{cursor:default;opacity:.4}
.complexity-presets{margin:10px 0 0}.complexity-presets summary{cursor:pointer;font-size:13px;min-height:32px;display:flex;align-items:center;color:#475e3c;gap:8px}
.complexity-presets summary:after{content:'+';margin-left:auto}.complexity-presets[open] summary:after{content:'−'}
.color-presets{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:5px}.color-presets button{min-height:52px}
.mode-tabs{margin-top:14px}.range-labels,.value-count small{color:#58694e}.muted,.sidebar .muted{color:#57694d}
.section summary{font-size:15px}.field,.field select,.sidebar .field select{color:#425638}
.preset-pro{font-size:10px;opacity:1}.pro-tag{color:#4c623c;border-color:#92a580;font-size:10px}
.sidebar-title{min-height:56px}.sidebar-title #panel-close{display:none}
.canvas-well{height:clamp(360px,58vh,720px)}.image-frame{max-width:100%;flex-shrink:0}
.canvas-toolbar{position:relative;justify-content:flex-start;gap:10px;min-height:52px}
.toolbar-group{display:flex;gap:4px;width:auto;flex-basis:auto}
.canvas-toolbar .tool{width:56px;height:44px;flex-direction:column;gap:4px}
.tool-label{display:block;font-size:10px;line-height:1.1;white-space:nowrap}
.canvas-toolbar #canvas-hint{font-size:12px;min-width:0}
#undo{min-width:60px;min-height:44px;justify-content:center;gap:5px}#undo:disabled{cursor:default;opacity:.45}
.image-tools{position:relative;margin-left:auto;flex-shrink:0}
.image-tools>summary{display:none}.image-tools>div{display:flex;align-items:center;gap:4px}
.image-tools #reset{min-height:44px;padding:0 7px}
.sample-marker{position:absolute;z-index:5;width:18px;height:18px;transform:translate(-50%,-50%);border:2px solid #fff;outline:2px solid #18241b;border-radius:50%;box-shadow:0 0 0 5px #fff3;pointer-events:none}
.sample-source{display:flex;gap:6px;margin-top:16px}.sample-source button{flex:1;background:transparent;color:#4b603e;border:1px solid #b8c7ac;border-radius:5px;min-height:44px;padding:7px;font-size:12px;display:flex;gap:6px;align-items:center;justify-content:center}
.sample-source [aria-pressed=true]{background:#3f5838;color:#fff;border-color:#3f5838}.sample-source i{width:17px;height:22px;border:1px solid #ffffff80;border-radius:3px;flex-shrink:0}
.sample-primary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;font-size:12px;color:#455b39}.sample-primary strong{font-size:23px;white-space:nowrap}.sample-primary small{font-size:12px;font-weight:400}.sample-primary>span{text-align:right;line-height:1.5}
.sample-technical{border-top:1px solid #c3ceb7;margin-top:15px;padding-top:8px}.sample-technical summary{cursor:pointer;min-height:36px;font-size:13px;color:#4b603e}
.sample-values{font-size:12px}.sample-values>span{color:#526641}
.value-heading{flex-wrap:wrap;gap:8px;margin-bottom:9px;letter-spacing:1px;color:#c6d0bd}.value-heading #legend-hint{color:#bdc9b4;font-size:12px;margin-left:auto}
.value-heading .text-button{color:#e4c78f;min-height:32px;white-space:nowrap}
.value-scale{display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:5px}.value-swatch{min-height:50px;height:58px}
.value-swatch small{opacity:1;font-size:11px}.value-swatch span{font-size:16px}
.palette-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(54px,1fr));gap:8px;margin:18px 0}.palette-grid .value-swatch{height:60px;min-width:44px}
#palette-dialog{width:min(640px,calc(100vw - 24px))}.scale-endpoints{color:#b3c1a9;letter-spacing:1px}
.crop-actions{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#303e31;border:1px solid #6c805e;color:#f4ecd9;flex-shrink:0}
.crop-actions label{display:flex;align-items:center;gap:9px;font-size:12px;flex:1;min-width:0}.crop-actions select{min-height:40px;max-width:160px;min-width:0;background:#edf0e6;border:1px solid #adbca0;border-radius:4px;padding:5px;color:#273d22}
.crop-actions .button{font-size:12px;min-height:40px;padding:8px 11px}
.crop-frame{position:absolute;z-index:6;border:2px solid #f6e9c7;box-shadow:0 0 0 200vmax #0c171b99;cursor:move;touch-action:none;background:linear-gradient(to right,transparent calc(33.333% - .5px),#fff7 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#fff7 66.666%,transparent calc(66.666% + .5px)),linear-gradient(to bottom,transparent calc(33.333% - .5px),#fff7 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#fff7 66.666%,transparent calc(66.666% + .5px))}
.crop-handle{position:absolute;width:44px;height:44px;background:transparent;padding:0;touch-action:none;cursor:nwse-resize;transform:translate(-50%,-50%)}
.crop-handle:after{content:'';position:absolute;left:15px;top:15px;width:12px;height:12px;background:#deba80;border:2px solid #fff;border-radius:3px;box-shadow:0 1px 4px #0008}
.crop-handle.nw{left:0;top:0}.crop-handle.ne{left:100%;top:0;cursor:nesw-resize}.crop-handle.sw{left:0;top:100%;cursor:nesw-resize}.crop-handle.se{left:100%;top:100%}
.cropping .study-pane{overflow:visible}.cropping .canvas-well{overflow:hidden}.cropping .image-tag{z-index:7}
.tier-strip{min-height:44px}.tier-strip #tier-context{color:#d4decf}.tier-strip #view-pro{margin-left:auto}.tier-strip #account-open{margin-left:0}
.account-identity{border:1px solid #bdcbb2;background:#e8eddf;border-radius:6px;padding:14px;margin:0 0 15px}
.account-identity strong,.account-identity span{display:block;overflow-wrap:anywhere}.account-identity strong{font-size:17px;color:#344e2a}.account-identity span{font-size:13px;margin-top:7px;color:#475c3a;line-height:1.5}
.account-identity[data-status=error]{background:#f3e9d6;border-color:#bda06b}.account-identity[data-status=checking]{opacity:.8}
.pro-price{margin-top:14px}.pro-price small{font-size:14px}.pro-benefits{line-height:1.7}.pro-purchase-note{font-size:13px;line-height:1.6;color:#4b603e}
.pro-actions{display:flex;flex-direction:column;gap:10px;margin-top:16px}.pro-actions .button{margin:0}.pro-actions .button:not(.primary){background:transparent}
.pro-refund-note{font-size:12px;line-height:1.6;color:#536547}.pro-availability{margin-top:12px}
/* Keep the hosting credit in the help footer, never on top of navigation. */
.hosting-credit{flex-basis:100%;display:flex;justify-content:center;min-width:0;max-width:100%}#nl-badge-frame{position:relative!important;inset:auto!important;bottom:auto!important;right:auto!important;transform:none!important;display:block!important;flex:none;max-width:100%!important;margin:10px auto!important;z-index:0!important}
@media(max-width:1024px){
  body{height:100dvh;overflow:hidden;padding:0}
  #app{height:100dvh;display:grid;grid-template-rows:auto auto minmax(0,1fr);padding-bottom:calc(60px + env(safe-area-inset-bottom))}
  .topbar{position:relative;height:auto;min-height:calc(56px + env(safe-area-inset-top));padding:5px 12px;padding-top:calc(5px + env(safe-area-inset-top));gap:8px}
  .topbar .brand-name{font-size:26px}.topbar .brand-mark{display:none}.header-actions #upload{min-height:44px;font-size:12px;padding:8px 10px}.header-actions #export{min-height:44px;height:44px;width:44px;padding:8px}.header-actions #export span{display:none}
  .tier-strip{padding:3px 12px;gap:8px;min-height:32px;flex-wrap:nowrap;font-size:11px;overflow:hidden}.tier-strip #tier-context{display:none}.tier-strip #tier-label{font-size:10px;letter-spacing:.7px;white-space:nowrap}.tier-strip button{min-height:30px;font-size:11px;padding:4px 9px}
  .layout{display:block;min-height:0;height:100%;margin:0;position:relative;overflow:hidden}
  .studio{padding:7px 12px 5px;height:100%;min-height:0;gap:6px;overflow:hidden}
  .workspace-top{margin:0;min-height:0;gap:5px;display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap}
  .workspace-top>div:first-child{display:flex;align-items:center;gap:8px;min-height:22px}.workspace-top .eyebrow{display:none}.workspace-top h1{font-size:13px;margin:0;max-width:100%;line-height:1.5}.sample-badge{font-size:9px;padding:1px 4px}
  .view-tabs{width:100%;padding:2px;gap:2px;margin:0;align-self:stretch}.view-tabs button{min-height:34px;padding:5px 3px;font-size:12px}
  .studio>.mobile-core{display:grid;grid-template-columns:minmax(0,1fr) 126px;grid-template-rows:auto auto;gap:2px 10px;margin:0;padding:7px 10px;border:1px solid #d1dac7;border-radius:6px;flex-shrink:0}
  .mobile-core .complexity-heading{grid-column:1;grid-row:1;gap:8px;margin:0}.mobile-core .complexity-heading>label{font-size:12px;font-weight:600}.mobile-core .value-count output{font-size:22px;letter-spacing:-1px}.mobile-core .value-count small{font-size:10px}
  .mobile-core .complexity-stepper{grid-column:1;grid-row:2;gap:4px}.mobile-core .complexity-stepper button{width:30px;min-width:30px;height:36px;font-size:20px}.mobile-core .complexity-stepper #count{min-height:36px;height:36px;width:30px}
  .mobile-core .mode-tabs{grid-column:2;grid-row:1/3;align-self:stretch;margin:0;padding:2px;gap:2px}.mobile-core .mode-tabs button{min-height:44px;font-size:12px;padding:7px 3px}.mobile-core .mode-tabs button span{display:none}
  .mobile-core .range-labels,.mobile-core .muted{display:none}.mobile-core .complexity-presets{grid-column:1/-1;grid-row:3;margin:0}.mobile-core .complexity-presets summary{min-height:24px;font-size:11px}.mobile-core .color-presets{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:5px 0}.mobile-core .color-presets button{min-height:44px}.mobile-core .color-presets span{font-size:10px}.mobile-core .preset-pro{font-size:8px}
  .canvas-toolbar{flex-wrap:nowrap;padding:3px 5px;min-height:44px;gap:5px;flex-shrink:0;border:1px solid var(--line);border-radius:6px}
  .toolbar-group{display:flex;gap:3px;flex-basis:auto;width:auto;flex:1}.toolbar-group .tool{width:51px;height:40px;min-height:40px;min-width:44px;gap:2px;font-size:11px}.tool-label{font-size:10px}.canvas-toolbar #canvas-hint{display:none}.canvas-toolbar #undo{min-width:48px;min-height:40px;font-size:12px}
  .image-tools>summary{display:flex;align-items:center;justify-content:center;gap:4px;cursor:pointer;min-width:50px;min-height:40px;font-size:12px;color:#e5d5b7;list-style:none}.image-tools>summary::-webkit-details-marker{display:none}
  .image-tools>div{display:none}.image-tools[open]>div{position:absolute;display:grid;right:-4px;top:44px;background:#f1f3e9;color:#304728;border:1px solid #9cae8d;border-radius:6px;padding:8px;width:220px;z-index:11;box-shadow:0 8px 24px #0007;grid-template-columns:repeat(3,1fr);gap:6px}
  .image-tools .tool{width:100%;color:#425c37;height:52px}.image-tools #reset{grid-column:1/-1;color:#425c37;justify-content:center;font-size:13px}.image-tools .tool-label{white-space:normal}
  .canvas-well{flex:1 1 0;min-height:100px;height:auto;padding:10px;width:100%;border-radius:4px;margin:0}
  .image-frame{width:auto;max-width:100%;gap:8px}.view-side .image-pane{width:calc(50% - 4px)}
  .image-meta{flex-shrink:0;padding:0;font-size:10px;min-height:12px}.image-meta>span:last-child{display:none}
  .value-panel{flex-shrink:0;margin:0}.value-heading{margin:0 0 3px;gap:4px;min-height:24px;font-size:9px}.value-heading #legend-hint{display:none}.value-heading .text-button{min-height:24px;font-size:11px;padding:0}.value-heading #palette-open{margin-left:auto}
  .value-scale{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:5px}.value-swatch{min-height:44px;height:44px;gap:2px}.value-swatch span{font-size:13px}.value-swatch small{font-size:10px}.scale-endpoints,.studio-footer{display:none}
  .sample-peek{flex-shrink:0;padding:4px 8px;gap:8px;margin:0;min-height:38px}.sample-peek #peek-swatch{height:28px;width:28px}.sample-peek b,.sample-peek small{font-size:11px}.sample-peek small{margin-top:2px}.sample-peek #peek-details{min-height:32px;font-size:12px}
  .mobile-nav{padding:3px 10px calc(3px + env(safe-area-inset-bottom));gap:4px;min-height:60px}.mobile-nav button{min-height:48px;font-size:13px}.mobile-nav button[aria-expanded=true]{background:#52674c;color:white}
  .sidebar{display:none;position:absolute;bottom:0;left:0;right:0;height:43dvh;max-height:450px;margin:0;border-top:1px solid #adbc9e;border-radius:12px 12px 0 0;overflow:auto;overscroll-behavior:contain;z-index:10;box-shadow:0 -6px 24px #0003}
  .sidebar-title{position:sticky;top:0;background:#f3f4ef;z-index:2;padding:7px 16px;min-height:44px;border-radius:12px 12px 0 0}.sidebar-title #panel-close{display:flex;color:#506443;width:36px;min-height:36px;height:36px}
  .panel-open .layout{padding-bottom:min(43dvh,450px)}.panel-open .sidebar{display:block}
  .panel-open .workspace-top>div:first-child,.panel-open .canvas-toolbar,.panel-open .value-panel,.panel-open .image-meta,.panel-open .sample-peek{display:none}
  .panel-open .studio{padding-top:5px}.panel-open .mobile-core .complexity-presets{display:none}
  .panel-color .sidebar>.section,.panel-color .sidebar>.sidebar-bottom{display:none}.panel-open:not(.panel-color) .picker-card,.panel-open:not(.panel-color) #paint-mixer-host{display:none}
  .sidebar .picker-card{margin:12px 16px}.sidebar .section summary{padding:14px 16px}.sidebar .section-body{padding:0 16px 16px}.sidebar .muted{font-size:13px}.sidebar .paint-mixer .section-body{max-width:none}.section{border-right:0}
  .sidebar .support-footer{padding:14px 16px 24px;background:#263028;gap:5px 16px;font-size:12px}.sidebar-bottom{padding-top:15px}
  .crop-actions{padding:4px 7px;gap:5px;min-height:44px}.crop-actions label{font-size:0;gap:0}.crop-actions select{font-size:14px;min-height:36px;width:100%;max-width:none}.crop-actions .button{font-size:12px;min-height:36px;white-space:nowrap;padding:7px 9px}
  .cropping .value-panel,.cropping .sample-peek{display:none}
  .toast{bottom:calc(72px + env(safe-area-inset-bottom));font-size:13px}
}
@media(max-width:360px){
  .studio{padding-left:8px;padding-right:8px;gap:4px}.studio>.mobile-core{grid-template-columns:minmax(0,1fr) 114px;gap:2px 6px;padding:6px}.mobile-core .complexity-heading>label{font-size:11px}.mobile-core .value-count small{display:none}.mobile-core .color-presets span{display:none}.mobile-core .color-presets{grid-template-columns:repeat(3,1fr)}.value-scale{grid-template-columns:repeat(5,minmax(40px,1fr))}
  .topbar .brand-name{font-size:24px}.header-actions #upload{font-size:11px;padding:7px}.header-actions #upload svg{width:16px}
}
/* A short landscape screen gets a persistent controls column instead of
   stacking all controls above the painting. */
@media(max-width:1024px) and (max-height:500px) and (orientation:landscape){
  #app{padding-bottom:calc(48px + env(safe-area-inset-bottom))}.topbar{min-height:44px;padding-top:3px;padding-bottom:3px}.header-actions #upload,.header-actions #export{height:36px;min-height:36px}.tier-strip{min-height:27px;padding-top:0;padding-bottom:0}
  .layout,.panel-open .layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;padding-bottom:0}
  .studio{padding:5px 8px;gap:4px}.workspace-top>div:first-child{display:none}.view-tabs button{min-height:30px}.canvas-toolbar{min-height:36px}.toolbar-group .tool{height:32px;min-height:32px;flex-direction:row;width:70px}.tool-label{font-size:10px}.canvas-toolbar #undo,.image-tools>summary{min-height:32px}.image-tools[open]>div{top:36px}
  .canvas-well{min-height:60px;padding:7px}.image-meta,.sample-peek{display:none}.value-scale{display:none}.value-heading{min-height:25px}.value-heading #palette-open{display:inline-flex!important}.value-panel{display:block!important}
  .sidebar,.panel-open .sidebar{display:block;position:relative;inset:auto;height:100%;max-height:none;grid-column:2;grid-row:1;border-left:1px solid #b6c4a9;border-top:0;border-radius:0;box-shadow:none}
  .sidebar-title{border-radius:0;min-height:36px;font-size:13px;padding:3px 12px}.sidebar-title #panel-close{display:none}.sidebar .core-controls{padding:10px 12px;max-width:none}.sidebar .complexity-heading{margin-bottom:4px}.sidebar .complexity-heading>label{font-size:13px}.sidebar .value-count output{font-size:25px}.sidebar .mode-tabs{margin-top:6px}.sidebar .mode-tabs button{min-height:38px;padding:5px}.sidebar .mode-tabs button span{display:none}.sidebar .range-labels,.sidebar .core-controls .muted{display:none}.sidebar .complexity-presets summary{min-height:28px}
  .mobile-nav{min-height:48px;padding-top:0;padding-bottom:env(safe-area-inset-bottom)}.mobile-nav button{min-height:46px}
  .panel-open .workspace-top,.panel-open .canvas-toolbar{display:flex}.panel-open:not(.panel-color) .picker-card,.panel-open:not(.panel-color) #paint-mixer-host{display:revert}
  .panel-color .sidebar>.core-controls{display:none}
}

.pro-inclusions{border-block:1px solid #d0dac5;margin:15px 0;padding:4px 0}.pro-inclusions summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:14px}.pro-refund-note .text-button{color:#365629;min-height:32px;text-decoration:underline}

@media(max-width:1024px){.mobile-core .complexity-stepper button{width:44px;min-width:44px;height:44px}.mobile-core .complexity-stepper #count{min-height:44px;height:44px}}
@media(max-width:1024px) and (max-height:700px) and (orientation:portrait){.workspace-top>div:first-child,.image-meta,.sample-peek{display:none}.value-scale{display:none}.value-heading #palette-open{display:inline-flex!important}.value-heading{min-height:30px}.studio{gap:4px}}

@media(max-width:1024px){.image-tools #sample-button{grid-column:1/-1;min-height:44px;color:#425c37;justify-content:center;font-size:13px}}

body.has-paid-pro .preset-pro{display:none}

@media(max-width:1024px){.panel-color .mix-selected{margin:12px 0 18px}.panel-color #mix-target{height:54px}.panel-color .mix-ratio-heading{margin-bottom:9px}}

/* Prevent comparison buttons from collapsing behind controls on short phones. */
@media(max-width:1024px){.workspace-top{flex-shrink:0}}
@media(max-width:1024px) and (max-height:700px) and (orientation:portrait){
 .panel-open .layout{padding-bottom:38dvh}.panel-open .sidebar{height:38dvh}
 .panel-open .studio>.mobile-core{grid-template-columns:24px minmax(0,1fr) 118px;grid-template-rows:44px;padding:6px;gap:0 6px}
 .panel-open .mobile-core .complexity-heading{grid-column:1;grid-row:1;align-self:center}.panel-open .mobile-core .complexity-heading>label,.panel-open .mobile-core .value-count small{display:none}
 .panel-open .mobile-core .complexity-stepper{grid-column:2;grid-row:1}.panel-open .mobile-core .mode-tabs{grid-column:3;grid-row:1}.panel-open .mobile-core .mode-tabs button{font-size:11px;padding:4px 1px}
 .panel-open .canvas-well{min-height:60px}
}

/* A compact palette is exactly one row. Its complete grid lives in the dialog. */
#value-scale{grid-template-columns:repeat(var(--swatch-count,5),minmax(0,1fr));grid-auto-flow:column;grid-template-rows:1fr}
#value-scale .value-swatch{min-width:0}
.composition-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.composition-actions .button{flex:1;min-width:110px;min-height:44px}
.composition-actions .button:disabled{opacity:.45;cursor:default}
.sidebar-title #panel-undo{margin-left:auto;min-height:44px;color:#405735;font-size:12px;white-space:nowrap}
.sidebar-title #panel-undo:disabled{opacity:.4;cursor:default}
.release-label{flex-basis:100%;text-align:center;color:#bac7b1;font-size:11px;padding:4px}
@media(max-width:1024px){
 .crop-actions select{font-size:16px;min-height:44px}
 .crop-actions .button{min-height:44px}
 .sidebar-title{gap:8px}
 .sidebar-title #panel-close{min-width:44px;min-height:44px}
}
@media(max-width:1024px) and (max-height:500px) and (orientation:landscape){
 .panel-color .sidebar>.core-controls{display:block}
}

/* Safari's browser chrome leaves less height than a full phone screen.
   Reserve the photo first; tools scroll inside a shallower bottom panel. */
#panel-photo-space{display:none}
@media(max-width:1024px) and (min-height:501px){
 .panel-open{--tools-height:clamp(180px,28dvh,300px)}
 .panel-open.photo-priority{--tools-height:clamp(124px,20dvh,190px)}
 .panel-open .layout{padding-bottom:var(--tools-height)}
 .panel-open .sidebar{height:var(--tools-height);max-height:none}
 .panel-open .studio>.mobile-core{grid-template-columns:28px minmax(0,1fr) 120px;grid-template-rows:44px;padding:6px;gap:0 6px}
 .panel-open .mobile-core .complexity-heading{grid-column:1;grid-row:1;align-self:center;margin:0}
 .panel-open .mobile-core .complexity-heading>label,.panel-open .mobile-core .value-count small{display:none}
 .panel-open .mobile-core .complexity-stepper{grid-column:2;grid-row:1}
 .panel-open .mobile-core .mode-tabs{grid-column:3;grid-row:1}
 .panel-open .mobile-core .mode-tabs button{font-size:11px;padding:4px 1px}
 .panel-open .canvas-well{padding:6px;min-height:60px}
 .sidebar-title{gap:4px;padding:4px 10px;min-height:52px}
 .sidebar-title #panel-title{font-size:13px;min-width:0}
 .sidebar-title #panel-undo{margin-left:auto;font-size:11px;padding-inline:4px}
 .sidebar-title #panel-photo-space{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:44px;padding:4px 6px;border:1px solid #bac7af;border-radius:5px;color:#405735;font-size:11px;white-space:nowrap}
 .sidebar-title #panel-photo-space[aria-pressed=true]{background:#405735;color:white;border-color:#405735}
 .sidebar-title #panel-close{width:44px;flex-shrink:0}
}

#account-dialog .purchase-confirmation{display:flex;align-items:flex-start;gap:12px;margin:16px 0;font-size:13px;line-height:1.65;cursor:pointer;min-height:44px}
#account-dialog .purchase-confirmation[hidden]{display:none}
#account-dialog .purchase-confirmation input{width:20px;min-width:20px;height:20px;min-height:20px;padding:0;margin:4px 0;accent-color:#52674c;flex-shrink:0}
#account-dialog .purchase-confirmation a{color:#38582c;text-decoration:underline}
