/* Meine Geräte › Terminal gestalten (terminal-design.js). Uses the portal tokens from theme.css. */
@font-face { font-family: "TerminalRoboto"; src: url("/terminal-design/Roboto-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TerminalRoboto"; src: url("/terminal-design/Roboto-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

.td-mount { display: block; min-width: 0; max-width: 100%; color: var(--p-text, #1c1b1a); --td-accent: var(--p-accent, #2f8f8a); --td-soft: var(--p-accent-soft, rgba(47,143,138,.10)); }
/* closer to the "Meine Geräte" title (by id: the page's space-y-6 would win over a class) */
#kioskTerminalDesign { margin-top: 4px; }
.td-mount[hidden] { display: none; }

/* showcase: floating terminals (TerminalShowcase.tsx) */
.td-show { position: relative; margin: 0 auto; max-width: 100%; }
/* clipped only sideways (clip, not hidden, so the lowered and tilted neighbours are not cut at the bottom) */
.td-viewport { overflow: hidden; overflow-x: clip; overflow-y: visible; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
@supports (overflow: clip) { .td-viewport { overflow: visible; overflow-x: clip; } }
.td-track { display: flex; will-change: transform; }
.td-item { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding: 26px 0 34px; box-sizing: border-box; cursor: grab; }
.td-item.is-current { cursor: default; }
.td-motion { display: flex; flex-direction: column; align-items: center; will-change: transform, opacity; }
.td-float { animation: td-float 4.8s ease-in-out infinite; }
/* floor shadow (as GroundShadow in the app): dark in the middle, fading out softly; it shrinks and fades while the terminal is up */
.td-shadow { --td-sh: 0,0,0; height: 30px; margin-top: 2px; background: radial-gradient(closest-side, rgba(var(--td-sh),.5), rgba(var(--td-sh),.35) 25%, rgba(var(--td-sh),.14) 55%, rgba(var(--td-sh),.04) 80%, rgba(var(--td-sh),0)); animation: td-shadow 4.8s ease-in-out infinite; }
.td-show.is-entering .td-enter { animation: td-enter .9s cubic-bezier(.22,1.25,.36,1) both; }
.td-show.is-entering .td-shadow-wrap { animation: td-fade .9s ease-out both; }
@keyframes td-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes td-shadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.72); opacity: .5; } }
@keyframes td-enter { from { transform: translateY(70px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes td-fade { from { opacity: 0; } }
.td-arrow { position: absolute; top: 42%; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface, #fff); color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.td-arrow:disabled { opacity: .3; cursor: default; }
.td-device { background: #101b2e; border: 1px solid #2a3a55; box-shadow: 0 22px 40px -18px rgba(0,0,0,.45); }
.td-screen-clip { overflow: hidden; background: #f4efe6; position: relative; }
.td-meta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: -20px; font-weight: 600; font-size: 15px; }
.td-meta > span { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-meta i { width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; flex-shrink: 0; }
.td-meta i.is-online { background: #22c55e; }
.td-battery { display: inline-flex; align-items: center; gap: 10px; }
.td-battery b { font-size: 13px; font-weight: 800; min-width: 34px; text-align: right; }
.td-battery.is-charging svg { animation: td-charge 1.3s ease-in-out infinite; }
.td-battery.is-charging .td-battery-fill { animation: td-charge-fill 1.3s ease-in-out infinite; }
@keyframes td-charge { 50% { transform: scale(.82); } }
@keyframes td-charge-fill { 50% { opacity: .25; } }
/* admin fleet: tablet name with status and battery, the mosque below */
.td-meta-fleet { flex-direction: column; gap: 2px; text-align: center; }
.td-meta-fleet .td-meta-row { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; }
.td-meta-fleet .td-meta-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-meta-fleet .td-meta-org { max-width: 90%; font-size: 13px; font-weight: 500; color: var(--p-muted, #6f6d69); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-meta i.is-blocked { background: #94a3b8; }
.td-count { margin-top: 10px; text-align: center; font-size: 12px; font-weight: 700; color: var(--p-muted, #6f6d69); font-variant-numeric: tabular-nums; }
.td-pager { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.td-pager button { padding: 6px 0; border: 0; background: none; cursor: pointer; }
.td-pager i { display: block; width: 7px; height: 7px; border-radius: 4px; background: var(--p-line-strong, #d6d4d1); transition: width .25s, background .25s; }
.td-pager .is-on i { width: 18px; background: var(--td-accent); }
@media (prefers-reduced-motion: reduce) {
  .td-float, .td-shadow, .td-show.is-entering .td-enter, .td-show.is-entering .td-shadow-wrap, .td-battery svg, .td-battery-fill, .tdp-batt-fill, .tdp-wifi-off { animation: none !important; }
}

/* the terminal screen, drawn in dp at 800 × 1280 and scaled */
.tdp-screen { position: relative; overflow: hidden; font-family: "TerminalRoboto", Roboto, sans-serif; color: #000; text-align: center; }
.tdp-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tdp-beige { position: absolute; inset: 0; background: rgba(244,239,230,.35); }
.tdp-pill { position: absolute; top: 10px; z-index: 2; height: 56px; min-width: 144px; padding: 0 24px; box-sizing: border-box; border-radius: 100px; background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.15); box-shadow: 0 2px 5px rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; }
.tdp-pill img { width: 22px; height: 22px; border-radius: 11px; }
.tdp-pill b { font-size: 17px; margin-left: 10px; }
.tdp-col { position: absolute; left: 18px; right: 18px; top: 18px; bottom: 44px; display: flex; flex-direction: column; align-items: center; }
.tdp-logo { height: 120px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tdp-logo img { height: 120px; object-fit: contain; }
.tdp-card { width: 764px; box-sizing: border-box; min-height: 190px; border-radius: 12px; background: rgba(255,255,255,.65); padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; flex-shrink: 0; }
.tdp-card .tdp-l { line-height: 1.25; }
.tdp-ar { font-family: "Amiri", "Noto Naskh Arabic", serif; font-weight: 400; }
.tdp-clamp2, .tdp-clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.tdp-clamp2 { -webkit-line-clamp: 2; }
.tdp-clamp3 { -webkit-line-clamp: 3; }
.tdp-amounts { display: flex; flex-wrap: wrap; justify-content: center; flex-shrink: 0; }
.tdp-btn { transition: background-color .6s ease; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; white-space: nowrap; overflow: hidden; flex-shrink: 0; }
/* Its set height, at most the room the buttons leave (the projects button keeps its 84 dp), as on the terminal. */
.tdp-banner { flex: 0 1 auto; min-height: 0; border-radius: 18px; overflow: hidden; background: #2c4e60; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.tdp-banner img, .tdp-banner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* With an image or video the dark placeholder must not show at the rounded edges: while the tablet
   floats, its anti-aliased rim flickered around the picture. Own layer + mask keeps Safari's clip steady. */
.tdp-banner:has(> img), .tdp-banner:has(> video) { background: transparent; }
.tdp-banner { -webkit-mask-image: -webkit-radial-gradient(white, black); transform: translateZ(0); }
.tdp-banner img, .tdp-banner video { border-radius: inherit; }
.tdp-banner b { color: rgba(255,255,255,.85); font-size: 22px; margin-top: 8px; }
.tdp-foot { position: absolute; left: 18px; right: 18px; bottom: 6px; height: 32px; display: flex; align-items: center; justify-content: space-between; }
.tdp-foot b { font-family: "Inter", sans-serif; font-size: 15px; }
/* donor footer like the terminal: battery fill pulses while charging, the WLAN icon blinks when offline */
.tdp-batt.is-charging .tdp-batt-fill { animation: tdp-batt 1.3s ease-in-out infinite; }
@keyframes tdp-batt { 50% { opacity: .4; } }
.tdp-wifi-off { animation: tdp-wifi-off 1.2s ease-in-out infinite; }
@keyframes tdp-wifi-off { 50% { opacity: .25; } }

/* sync card */
/* only the Sync button, no card around it */
.td-sync { margin: 8px auto 0; display: flex; justify-content: center; }
.td-sync + .td-bar { margin-top: 8px; }
.td-sync-box { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 420px; }
.td-sync-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.td-sync-text { margin: 0; font-size: 13px; line-height: 18px; text-align: center; color: var(--td-text, inherit); }
.td-sync-progress { width: 100%; display: flex; flex-direction: column; gap: 6px; font-size: 13px; text-align: center; }
.td-sync-progress i { display: block; height: 6px; border-radius: 3px; background: var(--td-soft); overflow: hidden; }
.td-sync-progress b { display: block; height: 100%; border-radius: 3px; background: var(--td-accent); transition: width .2s; }
.td-sync-progress b.is-busy { animation: td-sync-busy 1.2s ease-in-out infinite; transform-origin: left; }
@keyframes td-sync-busy { 0% { transform: translateX(-100%) scaleX(.4); } 100% { transform: translateX(100%) scaleX(.4); } }

/* buttons */
.td-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; font-weight: 700; border: 1px solid transparent; cursor: pointer; text-align: center; line-height: 1.2; }
.td-btn:disabled { opacity: .55; cursor: not-allowed; }
.td-btn-accent { background: var(--td-accent); color: #fff; }
.td-btn-soft { background: var(--td-soft); color: var(--td-accent); border-color: color-mix(in srgb, var(--td-accent) 25%, transparent); }
.td-btn-outline { background: var(--p-surface, #fff); color: inherit; border-color: var(--p-line-strong, #d6d4d1); }

/* tags: one row that scrolls sideways (SettingsBar) */
.td-bar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; margin: 0 -16px; }
.td-bar::-webkit-scrollbar { display: none; }
.td-tag { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface, #fff); color: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.td-tag svg { color: var(--td-accent); }
.td-tag.is-on { background: var(--td-accent); border-color: var(--td-accent); color: #fff; }
.td-tag.is-on svg { color: #fff; }
@media (min-width: 861px) { .td-mount > .td-bar { justify-content: center; flex-wrap: wrap; overflow: visible; } }

/* full-screen editor (TerminalEditor): slides up, terminal pinned at the top */
html.td-locked, html.td-locked body { overflow: hidden; }
.td-sheet { position: fixed; inset: 0; z-index: 2000; pointer-events: none; }
.td-sheet-panel { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--p-bg, #f7f6f4); transform: translateY(100%); transition: transform .32s cubic-bezier(.32,.72,0,1); pointer-events: auto; }
.td-sheet.is-open .td-sheet-panel { transform: none; }
.td-sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface, #fff); }
.td-head-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.td-head-btn:hover { background: var(--p-surface-2, #f4f4f3); }
.td-head-mid { flex: 1; min-width: 0; text-align: center; }
.td-kicker { font-size: 11.5px; font-weight: 600; color: var(--p-muted, #6f6d69); }
.td-head-title { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-done { border: 0; background: none; color: var(--td-accent); font-weight: 700; font-size: 15px; padding: 8px 6px; cursor: pointer; }
.td-sheet-stage { display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 10px 0; box-sizing: border-box; background: var(--p-surface-2, #f4f4f3); }
.td-sheet-bar { margin: 0; padding: 10px 16px; flex-shrink: 0; border-bottom: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface, #fff); }
@media (min-width: 861px) { .td-sheet-bar { justify-content: center; } }
.td-sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.td-sheet-content { max-width: 640px; margin: 0 auto; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.td-wide { align-self: stretch; }

.td-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--p-line, #e7e6e4); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.td-footer > .td-btn { align-self: stretch; }
.td-reset { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--p-muted, #6f6d69); font-weight: 600; font-size: 13px; cursor: pointer; }
.td-note { margin: 0; font-size: 12px; color: var(--p-muted, #6f6d69); text-align: center; line-height: 1.45; }
.td-hint { font-size: 12.5px; color: var(--p-muted, #6f6d69); line-height: 1.45; margin-top: 6px; display: block; }
.td-muted { color: var(--p-muted, #6f6d69); font-size: 13.5px; }
.td-section-title { font-size: 13px; font-weight: 700; color: var(--p-muted, #6f6d69); margin: 22px 0 10px; }
.td-section-title.is-first { margin-top: 0; }
.td-field-label { font-size: 13px; font-weight: 600; color: var(--p-muted, #6f6d69); }
.td-step-label { font-size: 14px; font-weight: 600; display: block; }
.td-msg { margin-top: 10px; padding: 9px 12px; border-radius: 10px; font-size: 13px; background: var(--p-danger-soft, rgba(220,38,38,.06)); color: #b91c1c; }
.td-msg.is-ok { background: var(--td-soft); color: var(--td-accent); }
.td-col { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }

/* stepper / switch / segmented */
.td-stepper { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.td-step-text { flex: 1; min-width: 0; }
.td-capsule { display: inline-flex; align-items: center; height: 40px; border-radius: 999px; border: 1px solid var(--p-line-strong, #d6d4d1); background: var(--p-surface, #fff); }
.td-capsule button { width: 38px; height: 38px; border: 0; background: none; color: var(--td-accent); font-size: 19px; font-weight: 700; cursor: pointer; }
.td-capsule button:disabled { opacity: .3; cursor: default; }
.td-cap-value { min-width: 64px; text-align: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.td-cap-value small { font-size: 12px; font-weight: 600; color: var(--p-muted, #6f6d69); }
.td-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; cursor: pointer; }
/* Tailwind forms styles every checkbox: reset it here. */
.td-mount input.td-switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 13px; background-image: none; color: transparent; box-shadow: none; background-color: var(--p-line-strong, #d6d4d1); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.td-mount input.td-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.td-mount input.td-switch:checked { background-color: var(--td-accent); background-image: none; }
.td-mount input.td-switch:focus { box-shadow: none; outline: 2px solid color-mix(in srgb, var(--td-accent) 40%, transparent); outline-offset: 2px; }
.td-mount input.td-switch:checked::after { transform: translateX(18px); }
.td-seg { display: flex; padding: 3px; border-radius: 12px; background: var(--p-surface-2, #f4f4f3); border: 1px solid var(--p-line, #e7e6e4); gap: 3px; }
.td-seg button { flex: 1; min-height: 34px; border: 0; border-radius: 9px; background: none; color: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.td-seg button.is-on { background: var(--p-surface, #fff); color: var(--td-accent); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* colours */
.td-own { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--p-line, #e7e6e4); }
.td-own-dot { width: 48px; height: 48px; border-radius: 14px; border: 1px solid rgba(0,0,0,.18); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.td-own-text { flex: 1; min-width: 0; }
.td-hex { border: 0; background: none; color: var(--p-muted, #6f6d69); font-weight: 700; font-size: 14px; letter-spacing: .05em; padding: 2px 0; width: 100%; font-family: var(--p-font-num, inherit); text-transform: uppercase; }
.td-hex:focus { outline: none; color: var(--p-text, #1c1b1a); }
.td-native-color { width: 44px; height: 44px; border: 1px solid var(--p-line-strong, #d6d4d1); border-radius: 12px; padding: 3px; background: var(--p-surface, #fff); cursor: pointer; }
.td-rot-head { display: flex; justify-content: space-between; margin-top: 16px; }
.td-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; margin-top: 10px; }
.td-swatch { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; padding: 2px; background: none; cursor: pointer; }
.td-swatch span { width: 100%; height: 100%; border-radius: 9px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,.18); font-size: 14px; }
.td-swatch.is-on { border-color: var(--p-text, #1c1b1a); }
.td-swatch.is-round, .td-swatch.is-round span { border-radius: 50%; }
.td-swatch.is-round { width: 44px; flex-shrink: 0; }
.td-chips, .td-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.td-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface, #fff); color: inherit; font-size: 13px; cursor: pointer; }
.td-chip i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.td-chip.is-on { border-color: var(--td-accent); color: var(--td-accent); background: var(--td-soft); font-weight: 600; }
.td-group { margin-top: 14px; }
.td-dots { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 4px; }

/* amounts */
.td-amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.td-amount { display: flex; align-items: center; gap: 6px; height: 48px; border-radius: 10px; border: 1px solid var(--p-line-strong, #d6d4d1); padding: 0 12px; background: var(--p-surface, #fff); }
.td-amount input { flex: 1; min-width: 0; border: 0; background: none; color: inherit; font-weight: 700; font-size: 17px; padding: 0; font-variant-numeric: tabular-nums; }
.td-amount input:focus { outline: none; }
.td-amount span { color: var(--p-muted, #6f6d69); font-weight: 600; }
.td-amount button { border: 0; background: none; color: var(--p-muted, #6f6d69); cursor: pointer; display: inline-flex; }
.td-add { justify-content: center; border-style: dashed; background: var(--td-soft); color: var(--td-accent); font-weight: 600; font-size: 13px; cursor: pointer; }
.td-add span { color: var(--td-accent); }

/* logo / banner / video */
.td-logo-row { display: flex; align-items: center; gap: 14px; }
.td-logo-drop { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; border: 1.5px dashed var(--p-line-strong, #d6d4d1); background: var(--p-surface-2, #f4f4f3); cursor: pointer; transition: border-color .15s, background-color .15s; }
.td-logo-drop:hover, .td-logo-drop.is-over { border-color: var(--td-accent, #2f8f8a); background: var(--p-accent-soft, rgba(47,143,138,.10)); }
.td-logo-drop:focus-within { outline: 2px solid var(--td-accent, #2f8f8a); outline-offset: 2px; }
.td-logo-drop-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.td-logo-drop-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--td-strong, inherit); }
.td-logo-drop-title svg { color: var(--td-accent, #2f8f8a); flex-shrink: 0; }
.td-logo-drop-sub { font-size: 12.5px; color: var(--p-muted, #6f6d69); }
@media (hover: none) { .td-logo-drop-or { display: none; } }
.td-logo-reset { margin-top: 12px; }
.td-logo-thumb { width: 120px; height: 80px; border-radius: 10px; border: 1px solid var(--p-line, #e7e6e4); background: #f4efe6; padding: 8px; box-sizing: border-box; flex-shrink: 0; }
.td-logo-thumb img { width: 100%; height: 100%; object-fit: contain; }
.td-video-box { width: 120px; height: 80px; border-radius: 10px; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface-2, #f4f4f3); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--p-muted, #6f6d69); flex-shrink: 0; }
.td-video-box video { width: 100%; height: 100%; object-fit: cover; }
.td-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.td-thumb { width: 120px; height: 75px; border-radius: 10px; overflow: hidden; position: relative; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface-2, #f4f4f3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.td-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.td-thumb button { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.td-thumb button.td-thumb-dl { top: auto; bottom: 5px; }
.td-media-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.td-media-actions .td-btn { display: inline-flex; align-items: center; gap: 6px; }
.td-thumb.td-add { cursor: pointer; font-size: 11.5px; }
.td-pos { display: grid; grid-template-columns: repeat(3, 40px); gap: 6px; }
.td-pos button { height: 30px; border-radius: 7px; border: 1px solid var(--p-line-strong, #d6d4d1); background: var(--p-surface-2, #f4f4f3); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.td-pos button i { width: 6px; height: 6px; border-radius: 50%; background: var(--p-muted, #6f6d69); }
.td-pos button.is-on { background: var(--td-accent); border-color: var(--td-accent); }
.td-pos button.is-on i { background: #fff; }

/* text, lists, audio */
.td-field { margin-top: 14px; }
.td-field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.td-field input, .td-field textarea { width: 100%; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--p-line-strong, #d6d4d1); background: var(--p-surface, #fff); color: inherit; padding: 10px 12px; font-size: 14px; font-family: inherit; }
.td-field .is-dim { opacity: .5; }
.td-eye { border: 0; background: none; color: var(--p-muted, #6f6d69); cursor: pointer; display: inline-flex; }
.td-eye.is-on { color: var(--td-accent); }
.td-list-row { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface, #fff); color: inherit; cursor: pointer; text-align: left; box-sizing: border-box; }
.td-list-row.is-on { border-color: var(--td-accent); background: var(--td-soft); }
.td-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--p-line-strong, #d6d4d1); flex-shrink: 0; box-sizing: border-box; }
.td-list-row.is-on .td-radio { border-color: var(--td-accent); box-shadow: inset 0 0 0 3px var(--p-surface, #fff); background: var(--td-accent); }
.td-arabic { flex: 1; font-size: 15px; line-height: 1.7; text-align: right; }
.td-play { width: 38px; height: 38px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--td-accent) 25%, transparent); background: var(--td-soft); color: var(--td-accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.td-play.is-on { background: var(--td-accent); color: #fff; }

@media (max-width: 420px) {
  .td-arrow { width: 36px; height: 36px; }
}

/* ── Same look as the app's editor (TerminalSettings.tsx / forms.tsx; tokens from mobile/src/theme.ts) ── */
.td-mount { --td-strong: #0b1220; --td-on: #184a93; --td-chip-line: rgba(58,156,156,.20); --td-danger: #b91c1c; --td-success: #15803d; }
body.theme-dark .td-mount { --td-strong: #eef2f7; --td-chip-line: rgba(58,156,156,.20); --td-danger: #f87171; --td-success: #4ade80; }
.td-mount .td-step-label, .td-mount .td-head-title { color: var(--td-strong); }

/* switch row: a card with the label in bold and the hint below (SwitchRow + Toggle) */
.td-mount .td-switch-row { margin-top: 12px; padding: 16px; border-radius: 10px; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface-2, #f4f4f3); }
.td-mount .td-switch-row .td-step-label { font-weight: 700; font-size: 14px; }
.td-mount .td-switch-row .td-hint { margin-top: 3px; font-size: 12.5px; line-height: 18px; }
.td-mount input.td-switch { width: 52px; height: 30px; border-radius: 15px; border: 1px solid var(--p-line-strong, #d6d4d1); background-color: var(--p-surface-2, #f4f4f3); transition: background-color .18s, border-color .18s; }
.td-mount input.td-switch::after { top: 3px; left: 3px; width: 22px; height: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s cubic-bezier(.33,1,.68,1); }
.td-mount input.td-switch:checked { background-color: var(--td-on); border-color: var(--td-on); }
.td-mount input.td-switch:checked::after { transform: translateX(22px); }
/* Arabic: the knob starts on the right and moves left when on (like iOS and the app). */
[dir="rtl"] .td-mount input.td-switch::after { left: auto; right: 3px; }
[dir="rtl"] .td-mount input.td-switch:checked::after { transform: translateX(-22px); }

/* section titles: a divider above, as SectionTitle */
.td-mount .td-section-title { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--p-line, #e7e6e4); font-size: 13.5px; font-weight: 600; }
.td-mount .td-section-title.is-first { margin-top: 0; padding-top: 0; border-top: 0; }
.td-mount .td-field-label { font-size: 12.5px; }

/* segmented: the selected one is a white card with dark text */
.td-mount .td-seg { margin-top: 12px; padding: 3px; border-radius: 10px; }
.td-mount .td-seg button { height: 42px; min-height: 0; border: 1px solid transparent; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--p-muted, #6f6d69); padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-mount .td-seg button.is-on { background: var(--p-surface, #fff); border-color: var(--p-line-strong, #d6d4d1); color: var(--td-strong); box-shadow: none; }

/* stepper */
.td-mount .td-stepper { margin-top: 16px; }
.td-mount .td-hint { font-size: 12.5px; line-height: 18px; margin-top: 8px; }
.td-mount .td-step-text .td-hint { font-size: 12px; line-height: 16px; margin-top: 2px; }
.td-mount .td-cap-value { min-width: 58px; color: var(--td-strong); font-family: var(--p-font-num, inherit); }
.td-mount .td-cap-value small { font-size: 11.5px; font-weight: 500; }

/* chips (fonts, colour families): pills */
.td-mount .td-chips, .td-mount .td-choices { margin-top: 12px; }
.td-mount .td-chip { height: 36px; min-height: 0; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.td-mount .td-chip.is-on { border-color: var(--td-accent); background: var(--td-soft); color: var(--p-text, #1c1b1a); font-weight: 500; }
.td-mount .td-chips .td-chip.is-on { color: var(--td-accent); font-weight: 600; }
/* rows that scroll sideways and run to the screen edge, as in the app */
.td-mount .td-scroll-row { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
.td-mount .td-scroll-row::-webkit-scrollbar { display: none; }
.td-mount .td-dots { gap: 6px; margin-top: 8px; padding-top: 0; padding-bottom: 0; }

/* swatches: seven per row (max 560 px), as Swatch */
.td-mount .td-swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 12px; max-width: 528px; }
.td-mount .td-swatch.is-on { border-color: var(--td-strong); }
.td-mount .td-swatch.is-round { width: 44px; height: 44px; aspect-ratio: auto; }
.td-mount .td-swatch b { font-family: var(--p-font-num, inherit); font-size: 14px; }

/* own colour: dot, label, hex as text, "Wählen" pill */
.td-mount .td-own { border-radius: 12px; background: var(--p-surface, #fff); }
.td-mount .td-own-dot.is-on { border: 2px solid var(--td-strong); }
.td-mount input.td-hex { border: 0; border-radius: 0; box-shadow: none; padding: 2px 0 0; margin-top: 1px; height: auto; background: none; color: var(--p-muted, #6f6d69); font-size: 14px; font-weight: 700; letter-spacing: .6px; }
.td-mount input.td-hex:focus { box-shadow: none; color: var(--td-strong); }
.td-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--td-chip-line); background: var(--td-soft); color: var(--td-accent); font-weight: 600; font-size: 13.5px; cursor: pointer; flex-shrink: 0; overflow: hidden; }
.td-pick:hover { background: var(--p-surface-2, #f4f4f3); }
.td-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

/* fields: the app's inputs, with the accent instead of Tailwind's blue focus ring */
.td-mount .td-field input, .td-mount .td-field textarea { min-height: 46px; border: 1px solid var(--p-line-strong, #d6d4d1); border-radius: 10px; padding: 11px 14px; font-size: 15px; font-weight: 500; background: var(--p-surface, #fff); color: var(--p-text, #1c1b1a); box-shadow: none; }
.td-mount .td-field input:focus, .td-mount .td-field textarea:focus, .td-mount .td-amount:focus-within { outline: none; border-color: var(--td-accent); box-shadow: 0 0 0 3px var(--td-soft); }
.td-mount .td-amount input, .td-mount .td-amount input:focus { border: 0; box-shadow: none; padding: 0; background: none; height: auto; color: var(--td-strong); font-family: var(--p-font-num, inherit); }
.td-mount .td-amount { padding: 0 14px; }
.td-mount .td-add { border-color: var(--td-chip-line); }
.td-mount .td-thumb.td-add { border-style: dashed; }

/* lists: radio with an inner dot */
.td-mount .td-radio { display: inline-flex; align-items: center; justify-content: center; }
.td-mount .td-list-row.is-on .td-radio { background: none; box-shadow: none; }
.td-mount .td-list-row.is-on .td-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--td-accent); }
.td-mount .td-list-row b { color: var(--td-strong); font-size: 14px; font-weight: 600; }
.td-mount .td-play { border-color: var(--td-chip-line); padding-left: 2px; }
.td-mount .td-arabic { color: var(--td-strong); line-height: 25px; }

/* messages and footer */
.td-mount .td-msg { background: none; padding: 0; margin-top: 12px; color: var(--td-danger); font-weight: 500; line-height: 18px; }
.td-mount .td-msg.is-ok { background: none; color: var(--td-success); }
.td-mount .td-footer { margin-top: 26px; padding-top: 18px; gap: 0; align-items: stretch; }
.td-mount .td-footer > .td-btn + .td-btn { margin-top: 8px; }
.td-mount .td-footer .td-reset { align-self: center; margin-top: 14px; padding: 4px 0; }
.td-mount .td-footer .td-note { margin-top: 10px; line-height: 17px; }

/* editor chrome, as the app's sheet */
.td-sheet-head { height: 54px; box-sizing: content-box; padding-top: max(0px, env(safe-area-inset-top)); padding-bottom: 0; border-bottom: 0; background: var(--p-bg, #f6f6f5); }
.td-head-title { font-size: 15.5px; }
.td-kicker { font-weight: 500; }
.td-sheet-stage { border-top: 1px solid var(--p-line, #e7e6e4); border-bottom: 1px solid var(--p-line, #e7e6e4); }
.td-sheet-bar { background: var(--p-bg, #f6f6f5); }
.td-tag { height: 40px; }
.td-mount .td-tag span { color: var(--p-text, #1c1b1a); }
/* Meine Geräte: the tag bar under the carousel a bit smaller and closer. */
.td-bar:not(.td-sheet-bar) .td-tag { height: 34px; padding: 0 12px; gap: 6px; font-size: 13px; }
.td-bar:not(.td-sheet-bar) .td-tag svg { width: 15px; height: 15px; }
.td-mount .td-tag.is-on span { color: #fff; }
.td-sheet-content { padding: 16px 16px calc(28px + env(safe-area-inset-bottom)); }

/* Dark mode: a black shadow disappears on the dark page, so the terminal gets a soft teal glow (as in the app) */
body.theme-dark .td-device { border-color: #3d5070; box-shadow: 0 22px 44px -18px rgba(58,163,157,.45); }
body.theme-dark .td-shadow { --td-sh: 58,163,157; }

/* Projekte & Admin-PIN tags: the terminal's own settings, saved straight to the server */
.td-dev-title { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--p-line, #e7e6e4); margin-bottom: 0; }
.td-dev-hint { margin: 6px 0 12px; font-size: 12.5px; line-height: 18px; }
.td-dev-empty { margin-top: 14px; }
.td-dev-loading { display: flex; justify-content: center; padding: 22px 0; }
.td-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--td-accent) 25%, transparent); border-top-color: var(--td-accent); animation: td-spin .8s linear infinite; }
@keyframes td-spin { to { transform: rotate(360deg); } }
.td-dev-save { margin-top: 16px; width: 100%; }
.td-dev-item { margin-top: 12px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface-2, #f4f4f3); }
.td-dev-item-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.td-dev-item-head > span { display: flex; flex-direction: column; min-width: 0; }
.td-dev-tag { color: var(--td-accent); font-size: 11.5px; font-weight: 600; margin-top: 2px; }
.td-dev-sub { font-size: 13px; font-weight: 500; }
.td-dev-item-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--p-line, #e7e6e4); }
.td-dev-item-body .td-field { margin-top: 10px; }
.td-dev-pin-wrap { position: relative; }
.td-mount .td-dev-pin-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--p-muted, #6f6d69); cursor: pointer; }
.td-mount .td-dev-pin-eye.is-on { color: var(--p-accent, #2f8f8a); }
.td-mount .td-dev-pin-eye:focus-visible { outline: 2px solid var(--p-accent, #2f8f8a); outline-offset: 1px; }
[dir="rtl"] .td-mount .td-dev-pin-eye { right: auto; left: 6px; }
.td-mount input.td-dev-pin { display: block; width: 100%; box-sizing: border-box; height: 56px; padding: 0 52px; border-radius: 10px; border: 1px solid var(--p-line-strong, #d6d4d1); background: var(--p-surface-2, #f4f4f3); color: var(--td-strong, inherit); font-size: 26px; font-weight: 700; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }

/* Projekte tag: entries open to edit their texts; "+ Neues Projekt" above the list */
.td-dev-add { margin-top: 14px; width: 100%; }
.td-dev-item-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.td-dev-item-name > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.td-dev-item-name .td-step-label { overflow: hidden; text-overflow: ellipsis; }
.td-dev-chevron { display: inline-flex; color: var(--p-muted, #6f6d69); flex-shrink: 0; }
.td-dev-item.is-open { border-color: color-mix(in srgb, var(--td-accent) 45%, transparent); }
.td-dev-item.is-open .td-dev-chevron { color: var(--td-accent); }
.td-dev-item textarea { min-height: 72px; resize: vertical; }
.td-dev-remove { margin-top: 12px; color: #be123c; }

/* Editor stage: resizable with the handle; the tablet turns in 3D (back with the logo), zooms and floats. */
.td-sheet-stage { position: relative; display: block; padding: 0; overflow: hidden; border-bottom: 0; user-select: none; -webkit-user-select: none; }
.td-stage-inner { position: absolute; left: 0; right: 0; top: 0; transform-origin: 50% 50%; }
.td-hold { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; }
.td-hold:active { cursor: grabbing; }
.td-turn { position: relative; transform-style: preserve-3d; will-change: transform; }
.td-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.td-turn .td-device, body.theme-dark .td-turn .td-device { box-shadow: none; }
.td-front { transform: translateZ(calc(var(--td-t) / 2)); }
.td-slice { position: absolute; inset: 0; border-radius: var(--td-r); background: #1d2c47; }
.td-slice.is-rim { background: #0c1526; }
.td-back { transform: rotateY(180deg) translateZ(calc(var(--td-t) / 2)); border-radius: var(--td-r); overflow: hidden; background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.02) 45%, rgba(0,0,0,.18)), #101b2e; border: 1px solid #2a3a55; box-sizing: border-box; }
body.theme-dark .td-back { border-color: #3d5070; }
.td-back img { width: 46%; height: auto; pointer-events: none; }
.td-stage-handle { height: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--p-surface-2, #f4f4f3); border-bottom: 1px solid var(--p-line, #e7e6e4); cursor: row-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
.td-stage-handle i { width: 40px; height: 5px; border-radius: 3px; background: var(--p-line-strong, #d6d4d1); }
.td-stage-handle:focus-visible { outline: 2px solid var(--td-accent); outline-offset: -2px; }

/* Floor under the floating tablet, as in the app: the mark printed on it (very faint, lying flat) and
   the Meine Geräte floor shadow (teal glow in dark mode), in step with the float. */
.td-floor { position: absolute; inset: 0; pointer-events: none; --td-floor-y: calc(50% + var(--td-base) - 16px + 20px); }
.td-floor-mark { position: absolute; left: 50%; top: var(--td-floor-y); width: calc(var(--td-w) * 1.5); aspect-ratio: 1732 / 1413; transform: translate(-50%, -50%) perspective(380px) rotateX(76deg); background: #0d346b; opacity: .035; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
body.theme-dark .td-floor-mark { background: #fff; opacity: .025; }
.td-floor-shadow { position: absolute; left: 50%; top: var(--td-floor-y); width: calc(var(--td-w) * .96); transform: translate(-50%, -50%); }
.td-floor-shadow .td-shadow { display: block; width: 100%; height: auto; aspect-ratio: 1 / .13; margin: 0; }
.td-bob { animation: td-bob 4.8s ease-in-out infinite; }
@keyframes td-bob { 0%, 100% { transform: translateY(-16px); } 50% { transform: translateY(-28px); } }
@media (prefers-reduced-motion: reduce) { .td-bob { animation: none; transform: translateY(-16px); } }
/* Right to left (Arabic): the carousel, the stage and the tablet keep their left-to-right geometry
   (translateX maths, 3D turn); only the texts around them run right to left. */
[dir="rtl"] .td-viewport, [dir="rtl"] .td-track, [dir="rtl"] .td-sheet-stage, [dir="rtl"] .td-device, [dir="rtl"] .td-floor, [dir="rtl"] .td-dots { direction: ltr; }

/* Schriften: each terminal font shown with text and numbers. */
.td-font-preview { margin-top: 14px; padding: 16px; border-radius: 12px; border: 1px solid var(--p-line, #e7e6e4); background: #f4efe6; overflow: hidden; }
.td-font-preview-text { color: #111827; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-font-preview-digits { margin-top: 4px; color: #3D9691; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-font-list { display: grid; gap: 8px; margin-top: 4px; }
.td-mount .td-font-row { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface, #fff); color: var(--td-strong, inherit); text-align: start; cursor: pointer; font: inherit; }
.td-mount .td-font-row:hover { border-color: var(--p-line-strong, #d6d4d1); }
.td-mount .td-font-row.is-on { border-color: var(--td-accent, #2f8f8a); background: var(--p-accent-soft, rgba(47,143,138,.10)); }
.td-font-name { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--p-muted, #6f6d69); }
.td-font-row.is-on .td-font-name { color: var(--td-accent, #2f8f8a); }
.td-font-sample { font-size: 20px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Farben: palette and colour lists as round swatches, the Farbfolge as numbered slots, own colour picker. */
.td-round-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.td-round-grid.is-small { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.td-mount .td-round { aspect-ratio: 1; width: 100%; max-width: 56px; padding: 2px; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; justify-self: center; align-self: center; }
.td-mount .td-round.is-small { max-width: 34px; }
.td-mount .td-round > span { display: flex; align-items: center; justify-content: center; width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); }
.td-mount .td-round.is-on { border-color: var(--td-strong, #111827); }
.td-mount .td-round:hover > span { transform: scale(1.06); }
.td-slots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.td-mount .td-slot { width: 48px; height: 48px; padding: 2px; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; }
.td-mount .td-slot > span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); }
.td-mount .td-slot.is-on { border-color: var(--td-accent, #2f8f8a); }
.td-mount .td-slot-add { display: inline-flex; align-items: center; justify-content: center; border: 1.5px dashed var(--td-chip-line, rgba(47,143,138,.35)); background: var(--p-accent-soft, rgba(47,143,138,.10)); color: var(--td-accent, #2f8f8a); }
.td-mount .td-slot-remove { margin-top: 10px; }
.td-mount .td-own { margin-top: 16px; }
.td-mount .td-own-dot { border-radius: 50%; }
.td-mount .td-own-dot.is-on { border: 2px solid var(--td-accent, #2f8f8a); }
.td-own-title { font-weight: 600; font-size: 14px; color: var(--td-strong, inherit); margin-bottom: 4px; }
.td-mount input.td-hex { width: 110px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--p-line-strong, #d6d4d1); background: var(--p-surface-2, #f4f4f3); font-weight: 700; font-size: 13.5px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.td-mount .td-pick.is-on { border-color: var(--td-accent, #2f8f8a); color: var(--td-accent, #2f8f8a); }
.td-hsv { margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface, #fff); }
.td-hsv-sv { position: relative; height: 170px; border-radius: 10px; background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent); cursor: crosshair; touch-action: none; }
.td-hsv-knob { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.3); pointer-events: none; }
.td-mount input.td-hsv-hue { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; margin: 14px 0 2px; padding: 0; border: 0; border-radius: 7px; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.td-mount input.td-hsv-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.3); cursor: pointer; }
.td-mount input.td-hsv-hue::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.3); cursor: pointer; }

/* Banner: upload areas like the logo's, and the Bildausschnitt as a preview of the image. */
.td-upload-icon { display: inline-flex; align-items: center; justify-content: center; background: var(--p-surface, #fff); color: var(--p-muted, #6f6d69); overflow: hidden; }
.td-upload-icon video { width: 100%; height: 100%; object-fit: cover; }
.td-crop { position: relative; width: 100%; max-height: 220px; min-height: 90px; margin-top: 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--p-line-strong, #d6d4d1); background: var(--p-surface-2, #f4f4f3); }
.td-crop > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.td-crop-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; font-size: 12.5px; color: var(--p-muted, #6f6d69); }
.td-crop-wrap { position: relative; }
.td-crop-wrap.has-img { margin-top: 26px; }
.td-crop-wrap.has-img .td-crop { margin-top: 0; }
.td-crop[data-td-crop] { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.td-crop[data-td-crop].is-dragging { cursor: grabbing; border-color: var(--td-accent, #2f8f8a); }
.td-crop > img { pointer-events: none; }
/* The drag sign on the frame's top edge. */
.td-crop-handle { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--p-surface, #fff); border: 1.5px solid var(--td-accent, #2f8f8a); color: var(--td-accent, #2f8f8a); pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.td-crop-wrap:has(.is-dragging) .td-crop-handle { background: var(--td-accent, #2f8f8a); color: #fff; }

/* Senden / An alle senden right under the tags, side by side. */
.td-sheet-tools { flex-shrink: 0; border-bottom: 1px solid var(--p-line, #e7e6e4); background: var(--p-bg, #f6f6f5); }
.td-sheet-tools .td-sheet-bar { border-bottom: 0; }
/* Fertig with changes not sent: only this terminal or all. */
.td-ask { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.45); }
.td-ask-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: var(--p-surface, #fff); box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.td-ask-head { display: flex; align-items: center; justify-content: space-between; font-size: 17px; margin-bottom: 4px; }
.td-ask-card .td-btn { width: 100%; min-height: 46px; }

/* Live simulation of the terminal's project pages (kiosk ProjectsOverlay / ProjectDetailOverlay,
   same dp sizes: 18 dp page padding, 120 dp logo, 28 dp card corners, 120 dp list buttons). */
.tdp-sim .tdp-sim-col { position: absolute; inset: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tdp-sim .tdp-sim-col.tdp-sim-scroll { overflow: hidden; }
.tdp-sim .tdp-sim-logo { height: 120px; width: 100%; display: flex; justify-content: center; flex-shrink: 0; padding: 2px 40px 0; box-sizing: border-box; }
.tdp-sim .tdp-sim-logo img { height: 120px; max-width: 100%; object-fit: contain; }
.tdp-sim .tdp-sim-card { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.92); border-radius: 28px; padding: 18px; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.tdp-sim .tdp-sim-card.tdp-sim-fill { flex: 1 1 auto; min-height: 0; overflow: hidden; margin-top: -6px; }
.tdp-sim .tdp-nav { align-self: flex-end; display: flex; gap: 8px; padding: 8px 10px; border-radius: 18px; background: rgba(255,255,255,.78); border: 1px solid rgba(15,23,42,.12); }
.tdp-sim .tdp-nav span { width: 38px; height: 38px; border-radius: 14px; background: rgba(61,150,145,.12); color: #1d4ed8; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; cursor: pointer; }
.tdp-sim .tdp-sim-title { margin-top: 10px; padding: 0 92px; text-align: center; color: #111827; line-height: 1.2; }
.tdp-sim .tdp-sim-list { width: 100%; margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.tdp-sim .tdp-sim-item { width: 100%; height: 120px; border-radius: 18px; font-size: 30px; cursor: pointer; }
.tdp-sim .tdp-sim-empty { text-align: center; color: #6b7280; font-size: 22px; padding: 20px; }
.tdp-sim .tdp-sim-text { width: 100%; margin-top: 14px; box-sizing: border-box; background: rgba(255,255,255,.6); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; text-align: center; color: #111827; }
.tdp-sim .tdp-sim-banner { flex: 0 0 auto; }
.tdp-sim .tdp-sim-form { gap: 10px; border-radius: 12px; padding: 14px; text-align: center; color: #111827; }
.tdp-sim .tdp-sim-field { width: 100%; height: 64px; box-sizing: border-box; border: 1px solid rgba(15,23,42,.35); border-radius: 6px; display: flex; align-items: center; padding: 0 16px; color: #6b7280; font-size: 18px; }
/* Tappable parts of the preview, as on the terminal. */
.tdp-screen [data-tdp-go], .tdp-screen [data-tdp-open], .tdp-screen [data-tdp-banner] { cursor: pointer; }

/* Banner image with the project it opens; project banners in the Projekte tag. */
.td-thumb-wrap { display: flex; flex-direction: column; gap: 6px; width: 120px; }
.td-link-select { width: 100%; height: 30px; border-radius: 999px; border: 1px solid var(--p-line, #e7e6e4); background: var(--p-surface, #fff); color: var(--p-muted, #6b7280); font: inherit; font-size: 11.5px; font-weight: 600; padding: 0 8px; }
.td-link-select.is-on { border-color: var(--td-accent, #2f8f8a); color: var(--td-accent, #2f8f8a); background: var(--p-accent-soft, rgba(47,143,138,.10)); }
.td-media-actions .td-link-select { width: auto; min-width: 180px; height: 38px; }
.td-pb-head { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.td-pb-thumb { width: 44px; height: 28px; border-radius: 6px; overflow: hidden; background: var(--p-surface-2, #f4f4f3); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--p-muted, #6b7280); }
.td-pb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.td-dev-item-name > span.td-pb-head:first-child { display: flex; flex-direction: row; align-items: center; gap: 10px; }

/* "Anderer Betrag" keypad (kiosk AmountKeypadSheet in a full-screen dialog), 800 × 1280 dp. */
.tdp-kp { position: absolute; inset: -2px -2px -6px -2px; z-index: 20; font-family: "TerminalRoboto", Roboto, sans-serif; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); }
.tdp-kp.has-scrim { background: rgba(0,0,0,.74); }
.tdp-kp-card { width: 624px; box-sizing: border-box; padding: 16px; border-radius: 22px; background: #fff; display: flex; flex-direction: column; gap: 12px; color: #0b1220; text-align: left; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.tdp-kp-head { position: relative; display: flex; align-items: center; min-height: 48px; }
.tdp-kp-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; }
.tdp-kp-title.is-center { position: absolute; left: 0; right: 0; justify-content: center; pointer-events: none; }
.tdp-kp-title .tdp-ar { font-size: 22px; font-weight: 700; }
.tdp-kp-close { margin-left: auto; position: relative; z-index: 1; min-width: 48px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; cursor: pointer; }
.tdp-kp-amount { border: 1px solid; border-radius: 18px; padding: 13px 14px; text-align: center; font-size: 42px; line-height: 46px; font-weight: 700; white-space: pre; color: #000; }
.tdp-kp-row { display: flex; gap: 8px; }
.tdp-kp-key { flex: 1 1 0; height: 70px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-size: 24px; font-weight: 600; cursor: pointer; }
.tdp-kp-key.is-outline { color: #0b1220; border: 1px solid transparent; background: linear-gradient(rgba(255,255,255,.98), rgba(255,255,255,.98)) padding-box, linear-gradient(135deg, #1f4f96, #2b8882) border-box; }
.tdp-kp-key.is-ok { flex: none; width: 100%; }
.tdp-kp-ok { color: #2e7d32; font-size: 22px; font-weight: 700; }
.tdp-sim .tdp-sim-field.has-value { color: #111827; }
.tdp-screen [data-tdp-pay], .tdp-screen [data-tdp-key], .tdp-sim-field[data-tdp-go] { cursor: pointer; }

/* The SumUp card reader checkout the terminal opens (simulated: counts down and goes back). */
.tdp-sumup { position: absolute; inset: -2px -2px -6px -2px; z-index: 30; background: #fff; display: flex; flex-direction: column; align-items: center; font-family: "Inter", "TerminalRoboto", Roboto, sans-serif; color: #1a1a1a; animation: td-fade .18s ease; }
.tdp-su-top { width: 100%; box-sizing: border-box; height: 88px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6e8eb; font-size: 22px; font-weight: 600; color: #3c4043; }
.tdp-su-x { font-size: 26px; color: #5f6368; }
.tdp-su-amount { margin-top: 120px; font-size: 92px; font-weight: 700; letter-spacing: -1px; }
.tdp-su-title { margin-top: 14px; max-width: 640px; font-size: 22px; color: #5f6368; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdp-su-stage { position: relative; margin-top: 50px; width: 420px; height: 420px; overflow: hidden; }
.tdp-su-reader { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
/* A card of the "EasySadaqa bank" comes in from below, is held over the reader and goes (loops).
   Moved with top/opacity, not transform: an animated transform is drawn as a bitmap at its first
   size and magnified with the tablet, so its edges came out pixelated. */
.tdp-su-card { position: absolute; left: 60px; top: 150px; width: 300px; height: 189px; box-sizing: border-box; padding: 18px 22px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, rgba(156,194,190,.55), transparent 60%), linear-gradient(135deg, #133a73, #0e2b58 55%, #0b2247); box-shadow: 0 16px 34px rgba(14,43,88,.32);
  color: #fff; text-align: left; font-family: "Inter", "TerminalRoboto", sans-serif; animation: td-su-tap 2.8s ease-in-out infinite; }
.tdp-su-bank { display: flex; align-items: center; gap: 8px; height: 28px; }
.tdp-su-bank img { width: 26px; height: 26px; }
.tdp-su-bank span { font-size: 19px; font-weight: 600; color: #9cc2be; letter-spacing: -.2px; }
.tdp-su-bank b { color: #fff; font-weight: 700; }
.tdp-su-nfc { position: absolute; right: 20px; top: 20px; width: 26px; height: 26px; }
.tdp-su-chip { position: absolute; left: 22px; top: 62px; width: 42px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #f3dd86, #c9a23e); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.tdp-su-number { position: absolute; left: 22px; top: 106px; font-size: 19px; font-weight: 600; letter-spacing: 1.5px; font-variant-numeric: tabular-nums; }
.tdp-su-holder { position: absolute; left: 22px; bottom: 16px; display: flex; gap: 18px; font-size: 12.5px; font-weight: 600; letter-spacing: .6px; }
.tdp-su-holder span { display: flex; flex-direction: column; white-space: nowrap; }
.tdp-su-holder small { font-size: 8.5px; font-weight: 500; opacity: .65; letter-spacing: .8px; }
.tdp-su-visa { position: absolute; right: 20px; bottom: 14px; font-size: 27px; font-style: italic; font-weight: 800; letter-spacing: .5px; }
@keyframes td-su-tap {
  0% { top: 430px; opacity: 0; }
  20% { opacity: 1; }
  42%, 64% { top: 115px; opacity: 1; }
  86%, 100% { top: 430px; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .tdp-su-card { animation: none; top: 115px; } }
.tdp-su-msg { margin-top: 30px; font-size: 32px; font-weight: 700; }
.tdp-su-sub { margin-top: 12px; font-size: 20px; color: #5f6368; }
.tdp-su-brand { position: absolute; bottom: 120px; font-size: 30px; font-weight: 800; letter-spacing: -.5px; color: #1a1a1a; }
.tdp-su-sim { position: absolute; bottom: 36px; display: flex; align-items: center; gap: 14px; padding: 12px 24px 12px 12px; border-radius: 999px; background: #0e2b58; color: #fff; font-size: 20px; font-weight: 600; }
.tdp-su-count { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #0e2b58; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; }
