/* Licensing store — Stone Folio paper, engraved seals, ink buttons. */
.cm-btn {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 22px;border:1px solid #9e8a6a;border-radius:999px;background:var(--folio-button-paper);box-shadow:var(--folio-button-edge);color:#342d24;font:500 1rem/1.2 Georgia,serif;text-decoration:none;cursor:pointer}
.film-dossier .cm-btn-ink, .cm-btn-ink {border-color:#26261f;background:linear-gradient(120deg,#3d3d32,#2a2a22);box-shadow:inset 0 0 0 2px #45453a,0 2px 6px #2d241630;color:#fffaf0}
.film-dossier a.cm-btn-ink:hover {color:#fffaf0}
.cm-btn:disabled {opacity:.45;cursor:not-allowed}
.cm-btn img {width:26px;height:26px;object-fit:contain;mix-blend-mode:multiply}
.cm-link {appearance:none;border:0;background:none;padding:4px 0;color:inherit;font:inherit;text-decoration:underline;text-decoration-color:#a29a85;text-underline-offset:.19em;cursor:pointer}
@media (prefers-reduced-motion:no-preference) {.cm-btn {transition:transform .18s ease-out,box-shadow .18s ease-out} .cm-btn:not(:disabled):hover {transform:translateY(-1px)}}

/* Gallery licensing counter */
.licensing .cm-lic button.cm-link {background:none;color:inherit;padding:4px 0;border-radius:0}
.licensing .cm-lic button.cm-btn {padding:8px 22px;border-radius:999px;border:1px solid #9e8a6a;font:500 1rem/1.2 Georgia,serif}
.licensing .cm-lic button.cm-btn-ink {border-color:#26261f}
.cm-lic {margin:12px 0 16px;padding:16px;border:1px solid #b7a98d;border-radius:10px;background:linear-gradient(#fffcf4f2,#f6eedff2),url('/app/folio/limestone.webp') center/600px;box-shadow:inset 0 0 0 3px #fffaf0,inset 0 0 0 4px #d5c8ad}
.cm-lic-kicker {display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 14px;margin:0 0 10px;font:600 .7rem/1.4 system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:#5d5544}
.cm-lic-kicker span {font-family:ui-monospace,monospace;letter-spacing:.04em}
.cm-lic-modes {display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cm-lic-modes label {display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #b9ab90;border-radius:8px;background:#fffdf7;cursor:pointer}
.cm-lic-modes label:has(:checked) {border-color:#39392e;box-shadow:inset 0 0 0 1px #39392e;background:#fff8e6}
.cm-lic-modes input {appearance:none;-webkit-appearance:none;flex:none;width:20px;height:20px;margin:0;border:1px solid #6d6453;border-radius:50%;background:#fffdf7;cursor:pointer}
.cm-lic-modes input:checked {border-color:#39392e;background:radial-gradient(circle,#39392e 0 42%,#fffdf7 46%)}
.cm-lic-modes strong {display:block;font:500 1.02rem/1.2 Georgia,serif}
.cm-lic-modes em {font-style:normal;font-size:.82rem;color:#5d5544}
.cm-lic-bar {display:flex;align-items:baseline;gap:14px;margin:14px 0 6px;font-size:.82rem}
.cm-lic-bar span {margin-right:auto;font:600 1rem/1.3 Georgia,serif}
.cm-lic-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px}
.cm-lic-item {position:relative;display:block;border:1px solid #c6beaa;background:#fffcf6;cursor:pointer;line-height:0}
.cm-lic-item input {position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.cm-lic-item img {display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
.cm-lic-tick {position:absolute;top:5px;right:5px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid #fffaf0;background:#fffaf0c9;color:transparent;font:700 14px/1 system-ui}
.cm-lic-item:has(:checked) {border-color:#39392e;box-shadow:0 0 0 2px #39392e}
.cm-lic-item:has(:checked) .cm-lic-tick {background:#39392e;color:#fffaf0}
.cm-lic-item:has(:focus-visible) {outline:2px solid #8a652b;outline-offset:2px}
.cm-lic-sku {display:block;padding:3px 2px;font:10px/1.3 ui-monospace,monospace;text-align:center;color:#5d5544;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cm-lic[data-mode=gallery] .cm-lic-bar button {visibility:hidden}
.cm-lic[data-mode=gallery] .cm-lic-item {pointer-events:none;border-color:#39392e}
.cm-lic[data-mode=gallery] .cm-lic-tick {background:#39392e;color:#fffaf0}
.cm-lic-item.is-flash {animation:cm-flash 1.6s ease-out 2}
@keyframes cm-flash {30% {box-shadow:0 0 0 4px #c89a3c}}
.cm-lic-hint {margin:10px 0 0;padding:8px 12px;border-left:3px solid #c89a3c;background:#fff6dc;font-size:.86rem}
.cm-lic-foot {display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid #c6beaa}
.cm-lic-foot output {display:flex;align-items:baseline;gap:12px;margin-right:auto;font-size:.86rem}
.cm-lic-foot output strong {font:400 1.7rem/1 Folio,Georgia,serif}
.cm-lic-links {display:flex;gap:16px;margin:10px 0 0;font-size:.8rem}
@media (max-width:420px) {.cm-lic-modes {grid-template-columns:1fr}}

#project-gallery-dialog .cm-viewer-license {display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:4px 14px;border:1px solid #9e8a6a;border-radius:999px;background:#fffaf0;color:#342d24;font:500 .86rem/1.2 Georgia,serif;text-decoration:none;white-space:nowrap}
#project-gallery-dialog .cm-viewer-license[data-in] {background:#39392e;border-color:#39392e;color:#fffaf0}

/* Store pages */
.cm-store {min-height:70vh}
.cm-store h1 {margin:0;font:400 clamp(2.6rem,5vw,5rem)/1.02 Folio,Baskerville,Georgia,serif;letter-spacing:-.025em}
.cm-store h2 {margin:0;font:400 clamp(1.55rem,2.8vw,2.6rem)/1.1 Folio,Baskerville,Georgia,serif}
.cm-store h3 {margin:0 0 4px;font:500 1.2rem/1.25 Georgia,serif}
.cm-hero {display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:clamp(18px,4vw,60px);align-items:center;padding:clamp(18px,3vw,44px) 0}
.cm-hero p {max-width:56ch;font:1.08rem/1.6 Georgia,serif;margin:.8em 0}
.cm-hero-seal {justify-self:center;display:grid;place-items:center;width:min(100%,300px);aspect-ratio:1;border-radius:50%;border:1px solid #a99a7d;background:var(--folio-button-paper);box-shadow:inset 0 0 0 6px #fffaf0,inset 0 0 0 7px #c4b69c,0 14px 40px #44362126}
.cm-hero-seal img {width:58%;height:58%;object-fit:contain;mix-blend-mode:multiply}
.cm-figures {display:flex;flex-wrap:wrap;gap:8px 28px;margin:14px 0 18px;padding:10px 0;border-block:1px solid #a79b83}
.cm-figures div {display:flex;align-items:baseline;gap:8px;font-size:.84rem;color:#5d5544}
.cm-figures strong {font:400 1.9rem/1 Folio,Georgia,serif;color:#292820}
.cm-actions {display:flex;flex-wrap:wrap;gap:10px}
.cm-section {padding:clamp(14px,2.4vw,30px) 0}
.cm-steps,.cm-tiers {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0;padding:0;list-style:none}
.cm-card {position:relative;padding:18px;border:1px solid #b7a98d;border-radius:10px;background:linear-gradient(#fffcf4f0,#f6eedff0),url('/app/folio/limestone.webp') center/520px;box-shadow:inset 0 0 0 3px #fffaf0,inset 0 0 0 4px #d5c8ad}
.cm-card p {margin:.4em 0 0;line-height:1.55}
.cm-card>img {width:58px;height:58px;object-fit:contain;mix-blend-mode:multiply;margin-bottom:6px}
.cm-step-no {position:absolute;top:12px;right:16px;font:400 2.6rem/1 Folio,Georgia,serif;color:#b9a985}
.cm-price {display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:7px 0;border-top:1px solid #c6beaa}
.cm-price:first-of-type {margin-top:10px}
.cm-price b {font:400 1.5rem/1 Folio,Georgia,serif}
.cm-card.is-closed {opacity:.78}
.cm-badge {display:inline-block;margin-top:10px;padding:3px 12px;border:1px solid #9e8a6a;border-radius:999px;font:600 .68rem/1.5 system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase}
.cm-lookup {display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.cm-field {box-sizing:border-box;width:100%;min-height:44px;padding:8px 16px;border:1px solid #aa9a80;border-radius:24px;background:#fffdf6;color:#292820;font:16px/1.3 Georgia,serif}
textarea.cm-field {border-radius:14px;min-height:84px;resize:vertical}
.cm-lookup .cm-field {flex:1 1 240px;max-width:380px;font-family:ui-monospace,monospace;text-transform:uppercase}
.cm-note {margin:8px 0 0;font-size:.86rem;color:#5d5544}
.cm-note[data-bad] {color:#8a2f1d}
.cm-shelf {display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px;margin-top:14px}
.cm-shelf a {display:block;border:1px solid #c6beaa;background:#fffcf6;color:inherit;text-decoration:none;box-shadow:1px 3px 10px #44362114}
.cm-shelf a[hidden] {display:none}
.cm-shelf img {display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.cm-shelf strong {display:block;padding:8px 10px 2px;font:500 1rem/1.25 Georgia,serif}
.cm-shelf small {display:flex;justify-content:space-between;gap:8px;padding:0 10px 9px;font-size:.74rem;color:#5d5544}
.cm-shelf small span:last-child {font-family:ui-monospace,monospace}
.cm-shelf a:hover strong {text-decoration:underline}

/* Cart, checkout, order */
.cm-checkout {display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:clamp(16px,3vw,40px);align-items:start;padding:14px 0 30px}
.cm-lines {margin:0;padding:0;list-style:none}
.cm-lines li {display:grid;grid-template-columns:76px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #c6beaa}
.cm-lines img {width:76px;height:76px;object-fit:cover;border:1px solid #c6beaa;background:#fffcf6}
.cm-lines strong {display:block;font:500 1rem/1.25 Georgia,serif}
.cm-lines small {display:block;font-size:.76rem;color:#5d5544}
.cm-lines small.cm-mono,.cm-mono {font-family:ui-monospace,monospace}
.cm-lines .cm-amount {text-align:right;font:400 1.3rem/1 Folio,Georgia,serif}
.cm-lines .cm-amount button {display:block;margin-left:auto;font:400 .76rem/1.4 system-ui,sans-serif}
.cm-total {display:flex;justify-content:space-between;align-items:baseline;padding:12px 0;border-bottom:1px solid #a79b83;font-size:.9rem}
.cm-total b {font:400 2.2rem/1 Folio,Georgia,serif}
.cm-form {display:grid;gap:10px}
.cm-form label {display:grid;gap:4px;font:600 .72rem/1.4 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#443d30}
.cm-form label.cm-agree {display:flex;gap:10px;align-items:flex-start;font:400 .9rem/1.45 system-ui,sans-serif;letter-spacing:0;text-transform:none}
.cm-agree input {width:20px;height:20px;flex:none;accent-color:#39392e;margin-top:1px}
.cm-pay {margin-top:6px;min-height:50px}
.cm-practice {margin:0 0 12px;padding:9px 12px;border:1px dashed #9e6b1f;border-radius:8px;background:#fff3d1;font-size:.86rem}
.cm-empty {padding:40px 0;text-align:center}
.cm-empty p {font:1.1rem/1.5 Georgia,serif;margin:0 0 16px}
.cm-certificate {margin:14px 0 22px;padding:clamp(16px,3vw,34px);border:1px solid #9e8a6a;border-radius:10px;background:linear-gradient(#fffcf4f2,#f6eedff2),url('/app/folio/limestone.webp') center/700px;box-shadow:inset 0 0 0 4px #fffaf0,inset 0 0 0 5px #c4b69c,0 10px 30px #4436211c}
.cm-certificate header {display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding-bottom:12px;border-bottom:1px solid #a79b83}
.cm-certificate header img {width:150px;height:auto;mix-blend-mode:multiply}
.cm-ledger {display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px 24px;margin:14px 0}
.cm-ledger dt {font:600 .68rem/1.4 system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:#5d5544}
.cm-ledger dd {margin:0;font:500 1.02rem/1.35 Georgia,serif;overflow-wrap:anywhere}
.cm-downloads {display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:8px 0 18px}
.cm-downloads a {display:block;border:1px solid #c6beaa;background:#fffcf6;color:inherit;text-decoration:none;line-height:1.3}
.cm-downloads img {display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.cm-downloads span {display:block;padding:6px 8px 0;font:10.5px/1.3 ui-monospace,monospace;color:#5d5544}
.cm-downloads b {display:block;padding:2px 8px 8px;font:500 .9rem/1.3 Georgia,serif}
.cm-terms {max-width:74ch;padding-bottom:30px}
.cm-terms h2 {font-size:1.5rem;margin:1.4em 0 .3em}
.cm-terms p,.cm-terms li {line-height:1.65}
.cm-draft {margin:14px 0;padding:10px 14px;border:1px dashed #9e6b1f;border-radius:8px;background:#fff3d1;font-size:.9rem}
@media (max-width:860px) {.cm-hero,.cm-checkout {grid-template-columns:1fr}.cm-hero-seal {display:none}.cm-steps,.cm-tiers {grid-template-columns:1fr}}
@media (max-width:480px) {.cm-lines li {grid-template-columns:56px minmax(0,1fr) auto}.cm-lines img {width:56px;height:56px}.cm-shelf {grid-template-columns:1fr 1fr;gap:8px}}
@media print {.folio-mast,.film-footer,.cm-cart-pill,.cm-noprint,.record-trail {display:none !important}.film-dossier {background:#fff}.cm-certificate {box-shadow:none}}

/* License terms page and certificate links */
.cm-hint {display:block;margin:2px 0 6px;font:italic .85rem/1.4 Georgia,serif;color:#6b6455}
.cm-policy {display:grid;gap:8px;padding-left:1.4em}
.cm-terms h3 {margin:1.4em 0 .3em;font:400 1.35rem/1.2 Folio,Georgia,serif}
.cm-terms .section-title {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}

/* Compact license front page: title strip, price line, galleries first */
.cm-top {display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 22px;padding:10px 0 6px}
.cm-top h1 {font-size:clamp(30px,3vw,46px);line-height:1;margin:0}
.cm-top p {flex:1 1 360px;margin:0;font:1rem/1.45 Georgia,serif;color:#4a4236}
.cm-rates {display:flex;flex-wrap:wrap;gap:6px 10px;margin:8px 0 0;padding:0;list-style:none}
.cm-rates li {padding:5px 12px;border:1px solid #c6b99f;border-radius:999px;background:#fffaf0cc;font-size:.86rem;color:#4a4236}
.cm-rates b {font-weight:600;color:#292820;margin-right:4px}
.cm-rates .is-closed {opacity:.7}
.cm-galleries {padding-top:14px}
.cm-bar {display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
.cm-bar h2 {margin:0 auto 0 0;font-size:clamp(24px,2.4vw,34px)}
.cm-bar h2 small {font:400 .8rem Georgia,serif;color:#6b6455;margin-left:8px}
.cm-bar>.cm-field {flex:0 1 300px;margin:0}
.cm-bar .cm-lookup {display:flex;gap:6px;margin:0;flex:0 1 330px}
.cm-bar .cm-lookup .cm-field {flex:1;margin:0}
.cm-how {border-top:1px solid #c6b99f;margin-top:26px}
.cm-how h2 {font-size:1.3rem;margin:0 0 8px}
.cm-how ol {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 24px;margin:0;padding:0;list-style:none;font-size:.92rem;line-height:1.45;color:#4a4236}
.cm-how b {display:inline-grid;place-items:center;width:22px;height:22px;margin-right:6px;border-radius:50%;background:#292820;color:#fffaf0;font-size:.78rem}
@media (max-width:760px) {.cm-how ol {grid-template-columns:1fr}.cm-bar>.cm-field,.cm-bar .cm-lookup {flex:1 1 100%}}
