:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #f8f4ff;
  background: #101019;
  --muted: #b7acc7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 90% 0%, #2d1c40, transparent 64rem), #101019;
}
.dashboard {
  width: min(100%, 860px);
  margin: auto;
  padding: max(26px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; letter-spacing: -.055em; }
header p { margin-top: 7px; }
p, dt, footer { color: var(--muted); font-size: 14px; }
.app-tile, .back-button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  border: 1px solid #544163;
  background: #221a30;
}
.app-tile {
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  text-align: left;
  background: linear-gradient(120deg, #26213a, #21182e);
}
.app-tile:hover, .back-button:hover { border-color: #8c76a6; }
#open-access { margin-top: 12px; }
#open-routing { margin-top: 12px; }
.routing-icon { font-size: 29px; color: #a8efdb; background: #263c43; border-color: #426c70; }
.routing-card {
  width: min(100%, 550px);
  padding: 20px;
  border: 1px solid #544163;
  border-radius: 22px;
  background: linear-gradient(125deg, #27223a, #1b1829);
}
.routing-card h2 { margin-bottom: 8px; font-size: 21px; }
.routing-card p { line-height: 1.5; }
.routing-card .people-button { margin-top: 16px; background: #d9bdf5; color: #231831; font-weight: 650; }
.routing-card + .routing-card { margin-top: 12px; }
.routing-card [role="status"]:not(:empty) { margin-top: 9px; color: #b7e8da; }
.routing-card button:disabled { opacity: .5; cursor: default; }
.routing-card textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid #67577e;
  border-radius: 10px;
  background: #15121f;
  color: inherit;
  font: 16px monospace;
  overflow-wrap: anywhere;
}
.routing-card .routing-instructions { margin-top: 16px; padding-top: 12px; border-top: 1px solid #544163; }
.people-icon { font-size: 29px; line-height: 1; }
.app-tile:focus-visible, .back-button:focus-visible { outline: 2px solid #b795ff; outline-offset: 3px; }
.app-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #59618a;
  border-radius: 15px;
  color: #a9e6fc;
  background: #333653;
}
.app-icon i {
  position: relative;
  width: 24px;
  height: 16px;
  margin-bottom: 5px;
  border: 2px solid currentColor;
  border-radius: 4px;
}
.app-icon i::before, .app-icon i::after {
  content: "";
  position: absolute;
  left: 50%;
  background: currentColor;
  transform: translateX(-50%);
  border-radius: 2px;
}
.app-icon i::before { top: 13px; width: 2px; height: 5px; }
.app-icon i::after { top: 17px; width: 12px; height: 2px; }
.app-label { display: grid; gap: 4px; }
.app-label strong { font-size: 20px; }
.app-label span { color: var(--muted); font-size: 13px; }
.app-arrow { color: #cab9e2; font-size: 26px; line-height: 1; }
.back-button { margin: 0 0 16px; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.monitor-controls { margin-bottom: 13px; }
.monitor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.monitor-actions button, .people-button {
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid #67577e;
  border-radius: 12px;
  color: inherit;
  background: #302641;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.monitor-actions button:hover, .people-button:hover { border-color: #ac93c9; }
.monitor-actions button:focus-visible, .people-button:focus-visible { outline: 2px solid #b795ff; outline-offset: 2px; }
.monitor-actions button:disabled { opacity: .55; cursor: wait; }
#monitors-off, #confirm-lock { background: #443363; }
#monitor-feedback:not(:empty) { margin-top: 9px; }
#invite-form label, #access-screen label { display: block; margin: 8px 0 5px; color: var(--muted); font-size: 14px; }
#invite-code, #access-screen input:not([type="radio"]) {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #67577e;
  border-radius: 12px;
  background: #15121f;
  color: inherit;
  font: inherit;
}
#invite-feedback:not(:empty) { margin-top: 9px; }
#permission-field { min-width: 0; margin: 13px 0 0; padding: 0; border: 0; }
#permission-field legend { padding: 0; color: var(--muted); font-size: 14px; }
.permission-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 5px;
  padding: 4px;
  border: 1px solid #544362;
  border-radius: 12px;
  background: #15121f;
}
#access-screen .permission-options label { position: relative; display: block; margin: 0; }
.permission-options input { position: absolute; opacity: 0; }
.permission-options span {
  display: grid;
  min-height: 36px;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  color: #e9ddf4;
}
.permission-options input:checked + span { color: #fff; background: #49365e; font-weight: 650; }
.permission-options input:focus-visible + span { outline: 2px solid #b795ff; outline-offset: 1px; }
.permission-options input:disabled + span { opacity: .45; cursor: default; }
.access-cards { display: grid; gap: 12px; }
.people-header { align-items: center; margin-bottom: 17px; }
.people-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-color: #a182d8;
  border-radius: 14px;
  background: #d4b9ff;
  color: #231632;
  font-weight: 650;
  white-space: nowrap;
}
.people-button span { font-size: 20px; line-height: 1; }
#access-title:focus, #pc-title:focus { outline: none; }
.access-hint, #access-feedback:not(:empty) { margin-top: 7px; }
#access-feedback:empty { display: none; }
#invite-share { margin-top: 10px; }
#invite-send { color: #dfc4ff; }
.card.people-card {
  padding: 15px;
  border-color: #473752;
  background: linear-gradient(150deg, #241d32, #191724 70%);
}
.people-card h2 { padding: 0 2px; font-size: 15px; }
.people-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.people-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #453753;
  border-radius: 14px;
  background: #252033;
}
.person { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 9px; min-width: 0; }
.person-text { display: grid; gap: 5px; min-width: 0; }
.person-text strong { font-size: 15px; line-height: 1.24; overflow-wrap: anywhere; }
.person-details { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.person-details small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.person-details .person-role { padding: 2px 6px; border-radius: 7px; background: #332943; color: #e2caff; white-space: nowrap; }
.person-details .person-role-admin { background: #253646; color: #b4def8; }
.person-avatar {
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #5e4878;
  border-radius: 12px;
  color: #dfc4ff;
  background: #392b4f;
  font-size: 15px;
  font-weight: 650;
}
.pending-card .people-list li { background: #211d2c; }
.pending-card .person-avatar { border-color: #4a4059; background: #30283d; color: #c3b4d4; }
.people-list .monitor-actions { margin: 0; }
.people-list .monitor-actions button {
  min-height: 38px;
  padding: 6px 8px;
  border-color: #554466;
  color: #ddcce9;
  background: transparent;
  font-size: 12px;
}
dialog { max-width: min(360px, calc(100% - 28px)); padding: 18px; border: 1px solid #67577e; border-radius: 19px; background: #241c33; color: inherit; }
dialog::backdrop { background: #100b19c9; }
dialog p { margin-top: 7px; }
#open-wishes { margin-top: 12px; }
.wishes-icon { border-color: #8b5d79; background: #4a3049; color: #f1cbe4; font-size: 24px; }
#wishes-screen { max-width: 520px; margin-inline: auto; }
.wishes-header { align-items: center; margin-bottom: 14px; }
#wishes-title { font-size: clamp(30px, 8vw, 44px); }
#wishes-title:focus { outline: none; }
.wishes-primary {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #e4c8f1;
  border-radius: 13px;
  background: #e7ccf4;
  color: #25182d;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.wishes-primary span { margin-right: 4px; font-size: 16px; }
.wishes-primary:disabled { opacity: .65; cursor: wait; }
.wishes-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid #59425e;
  border-radius: 14px;
  background: #221a2b;
}
.wishes-tabs button {
  min-height: 35px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #cbb9d3;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.wishes-tabs button[aria-selected="true"] { background: #4c3554; color: #fbebff; }
.wishes-primary:focus-visible, .wishes-tabs button:focus-visible,
.wish-menu summary:focus-visible, .wish-menu button:focus-visible {
  outline: 2px solid #dcadf4;
  outline-offset: 2px;
}
#wishes-feedback:not(:empty) { margin: 0 2px 10px; }
.wish-items { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.wish-card {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #513c56;
  border-radius: 15px;
  background: linear-gradient(115deg, #2e2338, #251e30);
}
.wish-mark {
  display: grid;
  height: 37px;
  place-items: center;
  border: 1px solid #765367;
  border-radius: 11px;
  background: #49313d;
  color: #f6c6ba;
  font-size: 17px;
}
#wishes-screen[data-list="maxim"] .wish-mark { background: #3a3155; color: #d7c4ff; border-color: #615582; }
.wish-content { min-width: 0; overflow-wrap: anywhere; }
.wish-content strong { display: block; margin: 1px 0 3px; line-height: 1.26; }
.wish-content p { font-size: 13px; line-height: 1.35; white-space: pre-wrap; }
.wish-content a { display: inline-block; margin-top: 6px; color: #e1bff7; font-size: 12px; }
.wish-menu { position: relative; }
.wish-menu summary {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  list-style: none;
  border: 1px solid #523d59;
  border-radius: 9px;
  background: #35283e;
  color: #e4cdea;
  cursor: pointer;
}
.wish-menu summary::-webkit-details-marker { display: none; }
.wish-menu[open] summary { background: #624472; }
.wish-menu button {
  position: absolute;
  z-index: 1;
  inset: calc(100% + 5px) 0 auto auto;
  min-height: 39px;
  padding: 7px 10px;
  border: 1px solid #8b5c79;
  border-radius: 10px;
  background: #39273c;
  color: #f2b7c5;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.wish-empty { padding: 18px; border: 1px dashed #59425e; border-radius: 15px; color: var(--muted); text-align: center; }
dialog.wish-sheet {
  inset: auto 0 0;
  width: min(100%, 520px);
  max-width: none;
  max-height: calc(100dvh - 14px);
  margin: 0 auto;
  padding: 20px 19px max(18px, env(safe-area-inset-bottom));
  border-radius: 25px 25px 0 0;
  background: linear-gradient(145deg, #352641, #241d31);
}
.wish-sheet::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin: -6px auto 14px;
  border-radius: 4px;
  background: #8b7397;
}
.wish-sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.wish-person { padding: 4px 9px; border: 1px solid #785b85; border-radius: 999px; color: #edcdf6; font-size: 12px; }
#wish-form label { display: block; margin: 10px 0 5px; color: #efe0f3; font-size: 13px; }
#wish-form label span { color: #c4accd; font-size: 12px; }
#wish-form input, #wish-form textarea {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #6c5176;
  border-radius: 10px;
  background: #211a2c;
  color: #f5eafa;
  font: inherit;
  font-size: 16px;
}
#wish-form textarea { resize: vertical; }
#wish-form-feedback:empty { display: none; }
.wish-form-actions { display: flex; gap: 8px; margin-top: 13px; }
.wish-form-actions .wishes-primary { flex: 1; }
#wish-form-cancel { padding: 7px 10px; border: 1px solid #674e72; border-radius: 12px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid #574164;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.connection i { width: 7px; height: 7px; border-radius: 50%; background: #e4be7b; }
.connection[data-state="live"] i { background: #7fefbb; box-shadow: 0 0 9px #7fefbb7d; }
.connection[data-state="error"] i { background: #f092a7; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.card { border: 1px solid #48364f; border-radius: 22px; padding: 19px; background: #1b1728; }
.hardware { background: linear-gradient(150deg, var(--wash), #171625 75%); }
.cpu { --accent: #7adffd; --wash: #202d42; }
.gpu { --accent: #fb9ce4; --wash: #37223e; }
h2 { font-size: 17px; line-height: 1.2; }
.hardware h2 { color: var(--accent); }
.hardware p { margin-top: 5px; }
.reading { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; color: var(--accent); }
.reading strong { font-size: 53px; line-height: 1.1; letter-spacing: -.06em; }
.reading span { font-size: 19px; }
.reading, .capacity, dd { font-variant-numeric: tabular-nums; }
canvas { display: block; width: 100%; height: 62px; margin: 4px 0 9px; }
dl > div, .disk-label { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; }
dd { font-size: 14px; font-weight: 650; text-align: right; white-space: nowrap; }
.capacity { display: flex; align-items: baseline; gap: 7px; margin: 12px 0 9px; }
.capacity strong { font-size: 27px; }
.capacity span, .disk-label span { color: var(--muted); font-size: 13px; }
progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 10px; overflow: hidden; background: #423650; }
progress::-webkit-progress-bar { background: #423650; }
progress::-webkit-progress-value { background: #ad8cf3; }
progress::-moz-progress-bar { background: #ad8cf3; }
.storage h2 { margin-bottom: 6px; }
.disk + .disk { margin-top: 6px; }
footer { margin-top: 14px; min-height: 20px; }

@media (max-width: 480px) {
  .panels { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 15px; }
  canvas { height: 48px; }
}

@media (max-width: 360px) {
  .card.people-card { padding: 12px; }
  .people-list li { padding: 8px; }
}
