/* Smile Connect web: remote-desktop style in Smile navy and gold. */
:root {
  color-scheme: dark;
  --gold: #f2c200; --gold-2: #ffd84d; --gold-ink: #1c1600; --gold-soft: rgba(242,194,0,.13);
  --bg: #070f1c; --bg-2: #0a1628; --surface: #0f1f36; --surface-2: #142846; --surface-3: #1a3255;
  --text: #f3f6fb; --text-2: #d3dce8; --muted: #93a5bc; --faint: #677c96;
  --border: rgba(147,176,214,.13); --border-2: rgba(147,176,214,.24); --border-gold: rgba(242,194,0,.4);
  --green: #5ee69a; --green-soft: rgba(52,211,120,.14); --red: #ff8a8a; --red-soft: rgba(248,113,113,.14);
  --ring: 0 0 0 3px rgba(242,194,0,.25);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --font: Inter, "Segoe UI", Roboto, system-ui, sans-serif;
  --display: "Plus Jakarta Sans", Inter, "Segoe UI", sans-serif;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body:has(#browserSession:not([hidden])) { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
h1, h2 { font-family: var(--display); font-weight: 800; }
h1 em, h2 em { font-style: normal; color: var(--gold); }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--ring); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.fine-print { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--faint); font-size: 12.5px; line-height: 1.55; }
.eyebrow { margin-bottom: 6px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.message { min-height: 1.2em; margin-top: 10px; color: var(--muted); font-size: 14px; }
.message.error { color: var(--red); }
.message.success { color: var(--green); }

/* brand + buttons */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 17px; white-space: nowrap; }
.brand b { color: var(--gold); }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand-lg { font-size: 22px; } .brand-lg img { width: 46px; height: 46px; border-radius: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 12px; font-weight: 700; font-size: 14px; line-height: 1; cursor: pointer; white-space: nowrap; touch-action: manipulation; transition: filter .15s, background .15s, border-color .15s, transform .15s; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button-primary { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 8px 22px rgba(242,194,0,.22), inset 0 1px 0 rgba(255,255,255,.35); }
.button-primary:hover:not(:disabled) { filter: brightness(1.06); }
.button-secondary { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }
.button-secondary:hover:not(:disabled) { background: var(--surface-3); }
.button-danger { color: #fff; background: linear-gradient(180deg, #f05252, #d93636); }
.button-lg { min-height: 50px; font-size: 15.5px; border-radius: 13px; }
.button-sm { min-height: 36px; padding: 0 13px; font-size: 13px; }
.button-block { width: 100%; }

/* forms */
.form { display: grid; gap: 14px; margin-top: 22px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 650; color: var(--text-2); }
input, select { border-radius: 12px; }
.field input, .new-group input, .inline-form input, .tile-manage select {
  width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--border-2); background: rgba(4,10,20,.6); color: var(--text); outline: none; font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .new-group input::placeholder { color: var(--faint); }
.field input:focus, .new-group input:focus, .inline-form input:focus, .tile-manage select:focus { border-color: var(--border-gold); box-shadow: var(--ring); }
select option { color: #0b1220; background: #fff; }
.code-input { font: 700 22px/1 var(--font) !important; letter-spacing: .3em; text-align: center; }
.mfa-note { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border-gold); border-radius: 12px; background: var(--gold-soft); color: var(--text-2); font-size: 14px; }

/* sign in */
.signin { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); min-height: 100vh; min-height: 100dvh; }
.signin-art { position: relative; display: flex; flex-direction: column; gap: 34px; padding: 44px 52px; overflow: hidden; border-right: 1px solid var(--border);
  background: radial-gradient(900px 520px at 10% -10%, rgba(242,194,0,.16), transparent 60%), radial-gradient(700px 600px at 100% 100%, rgba(60,120,200,.22), transparent 60%), linear-gradient(160deg, #0d1d35, #070f1c); }
.art-copy h1 { font-size: clamp(34px, 4.4vw, 54px); }
.art-copy p { max-width: 470px; margin-top: 14px; color: var(--text-2); font-size: 17px; }
.art-scene { display: flex; align-items: center; gap: 22px; margin: auto 0; }
.art-screen { position: relative; width: 190px; height: 124px; padding: 14px; border: 2px solid rgba(147,176,214,.3); border-radius: 14px; background: linear-gradient(160deg, #18355c, #0d1f37); box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.art-screen span, .art-phone span { display: block; height: 10px; margin-bottom: 9px; border-radius: 5px; background: rgba(147,176,214,.25); }
.art-screen span:nth-child(2) { width: 70%; } .art-screen span:nth-child(3) { width: 45%; background: rgba(242,194,0,.55); }
.art-screen i { position: absolute; left: 50%; bottom: -20px; width: 50px; height: 8px; border-radius: 4px; background: rgba(147,176,214,.3); transform: translateX(-50%); }
.art-phone { width: 74px; height: 132px; padding: 16px 10px; border: 2px solid rgba(147,176,214,.3); border-radius: 18px; background: linear-gradient(160deg, #18355c, #0d1f37); box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.art-phone span:nth-child(2) { width: 60%; background: rgba(242,194,0,.55); }
.art-link { display: flex; gap: 7px; }
.art-link b { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: dot 1.4s infinite ease-in-out; }
.art-link b:nth-child(2) { animation-delay: .2s; } .art-link b:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
.art-points { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; color: var(--text-2); }
.art-points li { display: flex; align-items: center; gap: 12px; }
.art-points span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.06); }
.signin-panel { display: grid; place-items: center; padding: 32px calc(20px + var(--safe-r)) 32px calc(20px + var(--safe-l)); }
.signin-card { width: min(400px, 100%); }
.signin-card .brand-sm { display: none; margin-bottom: 26px; }
.signin-card h2 { font-size: 32px; margin-bottom: 6px; }

/* workspace */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 calc(22px + var(--safe-r)) 0 calc(22px + var(--safe-l)); border-bottom: 1px solid var(--border); background: rgba(10,22,40,.9); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 650; font-size: 14.5px; }
.tabs a:hover { color: var(--text); background: rgba(147,176,214,.08); }
.topbar-end { display: flex; align-items: center; gap: 14px; margin-left: auto; min-width: 0; }
.welcome { overflow: hidden; color: var(--muted); font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.content { width: min(1180px, calc(100% - 40px - var(--safe-l) - var(--safe-r))); margin: 0 auto; padding: 30px 0 40px; }
.block { padding-bottom: 36px; scroll-margin-top: 80px; }
.block + .block { padding-top: 30px; border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h1 { font-size: 30px; } .section-head h2 { font-size: 24px; }
.section-head .muted { max-width: 620px; margin-top: 6px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 calc(10px + var(--safe-b)); border-top: 1px solid var(--border); color: var(--faint); font-size: 13px; }
.foot a:hover { color: var(--gold); }

/* device tiles */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.device-tile { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); transition: transform .18s, border-color .18s, box-shadow .18s; }
.device-tile:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.tile-screen { position: relative; display: grid; place-items: center; height: 128px; margin: 10px 10px 0; overflow: hidden; border-radius: 12px; background: linear-gradient(150deg, #1d3d68, #0c1d34); }
.tile-screen::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px 120px at 30% 0%, rgba(242,194,0,.16), transparent 70%); }
.tile-initials { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.08); font: 800 21px var(--display); }
.tile-badge { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(4,10,20,.72); color: var(--text-2); font-size: 12px; font-weight: 650; }
.tile-dot { position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: #66768c; }
.device-tile.online .tile-dot { background: var(--green); box-shadow: 0 0 12px rgba(94,230,154,.8); }
.device-tile.online .tile-badge { color: var(--green); }
.device-tile.offline .tile-screen { filter: grayscale(.7) brightness(.75); }
.tile-body { padding: 12px 14px 4px; min-width: 0; }
.tile-name { overflow: hidden; font-weight: 750; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.tile-meta { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tile-action { display: grid; gap: 8px; padding: 10px 14px 14px; margin-top: auto; }
.tile-note { padding: 10px 0; color: var(--faint); font-size: 13px; text-align: center; }
.tile-manage { border-top: 1px solid var(--border); }
.tile-manage summary { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; color: var(--muted); font-size: 13px; font-weight: 650; list-style: none; cursor: pointer; }
.tile-manage summary::-webkit-details-marker { display: none; }
.tile-manage summary::after { content: "▾"; transition: transform .2s; }
.tile-manage[open] summary::after { transform: rotate(180deg); }
.tile-manage > div { display: grid; gap: 10px; padding: 0 14px 14px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { min-height: 40px; font-size: 14px; }
.inline-form .button { min-height: 40px; }
.tile-manage select { min-height: 40px; font-size: 14px; }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 46px 20px; border: 1px dashed var(--border-2); border-radius: 18px; color: var(--muted); text-align: center; }
.empty span { font-size: 34px; } .empty h3 { color: var(--text); font-size: 18px; } .empty p { max-width: 440px; font-size: 14px; }

/* groups */
.new-group { display: flex; gap: 10px; max-width: 620px; }
.group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-top: 14px; }
.item-card { padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.item-top > div { min-width: 0; }
.item-title { font-size: 17px; font-weight: 750; overflow-wrap: anywhere; }
.item-meta { margin-top: 3px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.member-line { padding: 12px 0; border-top: 1px solid var(--border); }
.member-line:first-child { margin-top: 12px; }
.permission-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.permission-list label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-2); font-size: 12.5px; cursor: pointer; }
.permission-list label:has(input:checked) { border-color: var(--border-gold); background: var(--gold-soft); color: var(--gold-2); }
.permission-list input { width: 15px; height: 15px; accent-color: var(--gold); }
.member-invite { margin-top: 12px; }
.member-invite label { display: grid; flex: 1; gap: 5px; font-size: 12.5px; color: var(--muted); }

/* live session overlay */
.session { position: fixed; inset: 0; z-index: 50; background: #02060c; }
.remote-stage { position: absolute; inset: 0; background: #02060c; }
.remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #02060c; }
.remote-video.remote-input-ready { cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.waiting { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }
.waiting h2 { font-size: 24px; }
.waiting .message { max-width: 460px; }
.remote-stage:has(.remote-video:not([hidden])) .waiting { display: none; }
.spinner { width: 54px; height: 54px; border: 4px solid rgba(242,194,0,.18); border-top-color: var(--gold); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-toolbar { position: absolute; z-index: 3; top: calc(12px + var(--safe-t)); left: 50%; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 20px); padding: 6px; border: 1px solid var(--border-2); border-radius: 16px; background: rgba(10,22,40,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 16px 40px rgba(0,0,0,.5); transform: translateX(-50%); transition: opacity .25s; }
.remote-stage:has(.remote-video:not([hidden])) .stage-toolbar { opacity: .75; }
.remote-stage:has(.remote-video:not([hidden])) .stage-toolbar:hover, .stage-toolbar:focus-within { opacity: 1; }
.tb-btn { height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; color: var(--text); background: rgba(255,255,255,.07); font-size: 13.5px; font-weight: 650; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
.tb-btn:hover:not(:disabled) { background: rgba(255,255,255,.13); }
.tb-btn:disabled { opacity: .45; cursor: not-allowed; }
.tb-btn.button-primary, .tb-gold { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: none; }
.tb-end { color: #fff; background: #dc2626; }
.tb-end:hover:not(:disabled) { background: #ef4444; }
.tb-group { display: flex; gap: 6px; }
.tb-group select { height: 36px; padding: 0 10px; border: 1px solid var(--border-2); color: var(--text); background: var(--surface-2); font-size: 16px; }
.stage-only { display: none; }
.remote-stage:fullscreen .stage-only { display: inline-flex; align-items: center; }
.remote-stage:fullscreen #fullscreenRemoteScreen { display: none; }
#stageKeyboard { display: none !important; }
.live-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: rgba(239,68,68,.16); color: #ffc9c9; font-size: 13px; }
.live-chip small { max-width: 240px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.rec-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; animation: rec 1.6s infinite; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); } 70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.key-row { position: absolute; z-index: 3; left: 50%; bottom: calc(52px + var(--safe-b)); display: flex; gap: 6px; max-width: calc(100% - 20px); padding: 6px; overflow-x: auto; border: 1px solid var(--border-2); border-radius: 14px; background: rgba(10,22,40,.9); transform: translateX(-50%); scrollbar-width: none; }
.key-row::-webkit-scrollbar { display: none; }
.key { flex: none; min-width: 44px; height: 38px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: 9px; color: var(--text); background: var(--surface-2); font-size: 13px; font-weight: 650; cursor: pointer; touch-action: manipulation; }
.key:active { background: var(--gold-soft); border-color: var(--border-gold); color: var(--gold); }
.stage-hint { position: absolute; z-index: 3; left: 50%; bottom: calc(12px + var(--safe-b)); max-width: calc(100% - 20px); padding: 7px 14px; border-radius: 999px; background: rgba(10,22,40,.85); color: var(--muted); font-size: 13px; text-align: center; transform: translateX(-50%); }
.keyboard-capture { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; resize: none; font-size: 16px; pointer-events: none; }
.remote-stage:fullscreen { background: #000; }

/* responsive */
@media (max-width: 900px) {
  .signin { grid-template-columns: 1fr; }
  .signin-art { display: none; }
  .signin-card .brand-sm { display: inline-flex; }
  .welcome { display: none; }
}
@media (max-width: 600px) {
  .topbar { gap: 10px; height: 58px; }
  .topbar .brand span { display: none; }
  .tabs a { padding: 8px 9px; }
  .content { width: calc(100% - 28px - var(--safe-l) - var(--safe-r)); padding-top: 20px; }
  .section-head h1 { font-size: 26px; }
  .device-grid, .group-list { grid-template-columns: 1fr; }
  .new-group { flex-direction: column; }
  .inline-form { flex-direction: column; }
  .tb-btn { height: 40px; }
  .live-chip small { max-width: 130px; }
  .stage-hint { display: none; }
}
@media (pointer: coarse) { .button { min-height: 46px; } }

/* Centre floating bars with auto margins: left:50% + translate halves their usable width on phones. */
.stage-toolbar, .key-row, .stage-hint { left: 10px; right: 10px; width: fit-content; max-width: calc(100% - 20px); margin: 0 auto; transform: none; }

/* ==========================================================================
   Icons and session extras (connect-extras.js)
   ========================================================================== */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.art-points span, .mfa-note > span { display: grid; place-items: center; color: var(--gold); }
.mfa-note > span .ic { width: 22px; height: 22px; }
.empty > span .ic { width: 40px; height: 40px; color: var(--faint); stroke-width: 1.5; }
.foot-note { display: inline-flex; align-items: center; gap: 8px; }
.foot-note .ic { width: 15px; height: 15px; color: var(--gold); }
.button .ic { width: 17px; height: 17px; }
.tb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tb-icon { position: relative; width: 36px; padding: 0; }
.tb-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font: 800 11px/18px var(--font); }
.tb-timer { margin-left: 4px; padding-left: 8px; border-left: 1px solid rgba(255,201,201,.25); font-variant-numeric: tabular-nums; }
.tb-stats { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tb-stats b { font-weight: 650; }
.tb-stats .ic { width: 16px; height: 16px; color: var(--muted); }
.tb-stats[data-quality="good"] .ic { color: var(--green); }
.tb-stats[data-quality="ok"] .ic { color: var(--gold); }
.tb-stats[data-quality="poor"] .ic { color: var(--red); }
.live-chip small { max-width: 150px; }
.tb-menu { position: relative; }
.remote-stage:has(.remote-video:not([hidden])) .stage-toolbar:has(.menu:not([hidden])) { opacity: 1; }
.menu { position: absolute; z-index: 10; top: calc(100% + 10px); left: 50%; min-width: 250px; padding: 6px; border: 1px solid var(--border-2); border-radius: 14px; background: var(--surface); box-shadow: 0 20px 50px rgba(0,0,0,.55); transform: translateX(-50%); }
.menu-right { left: auto; right: 0; transform: none; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-size: 13.5px; text-align: left; cursor: pointer; }
.menu-item:hover { background: rgba(255,255,255,.07); }
.menu-item.active { background: var(--gold-soft); color: var(--gold-2); }
.menu-item span { display: grid; gap: 1px; }
.menu-item small { color: var(--muted); font-size: 12px; }
.menu-item kbd { flex: none; padding: 2px 7px; border: 1px solid var(--border-2); border-radius: 6px; color: var(--muted); font: 600 11.5px var(--font); white-space: nowrap; }
.menu-label { margin: 6px 8px; color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.seg { display: flex; gap: 4px; margin: 0 6px 8px; padding: 3px; border-radius: 10px; background: rgba(4,10,20,.5); }
.seg button { flex: 1; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 650; cursor: pointer; }
.seg button.active { background: var(--surface-3); color: var(--text); }
.menu-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 8px; border-top: 1px solid var(--border); cursor: pointer; }
.menu-toggle > span { display: grid; gap: 1px; font-size: 13.5px; }
.menu-toggle small { color: var(--muted); font-size: 12px; }
.menu-toggle input { width: 18px; height: 18px; accent-color: var(--gold); }
.remote-stage.scroll { overflow: auto; }
.remote-stage.scroll .remote-video { position: relative; inset: auto; max-width: none; max-height: none; object-fit: none; }
.remote-video[data-scale="stretch"] { object-fit: fill; }
.drop-hint { position: absolute; inset: 16px; z-index: 6; display: none; place-content: center; justify-items: center; gap: 10px; border: 2px dashed var(--border-gold); border-radius: 20px; background: rgba(7,15,28,.78); color: var(--gold-2); font-size: 16px; pointer-events: none; }
.drop-hint .ic { width: 42px; height: 42px; }
.remote-stage.dropping .drop-hint { display: grid; }
.stage-toast { position: absolute; z-index: 8; left: 10px; right: 10px; top: calc(70px + var(--safe-t)); width: fit-content; max-width: calc(100% - 20px); margin: 0 auto; padding: 9px 16px; border: 1px solid var(--border-2); border-radius: 12px; background: rgba(10,22,40,.95); color: var(--text-2); font-size: 13.5px; box-shadow: 0 12px 30px rgba(0,0,0,.45); pointer-events: none; }
.stage-toast.error { border-color: rgba(248,113,113,.45); color: #ffd0d0; }
.stage-toast.success { border-color: rgba(94,230,154,.4); color: #c9f7dd; }
.drawer { position: absolute; z-index: 7; top: calc(12px + var(--safe-t)); right: calc(12px + var(--safe-r)); bottom: calc(12px + var(--safe-b)); display: flex; flex-direction: column; width: min(360px, calc(100% - 24px)); border: 1px solid var(--border-2); border-radius: 18px; background: rgba(10,22,40,.97); backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0,0,0,.6); overflow: hidden; }
.drawer > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--border); }
.drawer-tabs { display: flex; gap: 4px; }
.drawer-tabs button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; }
.drawer-tabs button.active { background: var(--gold-soft); color: var(--gold-2); }
.drawer-pane { display: flex; flex: 1; flex-direction: column; gap: 10px; min-height: 0; padding: 12px; }
.drawer-empty { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.chat-log { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 120px; overflow-y: auto; }
.chat-msg { display: grid; gap: 4px; max-width: 85%; }
.chat-msg p { margin: 0; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-msg small { padding: 0 6px; color: var(--faint); font-size: 11px; }
.chat-me { align-self: flex-end; justify-items: end; }
.chat-me p { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); border-bottom-right-radius: 4px; }
.chat-them p { border-bottom-left-radius: 4px; }
.chat-system { align-self: center; justify-items: center; max-width: 100%; text-align: center; }
.chat-system p { background: transparent; color: var(--muted); font-size: 13px; padding: 2px 6px; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 11px; background: rgba(4,10,20,.6); color: var(--text); font-size: 16px; outline: none; }
.chat-form input:focus { border-color: var(--border-gold); box-shadow: var(--ring); }
.chat-form .button { min-height: 42px; }
.transfers { display: grid; gap: 8px; align-content: start; overflow-y: auto; flex: 1; }
.transfer { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: rgba(4,10,20,.35); }
.transfer-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--gold-soft); color: var(--gold); }
.transfer.done .transfer-icon { background: var(--green-soft); color: var(--green); }
.transfer.failed .transfer-icon { background: var(--red-soft); color: var(--red); }
.transfer-body { display: grid; gap: 3px; flex: 1; min-width: 0; }
.transfer-body b { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.transfer-body small { color: var(--muted); font-size: 12px; }
.transfer.failed small { color: var(--red); }
.bar { display: block; height: 5px; overflow: hidden; border-radius: 5px; background: rgba(147,176,214,.18); }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width .2s; }
.mini-btn { height: 30px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 12.5px; font-weight: 650; cursor: pointer; flex: none; }
@media (pointer: coarse) { .tb-desktop { display: none !important; } }
@media (max-width: 600px) {
  .tb-stats { display: none !important; }
  .menu { position: fixed; left: 10px !important; right: 10px !important; top: auto; bottom: calc(10px + var(--safe-b)); min-width: 0; transform: none; }
  .drawer { left: 10px; right: 10px; width: auto; }
  #remoteKeyboard span { display: none; }
}

.tile-pin { position: absolute; top: 8px; left: 8px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: rgba(4,10,20,.55); color: rgba(243,246,251,.55); cursor: pointer; opacity: 0; transition: opacity .15s, color .15s; }
.device-tile:hover .tile-pin, .tile-pin:focus-visible, .tile-pin.pinned { opacity: 1; }
@media (pointer: coarse) { .tile-pin { opacity: 1; } }
.tile-pin:hover { color: var(--gold-2); }
.tile-pin.pinned { color: var(--gold); }
.tile-pin.pinned .ic { fill: currentColor; }

/* Touch cursor: drawn over the remote screen so phone users see where taps land. */
.remote-cursor { position: absolute; z-index: 4; left: 0; top: 0; width: 0; height: 0; pointer-events: none; will-change: transform; }
.remote-cursor svg { position: absolute; left: -3px; top: -2px; width: 19px; height: 19px; fill: #fff; stroke: #0b1220; stroke-width: 1.8; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0,0,0,.55)); }
.cursor-ring { position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border: 2px solid var(--gold); border-radius: 50%; opacity: 0; }
.remote-cursor.pulse-left .cursor-ring { animation: cursor-pulse .45s ease-out; }
.remote-cursor.pulse-right .cursor-ring { border-color: #7cc4fa; animation: cursor-pulse .45s ease-out; }
@keyframes cursor-pulse { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.5); } }
.touch-only { display: none; }
@media (pointer: coarse) { .touch-only { display: block; } }

/* Hide / show the top controls */
.remote-stage.toolbar-hidden .stage-toolbar { display: none; }
.toolbar-tab { position: absolute; z-index: 3; top: var(--safe-t); left: 0; right: 0; margin: 0 auto; width: 56px; height: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--border-2); border-top: 0; border-radius: 0 0 12px 12px; color: var(--text); background: rgba(10,22,40,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 20px rgba(0,0,0,.45); opacity: .8; cursor: pointer; touch-action: manipulation; }
.toolbar-tab[hidden] { display: none; }
.toolbar-tab:hover, .toolbar-tab:focus-visible { opacity: 1; }
.toolbar-tab .ic { width: 18px; height: 18px; }
@media (pointer: coarse) { .toolbar-tab { width: 64px; height: 30px; } }

/* Plans */
.plan-pill { padding: 5px 11px; border: 1px solid var(--border-gold); border-radius: 999px; background: var(--gold-soft); color: var(--gold); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.plan-pill.free { border-color: var(--border-2); background: rgba(147,176,214,.08); color: var(--text-2); }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.plan.flagged { border-color: var(--border-gold); }
.plan.current { box-shadow: 0 0 0 2px var(--gold) inset; }
.plan-flag { position: absolute; top: -10px; left: 16px; padding: 2px 9px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 11.5px; font-weight: 800; }
.plan h3 { font-size: 18px; }
.plan-price { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.plan-price span { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.plan ul { flex: 1; margin: 4px 0 10px; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.plan .button { width: 100%; justify-content: center; }
.plan-current { padding: 9px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); font-size: 13px; font-weight: 800; text-align: center; }
.plans-foot { margin-top: 14px; font-size: 13px; line-height: 1.6; }
.linklike { padding: 0; border: 0; background: none; color: var(--red); font: inherit; text-decoration: underline; cursor: pointer; }
/* The Free plan's time left, in the session's top bar */
.limit-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border: 1px solid var(--border-gold); border-radius: 999px; background: rgba(28,22,0,.75); color: var(--gold-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.limit-chip b { font-variant-numeric: tabular-nums; }
.limit-chip.low { border-color: rgba(255,138,138,.6); color: var(--red); animation: limit-pulse 1s ease-in-out infinite; }
@keyframes limit-pulse { 50% { opacity: .65; } }
.limit-ended { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
#webQualityMenu .menu-item.locked { opacity: .55; }
#webQualityMenu .menu-item.locked b::after { content: " · upgrade"; color: var(--gold); font-weight: 700; }
.tabs a { white-space: nowrap; }
.waiting:has(.limit-ended:not([hidden])) .spinner { display: none; }
@media (max-width: 600px) {
  .tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .tabs a { padding: 8px 7px; font-size: 13.5px; }
  .topbar-end { gap: 6px; }
  .plan-pill { padding: 4px 8px; font-size: 11.5px; }
  .topbar-end .button-sm { padding-inline: 10px; }
}
@media (max-width: 380px) { .plan-pill { display: none; } }

/* Devices: yours and shared with you */
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.device-sections { display: grid; gap: 26px; }
.device-section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.device-section-head h3 { font-size: 17px; }
.device-section-head .count { padding: 1px 8px; border-radius: 999px; background: rgba(147,176,214,.12); color: var(--text-2); font-size: 12px; font-weight: 800; }
.device-section-head p { flex-basis: 100%; margin-top: -6px; font-size: 13px; }
.device-section-empty { padding: 14px 16px; border: 1px dashed var(--border-2); border-radius: 14px; }
.linklike.gold { color: var(--gold); }
.share-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-tag .ic { width: 14px; height: 14px; flex: none; }
.share-tag.only { background: rgba(147,176,214,.1); color: var(--muted); }
.share-tag.out { background: var(--gold-soft); color: var(--gold); }
.share-tag.in { background: rgba(96,165,250,.15); color: #93c5fd; }
.device-tile.is-shared { border-color: rgba(96,165,250,.35); }
.device-tile.is-shared .tile-screen { box-shadow: inset 0 0 0 2px rgba(96,165,250,.45); }
.tile-platform { position: absolute; right: 30px; top: 7px; width: 22px; height: 22px; padding: 3px; border-radius: 7px; background: rgba(7,15,28,.65); color: var(--text-2); }
.tile-platform svg { width: 100%; height: 100%; display: block; }
.empty .empty-ic { width: 40px; height: 40px; color: var(--gold); }
.empty .button { margin-top: 12px; }
/* Add a device */
.add-device { width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 22px; border: 1px solid var(--border-2); border-radius: 20px; background: var(--bg-2); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: auto; }
.add-device::backdrop { background: rgba(3,8,16,.72); backdrop-filter: blur(3px); }
.add-device-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.add-device-head h2 { font-size: 22px; }
.add-device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.add-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.add-card.here { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.add-card h3 { font-size: 16px; }
.add-card ol { flex: 1; margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.add-card p { flex: 1; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.add-card code { padding: 0 4px; border-radius: 5px; background: rgba(147,176,214,.12); font-size: 12px; }
.add-card .button { justify-content: center; }
.add-card.apple { background: rgba(147,176,214,.05); }
.add-ic { align-self: flex-start; padding: 3px 8px; border-radius: 8px; background: var(--gold-soft); color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .08em; }

.gift-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.gift-form label { color: var(--text-2); font-size: 13.5px; font-weight: 700; }
.gift-form input { width: 220px; max-width: 100%; font-family: ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
/* Share this phone (inside the Smile app on Android) */
.phone-share { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; padding: 18px; border: 1px solid var(--border-gold); border-radius: 18px; background: linear-gradient(135deg, var(--gold-soft), transparent 70%), var(--surface); }
.phone-share h3 { font-size: 17px; }
.phone-share > div:first-child { flex: 1; min-width: 220px; }
.phone-state { margin: 4px 0 6px; font-weight: 800; font-size: 14px; }
.phone-state.on { color: var(--green); }
.phone-state.off { color: var(--muted); }
.phone-share-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

.phone-requests { display: grid; gap: 10px; margin: 10px 0; }
.phone-request { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border-gold); border-radius: 14px; background: rgba(28,22,0,.45); }
.phone-request small { display: block; color: var(--muted); }
.phone-request-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.phone-trust { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.phone-trust summary { cursor: pointer; font-weight: 800; color: var(--text-2); }
.phone-toggle { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.phone-toggle input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.phone-toggle small { display: block; color: var(--muted); font-size: 12.5px; }
.phone-trusted-list { display: grid; gap: 6px; }
.phone-trusted { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; }

/* Shared already: the card becomes a slim green bar */
.phone-share.is-sharing { padding: 12px 14px; border-color: rgba(94,230,154,.45); background: linear-gradient(135deg, var(--green-soft), transparent 70%), var(--surface); }
.phone-share.is-sharing .phone-share-about { display: none; }
.phone-share.is-sharing h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.phone-share.is-sharing h3::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(94,230,154,.8); }
.phone-share.is-sharing .phone-state { margin: 2px 0 0; font-weight: 600; font-size: 13px; color: var(--text-2); }
.phone-share.is-sharing .phone-share-actions { flex-direction: row; align-items: center; }
.phone-share.is-sharing #phoneShareToggle { padding-inline: 16px; }

.phone-problem { margin: 10px 0; padding: 12px; border: 1px solid rgba(255,138,138,.45); border-radius: 14px; background: var(--red-soft); font-size: 13.5px; }
.phone-problem pre { max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 11.5px; color: var(--text-2); }
.phone-problem .phone-request-actions { margin-top: 8px; align-items: center; }

/* Groups: "Group devices" toggle and the group's devices (+ to add, x to remove) */
.group-devices { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.02); }
.group-devices-toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.group-devices-toggle input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--gold); }
.group-devices-toggle small { display: block; color: var(--muted); font-size: 12.5px; }
.group-device-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.group-device-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 11px; border: 1px solid var(--border-gold); border-radius: 999px; background: var(--gold-soft); color: var(--gold-2); font-size: 13px; font-weight: 700; }
.group-device-chip small { color: var(--muted); font-weight: 600; }
.chip-x, .chip-plus { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 999px; cursor: pointer; font: 700 16px/1 inherit; }
.chip-x { background: rgba(255,255,255,.08); color: var(--text-2); }
.chip-x:hover { background: rgba(255,138,138,.25); color: #fff; }
.chip-plus { width: 30px; height: 30px; background: var(--gold); color: #1a1400; font-size: 20px; }
.group-device-add { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.group-device-picker { display: inline-flex; gap: 6px; align-items: center; }
.group-device-picker select { max-width: 220px; }

/* Phone keys vs PC keys in the key row, and folding the row away */
.remote-stage.remote-phone [data-for="pc"], .remote-stage:not(.remote-phone) [data-for="phone"] { display: none; }
.key-fold { position: sticky; left: 0; z-index: 1; min-width: 40px; padding: 0 8px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; box-shadow: 6px 0 10px rgba(10,22,40,.9); }
.key-fold .ic, .key-row-tab .ic { width: 18px; height: 18px; }
.key-kbd { display: inline-flex; align-items: center; gap: 5px; }
.key-kbd .ic { width: 17px; height: 17px; }
.key-kbd[aria-pressed="true"] { border-color: var(--gold, #f2c200); color: var(--gold, #f2c200); }
.clip-pane { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.clip-pane[hidden] { display: none; }
.clip-label { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--muted, #9fb0c8); text-transform: uppercase; }
.clip-text { width: 100%; min-height: 72px; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--border-2); border-radius: 10px; color: var(--text); background: rgba(255,255,255,.04); font: inherit; font-size: 16px; resize: vertical; }
.clip-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.clip-actions .button { flex: 1 1 140px; }
.clip-link { align-self: flex-start; font-size: 13px; }
.clip-box { max-height: 140px; overflow: auto; padding: 9px 10px; border: 1px solid var(--border-2); border-radius: 10px; background: rgba(255,255,255,.04); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; user-select: text; -webkit-user-select: text; }
.clip-box.empty { color: var(--muted, #9fb0c8); }
.drawer-note { margin: 4px 0 0; font-size: 12px; color: var(--muted, #9fb0c8); }
.transfer.received .transfer-icon, .transfer.down.receiving .transfer-icon { color: var(--gold, #f2c200); }
#webPullFiles { margin-top: 8px; }
.key-row-tab { position: absolute; z-index: 3; right: 10px; bottom: calc(52px + var(--safe-b)); display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px; border: 1px solid var(--border-2); border-radius: 11px; color: var(--text); background: rgba(10,22,40,.88); font-size: 12.5px; font-weight: 650; opacity: .85; cursor: pointer; touch-action: manipulation; }
.key-row-tab:hover, .key-row-tab:focus-visible { opacity: 1; }
.remote-stage.keys-folded .key-row { display: none !important; }
.remote-stage:not(.keys-folded) .key-row-tab, .key-row-tab[hidden] { display: none !important; }

/* "Are you still there?" - a session nobody has used for 30 minutes */
.still-there { position: absolute; z-index: 9; left: 16px; right: 16px; top: 50%; width: fit-content; max-width: 380px; margin: 0 auto; padding: 20px 22px; border: 1px solid var(--border-gold); border-radius: 18px; background: rgba(10,22,40,.97); text-align: center; transform: translateY(-50%); box-shadow: 0 20px 50px rgba(0,0,0,.55); }
.still-there b { display: block; font-size: 17px; color: var(--gold); }
.still-there p { margin: 8px 0 14px; color: var(--text-2); font-size: 14px; }
.still-there[hidden] { display: none; }

/* Older versions page (older-versions.html) */
.ov-page { min-height: 100vh; background: var(--bg, #070f1c); }
.ov { max-width: 860px; margin: 0 auto; padding: 28px 16px 60px; }
.ov .brand { display: inline-flex; margin-bottom: 26px; }
.ov h1 { margin: 6px 0 10px; font-size: clamp(26px, 5vw, 36px); }
.ov-note { margin: 16px 0 22px; padding: 12px 14px; border: 1px solid var(--border-gold); border-radius: 14px; background: var(--gold-soft); color: var(--text-2); font-size: 14px; }
.ov-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface); }
.ov-tabs button { padding: 8px 16px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.ov-tabs button.active { background: var(--gold); color: #1a1400; }
.ov-list { display: grid; gap: 10px; }
.ov-row { display: flex; align-items: flex-start; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.ov-row.newest { border-color: var(--border-gold); }
.ov-what { flex: 1; min-width: 0; }
.ov-what h2 { margin: 0 0 4px; font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ov-tag { padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-size: 11.5px; font-weight: 800; }
.ov-tag.signed { background: rgba(94,230,154,.12); color: #5ee69a; }
.ov-changes { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.ov-changes li { margin: 3px 0; }
.ov-hash { margin: 8px 0 0; overflow-wrap: anywhere; }
.ov-row .button { flex: none; }
.ov-foot { margin-top: 22px; }
@media (max-width: 560px) { .ov-row { flex-direction: column; } .ov-row .button { width: 100%; justify-content: center; } }

.older-link { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; text-align: center; }
.older-link:hover { color: var(--gold); }

/* Remote support (connect-support.js) */
.support-dialog { max-width: 520px; }
.support-targets { display: grid; gap: 8px; margin: 12px 0; }
.support-target { display: grid; gap: 3px; text-align: left; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 14px; background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.support-target:hover { border-color: var(--border-gold); }
.support-target small { color: var(--muted); font-size: 13px; }
.support-code { margin: 10px 0; font: 800 44px/1.1 ui-monospace, Consolas, monospace; letter-spacing: .12em; color: var(--gold); text-align: center; }
.support-ask-who { font-size: 18px; font-weight: 800; margin: 6px 0; }
.support-ask-chat { padding: 10px 12px; border: 1px solid var(--border-gold); border-radius: 12px; background: var(--gold-soft); color: var(--text-2); font-size: 14px; }
.support-ask-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.support-bar { position: fixed; z-index: 60; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 20px); padding: 8px 10px 8px 14px; border: 1px solid var(--border-gold); border-radius: 14px; background: rgba(10,22,40,.96); box-shadow: 0 12px 30px rgba(0,0,0,.5); font-size: 14px; font-weight: 650; }
.support-chat { position: fixed; z-index: 55; top: 0; right: 0; bottom: 0; width: min(360px, 92vw); display: flex; flex-direction: column; border-left: 1px solid var(--border-gold); background: rgba(9,20,36,.98); box-shadow: -14px 0 40px rgba(0,0,0,.45); }
.support-chat header { padding: 60px 16px 12px; border-bottom: 1px solid var(--border); }
.support-chat header b { display: block; font-size: 15px; } .support-chat header small { color: var(--muted); font-size: 12px; }
.support-chat-log { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 8px; align-content: start; }
.support-chat .bubble { max-width: 88%; padding: 8px 11px; border-radius: 12px; background: var(--surface-2); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-chat .bubble.me { justify-self: end; background: var(--gold-soft); }
.support-chat .bubble.system { justify-self: center; background: none; color: var(--muted); font-size: 12px; }
.support-chat .bubble small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.support-chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border); }
.support-chat-form textarea { flex: 1; resize: none; height: 42px; padding: 8px 10px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; }
body.support-chat-open #workspace { margin-right: min(360px, 92vw); }

/* Add a device: the other Linux downloads under the main button (2026-10-19) */
.add-alt { margin: 4px 0 0; font-size: 13px; }
.add-alt a { color: var(--gold); }

/* Session recording (2026-10-31) */
.tb-rec { display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; font-variant-numeric: tabular-nums; }
.tb-rec .rec-ring { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--red); background: transparent; }
.tb-rec.recording { background: rgba(239,68,68,.16); color: #fecaca; }
.tb-rec.recording .rec-ring { background: var(--red); border-color: var(--red); animation: rec-blink 1.2s ease-in-out infinite; }
@keyframes rec-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .tb-rec.recording .rec-ring { animation: none; } }
