/* ------------------------------------------------------------------
   Beacon — design tokens
   Gradient base: uiGradients "Royal" (#141E30 → #243B55), deepened to black.
------------------------------------------------------------------- */
:root {
  --navy-900: #0F172A;
  --navy-800: #141E30;
  --navy-700: #243B55;
  --black: #000000;
  --gold: #D4AF37;
  --gold-soft: rgba(212, 175, 55, .14);
  --gold-line: rgba(212, 175, 55, .45);
  --cyan: #06B6D4;
  --cyan-soft: rgba(6, 182, 212, .14);
  --ink: #F8F9FA;
  --ink-2: #C9CFD8;
  --muted: #8C97A8;
  --line: rgba(248, 249, 250, .09);
  --line-strong: rgba(248, 249, 250, .16);
  --surface: #121B2D;
  --surface-2: #17223A;
  --danger: #E26D5A;

  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Type scale: 1.25 ratio from 16px */
  --t-xs: .8rem;
  --t-sm: .875rem;
  --t-md: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.563rem;
  --t-2xl: 2.441rem;
  --t-3xl: clamp(2.441rem, 5.2vw, 3.815rem);

  --r-sm: 6px;
  --r-md: 10px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: .35s;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(36, 59, 85, .75), transparent 70%),
    linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 38%, var(--black) 100%);
}
main { flex: 1; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: var(--navy-900); padding: 8px 14px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

.ic { width: 18px; height: 18px; flex: none; display: block; }
.ic-img { object-fit: contain; }
[data-icon] { display: inline-flex; }

/* ---------------- Header ---------------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15, 23, 42, .86);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) { .bar { backdrop-filter: saturate(140%) blur(8px); } }
.bar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold); }
.monogram { width: 38px; height: 38px; }
.monogram text { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .06em; fill: currentColor; }
.brand-word { font-family: var(--font-display); font-weight: 600; font-size: var(--t-lg); letter-spacing: -.01em; color: var(--ink); }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); color: var(--gold); padding: 4px 10px;
  border: 1px solid var(--gold-line); border-radius: 999px; white-space: nowrap;
}
.role-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.role-chip.is-user { color: var(--cyan); border-color: rgba(6, 182, 212, .45); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: none; cursor: pointer;
  font-size: var(--t-sm); font-weight: 500; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn .ic { width: 16px; height: 16px; }
.btn-quiet { color: var(--ink-2); }
.btn-quiet:hover { color: var(--ink); background: rgba(248, 249, 250, .06); }
.btn-line { border-color: var(--line-strong); color: var(--ink); }
.btn-line:hover { border-color: var(--gold-line); color: var(--gold); }
.btn-gold { background: var(--gold); color: var(--navy-900); font-weight: 600; }
.btn-gold:hover { background: #E2C25A; }
.btn-danger { background: var(--danger); color: var(--navy-900); font-weight: 600; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.is-busy .ic { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border-radius: var(--r-sm); border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.icon-btn:hover:not([disabled]) { color: var(--ink); background: rgba(248, 249, 250, .06); }
.icon-btn.is-danger:hover:not([disabled]) { color: var(--danger); }
.icon-btn[disabled] { opacity: .35; cursor: not-allowed; }

/* ---------------- Hero ---------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(8px, 3vw, 32px) var(--gutter) 0; }
.hero-canvas { position: relative; width: 100%; height: clamp(520px, 74vh, 760px); }
#beacon { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }

/* ---------------- Services ---------------- */
.services { max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 72px; }
.services-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.services-head h2 { font-size: var(--t-xl); }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; min-width: 220px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--muted);
  transition: border-color var(--dur) var(--ease);
}
.search:focus-within { border-color: var(--gold-line); }
.search .ic { width: 16px; height: 16px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: var(--t-sm); color: var(--ink); }
.search input::placeholder { color: var(--muted); }

.viewas { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
.viewas button {
  border: 0; background: none; padding: 6px 12px; border-radius: 4px; cursor: pointer;
  font-size: var(--t-xs); color: var(--muted); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.viewas button[aria-checked="true"] { background: var(--gold-soft); color: var(--gold); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; }
.chip {
  border: 1px solid var(--line-strong); background: none; color: var(--ink-2); cursor: pointer;
  border-radius: 999px; padding: 5px 14px; font-size: var(--t-xs);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--gold-line); color: var(--gold); }

.grid {
  display: grid; gap: 20px; padding-top: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 196px;
  padding: 22px 22px 18px; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-md);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .9); }
  .card:hover::before { transform: scaleX(1); }
}
.card:focus-visible { border-color: var(--line-strong); }
.card:focus-visible::before, .card:active::before { transform: scaleX(1); }
.card:focus-visible { outline-offset: 3px; }
.card.no-url { cursor: default; }
.card-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--r-sm);
  color: var(--gold); border: 1px solid var(--gold-line); background: var(--gold-soft);
}
.card-icon .ic { width: 22px; height: 22px; }
.card-icon .ic-img { width: 28px; height: 28px; border-radius: 3px; }
.card[data-access="public"] .card-icon { color: var(--cyan); border-color: rgba(6, 182, 212, .4); background: var(--cyan-soft); }
.card[data-access="private"] .card-icon { color: var(--ink); border-color: var(--line-strong); background: rgba(248, 249, 250, .05); }
.card h3 { font-size: var(--t-lg); }
.card p { font-size: var(--t-sm); color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--muted); }
.card-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-open { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); flex: none; }
.card-open .ic { width: 14px; height: 14px; }
.card:hover .card-open, .card:active .card-open { color: var(--gold); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-xs); white-space: nowrap;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2);
}
.badge .ic { width: 12px; height: 12px; }
.badge-admin { color: var(--gold); border-color: var(--gold-line); }
.badge-public { color: var(--cyan); border-color: rgba(6, 182, 212, .4); }
.badge-muted { color: var(--muted); }
.card .badge { position: absolute; top: 20px; right: 20px; }

.empty {
  grid-column: 1 / -1; padding: 56px 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--r-md);
}
.empty strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: var(--t-lg); font-weight: 600; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

.skeleton { min-height: 196px; border-radius: var(--r-md); border: 1px solid var(--line); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.6s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------------- Admin ---------------- */
.admin { max-width: var(--maxw); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter) 72px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: var(--t-2xl); }
.preview-note { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--gold); padding: 8px 14px; border: 1px solid var(--gold-line); border-radius: var(--r-sm); background: var(--gold-soft); }
.preview-note .ic { width: 16px; height: 16px; }
.tabs { display: flex; gap: 4px; margin-top: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs [role="tab"] {
  position: relative; border: 0; background: none; cursor: pointer; padding: 12px 16px; white-space: nowrap;
  font-size: var(--t-sm); font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 8px;
  transition: color var(--dur) var(--ease);
}
.tabs [role="tab"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform var(--dur) var(--ease); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"]::after { transform: scaleX(1); }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--navy-900); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }

.panel-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0; }
.panel-hint { font-size: var(--t-sm); color: var(--muted); max-width: 62ch; }

.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(18, 27, 45, .7); }
.row {
  display: grid; align-items: center; gap: 16px; padding: 14px 16px;
  grid-template-columns: 40px minmax(0, 1fr) auto auto auto;
}
.row + .row { border-top: 1px solid var(--line); }
.row.is-hidden .row-main, .row.is-hidden .row-icon { opacity: .5; }
.row-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line-strong); color: var(--ink-2); }
.row-icon .ic-img { width: 24px; height: 24px; }
.row-main { min-width: 0; }
.row-title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-sub { font-size: var(--t-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 2px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); flex-wrap: wrap; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 11px; border-radius: 4px; font-size: var(--t-xs); color: var(--muted); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); white-space: nowrap; }
.seg input:checked + span { background: var(--gold-soft); color: var(--gold); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 1px; }
.seg input:disabled + span { cursor: not-allowed; }
.seg-row input[value="public"]:checked + span { background: var(--cyan-soft); color: var(--cyan); }
.seg-row input[value="private"]:checked + span { background: rgba(248, 249, 250, .08); color: var(--ink); }

.switch { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: rgba(248, 249, 250, .14); position: relative; cursor: pointer; margin: 0; flex: none; transition: background-color var(--dur) var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-2); transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.switch:checked { background: var(--gold); }
.switch:checked::after { transform: translateX(16px); background: var(--navy-900); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.switch-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--muted); }
.switch-field { display: flex; align-items: center; gap: 10px; align-self: end; height: 42px; font-size: var(--t-sm); color: var(--ink-2); cursor: pointer; }

.group { margin-bottom: 28px; }
.group-title { letter-spacing: -.01em; font-family: var(--font-display); font-size: var(--t-lg); margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; }
.group-title small { font-family: var(--font); font-size: var(--t-sm); color: var(--muted); font-weight: 400; }
.docker-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--muted); }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.state.is-running::before { background: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.state.is-removed::before { background: var(--danger); }
.mono-id { font-variant-numeric: tabular-nums; }

/* ---------------- Dialogs & forms ---------------- */
.dlg {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line-strong);
  border-radius: var(--r-md); color: var(--ink); background: linear-gradient(180deg, var(--surface-2), var(--navy-900));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9);
}
.dlg-narrow { width: min(420px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(0, 0, 0, .62); }
.dlg[open] { animation: dlg-in .35s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px); } }
.dlg-body { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.dlg-body h2 { font-size: var(--t-xl); }
.dlg-sub { color: var(--muted); font-size: var(--t-sm); }
.dlg-mark { color: var(--gold); }
.dlg-mark .monogram { width: 48px; height: 48px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field legend { font-size: var(--t-xs); color: var(--ink-2); font-weight: 500; padding: 0; margin-bottom: 6px; }
.field > span { margin-bottom: 0; }
.field input:not([type="radio"]):not([type="checkbox"]), .field textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, .25); color: var(--ink); font-size: var(--t-sm); outline: none;
  transition: border-color var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { resize: vertical; }
.form-error { color: var(--danger); font-size: var(--t-sm); }

.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, 40px); gap: 6px; }
.icon-picker button {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); background: none;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-picker button:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-picker button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.icon-picker .ic-img { width: 24px; height: 24px; }
.upload { margin-top: 10px; font-size: var(--t-xs); color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }

.check { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); cursor: pointer; padding: 4px 0; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
.perm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; max-height: 200px; overflow: auto; margin-top: 4px; padding-left: 26px; }
.perm-list:empty::before { content: "Es gibt noch keine nicht-öffentlichen Dienste."; color: var(--muted); font-size: var(--t-sm); grid-column: 1 / -1; }

/* ---------------- Toasts & footer ---------------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100vw - 32px); pointer-events: none; }
.toast {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; max-width: 520px;
  padding: 10px 16px; border-radius: var(--r-sm); font-size: var(--t-sm);
  background: var(--ink); color: var(--navy-900); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8);
  animation: toast-in .35s var(--ease);
}
.toast .ic { width: 16px; height: 16px; }
.toast.is-error { background: var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.foot {
  max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 24px var(--gutter) 32px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: var(--t-xs); color: var(--muted); border-top: 1px solid var(--line);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .hero-canvas { height: min(88vw, 640px); }
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .row .seg, .row .switch-wrap { grid-column: 2 / -1; justify-self: start; }
  .row .row-actions { grid-column: 3; grid-row: 1; }
}
@media (max-width: 640px) {
  .hero { padding-top: 4px; }
  .hero-canvas { height: min(108vw, 480px); margin: 0 calc(var(--gutter) * -1); width: calc(100% + var(--gutter) * 2); }
  .services { padding-top: 8px; }
  .btn-label { display: none; }
  .bar .btn { padding: 8px 10px; }
  .role-chip { display: none; }
  .search { min-width: 0; flex: 1; }
  .toolbar { width: 100%; }
  .viewas { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: 1fr; gap: 10px; padding-top: 16px; }
  .card {
    display: grid; min-height: 0; padding: 14px 14px 14px 14px; column-gap: 14px; row-gap: 2px;
    grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center;
    grid-template-areas: "icon title open" "icon desc open" "icon badge open";
  }
  .card::before { left: 14px; right: 14px; }
  .card-icon { grid-area: icon; align-self: center; width: 44px; height: 44px; }
  .card h3 { grid-area: title; font-size: var(--t-md); }
  .card p { grid-area: desc; -webkit-line-clamp: 2; font-size: var(--t-xs); }
  .card .badge { grid-area: badge; position: static; justify-self: start; margin-top: 6px; }
  .card-foot { grid-area: open; margin: 0; padding: 0; border: 0; }
  .card-host, .open-text { display: none; }
  .card-open .ic { width: 18px; height: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .perm-list { grid-template-columns: 1fr; }
  .row .seg, .dlg .seg { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .seg span { text-align: center; padding: 7px 4px; }
  .dlg-body { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .card:hover, .card:focus-visible { transform: none; }
}
