@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-var.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-var.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --brand: #C9425E;
  --brand-hover: #B73752;
  --brand-soft: #F8E9EE;
  --on-brand: #FFFFFF;

  --page: #F4F6F8;
  --surface: #FFFFFF;
  --surface-subtle: #F7F8FA;
  --surface-active: #EEF1F4;
  --text: #171A1F;
  --muted: #68717D;
  --muted-2: #9098A3;
  --border: #DCE1E7;
  --border-strong: #C9D0D8;
  --success: #2F7A55;
  --danger: #C23B46;
  --backdrop: rgba(16, 18, 23, .52);

  --radius: 12px;
  --radius-sm: 9px;
  --shell: 1440px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --brand: #C9425E;
    --brand-hover: #D1516B;
    --brand-soft: #2B1A21;
    --on-brand: #FFFFFF;

    --page: #101217;
    --surface: #16191F;
    --surface-subtle: #1C2027;
    --surface-active: #232831;
    --text: #F5F7FA;
    --muted: #9CA4AF;
    --muted-2: #727B87;
    --border: #2A3038;
    --border-strong: #3A424C;
    --success: #67C793;
    --danger: #F07882;
    --backdrop: rgba(0, 0, 0, .68);

    color-scheme: dark;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  --brand: #C9425E;
  --brand-hover: #D1516B;
  --brand-soft: #2B1A21;
  --on-brand: #FFFFFF;

  --page: #101217;
  --surface: #16191F;
  --surface-subtle: #1C2027;
  --surface-active: #232831;
  --text: #F5F7FA;
  --muted: #9CA4AF;
  --muted-2: #727B87;
  --border: #2A3038;
  --border-strong: #3A424C;
  --success: #67C793;
  --danger: #F07882;
  --backdrop: rgba(0, 0, 0, .68);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  color: var(--text);
}

html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-variant-ligatures: none;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.shell {
  width: min(calc(100% - 32px), var(--shell));
  margin-inline: auto;
}

.hidden {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-small {
  width: 14px;
  height: 14px;
}

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
  transform: translateY(-1px);
  flex: 0 0 auto;
}

.brand-word {
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: -.03em;
  display: inline-flex;
  align-items: baseline;
}

.brand-dot,
.brand-accent {
  color: var(--brand);
}

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

.lang-switch {
  height: 34px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-subtle);
  display: inline-flex;
  align-items: center;
}

.lang-switch button {
  width: 34px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.lang-switch button:hover {
  color: var(--text);
}

.lang-switch button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}

.icon-button:hover {
  background: var(--surface-active);
  color: var(--text);
}

.header-restore {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}

.header-restore:hover {
  background: var(--surface-active);
  color: var(--text);
}

.boot-state {
  min-height: 180px;
  padding: 52px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
}

.boot-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.boot-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.boot-state.is-error .boot-spinner {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease;
}

.button:disabled {
  opacity: .56;
  cursor: wait;
}

.button-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}

.button-primary:hover:not(:disabled) {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
}

.button-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.button-primary.is-success {
  border-color: var(--success);
  background: var(--success);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  background: var(--surface-active);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button-quiet:hover:not(:disabled) {
  background: var(--surface-active);
  color: var(--text);
}

.button.full {
  width: 100%;
}

.inbox-shell {
  padding: 36px 0 64px;
}

.mailbox-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.mailbox-primary {
  padding: 24px;
}

.section-label {
  margin: 0;
}

.address-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.address-row code {
  min-width: 0;
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 30px;
  line-height: 1.18;
  font-weight: 650;
  letter-spacing: -.032em;
  font-variant-ligatures: normal;
  overflow-wrap: anywhere;
}

.copy-main {
  min-width: 124px;
}

.mailbox-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mailbox-meta strong {
  color: var(--text);
  font-weight: 500;
}

.meta-separator {
  color: var(--muted-2);
}

.status-active {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--success);
  font-weight: 500;
}

.mailbox-toolbar {
  min-height: 72px;
  padding: 14px 16px 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.password-tool {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-icon {
  color: var(--muted);
}

.password-copy {
  min-width: 0;
}

.tool-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  letter-spacing: .04em;
}

.password-copy code {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.password-copy code.is-note {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.password-note {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.45;
  max-width: 52ch;
}

.password-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.icon-only-tool {
  width: 36px;
  padding: 0;
  justify-content: center;
}

.tool-button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.tool-button:hover:not(:disabled) {
  background: var(--surface-active);
  color: var(--text);
}

.tool-button:disabled {
  opacity: .46;
  cursor: not-allowed;
}

.tool-button.is-success {
  color: var(--success);
}

.toolbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.latest-code-row {
  min-height: 46px;
  margin-top: 8px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.utility-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.utility-hint {
  display: none;
}

.latest-code-value {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--brand);
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}

.latest-code-value.has-code:hover {
  border-color: var(--border);
  background: var(--brand-soft);
}

.latest-code-value:disabled {
  opacity: 1;
  cursor: default;
}

.clipboard-fallback {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

.inbox-workspace {
  margin-top: 16px;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.inbox-workspace.is-empty {
  min-height: 360px;
  grid-template-columns: 1fr;
}

.inbox-workspace.is-empty .messages-pane {
  border-right: 0;
}

.inbox-workspace.is-empty .reader-pane {
  display: none;
}

.inbox-workspace.is-empty .state-box {
  min-height: 300px;
}

.messages-pane {
  min-width: 0;
  border-right: 1px solid var(--border);
}

.workspace-head {
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.workspace-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -.01em;
}

.message-count {
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.state-box,
.reader-empty {
  min-height: 360px;
  padding: 36px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.state-icon,
.reader-empty-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
}

.state-icon .icon,
.reader-empty-icon .icon {
  width: 24px;
  height: 24px;
}

.state-box strong,
.reader-empty strong {
  margin-top: 13px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.state-box p,
.reader-empty p {
  max-width: 300px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.message-list {
  display: flex;
  flex-direction: column;
}

.message-item {
  appearance: none;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  position: relative;
}

.message-item:hover {
  background: var(--surface-subtle);
}

.message-item.active {
  background: var(--surface-active);
}

.message-item.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--brand);
}

.message-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.message-from {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-time {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 10px;
}

.message-subject {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-preview {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-pane {
  min-width: 0;
}

.reader-empty {
  min-height: 498px;
}

.message-reader {
  padding: 24px;
}

.reader-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.reader-from {
  color: var(--muted);
  font-size: 12px;
}

.reader-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.02em;
}

.reader-time {
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
}

.code-strip {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.code-chip {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font: 600 13px "IBM Plex Mono", monospace;
  cursor: pointer;
}

.code-chip:hover {
  border-color: var(--brand);
}

.message-reader pre {
  margin: 20px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font: 400 14px/1.7 "IBM Plex Sans", system-ui, sans-serif;
}

.reader-links {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reader-links a {
  color: var(--brand);
  font-size: 12px;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dialog {
  width: min(calc(100% - 28px), 440px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
}

.dialog::backdrop {
  background: var(--backdrop);
}

.dialog-card {
  padding: 24px;
}

.compact-dialog {
  padding-bottom: 20px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dialog-head h2 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.02em;
}

.dialog-close {
  flex: 0 0 auto;
  margin-top: -6px;
  margin-right: -6px;
}

.dialog-copy {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dialog-card label {
  display: block;
  margin-top: 16px;
}

.dialog-card label > span {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.dialog-card input {
  width: 100%;
  height: 44px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--page);
  color: var(--text);
  outline: none;
}

.dialog-card input::placeholder {
  color: var(--muted-2);
}

.dialog-card .full {
  margin-top: 18px;
}

.dialog-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.form-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: min(90vw, 440px);
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 24px), var(--shell));
  }

  .site-header {
    min-height: 64px;
    gap: 8px;
  }

  .brand-mark {
    width: 29px;
    height: 29px;
  }

  .brand-word {
    font-size: 17px;
  }

  .header-actions {
    gap: 4px;
  }

  .lang-switch {
    height: 32px;
  }

  .lang-switch button {
    width: 30px;
    height: 26px;
    font-size: 10px;
  }

  .header-restore {
    padding-inline: 7px;
    font-size: 12px;
  }

  .inbox-shell {
    padding: 24px 0 48px;
  }

  .mailbox-primary {
    padding: 20px;
  }

  .address-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .address-row code {
    font-size: 22px;
    line-height: 1.3;
  }

  .copy-main {
    width: 100%;
    min-height: 44px;
  }

  .mailbox-toolbar {
    padding: 14px 16px;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .password-tool {
    width: 100%;
  }

  .password-copy {
    flex: 1 1 auto;
  }

  .password-actions {
    flex: 0 0 auto;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar-actions .button {
    min-height: 44px;
    padding-inline: 10px;
  }

  .latest-code-row {
    min-height: 64px;
    padding: 12px 2px;
    gap: 14px;
  }

  .latest-code-value {
    flex: 0 0 auto;
  }

  .inbox-workspace {
    margin-top: 12px;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .messages-pane {
    border-right: 0;
  }

  .reader-pane {
    border-top: 1px solid var(--border);
  }

  .state-box {
    min-height: 260px;
  }

  .reader-empty {
    min-height: 220px;
  }

  .message-reader {
    padding: 20px;
  }

  .reader-head {
    flex-direction: column;
    gap: 8px;
  }

  .reader-time {
    white-space: normal;
  }

  .dialog-card {
    padding: 20px;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .button {
    min-height: 44px;
    width: 100%;
  }
}

@media (max-width: 390px) {
  .header-restore span {
    display: none;
  }

  .header-restore {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .lang-switch button {
    width: 28px;
  }

  .mailbox-meta {
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* IR-33 account/auth UI */

.header-account {
  min-height: 40px;
  max-width: 220px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color .14s ease,
    border-color .14s ease,
    color .14s ease;
}

.header-account:hover {
  background: var(--surface-active);
  border-color: var(--border-strong);
}

.account-header-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--muted-2);
}

.header-account.is-authenticated .account-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 15%, transparent);
}

.account-dialog-card {
  width: min(100%, 450px);
}

.account-telegram-button {
  margin-top: 2px;
}

.account-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-status.is-error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
}

.account-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted-2);
  font-size: 12px;
}

.account-divider::before,
.account-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.account-email-form {
  display: grid;
  gap: 14px;
}

.account-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.account-signed-in {
  display: grid;
  gap: 18px;
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
}

.account-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
}

.account-avatar-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--brand);
}

.account-summary-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-summary-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.account-summary-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-linked {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .header-account {
    max-width: 130px;
    padding-inline: 9px;
  }
}

@media (max-width: 560px) {
  .header-inbox-open {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .header-inbox-open span {
    display: none;
  }

  .header-account {
    max-width: 108px;
  }

  .account-form-actions {
    grid-template-columns: 1fr;
  }
}

/* IR-35 Plus account foundation */
.account-plan-card {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(127, 127, 127, 0.22);
  border-radius: 16px;
  background: rgba(127, 127, 127, 0.055);
}

.account-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-plan-label {
  font-size: 13px;
  opacity: 0.68;
}

.account-plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.account-plan-badge.is-plus {
  border-color: rgba(239, 112, 96, 0.42);
  background: rgba(239, 112, 96, 0.12);
}

.account-plan-note {
  margin: 10px 0 14px;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.72;
}

.account-feature-list {
  display: grid;
  gap: 10px;
}

.account-feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 14px;
}

.account-feature-row strong {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.58;
}

.account-feature-row strong.is-enabled {
  opacity: 1;
}

/* IR-37: public customer support contact */
.ir-support-link {
  position: fixed;
  right: 16px;
  bottom: 12px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--muted, #68717D);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.ir-support-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ir-support-link:hover,
.ir-support-link:focus-visible {
  color: var(--brand, #C9425E);
  text-decoration: underline;
}

.ir-support-link:focus-visible {
  outline: 2px solid var(--brand, #C9425E);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .ir-support-link {
    right: 12px;
    bottom: 8px;
  }
}


/* IR-35 premium domain picker */
.account-feature-action {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.account-feature-action:disabled {
  cursor: default;
}

.account-feature-action.is-enabled {
  cursor: pointer;
}

.account-feature-action.is-enabled:hover strong,
.account-feature-action.is-enabled:focus-visible strong {
  opacity: 1;
}

.account-feature-action:focus-visible {
  outline: 2px solid var(--brand, #C9425E);
  outline-offset: 4px;
  border-radius: 6px;
}

.premium-domain-dialog-card {
  width: min(440px, calc(100vw - 32px));
}

.premium-domain-state {
  margin: 12px 0 0;
  color: var(--muted, #68717D);
  font-size: 13px;
  line-height: 1.45;
}

.premium-domain-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.premium-domain-option {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(127, 127, 127, 0.22);
  border-radius: 10px;
  background: rgba(127, 127, 127, 0.055);
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.premium-domain-option:hover,
.premium-domain-option:focus-visible {
  border-color: var(--brand, #C9425E);
}

.premium-domain-option:focus-visible {
  outline: 2px solid var(--brand, #C9425E);
  outline-offset: 2px;
}

.premium-domain-option:disabled {
  cursor: default;
  opacity: 0.62;
}

/* IR-35 Plus reclaim UI */
.reclaim-dialog-card {
  width: min(440px, calc(100vw - 32px));
}

.reclaim-state {
  margin: 12px 0 0;
  color: var(--muted, #68717D);
  font-size: 13px;
  line-height: 1.45;
}

.reclaim-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.reclaim-option {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(127, 127, 127, 0.22);
  border-radius: 10px;
  background: rgba(127, 127, 127, 0.055);
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.reclaim-option:hover,
.reclaim-option:focus-visible {
  border-color: var(--brand, #C9425E);
}

.reclaim-option:focus-visible {
  outline: 2px solid var(--brand, #C9425E);
  outline-offset: 2px;
}

.reclaim-option:disabled {
  cursor: default;
  opacity: 0.62;
}

/* IR-38 public Plus moderation storefront */
.header-plus {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(201, 66, 94, 0.34);
  border-radius: 10px;
  background: rgba(201, 66, 94, 0.08);
  color: var(--text, inherit);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.header-plus:hover,
.header-plus:focus-visible {
  border-color: var(--brand, #C9425E);
  background: rgba(201, 66, 94, 0.13);
}

.header-plus:focus-visible {
  outline: 2px solid var(--brand, #C9425E);
  outline-offset: 2px;
}

.header-plus-mark {
  color: var(--brand, #C9425E);
  font-size: 18px;
  line-height: 1;
}

#plusDialog.dialog {
  width: min(780px, calc(100vw - 32px));
  max-width: min(780px, calc(100vw - 32px));
  overflow: hidden;
}

.plus-storefront-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-height: min(88vh, 920px);
  overflow-x: hidden;
  overflow-y: auto;
}

.plus-storefront-head {
  align-items: flex-start;
}

.plus-title-line {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.plus-title-line h2 {
  margin: 0;
}

.plus-beta-badge,
.plus-preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(201, 66, 94, 0.28);
  border-radius: 999px;
  background: rgba(201, 66, 94, 0.08);
  color: var(--brand, #C9425E);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plus-tagline {
  margin: 6px 0 0;
  color: var(--muted, #68717D);
  font-size: 14px;
}

.plus-compare-grid,
.plus-pricing-grid,
.plus-terms-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.plus-compare-grid > *,
.plus-pricing-grid > *,
.plus-terms-grid > *,
.plus-preview-panel,
.plus-pricing-section,
.plus-section-head,
.plus-section-head > div,
.plus-payment-panel,
.plus-storefront-footer {
  min-width: 0;
}

.plus-tier-card,
.plus-price-card,
.plus-preview-panel,
.plus-payment-panel,
.plus-terms-grid > div {
  border: 1px solid rgba(127, 127, 127, 0.18);
  border-radius: 14px;
  background: rgba(127, 127, 127, 0.045);
}

.plus-tier-card,
.plus-price-card,
.plus-terms-grid > div {
  padding: 16px;
}

.plus-tier-card.is-plus,
.plus-price-card.is-featured {
  border-color: rgba(201, 66, 94, 0.36);
  background: rgba(201, 66, 94, 0.055);
}

.plus-tier-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.plus-tier-head strong {
  font-size: 17px;
}

.plus-tier-head span {
  color: var(--brand, #C9425E);
  font-size: 13px;
  font-weight: 700;
}

.plus-tier-card p,
.plus-section-head p,
.plus-terms-grid p {
  margin: 8px 0 0;
  color: var(--muted, #68717D);
  font-size: 13px;
  line-height: 1.5;
}

.plus-feature-list {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.plus-feature-list li {
  position: relative;
  padding-left: 19px;
  font-size: 13px;
  line-height: 1.4;
}

.plus-feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand, #C9425E);
  font-weight: 800;
}

.plus-preview-panel {
  margin-top: 12px;
  padding: 16px;
}

.plus-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.plus-section-head > div > strong {
  font-size: 14px;
}

.plus-preview-domains {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.plus-preview-domains > span {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(127, 127, 127, 0.16);
  border-radius: 10px;
  background: rgba(127, 127, 127, 0.04);
}

.plus-preview-domains code {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.plus-preview-domains small {
  color: var(--muted, #68717D);
  font-size: 10px;
  text-transform: uppercase;
}

.plus-pricing-section {
  margin-top: 18px;
}

.plus-price-card {
  display: grid;
  gap: 10px;
}

.plus-pass-name {
  font-size: 13px;
  font-weight: 700;
}

.plus-price {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.plus-price-note {
  color: var(--muted, #68717D);
  font-size: 12px;
}

.plus-pay-button {
  margin-top: 4px;
}

.plus-payment-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 14px 16px;
}

.plus-payment-panel > div {
  display: grid;
  gap: 3px;
  flex: 0 0 auto;
}

.plus-payment-label {
  color: var(--muted, #68717D);
  font-size: 11px;
}

.plus-payment-panel strong {
  font-size: 13px;
}

.plus-payment-state {
  max-width: 470px;
  margin: 0;
  color: var(--muted, #68717D);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.plus-terms-grid strong {
  font-size: 13px;
}

.plus-storefront-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(127, 127, 127, 0.15);
  color: var(--muted, #68717D);
  font-size: 12px;
}

.plus-storefront-footer a {
  color: var(--brand, #C9425E);
  font-weight: 700;
  text-decoration: none;
}

.plus-storefront-footer a:hover,
.plus-storefront-footer a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .plus-compare-grid,
  .plus-pricing-grid,
  .plus-terms-grid {
    grid-template-columns: 1fr;
  }

  .plus-preview-domains {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plus-payment-panel,
  .plus-storefront-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .plus-payment-state {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .header-plus {
    width: 38px;
    padding: 0;
  }

  .header-plus > span:last-child {
    display: none;
  }

  .plus-storefront-card {
    width: min(100%, calc(100vw - 20px));
  }

  .plus-preview-domains {
    grid-template-columns: 1fr;
  }
}


/* IR-44 Domain Network storefront V2 */

.network-storefront-card {
  width: min(1080px, calc(100vw - 32px));
}

.network-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.network-grid .plus-tier-card {
  min-width: 0;
}

.network-intro,
.network-operation,
.network-note {
  margin-bottom: 16px;
}

.network-operation {
  margin-top: 16px;
}

.network-guardrail {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.network-guardrail strong {
  display: block;
  margin-bottom: 6px;
}

.network-guardrail p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.network-footer {
  gap: 16px;
}

.header-network-open {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .network-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .network-storefront-card {
    width: min(100%, calc(100vw - 16px));
  }

  .header-network-open {
    padding-inline: 8px;
  }
}


/* IR-44 Domain Network visual fix V3 */

/*
 * The generic dialog/storefront styles have a narrower inherited
 * max-width. Domain Network needs desktop room for three equal cards.
 */
#networkDialog {
  width: auto;
  max-width: none;
}

#networkDialog .network-storefront-card {
  width: min(1080px, calc(100vw - 48px));
  max-width: min(1080px, calc(100vw - 48px));
}

#networkDialog .network-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

#networkDialog .network-grid .plus-tier-card {
  min-width: 0;
}

@media (max-width: 980px) {
  #networkDialog .network-storefront-card {
    width: min(720px, calc(100vw - 32px));
    max-width: min(720px, calc(100vw - 32px));
  }

  #networkDialog .network-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  #networkDialog .network-storefront-card {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }
}

/* IR-44 Domain Network visual fix V4 */

/*
 * Match the proven Plus modal model:
 * size the dialog shell itself, then let the inner storefront fill it.
 */
#networkDialog.dialog {
  width: min(1080px, calc(100vw - 48px));
  max-width: min(1080px, calc(100vw - 48px));
  overflow: hidden;
}

#networkDialog.dialog .network-storefront-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#networkDialog.dialog .network-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

@media (max-width: 980px) {
  #networkDialog.dialog {
    width: min(720px, calc(100vw - 32px));
    max-width: min(720px, calc(100vw - 32px));
  }

  #networkDialog.dialog .network-storefront-card {
    width: 100%;
    max-width: 100%;
  }

  #networkDialog.dialog .network-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  #networkDialog.dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }
}


/* IR-44 Request access UI V6 */

#networkRequestDialog.dialog {
  width: min(580px, calc(100vw - 32px));
  max-width: min(580px, calc(100vw - 32px));
  overflow: hidden;
}

.network-request-card {
  max-height: min(88vh, 900px);
  overflow-x: hidden;
  overflow-y: auto;
}

.network-request-field {
  display: block;
  margin-top: 16px;
}

.network-request-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.network-request-card select,
.network-request-card textarea,
.network-request-card input[type="text"],
.network-request-card input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  outline: none;
}

.network-request-card select,
.network-request-card input[type="text"],
.network-request-card input[type="number"] {
  height: 44px;
  padding: 0 12px;
}

.network-request-card textarea {
  min-height: 105px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.45;
}

.network-request-card select:focus,
.network-request-card textarea:focus,
.network-request-card input[type="text"]:focus,
.network-request-card input[type="number"]:focus {
  border-color: var(--brand);
}

.network-request-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.network-request-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.network-request-check,
.network-request-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.network-request-check {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.network-request-consent {
  margin-top: 17px;
}

.network-request-check input,
.network-request-consent input {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  margin: 2px 0 0 !important;
  padding: 0 !important;
}

#networkRequestError {
  margin-top: 14px;
}

.network-request-success {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.network-request-success strong {
  display: block;
  color: var(--text);
}

.network-request-success p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  #networkRequestDialog.dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .network-request-checks {
    grid-template-columns: 1fr;
  }
}


/* IR-44 Network self-serve storefront V7 */

#networkDialog.dialog {
  width: min(920px, calc(100vw - 32px));
  max-width: min(920px, calc(100vw - 32px));
}

.network-shop-card {
  padding: 22px;
}

.network-shop-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.network-shop-title-row h2 {
  margin: 0;
}

.network-prelaunch-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.network-shop-subtitle {
  margin-top: 7px;
}

.network-shop-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.network-shop-plan {
  position: relative;
  display: block;
  cursor: pointer;
}

.network-shop-plan > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.network-shop-plan-body {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.network-shop-plan-body strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.network-shop-plan-body > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.network-shop-plan:hover .network-shop-plan-body {
  border-color: var(--brand);
}

.network-shop-plan > input:checked
+ .network-shop-plan-body {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.network-shop-plan > input:focus-visible
+ .network-shop-plan-body {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.network-shop-order {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.network-shop-order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.network-shop-field > span,
.network-shop-price > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.network-shop-field input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
}

.network-shop-field input:focus {
  border-color: var(--brand);
}

.network-shop-field small,
.network-shop-price small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.network-shop-price strong {
  display: block;
  min-height: 42px;
  color: var(--text);
  font-size: 24px;
  line-height: 42px;
}

.network-shop-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
}

.network-shop-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  opacity: .6;
}

.network-shop-buy {
  width: 100%;
  margin-top: 14px;
}

.network-shop-custom {
  display: block;
  margin: 12px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.network-shop-custom:hover {
  color: var(--text);
}

@media (max-width: 760px) {
  #networkDialog.dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .network-shop-plans {
    grid-template-columns: 1fr;
  }

  .network-shop-plan-body {
    min-height: auto;
  }

  .network-shop-order-grid {
    grid-template-columns: 1fr;
  }
}


/* IR-44 concise storefront V8 */

/* Domain Network */

#networkDialog.dialog {
  width: min(820px, calc(100vw - 32px));
  max-width: min(820px, calc(100vw - 32px));
}

.network-shop-card {
  padding: 22px;
}

.network-shop-subtitle {
  margin-top: 7px;
}

.network-shop-plans {
  gap: 12px;
  margin-top: 20px;
}

.network-shop-plan-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  row-gap: 8px;
  min-height: 92px;
  padding: 15px;
}

.network-shop-plan-body strong {
  display: block !important;
  width: 100%;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.network-shop-plan-body small {
  display: block !important;
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.network-shop-order {
  margin-top: 14px;
}

.network-shop-order-grid {
  align-items: start;
}

.network-shop-buy {
  margin-top: 16px;
}


/* Plus */

#plusDialog.dialog {
  width: min(680px, calc(100vw - 32px));
  max-width: min(680px, calc(100vw - 32px));
}

.plus-compact-card {
  width: 100%;
  box-sizing: border-box;
  padding: 22px;
}

.plus-compact-tagline {
  margin-top: 7px;
}

.plus-compact-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.plus-compact-features > span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
}

.plus-compact-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.plus-compact-plan {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.plus-compact-plan.is-featured {
  border-color: var(--brand);
}

.plus-compact-plan .plus-pass-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.plus-compact-plan .plus-price {
  margin-top: 10px;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.plus-compact-plan .plus-pay-button {
  margin-top: 18px;
}

.plus-compact-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.plus-compact-card .plus-payment-state {
  margin: 12px 0 0;
  text-align: center;
}

@media (max-width: 760px) {
  #networkDialog.dialog,
  #plusDialog.dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .network-shop-plans,
  .plus-compact-pricing {
    grid-template-columns: 1fr;
  }

  .network-shop-plan-body {
    min-height: auto;
  }
}


/* IR-44 quantitative storefront V9 */

.network-shop-plan-body {
  min-height: 126px;
}

.network-plan-number {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.network-plan-number b {
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.network-plan-number span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.plus-quant-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 18px;
}

.plus-quant-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.plus-quant-item strong {
  color: var(--text);
  font-size: 21px;
  line-height: 1;
}

.plus-quant-item span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.plus-compact-plan .plus-pass-name {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.plus-compact-plan .plus-pass-name strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.plus-compact-plan .plus-pass-name span {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 760px) {
  .plus-quant-grid {
    grid-template-columns: 1fr 1fr;
  }

  .network-shop-plan-body {
    min-height: auto;
  }
}

@media (max-width: 420px) {
  .plus-quant-grid {
    grid-template-columns: 1fr;
  }
}


/* IR-44 Cabinet V10 */
.account-dialog-card{width:min(760px,calc(100vw - 32px));max-width:760px}
.account-signed-in:not(.hidden){display:grid;gap:12px}
.cabinet-card{padding:16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface)}
.cabinet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.cabinet-head>div{min-width:0;display:grid;gap:4px}.cabinet-head span,.cabinet-note,.cabinet-metrics span,.cabinet-network span{color:var(--muted);font-size:12px}.cabinet-head strong{overflow-wrap:anywhere}
.cabinet-metrics{margin-top:14px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.cabinet-metrics>div,.cabinet-network>div{min-width:0;padding:10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-subtle);display:grid;gap:5px}
.cabinet-code{display:block;max-width:100%;margin-top:10px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-subtle);overflow-x:auto;white-space:nowrap;font-family:"IBM Plex Mono",monospace;font-size:12px}.cabinet-separator{height:1px;margin:14px 0;background:var(--border)}
.cabinet-key{display:grid;gap:8px;margin-top:10px}.cabinet-key p{margin:0;color:var(--muted);font-size:12px}.cabinet-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.cabinet-note{margin:8px 0 0}.cabinet-network{margin-top:14px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
@media(max-width:760px){.account-dialog-card{width:min(100%,calc(100vw - 20px))}.cabinet-metrics,.cabinet-network{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.cabinet-head{display:grid}.cabinet-metrics,.cabinet-network{grid-template-columns:1fr}.cabinet-actions{display:grid}.cabinet-actions .button{width:100%}}

/* IR-44 Cabinet V10.1 layout fix */

/*
 * Account dialog is shared by signed-out and signed-in states.
 * Keep the compact auth dialog, but widen it only while the
 * authenticated cabinet is visible.
 */
#accountDialog {
  overflow-x: hidden;
}

#accountDialog:has(.account-signed-in:not(.hidden)) {
  width: min(780px, calc(100vw - 32px));
  max-width: min(780px, calc(100vw - 32px));
}

#accountDialog:has(.account-signed-in:not(.hidden))
  .account-dialog-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

#accountDialog .account-signed-in,
#accountDialog .cabinet-card,
#accountDialog .cabinet-card-head,
#accountDialog .cabinet-access-block,
#accountDialog .cabinet-key-reveal,
#accountDialog .cabinet-metrics,
#accountDialog .cabinet-network-grid {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#accountDialog .account-signed-in {
  overflow-x: hidden;
}

#accountDialog .cabinet-code {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#accountDialog .cabinet-metrics {
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
}

#accountDialog .cabinet-network-grid {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
}

#accountDialog .cabinet-metrics > div,
#accountDialog .cabinet-network-grid > div {
  min-width: 0;
  overflow: hidden;
}

#accountDialog .cabinet-metrics span,
#accountDialog .cabinet-network-grid span,
#accountDialog .cabinet-metrics strong,
#accountDialog .cabinet-network-grid strong {
  overflow-wrap: anywhere;
}

@media (max-width: 780px) {
  #accountDialog:has(.account-signed-in:not(.hidden)) {
    width: min(100%, calc(100vw - 20px));
    max-width: min(100%, calc(100vw - 20px));
  }

  #accountDialog .cabinet-metrics {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  #accountDialog .cabinet-network-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  #accountDialog .cabinet-metrics,
  #accountDialog .cabinet-network-grid {
    grid-template-columns: 1fr;
  }
}
