body:has(.dm-access) { --wrap: 72rem; }
.dm-access { --dm-line: var(--border, #343630); font-size: .95rem; }
.dm-access *, .dm-access *::before, .dm-access *::after { box-sizing: border-box; }
.dm-access [hidden] { display: none !important; }
.dm-access p, .dm-access h2 { margin: 0; }
.dm-access h2 { font-size: 1.4rem; line-height: 1.4; }
.dm-muted, .dm-id, .dm-hint, .dm-footnote { color: var(--text-dim, #a4a59a); }
.dm-muted { font-size: .85rem; }
.dm-id { display: block; font-size: .78rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dm-status { font-size: .85rem; margin-bottom: .8rem !important; }
.dm-status:empty { display: none; }
.dm-access button, .dm-button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.5rem; padding: .55rem .9rem; font: inherit; font-size: .86rem; font-weight: 600; line-height: 1.3; border: 1px solid var(--dm-line); border-radius: 8px; color: inherit; background: var(--bg-raised, #20211e); cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s; white-space: nowrap; }
.dm-access button:hover:not(:disabled), .dm-button:hover { border-color: var(--accent, #94d8bd); background: var(--accent-bg, #263b31); }
.dm-access button:active:not(:disabled), .dm-button:active { transform: translateY(1px); background: var(--code-bg, #202722); }
.dm-access button:disabled { cursor: default; opacity: .45; transform: none; }
.dm-access :focus-visible { outline: 2px solid var(--accent, #94d8bd); outline-offset: 3px; }
.dm-access .dm-primary { background: var(--accent, #94d8bd); color: var(--on-accent, #1a3024); border-color: transparent; }
.dm-access .dm-primary:hover:not(:disabled) { background: var(--accent, #94d8bd); filter: brightness(1.08); }
.dm-access .dm-primary:active:not(:disabled) { filter: brightness(.9); }
.dm-access .dm-quiet { background: transparent; }
.dm-access .dm-danger { color: #f18d82; background: transparent; }
.dm-access input:not([type=checkbox]) { width: 100%; min-width: 0; font: inherit; font-size: .9rem; padding: .65rem .8rem; color: inherit; background: var(--bg, #171816); border: 1px solid var(--dm-line); border-radius: 8px; }
.dm-access input::placeholder { color: var(--text-dim); opacity: .8; }
.dm-access input[type=checkbox] { accent-color: var(--accent, #94d8bd); width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.dm-access label { cursor: pointer; }
.dm-access .dm-login { display: grid; gap: 1rem; padding: 2rem; border: 1px solid var(--dm-line); border-radius: 14px; max-width: 38rem; }
.dm-login .dm-button { justify-self: start; }
.dm-account { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--dm-line); border-radius: 12px; background: var(--bg-raised); }
.dm-avatar { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; flex-shrink: 0; background: var(--accent-bg); color: var(--accent); border-radius: 50%; font-size: 1.15rem; font-weight: 700; }
.dm-account-copy { flex: 1; min-width: 0; }
.dm-account-copy .dm-muted { margin-top: .35rem; }
.dm-name-line { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; overflow-wrap: anywhere; }
.dm-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .73rem; line-height: 1.2; font-weight: 600; padding: .35rem .5rem; border-radius: 5px; white-space: nowrap; background: var(--code-bg); color: var(--text-dim); }
.dm-active { color: var(--accent); background: var(--accent-bg); }
.dm-pending { color: var(--accent); background: var(--accent-bg); }
.dm-expired, .dm-disabled, .dm-unrequested, .dm-rejected { color: var(--text-dim); background: var(--code-bg); }
.dm-master-badge { color: var(--accent); background: var(--accent-bg); }
.dm-device { margin-top: 1rem; padding: 1.25rem; border: 1px solid var(--accent); border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.dm-account-actions { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; flex: none; }
#dm-request-status { margin-top: .4rem; font-size: .85rem; }
#dm-request-status:empty { display: none; }
#dm-request-status[data-error=true] { color: #f18d82; }
.dm-review-info { font-size: .8rem; padding: .85rem; margin-top: .8rem !important; background: var(--accent-bg); color: var(--accent); border-radius: 8px; }
.dm-request-date { display: block; margin-top: .35rem; font-size: .68rem; color: var(--text-dim); }
.dm-device h2 { font-size: 1rem; }
.dm-device p { font-size: .85rem; color: var(--text-dim); }
#dm-device-status:empty { display: none; }
#dm-device-status { flex-basis: 100%; }
.dm-admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 1.4rem; }
.dm-eyebrow { color: var(--accent); font-size: .65rem; font-weight: 700; letter-spacing: .14em; margin-bottom: .35rem !important; }
.dm-admin-heading .dm-muted { margin-top: .4rem; }
.dm-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.dm-summary > div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1.15rem 1.4rem; border: 1px solid var(--dm-line); border-radius: 12px; background: var(--bg-raised); }
.dm-summary span { font-size: .85rem; color: var(--text-dim); }
.dm-summary strong { font-size: 1.75rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.dm-master { display: flex; align-items: center; gap: .9rem; padding: 1.15rem 1.4rem; margin-bottom: 1.25rem; border: 1px solid var(--dm-line); border-left: 3px solid var(--accent); border-radius: 10px; }
.dm-master-symbol { display: grid; place-items: center; height: 2.4rem; width: 2.4rem; background: var(--accent-bg); color: var(--accent); border-radius: 9px; font-family: Georgia, serif; font-weight: 700; }
.dm-master-copy { flex: 1; min-width: 0; }
.dm-master-lock { text-align: right; font-size: .8rem; flex-shrink: 0; }
.dm-master-lock strong { display: block; font-weight: 500; }
.dm-master-lock span { color: var(--text-dim); font-size: .73rem; }
.dm-panel { border: 1px solid var(--dm-line); border-radius: 12px; background: var(--bg-raised); overflow: hidden; }
.dm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; }
.dm-filters { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.dm-access .dm-filters button { border: 1px solid transparent; background: transparent; padding: .45rem .65rem; min-height: 2.3rem; color: var(--text-dim); font-size: .8rem; }
.dm-access .dm-filters [aria-pressed=true] { background: var(--accent-bg); color: var(--accent); }
.dm-search { width: 15rem; max-width: 100%; }
.dm-access .dm-search input { font-size: .8rem; }
.dm-list-status { padding: 0 1.25rem .75rem; font-size: .8rem; color: var(--text-dim); }
.dm-list-status:empty { display: none; }
.dm-list-status[data-error=true], .dm-editor-status[data-error=true] { color: #f18d82; }
.dm-access .dm-table { display: table; margin: 0; width: 100%; border: 0; border-collapse: collapse; font-size: .83rem; }
.dm-access .dm-table th { padding: .7rem 1.25rem; text-align: left; font-size: .73rem; font-weight: 500; color: var(--text-dim); background: var(--code-bg); border: 0; border-top: 1px solid var(--dm-line); border-bottom: 1px solid var(--dm-line); white-space: nowrap; }
.dm-access .dm-table td { padding: 1rem 1.25rem; border: 0; border-bottom: 1px solid var(--dm-line); background: transparent; vertical-align: middle; }
.dm-access .dm-table tbody tr:last-child td { border-bottom: 0; }
.dm-table td:first-child { min-width: 12rem; max-width: 18rem; overflow-wrap: anywhere; }
.dm-table td:last-child { text-align: right; }
.dm-table strong { display: block; font-weight: 600; margin-bottom: .15rem; }
.dm-table .dm-id { font-size: .7rem; }
.dm-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.dm-chip { font-size: .72rem; padding: .2rem .4rem; border: 1px solid var(--dm-line); border-radius: 4px; white-space: nowrap; }
.dm-date { display: block; white-space: nowrap; font-size: .78rem; font-variant-numeric: tabular-nums; }
.dm-empty { padding: 3rem 1.5rem; text-align: center; }
.dm-empty strong { display: block; margin-bottom: .5rem; font-weight: 600; }
.dm-list-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1.25rem; border-top: 1px solid var(--dm-line); }
.dm-list-footer .dm-muted { font-size: .75rem; }
.dm-actions { display: flex; align-items: center; gap: .5rem; }
.dm-footnote { font-size: .76rem; margin-top: .8rem !important; }
#dm-dialog { width: min(42rem, calc(100vw - 2rem)); max-height: 90dvh; padding: 1.5rem; border: 1px solid var(--dm-line); border-radius: 16px; background: var(--bg-raised, #20211e); color: var(--text, #eeeae0); box-shadow: 0 20px 70px #0005; overflow: auto; }
#dm-dialog::backdrop { background: #0008; }
.dm-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dm-access .dm-icon-button { padding: .25rem; height: 2.25rem; min-height: 0; width: 2.25rem; font-size: 1.5rem; font-weight: 400; background: transparent; border-color: transparent; }
#dm-find { margin-top: 1.5rem; }
#dm-find label { font-size: .85rem; font-weight: 600; }
.dm-find-row { display: flex; gap: .5rem; margin: .5rem 0; }
#dm-find .dm-muted { font-size: .75rem; }
.dm-editor-status { font-size: .85rem; margin-top: 1rem !important; }
.dm-editor-status:empty { display: none; }
.dm-editor-account { padding: 1rem; background: var(--code-bg); border-radius: 8px; margin-top: 1rem; overflow-wrap: anywhere; }
.dm-editor-account strong { display: block; }
.dm-access #dm-fields { padding: 0; border: 0; margin: 0; min-width: 0; }
.dm-enable { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--dm-line); }
.dm-enable strong { display: block; font-size: .9rem; }
.dm-enable small, .dm-form-grid small { display: block; color: var(--text-dim); font-size: .75rem; margin-top: .3rem; font-weight: 400; }
.dm-access .dm-enable input { appearance: none; width: 2.6rem; height: 1.45rem; padding: .15rem; border-radius: 1rem; background: var(--text-dim); cursor: pointer; }
.dm-enable input::before { content: ''; display: block; height: 1.15rem; width: 1.15rem; border-radius: 50%; background: var(--bg-raised, #20211e); transition: transform .12s; }
.dm-access .dm-enable input:checked { background: var(--accent); }
.dm-enable input:checked::before { transform: translateX(1.15rem); }
.dm-section-label { display: flex; justify-content: space-between; gap: .5rem; margin: 1.2rem 0 .75rem; font-size: .85rem; }
.dm-section-label .dm-muted { font-size: .75rem; }
#dm-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.dm-feature { display: flex; align-items: center; gap: .65rem; padding: .75rem; border: 1px solid var(--dm-line); border-radius: 8px; font-size: .85rem; }
.dm-feature:has(input:checked) { background: var(--accent-bg); border-color: var(--accent); }
.dm-feature small { margin-left: auto; color: var(--text-dim); font-size: .65rem; }
.dm-hint { font-size: .74rem; margin-top: .6rem !important; }
.dm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0 1rem; }
.dm-form-grid label { font-size: .8rem; font-weight: 600; }
.dm-form-grid input { display: block; margin-top: .5rem; }
.dm-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--dm-line); }
.dm-access .dm-dialog-footer button { font-size: .8rem; }
.dm-remove-section { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--dm-line); }
.dm-remove-section strong { font-size: .8rem; font-weight: 600; }
.dm-remove-section p { margin-top: .2rem; font-size: .74rem; color: var(--text-dim); }
.dm-access .dm-remove-section button { font-size: .8rem; }
.dm-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 48rem) {
  .dm-summary { gap: .6rem; }
  .dm-summary > div { flex-direction: column; align-items: flex-start; gap: .8rem; padding: 1rem; }
  .dm-access .dm-table, .dm-access .dm-table tbody { display: block; }
  .dm-access .dm-table thead { display: none; }
  .dm-access .dm-table tr { display: block; padding: 1rem 1.25rem; border-top: 1px solid var(--dm-line); }
  .dm-access .dm-table td, .dm-access .dm-table tbody tr:last-child td { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; border: 0; padding: .3rem 0; min-width: 0; max-width: none; }
  .dm-access .dm-table td:first-child { display: block; margin-bottom: .5rem; }
  .dm-access .dm-table td:last-child { justify-content: flex-end; }
  .dm-table td[data-label]::before { content: attr(data-label); color: var(--text-dim); flex-shrink: 0; font-size: .75rem; }
  .dm-chips { justify-content: flex-end; }
  .dm-search { flex: 1; min-width: 12rem; }
}
@media (max-width: 36rem) {
  .site-header .header-inner { height: auto; min-height: 3.5rem; flex-wrap: wrap; gap: .7rem; padding-top: .8rem; padding-bottom: .8rem; }
  .site-header .nav { flex-wrap: wrap; gap: .7rem 1rem; }
  .dm-access { overflow-wrap: anywhere; }
  .dm-account { padding: 1rem; gap: .7rem; flex-wrap: wrap; }
  .dm-account-copy { flex-basis: 100%; }
  .dm-account-actions { margin-left: auto; width: 100%; }
  .dm-avatar { display: none; }
  .dm-admin-heading { align-items: flex-start; flex-direction: column; }
  .dm-summary span { font-size: .72rem; }
  .dm-summary strong { font-size: 1.5rem; }
  .dm-master { padding: 1rem; }
  .dm-master-symbol { display: none; }
  #dm-dialog { padding: 1.1rem; }
  .dm-form-grid { grid-template-columns: 1fr; }
  .dm-dialog-footer { flex-wrap: wrap; }
  .dm-dialog-footer .dm-actions { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .dm-access *, .dm-access *::before { transition: none !important; } }
