/* Tiikeri Studio – suunnittelustudio. Brändi: vihreä #0F4D3A, keltainen #FFDD00, kerma #F8F6E9. */
.tts, .tts-launch {
	--g: #0F4D3A; --g2: #0B3A2C; --y: #FFDD00; --cr: #F8F6E9; --cr2: #EFEBD6; --ink: #13231D; --mut: #5B6B63; --line: rgba(15, 77, 58, .16);
	--blue: #1E88E5; --red: #C8102E;
}
html.tts-open, body.tts-open { overflow: hidden; overscroll-behavior: none; }
.tts { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; z-index: 100000; background: var(--cr); color: var(--ink); display: flex; flex-direction: column; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.tts *, .tts *::before, .tts *::after { box-sizing: border-box; }
.tts button { font: inherit; color: inherit; cursor: pointer; }
.tts [hidden] { display: none !important; }

/* Yläpalkki */
.tts-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--g); color: var(--cr); flex: none; min-height: 60px; }
.tts-back { display: inline-flex; gap: 6px; align-items: center; border: 0; background: rgba(255,255,255,.1); color: var(--cr) !important; padding: 8px 14px; border-radius: 999px; font-weight: 700; }
.tts-back:hover { background: rgba(255,255,255,.18); }
.tts-title { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tts-title b { font-weight: 900; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tts-title small { opacity: .7; font-size: 12px; }
.tts-top__tools { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.tts-top__cta { display: flex; gap: 10px; align-items: center; }
.tts-ib { border: 0; background: rgba(255,255,255,.1); color: inherit; width: 38px; height: 38px; border-radius: 10px; font-size: 18px; display: inline-grid; place-items: center; }
.tts-ib:disabled { opacity: .35; cursor: default; }
.tts-pricebtn { border: 0; background: none; color: var(--cr) !important; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; padding: 0 4px; }
.tts-pricebtn b { font-size: 18px; color: var(--y); }
.tts-pricebtn small { font-size: 11.5px; opacity: .8; }

/* Napit */
.tts-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 800; text-decoration: none; min-height: 42px; transition: transform .1s, filter .15s; }
.tts-btn:hover { filter: brightness(1.06); }
.tts-btn:active { transform: translateY(1px); }
.tts-btn:disabled { opacity: .5; cursor: default; }
.tts-btn--g { background: var(--g); color: var(--cr) !important; }
.tts-btn--y { background: var(--y); color: var(--g) !important; }
.tts-btn--ghost { background: transparent; color: var(--g) !important; box-shadow: inset 0 0 0 1.5px var(--g); }
.tts-btn--light { color: var(--cr) !important; box-shadow: inset 0 0 0 1.5px rgba(248,246,233,.5); }
.tts-btn--sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.tts-btn--lg { min-height: 54px; font-size: 17px; }
.tts-btn--block { width: 100%; margin-top: 10px; }
.tts :focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }

/* Runko */
.tts-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 84px 360px minmax(0, 1fr); }
.tts-rail { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px 6px; gap: 4px; overflow-y: auto; }
.tts-rail button { border: 0; background: none; border-radius: 12px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--mut); }
.tts-rail button:hover { background: var(--cr); }
.tts-rail button[aria-pressed="true"] { background: var(--g); color: var(--cr); }
.tts-rail__i { font-size: 23px; line-height: 1; }
.tts-panel { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 16px 18px 30px; }
.tts-ph { position: relative; margin-bottom: 12px; padding-right: 30px; }
.tts-ph h2 { margin: 0 0 4px; font-size: 19px; font-weight: 900; color: var(--g); }
.tts-ph p { margin: 0; color: var(--mut); font-size: 13.5px; }
.tts-ph__x { position: absolute; top: -4px; right: -4px; border: 0; background: none; font-size: 26px; color: var(--mut); width: 36px; height: 36px; border-radius: 50%; }
.tts-ph__x:hover { background: var(--cr); }
.tts-h3 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--mut); font-weight: 800; }
.tts-muted { color: var(--mut); font-size: 13.5px; margin: 6px 0; }
.tts-small { font-size: 12px; }
.tts-status { font-size: 13px; color: var(--g); margin: 8px 0; min-height: 1em; }
.tts-status.is-err { color: var(--red); font-weight: 700; }
.tts-input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; background: var(--cr); color: var(--ink); resize: vertical; margin-bottom: 8px; }
.tts-input:focus { outline: none; border-color: var(--g); box-shadow: 0 0 0 3px rgba(255,221,0,.6); }
.tts-chip { border: 0; background: var(--cr); border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 13px; color: var(--g); }
.tts-chip[aria-pressed="true"] { background: var(--g); color: var(--y); }
.tts-quick { display: flex; gap: 6px; flex-wrap: wrap; }

/* Näyttämö */
.tts-stage { position: relative; min-width: 0; display: flex; flex-direction: column; background: radial-gradient(circle at 50% 40%, #fff 0%, var(--cr) 70%); }
.tts-canvas { flex: 1; min-height: 0; display: grid; place-items: center; padding: 16px; }
.tts-svg { width: 100%; height: 100%; max-height: calc(100vh - 150px); touch-action: none; user-select: none; -webkit-user-select: none; }
.tts-obj { cursor: move; }
.tts-obj.is-locked { cursor: default; }
.tts-h { cursor: pointer; }
.tts-h--scale { cursor: nwse-resize; }
.tts-h--rot { cursor: grab; }
.tts-stagebar { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px 16px 14px; }
.tts-sides { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 2px 10px rgba(15,77,58,.12); }
.tts-side { border: 0; background: none; border-radius: 999px; padding: 8px 18px; font-weight: 800; color: var(--mut); display: inline-flex; gap: 6px; align-items: center; }
.tts-side[aria-pressed="true"] { background: var(--g); color: var(--cr); }
.tts-side b { background: var(--y); color: var(--g); border-radius: 999px; font-size: 11px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; }
.tts-zoom { background: #fff !important; box-shadow: 0 2px 10px rgba(15,77,58,.12); color: var(--g); }
.tts-zoom[aria-pressed="true"] { background: var(--g) !important; }
.tts-warn { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100% - 24px)); background: #FFF4D6; border: 1px solid #F0D27A; border-radius: 14px; font-size: 13px; z-index: 3; box-shadow: 0 6px 20px rgba(0,0,0,.1); overflow: hidden; }
.tts-warn.is-block { background: #FDE8EC; border-color: #F2A7B6; }
.tts-warn.is-open { width: min(560px, calc(100% - 24px)); }
.tts-warn__bar { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 8px 14px; font-weight: 800; color: var(--ink); text-align: left; }
.tts-warn__bar span { flex: 1; }
.tts-warn__bar em { font-style: normal; font-size: 12px; color: var(--g); white-space: nowrap; }
.tts-warn__list { max-height: min(46vh, 380px); overflow-y: auto; border-top: 1px solid rgba(0,0,0,.08); }
.tts-warn__item { padding: 8px 14px; border-bottom: 1px solid rgba(0,0,0,.06); background: rgba(255,255,255,.55); }
.tts-warn__item:last-child { border-bottom: 0; }
.tts-warn__item p { margin: 0; line-height: 1.35; }
.tts-warn__item.is-block p { color: #8F0A2A; font-weight: 700; }
.tts-warn__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tts-warn__acts button { border: 1.5px solid var(--line); background: #fff; color: var(--g); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 800; }
.tts-warn__acts button.is-main { background: var(--g); border-color: var(--g); color: #fff; }
.tts-seg--upl { margin-bottom: 10px; }
.tts-replace { margin-bottom: 4px; cursor: pointer; }

/* Värit ja fontit */
.tts-colors, .tts-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.tts-color { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.18); padding: 0; position: relative; }
.tts-color[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--g); }
.tts-color--custom { display: grid; place-items: center; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; overflow: hidden; }
.tts-color--custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.tts-color--custom span { font-weight: 900; color: #fff; text-shadow: 0 0 3px #000; pointer-events: none; }
.tts-swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.tts-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--g); }
.tts-fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.tts-font { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 6px 6px; font-size: 18px; display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap; overflow: hidden; }
.tts-font small { font: 10.5px system-ui, sans-serif; color: var(--mut); }
.tts-font[aria-pressed="true"] { border-color: var(--g); background: var(--cr); box-shadow: inset 0 0 0 1px var(--g); }
.tts-slider { display: grid; grid-template-columns: 90px 1fr 54px; gap: 8px; align-items: center; margin: 10px 0; font-size: 13.5px; font-weight: 700; }
.tts-slider input { accent-color: var(--g); width: 100%; }
.tts-slider output { text-align: right; color: var(--mut); font-size: 12.5px; }
.tts-toggle { display: flex; gap: 10px; align-items: center; margin: 12px 0 6px; font-weight: 700; cursor: pointer; }
.tts-toggle input { width: 20px; height: 20px; accent-color: var(--g); }
.tts-toggles { display: flex; gap: 18px; flex-wrap: wrap; }
.tts-seg { display: flex; gap: 4px; margin: 8px 0; }
.tts-seg button { flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 7px; font-size: 12.5px; font-weight: 700; }
.tts-seg button[aria-pressed="true"] { background: var(--g); color: var(--y); border-color: var(--g); }
.tts-sizeln { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.tts-sizeln label { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.tts-num { width: 76px; border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 8px; font: inherit; font-size: 16px; background: var(--cr); }
.tts-dim { color: var(--mut); font-size: 12.5px; }
.tts-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* Lataus */
.tts-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 14px; border: 2px dashed rgba(15,77,58,.35); border-radius: 16px; background: var(--cr); cursor: pointer; text-align: center; color: var(--g); }
.tts-drop.is-over { background: rgba(255,221,0,.35); border-color: var(--g); }
.tts-drop__i { font-size: 30px; }
.tts-drop small { color: var(--mut); }
.tts-uploads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tts-upl { border: 1.5px solid var(--line); background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 12px 12px; border-radius: 10px; aspect-ratio: 1; padding: 4px; }
.tts-upl img { width: 100%; height: 100%; object-fit: contain; }
.tts-tips { margin: 16px 0 0; padding-left: 18px; color: var(--mut); font-size: 13px; }
.tts-tips li { margin-bottom: 4px; }

/* Kuvakirjasto */
.tts-cats { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.tts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tts-clip { aspect-ratio: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px; color: var(--g); }
.tts-clip:hover { background: var(--cr); border-color: var(--g); }
.tts-clip svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.tts-clipw > .tts-btn--ghost { width: 100%; margin-top: 10px; }
.tts-attr { font-size: 11px; color: var(--mut); margin-top: 14px; }
.tts-attr a { color: inherit; }

/* Nimet & numerot */
.tts-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.tts-row { display: grid; grid-template-columns: 72px 1fr 64px 30px; gap: 6px; align-items: center; }
.tts-row:not(:has(input + input)) { grid-template-columns: 72px 1fr 30px; }
.tts-row--h { font-size: 11.5px; font-weight: 800; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; }
.tts-row select, .tts-row input { width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 7px 8px; font: inherit; font-size: 14px; background: var(--cr); min-width: 0; text-transform: uppercase; }
.tts-x { border: 0; background: none; font-size: 20px; color: var(--mut); }
.tts-rowbtns { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* Tasot */
.tts-layers { display: flex; flex-direction: column; gap: 6px; }
.tts-layer { display: flex; gap: 4px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 4px; }
.tts-layer.is-on { border-color: var(--blue); }
.tts-layer__main { flex: 1; min-width: 0; border: 0; background: none; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; align-items: center; }
.tts-layer__main img { grid-row: span 2; width: 44px; height: 44px; object-fit: contain; background: var(--cr); border-radius: 8px; }
.tts-layer__main span { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.tts-layer__main small { color: var(--mut); font-size: 11.5px; }
.tts-layer .tts-ib { background: var(--cr); width: 32px; height: 32px; font-size: 14px; color: var(--g); }

/* Tuotteet */
.tts-prods { display: flex; flex-direction: column; gap: 6px; }
.tts-prod { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px; }
.tts-prod.is-on { border-color: var(--g); background: var(--cr); }
.tts-prod img, .tts-prod__ph { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background: var(--cr); display: grid; place-items: center; }
.tts-prod span { display: flex; flex-direction: column; }
.tts-prod b { font-size: 13.5px; }
.tts-prod small { color: var(--mut); font-size: 12px; }

/* Ikkunat */
.tts-modal { position: fixed; inset: 0; z-index: 100010; background: rgba(6,38,28,.55); display: grid; place-items: center; padding: 16px; }
.tts-modal__card { background: #fff; border-radius: 20px; padding: 22px; width: min(520px, 100%); max-height: 92vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.tts-modal__card h2 { margin: 0 0 8px; color: var(--g); font-weight: 900; font-size: 21px; }
.tts-modal__btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.tts-order__head { display: flex; justify-content: space-between; align-items: center; }
.tts-order__head .tts-ph__x { position: static; }
.tts-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin: 12px 0; }
.tts-sizebox { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--cr); border-radius: 12px; padding: 8px 6px; }
.tts-sizebox b { font-size: 13px; }
.tts-sizebox input { width: 100%; text-align: center; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px; font: inherit; font-size: 16px; background: #fff; }
.tts-sizebox em { font-style: normal; font-size: 11px; color: var(--mut); }
.tts-sizebox.is-ro span { font-size: 18px; font-weight: 900; color: var(--g); }
.tts-lines { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; margin: 14px 0; }
.tts-lines dt { color: var(--mut); }
.tts-lines dd { margin: 0; font-weight: 700; text-align: right; }
.tts-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-top: 2px solid var(--cr2); padding-top: 10px; }
.tts-total b { font-size: 30px; font-weight: 900; color: var(--g); }
.tts-total span { color: var(--mut); font-weight: 700; }
.tts-tip { background: #FFF4D6; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 10px 0 0; }
.tts-share__img { width: 100%; max-height: 260px; object-fit: contain; background: var(--cr); border-radius: 14px; margin: 6px 0; }
.tts-linkrow { display: flex; gap: 6px; align-items: flex-start; }
.tts-linkrow .tts-input { margin: 0; font-size: 13px; }

/* Tuotesivu */
.tts-launch .tts-lprev { cursor: pointer; position: relative; }
.tts-launch .tts-lprev::after { content: "Avaa studio →"; position: absolute; right: 14px; bottom: 14px; background: var(--g); color: var(--y); font-weight: 800; font-size: 13px; padding: 7px 12px; border-radius: 999px; opacity: 0; transition: opacity .2s; }
.tts-launch .tts-lprev:hover::after { opacity: 1; }
.tts-lsvg { width: 100%; height: auto; display: block; }
.tts-start { background: var(--g); color: var(--cr); border-radius: 18px; padding: 20px; margin: 14px 0; }
.tts-cta { width: 100%; background: var(--y) !important; color: var(--g) !important; font-size: 18px !important; min-height: 58px; }
.tts-cont { margin: 8px 0 0; font-size: 13px; opacity: .85; text-align: center; }
.tts-linkbtn { border: 0; background: none; color: var(--y); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }
.tts-feats { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.tts-feats li { display: flex; gap: 10px; align-items: center; }
.tts-feats b { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.12); display: grid; place-items: center; color: var(--y); flex: none; font-size: 17px; }
.tts-est__in { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tts-est__in label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--mut); }
.tts-sel { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px; font: inherit; background: var(--cr); }
.tts-est__out b { font-size: 28px; font-weight: 900; color: var(--g); }
.tts-est__out span { display: block; color: var(--mut); font-size: 13px; }
.tts-tiers { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.tts-tiers span { background: var(--cr); border-radius: 10px; padding: 4px 10px; font-size: 13px; }
.tts-tiers small { color: var(--mut); margin-left: 2px; }

/* Puhelin / kapea */
@media (max-width: 900px) {
	.tts-hide-s { display: none; }
	.tts-top { padding: 8px 10px; gap: 8px; }
	.tts-title small { display: none; }
	.tts-top__cta .tts-btn--y { padding: 8px 12px; font-size: 13px; min-height: 38px; }
	.tts-pricebtn { display: none; }
	.tts-body { display: flex; flex-direction: column; position: relative; }
	.tts-stage { flex: 1; order: 1; }
	.tts-svg { max-height: none; }
	.tts-canvas { padding: 6px; }
	.tts-rail { order: 3; flex-direction: row; border: 0; border-top: 1px solid var(--line); padding: 4px 4px max(4px, env(safe-area-inset-bottom)); justify-content: space-around; overflow-x: auto; }
	.tts-rail button { flex: 1; min-width: 58px; padding: 6px 2px; font-size: 10.5px; }
	.tts-rail__i { font-size: 22px; }
	.tts-panel { order: 2; position: absolute; left: 0; right: 0; bottom: 0; max-height: 58%; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.18); transform: translateY(105%); transition: transform .25s cubic-bezier(.2,.9,.3,1); z-index: 5; padding: 14px 16px 24px; }
	.tts.is-panel .tts-panel { transform: none; }
	.tts-panel::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--cr2); margin: -4px auto 10px; }
	.tts-stagebar { padding: 6px 10px 8px; }
	.tts-grid { grid-template-columns: repeat(5, 1fr); }
	.tts-fonts { max-height: 200px; }
	.tts-body { --panel-h: 0px; }
}
@media (max-width: 420px) {
	.tts-top__tools .tts-btn { padding: 8px 10px; }
	.tts-ib { width: 34px; height: 34px; }
}
@media (max-width: 900px) {
	.tts-cats { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
	.tts-cats::-webkit-scrollbar { display: none; }
	.tts-cats .tts-chip { flex: none; }
}

/* Painotapa */
.tts-methods { display: grid; gap: 8px; }
.tts-launch .tts-methods { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tts-methods--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.tts-method { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.tts-method:hover { border-color: rgba(15, 77, 58, .4); }
.tts-method.is-on { border-color: var(--g); box-shadow: inset 0 0 0 1px var(--g); background: #fff; }
.tts-method.is-on .tts-method__h b::before { content: "✓ "; color: var(--g); }
.tts-method__h { display: flex; flex-direction: column; gap: 1px; }
.tts-method__h b { font-weight: 900; color: var(--g); font-size: 15.5px; line-height: 1.2; }
.tts-method__h em { font-style: normal; font-size: 11.5px; color: var(--mut); white-space: nowrap; }
.tts-method__d { font-size: 13px; line-height: 1.35; }
.tts-method__b { font-size: 12px; color: var(--mut); }
.tts-method__p { margin-top: auto; font-size: 12px; white-space: nowrap; font-weight: 700; color: var(--g); background: var(--cr); border-radius: 8px; padding: 3px 8px; align-self: flex-start; }
.tts-method__w { font-size: 12px; font-weight: 700; color: #8A5A00; }
.tts-method.is-warn:not(.is-on) { opacity: .8; }
.tts-methods--compact .tts-method { padding: 8px 10px; border-radius: 12px; }
.tts-methods--compact .tts-method__h { flex-direction: column; gap: 0; }
.tts-methods--compact .tts-method__p { font-size: 11px; padding: 2px 6px; }
.tts-inks { display: flex; align-items: center; gap: 10px; }
.tts-inks span { flex: 1; font-weight: 700; }
.tts-inks .tts-ib { background: var(--cr2); color: var(--g); }
.tts-inks b { min-width: 20px; text-align: center; font-size: 18px; }
@media (max-width: 520px) { .tts-methods--compact .tts-method__p { display: none; } }
.tts-methods--compact .tts-method { min-width: 0; }
.tts-methods--compact .tts-method__h b { font-size: 14px; overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 520px) { .tts-methods--compact .tts-method__h b { font-size: 12.5px; } .tts-methods--compact .tts-method { padding: 8px; } }

/* Värierottelu ja painovärit */
.tts-ink { width: 26px; height: 26px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); display: inline-block; }
.tts-ink.is-none { background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 10px 10px; position: relative; }
.tts-ink.is-none::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--red); transform: rotate(45deg); }
.tts-sepchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; margin: 8px 0; }
.tts-sepchip { display: flex; align-items: center; gap: 8px; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 6px 8px; min-width: 0; }
.tts-sepchip > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tts-sepchip b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tts-sepchip small { font-size: 11px; color: var(--mut); }
.tts-sepchip.is-on { border-color: var(--g); box-shadow: inset 0 0 0 1px var(--g); }
.tts-seppick { background: var(--cr); border-radius: 12px; padding: 10px; display: grid; gap: 6px; margin-bottom: 8px; }
.tts-inklist { display: grid; gap: 6px; }
.tts-inkrow { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; overflow: hidden; }
.tts-inkrow.is-open { border-color: var(--g); }
.tts-inkrow .tts-colors { padding: 0 10px 10px; }
.tts-inkrow__main { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; text-align: left; }
.tts-inkrow__main:disabled { cursor: default; }
.tts-inkrow__t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.tts-inkrow__t b { font-size: 14px; }
.tts-inkrow__t small { font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; }
.tts-inkrow__main em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--g); }
.tts-modal__card.tts-films { width: min(860px, 100%); }
.tts-filmgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tts-film { margin: 0; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.tts-film img { width: 100%; height: 160px; object-fit: contain; background: #fff; border-radius: 6px; image-rendering: auto; }
.tts-film figcaption { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; font-size: 13px; }
.tts-film figcaption .tts-ink { grid-row: span 2; width: 22px; height: 22px; }
.tts-film figcaption small { color: var(--mut); font-size: 11px; }
.tts-linkbtn { border: 0; background: none; color: var(--g); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0 8px; align-self: flex-start; }
.tts-marks { animation: tts-pulse 1.4s ease-in-out infinite; }
@keyframes tts-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .tts-marks { animation: none; } }

/* Ikonit (SVG-viivaikonit) */
.tts-ic { display: inline-flex; align-items: center; justify-content: center; line-height: 1; flex: none; }
.tts-ic svg, .tts-ib svg, .tts small svg, .tts-feats svg { display: block; width: 1em; height: 1em; }
.tts-btn .tts-ic { font-size: 1.15em; }
.tts-ib { font-size: 19px; }
.tts-ib svg { width: 20px; height: 20px; }
.tts-layer .tts-ib svg { width: 16px; height: 16px; }
.tts-rail button[aria-pressed="true"] .tts-rail__i { color: var(--y); }
.tts-drop__i { font-size: 30px; color: var(--g); }
.tts-prod__ph { font-size: 24px; color: var(--mut); }
.tts-warn__bar { display: flex; align-items: center; gap: 8px; }
.tts-warn__bar > span:not(.tts-ic) { flex: 1; text-align: left; }
.tts-warn__item p { display: flex; gap: 8px; align-items: flex-start; }
.tts-warn__item p .tts-ic { margin-top: 2px; color: #B26B00; }
.tts-warn__item.is-block p .tts-ic, .tts-warn.is-block .tts-warn__bar .tts-ic { color: var(--red); }
.tts-method__w { display: inline-flex; align-items: center; gap: 5px; }
.tts small svg, .tts-order span svg { display: inline-block; vertical-align: -2px; width: 1em; height: 1em; }
.tts-back { display: inline-flex; align-items: center; gap: 6px; }
.tts-back .tts-ic { font-size: 20px; }
.tts-top__cta .tts-btn--y { white-space: nowrap; gap: 6px; }
@media (max-width: 420px) { .tts-top__cta .tts-btn--y .tts-ic { display: none; } .tts-top__cta .tts-btn--y { padding: 8px 12px; } }
.tts-stock { font-size: 10.5px; font-weight: 700; line-height: 1.1; text-align: center; }
.tts-stock--ok { color: #1E7B4F; }
.tts-stock--low { color: #8A6A00; }
.tts-stock--out { color: var(--red); }
.tts-stockwarn { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #FBF1C2; color: #5A4A00; font-size: 13px; line-height: 1.4; }
.tts-stockwarn svg { display: inline-block; vertical-align: -2px; width: 1em; height: 1em; }

/* ---------- 1.9: siistimpi näyttämö, kelluva työkalurivi, kontekstivalikko, esikatselu ---------- */
.tts-stage { background:
	radial-gradient(ellipse 60% 8% at 50% 92%, rgba(15,42,32,.10), transparent 70%),
	radial-gradient(circle at 50% 38%, #fff 0%, #FBFAF3 45%, var(--cr) 80%); }
.tts-canvas { position: relative; }
.tts-obj:hover image { filter: drop-shadow(0 0 1.5px rgba(15,77,58,.55)); }
.tts.is-drag .tts-tb, .tts.is-drag .tts-warn { opacity: 0; pointer-events: none; }
.tts-h--se { cursor: nwse-resize; } .tts-h--sw { cursor: nesw-resize; }
.tts-h--rot:active { cursor: grabbing; }
.tts-h--ex { cursor: ew-resize; } .tts-h--ey { cursor: ns-resize; }
.tts.is-preview .tts-obj { cursor: default; }
.tts.is-preview .tts-obj:hover image { filter: none; }

.tts-tb { position: absolute; z-index: 4; display: flex; gap: 2px; padding: 4px; background: #fff; border-radius: 14px; box-shadow: 0 8px 28px rgba(15,42,32,.18), 0 0 0 1px rgba(15,77,58,.08); transition: opacity .12s; }
.tts-tb__b { border: 0; background: none; padding: 0; margin: 0; min-width: 0; min-height: 0; flex: none; box-shadow: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; color: var(--g); }
.tts-tb__b:hover { background: var(--cr); }
.tts-tb__b.is-del { color: var(--red); }
.tts-tb__b.is-del:hover { background: #FDE8EC; }

.tts-ctx { position: fixed; z-index: 100002; min-width: 270px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 14px 40px rgba(15,42,32,.22), 0 0 0 1px rgba(15,77,58,.08); font-size: 14px; }
.tts-ctx hr { border: 0; border-top: 1px solid var(--line); margin: 5px 6px; }
.tts-ctx__i { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 9px; text-align: left; color: var(--ink); min-height: 0; font-weight: 500; letter-spacing: 0; text-transform: none; box-shadow: none; }
.tts-ctx__i .tts-ic { font-size: 17px; color: var(--g); flex: none; width: auto; }
.tts-ctx__i kbd { flex: none; }
.tts-ctx__i span { flex: 1; text-align: left; white-space: nowrap; }
.tts-ctx__i kbd { font: 600 11.5px system-ui, sans-serif; color: var(--mut); background: var(--cr); border-radius: 6px; padding: 2px 6px; }
.tts-ctx__i:hover:not([disabled]), .tts-ctx__i:focus-visible { background: var(--cr); outline: none; }
.tts-ctx__i[disabled] { opacity: .38; cursor: default; }
.tts-ctx__i.is-del, .tts-ctx__i.is-del .tts-ic { color: var(--red); }

.tts-pvbar { display: inline-flex; gap: 8px; align-items: center; }
.tts-pv { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #fff; color: var(--g) !important; min-width: 0; line-height: 1.2; border-radius: 999px; padding: 8px 14px; font-weight: 800; box-shadow: 0 2px 10px rgba(15,77,58,.12); }
.tts-pv .tts-ic { font-size: 18px; }
.tts-pv.is-on { background: var(--g); color: var(--cr) !important; }
.tts-pvseg { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 2px 10px rgba(15,77,58,.12); }
.tts-pvseg button { border: 0; background: none; border-radius: 999px; padding: 6px 14px; font-weight: 800; color: var(--mut); }
.tts-pvseg button[aria-pressed="true"] { background: var(--y); color: var(--g); }
.tts-model { position: absolute; inset: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.tts-model__svg { max-width: 100%; max-height: calc(100% - 30px); border-radius: 16px; box-shadow: 0 16px 40px rgba(15,42,32,.16); background: #fff; }
.tts-model__note { margin: 0; font-size: 12px; color: var(--mut); text-align: center; }
.tts-model__load { color: var(--mut); }

.tts-dim.is-warn { color: #B7791F; font-weight: 700; }
.tts-tips { margin-top: 14px; }
.tts-guide { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--cr); color: var(--g); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.tts-guide:hover { background: var(--cr2); }
.tts-guide .tts-ic { font-size: 18px; flex: none; }

/* Tuotesivun kuvagalleria */
.tts-lprev { position: relative; }
.tts-lprev:not(.is-photo) { cursor: pointer; }
.tts-lphoto { display: block; width: 100%; height: 100%; object-fit: contain; aspect-ratio: 4 / 5; background: #fff; border-radius: inherit; }
.tts-lprev.is-photo { background: #fff; }
.tts-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.tts-thumb { flex: none; width: 72px; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: inherit; color: inherit; }
.tts-thumb img, .tts-thumb__d { width: 72px; height: 88px; object-fit: cover; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(15,77,58,.14); display: grid; place-items: center; font-size: 24px; color: #0F4D3A; }
.tts-thumb small { font-size: 11.5px; font-weight: 700; color: #5B6B63; white-space: nowrap; }
.tts-thumb[aria-pressed="true"] img, .tts-thumb[aria-pressed="true"] .tts-thumb__d { box-shadow: 0 0 0 2px #0F4D3A; }
.tts-thumb[aria-pressed="true"] small { color: #0F4D3A; }
@media (max-width: 899px) {
	.tts-tb__b { width: 42px; height: 42px; }
	.tts-pv > span:not(.tts-ic) { display: none; }
	.tts-pv { padding: 0; width: 42px; height: 42px; justify-content: center; }
	.tts-pv .tts-ic { font-size: 20px; }
	.tts-tb { gap: 0; }
}

/* ---------- 1.11: vähemmän nappeja ---------- */
.tts-rail__sep { flex: 1; min-height: 12px; }
.tts-rail .tts-rail__aux { opacity: .85; }
.tts-rail .tts-rail__aux:disabled { opacity: .3; cursor: default; background: none; }
.tts-top__ur { display: none; gap: 6px; }
.tts-cta-s { display: none; }
.tts-adv { margin: 16px 0 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.tts-adv > summary { cursor: pointer; font-weight: 800; font-size: 13.5px; color: var(--g); list-style: none; display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.tts-adv > summary::-webkit-details-marker { display: none; }
.tts-adv > summary::before { content: '+'; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--cr); font-weight: 900; }
.tts-adv[open] > summary::before { content: '−'; }
.tts-adv > *:not(summary) { margin-top: 10px; }
.tts-iconrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tts-iconrow button { border: 0; background: none; border-radius: 10px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--g); min-width: 0; }
.tts-iconrow button .tts-ic { font-size: 19px; }
.tts-iconrow button:hover:not(:disabled) { background: var(--cr); }
.tts-iconrow button:disabled { opacity: .35; cursor: default; }
.tts-iconrow button.is-del { color: var(--red); }
@media (max-width: 900px) {
	.tts-rail .tts-rail__aux, .tts-rail__sep { display: none; }
	.tts-top__ur { display: inline-flex; }
	.tts-cta-l { display: none; }
	.tts-cta-s { display: inline; }
}
/* Tuotesivun valokuva: koko tuote näkyvissä (ei rajausta eikä siirtymää) */
.tts-lprev.is-photo .tts-lphoto { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; aspect-ratio: auto !important; object-fit: contain !important; padding: 5%; box-sizing: border-box; margin: 0 !important; border-radius: 0 !important; background: #fff; }
.tts-thumb img { object-fit: contain !important; background: #fff; height: 88px !important; max-width: none !important; }

/* Kuvat mahtuvat näyttöön (ei vieritystä tuotteen näkemiseksi) */
.tts-launch .tts-lprev { max-height: min(72vh, 680px); }
.tts-launch .tts-lprev.is-photo { aspect-ratio: auto; height: min(72vh, 680px); }
.tts-thumb__svg svg { width: 100%; height: 100%; display: block; }
.tts-thumb__svg { padding: 6px; box-sizing: border-box; }
/* Ikonit: selkeämmät */
.tts-rail__i { font-size: 24px; }
.tts-rail button { transition: background .15s, color .15s; }
.tts-rail button[aria-pressed="true"] .tts-svgi { color: var(--y); }
.tts-feats b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 221, 0, .16); color: var(--y); font-size: 17px; }

/* ---------- Sovellusmaiset ikonit: paksummat viivat, ikonit omissa pyöristetyissä laatoissa ---------- */
.tts-rail button { gap: 6px; color: var(--g); font-weight: 800; background: none !important; }
.tts-rail .tts-rail__i { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; background: var(--cr); color: var(--g); box-shadow: inset 0 0 0 1px rgba(15, 77, 58, .08); transition: background .15s, color .15s, transform .15s; }
.tts-rail .tts-rail__i svg { width: 24px; height: 24px; }
.tts-rail button[data-tool="upload"] .tts-rail__i { background: var(--y); }
@media (hover: hover) {
	.tts-rail button:hover .tts-rail__i { transform: translateY(-1px); background: var(--cr2); }
	.tts-rail button[data-tool="upload"]:hover .tts-rail__i { background: #FFE640; }
}
.tts-rail button[aria-pressed="true"] { color: var(--g); }
.tts-rail button[aria-pressed="true"] .tts-rail__i, .tts-rail button[data-tool][aria-pressed="true"] .tts-rail__i { background: var(--g); color: var(--y); box-shadow: 0 6px 16px rgba(15, 77, 58, .28); }
.tts-rail button[aria-pressed="true"] .tts-svgi { color: var(--y); }
.tts-ib { width: 40px; height: 40px; border-radius: 13px; background: rgba(255, 255, 255, .14); }
.tts-ib svg { width: 22px; height: 22px; }
.tts-back { padding: 9px 16px; }
.tts-iconrow button .tts-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--cr); font-size: 20px; }
.tts-iconrow button.is-del .tts-ic { background: #FDE8EC; }
@media (max-width: 900px) {
	.tts-rail { padding: 6px 4px max(6px, env(safe-area-inset-bottom)); }
	.tts-rail button { padding: 4px 2px; font-size: 11px; gap: 4px; }
	.tts-rail .tts-rail__i { width: 44px; height: 40px; border-radius: 14px; font-size: 22px; }
	.tts-ib { width: 38px; height: 38px; }
}
/* Pikkukuvat: valitun kehys ei leikkaudu vasemmasta reunasta */
.tts-thumbs { padding: 3px 3px 6px; margin-left: -3px; margin-right: -3px; scroll-padding-inline: 3px; }
/* Alapalkin ikonit: vihreä laatta, valkoinen yksinkertainen viivaikoni; valittu = keltainen laatta */
.tts-rail .tts-rail__i, .tts-rail button[data-tool="upload"] .tts-rail__i { background: var(--g); color: #fff; box-shadow: none; }
.tts-rail .tts-rail__i .tts-svgi, .tts-rail button .tts-svgi { color: #fff; }
.tts-rail .tts-svgi path[fill="currentColor"] { display: none; }
.tts-rail button[aria-pressed="true"] .tts-rail__i, .tts-rail button[data-tool][aria-pressed="true"] .tts-rail__i { background: var(--y); color: var(--g); box-shadow: 0 6px 16px rgba(15, 77, 58, .22); }
.tts-rail button[aria-pressed="true"] .tts-svgi, .tts-rail button[data-tool][aria-pressed="true"] .tts-svgi { color: var(--g); }
@media (hover: hover) {
	.tts-rail button:hover .tts-rail__i, .tts-rail button[data-tool="upload"]:hover .tts-rail__i { background: var(--g2); }
	.tts-rail button[aria-pressed="true"]:hover .tts-rail__i { background: var(--y); }
}
.tts .ttc-aiq { display: block; font-size: 12.5px; font-weight: 700; color: var(--mut); margin: 6px 0 0; }
.tts .ttc-aiq.is-out { color: var(--red); }

/* ---------- 1.33: puhelin – näyttämö ei jää paneelin alle, valinnalle oma toimintopalkki ---------- */
.tts-selbar { display: none; }
.tts-toast { position: absolute; left: 50%; bottom: 74px; transform: translate(-50%, 8px); z-index: 6; max-width: min(92%, 420px); margin: 0; padding: 10px 14px; border-radius: 14px; background: #0F4D3A; color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.35; text-align: center; box-shadow: 0 10px 28px rgba(15, 42, 32, .28); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.tts-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tts-toast.is-err { background: #B3261E; }
@media (max-width: 899px) {
	/* Paneeli on näyttämön alla (ei päällä): paita kutistuu näkyviin paneelin yläpuolelle. */
	.tts-panel { position: relative; transform: none !important; transition: none; display: none; flex: none; max-height: 46%; order: 2; padding: 12px 16px 18px; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 24px rgba(15, 42, 32, .12); }
	.tts.is-panel .tts-panel { display: block; }
	.tts.is-panel .tts-stagebar { display: none; }
	.tts-tb { display: none !important; }
	/* Valinnan toimintopalkki korvaa työkalurivin. */
	.tts.has-sel .tts-rail { display: none; }
	.tts.has-sel .tts-selbar { display: flex; order: 3; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px max(6px, env(safe-area-inset-bottom)); justify-content: space-around; }
	.tts-selbar button { flex: 1; min-width: 0; border: 0; background: none; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; font-size: 11px; font-weight: 800; color: var(--g); cursor: pointer; }
	.tts-selbar .tts-rail__i { width: 44px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--cr); color: var(--g); }
	.tts-selbar .tts-rail__i svg { width: 22px; height: 22px; }
	.tts-selbar button.is-del .tts-rail__i { background: #FDE8EC; color: var(--red); }
	.tts-selbar button.is-del { color: var(--red); }
	.tts-selbar button.is-ok .tts-rail__i { background: var(--y); color: var(--g); }
	.tts-toast { bottom: 64px; }
	.tts.is-panel .tts-toast { bottom: 12px; }
	.tts-panel .tts-ph { position: sticky; top: -12px; z-index: 2; background: #fff; margin: -12px -16px 8px; padding: 12px 16px 6px; }
	.tts-panel .tts-ph p { display: none; }
}

@media (max-width: 899px) { .tts-panel::before { display: none; } }
@media (max-width: 899px) { .tts-stage { min-height: 0; flex: 1 1 auto; } .tts-rail, .tts.has-sel .tts-selbar { flex: none; } .tts-canvas { min-height: 0; } }
@media (max-width: 899px) {
	/* Huomiot pieneksi pilleriksi oikeaan yläkulmaan, ettei peitä painatusta. */
	.tts-warn:not(.is-open) { left: auto; right: 8px; top: 8px; transform: none; border-radius: 999px; }
	.tts-warn:not(.is-open) .tts-warn__bar { padding: 6px 10px; gap: 6px; font-size: 12px; white-space: nowrap; }
	.tts-warn:not(.is-open) .tts-warn__bar em { display: none; }
	.tts-warn.is-open { top: 8px; }
}

/* 1.34: koko sivu ei zoomaannu editorissa; nipistys zoomaa näkymää. */
html.tts-open, html.tts-open body, .tts { touch-action: pan-x pan-y; }
.tts-canvas, .tts-svg { touch-action: none; }

/* 1.35: tyhjän puolen aloitusnapit vaatteen päällä; työkalurivi vieritettävä puhelimessa. */
.tts-empty { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 4; display: flex; flex-direction: column; gap: 10px; width: min(78%, 260px); pointer-events: none; }
.tts-empty[hidden] { display: none; }
.tts-empty button { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 20px; border: 1px solid rgba(15, 77, 58, .14); border-radius: 999px; background: rgba(255, 255, 255, .96); color: #0F4D3A; font: inherit; font-size: 15px; font-weight: 800; letter-spacing: .01em; cursor: pointer; box-shadow: 0 8px 24px rgba(15, 42, 32, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tts-empty button:active { transform: scale(.98); }
.tts-empty__i { width: 22px; height: 22px; display: grid; place-items: center; }
.tts-empty__i svg { width: 22px; height: 22px; }
.tts-empty button:first-child { background: #FFDD00; border-color: #FFDD00; }
@media (hover: hover) { .tts-empty button:hover { background: #fff; box-shadow: 0 10px 28px rgba(15, 42, 32, .22); } .tts-empty button:first-child:hover { background: #FFE433; } }
.tts.is-drag .tts-empty, .tts.has-sel .tts-empty { display: none; }
@media (max-width: 899px) {
	.tts.is-panel .tts-empty { display: none; }
	.tts-rail { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
	.tts-rail::-webkit-scrollbar { display: none; }
	.tts-rail > button { flex: 0 0 auto; min-width: 76px; scroll-snap-align: start; }
	.tts-rail > button span { white-space: nowrap; }
}

/* 1.36 – puhelin kuin sovellus */
.tts-buybar { --g: #0F4D3A; --y: #FFDD00; --cr: #F8F6E9; display: none; }
@media (max-width: 899px) {
	html.tts-hasbar .mobile-cta, html.tts-hasbar .mobile-cta-tab { display: none !important; }
	html.tts-hasbar body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
	.tts-buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: var(--g); color: var(--cr); box-shadow: 0 -8px 28px rgba(15, 42, 32, .22); font: 15px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
	html.tts-open .tts-buybar { display: none; }
	.tts-buybar__p { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
	.tts-buybar__p b { font-size: 21px; font-weight: 900; color: var(--y); white-space: nowrap; }
	.tts-buybar__p small { font-size: 11.5px; opacity: .85; white-space: nowrap; }
	.tts-buybar .tts-btn { margin-left: auto; flex: 0 1 auto; min-height: 50px; padding: 12px 20px; font-size: 16px; background: var(--y); color: var(--g); border: 0; border-radius: 999px; font-weight: 900; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; cursor: pointer; }
	.tts-buybar .tts-btn:active { transform: scale(.98); }
	.tts-buybar .tts-ic { width: 1.1em; height: 1.1em; }
}
.tts-mdet > summary { font-weight: 700; color: var(--ink); }
.tts-mdet > summary b { color: var(--g); }
.tts-mdet > summary em { font-style: normal; margin-left: auto; font-size: 12.5px; color: var(--g); text-decoration: underline; }
.tts-mdet[open] > summary em { display: none; }

/* Muokkauksen välilehdet (puhelin) */
.tts-etabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 10px; padding: 3px; background: var(--cr); border-radius: 999px; position: sticky; top: 0; z-index: 2; }
.tts-etabs::-webkit-scrollbar { display: none; }
.tts-etabs button { flex: 1 0 auto; border: 0; background: none; border-radius: 999px; padding: 9px 14px; font-weight: 800; font-size: 14px; color: var(--g); white-space: nowrap; min-height: 40px; }
.tts-etabs button[aria-selected="true"] { background: var(--g); color: var(--y); box-shadow: 0 2px 8px rgba(15, 42, 32, .2); }
.tts-tabbed .tts-ph { margin-bottom: 6px; }
.tts-tabbed .tts-ph h2 { font-size: 17px; }
.tts-tabbed .tts-h3 { display: none; }
.tts-tabbed .tts-fonts { display: flex; overflow-x: auto; overflow-y: hidden; max-height: none; gap: 8px; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 6px; }
.tts-tabbed .tts-fonts::-webkit-scrollbar { display: none; }
.tts-tabbed .tts-font { flex: 0 0 auto; min-width: 104px; scroll-snap-align: center; }
.tts-tabbed .tts-colors { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; }
.tts-tabbed .tts-colors::-webkit-scrollbar { display: none; }
.tts-tabbed .tts-color { flex: 0 0 auto; width: 40px; height: 40px; }
.tts-tabbed .tts-input { font-size: 16px; }
.tts-tabbed .tts-es .tts-adv__in > * { margin: 8px 0; }
.tts-slider--size { grid-template-columns: 60px 1fr; }
.tts-wrange { height: 32px; }
@media (max-width: 899px) {
	.tts-slider input[type="range"] { height: 32px; }
}

/* Koot ja määrät (puhelin): lista + askelnapit, hinta ja nappi aina alhaalla */
.tts-sizes--list { display: flex; flex-direction: column; gap: 6px; }
.tts-sizes--list .tts-sizebox { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 6px 6px 6px 14px; border: 1.5px solid transparent; }
.tts-sizes--list .tts-sizebox.is-on { border-color: var(--g); background: #fff; }
.tts-sizes--list .tts-sizebox > b { font-size: 16px; min-width: 42px; }
.tts-sizebox__m { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; }
.tts-stepper { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tts-stepper input { width: 52px !important; padding: 8px 4px !important; font-weight: 800; }
.tts-step { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--g); color: var(--y) !important; font-size: 22px; font-weight: 900; line-height: 1; display: grid; place-items: center; touch-action: manipulation; }
.tts-step:active { transform: scale(.94); }
.tts-allsizes { display: block; margin: 4px 0 10px; font-weight: 700; }
.tts-order__foot { position: sticky; bottom: -22px; margin: 12px -22px -22px; padding: 12px 22px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -10px 24px rgba(255,255,255,.9); display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.tts-order__foot .tts-total { border-top: 0; padding-top: 0; }
.tts-order__foot .tts-total b { font-size: 26px; }
.tts-order__foot .tts-status:empty { display: none; }
.tts-ldet { margin-top: 8px; }
@media (max-width: 899px) {
	.tts-modal--order { place-items: end stretch; padding: 0; }
	.tts-modal--order .tts-modal__card { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0; padding-top: 14px; animation: tts-up .28s cubic-bezier(.2,.9,.3,1); }
	.tts-modal--order .tts-modal__card::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--cr2); margin: 0 auto 8px; }
}
@keyframes tts-up { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tts-modal--order .tts-modal__card { animation: none; } }
.tts .tts-step { font: 900 24px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.tts .tts-order__foot .tts-btn { font-weight: 900; font-size: 17px; }
.tts .tts-etabs button { font-weight: 800; font-size: 14px; }
.tts-launch .tts-mdet { margin: 0; border-top: 0; padding-top: 0; }
.tts-launch .tts-mdet > summary { padding: 2px 0; font-size: 15px; }
/* Esikatselu: kuvaan ei voi tarttua – klikkaus lähentää, toinen palauttaa. */
.tts.is-preview .tts-svg { cursor: zoom-in; }
.tts.is-preview.is-vzoom .tts-svg { cursor: zoom-out; }
.tts.is-preview .tts-svg [data-oid] { cursor: inherit; }
.tts-modal__card { position: relative; }
.tts-modal__x { top: 10px; right: 10px; width: 40px; height: 40px; background: var(--cr); color: var(--g); font-size: 24px; line-height: 1; z-index: 2; }
.tts-modal__card > h2:first-of-type { padding-right: 44px; }

/* 1.39.4: pikasijoitus painopaikkoihin */
.tts-place { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 2px; }
.tts-place__h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-right: 2px; }
.tts-place__b { border: 1.5px solid var(--line, rgba(15,77,58,.2)); background: #fff; color: #0F4D3A; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tts-place__b:hover { border-color: #0F4D3A; }
.tts-place__b.is-on { background: #0F4D3A; color: #F8F6E9; border-color: #0F4D3A; }

.tts.is-drag .tts-obj image, .tts.is-drag .tts-obj:hover image { filter: none !important; }
/* Näkymän nipistys/siirto sormilla: kuva liikkuu näytönohjaimella, tarkka piirto sormen noustessa. */
.tts.is-vgest .tts-canvas { overflow: hidden; }
.tts.is-vgest .tts-svg { will-change: transform; }

/* Puhelin: työkalurivi ja valinnan toimintorivi samaan tyyliin kuin tarraeditorin alapalkki (vihreä palkki, selkeät napit, kaikki yhdellä rivillä). */
@media (min-width: 900px) { .tts-rail__s { display: none; } }
@media (max-width: 899px) {
	.tts-zoom { display: none !important; } /* paita on puhelimessa aina lähennettynä – erillistä suurennusta ei tarvita */
	.tts-rail, .tts.has-sel .tts-selbar { display: flex; background: var(--g) !important; border: 0 !important; border-radius: 20px 20px 0 0; gap: 6px; justify-content: stretch; overflow: visible;
		padding: 10px max(10px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); box-shadow: 0 -10px 30px rgba(15, 42, 32, .18); }
	.tts.has-sel .tts-rail { display: none; }
	.tts-rail button, .tts-selbar button { flex: 1 1 0; min-width: 0; min-height: 56px; padding: 6px 2px; border: 1.5px solid rgba(248, 246, 233, .28) !important; background: rgba(248, 246, 233, .08) !important; border-radius: 12px;
		color: #F8F6E9 !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: inherit; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; }
	.tts-rail button:active, .tts-selbar button:active { background: rgba(248, 246, 233, .18) !important; }
	.tts-rail .tts-rail__i, .tts-selbar .tts-rail__i, .tts-rail button[data-tool="upload"] .tts-rail__i { width: auto; height: auto; border-radius: 0; background: none !important; box-shadow: none !important; color: #F8F6E9 !important; font-size: 22px; transform: none !important; }
	.tts-rail .tts-svgi, .tts-selbar .tts-svgi { color: #F8F6E9 !important; width: 22px; height: 22px; }
	.tts-rail .tts-svgi path[fill="currentColor"], .tts-selbar .tts-svgi path[fill="currentColor"] { display: none; }
	.tts-rail button[aria-pressed="true"] { background: #FFDD00 !important; border-color: #FFDD00 !important; color: #0F4D3A !important; }
	.tts-rail button[aria-pressed="true"] .tts-rail__i, .tts-rail button[aria-pressed="true"] .tts-svgi { color: #0F4D3A !important; background: none !important; }
	.tts-rail__l { display: none; }
	.tts-rail__s, .tts-selbar button > span:not(.tts-ic) { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 899px) {
	.tts-selbar button.is-ok { background: #FFDD00 !important; border-color: #FFDD00 !important; color: #0F4D3A !important; }
	.tts-selbar button.is-ok .tts-rail__i, .tts-selbar button.is-ok .tts-svgi { color: #0F4D3A !important; }
	.tts-selbar button.is-del { border-color: rgba(255, 170, 160, .45) !important; }
}

/* Puhelin: paneeli ei saa vieriä sivuttain (aiherivi vierii omassa laatikossaan). */
@media (max-width: 899px) {
	.tts-panel { overflow-x: hidden; overscroll-behavior: contain; }
	.tts-panel .tts-ph__x { right: 0; }
	.tts-cats { overscroll-behavior-x: contain; max-width: none; }
	/* Näppäimistö auki: työkalurivi, valinnan rivi ja näyttämön napit pois – kirjoituspaneelille tilaa, paita jää pienenä yläosaan. */
	.tts.is-kb .tts-rail, .tts.is-kb.has-sel .tts-selbar, .tts.is-kb .tts-stagebar, .tts.is-kb .tts-warn, .tts.is-kb .tts-toast { display: none !important; }
	.tts.is-kb .tts-top { padding-top: 4px; padding-bottom: 4px; }
	.tts.is-kb .tts-stage { flex: 1 1 40%; min-height: 110px; }
	.tts.is-kb .tts-panel { max-height: none; flex: 1 1 60%; min-height: 0; overflow-y: auto; padding-top: 10px; padding-bottom: 10px; }
	.tts.is-kb .tts-panel::before { display: none; }
}
@media (max-width: 899px) {
	/* Kirjoittaessa paita on pieni: ei kahvoja eikä mittalappua tekstin päällä – vain ohut valintakehys. */
	.tts.is-kb svg [data-h], .tts.is-kb svg .tts-dim { display: none; }
}

/* Aloitus: tuotteen valinta (paita, huppari, kassi …) vaatteen tilalla */
.tts-pick { position: absolute; inset: 0; z-index: 6; overflow-y: auto; background: var(--cr); display: flex; justify-content: center; padding: clamp(16px, 4vw, 48px) max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.tts-pick[hidden] { display: none; }
.tts-pick__in { width: min(100%, 880px); display: flex; flex-direction: column; gap: 14px; }
.tts-pick__t { margin: 0; font-size: clamp(24px, 3.2vw, 36px); line-height: 1.05; font-weight: 900; color: var(--g); text-transform: uppercase; text-wrap: balance; }
.tts-pick__s { margin: -4px 0 4px; color: var(--mut); }
.tts-pick__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.tts-pick__card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 10px 14px; border-radius: 18px; border: 2px solid var(--line); background: #fff; color: var(--ink); font: inherit; text-align: center; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tts-pick__card:hover { border-color: var(--g); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 42, 32, .12); }
.tts-pick__card.is-on { border-color: var(--g); box-shadow: inset 0 0 0 1px var(--g); }
.tts-pick__img { aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: 12px; background: #F3F1E6; overflow: hidden; }
.tts-pick__img img { width: 100%; height: 100%; object-fit: contain; }
.tts-pick__ph { font-size: 48px; color: var(--g); }
.tts-pick__card b { font-size: 17px; font-weight: 900; color: var(--g); text-transform: uppercase; }
.tts-pick__card small { font-size: 13px; color: var(--mut); font-weight: 700; }
.tts-pick__card.is-on small { color: var(--g); }
.tts-pick__card.is-on small::before { content: '✓ '; }
.tts-pick__go { align-self: center; margin-top: 6px; }
.tts-pick__back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--g); background: none; color: var(--g); font: inherit; font-weight: 800; cursor: pointer; }
.tts-pick__back .tts-svgi { width: 18px; height: 18px; }
@media (max-width: 899px) { .tts-pick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tts-pick__card b { font-size: 14px; } }
.tts.is-picking .tts-stagebar, .tts.is-picking .tts-warn { display: none !important; }
.tts-pick__go { min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0; background: var(--y) !important; color: var(--g) !important; font: inherit; font-size: 16px; font-weight: 900; cursor: pointer; box-shadow: 0 8px 22px rgba(15, 42, 32, .14); }

/* Tietokone: vasen työkalupalkki samaan tyyliin kuin puhelimen alapalkki ja tarraeditorin sarake (vihreä, selkeät napit, valittu keltaisena). */
@media (min-width: 900px) {
	.tts-rail { background: var(--g) !important; border-right: 0; padding: 12px 10px; gap: 8px; width: 104px; box-sizing: border-box; }
	.tts-rail button { width: 100%; min-height: 72px; padding: 8px 4px; gap: 6px; border: 1.5px solid rgba(248, 246, 233, .28) !important; border-radius: 14px; background: rgba(248, 246, 233, .08) !important; color: #F8F6E9 !important;
		font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.15; }
	.tts-rail button:hover { background: rgba(248, 246, 233, .16) !important; border-color: rgba(248, 246, 233, .5) !important; }
	.tts-rail .tts-rail__i, .tts-rail button[data-tool="upload"] .tts-rail__i { width: auto; height: auto; border-radius: 0; background: none !important; box-shadow: none !important; color: #F8F6E9 !important; transform: none !important; }
	.tts-rail .tts-svgi { color: #F8F6E9 !important; width: 24px; height: 24px; }
	.tts-rail .tts-svgi path[fill="currentColor"] { display: none; }
	.tts-rail button[aria-pressed="true"] { background: #FFDD00 !important; border-color: #FFDD00 !important; color: #0F4D3A !important; }
	.tts-rail button[aria-pressed="true"] .tts-rail__i, .tts-rail button[aria-pressed="true"] .tts-svgi { color: #0F4D3A !important; }
	.tts-rail .tts-rail__aux { min-height: 56px; border-style: dashed !important; }
	.tts-rail .tts-rail__aux:disabled { opacity: .35; }
	.tts-rail__l { display: block; max-width: 100%; overflow-wrap: anywhere; }
}
@media (min-width: 900px) {
	.tts-body { grid-template-columns: 104px 360px minmax(0, 1fr); }
	.tts.no-panel .tts-body, .tts:not(.is-panel) .tts-body.is-nopanel { grid-template-columns: 104px minmax(0, 1fr); }
}
