/* Kuvatilaus – asiakassivuston tyylit. Ei build-vaihetta. */

:root {
    --bg: #f7f5f1;
    --surface: #ffffff;
    --ink: #1b1a17;
    --muted: #6d6a63;
    --line: #e6e2da;
    --accent: #1f4e5f;
    --accent-ink: #ffffff;
    --accent-soft: #e6eff1;
    --warn-bg: #fdf3df;
    --warn: #7d5200;
    --error-bg: #fbe8e5;
    --error: #a3261b;
    --ok: #2e6b3a;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(27, 26, 23, .05), 0 8px 24px rgba(27, 26, 23, .06);
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Ankkurilinkit (esim. #tuotteet) jäävät kiinteän yläpalkin alle ilman tätä. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.15rem; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.section { padding-block: 48px; }

/* Ylätunniste */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247, 245, 241, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.nav-toggle { display: none; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; white-space: nowrap; }
.nav a:hover { background: var(--line); }
.nav a.active { background: var(--ink); color: var(--bg); }
.cart-link { position: relative; display: inline-flex; padding: 8px; border-radius: 999px; color: var(--ink); }
.cart-link:hover { background: var(--line); }
.account-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.account-link:hover, .account-link.active { background: var(--line); }
@media (max-width: 560px) { .account-label { display: none; } }
.cart-count { position: absolute; top: 0; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.cart-count[hidden] { display: none; }

@media (max-width: 1100px) {
    .nav-toggle { display: grid; gap: 4px; margin-left: auto; padding: 10px; border: 0; background: none; cursor: pointer; border-radius: 10px; }
    .nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 1px; }
    .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .nav a { padding: 12px; border-radius: 10px; }
    .nav-open .nav { display: flex; }
}

/* Kohdat eivät mahdu riville (body.nav-compact, ks. layouts/site): sama kuin kapealla näytöllä. */
.nav-compact .nav-toggle { display: grid; gap: 4px; margin-left: auto; padding: 10px; border: 0; background: none; cursor: pointer; border-radius: 10px; }
.nav-compact .nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 1px; }
.nav-compact .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.nav-compact .nav a { padding: 12px; border-radius: 10px; }
.nav-compact.nav-open .nav { display: flex; }

/* Painikkeet */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .1s, opacity .15s; }
.btn:hover { opacity: .92; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }

/* Etusivu */
.hero { padding-top: 64px; padding-bottom: 40px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin: 0 0 24px; }
.hero-image { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.steps { display: grid; grid-template-columns: repeat(var(--steps, 3), 1fr); gap: 16px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 800px) {
    .hero { grid-template-columns: 1fr; padding-top: 32px; gap: 24px; }
    .steps { grid-template-columns: 1fr; }
}

/* Kortit */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-image { aspect-ratio: 3/2; object-fit: cover; width: 100%; background: linear-gradient(135deg, #d9e4e7, #efe7da); }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body p { margin: 0; color: var(--muted); font-size: .93rem; }
.card-price { margin-top: auto; padding-top: 8px; font-weight: 600; }
.page-head { padding-block: 40px 8px; }
.page-head p { color: var(--muted); max-width: 46em; }
.breadcrumb { font-size: .875rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); }

/* Tuotesivu */
.product { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; padding-bottom: 64px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 1.15rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.panel h2 .num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 700 .8rem var(--sans); }
.panel .hint { color: var(--muted); font-size: .9rem; margin: -6px 0 12px; }
.summary { position: sticky; top: 84px; }
@media (max-width: 960px) {
    .product { grid-template-columns: 1fr; }
    .summary { position: static; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; line-height: 1.25; text-align: center; }
.chip small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip input:disabled + span { opacity: .4; }
select.input, input.input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); color: var(--ink); }

.option-group + .option-group { margin-top: 18px; }
.option-group > .label { font-weight: 600; margin-bottom: 8px; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.option { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.option input { position: absolute; opacity: 0; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.option:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.option img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; }
.option .title { font-weight: 600; line-height: 1.3; }
.option .price { font-size: .85rem; color: var(--muted); }
.option .more { font-size: .85rem; margin-top: 4px; }

/* Lisätietoikkuna (tuote ja materiaalit) */
.link-button { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link-button:hover { text-decoration-thickness: 2px; }
.page-head .details-link { margin-top: 4px; }
.page-head .details-link .link-button { font-weight: 600; }
.info-dialog { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); color: var(--ink); }
.info-dialog[open] { display: flex; flex-direction: column; }
.info-dialog::backdrop { background: rgba(27, 26, 23, .55); }
.info-body { display: flex; gap: 20px; align-items: flex-start; padding: 20px 24px 24px; overflow-y: auto; line-height: 1.6; }
.info-image { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; flex: none; }
.info-text { min-width: 0; }
.info-text > :first-child { margin-top: 0; }
.info-text h3 { font-size: 1rem; margin: 20px 0 6px; }
.info-text p { margin: 0 0 10px; }
.info-text ul { padding-left: 20px; margin: 0 0 10px; }
.info-text li + li { margin-top: 4px; }
@media (max-width: 560px) {
    .info-body { flex-direction: column; padding: 16px; }
    .info-image { width: 100%; height: 180px; }
}

.toggle-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--accent); }

.dropzone { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; font-size: 1.05rem; }
.dropzone span { color: var(--muted); font-size: .9rem; }
.dropzone input { display: none; }

.files { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.file { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.file .thumb { width: 64px; height: 64px; border-radius: 8px; background: var(--bg) center/cover no-repeat; }
.file .name { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .meta { font-size: .8rem; color: var(--muted); }
.file .qty { width: 64px; padding: 8px; text-align: center; }
.file .bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 6px; }
.file .bar > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.file .remove { border: 0; background: none; font-size: 1.3rem; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.file .remove:hover { background: var(--bg); color: var(--ink); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.error { background: var(--error-bg); color: var(--error); }
.badge.ok { background: #e5f1e7; color: var(--ok); }
.note { margin-top: 6px; padding: 8px 10px; border-radius: 8px; font-size: .85rem; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.error { background: var(--error-bg); color: var(--error); }
.bulk-qty { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .9rem; color: var(--muted); }
.bulk-qty input { width: 64px; padding: 6px 8px; }

.summary-rows { display: grid; gap: 8px; margin: 0 0 16px; }
.summary-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.summary-rows dt { color: var(--muted); }
.summary-rows dd { margin: 0; text-align: right; font-weight: 500; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 16px; }
.summary-total strong { font-size: 1.6rem; font-family: var(--serif); }
.handling-note { font-size: .85rem; color: var(--muted); margin: -8px 0 14px; text-align: right; }
.tier-note { font-size: .85rem; color: var(--ok); margin: -6px 0 14px; }
/* Valitun koon määräportaat Lisää ostoskoriin -painikkeen alla (digikuvat). */
.size-tiers { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.size-tiers-title { font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.size-tiers dl { display: grid; gap: 4px; margin: 0; }
.size-tiers dl div { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; }
.size-tiers dt { color: var(--muted); }
.size-tiers dd { margin: 0; font-weight: 500; }

/* Ostoskori */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; padding-bottom: 64px; }
.cart-items { display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.cart-item .thumb { width: 88px; height: 88px; border-radius: 10px; background: var(--bg) center/cover no-repeat; }
.cart-item .title { font-weight: 600; }
.cart-item .spec { color: var(--muted); font-size: .9rem; }
.cart-item .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-item .side form { display: flex; align-items: center; gap: 6px; }
.cart-item .qty { width: 64px; padding: 6px 8px; text-align: center; }
.cart-item .line { font-weight: 600; }
.cart-item .unit { font-size: .8rem; color: var(--muted); }
.empty { text-align: center; padding-block: 64px; }
@media (max-width: 860px) {
    .cart { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 64px minmax(0, 1fr); }
    .cart-item .thumb { width: 64px; height: 64px; }
    .cart-item .side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; z-index: 50; max-width: calc(100vw - 32px); }
.toast a { color: #bfe0e8; font-weight: 600; }

/* Alatunniste */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-note { max-width: 32em; }
.site-footer a { color: inherit; }

/* Lomakkeet */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
.field.full { grid-column: 1 / -1; }
.field .input { font-weight: 400; }
.field-error { color: var(--error); font-size: .85rem; font-weight: 500; }
textarea.input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* Rajaus- ja asetteluikkuna */
.btn.small { padding: 7px 14px; font-size: .85rem; margin-top: 10px; }
.cart-item .thumb-box { width: 88px; min-height: 88px; align-self: start; display: flex; align-items: center; justify-content: center; }
.cart-item .thumb-box .pp { flex: none; background-size: cover; background-position: center; }
@media (max-width: 860px) { .cart-item .thumb-box { width: 64px; } }

.editor { width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); color: var(--ink); }
.editor::backdrop { background: rgba(27, 26, 23, .55); }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.editor-head h2 { font-size: 1.1rem; margin: 0; }
.editor-close { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
/* max-content: matalassa ikkunassa kuva-alue ei kutistu kuvaa matalammaksi (rajauksen kulmat jäisivät piiloon), vaan ikkuna vierii. */
/* flex: 1 1 auto eikä flex: 1: Safari (iPad) laskee 0 %-perustan korkeudeksi nollan, jolloin ikkuna
   jää kapeaksi suikaleeksi (vain otsikko ja alapalkki). dvh = näkyvä korkeus iOS:n työkalupalkkien kanssa. */
.editor-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-auto-rows: max-content; gap: 20px; padding: 20px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.editor[open] { display: flex; flex-direction: column; }
.editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.editor-foot .note { margin: 4px 0 0; }
.editor-stage { position: relative; display: flex; align-items: center; justify-content: center; background: #dcd9d2; border-radius: 10px; min-height: 300px; max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); overflow: hidden; user-select: none; touch-action: none; }
.editor-stage img { box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); max-width: 100%; max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); display: block; }
/* Rajauksen ulkopuoli tummennetaan vain kuvan päältä (editor.js: clip-path), jotta editorin tausta ei näytä kuvalta. */
.crop-shade { position: absolute; pointer-events: none; background: rgba(0, 0, 0, .55); }
.crop-box { position: absolute; outline: 2px solid #fff; cursor: move; touch-action: none; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; background:
    linear-gradient(to right, transparent 33.2%, rgba(255,255,255,.45) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.45) 66.6%, transparent 66.8%),
    linear-gradient(to bottom, transparent 33.2%, rgba(255,255,255,.45) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.45) 66.6%, transparent 66.8%); }
.crop-handle { position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.crop-handle.nw { left: -9px; top: -9px; cursor: nwse-resize; }
.crop-handle.ne { right: -9px; top: -9px; cursor: nesw-resize; }
.crop-handle.sw { left: -9px; bottom: -9px; cursor: nesw-resize; }
.crop-handle.se { right: -9px; bottom: -9px; cursor: nwse-resize; }
.editor-side { display: flex; flex-direction: column; gap: 14px; }
.editor-group .label { font-weight: 600; margin-bottom: 8px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.segmented button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: inherit; cursor: pointer; color: var(--ink); }
.segmented button.active { background: var(--ink); color: var(--bg); }
.mat-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mat-fields label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.mat-preview { position: relative; margin: 12px auto 0; box-sizing: content-box; background: #f7f6f2; border: 7px solid #1b1a17; box-shadow: var(--shadow); }
.mat-window { position: absolute; background-repeat: no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.editor-dpi { font-weight: 600; }
.editor-dpi.warn { color: var(--warn); }
.editor-actions { display: flex; gap: 10px; justify-content: flex-end; flex: none; }
@media (max-width: 800px) {
    .editor-body { grid-template-columns: 1fr; }
    .editor-stage, .editor-stage img { max-height: 50vh; }
}

/* Tulosteen esikatselu (KuvaEditor.paint) */
.print-preview { position: relative; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(27,26,23,.12); max-width: 100%; max-height: 100%; }
.print-preview.framed { overflow: visible; background: #f7f6f2; box-shadow: 0 0 0 var(--frame-w, 3px) var(--frame-color, #1b1a17), 0 2px 8px rgba(27,26,23,.25); }
.pp-area, .pp-window { position: absolute; background-repeat: no-repeat; }
.pp-window { box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.pp-fold { position: absolute; outline: 1px dashed rgba(255,255,255,.95); box-shadow: 0 0 0 9999px rgba(255,255,255,.42); pointer-events: none; }
.file { grid-template-columns: 96px minmax(0, 1fr) auto auto; }
.file .pp-holder { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.file .pp { width: 100%; }
.file .pp.print-preview { flex: none; }
.file .pp:not(.print-preview) { height: 100%; border-radius: 8px; background: var(--bg) center/cover no-repeat; }
.file .edit { margin-top: 6px; }
.mat-preview.print-preview { border: 0; }
.crop-result { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.crop-result.print-preview:not(.framed) { box-shadow: 0 6px 30px rgba(0,0,0,.45); }
.crop-result.framed { box-shadow: 0 0 0 var(--frame-w, 8px) var(--frame-color, #1b1a17), 0 6px 30px rgba(0,0,0,.3); }
.badge.info { background: var(--accent-soft); color: var(--accent); }
.status .badge + .badge { margin-left: 6px; }
.pp-pop { position: fixed; z-index: 60; padding: 10px; background: var(--surface); border-radius: 12px; box-shadow: 0 12px 40px rgba(27,26,23,.25); pointer-events: none; }
.layout-badges { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.mat-fields label.full { grid-column: 1 / -1; }
/* Kuva-ala arkilla: kuvaa siirretään vetämällä pientä esikatselua. */
.paper-preview { margin: 12px auto 0; touch-action: none; }
.paper-preview .pp-area { cursor: grab; outline: 1px dashed rgba(0, 0, 0, .35); }
.paper-preview.dragging .pp-area { cursor: grabbing; }
/* Hyväksytty rajaus: sama näkymä kuin rajatessa, ulkopuolinen osa piilossa vaalealla taustalla. */
.editor-stage.accepted { background: var(--bg); }
.editor-stage.accepted .crop-box { box-shadow: 0 0 0 9999px var(--bg); outline: none; cursor: default; pointer-events: none; }
.editor-stage.accepted .crop-grid, .editor-stage.accepted .crop-handle { display: none; }
.editor-stage.accepted .crop-result:not(.framed) { box-shadow: 0 0 0 1px var(--line), 0 4px 16px rgba(27,26,23,.12); }
.note.flash { margin: 20px 0 0; }
.crop-inner { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.crop-fold { position: absolute; outline: 1px dashed rgba(255,255,255,.95); box-shadow: 0 0 0 9999px rgba(255,255,255,.38); }
.fold-note { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.pp-note { font-size: .8rem; color: var(--muted); margin: 8px 0 0; text-align: center; }
.pp-window { overflow: hidden; }

/* Canvas 3D-esikatselu (KuvaEditor.fit3d) */
.pp3d { position: relative; flex: none; }
.pp3d-box { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; }
.pp3d-face, .pp3d-back { position: absolute; left: 0; top: 0; }
.pp3d-face { overflow: hidden; backface-visibility: hidden; background: #fff; }
.pp3d-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.pp3d-face.front::after { box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.pp3d-face.right::after { background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(0,0,0,.34)); }
.pp3d-face.left::after { background: rgba(0,0,0,.3); }
.pp3d-face.top::after { background: rgba(255,255,255,.12); }
.pp3d-face.bottom::after { background: rgba(0,0,0,.38); }
.pp3d-back { background: #d9d2c3; box-shadow: 0 18px 40px rgba(27,26,23,.35); }
.crop-result.pp3d, .editor-stage.accepted .crop-result.pp3d { position: absolute; box-shadow: none; }

/* Määräalennusvinkki ja "Kuvat lisätty" -ikkuna */
.tier-nudge { font-size: .88rem; margin: -6px 0 14px; padding: 9px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--ink); }
.added-dialog { width: min(480px, calc(100vw - 32px)); }
.added-body { padding: 18px 22px 22px; }
.added-body > p { margin: 0 0 14px; }
.added-body .tier-nudge { margin: 0 0 16px; }
.added-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.added-actions .btn { flex: 1 1 180px; }
.added-other { display: block; margin-top: 14px; text-align: center; font-size: .9rem; color: var(--muted); }

/* Kassa: postipaketin noutopiste */
.ship-elsewhere { margin-top: 16px; }
.ship-elsewhere-fields { margin-top: 14px; }
.ship-elsewhere-fields .label { font-weight: 600; margin-bottom: 4px; }
.ship-elsewhere-fields > .hint { margin: 0 0 10px; }
.field .hint { margin: 0; font-size: .82rem; font-weight: 400; }
.pickup { margin-top: 18px; }
.pickup .label { font-weight: 600; margin-bottom: 8px; }
.pickup-search { display: flex; gap: 8px; max-width: 320px; }
.pickup-search .input { flex: 1; }
.pickup-search .btn { padding: 10px 18px; }
.pickup-list { display: grid; gap: 8px; margin-top: 8px; max-height: 360px; overflow-y: auto; }
.pickup-point .price { font-size: .85rem; }

/* Tilauksen tila asiakkaan tilaussivulla */
.order-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; background: var(--bg); }
.order-status.ready, .order-status.completed { background: var(--ok); color: #fff; }
.order-status.cancelled { background: var(--error-bg); color: var(--error); }

.site-footer a { color: inherit; }
.accept-terms { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 0 0 14px; cursor: pointer; }
.accept-terms input { margin-top: 3px; flex: none; }

/* Logo ja hallinnasta muokattava valikko (alavalikot) */
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; height: 40px; width: auto; }
.nav-item { position: relative; display: flex; }
.nav .nav-parent { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font: inherit; font-size: .95rem; white-space: nowrap; background: none; border: 0; cursor: pointer; }
.nav .nav-parent::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav-row { display: contents; }
.nav-expand { display: none; }
.nav-item:hover .nav-parent, .nav-item:focus-within .nav-parent { background: var(--line); }
.nav-item.active .nav-parent { background: var(--ink); color: var(--bg); }
.nav-sub { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); flex-direction: column; gap: 2px; z-index: 30; }
.nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-item:hover > .nav-sub, .nav-item:focus-within > .nav-sub { display: flex; }
.nav-sub a { border-radius: 10px; }
.footer-logo { height: 30px; width: auto; margin-bottom: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1100px) {
    .nav-item { flex-direction: column; }
    .nav .nav-parent { padding: 12px; border-radius: 10px; text-align: left; }
    .nav .nav-parent::after { display: none; }
    .nav-item:hover .nav-parent { background: none; }
    .nav-sub { position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; margin: 0; background: none; min-width: 0; }
}

/* Sisältösivut ja artikkelit (rich editorin HTML) */
.prose { max-width: 46em; line-height: 1.65; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5em; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg); }
.prose blockquote { margin: 1.2em 0; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.page-body { padding-bottom: 56px; }
.article-meta { color: var(--muted); font-size: .9rem; }
.article-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.article-list .card-body h2 { font-size: 1.2rem; margin: 0; }
.pagination-wrap { margin-top: 28px; }

/* UKK */
.faq { max-width: 46em; margin-top: 12px; }
.faq h2 { font-size: 1.3rem; margin: 1.6em 0 .6em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 32px 14px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.3rem; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 14px; }

/* Yhteydenottolomake */
.contact-form { max-width: 46em; margin-top: 28px; }
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.note.ok { background: #e6f1e8; color: var(--ok); }
.nav-compact .nav-item { flex-direction: column; }
.nav-compact .nav .nav-parent { padding: 12px; border-radius: 10px; text-align: left; }
.nav-compact .nav .nav-parent::after { display: none; }
.nav-compact .nav-item:hover .nav-parent { background: none; }
.nav-compact .nav-sub { position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; margin: 0; background: none; min-width: 0; }

/* Tuotekortit-sivupohja (esim. Tulosteet, Taulut) */
.product-cards { margin-top: 28px; }

/* Materiaalin ICC-profiili lisätietoikkunassa */
.icc-download { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.icc-download .btn { margin-top: 0; }
.icc-download .hint { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }

/* Kokojen ryhmät (A-koot, kuvasuhteet) */
.size-groups { display: grid; gap: 6px; }
.size-group-label { font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 8px; }
.size-group-label:first-child { margin-top: 0; }

/* Alatunniste: hallinnasta muokattavat tekstit ja linkkisarakkeet */
.footer-company p { margin: 6px 0 0; }
.footer-company .footer-logo { display: block; }
.footer-heading { color: var(--ink); margin-bottom: 2px; }
.footer-heading a { text-decoration: none; }

/* Alennuskoodi kassalla */
.discount-code { margin: 0 0 16px; }
.discount-label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.discount-input { display: flex; gap: 8px; }
.discount-input .input { flex: 1; min-width: 0; text-transform: uppercase; }
.discount-input .btn { padding: 10px 16px; }
.discount-code .note { margin: 0 0 6px; }
.discount-row dd { color: var(--ok); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.editor-stage.accepted .crop-result { box-shadow: 0 0 0 1px var(--line), 0 4px 16px rgba(27,26,23,.12); }

/* Asiakastili */
.auth { max-width: 460px; padding-block: 40px 64px; }
.auth .panel { display: flex; flex-direction: column; gap: 14px; }
.auth h1 { font-size: 1.8rem; margin: 0; }
.auth .muted { margin: 0; }
.auth .note { margin: 0; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .9rem; margin: 0; }
.account-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.account { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; padding-bottom: 64px; }
.account aside { display: flex; flex-direction: column; gap: 16px; }
.account aside .panel + .panel { margin-top: 0; }
.account aside .panel { display: flex; flex-direction: column; gap: 12px; }
.account aside .panel h2 { margin-bottom: 0; }
.account aside .hint { margin: -4px 0 0; }
.account-status { grid-column: 1 / -1; margin: 0; }
.order-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.order-row:first-of-type { border-top: 0; padding-top: 0; }
.order-row .title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.order-row .muted { font-size: .9rem; }
.order-lines { margin: 6px 0 0; padding-left: 18px; font-size: .9rem; }
.order-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.order-side .btn.small { margin-top: 4px; }
.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.danger-zone form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.danger-zone .muted { margin: 0; font-size: .9rem; }
.checkout-account { display: flex; flex-direction: column; gap: 12px; }
.checkout-account .form-grid[hidden] { display: none; }
@media (max-width: 900px) { .account { grid-template-columns: 1fr; } }
.verify-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* "Asenna puhelimeen" alatunnisteessa (PWA) */
.install-app { flex-basis: 100%; }
.install-app .btn { margin-top: 0; }
.install-ios { font-size: .85rem; margin: 8px 0 0; }

/* Kuvarivin merkit: monirivisinä pyöristetyt laatikot eivätkä "pallot" */
.file .status { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.file .status .badge { border-radius: 8px; line-height: 1.35; padding: 3px 8px; }

/* ?-merkki selityksineen (esim. puuttuva väriprofiili) */
.help-tip { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: #f1a33b; color: #fff; font: 700 .72rem/1 var(--sans); cursor: help; vertical-align: 1px; }
.help-tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: min(260px, 70vw); padding: 8px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 400 .8rem/1.4 var(--sans); text-align: left; white-space: normal; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 40; }
.help-tip:hover::after, .help-tip:focus-visible::after { opacity: 1; }
/* Kosketusnäytöt: ei leijuvaa vihjettä, vaan selitys tekstinä merkin alle (help-text). */
@media (hover: none) { .help-tip::after { display: none; } }
.help-text { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--ink); font-size: .82rem; line-height: 1.4; }
.help-text[hidden] { display: none; }

/* Kuvarivi kapealla näytöllä: kappalemäärä tietojen alle, poisto oikeaan yläkulmaan */
@media (max-width: 600px) {
    .file { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "pp info remove" "pp qty qty"; align-items: start; }
    .file .pp-holder { grid-area: pp; width: 72px; height: 72px; }
    .file .info { grid-area: info; }
    .file .qty { grid-area: qty; justify-self: start; }
    .file .remove { grid-area: remove; margin: -4px -4px 0 0; }
}

/* Tuoteryhmän kuvaus (rich editor) sivun ingressinä */
.group-lead { color: var(--muted); max-width: 46em; }
.group-lead p { margin: 0 0 .6em; }
.group-lead ul, .group-lead ol { margin: 0 0 .6em; padding-left: 1.3em; }

/* Evästeilmoitus (js/consent.js) */
.consent { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin-left: auto; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(27, 26, 23, .18); }
.consent h2 { margin: 0 0 6px; font-size: 1.1rem; }
.consent p { margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.consent-choices { display: grid; gap: 8px; margin-bottom: 14px; font-size: .92rem; }
.consent-choices label { display: flex; gap: 10px; align-items: flex-start; }
.consent-choices input { margin-top: 4px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-actions .btn { padding: 9px 16px; font-size: .9rem; }
.footer-consent { flex-basis: 100%; font-size: .85rem; }
.footer-consent a { color: inherit; }

/* Pitkä johdanto mobiilissa: lyhennetty, "Lue lisää" avaa (layouts/site). */
.is-collapsible:not(.is-open) { max-height: 200px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.collapse-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 20px; padding: 6px 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.collapse-toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.collapse-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.is-collapsible:not(.is-open) + .collapse-toggle { margin-top: -14px; }
.note.pickup-only { margin: 0 0 12px; font-size: .9rem; }
.note.pickup-only p { margin: 0 0 6px; }
.note.pickup-only p:last-child { margin-bottom: 0; }
.note.pickup-only ul { margin: 0 0 6px; padding-left: 1.2em; }

/* Oma koko (tuotesivu) */
.custom-size { margin-top: 14px; }
.custom-size-fields { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.custom-size-fields label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.custom-size-fields label span { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.custom-size-fields .input { width: 96px; }
.custom-size-x { padding-bottom: 10px; color: var(--muted); }
.custom-size .hint { margin: 10px 0 0; }

/* Ostoskorin tyhjennys */
.cart-clear { display: block; margin: 14px auto 0; font-size: .85rem; }
.btn.danger { background: var(--error); color: #fff; }

/* Kortit ostoskorissa */
.cart-card .card-proof { display: block; background: none; }
.cart-card .card-proof img { width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); }

/* Korttieditori (js/card-editor.js, card-page.js) */
.card-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
/* Esikatselulla aina pystykortin kuvasuhde ja kortti keskellä: nimet alkavat samalta korkeudelta myös vaakakorteissa. */
.card-template { display: grid; grid-template-rows: auto 1fr; align-content: start; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; font-size: .85rem; cursor: pointer; text-align: center; }
.card-template-preview { display: flex; align-items: center; aspect-ratio: var(--card-ratio, 2 / 3); }
.card-template[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.card-template-preview .ce-canvas { width: 100%; display: block; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.card-editor { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 2fr); gap: 18px; align-items: start; }
.ce-stage .ce-canvas { width: 100%; display: block; touch-action: none; cursor: grab; border-radius: 4px; box-shadow: var(--shadow); background: #fff; }
.ce-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: .78rem; color: var(--muted); }
.ce-legend span { display: inline-block; width: 18px; border-top: 1px dashed; }
.ce-legend .ce-cut { border-color: rgba(200, 40, 40, .7); }
.ce-legend .ce-safe { border-color: rgba(31, 78, 95, .5); margin-left: 8px; }
.ce-panel { display: grid; gap: 12px; }
.ce-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ce-head .btn.small { margin-top: 0; }
.ce-field { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.ce-field textarea { font-weight: 400; resize: vertical; }
.ce-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 400; }
.ce-inline input[type="range"] { flex: 1; min-width: 120px; }
.ce-size-value { min-width: 48px; font-variant-numeric: tabular-nums; }
.ce-colors input[type="color"] { width: 36px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.ce-swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); cursor: pointer; padding: 0; }
.ce-align { display: flex; gap: 6px; }
.ce-align .btn.small { margin-top: 0; }
.ce-align .btn.active { border-color: var(--accent); background: var(--accent-soft); }
.ce-hint { margin: 0; font-size: .82rem; font-weight: 400; color: var(--muted); }
.ce-delete { justify-self: start; font-size: .85rem; }
.ce-photo input[type="range"] { width: 100%; }
.card-qty { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-weight: 600; }
.card-qty .input { width: 90px; }
.card-dropzone { padding: 18px; }
@media (max-width: 860px) {
    .card-editor { grid-template-columns: 1fr; }
}
.card-editor.ce-landscape { grid-template-columns: 1fr; }
.card-editor.ce-landscape .ce-panel { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.card-editor.ce-landscape .ce-head, .card-editor.ce-landscape .ce-hint { grid-column: 1 / -1; }
.cart-item.cart-card { grid-template-columns: 140px minmax(0, 1fr) auto; }
.cart-item.cart-card .thumb-box { width: 140px; }
@media (max-width: 600px) { .cart-item.cart-card { grid-template-columns: 96px minmax(0, 1fr); } .cart-item.cart-card .thumb-box { width: 96px; } }

/* Sivua ei löytynyt (404) */
.not-found { padding-bottom: 24px; }
.not-found-code { margin: 0 0 4px; font: 700 .85rem var(--sans); letter-spacing: .12em; color: var(--muted); }
.not-found-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Mobiilivalikko (kapea näyttö tai body.nav-compact): erotinviivat, alavalikot kiinni ja nuolesta auki,
   aktiivinen sivu korostusvärillä ja pystyviivalla. Sama sisältö mediakyselyssä ja .nav-compact-luokalla. */
@media (max-width: 1100px) {
    .nav { gap: 0; padding: 4px 16px 12px; }
    .nav > a, .nav > .nav-item { border-bottom: 1px solid var(--line); }
    .nav > a:last-child, .nav > .nav-item:last-child { border-bottom: 0; }
    .nav a, .nav .nav-parent { position: relative; display: block; padding: 14px 12px; border-radius: 10px; font-size: 1rem; color: var(--ink); background: none; }
    .nav a:hover, .nav .nav-parent:hover { background: var(--line); }
    .nav-row { display: flex; align-items: center; gap: 4px; }
    .nav-row .nav-parent { flex: 1; width: 100%; }
    .nav-expand { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; cursor: pointer; color: var(--muted); }
    .nav-expand:hover { background: var(--line); }
    .nav-expand::before { content: ""; width: 8px; height: 8px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
    .nav-item.open .nav-expand::before { transform: translateY(2px) rotate(-135deg); }
    .nav-sub { display: none; flex-direction: column; gap: 2px; margin: 0 0 10px 12px; padding: 0 0 0 10px; border-left: 1px solid var(--line); border-radius: 0; }
    .nav .nav-item:not(.open) > .nav-sub { display: none; }
    .nav .nav-item.open > .nav-sub { display: flex; }
    .nav-sub a { padding: 10px 12px; font-size: .95rem; color: var(--muted); }
    .nav a.active, .nav a.active:hover { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
    .nav a.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
    .nav-item.active .nav-parent { background: none; color: var(--ink); font-weight: 600; }
    /* Ylätason linkissä suora erotinviiva. */
    .nav > a, .nav > a.active { border-radius: 0; }
}
.nav-compact .nav { gap: 0; padding: 4px 16px 12px; }
.nav-compact .nav > a, .nav-compact .nav > .nav-item { border-bottom: 1px solid var(--line); }
.nav-compact .nav > a:last-child, .nav-compact .nav > .nav-item:last-child { border-bottom: 0; }
.nav-compact .nav a, .nav-compact .nav .nav-parent { position: relative; display: block; padding: 14px 12px; border-radius: 10px; font-size: 1rem; color: var(--ink); background: none; }
.nav-compact .nav a:hover, .nav-compact .nav .nav-parent:hover { background: var(--line); }
.nav-compact .nav-row { display: flex; align-items: center; gap: 4px; }
.nav-compact .nav-row .nav-parent { flex: 1; width: 100%; }
.nav-compact .nav-expand { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; cursor: pointer; color: var(--muted); }
.nav-compact .nav-expand:hover { background: var(--line); }
.nav-compact .nav-expand::before { content: ""; width: 8px; height: 8px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.nav-compact .nav-item.open .nav-expand::before { transform: translateY(2px) rotate(-135deg); }
.nav-compact .nav-sub { display: none; flex-direction: column; gap: 2px; margin: 0 0 10px 12px; padding: 0 0 0 10px; border-left: 1px solid var(--line); border-radius: 0; }
.nav-compact .nav .nav-item:not(.open) > .nav-sub { display: none; }
.nav-compact .nav .nav-item.open > .nav-sub { display: flex; }
.nav-compact .nav-sub a { padding: 10px 12px; font-size: .95rem; color: var(--muted); }
.nav-compact .nav a.active, .nav-compact .nav a.active:hover { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-compact .nav a.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.nav-compact .nav-item.active .nav-parent { background: none; color: var(--ink); font-weight: 600; }
.nav-compact .nav > a, .nav-compact .nav > a.active { border-radius: 0; }

/* Kassa: maksutapa (verkkomaksu / maksa noudettaessa) */
.payment-choice { display: grid; gap: 8px; margin: 0 0 16px; }
.payment-choice[hidden] { display: none; }
.payment-choice .label { font-weight: 600; }
.payment-choice .option .price { font-size: .85rem; }
