@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap');
:root{--paper:#fcf8f0;--wine:#7b3043;--ink:#332a2b;--line:#e7dfd4;--muted:#786c69}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px 'DM Sans',sans-serif}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #bd694c;outline-offset:4px}header{height:90px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 5%}.brand{display:flex;align-items:center;color:var(--wine);font-size:26px;font-weight:700;text-decoration:none;letter-spacing:-1px}.brand .serif{font-family:'Playfair Display',Georgia,serif;font-weight:500}.brand-mark{font-size:43px;margin-right:12px}.header-note{font-size:14px;color:var(--muted)}.text-button{border:0;background:none;color:var(--wine);font-size:14px;padding:8px}.text-button span{display:inline-grid;place-items:center;margin-left:5px;border:1px solid var(--wine);width:20px;height:20px;border-radius:50%}main{max-width:1600px;margin:auto;padding:0 5%}.intro{display:flex;align-items:center;justify-content:space-between;padding:37px 0 30px}.eyebrow{font-size:12px;letter-spacing:1.9px;font-weight:600;color:var(--wine);margin:0 0 10px}h1{font-family:'Playfair Display',Georgia,serif;font-size:48px;line-height:1.15;font-weight:500;margin:0;letter-spacing:-1.5px}h1 em{color:var(--wine)}.intro>p{font-size:15px;line-height:1.65;color:var(--muted);margin:0}.workspace{display:grid;grid-template-columns:345px minmax(0,1fr);border:1px solid var(--line);border-radius:18px;overflow:hidden;background:#fffdf8;box-shadow:0 10px 38px #52352905}.controls{padding:23px;border-right:1px solid var(--line)}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 15px}.section-heading:not(:first-child){margin-top:25px}h2{font-size:16px;margin:0}.section-heading h2{font-size:12px;color:#a58277;display:flex;align-items:center;gap:10px}.section-heading h2 span{font-size:15px;color:var(--ink);font-weight:600}.count{color:var(--muted);font-size:12px}.pattern-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.pattern-choice{position:relative;border:2px solid transparent;padding:3px;background:transparent;border-radius:10px;min-width:0}.pattern-choice[aria-pressed=true]{border-color:var(--wine)}.pattern-choice span{display:block;height:63px;border-radius:5px;background-size:100px}.pattern-choice[aria-pressed=true]:after{content:'✓';position:absolute;right:0;bottom:0;background:var(--wine);color:white;width:18px;height:18px;border-radius:50%;font-size:12px}.colours{display:flex;gap:12px;flex-wrap:wrap}.colour-item{position:relative}.colour-item input{height:42px;width:42px;border:0;padding:0;background:none;cursor:pointer;border-radius:50%}.colour-item input::-webkit-color-swatch-wrapper{padding:2px}.colour-item input::-webkit-color-swatch{border:1px solid #0002;border-radius:50%}.colour-item input::-moz-color-swatch{border:1px solid #0002;border-radius:50%}.small-label{font-size:11px;letter-spacing:1.2px;color:var(--muted);margin:17px 0 10px}.palettes{display:flex;gap:8px}.palette{border:1px solid var(--line);display:flex;padding:3px;background:white;border-radius:6px;overflow:hidden;min-height:30px}.palette span{width:13px;height:22px}.range-label{display:flex;justify-content:space-between;font-size:14px;margin-top:16px}.range-label output{color:var(--muted);font-size:13px}input[type=range]{width:100%;accent-color:var(--wine);height:22px;cursor:pointer;margin:9px 0 2px}.shuffle{border:1px solid var(--line);border-radius:8px;background:transparent;width:100%;padding:11px;margin-top:20px;font-size:14px;color:var(--wine)}.shuffle:hover,.text-button:hover{background:#f5e9e4}.hint{font-size:13px;line-height:1.6;color:var(--muted)}.preview-section{padding:24px;min-width:0;background:#f5f0e7}.preview-toolbar{display:flex;justify-content:space-between;align-items:center;margin:0 0 20px}.preview-toolbar .eyebrow{font-size:10px;color:var(--muted);margin-bottom:7px}.preview-toolbar h2{font-family:'Playfair Display',Georgia,serif;font-size:23px;font-weight:500}.segmented{display:flex;background:#e9e2d8;border-radius:7px;padding:3px}.segmented button{background:none;border:0;border-radius:5px;padding:8px 13px;font-size:13px;color:var(--muted)}.segmented button[aria-pressed=true]{background:#fffdf8;color:var(--ink);box-shadow:0 1px 4px #0001}.canvas-wrap{position:relative;overflow:hidden;min-height:490px;height:51vh;max-height:720px;border-radius:9px;background:#e9e2d8;display:grid;place-items:center}#canvas{width:100%;height:100%;background-repeat:repeat;background-position:0 0}#canvas.single{width:min(85%,480px);height:auto;aspect-ratio:1;background-size:100% 100%!important;background-repeat:no-repeat;box-shadow:0 8px 30px #0001}.canvas-label{position:absolute;bottom:17px;left:50%;transform:translateX(-50%);background:#fffc;padding:8px 17px;border-radius:4px;font-size:10px;letter-spacing:2px;pointer-events:none}.preview-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 0;color:var(--muted);font-size:12px}.preview-footer label{display:flex;align-items:center;gap:9px;white-space:nowrap}.preview-footer input{width:80px;margin:0}.preview-footer output{width:35px}.download-bar{border-top:1px solid #ded5c8;padding-top:18px;display:flex;align-items:center;justify-content:space-between;gap:12px}.download-bar h3{font-size:16px;margin:0 0 5px}.download-bar p{font-size:13px;color:var(--muted);margin:0}.primary{background:var(--wine);color:#fff9f2;border:0;border-radius:8px;padding:15px 22px;font-size:14px;font-weight:600}.primary span{margin-left:20px;font-size:19px}.primary:hover{background:#602134}.primary:disabled{opacity:.6;cursor:wait}footer{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;padding:23px 0 30px}dialog{border:1px solid var(--line);border-radius:16px;padding:34px;max-width:470px;width:calc(100% - 32px);color:var(--ink);background:var(--paper);box-shadow:0 30px 100px #0003}dialog::backdrop{background:#30222870;backdrop-filter:blur(3px)}dialog h2{font:30px 'Playfair Display',Georgia,serif;margin-bottom:16px}dialog p,dialog li{font-size:15px;line-height:1.65}dialog label{display:block;font-size:14px;margin:20px 0 8px}dialog select{width:100%;border:1px solid #cfc2b7;background:#fffdf8;border-radius:7px;padding:12px;font-size:14px}dialog .primary{width:100%;margin-top:10px}.close{position:absolute;right:14px;top:10px;font-size:28px;color:var(--muted);border:0;background:transparent}dialog li{margin-bottom:13px}dialog ol{padding-left:21px}#status{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);padding:12px 20px;color:white;background:var(--wine);border-radius:8px;font-size:14px;z-index:5;display:none}#status.visible{display:block}@media(min-width:1450px){.workspace{grid-template-columns:380px 1fr}.controls{padding:28px}.pattern-choice span{height:72px}}@media(max-width:1000px){main{padding:0 3%}header{padding:0 3%}.workspace{grid-template-columns:285px 1fr}.controls{padding:17px}.pattern-choice span{height:51px}.preview-section{padding:18px}.preview-footer{flex-wrap:wrap}.canvas-wrap{min-height:490px}.download-bar{align-items:stretch;flex-direction:column}.header-note{display:none}}@media(max-width:700px){header{height:72px;padding:0 5%}.brand{font-size:23px}main{padding:0 4%}.intro{padding:27px 0 24px}.intro h1{font-size:37px}.intro>p{display:none}.workspace{display:flex;flex-direction:column}.controls{order:2;border-right:0;border-top:1px solid var(--line);padding:22px}.preview-section{padding:16px}.canvas-wrap{height:340px;min-height:0}.preview-toolbar h2{font-size:21px}.preview-toolbar .eyebrow{font-size:9px}.segmented button{padding:8px 10px}.preview-footer{padding:10px 0}.download-bar{flex-direction:row;align-items:center}.download-bar p{display:none}.download-bar h3{font-size:14px}.primary{padding:12px 16px}.primary span{margin-left:9px}.pattern-choice span{height:75px}.section-heading h2 span{font-size:16px}.range-label{font-size:16px}input[type=range]{height:30px}.colour-item input{width:46px;height:46px}.palette{min-height:38px}.palette span{width:17px;height:28px}footer{font-size:11px;gap:15px}.preview-footer>span{max-width:52%;line-height:1.5}}@media(prefers-reduced-motion:no-preference){button{transition:background .15s,box-shadow .15s}}

/* Keep the expanded collection within reach of the colour and size controls. */
.pattern-grid{max-height:340px;overflow-y:auto;overscroll-behavior:contain;padding:4px;scrollbar-gutter:stable}

/* Account controls follow the editor's existing wine-and-cream palette. */
.header-actions{display:flex;align-items:center;gap:12px}.account-button{border:1px solid var(--wine);border-radius:8px;background:transparent;color:var(--wine);padding:10px 15px;font-size:14px;min-height:44px;white-space:nowrap}.account-button:hover{background:#f5e9e4}.account-button:disabled{opacity:.55;cursor:wait}.google-button{display:block;width:100%;min-height:48px;padding:12px 18px;border:1px solid #747775;border-radius:6px;color:#1f1f1f;background:white;font-size:16px;font-weight:500}.google-button:hover{background:#f2f2f2}.google-button:disabled{opacity:.6;cursor:wait}#account-dialog [hidden]{display:none}#account-dialog .account-note{font-size:14px;color:var(--muted)}#account-email{display:block;overflow-wrap:anywhere}#account-message{font-size:14px;color:var(--wine);margin-bottom:0}#account-message:empty{display:none}
@media(max-width:700px){header{height:auto;min-height:72px;flex-wrap:wrap;gap:8px;padding-top:12px;padding-bottom:12px}.header-actions{gap:4px;margin-left:auto}.header-actions .text-button{font-size:14px;padding:7px}.account-button{padding:9px 12px}.header-note{display:none}}

.plan-summary{margin:24px 0;padding:20px 0;border-top:1px solid #d8cfc5;border-bottom:1px solid #d8cfc5}.plan-summary button{margin:8px 8px 0 0}#plans-dialog{width:min(720px,calc(100% - 32px));max-width:720px}.plan-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}.plan-cards section{padding:22px;border:1px solid #d8cfc5;border-radius:16px}.plan-cards h3{font-size:24px;margin:0}.plan-price{font-size:30px;font-weight:600}.plan-price span{font-size:16px;font-weight:400}.plan-cards .primary{width:100%;font-size:16px}.plan-cards button:disabled{opacity:.55;cursor:not-allowed}@media(max-width:550px){.plan-cards{grid-template-columns:1fr}}

.auth-divider{text-align:center;color:var(--muted);margin:22px 0 0}#email-sign-in-form label{margin-top:12px}#sign-in-email{box-sizing:border-box;width:100%;min-height:48px;padding:12px;border:1px solid var(--line);border-radius:7px;background:#fffdf8;color:var(--ink);font:inherit}#sign-in-email:focus-visible{outline:2px solid var(--wine);outline-offset:2px}

.colour-item{display:flex;flex-direction:column;align-items:center;gap:7px}.colour-item input.hex-input{width:78px;height:34px;padding:5px 6px;border:1px solid var(--line);border-radius:6px;background:#fffdf8;color:var(--ink);font:12px ui-monospace,monospace;text-align:center;cursor:text}.colour-item input.hex-input[aria-invalid=true]{border-color:var(--wine)}.palettes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.palette{width:100%;min-width:0}.palette span{flex:1;min-width:0;width:auto}.palette:nth-child(5){grid-column:1}#hex-help{margin:10px 0 0}

.pattern-categories{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}.category-button{border:1px solid var(--line);border-radius:999px;background:#fffdf8;color:var(--muted);padding:8px 11px;font-size:12px;line-height:1.3;min-height:36px}.category-button:hover{background:#f5e9e4;color:var(--wine)}.category-button[aria-pressed=true]{background:var(--wine);border-color:var(--wine);color:#fff9f2}.pattern-choice[hidden]{display:none}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.pattern-search-row{display:flex;gap:8px;flex-wrap:wrap}.pattern-search-row input{width:100%;min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:8px;background:#fffdf8;color:var(--ink);font-size:14px}.favourite-note{font-size:11px;color:var(--muted);margin:8px 0 12px}.editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.editor-actions #favourite{margin-left:auto}.editor-actions button:disabled{cursor:default}.editor-actions #favourite[aria-pressed=true]{background:var(--wine);color:var(--paper)}#patterns-empty{padding:14px 0;font-size:14px;color:var(--muted)}#patterns-empty[hidden]{display:none}

.colour-picker-label{display:flex;flex-direction:column;align-items:center;gap:5px;width:78px;cursor:pointer;color:var(--wine);font-size:11px}.colour-item .colour-picker-label input[type=color]{width:78px;height:44px;border:1px solid var(--line);border-radius:8px;padding:3px;background:#fffdf8}.colour-picker-label input[type=color]::-webkit-color-swatch-wrapper{padding:0}.colour-picker-label input[type=color]::-webkit-color-swatch{border:1px solid #0002;border-radius:4px}.colour-picker-label input[type=color]::-moz-color-swatch{border:1px solid #0002;border-radius:4px}

.usage-note{font-size:12px!important;line-height:1.5}.usage-note a{color:var(--wine)}.about-patterns{padding:44px 0 12px;max-width:1100px}.about-patterns h2{font-family:Georgia,serif;font-size:30px;font-weight:500}.about-patterns p{color:var(--muted);line-height:1.75;font-size:15px}.pattern-guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:36px}.pattern-guide-grid h3{font-size:18px}#usage-rights{scroll-margin-top:24px}@media(max-width:700px){.pattern-guide-grid{grid-template-columns:1fr;gap:12px}.about-patterns{padding-top:30px}}
