/* Rails-native components with Tailwind-compatible design tokens. */
:root{--paper:#faf9f6;--ink:#203e34;--muted:#7a8178;--line:#e5e6de;--green:#244d3d;--accent:#d96b42;--radius:.65rem;--font-sans:Arial,Helvetica,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font-sans);font-size:14px;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:inherit}button{color:inherit}h1,h2,h3,p{margin-top:0}h1,h2{letter-spacing:-.035em}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[contenteditable]:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}[hidden]{display:none!important}form{margin:0}input:not([type=checkbox]):not([type=file]):not([type=submit]):not([type=color]),textarea,select{width:100%;border:1px solid var(--line);background:#fff;border-radius:6px;padding:10px 12px;color:var(--ink);min-width:0}input[type=color]{border:0;padding:0;width:30px;height:25px;background:none;cursor:pointer}input[type=checkbox]{accent-color:var(--green)}label{display:block;font-size:12px;font-weight:600}label>input,label>select{margin-top:7px}label+label{margin-top:18px}input[type=submit]{cursor:pointer}.muted{color:var(--muted);line-height:1.7}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.16em;color:var(--muted)}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 20px;border-radius:7px;border:1px solid transparent;font-size:12px;font-weight:600;text-decoration:none;white-space:nowrap;transition:background .15s,transform .15s}.button:hover{filter:brightness(.96)}.button.primary{background:var(--green);color:white;box-shadow:0 2px 3px #00000008}.button.secondary{background:white;border-color:var(--line)}.button.ghost{background:transparent}.button.small{padding:8px 12px;font-size:11px}.button.full{width:100%}.text-button{padding:0;border:0;background:none;font-size:11px;text-decoration:none}.danger{color:#b44535!important}.site-header{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 42px;border-bottom:1px solid var(--line);background:var(--paper)}.wordmark{text-decoration:none;font-size:24px;font-weight:700;letter-spacing:-1px;display:flex;align-items:center;gap:10px}.brand-symbol{display:inline-flex;align-items:center;justify-content:center;background:var(--green);color:var(--paper);font-family:Georgia,serif;font-size:25px;font-weight:400;letter-spacing:-3px;padding-right:3px;border-radius:8px;width:33px;height:35px}.brand-dot{align-self:flex-start;font-size:10px;letter-spacing:0;margin-top:3px;margin-left:-5px}.site-header nav{display:flex;align-items:center;gap:25px}.nav-link{font-size:12px;text-decoration:none}.account-email,.header-note{font-size:11px;color:var(--muted)}.flash{padding:12px 42px;font-size:12px;background:#e7efe6;border-bottom:1px solid var(--line)}.flash.alert,.error-message{background:#fff0e9;color:#944b32;padding:12px 16px;border-radius:6px;font-size:12px}.error-message{margin-bottom:20px}.auth-shell{min-height:calc(100vh - 76px);display:grid;grid-template-columns:1fr 1fr}.auth-intro{padding:70px 11%;position:relative;overflow:hidden;background:#edeee5;border-right:1px solid var(--line)}.auth-intro h1{font-family:Georgia,serif;font-size:clamp(45px,5vw,76px);font-weight:400;line-height:1.07;margin:27px 0}.auth-intro h1 em,.dashboard h1 em{color:#8a9876;font-weight:400}.auth-intro>p{color:#6d786b;max-width:310px;font-size:14px;line-height:1.8}.intro-card{margin:55px 0 15px;width:min(360px,95%);aspect-ratio:7/4;background:#f7f3e8;box-shadow:0 24px 45px #1c302721;transform:rotate(-7deg);padding:30px 26px;position:relative}.intro-card>span{display:block;font-family:Georgia,serif;font-size:20px;letter-spacing:-.5px}.intro-card small{font-size:10px;display:block;margin-top:14px;color:var(--muted)}.intro-card b{position:absolute;bottom:16px;right:22px;font-family:Georgia,serif;font-size:42px;letter-spacing:-6px;font-weight:400}.auth-panel{display:flex;align-items:center;justify-content:center;padding:50px 35px}.auth-form{width:345px;max-width:100%}.auth-form h2{font-size:31px;margin:15px 0 8px;font-weight:500}.auth-form>.muted{margin-bottom:32px;font-size:12px}.auth-form label{margin-bottom:20px}.auth-form label+label{margin-top:0}.auth-switch{margin-top:26px;font-size:12px;color:var(--muted);text-align:center}.auth-switch a{font-weight:600;color:var(--green)}.form-aside{text-align:right;margin:-7px 0 22px;font-size:11px}.simple-auth{max-width:420px;margin:90px auto;padding:20px}.simple-auth h1{font-size:30px}.simple-auth form{margin:25px 0}.simple-auth .button{margin-top:24px}.dashboard{max-width:1330px;margin:0 auto;padding:65px 60px 25px}.dashboard-heading{display:flex;justify-content:space-between;align-items:center;gap:30px}.dashboard h1{font-family:Georgia,serif;font-weight:400;font-size:58px;line-height:1.12;margin:20px 0}.dashboard-heading .muted{font-size:13px}.collection-bar{display:flex;justify-content:space-between;align-items:center;margin:58px 0 24px;padding-bottom:16px;border-bottom:1px solid var(--line)}.collection-bar h2{font-size:15px;margin:0;font-weight:500;letter-spacing:0}.collection-bar>span{font-size:11px;color:var(--muted)}.count{font-size:10px;background:#e8ebe1;color:#6e7b68;padding:3px 7px;border-radius:5px;margin-left:8px}.card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.thumbnail-link{display:block;position:relative;background:#eceee6;padding:35px 25px;overflow:hidden;border:1px solid var(--line);border-radius:10px;text-decoration:none}.thumbnail{position:relative;width:100%;aspect-ratio:7/4;box-shadow:0 9px 22px #203e3420;overflow:hidden}.thumbnail-face{position:absolute;width:700px;height:400px;transform-origin:0 0;overflow:hidden}.edit-badge{position:absolute;bottom:12px;right:14px;font-size:10px;opacity:0;transition:opacity .15s}.thumbnail-link:hover .edit-badge{opacity:1}.collection-meta{display:flex;justify-content:space-between;align-items:center;margin-top:19px}.collection-meta h3{font-size:14px;font-weight:500;margin-bottom:8px}.collection-meta p{font-size:10px;color:var(--muted);margin:0}.status-dot{width:7px;height:7px;border-radius:50%;background:#c5c9bc}.status-dot.live{background:#6d966b}.collection-actions{display:flex;gap:14px;margin-top:15px}.collection-actions a{font-size:10px;text-decoration:none}.collection-actions form{margin-left:auto}.new-card-tile{width:100%;min-height:275px;border:1px dashed #cbd0c1;background:transparent;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;color:var(--muted)}.new-card-tile:hover{background:#f0f2e9}.new-card-icon{font-size:26px;color:#829476;background:#ebeee4;border-radius:50%;height:49px;width:49px;display:grid;place-items:center;margin-bottom:5px}.new-card-tile strong{font-size:14px;font-weight:500;color:var(--ink)}.new-card-tile>span:last-child{font-size:11px}.dashboard-footer{margin-top:100px;border-top:1px solid var(--line);padding-top:20px;display:flex;justify-content:space-between;color:var(--muted);font-size:10px}.editor-topbar{height:66px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 24px;border-bottom:1px solid var(--line);background:#fff}.editor-title{display:flex;align-items:center;gap:13px;min-width:0}.back-link{text-decoration:none;font-size:20px}.editor-title input:not([type]){padding:7px 0;border:0;background:none;width:190px;font-weight:600;font-size:13px}.save-status{font-size:10px;color:#889280;max-width:350px;line-height:1.4}.save-status[data-state=error]{color:#b44535}.save-status[data-state=pending]{color:#a08051}.toolbar-actions{display:flex;gap:7px}.editor-grid{display:grid;grid-template-columns:210px minmax(330px,1fr) 270px;height:calc(100dvh - 142px);min-height:0;grid-template-rows:minmax(0,1fr)}.left-panel,.right-panel{background:#fff;overflow:auto;scrollbar-width:thin}.left-panel{border-right:1px solid var(--line);display:flex;flex-direction:column}.right-panel{border-left:1px solid var(--line);padding-bottom:24px}.panel-heading{padding:25px 20px 18px}.panel-heading h2{font-size:18px;font-weight:500;letter-spacing:-.5px;margin:9px 0 0}.insert-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;padding:0 17px 25px}.insert-grid button{height:66px;border:1px solid var(--line);border-radius:6px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;font-size:10px}.insert-grid button:hover{background:#f2f5ee;border-color:#b4c0a7}.insert-grid button b{font-family:Georgia,serif;font-size:23px;font-weight:400;line-height:1}.layers-heading{border-top:1px solid var(--line);padding:18px 20px 0;display:flex;justify-content:space-between}.layers-heading h3{font-size:12px;font-weight:600;margin:0}.layers-heading>span{font-size:10px;color:var(--muted)}.panel-caption{font-size:10px;color:var(--muted);line-height:1.6;margin:10px 0 14px}.left-panel>.panel-caption{padding:0 20px}.layer-list{padding-bottom:15px;max-height:45vh;overflow:auto}.layer-row{display:flex;align-items:center;gap:3px;padding:9px 10px;border-top:1px solid transparent;border-bottom:1px solid transparent;min-height:38px}.layer-row.selected{background:#edf2e8;border-color:#e2e8da}.layer-row.drop-target{border-top-color:var(--accent)}.layer-name{display:flex;align-items:center;gap:9px;padding:0;border:0;background:none;min-width:0;text-align:left;flex:1;font-size:10px}.layer-name>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layer-symbol{font-size:14px;width:17px;flex-shrink:0;text-align:center;color:#8e9a86}.layer-toggle{border:0;background:none;font-size:12px;color:#96a18c;padding:2px}.panel-bottom{margin-top:auto;padding:22px 20px;border-top:1px solid var(--line)}.panel-bottom>p{font-size:11px;color:#8a9383;line-height:1.7;margin-top:12px}.canvas-panel{display:flex;flex-direction:column;background:#eef0e9;min-width:0;overflow:hidden}.canvas-toolbar{height:58px;min-height:58px;padding:0 20px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #e1e5da;background:#f4f5ef}.segmented{display:flex;background:#e7eadf;padding:3px;border-radius:6px}.segmented button{background:none;border:0;border-radius:4px;padding:7px 17px;font-size:10px;color:#87917e}.segmented button.active{background:white;color:var(--ink);box-shadow:0 1px 4px #0000000b}.card-size{font-size:9px;color:#8a9482}.zoom-controls{display:flex;align-items:center;gap:9px;font-size:10px}.zoom-controls button{border:0;background:none;padding:5px;color:#6e7f65}.zoom-controls span{min-width:30px;text-align:center}.canvas-workspace{flex:1;position:relative;overflow:hidden;background-image:radial-gradient(#a8b29a55 .7px,transparent .7px);background-size:16px 16px;min-height:350px;touch-action:none}.canvas-workspace.file-over{box-shadow:inset 0 0 0 3px var(--accent)}.canvas-world{position:absolute;left:calc(50% - 350px);top:calc(50% - 200px);width:700px;height:400px;transform-origin:center center}.card-face{position:absolute;width:700px;height:400px;overflow:hidden;isolation:isolate;background:#fff}.editor-card{box-shadow:0 15px 40px #273c2521;touch-action:none}.card-element{user-select:none}.element-surface p,.element-surface div{margin:0}.element-surface ul,.element-surface ol{margin:0;padding-left:1.3em}.element-surface a{color:inherit;text-decoration:underline}.element-surface img{display:block}.selection-overlay{position:absolute;inset:0;pointer-events:none}.selection-box{position:absolute;top:0;left:0;outline:1.5px solid #d96b42;transform-origin:0 0;pointer-events:auto;cursor:move}.selection-box.locked{outline-style:dashed;outline-color:#8c9883;pointer-events:none}.selection-label{position:absolute;left:0;top:-23px;background:#d96b42;color:#fff;font-size:9px;padding:4px 6px;white-space:nowrap;pointer-events:none}.locked .selection-label{background:#8c9883}.resize-handle{position:absolute;right:-5px;bottom:-5px;border:1.5px solid #d96b42;background:white;width:10px;height:10px;padding:0;cursor:nwse-resize;border-radius:1px}.rotate-handle{position:absolute;left:calc(50% - 10px);top:-37px;width:20px;height:20px;border:1px solid #d96b42;border-radius:50%;padding:0;background:white;color:#b75f3d;font-size:12px;cursor:grab}.empty-canvas-label{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;text-align:center;color:#a5aa9d;font-family:Georgia,serif;font-size:26px}.empty-canvas-label small{display:block;font-family:Arial,sans-serif;font-size:11px;margin-top:12px}.canvas-footer{height:37px;min-height:37px;display:flex;align-items:center;justify-content:space-between;padding:0 15px;gap:10px;border-top:1px solid #dde1d4;font-size:9px;color:#8a9481;background:#f4f5ef}.inline-label{display:flex;align-items:center;gap:6px;font-size:10px;font-weight:400;color:var(--muted)}.inline-label input{margin:0}.right-panel>.inline-label{margin:10px 20px}.background-properties{padding:0 20px 20px;border-bottom:1px solid var(--line)}.property-label{margin:0 0 12px!important;min-width:0}.property-label>span{font-size:10px;color:#828b7c;font-weight:400}.right-panel input:not([type=checkbox]):not([type=color]),.right-panel select{padding:8px 9px;font-size:11px;background:#fdfdfa}.swatches{display:flex;gap:8px;margin-top:13px}.swatches button{width:23px;height:23px;border:1px solid #d5dacd;border-radius:50%;font-size:13px;padding:0;background:#fff}.no-selection{padding:50px 25px;text-align:center;color:#9aa18f}.no-selection>span{font-size:33px}.no-selection p{font-size:12px;line-height:1.7;margin:18px 0 12px}.no-selection small{font-size:10px;line-height:1.6}.right-panel [data-card-editor-target=inspector]{padding:20px}.property-heading{font-size:11px;letter-spacing:0;font-weight:600;margin:22px 0 14px;padding-top:17px;border-top:1px solid var(--line)}.property-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}.order-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.order-grid button{border:1px solid var(--line);background:#fdfdfa;padding:8px 5px;font-size:9px;border-radius:4px}.order-grid button:hover{background:#edf2e8}.action-grid{margin-top:20px}.color-picker-row{display:flex;align-items:center;gap:12px;font-size:10px}.color-picker-row label{font-size:9px;font-weight:400;display:flex;gap:5px;align-items:center}.color-picker-row input{margin:0}.color-picker-row button{margin-left:auto;font-size:9px}.rich-toolbar{display:flex;flex-wrap:wrap;gap:4px;border:1px solid var(--line);border-bottom:0;border-radius:5px 5px 0 0;background:#f7f8f3;padding:5px}.rich-toolbar button{background:white;border:1px solid var(--line);border-radius:3px;padding:4px 7px;font-size:10px}.rich-editor{border:1px solid var(--line);border-radius:0 0 5px 5px;background:#fff;min-height:90px;padding:10px;line-height:1.5;margin-bottom:15px;font-size:12px;overflow-wrap:anywhere}.rich-editor p{margin:0}.rich-editor a{text-decoration:underline;color:var(--accent)}.editor-context{position:fixed;z-index:50;min-width:175px;background:white;border:1px solid var(--line);padding:5px;box-shadow:0 8px 30px #0002;border-radius:7px}.editor-context button{display:block;text-align:left;border:0;background:none;width:100%;padding:10px;font-size:11px;border-radius:4px}.editor-context button:hover{background:#edf2e8}dialog{border:1px solid var(--line);border-radius:15px;padding:28px;box-shadow:0 30px 90px #0003;color:var(--ink);background:var(--paper)}dialog::backdrop{background:#10251ec0;backdrop-filter:blur(4px)}.preview-dialog{width:min(1000px,94vw);max-height:94vh}.share-dialog{width:min(600px,94vw);max-height:90vh;overflow:auto}.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}.dialog-heading h2{margin:8px 0 0;font-size:25px;font-weight:400;font-family:Georgia,serif}.share-actions{display:flex;gap:12px;margin:15px 0 30px}.share-dialog h3{font-size:15px;margin-bottom:10px}.share-dialog .muted{font-size:12px}.share-dialog textarea{margin:15px 0 10px;font-family:monospace;font-size:11px;resize:vertical}.embed-preview{width:100%;border:1px solid var(--line);border-radius:8px;margin-top:20px;background:#eef0e9}.public-card-page{max-width:1100px;margin:0 auto;text-align:center;padding:45px 20px 20px}.public-card-page h1{font-family:Georgia,serif;font-size:32px;font-weight:400;margin:15px 0 0}.card-viewer{width:100%;text-align:center}.viewer-scene{position:relative;perspective:1600px;height:480px;overflow:hidden;min-height:180px}.physical-card{position:absolute;top:50%;left:50%;width:700px;height:400px;transform-style:preserve-3d;transition:transform .45s cubic-bezier(.2,.7,.2,1);cursor:grab;touch-action:pan-y}.physical-card.is-dragging{transition:none;cursor:grabbing}.front-face,.back-face{backface-visibility:hidden;-webkit-backface-visibility:hidden;box-shadow:0 20px 50px #203e342b}.front-face{transform:rotateY(0deg)}.back-face{transform:rotateY(180deg)}.viewer-controls{display:flex;align-items:center;justify-content:center;gap:15px;flex-wrap:wrap}.face-pill{font-size:9px;background:#e7ecdf;border-radius:20px;padding:6px 12px;color:#758567}.viewer-hint{font-size:10px;color:#9aA18f;margin:21px 0 0}.public-footer{font-size:10px;color:#9aa18f;margin:40px 0 10px}.public-footer a{margin-left:8px;color:var(--green)}.embed-body{background:transparent;margin:0;overflow:hidden}.embed-body>.card-viewer{height:100dvh;display:flex;flex-direction:column}.embed-body .viewer-scene{flex:1;min-height:80px;height:auto}.embed-body .viewer-controls{gap:8px;flex-shrink:0}.embed-body .viewer-hint{margin:10px 0 12px}.embed-body .viewer-controls .button{font-size:10px;padding:6px 8px}
@media(min-width:1600px){.editor-grid{grid-template-columns:235px minmax(400px,1fr) 300px}.editor-title input:not([type]){width:250px}}
@media(max-width:1150px){.editor-grid{grid-template-columns:175px minmax(300px,1fr) 240px}.site-header{padding:0 25px}.card-size{display:none}.editor-title .save-status{max-width:130px}.editor-title input:not([type]){width:150px}.canvas-footer>span:last-child{display:none}.toolbar-actions{gap:3px}.toolbar-actions .button{padding:8px}.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard{padding:45px 35px}.dashboard h1{font-size:48px}}
@media(max-width:850px){.site-header{height:65px;padding:0 20px}.header-note,.account-email{display:none}.site-header nav{gap:15px}.auth-shell{grid-template-columns:1fr;min-height:calc(100vh - 65px)}.auth-intro{display:none}.auth-panel{padding:55px 25px}.editor-grid{grid-template-columns:150px minmax(320px,1fr) 230px;height:calc(100dvh - 190px);min-width:750px}.editor{overflow-x:auto}.editor-topbar{min-width:750px;height:auto;min-height:90px;flex-wrap:wrap;padding:12px 18px;gap:12px}.canvas-toolbar{padding:0 12px}.canvas-footer>span:first-child{display:none}.panel-heading{padding:20px 14px 15px}.insert-grid{padding:0 10px 20px}.dashboard-heading{align-items:flex-start}.dashboard h1{font-size:42px}.dashboard-heading>.button,.dashboard-heading>form{margin-top:30px}.collection-bar>span{display:none}.card-grid{gap:24px}.public-card-page{padding-top:35px}.viewer-scene{height:440px}}
@media(max-width:550px){.dashboard{padding:35px 22px}.dashboard-heading{display:block}.dashboard-heading>form{margin-top:25px}.dashboard h1{font-size:40px}.collection-bar{margin-top:40px}.card-grid{grid-template-columns:1fr;gap:30px}.new-card-tile{min-height:230px}.dashboard-footer{margin-top:60px}.viewer-scene{height:310px}.viewer-controls{gap:8px}.public-footer{line-height:1.8}.public-footer a{display:block}.dialog-heading h2{font-size:21px}.preview-dialog{padding:15px}.share-dialog{padding:20px}.wordmark{font-size:21px}.simple-auth{margin:50px 20px}.save-status{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* Keep Layers usable in shorter editor windows; secondary help can scroll away. */
.left-panel>*{flex-shrink:0}.layer-list{flex:1;min-height:150px;max-height:350px;overflow:auto}
@media(max-height:850px){.panel-bottom{display:none}}
.viewer-hint{min-height:26px;padding:6px 12px;display:inline-block;border-radius:20px;transition:color .15s,background .15s}
.card-viewer[data-flip-state=hint] .viewer-hint{background:#e7ecdf;color:#49613d}
.card-viewer[data-flip-state=ready] .viewer-hint{background:#f7e3d7;color:#8e4225;font-weight:600}

/* Public landing page: the showcase is the published iframe, not an illustration. */
.home-page { max-width: 1360px; margin: 0 auto; padding: 60px 48px 24px; }
.home-hero { display: grid; grid-template-columns: .85fr 1.15fr; gap: 50px; align-items: center; min-height: 580px; }
.home-copy h1 { font-family: Georgia, serif; font-size: clamp(48px, 5.1vw, 72px); line-height: 1.08; font-weight: 400; margin: 25px 0; }
.home-copy h1 em { color: #8a9876; font-weight: 400; }
.home-copy > p { max-width: 370px; color: #78816f; font-size: 14px; line-height: 1.9; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin: 30px 0 40px; }
.home-demo-link { font-size: 11px; text-decoration: none; border-bottom: 1px solid #bdc7b0; padding: 5px 0; }
.home-detail { display: flex; flex-wrap: wrap; gap: 18px; color: #8c9780; font-size: 8px; letter-spacing: .08em; }
.home-showcase { min-width: 0; border: 1px solid #dfe5d5; border-radius: 18px; background-color: #eef0e7; background-image: radial-gradient(#a8b29a44 .7px, transparent .7px); background-size: 16px 16px; overflow: hidden; }
.home-demo-heading { display: flex; align-items: center; justify-content: space-between; padding: 24px 25px 0; gap: 15px; }
.home-demo-heading > .eyebrow { display: flex; align-items: center; gap: 8px; }
.home-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #74916b; display: inline-block; }
.home-open-card { font-size: 10px; text-decoration: none; color: #7b8870; }
.home-card-frame { display: block; border: 0; background: transparent; width: 100%; height: 450px; }
.home-demo-note { color: #8a957e; font-size: 10px; text-align: center; line-height: 1.6; padding: 0 20px 22px; margin: 0; }
.home-demo-empty { padding: 90px 35px; text-align: center; }
.home-demo-empty h2 { font-family: Georgia, serif; font-size: 36px; font-weight: 400; margin-top: 20px; }
.home-demo-empty p { color: var(--muted); }
.home-ai-intro { display: flex; align-items: flex-start; gap: 22px; margin-top: 40px; padding: 28px 30px; border: 1px solid #dce3d2; border-radius: 12px; background: #eef1e7; }
.home-ai-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 11px; color: #ece5a9; background: linear-gradient(120deg, #183f35, #526d48); }
.home-ai-intro h2 { font-family: Georgia, serif; font-size: 28px; font-weight: 400; margin: 8px 0 10px; }
.home-ai-intro p { max-width: 800px; margin: 0; color: #64715c; font-size: 13px; line-height: 1.8; }
@media (max-width: 760px) { .home-ai-intro { gap: 16px; padding: 22px 20px; } .home-ai-intro h2 { font-size: 25px; } }
.home-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; border-top: 1px solid var(--line); margin-top: 55px; padding: 35px 0 45px; }
.home-features article { display: flex; gap: 15px; }
.home-feature-number { font-size: 10px; color: #a1ac94; padding-top: 4px; }
.home-features h2 { font-size: 15px; font-weight: 500; letter-spacing: -.02em; margin: 0 0 12px; }
.home-features p { font-size: 12px; line-height: 1.8; color: #8a9381; margin: 0; }
.home-footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 22px; color: #98a08f; font-size: 10px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.legal-links a { text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }
.home-footer, .dashboard-footer { flex-wrap: wrap; gap: 16px; }
.site-legal-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 24px 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.registration-legal { font-size: 11px; color: var(--muted); line-height: 1.7; margin: 18px 0 0; }
.legal-page { width: min(820px, 100%); margin: 0 auto; padding: 64px 28px 72px; }
.legal-page-header { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.legal-page h1 { font-family: Georgia, serif; font-size: clamp(36px, 6vw, 52px); font-weight: 400; margin: 18px 0; }
.legal-updated { color: var(--muted); font-size: 12px; }
.legal-page p, .legal-page li { line-height: 1.85; overflow-wrap: anywhere; }
.legal-page a { text-underline-offset: 3px; }
.legal-content h2 { font-size: 19px; font-weight: 600; margin: 32px 0 12px; letter-spacing: -.02em; }
.legal-content ul { padding-left: 22px; }
.legal-content li { margin-bottom: 12px; }
@media (max-width: 550px) { .legal-page { padding: 36px 22px 48px; } .site-legal-footer { padding: 22px; } }
@media (max-width: 1000px) {
  .home-page { padding: 40px 30px 24px; }
  .home-hero { gap: 25px; min-height: 500px; }
  .home-copy h1 { font-size: 48px; }
  .home-card-frame { height: 400px; }
  .home-detail { gap: 10px; }
}
@media (max-width: 760px) {
  .home-page { padding: 38px 22px 24px; }
  .home-hero { grid-template-columns: 1fr; gap: 35px; }
  .home-copy h1 { font-size: clamp(44px, 9vw, 64px); }
  .home-copy > p { max-width: 470px; }
  .home-actions { margin: 25px 0; }
  .home-card-frame { height: 410px; }
  .home-features { grid-template-columns: 1fr; gap: 28px; margin-top: 40px; }
  .home-footer { font-size: 9px; }
}
@media (max-width: 450px) {
  .home-card-frame { height: 350px; }
  .home-demo-heading { padding: 20px 16px 0; }
  .home-demo-heading .eyebrow { font-size: 9px; }
  .home-footer span:last-child { display: none; }
}
.home-demo-choices { display:flex; flex-wrap:wrap; gap:6px; padding:20px 24px 0; }
.home-demo-choices button { border:1px solid #dce2d2; background:transparent; color:#7b8870; border-radius:20px; padding:7px 12px; font-size:10px; }
.home-demo-choices button.active { background:#fff; border-color:#bdcbb1; color:#244d3d; box-shadow:0 1px 3px #203e3409; }
.home-demo-choices button:hover { background:#ffffff99; }
@media(max-width:450px) { .home-demo-choices { padding:18px 15px 0; gap:5px; } .home-demo-choices button { padding:7px 9px; font-size:9px; } }
.embed-controls-option { display:flex; align-items:center; gap:9px; margin-top:18px; font-size:12px; font-weight:500; }
.embed-controls-option input { margin:0; }
.card-viewer .viewer-hint--accessible-only { position:absolute; width:1px; height:1px; min-height:0; padding:0; margin:-1px; border:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
/* Native disclosures keep inspector sections independent and keyboard accessible. */
.property-section { border-top:1px solid var(--line); margin-top:2px; }
.property-section > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; padding:12px 0; cursor:pointer; font-size:11px; line-height:1.4; font-weight:600; user-select:none; }
.property-section > summary::-webkit-details-marker { display:none; }
.property-section > summary::after { content:"›"; font-size:18px; line-height:1; color:#8a967f; transform:rotate(0deg); transition:transform .15s; }
.property-section[open] > summary::after { transform:rotate(90deg); }
.property-section > summary:hover { color:#71905e; }
.property-section > summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:3px; }
.property-section-body { padding-bottom:17px; }
.property-section-body > :last-child { margin-bottom:0; }
.background-properties .property-section { border:0; margin:0; }
.background-properties .property-section > summary { padding-top:0; }
.background-properties .property-section-body { padding-bottom:0; }

/* Keep expanded inspector sections inside the available editor height. */
.editor-grid > * { min-height: 0; }
.right-panel { height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.canvas-workspace { min-height: 0; }

.auth-demo-frame { display: block; width: 100%; height: 300px; margin-top: 24px; border: 0; background: transparent; }
.auth-demo-hint { max-width: none; text-align: center; font-size: 10px; margin: 0; }

.auth-demo-carousel { margin-top: 24px; }
.auth-demo-stage { position: relative; }
.auth-demo-stage .auth-demo-frame { margin-top: 0; }
.auth-demo-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 36px; display: grid; place-items: center; padding: 0 0 3px; border: 1px solid #d5dccd; border-radius: 50%; background: #f8f9f3; color: var(--green); font-size: 25px; line-height: 1; }
.auth-demo-arrow.previous { left: -8px; }
.auth-demo-arrow.next { right: -8px; }
.auth-demo-arrow:hover { background: #e1e8d9; }
.auth-demo-caption { text-align: center; font-size: 11px; color: var(--green); margin: 0 0 5px; }
.auth-demo-dots { display: flex; justify-content: center; gap: 2px; margin-bottom: 8px; }
.auth-demo-dot { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; background: transparent; border-radius: 50%; }
.auth-demo-dot span { width: 6px; height: 6px; border-radius: 50%; background: #bac4af; transition: background .15s, transform .15s; }
.auth-demo-dot.active span { background: var(--green); transform: scale(1.35); }
.auth-demo-dot:hover span { background: #758b68; }

.home-showcase--carousel { background: transparent; border: 0; border-radius: 0; padding: 0 12px; }
.home-showcase--carousel .home-demo-heading { padding: 0 0 10px; }
.home-showcase--carousel .auth-demo-carousel { margin-top: 0; }
.home-showcase--carousel .auth-demo-frame { height: 360px; }
@media(max-width:600px) { .home-showcase--carousel .auth-demo-frame { height: 280px; } }

.template-dialog { margin: auto; width: min(1020px, 94vw); max-height: 90dvh; overflow-y: auto; }
.template-dialog > .muted { max-width: 690px; font-size: 12px; margin-bottom: 24px; }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.template-option { min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #eef0e7; }
.template-option iframe { display: block; border: 0; width: 100%; height: 260px; }
.template-option-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; background: #fff; }
.template-option h3 { font-size: 12px; font-weight: 500; margin: 0; }
@media(max-width:650px) { .template-grid { grid-template-columns: 1fr; } .template-option iframe { height: 240px; } }

.permanent-link-panel { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 24px; margin-top: 30px; border: 1px solid var(--line); background: #eef1e7; border-radius: 10px; }
.permanent-link-panel h2 { font-size: 20px; font-weight: 500; margin: 10px 0; }
.permanent-link-panel .muted { font-size: 12px; max-width: 450px; margin: 0; }
.permanent-link-address { flex: 0 1 380px; min-width: 0; }
.permanent-link-address label { font-size: 10px; }
.permanent-link-address input { font-size: 11px; }
.permanent-link-address .button { margin-top: 10px; }
.claim-tag-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.claim-tag-form .panel-caption { margin-bottom: 0; }
@media(max-width:700px) { .permanent-link-panel { flex-direction: column; align-items: stretch; } .permanent-link-address { flex: auto; } }

.layer-toggle svg { display: block; margin: auto; }

.button.ai-design-button {
  position: relative; isolation: isolate; overflow: hidden; gap: 7px;
  color: #fffbea; border-color: #82976b;
  background: linear-gradient(120deg, #183f35, #3d6046 65%, #526d48);
  box-shadow: inset 0 1px 0 #ffffff24, 0 2px 7px #183f3526, 0 0 0 2px #cbd6ae33;
  font-weight: 700; transition: transform .2s, box-shadow .2s;
}
.ai-design-button > * { position: relative; z-index: 1; }
.ai-design-sparkles { flex-shrink: 0; color: #ece5a9; transition: transform .2s; }
.ai-design-button::after {
  content: ""; position: absolute; inset: -50% -30%; pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, #fff8cf30 50%, transparent 62%);
  transform: translateX(-100%); animation: ai-design-shimmer 7s ease-in-out infinite;
}
.button.ai-design-button:hover {
  filter: none; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 #ffffff30, 0 4px 12px #183f3533, 0 0 0 3px #cbd6ae55;
}
.ai-design-button:hover .ai-design-sparkles { transform: rotate(-8deg) scale(1.08); }
.button.ai-design-button:active { transform: translateY(0); }
@keyframes ai-design-shimmer { 0%, 65% { transform: translateX(-100%); } 90%, 100% { transform: translateX(100%); } }

/* Center placement stays independent of the introductory rotation. */
.physical-card { translate: -50% -50%; transform-origin: 50% 50%; }
/* Safari needs the prefixed rule on the card's text and link descendants too. */
.physical-card, .physical-card * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.physical-card img, .physical-card a { -webkit-user-drag: none; }
.viewer-spin-prompt, .viewer-branding { position: absolute; color: #697166; opacity: .5; font-size: 11px; line-height: 14px; white-space: nowrap; -webkit-user-select: none; user-select: none; }
.viewer-spin-prompt { transform: translateX(-100%); pointer-events: none; }
.viewer-branding { writing-mode: vertical-rl; transform: translate(-100%, -50%) rotate(180deg); text-decoration: none; text-underline-offset: 3px; }
.viewer-branding:hover, .viewer-branding:focus-visible { opacity: 1; text-decoration: underline; }

.permanent-link-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.permanent-link-actions .button { margin-top: 0; }
.share-dialog { margin: auto; }

.generation-dialog { width: min(1000px, 94vw); max-height: 90dvh; overflow: auto; margin: auto; }
.generation-dialog > .muted { font-size: 12px; max-width: 700px; }
.generation-notice { border: 1px solid #d6dfc8; border-radius: 7px; background: #edf2e6; color: #52674a; padding: 12px 16px; font-size: 12px; line-height: 1.7; }
.generation-dialog textarea { margin-top: 8px; resize: vertical; line-height: 1.6; }
.generation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.generation-status { font-size: 12px; line-height: 1.6; margin: 20px 0 12px; }
.generation-loading { display: flex; align-items: center; gap: 18px; padding: 22px; margin-top: 22px; border: 1px solid var(--line); border-radius: 10px; background: #f5f3ed; }
.generation-loading[hidden] { display: none; }
.generation-loading-copy { flex: 1; min-width: 0; }
.generation-loading h3 { margin: 0 0 6px; font-size: 16px; }
.generation-loading p { margin: 0 0 10px; font-size: 12px; line-height: 1.6; }
.generation-elapsed { font-size: 11px; font-variant-numeric: tabular-nums; color: #68665f; }
.generation-spinner { flex: 0 0 28px; width: 28px; height: 28px; border: 3px solid #dcd9cf; border-top-color: #183f35; border-radius: 50%; animation: generation-spin 1s linear infinite; }
@keyframes generation-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .generation-spinner { animation: none; } }
@media (max-width:650px) { .generation-loading { flex-wrap: wrap; } .generation-loading > button { margin-left: 46px; } }
.generation-previews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.generation-previews article { min-width: 0; }
.generation-previews h3 { font-size: 11px; font-weight: 500; margin-bottom: 10px; }
.generation-footer { display: flex; align-items: center; gap: 20px; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.generation-footer p { max-width: 550px; margin: 0; }
@media(max-width:650px) { .generation-previews { grid-template-columns: 1fr; } .generation-footer { flex-direction: column; align-items: stretch; } }
