:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f2f2f2;
    --head: #e6e6e6;
    --border: #b3b3b3;
    --border-strong: #666666;
    --text: #333333;
    --muted: #595959;
    --link: #00118f;
    --primary: #0017c1;
    --primary-text: #ffffff;
    --bar: #ffffff;
    --bar-text: #1a1a1a;
    --ok: #26663a;
    --warn: #7f5200;
    --danger: #a12626;
    --ok-bg: #e6f2e9;
    --warn-bg: #fbf1da;
    --danger-bg: #f8e4e4;
    --info-bg: #e8f1fe;
    --h: 2.25rem;
    --focus: #ffd43d;
    --focus-in: #000000;
    --visited: #7f1f8f;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #1a1a1a;
    --surface: #242424;
    --surface-2: #2e2e2e;
    --head: #333333;
    --border: #595959;
    --border-strong: #8f8f8f;
    --text: #f2f2f2;
    --muted: #b8b8b8;
    --link: #8fa8ff;
    --primary: #3d57e6;
    --bar: #242424;
    --bar-text: #f2f2f2;
    --ok: #7fd391;
    --warn: #f0c060;
    --danger: #ff8d8d;
    --ok-bg: #1f2b21;
    --warn-bg: #33291a;
    --danger-bg: #3a2121;
    --info-bg: #232a3d;
    --focus-in: #ffffff;
    --visited: #d3a8e8;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #1a1a1a;
        --surface: #242424;
        --surface-2: #2e2e2e;
        --head: #333333;
        --border: #595959;
        --border-strong: #8f8f8f;
        --text: #f2f2f2;
        --muted: #b8b8b8;
        --link: #8fa8ff;
        --primary: #3d57e6;
        --bar: #242424;
        --bar-text: #f2f2f2;
        --ok: #7fd391;
        --warn: #f0c060;
        --danger: #ff8d8d;
        --ok-bg: #1f2b21;
        --warn-bg: #33291a;
        --danger-bg: #3a2121;
        --info-bg: #232a3d;
        --focus-in: #ffffff;
        --visited: #d3a8e8;
        color-scheme: dark;
    }
}

* {
    box-sizing: border-box;
    border-radius: 0;
}

[hidden] {
    display: none !important;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
    line-height: 1.7;
    line-break: strict;
    word-break: auto-phrase;
    text-wrap: pretty;
}

a {
    color: var(--link);
    text-decoration: underline 1px;
    text-underline-offset: 3px;
}

a:visited {
    color: var(--visited);
}

a:active {
    color: #a64a00;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3rem;
    padding: 0 1rem;
    background: var(--bar);
    color: var(--bar-text);
    border-bottom: 1px solid var(--border-strong);
}

.site-header a,
.site-header a:visited {
    color: var(--bar-text);
}

.site-header .brand {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.site-header nav a {
    font-size: 0.9rem;
}

.site-notice {
    padding: 0.5rem 1rem;
    background: var(--warn-bg);
    border-bottom: 1px solid var(--warn);
}

.site-notice p {
    max-width: 46rem;
    margin: 0 auto;
}

.site-footer {
    max-width: 46rem;
    margin: 1.5rem auto 0;
    padding: 1rem 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.footer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.footer-bar small {
    color: var(--muted);
}

.footer-bar .theme {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.footer-bar label {
    margin: 0;
    font-weight: 400;
    font-size: 0.9rem;
}

.footer-bar select {
    width: auto;
}

.container {
    max-width: 46rem;
    margin: 0 auto;
    padding: 1rem;
}

.pagehead {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    margin: 0.5rem 0 1rem;
    padding: 0 0 0.3rem;
    border-bottom: 2px solid var(--primary);
}

.pagehead h1 {
    margin: 0;
    padding: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}

h2 {
    margin: 0 0 0.5rem;
    padding: 0.1rem 0 0.1rem 0.5rem;
    border-left: 4px solid var(--primary);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

p {
    margin: 0.4rem 0;
}

.muted,
.help {
    color: var(--muted);
}

.help {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
}

.error-text {
    margin: 0.25rem 0 0;
    color: var(--danger);
    font-size: 0.9rem;
}

.field {
    margin: 0.6rem 0;
}

.field > label {
    margin: 0 0 0.15rem;
}

.required,
.optional {
    margin-left: 0.5rem;
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 400;
}

.optional {
    color: var(--muted);
}

.support {
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border: 2px solid var(--danger);
}

.card {
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.8rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    min-width: 0;
}

.card > :last-child {
    margin-bottom: 0;
}

fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

legend {
    padding: 0;
    font-weight: 700;
}

label {
    display: block;
    margin: 0.5rem 0 0.15rem;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    max-width: 38rem;
    height: var(--h);
    padding: 0 0.45rem;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

input[type="file"] {
    display: block;
    width: 100%;
    max-width: 38rem;
    color: var(--text);
    font: inherit;
}

input[type="file"]::file-selector-button {
    height: var(--h);
    margin-right: 0.75rem;
    padding: 0 1.2rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background: var(--head);
    text-decoration: underline;
}

input[type="file"]::file-selector-button:active {
    background: var(--border);
}

select {
    height: var(--h);
    max-width: 100%;
    padding: 0 0.45rem;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

textarea {
    display: block;
    width: 100%;
    max-width: 38rem;
    padding: 0.4rem 0.45rem;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    resize: vertical;
}

.check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0;
    font-weight: 400;
}

.check input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    flex: none;
}

.form {
    display: grid;
    grid-template-columns: fit-content(16rem) minmax(0, 1fr);
    gap: 0.4rem 0.75rem;
    align-items: start;
}

.form > * {
    margin: 0;
}

.form > label {
    padding-top: 0.2rem;
}

.form > .help,
.form > .error-text,
.form > p,
.form > .row,
.form > div {
    grid-column: 2;
}

.form > fieldset,
.form > .check,
.form > .note,
.form > .flash,
.form > .actions {
    grid-column: 1 / -1;
}

:focus {
    outline: none;
}

a:focus-visible {
    outline: 4px solid var(--focus-in);
    outline-offset: 2px;
    background: var(--focus);
    color: #000000;
    box-shadow: 0 0 0 2px var(--focus);
    text-decoration: none;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--focus-in);
    outline-offset: -3px;
    box-shadow: inset 0 0 0 5px var(--focus);
    text-decoration: none;
}

.check input:focus-visible {
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--focus);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--h);
    padding: 0 1.2rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    background: var(--head);
    color: var(--text);
    text-decoration: underline;
}

.btn:active {
    background: var(--border);
}

.btn:disabled {
    color: var(--muted);
    background: var(--surface-2);
    border-style: dashed;
    cursor: not-allowed;
    text-decoration: none;
}

.btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-text);
    font-weight: 700;
}

.btn.primary:hover {
    background: var(--primary);
    color: var(--primary-text);
    filter: brightness(1.2);
}

.btn.primary:disabled {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--muted);
    filter: none;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-top: 0.75rem;
}

.flash {
    margin: 0 0 0.75rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border);
    border-left-width: 5px;
    background: var(--surface);
}

.flash.ok {
    border-left-color: var(--ok);
    background: var(--ok-bg);
}

.flash.error {
    border-left-color: var(--danger);
    background: var(--danger-bg);
}

.flash.warn {
    border-left-color: var(--warn);
    background: var(--warn-bg);
}

.flash p {
    margin: 0.25rem 0;
}

.busy {
    padding: 2rem 1rem;
    text-align: center;
}

.busy .actions {
    justify-content: center;
}

.busy-label {
    margin: 0 0 0.4rem;
    font-weight: 700;
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 1rem;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
    }
}

.note {
    margin: 0.4rem 0;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.note.danger {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.note p {
    margin: 0.25rem 0;
}

.note ul {
    margin: 0.25rem 0;
    padding-left: 1.2rem;
}

.grid {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    margin: 0 0 0.5rem;
    border-top: 1px solid var(--border);
}

.grid dt,
.grid dd {
    margin: 0;
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
}

.grid dt {
    background: var(--head);
    font-weight: 700;
    white-space: nowrap;
    border-right: 1px solid var(--border);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.step-nav {
    display: flex;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step-nav li {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    counter-increment: step;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
}

.step-nav li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0.85rem;
    left: calc(50% + 1.2rem);
    right: calc(-50% + 1.2rem);
    height: 2px;
    background: var(--border);
}

.step-nav li.done:not(:last-child)::after {
    background: var(--border-strong);
}

.step-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
}

.step-mark::before {
    content: counter(step);
}

.step-nav li.done .step-mark {
    background: var(--border-strong);
}

.step-nav li.done .step-mark::before {
    content: "";
    width: 0.35rem;
    height: 0.7rem;
    margin-top: -0.1rem;
    border: solid var(--bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.step-nav li.current {
    color: var(--text);
    font-weight: 700;
}

.step-nav li.current .step-mark {
    border-color: var(--text);
    background: var(--text);
    box-shadow: inset 0 0 0 3px var(--surface);
}

.step-nav li.current .step-mark::before {
    content: "";
}

.step-summary {
    display: none;
}

/* 幅が狭いと手順の名前が隣と重なる。印だけを並べ、今の手順の名前を1行で出す。 */
@media (max-width: 40rem) {
    .step-nav .step-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .step-nav {
        margin-bottom: 0.5rem;
    }

    .step-summary {
        display: block;
        margin: 0 0 1.25rem;
        color: var(--text);
        font-size: 0.9rem;
        font-weight: 700;
        text-align: center;
    }
}

h3 {
    margin: 0.9rem 0 0.3rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.doc {
    margin: 0 0 0.75rem;
}

.doc .article-title {
    margin: 1.4rem 0 0.4rem;
    padding: 0 0 0.2rem;
    border-left: 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    line-height: 1.5;
}

.doc ol,
.doc ul {
    margin: 0.3rem 0;
    padding-left: 1.6rem;
}

.doc li {
    margin: 0.2rem 0;
}

.doc .items {
    padding-left: 0.6rem;
    list-style: none;
    counter-reset: item;
}

.doc .items > li {
    counter-increment: item;
}

.doc .items > li::before {
    content: "（" counter(item) "）";
}

.doc .info {
    margin: 0.9rem 0;
}

.doc .info-title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.doc-date {
    margin: 1.2rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.doc-end {
    margin: 1.2rem 0 0.75rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    text-align: center;
    font-weight: 700;
}

.passkey-list,
.login-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.passkey-row,
.login-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem 1rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.passkey-row .issuer,
.login-row .issuer {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.passkey-row .account,
.login-row .account {
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 700px) {
    .passkey-row,
    .login-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.doc-state {
    margin-right: 0.75rem;
    color: var(--muted);
}

.doc-state.done {
    color: var(--ok);
    font-weight: 700;
}

/* 幅が狭いと文書の名前と読むボタンが横に並びきらず、枠の外へはみ出す。縦に並べる。 */
@media (max-width: 40rem) {
    .grid.documents {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid.documents dt {
        border-right: 0;
    }

    .grid.documents dd {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4rem 0.75rem;
    }

    .grid.documents .doc-state {
        margin-right: 0;
    }
}

.doc-dialog {
    width: min(48rem, calc(100vw - 1rem));
    max-width: none;
    height: calc(100vh - 1.5rem);
    height: calc(100dvh - 1.5rem);
    max-height: 56rem;
    margin: auto;
    padding: 0;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
}

.doc-dialog[open] {
    display: flex;
    flex-direction: column;
}

.doc-dialog::backdrop {
    background: rgb(0 0 0 / 0.55);
}

.dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border);
}

.dialog-head h2 {
    margin: 0;
}

.dialog-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.4rem 0.9rem 0.8rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dialog-body:focus-visible {
    outline: 3px solid var(--focus-in);
    outline-offset: -3px;
    box-shadow: inset 0 0 0 5px var(--focus);
}

.dialog-foot {
    padding: 0.5rem 0.8rem 0.7rem;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

.dialog-foot p {
    margin: 0.2rem 0;
}

.dialog-foot .actions {
    margin-top: 0.4rem;
}

body.modal-open {
    overflow: hidden;
}

.check:has(input:disabled) {
    color: var(--muted);
}

.check input:disabled {
    cursor: not-allowed;
}

.toc {
    margin: 0 0 1rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.toc ol {
    margin: 0.2rem 0;
    padding-left: 1.4rem;
}

.secret {
    margin: 0.3rem 0 0.6rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    line-height: 1.8;
    overflow-wrap: anywhere;
    user-select: all;
}

.print-only {
    display: none;
}

.search {
    max-width: 24rem;
}

.toolbar {
    position: relative;
}

.menu > summary {
    list-style: none;
}

.menu > summary::-webkit-details-marker {
    display: none;
}

.menu-chevron {
    width: 0.5rem;
    height: 0.5rem;
    margin: -0.2rem 0 0 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.menu[open] .menu-chevron {
    margin-top: 0.2rem;
    transform: rotate(-135deg);
}

.menu-list {
    position: absolute;
    top: calc(100% + 0.3rem);
    right: 0;
    left: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem;
    border: 1px solid var(--border-strong);
    background: var(--surface);
}

.list-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    align-items: flex-end;
}

.list-actions {
    margin-bottom: 0.4rem;
}

.list-actions .btn {
    padding: 0 0.75rem;
}

.code-group {
    margin: 0 0 0.6rem;
    border: 1px solid var(--border);
    background: var(--surface);
}

.code-group > summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    background: var(--surface-2);
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.code-group > summary::-webkit-details-marker {
    display: none;
}

.code-group > summary:hover {
    background: var(--head);
}

.group-chevron {
    flex: none;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.12s;
}

.code-group[open] > summary .group-chevron {
    transform: rotate(45deg);
}

.group-name {
    overflow-wrap: anywhere;
}

.group-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 400;
    white-space: nowrap;
}

.code-group > .code-list {
    border-top: 1px solid var(--border);
}

.code-group > .code-list > .code-row:last-child {
    border-bottom: 0;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.code-row .note-text {
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.trash-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.trash-row {
    display: flex;
    gap: 0.5rem 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.trash-row .issuer {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.trash-row .account,
.trash-row .when {
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.trash-row .when.soon {
    color: var(--danger);
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .group-chevron {
        transition: none;
    }
}

.code-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.code-row {
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) auto minmax(8.5rem, auto) auto;
    gap: 0.5rem 1rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.code-row .issuer {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.code-row .account {
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.code-button {
    height: 2.75rem;
    min-width: 9.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;
    font-size: 1.4rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.code-button:hover {
    background: var(--head);
}

.remaining {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.seconds {
    white-space: nowrap;
    min-width: 3.6rem;
}

progress.meter {
    width: 4rem;
    height: 0.6rem;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    appearance: none;
}

progress.meter::-webkit-progress-bar {
    background: var(--surface);
}

progress.meter::-webkit-progress-value {
    background: var(--primary);
}

progress.meter::-moz-progress-bar {
    background: var(--primary);
}

.code-row.soon .seconds {
    color: var(--danger);
    font-weight: 700;
}

.code-row.soon progress.meter::-webkit-progress-value {
    background: var(--danger);
}

.code-row.soon progress.meter::-moz-progress-bar {
    background: var(--danger);
}

@media print {
    body.prints-kit * {
        visibility: hidden;
    }

    .print-only,
    .print-only * {
        visibility: visible;
    }

    .print-only {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        margin: 0;
        color: #000000;
        font-family: ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;
        font-size: 12pt;
        line-height: 1.8;
        white-space: pre-wrap;
    }
}

@media (max-width: 700px) {
    .code-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .code-row .who {
        grid-column: 1 / -1;
    }

    .code-row > .row-actions {
        grid-column: 1 / -1;
    }

    .trash-row {
        flex-wrap: wrap;
    }

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

    .form > .help,
    .form > .error-text,
    .form > p,
    .form > .row,
    .form > div {
        grid-column: 1;
    }
}

.admin .container {
    max-width: 80rem;
}

.admin-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0 0 0.5rem;
    padding: 0;
    list-style: none;
}

.admin-nav a {
    display: inline-block;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

.admin-nav a[aria-current="page"] {
    font-weight: 700;
    border-bottom-color: var(--primary);
}

.table-wrap {
    margin: 0.5rem 0;
    overflow-x: auto;
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: var(--head);
    white-space: nowrap;
}

.data-table td {
    overflow-wrap: anywhere;
}

.inquiry-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.camera {
    display: block;
    width: 100%;
    max-width: 24rem;
    aspect-ratio: 4 / 3;
    margin: 0.5rem 0;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    object-fit: cover;
}

.import-list {
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.import-list li {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.import-list .check {
    margin: 0;
}

.import-list .meta {
    margin-left: 1.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.qr {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.75rem 0;
    border: 1px solid var(--border-strong);
    image-rendering: pixelated;
}

.passkey-names {
    margin: 0.3rem 0 0;
    padding-left: 1.2rem;
}
