:root {
  color-scheme: dark;
  font-family: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  background: #10151d;
  color: #f3f5f8;
  --page: #10151d;
  --panel: #171e29;
  --ink: #f3f5f8;
  --muted: #a4afbb;
  --blue: #91b7ff;
  --blue-ink: #0d1a2d;
  --lime: #d4ee72;
  --error: #ffb6a9;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--page); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}
.hidden { display: none !important; }
.topbar { height: 76px; padding: 0 max(32px, calc((100vw - 1320px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #26313d; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 760; letter-spacing: .11em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--lime); color: #111821; font-size: 19px; font-weight: 850; letter-spacing: -.06em; clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%); }
.brand-light { color: #aebaca; font-weight: 520; }
.topbar-right { display: flex; align-items: center; gap: 24px; color: #d6dce2; font-size: 13px; }
.secure-label { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.page-shell { max-width: 1320px; margin: auto; padding: 66px 32px 24px; }
.auth-layout { min-height: calc(100vh - 166px); display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); align-items: center; gap: clamp(54px, 8vw, 120px); padding-bottom: 44px; }
.section-label { margin: 0 0 15px; color: #b4c4d8; font-size: 11px; font-weight: 780; letter-spacing: .15em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 20px; font-size: clamp(42px, 5.1vw, 68px); line-height: 1.03; letter-spacing: -.055em; font-weight: 680; }
h2 { margin-bottom: 10px; font-size: 27px; line-height: 1.15; letter-spacing: -.035em; }
h3 { font-size: 18px; margin-bottom: 7px; }
.intro-copy { max-width: 50ch; margin-bottom: 34px; color: #bbc5d0; font-size: 17px; line-height: 1.65; }
.quiet-note { max-width: 60ch; color: #8896a4; font-size: 12px; line-height: 1.55; }
.download-link { display: inline-flex; align-items: center; min-height: 48px; margin: 2px 0 20px; color: var(--blue); font-size: 14px; font-weight: 720; text-underline-offset: 4px; }
.download-link:hover { color: #c3d7ff; }
.pairing-illustration { width: min(420px, 100%); margin: 6px 0 32px; display: flex; flex-direction: column; align-items: center; }
.screen-outline { width: 100%; height: 94px; border: 2px solid #66798b; display: flex; align-items: center; justify-content: center; position: relative; color: #c8d1da; font-size: 12px; font-weight: 760; letter-spacing: .19em; }
.screen-outline::after { content: ""; width: 54px; height: 9px; border-bottom: 2px solid #66798b; position: absolute; bottom: -11px; }
.screen-indicator { position: absolute; right: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.pair-line { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: #8493a2; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.pair-line span { width: 72px; height: 1px; background: #43505d; }
.phone-outline { width: 68px; height: 81px; border: 2px solid #66798b; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; }
.phone-outline b { color: var(--lime); font-size: 15px; letter-spacing: .2em; }
.phone-speaker { width: 19px; height: 2px; background: #66798b; border-radius: 2px; }
.auth-panel, .workspace-panel { background: var(--panel); border: 1px solid #2c3743; padding: clamp(26px, 3vw, 38px); }
.auth-panel { max-width: 450px; width: 100%; justify-self: end; }
.panel-heading { margin-bottom: 26px; }
.muted { color: var(--muted); line-height: 1.55; }
.panel-heading .muted { margin-bottom: 0; font-size: 14px; }
form { display: flex; flex-direction: column; gap: 10px; }
label { margin-top: 7px; color: #d5dce4; font-size: 13px; font-weight: 630; }
input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #485765; border-radius: 3px; background: #111822; color: var(--ink); }
input[type="file"] { padding: 10px; color: #b7c2cd; font-size: 12px; }
input::placeholder { color: #8794a2; opacity: 1; }
.button { min-height: 46px; padding: 0 17px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; font-size: 13px; font-weight: 740; transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; }
.button-primary { background: var(--blue); color: var(--blue-ink); }
.button-primary:hover:not(:disabled) { background: #b0ccff; }
.button-wide { width: 100%; margin-top: 17px; }
.button-outline { border-color: #596777; background: transparent; color: var(--ink); }
.button-outline:hover { background: #26313d; }
.button-text { border: 0; background: transparent; color: #c6d1dc; }
.button-text:hover { color: white; }
.text-link { padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 700; }
.auth-switch { margin: 22px 0 0; color: var(--muted); font-size: 13px; }
.message { margin: 14px 0; padding: 12px 14px; border: 1px solid #52606c; color: var(--ink); font-size: 13px; line-height: 1.5; }
.message.error { border-color: #9d655e; color: var(--error); }
.message.success { border-color: #718b55; color: var(--lime); }
.account-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.account-head h1 { margin-bottom: 10px; font-size: clamp(38px, 4.8vw, 60px); }
.account-head .muted { margin-bottom: 0; font-size: 14px; }
.account-pair { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 6px; font-weight: 720; font-size: 14px; line-height: 1.35; }
.account-pair small { display: inline-block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 450; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 18px; align-items: start; }
.workspace-panel { min-width: 0; padding: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-head .section-label { margin-bottom: 9px; }
.section-head h2 { margin-bottom: 0; }
.count-label { color: #a9b7c6; font-size: 10px; font-weight: 740; letter-spacing: .12em; white-space: nowrap; }
.playlist-list { margin-top: 20px; }
.playlist-row { display: flex; align-items: center; gap: 14px; min-height: 72px; border-top: 1px solid #313d49; }
.playlist-icon { display: grid; place-items: center; flex: 0 0 37px; width: 37px; height: 37px; background: #253344; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.playlist-info { flex: 1; min-width: 0; }
.playlist-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.playlist-info span { display: block; margin-top: 4px; color: #a4afbb; font-size: 11px; }
.delete-button { min-width: 48px; min-height: 44px; border: 1px solid #56616e; background: transparent; color: #d8e0e7; cursor: pointer; font-size: 11px; }
.delete-button:hover { border-color: var(--error); color: var(--error); }
.empty-state { padding: 48px 18px; border-top: 1px solid #313d49; text-align: center; }
.empty-state h3 { margin-top: 15px; }
.empty-state p { max-width: 40ch; margin: auto; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty-symbol { display: grid; place-items: center; width: 44px; height: 44px; margin: auto; border: 1px solid #596777; color: var(--lime); font-size: 24px; }
.add-panel h2 { margin-bottom: 20px; }
.format-tabs { display: flex; gap: 8px; margin-bottom: 14px; border-bottom: 1px solid #35414d; }
.format-tab { min-height: 42px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: #b0bbc6; cursor: pointer; font-size: 12px; font-weight: 680; }
.format-tab.selected { border-bottom-color: var(--lime); color: var(--ink); }
.format-tab:hover { color: white; }
.security-note { display: flex; gap: 9px; margin: 20px 0 0; color: #aab6c2; font-size: 11px; line-height: 1.55; }
.security-note span { color: var(--lime); font-size: 9px; }
.pair-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 20px; padding: 20px 24px; border: 1px solid #657747; background: #1b2419; }
.pair-notice > div { flex: 1 1 300px; }
.pair-notice h2 { font-size: 21px; }
.pair-notice .section-label { color: var(--lime); }
.pair-notice .muted { margin-bottom: 0; font-size: 13px; }
.devices-section { margin-top: 52px; }
.devices-section > .muted { margin: 14px 0 0; font-size: 13px; }
.device-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin-top: 14px; border-top: 1px solid #303b47; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 62px; border-bottom: 1px solid #303b47; }
.device-row strong { display: block; font-size: 13px; }
.device-row small { display: block; margin-top: 4px; color: #9fabb7; font-size: 11px; }
.members-table-wrap { overflow-x: auto; border: 1px solid #2c3743; background: var(--panel); }
.members-table { width: 100%; border-collapse: collapse; text-align: left; }
.members-table th, .members-table td { padding: 15px 18px; border-bottom: 1px solid #303b47; vertical-align: middle; }
.members-table th { color: #b4c4d8; font-size: 11px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.members-table td { color: #e4e9ee; font-size: 13px; }
.members-table tr:last-child td { border-bottom: 0; }
.member-email { font-weight: 700; overflow-wrap: anywhere; }
.member-role { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.member-install-id { max-width: 220px; overflow-wrap: anywhere; color: #c3d0dd; font-size: 11px; }
.member-state { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border: 1px solid #596777; color: #dbe3ea; font-size: 11px; white-space: nowrap; }
.member-state.active { border-color: #718b55; color: var(--lime); }
.member-state.pending { border-color: #8b7848; color: #f0d486; }
.member-state.disabled { border-color: #875c56; color: var(--error); }
.member-action { min-height: 40px; padding: 0 12px; border: 1px solid #596777; background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; white-space: nowrap; }
.member-action:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.member-action:disabled { cursor: wait; opacity: .6; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 0; border-top: 1px solid #26313d; color: #93a0ad; font-size: 11px; }

@media (max-width: 800px) {
  .page-shell { padding: 40px 24px 22px; }
  .auth-layout { grid-template-columns: 1fr; gap: 34px; max-width: 540px; margin: auto; }
  .auth-panel { justify-self: stretch; max-width: none; }
  .pairing-illustration { max-width: 380px; }
  .account-grid { grid-template-columns: 1fr; }
  .add-panel { grid-row: 1; }
  .account-head { align-items: flex-start; }
}
@media (max-width: 520px) {
  .topbar { height: 64px; padding: 0 18px; }
  .topbar-right { gap: 8px; font-size: 11px; }
  .page-shell { padding: 31px 18px 18px; }
  .auth-layout { gap: 24px; padding-bottom: 32px; }
  h1 { font-size: 43px; }
  .intro-copy { font-size: 15px; }
  .screen-outline { height: 74px; }
  .auth-panel, .workspace-panel { padding: 22px 19px; }
  .account-head { flex-direction: column; gap: 18px; }
  .account-pair { align-self: flex-start; }
  .pair-notice { padding: 17px; }
  .pair-notice .button { flex: 1; }
  .device-list { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; gap: 8px; }
  .members-table-wrap { overflow: visible; }
  .members-table, .members-table tbody, .members-table tr, .members-table td { display: block; width: 100%; }
  .members-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .members-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; padding: 16px; border-bottom: 1px solid #303b47; }
  .members-table tr:last-child { border-bottom: 0; }
  .members-table td { padding: 0; border: 0; }
  .members-table td::before { display: block; margin-bottom: 5px; color: #b4c4d8; font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; content: attr(data-label); }
  .members-table td:nth-child(1), .members-table td:nth-child(2), .members-table td:nth-child(3) { grid-column: 1 / -1; }
  .members-table td:nth-child(5) { align-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
