/* UNARMA AI — stile applicativo. Nessuno stile inline: compatibile con CSP "style-src 'self'". */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --sidebar: #0f1d33;
  --sidebar-text: #d9e1ee;
  --sidebar-muted: #8fa0ba;
  --sidebar-hover: #1b2d4a;
  --text: #17202e;
  --muted: #5d6a7e;
  --border: #dde2ea;
  --primary: #14325c;
  --primary-hover: #0d2647;
  --primary-contrast: #ffffff;
  --accent: #b5172b;
  --success: #1f7a4d;
  --warning: #9a6200;
  --danger: #b42318;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 29, 51, .06), 0 4px 16px rgba(15, 29, 51, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d131d;
    --surface: #141c28;
    --surface-2: #1b2534;
    --sidebar: #090e16;
    --sidebar-hover: #162133;
    --text: #e6ebf2;
    --muted: #96a3b6;
    --border: #263245;
    --primary: #4f86d9;
    --primary-hover: #6797e0;
    --accent: #e0485a;
    --success: #3fb27f;
    --warning: #e0a63a;
    --danger: #f06b5f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
small, .muted { color: var(--muted); }
code { font-family: var(--mono); font-size: .9em; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pulsanti e form */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .55em 1em; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.btn-sm { padding: .3em .7em; font-size: .85rem; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

label { display: block; font-weight: 500; margin-bottom: .3em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: .6em .75em; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit;
}
textarea { resize: vertical; }
input[type=checkbox] { width: 1.05em; height: 1.05em; accent-color: var(--primary); }
.field { margin-bottom: 1rem; }
.field .helptext, .helptext { display: block; font-size: .82rem; color: var(--muted); margin-top: .25em; }
.field.checkbox { display: flex; align-items: center; gap: .5em; }
.field.checkbox label { margin: 0; order: 2; }
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: .3em 0 0; font-size: .87rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 1.2rem; }

/* Messaggi flash */
.flash-stack { position: fixed; top: 1rem; right: 1rem; z-index: 50; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.flash { padding: .75em 1em; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-left: 4px solid var(--primary); }
.flash-success { border-left-color: var(--success); }
.flash-error { border-left-color: var(--danger); }
.flash-warning { border-left-color: var(--warning); }
.alert { padding: .75em 1em; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 1rem; background: var(--surface-2); }
.alert-error { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); color: var(--danger); }
.alert-warning { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); }

/* Pagine di autenticazione */
.auth-page { min-height: 100%; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--primary) 18%, var(--bg)), var(--bg) 55%); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 560px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; margin-bottom: 1.5rem; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; flex: none; display: block; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.msg-avatar-logo { background: none !important; padding: 0; }
.msg-avatar-logo img { width: 30px; height: 30px; border-radius: 50%; display: block; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; letter-spacing: -.02em; }
.qr { display: block; width: 220px; height: 220px; margin: 1rem auto; background: #fff; padding: 8px; border-radius: 10px; }
.secret { font-family: var(--mono); background: var(--surface-2); padding: .5em .7em; border-radius: 8px; word-break: break-all; text-align: center; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; font-family: var(--mono); font-size: 1.05rem; padding: 0; list-style: none; }
.codes li { background: var(--surface-2); border-radius: 8px; padding: .45em; text-align: center; }

/* Layout applicativo */
.app { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; min-height: 0; }
.sidebar a { color: inherit; text-decoration: none; }
.sidebar-head { padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.sidebar .brand { margin: 0; color: #fff; }
.sidebar .btn { background: transparent; color: var(--sidebar-text); border-color: #2b3c58; }
.sidebar .btn:hover { background: var(--sidebar-hover); }
.sidebar-search input { background: var(--sidebar-hover); border-color: #2b3c58; color: var(--sidebar-text); }
.sidebar-search input::placeholder { color: var(--sidebar-muted); }
.conv-list { flex: 1; overflow-y: auto; padding: 0 .5rem 1rem; list-style: none; margin: 0; }
.conv-list li a { display: block; padding: .5em .75em; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.conv-list li a:hover { background: var(--sidebar-hover); }
.conv-list li a.active { background: #22375a; color: #fff; }
.conv-list .group { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sidebar-muted); padding: .9em .75em .3em; }
.sidebar-foot { border-top: 1px solid #22314b; padding: .75rem 1rem; display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
.sidebar-foot a, .sidebar-foot button { display: flex; align-items: center; gap: .5em; padding: .45em .5em; border-radius: 8px; color: var(--sidebar-text); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; width: 100%; }
.sidebar-foot a:hover, .sidebar-foot button:hover { background: var(--sidebar-hover); }
.user-chip { display: flex; align-items: center; gap: .6em; padding: .4em .5em; color: var(--sidebar-muted); font-size: .85rem; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #2b4470; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .8rem; flex: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface); min-height: 56px; }
.topbar .title { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar select { width: auto; padding: .35em .6em; font-size: .88rem; }
.menu-toggle { display: none; }

/* Chat */
.chat-scroll { flex: 1; overflow-y: auto; }
.chat-inner { max-width: 820px; margin: 0 auto; padding: 1.5rem 1rem 2rem; }
.empty-state { text-align: center; padding: 12vh 1rem 2rem; }
.empty-state h1 { font-size: 1.7rem; }
.suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; margin-top: 1.5rem; text-align: left; }
.suggestion { padding: .8em 1em; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.suggestion:hover { background: var(--surface-2); }
.suggestion strong { display: block; font-size: .92rem; }
.suggestion span { font-size: .84rem; color: var(--muted); }

.msg { display: flex; gap: .8rem; margin-bottom: 1.4rem; }
.msg-avatar { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.msg-user .msg-avatar { background: var(--surface-2); color: var(--muted); }
.msg-assistant .msg-avatar { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.msg-body { min-width: 0; flex: 1; }
.msg-user .msg-content { background: var(--surface-2); padding: .7em 1em; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; display: inline-block; max-width: 100%; }
.msg-content { overflow-wrap: anywhere; }
.msg-content p { margin: 0 0 .8em; }
.msg-content p:last-child { margin-bottom: 0; }
.msg-content pre { background: var(--code-bg); color: var(--code-text); padding: 1em; border-radius: 10px; overflow-x: auto; font-size: .87rem; }
.msg-content :not(pre) > code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.msg-content table { border-collapse: collapse; width: 100%; margin: .6em 0; font-size: .92rem; display: block; overflow-x: auto; }
.msg-content th, .msg-content td { border: 1px solid var(--border); padding: .4em .6em; text-align: left; }
.msg-content blockquote { border-left: 3px solid var(--border); margin: .6em 0; padding-left: 1em; color: var(--muted); }
.msg-content.streaming { white-space: pre-wrap; }
.msg-content.streaming::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--muted); }
@keyframes blink { 50% { opacity: 0; } }
.msg-status { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: .5em; margin-bottom: .4em; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.msg-error { color: var(--danger); font-size: .9rem; margin-top: .4em; }
.msg-actions { display: flex; gap: .3rem; margin-top: .4rem; opacity: .7; }
.msg-actions .btn { padding: .2em .55em; font-size: .8rem; }
.msg-attachments { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.msg-user .msg-body { display: flex; flex-direction: column; align-items: flex-end; }
.file-chip { display: inline-flex; align-items: center; gap: .4em; padding: .3em .7em; border: 1px solid var(--border); border-radius: 999px; font-size: .84rem; background: var(--surface); color: var(--text); text-decoration: none; max-width: 260px; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; line-height: 1; padding: 0 0 0 .2em; }
.file-chip.uploading { opacity: .6; }
.generated-image img { max-width: 100%; height: auto; max-height: 560px; width: auto; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--border); display: block; margin: .3rem 0 .5rem; }
.generated-video { margin: .3rem 0 .6rem; }
.generated-video video { display: block; max-width: 100%; height: auto; max-height: 620px; width: auto; background: #000; border-radius: 12px; border: 1px solid var(--border); margin-bottom: .5rem; }
.generated-video.is-vertical video { max-height: 640px; }
.video-progress { border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: .75rem .9rem; margin: .4rem 0; max-width: 520px; }
.video-progress-head { display: flex; align-items: center; gap: .55em; font-weight: 600; font-size: .92rem; }
.video-progress-bar { width: 100%; height: 8px; margin: .6rem 0 .4rem; appearance: none; -webkit-appearance: none; border: 0; border-radius: 6px; overflow: hidden; background: var(--border); }
.video-progress-bar::-webkit-progress-bar { background: var(--border); border-radius: 6px; }
.video-progress-bar::-webkit-progress-value { background: var(--primary); border-radius: 6px; transition: width .4s ease; }
.video-progress-bar::-moz-progress-bar { background: var(--primary); border-radius: 6px; }
.video-progress-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.sources { margin-top: .8rem; border-top: 1px dashed var(--border); padding-top: .6rem; font-size: .85rem; }
.sources h4 { margin: 0 0 .3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sources ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .25rem; }
.badge { display: inline-block; padding: .1em .55em; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.badge-kb { background: color-mix(in srgb, var(--primary) 15%, var(--surface)); color: var(--primary); }
.badge-web { background: color-mix(in srgb, var(--success) 15%, var(--surface)); color: var(--success); }
.badge-ok { background: color-mix(in srgb, var(--success) 15%, var(--surface)); color: var(--success); }
.badge-warn { background: color-mix(in srgb, var(--warning) 18%, var(--surface)); color: var(--warning); }
.badge-err { background: color-mix(in srgb, var(--danger) 15%, var(--surface)); color: var(--danger); }

/* Composer */
.composer-wrap { padding: .5rem 1rem 1rem; background: linear-gradient(transparent, var(--bg) 30%); }
.composer { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: .6rem .7rem .5rem; }
.composer textarea { border: 0; resize: none; padding: .4em .4em; max-height: 40vh; min-height: 2.6em; background: transparent; }
.composer textarea:focus-visible { outline: none; }
.composer:focus-within { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.composer-files { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .3rem .4rem; }
.composer-files:empty { display: none; }
.composer-bar { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.composer-bar .spacer { flex: 1; }
.tool-toggle { display: inline-flex; align-items: center; gap: .35em; padding: .35em .7em; border-radius: 999px; border: 1px solid var(--border); font-size: .84rem; cursor: pointer; user-select: none; color: var(--muted); background: var(--surface); }
.tool-toggle[aria-pressed=true] { color: var(--primary); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; padding: 0; }
.send-btn { width: 38px; height: 38px; border-radius: 50%; padding: 0; }
.composer-note { text-align: center; font-size: .76rem; color: var(--muted); margin-top: .45rem; }
.image-panel { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .3rem .3rem .6rem; border-bottom: 1px solid var(--border); margin-bottom: .4rem; align-items: center; }
.image-panel select { width: auto; }
.image-panel .opts { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.image-panel .opts label { display: inline-flex; gap: .35em; align-items: center; margin: 0; font-weight: 400; }

/* Area amministrativa */
.admin-main { overflow-y: auto; }
.admin-inner { max-width: 1180px; width: 100%; min-width: 0; box-sizing: border-box; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
/* le colonne e le schede non si allargano oltre lo schermo per colpa di tabelle o testi lunghi (scorrono al loro interno) */
.grid-2 > *, .card { min-width: 0; }
.admin-nav { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: .6rem; }
.admin-nav a { padding: .45em .85em; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .92rem; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.active { background: var(--primary); color: var(--primary-contrast); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.card h2 { font-size: 1.02rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.55rem; font-weight: 700; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .82rem; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: .55em .7em; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.data th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:hover td { background: var(--surface-2); }
.bars { display: flex; flex-direction: column; gap: .35rem; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 90px; gap: .6rem; align-items: center; font-size: .84rem; }
.bar-row meter { width: 100%; height: 12px; }
.bar-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; min-width: 180px; }
.inline-form { display: inline; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
pre.details { white-space: pre-wrap; font-size: .78rem; margin: 0; max-width: 420px; color: var(--muted); }
.pagination { display: flex; gap: .4rem; align-items: center; justify-content: center; margin-top: 1rem; }
.prompt-text { white-space: pre-wrap; font-size: .87rem; background: var(--surface-2); padding: .8em 1em; border-radius: 8px; max-height: 220px; overflow: auto; }
details summary { cursor: pointer; }

.error-page { min-height: 100%; display: grid; place-items: center; text-align: center; padding: 2rem; }
.error-page .code { font-size: 4rem; font-weight: 800; color: var(--muted); }

/* Responsive */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar select { max-width: 42%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters input, .filters select { min-width: 0; flex: 1; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 86vw; max-width: 320px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
  .menu-toggle { display: inline-flex; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .chat-inner { padding: 1rem .75rem 1.5rem; }
  .composer-wrap { padding: .4rem .5rem .6rem; }
  .msg-avatar { display: none; }
  .image-panel { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 70px 1fr 70px; }
  .auth-card { padding: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
.conv-menu { position: relative; }
.conv-menu summary { list-style: none; }
.conv-menu summary::-webkit-details-marker { display: none; }
.conv-menu .card { position: absolute; right: 0; top: calc(100% + 6px); width: 290px; z-index: 30; margin: 0; }
.conv-menu form + form { margin-top: .6rem; }
.field.checkbox { flex-wrap: wrap; }
.field.checkbox .helptext, .field.checkbox .errorlist { flex-basis: 100%; order: 3; }
/* Voce */
#mic-btn.recording { background: color-mix(in srgb, var(--danger) 15%, var(--surface)); color: var(--danger); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--danger) 18%, transparent); } }
.rec-indicator { font-size: .82rem; color: var(--danger); font-variant-numeric: tabular-nums; }
.rec-indicator.busy { color: var(--muted); }
[data-speak].playing { color: var(--primary); }
/* Conversazione vocale */
.voice-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(9, 14, 22, .55); display: grid; place-items: center; padding: 1rem; backdrop-filter: blur(4px); }
.voice-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.6rem; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.voice-card h2 { font-size: 1.1rem; }
.voice-orb { width: 132px; height: 132px; margin: 1.2rem auto; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--primary) 55%, #fff), var(--primary) 60%, var(--accent)); transition: transform .3s ease; }
.voice-orb span { width: 46%; height: 46%; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.voice-orb[data-state=connecting] { opacity: .55; animation: spin 2.4s linear infinite; }
.voice-orb[data-state=listening] { animation: breathe 1.1s ease-in-out infinite; }
.voice-orb[data-state=thinking] { animation: breathe 2.2s ease-in-out infinite; opacity: .8; }
.voice-orb[data-state=speaking] { animation: talk .45s ease-in-out infinite alternate; }
.voice-orb[data-state=muted] { filter: grayscale(1); opacity: .5; }
@keyframes breathe { 50% { transform: scale(1.08); } }
@keyframes talk { from { transform: scale(.97); } to { transform: scale(1.1); } }
.voice-status { font-weight: 600; margin: 0; }
.voice-timer { font-variant-numeric: tabular-nums; margin: .2rem 0 .8rem; font-size: .85rem; }
.voice-live { text-align: left; max-height: 180px; overflow-y: auto; font-size: .9rem; background: var(--surface-2); border-radius: 10px; padding: .6rem .8rem; margin-bottom: 1rem; }
.voice-live:empty { display: none; }
.voice-live p { margin: 0 0 .4rem; }
.voice-live .who { font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; display: block; }
.voice-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.voice-tag { font-size: .74rem; color: var(--muted); margin-bottom: .2rem; }
/* Interruttore on/off */
.switch { display: inline-flex; align-items: center; gap: .45em; border: 0; background: none; cursor: pointer; font: inherit; font-size: .85rem; color: var(--muted); padding: .2em 0; }
.switch span { width: 34px; height: 20px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch[aria-checked=true] { color: var(--success); font-weight: 600; }
.switch[aria-checked=true] span { background: var(--success); }
.switch[aria-checked=true] span::after { transform: translateX(14px); }
.voice-logo { display: block; width: 240px; height: 240px; max-width: 70vw; max-height: 70vw; margin: .6rem auto .4rem; }
/* Scelta del metodo di accesso */
.choice-group { border: 0; padding: 0; margin: 0 0 1rem; grid-column: 1 / -1; min-width: 0; }
.choice-group legend { font-weight: 500; margin-bottom: .45em; padding: 0; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; }
.choice-card { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-weight: 400; margin: 0; transition: border-color .15s, background .15s; }
.choice-card:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.choice-card input { margin-top: .25rem; accent-color: var(--primary); flex: none; }
.choice-card:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.choice-icon { font-size: 1.5rem; line-height: 1; flex: none; }
.choice-body { display: flex; flex-direction: column; gap: .2rem; }
.choice-body span { font-size: .86rem; color: var(--muted); }
.choice-warning { color: var(--warning); margin-top: .5rem; }
.codes.credentials { grid-template-columns: 1fr; text-align: left; }
.codes.credentials li { text-align: left; padding: .6em .9em; }
.auth-links { text-align: center; margin: 1rem 0 0; font-size: .92rem; }
/* PWA */
.install-help { font-size: .8rem; color: var(--sidebar-muted); padding: .2rem .5rem .5rem; line-height: 1.45; }
.offline-card { text-align: center; }
.offline-logo { display: block; margin: 0 auto 1rem; border-radius: 50%; }
/* Schermo intero (app per telefono, app installata dal browser, iPhone in orizzontale): spazio per tacca, isola
   dinamica e barra home. Nel browser normale i margini di sicurezza valgono 0 e le regole non cambiano nulla. */
.topbar { padding-top: max(.6rem, env(safe-area-inset-top)); padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
.sidebar-head { padding-top: max(1rem, env(safe-area-inset-top)); }
.sidebar-foot { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
.composer-wrap { padding-bottom: max(.6rem, env(safe-area-inset-bottom)); }
.auth-page { padding-top: max(1.5rem, env(safe-area-inset-top)); padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
@media (display-mode: standalone) { .composer-note { display: none; } }
.in-app .composer-note { display: none; }
/* Telefoni: con testo sotto i 16px l'iPhone ingrandisce la pagina quando si tocca un campo (e la taglia ai lati) */
@media (hover: none) and (pointer: coarse) {
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea { font-size: 16px; }
}

/* caricamento musica di sottofondo */
.music-dialog { max-width: 34rem; width: calc(100% - 2rem); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.3rem; background: var(--surface); color: inherit; }
.music-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.music-dialog h2 { margin: 0 0 .7rem; font-size: 1.15rem; }
.music-dialog h3 { font-size: .95rem; margin: 1.1rem 0 .4rem; }
.music-dialog label { display: block; margin: .6rem 0 .2rem; font-weight: 600; font-size: .9rem; }
.music-dialog input[type=text], .music-dialog input[type=file] { width: 100%; }
.music-dialog .music-rights { display: flex; gap: .5em; align-items: flex-start; font-weight: 600; margin-top: .9rem; }
.music-dialog .music-rights input { margin-top: .2em; flex: none; }
.music-warning { border: 1px solid #d9a400; background: rgba(255, 196, 0, .12); border-radius: 10px; padding: .6rem .8rem; font-size: .88rem; }
.music-warning p { margin: .3rem 0 0; }
.music-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .8rem; }
.music-mine { border-top: 1px solid var(--border); margin-top: 1rem; }
.music-mine ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.music-mine li { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; font-size: .88rem; }
.music-mine audio { height: 2rem; max-width: 11rem; }
@media (max-width: 560px) { .music-mine li { grid-template-columns: 1fr auto; } .music-mine audio { grid-column: 1 / -1; max-width: 100%; } }
.music-dialog { max-height: calc(100dvh - 2rem); overflow-y: auto; }
.music-head { display: flex; justify-content: space-between; align-items: center; }
.music-head h2 { margin: 0; }
.music-warning { margin: .6rem 0 .4rem; }
.music-search-bar { display: flex; gap: .4rem; flex-wrap: wrap; }
.music-search-bar input { flex: 1 1 12rem; min-width: 0; }
.music-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 .2rem; }
.music-chips .chip { border: 1px solid var(--border); background: var(--surface-2); color: inherit; border-radius: 999px; padding: .2rem .7rem; font-size: .82rem; cursor: pointer; }
.music-chips .chip:hover { border-color: currentColor; }
.music-results { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .5rem; }
.music-result { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: .45rem .6rem; }
.music-info { display: grid; gap: .1rem; min-width: 0; font-size: .88rem; }
.music-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-source { font-size: .78rem; }
.music-result audio { height: 2rem; max-width: 12rem; }
.music-upload { border-top: 1px solid var(--border); margin-top: .9rem; padding-top: .6rem; }
.music-upload summary { cursor: pointer; font-weight: 600; }
@media (max-width: 560px) { .music-result { grid-template-columns: 1fr; } .music-result audio { max-width: 100%; width: 100%; } }

/* selettore musica nel pannello video e guida */
.music-picker { display: inline-flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.guide-link { font-size: .85rem; white-space: nowrap; }
.guide { max-width: 860px; }
.guide-lead { font-size: 1.05rem; }
.guide h2 { font-size: 1.15rem; margin-top: 0; }
.guide-toc ol { margin: .4rem 0 0; columns: 2; }
.guide-steps li { margin-bottom: .35rem; }
.guide-example { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: var(--surface-2); border-radius: 8px; padding: .6rem .8rem; overflow-wrap: anywhere; }
.guide details { border-top: 1px solid var(--border); padding: .5rem 0; }
.guide summary { cursor: pointer; font-weight: 600; }
.guide .music-warning { margin-bottom: 1.2rem; }
@media (max-width: 560px) { .guide-toc ol { columns: 1; } }
#video-music { max-width: min(22rem, 100%); text-overflow: ellipsis; }
#music-play[aria-pressed="true"] { border-color: currentColor; }
.generated-video.is-source { max-width: 220px; }
.generated-video.is-source figcaption { font-size: .8rem; }

/* video dal filmato del redattore */
.video-source { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .88rem; grid-column: 1 / -1; }
.video-source label { display: inline-flex; gap: .35em; align-items: center; margin: 0; font-weight: 600; }
.clip-box { grid-column: 1 / -1; display: grid; gap: .5rem; padding: .5rem 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); }
.clip-upload { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.clip-chip { display: inline-flex; gap: .5rem; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: .2rem .4rem; font-size: .85rem; max-width: 100%; }
.clip-chip img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.clip-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16rem; }
.clip-progress { width: 12rem; }
.clip-box input[type=text] { width: auto; min-width: 12rem; }
.video-panel small { grid-column: 1 / -1; }

[hidden] { display: none !important; }

/* dichiarazione sulle autorizzazioni della musica: deve saltare all'occhio */
.music-dialog .music-rights { border: 2px solid transparent; border-radius: 10px; padding: .55rem .7rem; transition: color .2s, border-color .2s, background .2s; }
.music-dialog .music-rights.needs-consent { color: #c81e1e; border-color: #e02424; background: rgba(224, 36, 36, .07); animation: consent-pulse 1.3s ease-in-out infinite; }
.music-dialog .music-rights.needs-consent input { accent-color: #e02424; outline: 2px solid #e02424; outline-offset: 2px; }
.music-dialog .music-rights.consented { color: #0f7a3a; border-color: #16a34a; background: rgba(22, 163, 74, .08); }
.music-dialog .music-rights.attention { animation: consent-shake .45s ease-in-out 2, consent-pulse 1.3s ease-in-out infinite; }
@keyframes consent-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 36, 36, .55); border-color: #e02424; }
  50% { box-shadow: 0 0 0 7px rgba(224, 36, 36, 0); border-color: #ff8080; }
}
@keyframes consent-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
@media (prefers-color-scheme: dark) {
  .music-dialog .music-rights.needs-consent { color: #ff6b6b; }
  .music-dialog .music-rights.consented { color: #4ade80; }
}
@media (prefers-reduced-motion: reduce) {
  .music-dialog .music-rights.needs-consent, .music-dialog .music-rights.attention { animation: none; }
}
.music-result.pending { border-color: #e02424; box-shadow: 0 0 0 2px rgba(224, 36, 36, .25); }

/* registrazione del filmato nell'app */
.btn-rec { border-color: #e02424; color: #e02424; font-weight: 600; }
body.rec-open { overflow: hidden; }
.rec-overlay { position: fixed; inset: 0; z-index: 200; background: #05080f; color: #fff; display: flex; flex-direction: column; }
.rec-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rec-stage video { max-width: 100%; max-height: 100%; width: auto; height: 100%; object-fit: contain; background: #000; }
.rec-stage video.is-mirrored { transform: scaleX(-1); }
.rec-guide { position: absolute; left: 50%; top: 12%; width: min(46vw, 34vh); aspect-ratio: 3 / 4; transform: translateX(-50%); border: 3px dashed rgba(255, 255, 255, .55); border-radius: 50%; pointer-events: none; display: flex; align-items: flex-end; justify-content: center; }
.rec-guide span { transform: translateY(1.6rem); font-size: .8rem; background: rgba(0, 0, 0, .5); padding: .1rem .5rem; border-radius: 6px; }
.rec-top { position: absolute; top: max(.6rem, env(safe-area-inset-top)); left: .8rem; right: .8rem; display: flex; justify-content: space-between; align-items: center; gap: .6rem; pointer-events: none; }
.rec-timer { background: rgba(0, 0, 0, .55); padding: .25rem .6rem; border-radius: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.rec-timer.is-recording { background: #c81e1e; animation: rec-blink 1.2s ease-in-out infinite; }
@keyframes rec-blink { 50% { background: #8f1414; } }
.rec-mic { display: inline-flex; align-items: center; gap: .3rem; background: rgba(0, 0, 0, .55); padding: .25rem .5rem; border-radius: 8px; }
.rec-mic-bar { width: 80px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.rec-mic-bar span { display: block; height: 100%; width: 0; background: #22c55e; transition: width .08s linear; }
.rec-mic-bar span.is-low { background: #f59e0b; }
.rec-countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(5rem, 22vw, 11rem); font-weight: 800; text-shadow: 0 4px 24px rgba(0, 0, 0, .6); pointer-events: none; }
.rec-prompter { position: absolute; top: 3.2rem; left: 4%; right: 4%; height: 34%; overflow: hidden; background: rgba(0, 0, 0, .58); border-radius: 12px; cursor: pointer; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); }
.rec-prompter.is-paused { outline: 2px solid #f59e0b; }
.rec-prompter-text { padding: 30% 1rem 60%; line-height: 1.35; font-weight: 700; text-align: center; white-space: pre-wrap; will-change: transform; }
.rec-msg { position: absolute; bottom: .8rem; left: .8rem; right: .8rem; margin: 0; background: rgba(0, 0, 0, .7); padding: .5rem .7rem; border-radius: 10px; font-size: .9rem; text-align: center; }
.rec-msg.is-warning { background: rgba(180, 30, 30, .85); }
.rec-controls { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; align-items: center; padding: .7rem .7rem max(.7rem, env(safe-area-inset-bottom)); background: #0b1220; }
.rec-controls .btn { min-height: 2.6rem; }
.rec-main { background: #e02424; border-color: #e02424; color: #fff; font-weight: 700; min-width: 8rem; }
.rec-main.is-stop { background: #fff; color: #c81e1e; }
.rec-gobbo-panel { background: #0f1828; padding: .7rem .9rem; display: grid; gap: .5rem; max-height: 45vh; overflow-y: auto; }
.rec-gobbo-panel label { font-weight: 600; font-size: .9rem; }
.rec-gobbo-panel textarea, .rec-gobbo-panel input[type=text] { width: 100%; }
.rec-gobbo-ai { display: flex; gap: .4rem; flex-wrap: wrap; }
.rec-gobbo-ai input { flex: 1 1 14rem; min-width: 0; }
.rec-gobbo-opts { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: .85rem; }
.rec-gobbo-opts label { display: inline-flex; gap: .4rem; align-items: center; font-weight: 400; }
#rec-gobbo-toggle[aria-pressed="true"] { border-color: #f59e0b; color: #f59e0b; }
@media (prefers-reduced-motion: reduce) { .rec-timer.is-recording { animation: none; } }
.rec-overlay[data-mode="review"] .rec-msg { top: 3.2rem; bottom: auto; }

/* registrazione: anteprima a tutto schermo come l'app Fotocamera e grafica sempre sopra il video (iPhone) */
.rec-overlay { height: 100dvh; }
.rec-stage video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; z-index: 0; }
.rec-stage #rec-review { object-fit: contain; }
.rec-guide, .rec-top, .rec-prompter, .rec-countdown, .rec-msg { z-index: 2; transform: translateZ(0); }
.rec-guide { transform: translateX(-50%) translateZ(0); }
.rec-prompter-hint { position: absolute; right: .5rem; bottom: .35rem; font-size: .72rem; font-weight: 600; background: rgba(245, 158, 11, .9); color: #111; padding: .1rem .45rem; border-radius: 6px; }
.rec-prompter { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%); mask-image: linear-gradient(to bottom, transparent, #000 18%); }
.rec-prompter { height: 28%; background: rgba(0, 0, 0, .5); }
/* anteprima: dimensioni e posizione calcolate da recorder.js (riempimento come l'app Fotocamera) */
.rec-stage #rec-preview { inset: auto; max-width: none; max-height: none; object-fit: fill; }

/* pannello Video su schermi stretti: nulla deve uscire dai margini */
.image-panel > *, .image-panel .opts > *, .clip-box > *, .clip-upload > * { min-width: 0; max-width: 100%; }
.image-panel select, .image-panel input[type=text] { max-width: 100%; }
.image-panel .opts label { flex-wrap: wrap; white-space: normal; overflow-wrap: anywhere; }
.image-panel .opts label:has(input[type=checkbox]), .video-source label { flex-wrap: nowrap; align-items: flex-start; text-align: left; }
.image-panel .opts label input[type=checkbox], .video-source input { flex: none; margin-top: .2em; }
.clip-box input[type=text] { min-width: 0; flex: 1 1 11rem; width: auto; }
.clip-chip { min-width: 0; max-width: 100%; }
.clip-chip span { min-width: 0; max-width: none; flex: 1 1 auto; }
.clip-progress { max-width: 100%; }
.video-panel small, .clip-hint, .ai-hint, #clip-bg-hint { overflow-wrap: anywhere; }
.music-picker { max-width: 100%; }
.music-picker select { min-width: 0; flex: 1 1 10rem; }
@media (max-width: 560px) {
  .clip-box .opts input[type=text] { flex-basis: 100%; }
}

/* dentro l'app per telefono: niente installazione dell'app web né pagina di download */
.in-app #install-app, .in-app #install-help, .in-app .only-browser { display: none !important; }
.notice-ok { padding: .6rem .8rem; border-left: 3px solid var(--success); background: color-mix(in srgb, var(--success) 10%, var(--surface)); border-radius: 6px; }
.notice-error { padding: .6rem .8rem; border-left: 3px solid var(--danger, #c0392b); background: color-mix(in srgb, var(--danger, #c0392b) 10%, var(--surface)); border-radius: 6px; }
.ios-expiry { margin: 0 0 1rem; line-height: 1.5; }
.reply-pending { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.recipients { border: 0; padding: 0; margin: 0 0 1rem; }
.recipients legend { font-weight: 600; margin-bottom: .4rem; }
.recipients .recipient { display: inline-flex; align-items: center; gap: .4rem; margin: 0 1rem .4rem 0; font-weight: 400; }
.panel-head { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.panel-head strong { margin-right: auto; }
.panel-error { grid-column: 1 / -1; padding: .6rem .8rem; border-left: 3px solid var(--danger, #b5172b); background: color-mix(in srgb, var(--danger, #b5172b) 10%, var(--surface)); border-radius: 6px; font-size: .92rem; }
.panel-warn { color: var(--danger, #b5172b) !important; font-weight: 600; }
.flash-stack { top: calc(env(safe-area-inset-top, 0px) + 1rem); }
.admin-transcript { display: flex; flex-direction: column; gap: .7rem; }
.transcript-msg { padding: .9rem 1rem; }
.transcript-user { border-left: 3px solid var(--primary); }
.transcript-meta { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.transcript-msg .generated-video video, .transcript-msg .generated-image img { max-width: min(100%, 420px); max-height: 60vh; border-radius: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
/* passkey: accesso con volto o impronta */
.passkey-login { margin-top: 1rem; }
.passkey-divider { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .85rem; margin: .4rem 0 .8rem; }
.passkey-divider::before, .passkey-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.passkey-btn { font-weight: 600; white-space: normal; line-height: 1.3; }
.passkey-status { margin: .5rem 0 0; font-size: .92rem; }
.passkey-status.ok { color: var(--success); font-weight: 600; }
.passkey-status.error { color: var(--danger); }
.passkey-offer { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(1rem, env(safe-area-inset-bottom)); width: min(460px, calc(100% - 1.5rem)); z-index: 60; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.passkey-offer h2 { margin-top: 0; font-size: 1.1rem; }
.passkey-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
/* messaggio all'apertura e aggiornamento obbligatorio */
.announce-backdrop, .update-wall { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); background: rgba(8, 15, 30, .72); }
.update-wall { z-index: 90; background: var(--bg); }
.announce, .update-card { width: min(480px, 100%); max-height: 100%; overflow-y: auto; margin: 0; }
.announce-kicker { margin: 0 0 .3rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
.announce h2, .update-card h2 { margin-top: 0; }
.update-card { text-align: center; }
.update-icon { font-size: 3rem; line-height: 1; margin-bottom: .5rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.inline-form .field { flex: 1 1 200px; margin: 0; }
.notice-warn { padding: .7rem .9rem; border-left: 3px solid var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-radius: 6px; font-weight: 600; }
.app-credits { display: flex; flex-direction: column; gap: .1rem; padding: .3rem .5rem 0; font-size: .72rem; line-height: 1.35; color: var(--sidebar-muted); opacity: .85; }
.passkey-quick { margin: .4rem 0 .2rem; }
.passkey-btn-big { font-size: 1.08rem; padding: .95em 1em; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
