/* Quirna console — tokens and layout lifted from the Claude Design canvas
   "Quirna Desktop.dc.html". Light values are the canvas's own; dark
   values mirror apps/mobile/src/theme/tokens.ts so both clients agree. */

:root,
[data-theme="light"] {
  --paper: #f6f4f0;
  --paper-rgb: 246, 244, 240;
  --card: #ffffff;
  --solid: #16130f;
  --on-solid: #f6f4f0;
  --ink-rgb: 22, 19, 15;
  --ink: rgb(22, 19, 15);
  --ok: #1f5c46;
  --ok-soft: #7fbf9e;
  --bad: #8e2b1c;
  --crit: #b4331f;
  --warn: #9a6816;
  --crit-bg: rgba(180, 51, 31, 0.07);
  --knob: #ffffff;
  --shadow-rgb: 22, 19, 15;
}

[data-theme="dark"] {
  --paper: #141312;
  --paper-rgb: 20, 19, 18;
  --card: #1d1b19;
  --solid: #f2efea;
  --on-solid: #141312;
  --ink-rgb: 242, 239, 234;
  --ink: rgb(242, 239, 234);
  --ok: #7fbf9e;
  --ok-soft: #7fbf9e;
  --bad: #e08d7c;
  --crit: #e88f7b;
  --warn: #d9ac63;
  --crit-bg: rgba(232, 143, 123, 0.12);
  --knob: #f2efea;
  --shadow-rgb: 0, 0, 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 13px;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input {
  border: 0;
  outline: 0;
  background: transparent;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.hidden {
  display: none !important;
}

@keyframes ck-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ck-rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ------------------------------------------------------------ frame */

.frame {
  position: relative;
  min-height: 100vh;
  display: flex;
  background: var(--paper);
}

/* ---------------------------------------------------------- sidebar */

.side {
  width: 220px;
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 18px;
  border-right: 1px solid rgba(var(--ink-rgb), 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 24px;
}

.mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--solid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.mark::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1.8px solid var(--on-solid);
}

.mark.lg {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.mark.lg::after {
  width: 12px;
  height: 12px;
  border-radius: 3.5px;
  border-width: 2px;
}

.brand-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: left;
  width: 100%;
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.6);
}

.nav-item.is-active {
  background: rgba(var(--ink-rgb), 0.06);
  color: var(--ink);
}

.nav-item span {
  flex: 1;
  min-width: 0;
}

.nav-count {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 11.5px;
  color: rgba(var(--ink-rgb), 0.32);
}

.acct {
  margin-top: auto;
  position: relative;
}

.acct-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border-radius: 11px;
  text-align: left;
}

.acct-btn.is-open {
  background: rgba(var(--ink-rgb), 0.06);
}

.avatar {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: var(--solid);
  color: var(--on-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 10.5px;
  line-height: 1;
}

.acct-name {
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acct-org {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(var(--ink-rgb), 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acct-caret {
  flex: none;
  font-size: 10px;
  color: rgba(var(--ink-rgb), 0.4);
}

.acct-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 48px;
  z-index: 12;
  padding: 6px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  box-shadow: 0 18px 36px -18px rgba(var(--shadow-rgb), 0.4);
  animation: ck-fade 0.12s both;
}

.acct-menu-head {
  padding: 9px 11px 10px;
}

.acct-menu-head .n {
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.acct-menu-head .e {
  margin-top: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(var(--ink-rgb), 0.42);
  overflow-wrap: anywhere;
}

.menu-sep {
  height: 1px;
  margin: 2px 0 4px;
  background: rgba(var(--ink-rgb), 0.08);
}

.menu-item {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border-radius: 9px;
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1;
  color: var(--ink);
}

.menu-item:hover {
  background: rgba(var(--ink-rgb), 0.05);
}

.menu-item.danger {
  color: var(--bad);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 8;
}

/* ------------------------------------------------------------- main */

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.head {
  flex: none;
  padding: 26px 30px 18px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
}

.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.title {
  font-weight: 600;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.sub {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(var(--ink-rgb), 0.48);
}

.btn-solid {
  flex: none;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--solid);
  color: var(--on-solid);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1;
}

.btn-solid:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-danger {
  background: var(--bad);
  color: #f6f4f0;
}

.btn-ghost {
  flex: none;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.6);
}

.tools {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.seg {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(var(--ink-rgb), 0.05);
}

.seg button {
  padding: 8px 14px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.5);
}

.seg button.is-active {
  background: var(--card);
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), 0.12);
  color: var(--ink);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 250px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.1);
}

.search::before,
.picker-search::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--ink-rgb), 0.3);
}

.search input {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1;
}

.count {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 11.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.4);
}

.content {
  flex: 1;
  min-height: 0;
  padding: 16px 30px 34px;
}

/* ------------------------------------------------------------ table */

.table {
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.09);
}

.thead {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: 15px 15px 0 0;
  background: rgba(var(--ink-rgb), 0.02);
}

.th {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--ink-rgb), 0.38);
}

.tr {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.06);
  cursor: pointer;
}

.tr:last-child {
  border-bottom: 0;
}

.tr:hover {
  background: rgba(var(--ink-rgb), 0.015);
}

.tr.is-open {
  z-index: 10;
}

.td {
  min-width: 0;
}

.right {
  text-align: right;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.tag {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  background: rgba(var(--ink-rgb), 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.6);
}

.tag.round {
  border-radius: 50%;
}

.name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-sub {
  margin-top: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(var(--ink-rgb), 0.42);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text {
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(var(--ink-rgb), 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mono-cell {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(var(--ink-rgb), 0.5);
}

.dot-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.35;
}

.key-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dot-cell > span:last-child,
.dot-cell > .dot-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-action {
  flex: none;
  font-size: 11px;
  font-weight: 500;
  color: rgba(var(--ink-rgb), 0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.key-action:hover {
  color: var(--ink);
}

.dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(var(--ink-rgb), 0.05);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.6);
}

.req {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.req-line {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.req-prefix {
  flex: none;
  width: 15px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--ink-rgb), 0.34);
}

.req-plus {
  font-size: 11px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.3);
}

.req-part {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(var(--ink-rgb), 0.05);
}

.req-part b {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 10.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.75);
}

.req-part span {
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.6);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.more {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(var(--ink-rgb), 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
  color: rgba(var(--ink-rgb), 0.5);
}

.more i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.row-menu {
  position: absolute;
  right: 18px;
  top: 44px;
  z-index: 9;
  width: 176px;
  padding: 6px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  box-shadow: 0 18px 36px -18px rgba(var(--shadow-rgb), 0.4);
  animation: ck-fade 0.12s both;
}

.row-menu.up {
  top: auto;
  bottom: 44px;
}

.empty {
  padding: 60px 0;
  text-align: center;
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.4;
  color: rgba(var(--ink-rgb), 0.45);
}

.c-ok {
  color: var(--ok);
}

.c-warn {
  color: var(--warn);
}

.c-crit {
  color: var(--crit);
}

.c-muted {
  color: rgba(var(--ink-rgb), 0.45);
}

.c-muted .dot {
  background: rgba(var(--ink-rgb), 0.25);
}

.c-body {
  color: rgba(var(--ink-rgb), 0.7);
}

.c-body .dot {
  background: var(--ok);
}

/* --------------------------------------------------------- settings */

.settings {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.sgroup {
  display: grid;
  grid-template-columns: minmax(150px, 204px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.sgroup-label {
  position: sticky;
  top: 0;
  padding-top: 15px;
}

.sgroup-label .l {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.sgroup-label .d {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(var(--ink-rgb), 0.42);
  text-wrap: pretty;
}

.scard {
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.09);
  overflow: hidden;
}

.srow {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.06);
}

.srow:last-child {
  border-bottom: 0;
}

.srow-text {
  min-width: 0;
  flex: 1;
}

.srow-text .l {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}

.srow-text .n {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(var(--ink-rgb), 0.48);
  text-wrap: pretty;
}

.svalue {
  flex: none;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.3;
  color: rgba(var(--ink-rgb), 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy {
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(var(--ink-rgb), 0.05);
  font-family: "Instrument Sans", sans-serif;
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.6);
}

.toggle {
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 14px;
  padding: 3px;
  background: rgba(var(--ink-rgb), 0.16);
  transition: background 0.18s ease;
}

.toggle.on {
  background: var(--ok);
}

.toggle:disabled {
  cursor: default;
  opacity: 0.6;
}

.toggle i {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--knob);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transform: translateX(0);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toggle.on i {
  transform: translateX(18px);
}

.choices {
  flex: none;
  display: flex;
  gap: 6px;
}

.choice {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.5);
}

.choice.is-active {
  background: rgba(var(--ink-rgb), 0.07);
  border-color: rgba(var(--ink-rgb), 0.2);
  color: var(--ink);
}

.choice:disabled {
  cursor: default;
}

/* ------------------------------------------------------------ modal */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(14, 12, 10, 0.42);
  backdrop-filter: blur(4px);
  animation: ck-fade 0.16s both;
  overflow-y: auto;
  padding: 76px 20px 40px;
}

.overlay.confirm {
  z-index: 65;
  padding-top: 180px;
}

.overlay-bg {
  position: absolute;
  inset: 0;
}

.modal {
  position: relative;
  width: 560px;
  max-width: 100%;
  max-height: calc(100vh - 116px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  box-shadow: 0 40px 80px -28px rgba(var(--shadow-rgb), 0.5);
  animation: ck-rise 0.22s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.modal.w520 {
  width: 520px;
}

.modal.w640 {
  width: 640px;
}

.modal-head {
  flex: none;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
}

.modal-title {
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.modal-sub {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(var(--ink-rgb), 0.5);
}

.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-top: 1px solid rgba(var(--ink-rgb), 0.08);
}

.modal-note {
  min-width: 0;
  flex: 1;
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(var(--ink-rgb), 0.42);
}

.field-label {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.field-label .l {
  font-weight: 600;
  font-size: 11.5px;
  line-height: 1;
}

.field-label .h {
  font-size: 11.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.42);
}

.input {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
}

.input input {
  width: 100%;
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.3;
}

.input input.mono {
  font-size: 13px;
}

.input input:disabled {
  color: rgba(var(--ink-rgb), 0.5);
}

.input input::placeholder,
.search input::placeholder,
.picker-search input::placeholder,
.login-input input::placeholder {
  color: rgba(var(--ink-rgb), 0.35);
}

.select {
  position: relative;
  margin-top: 8px;
}

.select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  text-align: left;
}

.select-btn.is-open {
  border-color: rgba(var(--ink-rgb), 0.24);
}

.select-btn .v {
  min-width: 0;
  flex: 1;
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.3;
}

.select-btn .c {
  flex: none;
  font-size: 11px;
  color: rgba(var(--ink-rgb), 0.4);
}

.dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 52px;
  z-index: 5;
  padding: 6px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  box-shadow: 0 18px 36px -18px rgba(var(--shadow-rgb), 0.4);
  animation: ck-fade 0.12s both;
  max-height: 240px;
  overflow-y: auto;
}

.option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 9px;
  text-align: left;
}

.option.is-active {
  background: rgba(var(--ink-rgb), 0.06);
}

.option:hover {
  background: rgba(var(--ink-rgb), 0.04);
}

.option .v {
  min-width: 0;
  flex: 1;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.3;
}

.option .m {
  flex: none;
  font-size: 11.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.4);
}

.picker {
  margin-top: 8px;
}

.picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pchip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(var(--ink-rgb), 0.06);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1;
}

.pchip span {
  font-size: 12px;
  color: rgba(var(--ink-rgb), 0.42);
}

.dashed {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(var(--ink-rgb), 0.22);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.55);
}

.picker-panel {
  margin-top: 8px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  overflow: hidden;
  animation: ck-fade 0.12s both;
}

.picker-panel.float {
  position: absolute;
  left: 34px;
  top: 44px;
  z-index: 6;
  width: 300px;
  margin: 0;
  box-shadow: 0 18px 36px -18px rgba(var(--shadow-rgb), 0.4);
}

.picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
}

.picker-search input {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1;
}

.picker-list {
  max-height: 168px;
  overflow-y: auto;
  padding: 4px;
}

.check {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 5px;
  border: 1.5px solid rgba(var(--ink-rgb), 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 9px;
  line-height: 1;
  color: var(--ok);
}

.check.on {
  border-color: var(--ok);
  background: rgba(31, 92, 70, 0.1);
}

.no-match {
  padding: 16px 11px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(var(--ink-rgb), 0.42);
}

.rule {
  margin-top: 8px;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.rule .input {
  margin-top: 0;
  flex: 1;
  min-width: 0;
}

.rule .input.short {
  flex: none;
  width: 140px;
}

.rule .input input {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
}

.ops {
  flex: none;
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(var(--ink-rgb), 0.05);
}

.ops button {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 9px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.45);
}

.ops button.is-active {
  background: var(--card);
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), 0.12);
  color: var(--ink);
}

.quorum {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path {
  border-radius: 14px;
  background: rgba(var(--ink-rgb), 0.035);
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  padding: 12px 13px 13px;
}

.path-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.path-label {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--ink-rgb), 0.45);
}

.path-remove {
  margin-left: auto;
  font-weight: 500;
  font-size: 11.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.4);
}

.path-lines {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.joiner {
  flex: none;
  width: 26px;
  text-align: right;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--ink-rgb), 0.4);
}

.stepper {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(var(--ink-rgb), 0.07);
}

.stepper button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.55);
}

.stepper b {
  width: 26px;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
}

.of {
  flex: none;
  font-size: 12.5px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.42);
}

.line-group {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.3;
}

.line-x {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.4);
}

.path-add {
  position: relative;
}

.path-add .dashed {
  margin-left: 34px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 11px;
}

.quorum > .dashed {
  width: fit-content;
  padding: 9px 13px;
  border-radius: 11px;
}

.preview {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(var(--ink-rgb), 0.04);
}

.preview .l {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--ink-rgb), 0.38);
}

.preview .t {
  margin-top: 9px;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.55;
  text-wrap: pretty;
}

.secret {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.4;
  word-break: break-all;
  user-select: all;
}

/* ---------------------------------------------------------- confirm */

.confirm-card {
  position: relative;
  width: 436px;
  max-width: 100%;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  box-shadow: 0 40px 80px -28px rgba(var(--shadow-rgb), 0.5);
  animation: ck-rise 0.2s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.confirm-body {
  padding: 22px 24px 18px;
}

.confirm-title {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.confirm-text {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(var(--ink-rgb), 0.55);
  text-wrap: pretty;
}

.confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 22px;
}

/* ------------------------------------------------------------ toast */

.toast-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 80;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  border-radius: 13px;
  background: var(--solid);
  color: var(--on-solid);
  box-shadow: 0 20px 40px -18px rgba(var(--shadow-rgb), 0.6);
  pointer-events: auto;
  animation: ck-rise 0.24s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
}

.toast .tick {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--ok-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  color: var(--ok-soft);
}

.toast.error .tick {
  border-color: #e88f7b;
  color: #e88f7b;
}

/* ------------------------------------------------------------ login */

.login {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  background: var(--paper);
}

.login-left {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: radial-gradient(
    120% 90% at 30% 0%,
    rgba(var(--ink-rgb), 0.045) 0%,
    rgba(var(--ink-rgb), 0) 60%
  );
}

.login-card {
  width: 404px;
  max-width: 100%;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.015em;
}

.login-headline {
  margin-top: 44px;
  font-weight: 600;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.login-sub {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(var(--ink-rgb), 0.5);
  text-wrap: pretty;
  min-height: 20px;
}

.google-btn-slot {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  min-height: 40px;
}

.login-divider {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: rgba(var(--ink-rgb), 0.4);
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(var(--ink-rgb), 0.12);
}

.login-form {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.login-input {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
}

.login-input input,
.login-input select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.3;
}

.login-input select {
  font-family: "Instrument Sans", sans-serif;
  appearance: none;
}

.login-cta {
  width: 100%;
  text-align: center;
  padding: 16px 0;
  border-radius: 14px;
  background: var(--solid);
  color: var(--on-solid);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
}

.login-cta:disabled {
  opacity: 0.6;
  cursor: default;
}

.login-error {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--bad);
}

.login-back {
  margin-top: 22px;
  width: 100%;
  text-align: center;
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  color: rgba(var(--ink-rgb), 0.55);
}

.login-right {
  width: 452px;
  flex: none;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 48px 44px;
  background: #16130f;
  overflow: hidden;
}

.login-right::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(rgba(246, 244, 240, 1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 244, 240, 1) 1px, transparent 1px);
  background-size: 28px 28px;
}

.login-right > * {
  position: relative;
}

.pitch {
  font-weight: 600;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #f6f4f0;
  text-wrap: pretty;
}

.pitch-sub {
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(246, 244, 240, 0.62);
  text-wrap: pretty;
}

.sample {
  padding: 20px 22px;
  border-radius: 16px;
  background: rgba(246, 244, 240, 0.05);
  border: 1px solid rgba(246, 244, 240, 0.1);
}

.sample-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sample-top .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e88f7b;
}

.sample-top .t {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #e88f7b;
}

.sample-top .x {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  color: rgba(246, 244, 240, 0.4);
}

.sample-title {
  margin-top: 12px;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f6f4f0;
}

.sample-sub {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(246, 244, 240, 0.5);
}

.sample-sep {
  margin-top: 16px;
  height: 1px;
  background: rgba(246, 244, 240, 0.1);
}

.sample-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  color: rgba(246, 244, 240, 0.72);
}

.sample-row + .sample-row {
  margin-top: 10px;
  color: rgba(246, 244, 240, 0.45);
}

.sample-row .ring {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1.4px solid rgba(246, 244, 240, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 9px;
  line-height: 1;
}

.sample-row .ring.done {
  border-color: #7fbf9e;
  color: #7fbf9e;
}

@media (max-width: 980px) {
  .login-right {
    display: none;
  }
}

@media (max-width: 860px) {
  .side {
    width: 180px;
  }
  .sgroup {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
