:root {
    color-scheme: light;
    --primary: #007aff;
    --primary-text: #ffffff;
    --accent: #006adf;
    --accent-dark: #006adf;
    --ink: #242932;
    --muted: #697280;
    --line: #e5e9ef;
    --danger: #b23939;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f8f9fb;
    --field: #ffffff;
    --header: #ffffff;
    --hover: #f8f9fb;
    --label: #697280;
    --tint: #ecf4ff;
    --amber: #fff3d7;
    --note: #826018;
    --success-bg: #ecf4ff;
    --success: #267452;
    --danger-bg: #fff1f1;
    --focus: #ecf4ff;
    --radius: 16px;
    --qa-content-max: 1180px;
    --qa-sidebar: 184px;
    --qa-header-min: 70px;
    --qa-page-y: 30px;
    --qa-page-x: 28px;
    --qa-gap: 12px;
    --qa-section-gap: 24px;
    --qa-control: 40px;
    --qa-field-size: var(--qa-control);
    --qa-field-font: 13px;
    --qa-control-radius: 9px;
    --qa-card-radius: 16px;
    --qa-panel-pad: 20px;
    --qa-body: 14px;
    --qa-h1: 28px;
    --qa-lead: 13px;
    --qa-code-min: 310px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
    color-scheme: dark;
    --accent: #8bbcff;
    --accent-dark: #8bbcff;
    --ink: #e5e9f0;
    --muted: #a2acbb;
    --line: #363d49;
    --danger: #ffadad;
    --bg: #191c23;
    --surface: #191c23;
    --surface-soft: #20242d;
    --field: #191c23;
    --header: #191c23;
    --hover: #20242d;
    --label: #a2acbb;
    --tint: #263955;
    --amber: #403620;
    --note: #f1ce84;
    --success-bg: #263955;
    --success: #89d0ae;
    --danger-bg: #422d31;
    --focus: #263955;
}

* { box-sizing: border-box; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--bg);
    font-size: var(--qa-body);
    line-height: 1.5;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; }
button:disabled { opacity: .5; cursor: default; }

:focus-visible {
    outline: 3px solid var(--qa-focus-ring, rgb(0 122 255 / 25%));
    outline-offset: 2px;
}

:is(.dashboard, .feedback-dialog) :where(
    select, input:not([type]), input[type="text"], input[type="search"],
    input[type="number"], input[type="email"], input[type="url"], input[type="tel"], input[type="password"]
) {
    min-width: 0;
    max-width: 100%;
    --qa-field-min-height: var(--qa-field-size);
    height: var(--qa-field-size);
    min-height: var(--qa-field-min-height);
    padding: calc((var(--qa-field-size) - 22px) / 2) 12px;
    border: 1px solid var(--line);
    border-radius: var(--qa-control-radius);
    color: var(--ink);
    background-color: var(--field);
    font-size: var(--qa-field-font);
    line-height: 20px;
    --qa-focus-ring: var(--accent);
}

:is(.dashboard, .feedback-dialog) select {
    -webkit-appearance: none;
    appearance: none;
    padding-inline-end: 34px;
    background-image:
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: right 17px center, right 12px center;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    text-overflow: ellipsis;
}

@media (forced-colors: active) {
    :is(.dashboard, .feedback-dialog) select {
        -webkit-appearance: auto;
        appearance: auto;
        padding-inline-end: 12px;
        background-image: none;
    }
}

.site-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--qa-header-min);
    padding: 17px 24px;
    gap: var(--qa-gap);
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    background: var(--header);
    backdrop-filter: blur(18px);
}

.site-footer {
    padding: 14px var(--qa-page-x);
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: var(--surface);
    font-size: var(--qa-lead);
    text-align: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -.5px;
    text-decoration: none;
}

.brand:hover { color: var(--ink); }
.brand-mark, .account-logo {
    display: grid;
    place-items: center;
    color: var(--bg);
    background: var(--ink);
    border-radius: 10px;
}
.brand-mark { width: 33px; height: 33px; }
.brand-mark svg { width: 16px; height: 16px; }
.brand-mark path, .account-logo path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-actions, .profile-link { display: flex; align-items: center; }
.profile-link { gap: 9px; color: var(--ink); text-decoration: none; }
.profile-link:hover { color: var(--ink); }
.avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #62aaff, #7468e8);
    font-size: 13px;
    font-weight: 700;
}
.profile-copy { display: grid; line-height: 1.25; }
.profile-copy strong { max-width: 240px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 11px; }

.account-page {
    min-height: calc(100vh - 65px);
    padding: 52px 24px 72px;
    background: radial-gradient(ellipse at 50% 0%, var(--tint) 0, var(--bg) 64%);
}
.account-panel {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}
.account-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 22px;
    border-radius: 16px;
}
.account-logo svg { width: 16px; height: 16px; }
.account-panel h1 {
    margin: 0 0 10px;
    text-align: center;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -.8px;
}
.account-panel h2 { margin: 24px 0 10px; font-size: 18px; }
.account-panel > p, .account-panel form + p { color: var(--muted); text-align: center; }
.account-panel .auth-intro {
    max-width: 300px;
    margin: 0 auto 24px;
    font-size: 13px;
}
.account-panel .auth-note {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.account-panel form { display: grid; gap: 14px; margin-top: 24px; }
.account-panel form p { display: grid; gap: 7px; margin: 0; }
.account-panel .form-field { display: grid; gap: 7px; }
.account-panel form p:has(> input[type="checkbox"]),
.account-panel form p:has(> input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: 9px;
}
.account-panel label { color: var(--label); font-size: 12px; font-weight: 400; }
.account-panel input[type="checkbox"],
.account-panel input[type="radio"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--primary);
}
.account-panel .checkbox-field {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 9px;
    cursor: pointer;
}
.account-panel input:not([type="checkbox"]):not([type="radio"]),
.account-panel select,
.account-panel textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--field);
    box-shadow: 0 1px 2px rgb(0 0 0 / 3%);
    font-size: 13px;
}
.account-panel input:focus, .account-panel select:focus, .account-panel textarea:focus {
    border-color: var(--accent);
    outline: 3px solid rgb(0 122 255 / 12%);
}
.account-panel button {
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--primary);
    font-weight: 500;
    cursor: pointer;
}
.account-panel button:hover { background: var(--primary); filter: brightness(.96); }
.account-panel form a { font-size: 13px; }
.auth-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
    font-size: 13px;
}
.auth-links a { text-decoration: none; }
.account-panel ul { padding-left: 20px; }
.account-panel .helptext { color: var(--muted); font-size: 12px; }
.account-panel .password-help {
    color: var(--muted);
    font-size: 12px;
}
.account-panel .password-help ul { margin: 0; }
.account-panel .password-help:empty { display: none; }
.account-panel .errorlist { margin: 0; color: var(--danger); font-size: 12px; }
.account-panel table { width: 100%; border-collapse: collapse; }
.account-panel th, .account-panel td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.account-panel th { color: var(--muted); font-size: 12px; }
.messages { margin-bottom: 18px; }
.message {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--success);
    background: var(--success-bg);
    font-size: 13px;
}
.message.error { color: var(--danger); background: var(--danger-bg); }

.workspace {
    display: grid;
    flex: 1;
    grid-template-columns: var(--qa-sidebar) minmax(0, 1fr);
}
.sidebar { padding: 24px 10px; border-right: 1px solid var(--line); background: var(--surface-soft); }
.sidebar nav { display: flex; min-height: 100%; flex-direction: column; gap: 6px; }
.nav-heading { margin: 16px 12px 6px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 12px 10px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    font-size: 13px;
    line-height: 20px;
    text-align: left;
    text-decoration: none;
}
.nav-item:hover { background: var(--surface-soft); }
.nav-item.active { color: var(--accent); background: var(--tint); }
.nav-item svg,
.tool-icon svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-item[aria-disabled="true"]:disabled { color: var(--muted); background: transparent; opacity: .7; cursor: default; }
@media (forced-colors: active) {
    .nav-item[aria-disabled="true"]:disabled { color: GrayText; opacity: 1; }
}
.sidebar form { margin: 0; }
.sidefoot { display: grid; gap: 5px; margin-top: auto; padding-top: 23px; }
.dashboard { width: 100%; min-width: 0; max-width: var(--qa-content-max); margin: 0; padding: var(--qa-page-y) var(--qa-page-x); justify-self: start; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 11px; line-height: 16px; font-weight: 400; letter-spacing: 1.5px; }
.dashboard h1 { margin: 0; font-size: var(--qa-h1); font-weight: 500; line-height: 1.3; letter-spacing: -.8px; }
.lead { max-width: 520px; margin: 9px 0 0; color: var(--muted); font-size: var(--qa-lead); line-height: 1.5; }
.tool-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: var(--qa-section-gap) 0 var(--qa-gap); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tool-tabs button { min-height: var(--qa-control); padding: 9px 12px; border: 1px solid transparent; border-radius: var(--qa-control-radius); color: var(--muted); background: transparent; font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
.tool-tabs button[aria-selected="true"], .tool-tabs button[aria-pressed="true"] { color: var(--accent); background: var(--tint); }
.tool-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--qa-gap); margin-top: var(--qa-section-gap); }
.section-title { grid-column: 1 / -1; margin: 0 0 4px; font-size: 17px; letter-spacing: -.3px; }
.tool-card { display: flex; min-width: 0; min-height: 210px; flex-direction: column; align-items: flex-start; padding: var(--qa-panel-pad); border: 1px solid var(--line); border-radius: var(--qa-card-radius); background: var(--surface); }
.tool-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 500; letter-spacing: -.3px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.tool-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 15px; border-radius: 12px; color: var(--accent); background: var(--tint); }
.tool-icon svg { width: 18px; height: 18px; }
.tool-icon.violet { color: var(--accent); background: var(--tint); }
.tool-icon.amber { color: var(--note); background: var(--amber); }
.tool-icon.rose { color: var(--accent); background: var(--tint); }
.tool-icon.green { color: var(--success); background: var(--tint); }
.tool-action { display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 16px; color: var(--accent); font-size: 12px; text-decoration: none; }
.tool-action svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.recent-section { margin-top: var(--qa-section-gap); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.section-head span { color: var(--accent); font-size: 12px; }
.empty-materials { padding: 22px; border: 1px solid var(--line); border-radius: var(--qa-card-radius); color: var(--muted); background: var(--surface); font-size: 12px; text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.profile-page .messages { margin-top: 24px; }
.profile-card { max-width: 840px; margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.profile-card h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; overflow-wrap: anywhere; }
.profile-summary { display: flex; align-items: center; gap: 15px; margin-bottom: 23px; }
.profile-summary .avatar { width: 52px; height: 52px; flex: 0 0 52px; font-size: 19px; }
.profile-summary p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.profile-card dl { margin: 0; }
.profile-card dl > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; }
.profile-card dt { color: var(--muted); }
.profile-card dd { margin: 0; overflow-wrap: anywhere; }
.profile-form { display: grid; gap: 10px; margin-top: 20px; }
.profile-form label { color: var(--muted); font-size: 13px; }
.profile-form input { width: 100%; min-width: 0; min-height: var(--qa-control); padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--qa-control-radius); background: var(--surface); color: var(--ink); font-size: 13px; line-height: 20px; }
.profile-form input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.profile-form button { justify-self: start; min-height: var(--qa-control); padding: 9px 12px; border: 0; border-radius: var(--qa-control-radius); background: var(--primary); color: #fff; font-size: 12px; line-height: 20px; cursor: pointer; }
.profile-form button:hover { background: var(--primary); filter: brightness(.96); }
.profile-form .errorlist { margin: 0; padding-left: 20px; color: var(--danger); font-size: 13px; }
.profile-actions { display: grid; gap: 6px; margin-top: 16px; }

.account-manage .messages { margin-top: 0; }
.manage-card { max-width: 840px; margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.manage-card h1 { margin: 0 0 10px; font-size: var(--qa-h1); line-height: 1.3; font-weight: 500; letter-spacing: -.8px; }
.manage-card h2 { margin: 28px 0 10px; font-size: 16px; line-height: 24px; font-weight: 500; }
.manage-card > p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.manage-card form { display: grid; gap: 14px; margin-top: 20px; }
.manage-card form p { display: grid; gap: 7px; margin: 0; }
.manage-card form p:has(> input[type="radio"]),
.manage-card form p:has(> input[type="checkbox"]) {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}
.manage-card label { color: var(--label); font-size: 12px; }
.manage-card input[type="radio"],
.manage-card input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); }
.manage-card input:not([type="radio"]):not([type="checkbox"]),
.manage-card select,
.manage-card textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--field);
    box-shadow: 0 1px 2px rgb(0 0 0 / 3%);
    font-size: 13px;
}
.manage-card input:focus, .manage-card select:focus, .manage-card textarea:focus {
    border-color: var(--accent);
    outline: 3px solid rgb(0 122 255 / 12%);
}
.manage-card button {
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--primary);
    font-weight: 500;
    cursor: pointer;
}
.manage-card button:hover { background: var(--primary); filter: brightness(.96); }
.manage-card form p > span { color: var(--muted); font-size: 12px; }
.manage-card form p > span button { min-height: auto; margin: 8px 8px 0 0; padding: 7px 10px; }
.manage-card .errorlist { margin: 0; padding-left: 20px; color: var(--danger); font-size: 12px; }
.manage-card table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 13px; }
.manage-card th, .manage-card td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.manage-card th { color: var(--muted); font-size: 12px; font-weight: 500; }
.manage-card td { overflow-wrap: anywhere; }
.manage-card strong { display: inline-block; padding: 3px 7px; border-radius: 7px; background: var(--tint); color: var(--accent); font-size: 11px; }
.manage-card .sessions-form { gap: 20px; }
.manage-card .sessions-table { min-width: 0; table-layout: fixed; }
.sessions-started-column { width: 18%; }
.sessions-ip-column { width: 17%; }
.sessions-browser-column { width: auto; }
.sessions-seen-column { width: 18%; }
.sessions-status-column { width: 11%; }
.sessions-table .session-time,
.sessions-table .session-ip,
.sessions-table .session-status { white-space: nowrap; }
.sessions-table .session-ip { overflow: hidden; text-overflow: ellipsis; }
.sessions-table .session-browser { overflow-wrap: anywhere; word-break: break-word; }
.sessions-form > button { justify-self: start; }

.notes-page .messages,
.note-editor-page .messages { margin-top: 24px; }
.notes-heading,
.note-editor-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.primary-action,
.secondary-action,
.danger-action,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: var(--qa-control-radius);
    font-size: 12px;
    line-height: 20px;
    font-weight: 500;
    text-decoration: none;
}
.primary-action { min-height: var(--qa-control); padding: 9px 12px; border: 1px solid var(--primary); color: var(--primary-text); background: var(--primary); cursor: pointer; }
.primary-action:hover:not(:disabled) { color: #fff; background: var(--primary); filter: brightness(.96); }
.secondary-action { min-height: var(--qa-control); padding: 9px 12px; color: var(--ink); border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.secondary-action:hover:not(:disabled) { color: var(--ink); background: var(--surface-soft); }
.dashboard :is(.primary-action, .secondary-action),
.dashboard :is(.sc-actions, .tf-actions) > .text-action { flex: 0 0 auto; min-height: var(--qa-control); white-space: nowrap; }
.dashboard :is(.primary-action, .secondary-action, .text-action):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.danger-action { min-height: 42px; padding: 10px 14px; color: var(--danger); }
.danger-action:hover { color: var(--danger); background: var(--danger-bg); }
.primary-action svg,
.secondary-action svg,
.danger-action svg,
.back-link svg,
.delete-icon svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.note-card { display: flex; min-height: 190px; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: var(--qa-card-radius); color: var(--ink); text-decoration: none; }
.note-card:hover { color: var(--ink); border-color: var(--line); box-shadow: 0 8px 28px rgb(39 62 94 / 8%); }
.note-card h2 { margin: 0 0 10px; overflow-wrap: anywhere; font-size: 16px; font-weight: 500; }
.note-card p { margin: 0; overflow: hidden; color: var(--muted); font-size: 13px; white-space: pre-line; }
.note-card time { margin-top: auto; padding-top: 18px; color: var(--muted); font-size: 11px; }
.notes-empty { display: grid; justify-items: center; margin-top: 28px; padding: 54px 24px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.notes-empty .tool-icon { margin-bottom: 16px; }
.notes-empty h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.notes-empty p { max-width: 380px; margin: 10px 0 22px; color: var(--muted); font-size: 13px; }
.back-link { justify-content: flex-start; margin-bottom: 24px; color: var(--muted); }
.back-link:hover { color: var(--ink); }
.note-editor-heading { align-items: center; }
.save-status { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 12px; }
.save-status.saved { color: var(--success); }
.save-status.saving { color: var(--note); }
.save-status.error { color: var(--danger); }
.note-editor { display: grid; gap: 20px; margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.note-field { display: grid; gap: 8px; }
.note-field label { color: var(--muted); font-size: 12px; }
.note-field input,
.note-field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); }
.note-field input { min-height: 46px; font-size: 16px; font-weight: 500; }
.note-field textarea { min-height: 360px; resize: vertical; font-size: 14px; line-height: 1.65; }
.note-field input:focus,
.note-field textarea:focus { border-color: var(--accent); outline: 3px solid rgb(0 122 255 / 12%); }
.note-field .errorlist,
.note-editor > .errorlist { margin: 0; padding-left: 20px; color: var(--danger); font-size: 12px; }
.note-editor-actions { display: flex; align-items: center; gap: 8px; }
.note-editor-actions .save-status { margin-right: auto; }
.delete-card { margin-top: 8px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); }
.delete-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 20px; border-radius: 12px; color: var(--danger); background: var(--danger-bg); }
.delete-card h1 { font-size: var(--qa-h1); }
.delete-card > p:not(.eyebrow) { color: var(--muted); overflow-wrap: anywhere; }
.delete-card form { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.danger-button { min-height: 38px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--danger); background: var(--bg); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.danger-button:hover { background: var(--danger-bg); }
.attachments-card { margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.attachments-card .section-head { margin-bottom: 16px; }
.attachments-card h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.attachments-card .section-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.attachment-upload { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.attachment-upload label { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.attachment-upload input[type="file"] { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 10px; }
.attachment-list { display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; }
.attachment-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.attachment-list li > div { min-width: 0; }
.attachment-list a { display: block; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-list small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.attachment-list form { margin: 0; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--surface-soft); }
.icon-button.danger:hover { color: var(--danger); background: var(--danger-bg); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.attachments-empty { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.base64-workspace { margin-top: var(--qa-section-gap); }
.base64-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--qa-gap); margin-bottom: var(--qa-gap); }
.base64-segment { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface-soft); }
.base64-segment button { min-height: 36px; padding: 7px 13px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.base64-segment button[aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px rgb(30 36 48 / 5%); }
.base64-operation { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.base64-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.base64-pane { display: flex; min-width: 0; min-height: 360px; flex-direction: column; }
.base64-output-pane { border-left: 1px solid var(--line); background: var(--bg); }
.base64-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--surface-soft); font-size: 12px; }
.base64-pane-actions { display: flex; align-items: center; gap: 5px; }
.base64-icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.base64-icon-button:hover:not(:disabled) { color: var(--ink); background: var(--surface-soft); }
.base64-icon-button:disabled { opacity: .45; cursor: default; }
.base64-icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.base64-text-source { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.base64-text-source textarea,
.base64-output { flex: 0 0 auto; width: 100%; height: var(--qa-code-min); min-height: var(--qa-code-min); margin: 0; padding: 18px 14px; border: 0; border-radius: 0; color: var(--ink); background: transparent; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.base64-text-source textarea { resize: vertical; }
.base64-output { overflow: auto; resize: none; }
.base64-text-source textarea:focus,
.base64-output:focus { outline: 3px solid rgb(0 122 255 / 12%); outline-offset: -3px; }
.base64-text-source .errorlist { margin: 0; padding: 10px 15px; border-top: 1px solid var(--line); color: var(--danger); background: var(--danger-bg); font-size: 12px; }
.base64-file-source { position: relative; display: grid; flex: 1; place-items: center; align-content: center; gap: 12px; min-height: var(--qa-code-min); padding: 26px; text-align: center; color: var(--muted); }
.base64-file-source[hidden] { display: none; }
.base64-file-source.is-dragging { background: var(--tint); box-shadow: inset 0 0 0 2px rgb(0 122 255 / 24%); }
.base64-file-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--muted); background: var(--surface-soft); }
.base64-file-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.base64-file-source > div { min-width: 0; max-width: 100%; }
.base64-file-source p { max-width: 100%; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.base64-file-source small { color: var(--muted); font-size: 11px; }
.base64-file-label { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; max-width: 100%; min-height: var(--qa-control); padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--qa-control-radius); color: var(--ink); background: var(--surface); font-size: 12px; line-height: 20px; cursor: pointer; }
.base64-file-label svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.base64-file-label input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.base64-file-label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.base64-file-source .errorlist { margin: 0; padding-left: 18px; color: var(--danger); font-size: 12px; text-align: left; }
.base64-output::placeholder { color: var(--muted); }
.base64-preview { display: block; max-width: calc(100% - 30px); max-height: 210px; margin: 0 auto 16px; border-radius: 12px; object-fit: contain; }
.base64-result-meta { grid-column: 1 / -1; padding: 10px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.base64-options { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.base64-fields { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.checkbox-field { display: inline-flex; align-items: center; align-self: center; gap: 8px; color: var(--muted); font-size: 12px; }
.checkbox-field input { width: 16px; height: 16px; accent-color: var(--primary); }
.base64-workspace .base64-text-source[hidden],
.base64-workspace .base64-file-source[hidden],
.base64-workspace [data-base64-data-url][hidden] { display: none; }
.base64-output-name { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.base64-output-name input { width: 150px; }
.base64-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.base64-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.base64-status { display: flex; align-items: center; gap: 7px; min-height: 22px; color: var(--success); font-size: 11px; }
.base64-status.error { color: var(--danger); }
.base64-alert { margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; color: var(--danger); background: var(--danger-bg); font-size: 12px; }
.base64-alert .errorlist { margin: 0; padding-left: 18px; }
.base64-workspace > .errorlist { margin: 12px 0 0; padding-left: 20px; color: var(--danger); font-size: 12px; }
.base64-page [hidden] { display: none !important; }
.base64-page .base64-workspace { margin-top: 0; }
.base64-page [data-converter-panel] > .lead { max-width: 650px; margin: 0 0 18px; }
.converter-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: var(--qa-gap); }
.converter-controls label { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; }
.converter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.converter-pane { display: grid; grid-template-rows: 50px 220px 40px; min-width: 0; min-height: 0; }
.converter-pane + .converter-pane { border-left: 1px solid var(--line); }
.converter-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--ink); font-size: 12px; }
.converter-pane-head label { min-width: 0; overflow-wrap: anywhere; }
.converter-pane textarea, .converter-output { width: 100%; height: 220px; min-height: 220px; max-height: 220px; margin: 0; padding: 16px 14px; overflow: auto; border: 0; color: var(--ink); background: var(--bg); font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.converter-pane textarea { resize: none; }
.converter-pane-foot { display: flex; align-items: center; min-width: 0; padding: 8px 14px; overflow: hidden; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.converter-actions, .converter-actions > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.converter-actions { justify-content: space-between; min-height: 40px; margin-top: 14px; }
.converter-actions > span, .converter-status { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.converter-actions > span.error, .converter-status.error { color: var(--danger); }
.converter-actions > span.success, .converter-status.success { color: var(--success); }
.converter-field { display: grid; gap: 7px; min-width: 0; margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.converter-field input { width: 100%; }
.converter-field textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); }
.converter-field textarea { min-height: 110px; max-height: 180px; font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; overflow: auto; }
.converter-warning { padding: 9px 12px; border-radius: 9px; color: var(--note) !important; background: var(--amber); }
.converter-jwt-dates { min-width: 0; margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.converter-jwt-head { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.converter-jwt-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.converter-jwt-head span { color: var(--muted); font-size: 12px; }
.converter-jwt-dates dl { display: grid; gap: 8px; margin: 14px 0; }
.converter-jwt-dates dl div { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; font-size: 12px; }
.converter-jwt-dates dt { color: var(--muted); }
.converter-jwt-dates dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.converter-jwt-dates p { color: var(--muted); font-size: 12px; }
.converter-file-source { display: grid; place-items: center; align-content: center; gap: 12px; min-width: 0; min-height: 220px; padding: 16px; color: var(--muted); font-size: 12px; text-align: center; }
.converter-file-source span { max-width: 100%; overflow-wrap: anywhere; }
.converter-file-source .base64-file-label { overflow: hidden; }
.text-page [hidden] { display: none !important; }
.text-workspace, .spelling-workspace { margin-top: 10px; }
.text-intro { margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.text-options { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-height: 32px; margin-bottom: 8px; }
.text-options .checkbox-field { color: var(--ink); }
.text-grid .json-pane { grid-template-rows: 58px 320px 54px; }
.text-grid .json-pane + .json-pane { border-left: 1px solid var(--line); }
.text-grid .json-pane textarea { height: 320px; min-height: 320px; max-height: 320px; }
.text-grid .json-pane-head { gap: 8px; }
.text-grid .json-pane-head > label:first-child { min-width: 0; flex: 1 1 auto; }
.text-grid .base64-file-label { min-width: 0; flex: 0 1 auto; padding: 8px 10px; overflow: hidden; white-space: nowrap; }
.text-grid .json-pane-foot { display: flex; align-items: center; height: 54px; min-height: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-actions, .text-report-head, .text-difference-nav, .text-report-footer, .text-report-footer > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.text-actions { justify-content: space-between; min-height: 40px; margin-top: 16px; }
.text-feedback, .text-report-head span, .text-difference-nav span, .text-report-footer span { color: var(--muted); font-size: 12px; }
.text-feedback { min-height: 20px; margin: 14px 0 0; overflow-wrap: anywhere; }
.text-feedback.error { color: var(--danger); }
.text-report { min-width: 0; margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.text-report-head { justify-content: space-between; }
.text-report-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.text-difference-nav { justify-content: flex-end; margin: 16px 0; }
.text-difference-nav span { min-width: 54px; text-align: center; }
.text-change { min-width: 0; min-height: 96px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.text-change > p { margin: 0; padding: 20px; color: var(--muted); }
.text-change h3 { margin: 0; padding: 10px 14px; background: var(--surface-soft); font-size: 12px; font-weight: 500; }
.text-change-row { min-width: 0; padding: 12px 14px; border-top: 1px solid var(--line); }
.text-change-row > span { color: var(--muted); font-size: 11px; }
.text-change-row pre { max-height: 220px; margin: 7px 0 0; overflow: auto; color: var(--ink); font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.text-change-row mark { padding: 1px 0; color: var(--note); background: var(--amber); }
.text-report-footer { justify-content: space-between; margin-top: 16px; }
.text-page button:disabled { opacity: .5; cursor: default; }
.spelling-workspace [hidden] { display: none !important; }
.spelling-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px; min-height: 32px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.spelling-grid .json-pane { grid-template-rows: 58px 320px 54px; }
.spelling-grid .json-pane + .json-pane { border-left: 1px solid var(--line); }
.spelling-grid .json-pane textarea, .spelling-source, .spelling-output { width: 100%; height: 320px; min-height: 320px; max-height: 320px; margin: 0; padding: 18px 14px; overflow: auto; border: 0; color: var(--ink); background: var(--bg); font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.spelling-grid .json-pane textarea { resize: none; }
.spelling-grid .json-pane-foot { display: flex; align-items: center; height: 54px; min-height: 54px; }
.spelling-grid .json-pane-foot.error, .spelling-status.error { color: var(--danger); }
.spelling-actions, .spelling-actions > div, .spelling-choice-head, .spelling-choice-actions, .spelling-undo, .spelling-undo > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.spelling-actions, .spelling-undo { justify-content: space-between; min-height: 40px; margin-top: 16px; }
.spelling-actions span, .spelling-status, .spelling-undo span, .spelling-legend, .spelling-note { color: var(--muted); font-size: 12px; }
.spelling-status { min-height: 20px; margin: 16px 0; }
.spelling-issue, .spelling-applied { padding: 0 1px; border: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.spelling-issue { text-decoration: underline wavy var(--danger); text-underline-offset: 3px; }
.spelling-issue.spelling-replace { text-decoration-style: solid; text-decoration-color: var(--success); }
.spelling-issue.spelling-keep, .spelling-issue.spelling-skip { text-decoration-style: dashed; text-decoration-color: var(--muted); }
.spelling-applied { text-decoration: underline solid var(--accent); text-underline-offset: 3px; }
.spelling-issue:focus-visible, .spelling-applied:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.spelling-choices { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.spelling-choice-head { justify-content: space-between; }
.spelling-choice-head h2 { margin: 0; font-size: 14px; font-weight: 500; }
.spelling-choices > p { margin: 10px 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.spelling-suggestions, .spelling-choice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.spelling-choice-actions { margin-top: 12px; }
.spelling-undo { padding: 12px 0; }
.spelling-legend { margin: 16px 0 0; line-height: 1.6; }
.spelling-note { margin: 12px 0 0; }
@media (max-width: 580px) {
    .text-grid .json-pane { grid-template-rows: 58px 260px 54px; }
    .text-grid .json-pane textarea { height: 260px; min-height: 260px; max-height: 260px; }
    .text-report { padding: 14px; }
    .spelling-grid .json-pane { grid-template-rows: 58px 260px 54px; }
    .spelling-grid .json-pane textarea, .spelling-source, .spelling-output { height: 260px; min-height: 260px; max-height: 260px; }
}
@media (max-width: 580px) {
    :root { --qa-field-size: 44px; --qa-field-font: 16px; }
    .site-header { padding: 14px 16px; }
    .profile-copy { display: none; }
    .workspace { display: block; }
    .sidebar { padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 6px; }
    .nav-heading { display: none; }
    .sidefoot { display: contents; }
    .tool-grid { grid-template-columns: 1fr; margin-top: var(--qa-section-gap); }
    .tool-card { min-height: auto; }
    .notes-grid { grid-template-columns: 1fr; }
    .notes-heading { align-items: stretch; flex-direction: column; }
    .notes-heading .primary-action { align-self: flex-start; }
    .note-editor-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
    .manage-card .sessions-table,
    .sessions-table tbody,
    .sessions-table tr,
    .sessions-table td { display: block; width: 100%; }
    .sessions-table colgroup,
    .sessions-table thead { display: none; }
    .sessions-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
    .sessions-table tr:last-child { border-bottom: 0; }
    .manage-card .sessions-table td {
        display: grid;
        grid-template-columns: minmax(110px, .75fr) minmax(0, 1.25fr);
        gap: 14px;
        padding: 8px 0;
        border: 0;
        white-space: normal;
    }
    .sessions-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
    .sessions-table .session-ip,
    .sessions-table .session-time,
    .sessions-table .session-status { white-space: nowrap; }
    .sessions-table .session-ip { overflow: visible; text-overflow: clip; }
}

@media (max-width: 460px) {
    .account-page { padding: 30px 14px 50px; }
    .manage-card { padding: 20px 16px; }
    .manage-card .sessions-table td { grid-template-columns: 1fr; gap: 3px; }
    .note-editor { padding: 18px 14px; }
    .note-editor-actions,
    .delete-card form { align-items: stretch; flex-direction: column; }
    .note-editor-actions > *,
    .delete-card form > * { width: 100%; }
    .attachment-upload { grid-template-columns: 1fr; }
    .attachment-upload label { grid-column: auto; }
    .base64-toolbar,
    .base64-options { align-items: stretch; flex-direction: column; }
    .base64-operation { justify-content: space-between; }
    .base64-fields,
    .base64-actions { align-items: stretch; flex-direction: column; }
    .base64-output-name { justify-content: space-between; }
    .base64-output-name input,
    .base64-submit { width: 100%; }
}

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

/* S5: shared themes and saved materials */
.header-cluster {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--qa-gap);
    max-width: 100%;
    margin-inline-start: auto;
}
.theme-switch { display: inline-flex; gap: 3px; padding: 3px; border-radius: 9px; background: var(--surface-soft); }
.theme-switch button { display: grid; place-items: center; width: 36px; height: 36px; padding: 7px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { color: var(--accent); background: var(--bg); }
.theme-switch svg, .bookmark-action svg, .note-bookmark svg, .note-side-head svg, .search-field svg, .json-save-panel svg, .json-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch svg { width: 18px; height: 18px; }
.catalog-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: var(--qa-section-gap) 0 var(--qa-gap); }
.catalog-filters label { display: flex; flex: 1 1 120px; flex-direction: column; gap: 5px; min-width: 0; color: var(--muted); font-size: 11px; }
.catalog-filters select, .catalog-filters input, .json-save-panel input, .material-actions input { min-height: var(--qa-control); padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--qa-control-radius); color: var(--ink); background: var(--field); font-size: 13px; line-height: 20px; }
.search-field { position: relative; flex: 1 1 120px; }
.search-field svg { position: absolute; top: 13px; left: 12px; color: var(--muted); }
.search-field input { width: 100%; }
.search-field:has(svg) input { padding-left: 38px; }
.note-list-summary { margin: var(--qa-gap) 0; color: var(--muted); font-size: 12px; }
.note-card { position: relative; background: var(--surface); }
.note-bookmark { position: absolute; top: 15px; right: 15px; color: var(--accent); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.pagination a { text-decoration: none; }
.note-workbench { display: grid; grid-template-columns: 168px minmax(0, 1fr); margin-top: var(--qa-gap); border: 1px solid var(--line); border-radius: var(--qa-card-radius); overflow: hidden; background: var(--surface); }
.note-workbench-main { min-width: 0; padding: var(--qa-panel-pad); }
.note-workbench .note-editor { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; }
.note-workbench .note-field { display: block; }
.note-workbench .note-field input, .note-workbench .note-field textarea { padding: 0; border: 0; border-radius: 0; background: transparent; }
.note-workbench .note-field input { min-height: 0; margin: 14px 0; font-size: 19px; line-height: 28px; }
.note-workbench .note-field textarea { min-height: 220px; font-size: 13px; line-height: 1.9; }
.note-workbench .note-field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.note-workbench .note-editor-actions { justify-content: space-between; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.note-editor-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.note-mode { color: var(--muted); font-size: 12px; }
.bookmark-action[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--tint); }
.bookmark-action[aria-pressed="true"] svg { fill: var(--tint); stroke-width: 2.2; }
.note-side-item svg { width: 13px; height: 13px; margin-right: 4px; vertical-align: middle; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.7; }
.note-save-hint { display: flex; gap: 7px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 12px; }
.note-save-hint svg, .attachment-glyph svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.attachment-glyph { display: grid; place-items: center; width: 31px; height: 35px; flex-shrink: 0; color: var(--muted); }
.attachment-upload { grid-template-columns: minmax(0, 1fr) auto auto; padding: 13px; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); font-size: 12px; }
.attachment-upload[hidden] { display: none; }
.attachment-upload input[type="file"] { grid-column: 1 / -1; width: 100%; border: 0; padding: 0; margin: 10px 0 12px; }
.note-workbench .attachments-card { margin-top: 22px; padding: 20px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.note-workbench button:disabled { opacity: .5; cursor: default; }
.note-side-list { min-width: 0; padding: 8px; border-right: 1px solid var(--line); background: var(--surface-soft); }
.note-side-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 12px; }
.note-side-head a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; }
.note-side-item { display: block; width: 100%; margin-bottom: 4px; padding: 13px 10px; border-radius: 9px; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; text-decoration: none; }
.note-side-item:hover { color: var(--ink); background: var(--surface); }
.note-side-item.active { color: var(--note); background: var(--amber); }
.note-side-item span { overflow-wrap: anywhere; font-size: 12px; }
.note-side-item small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.inline-confirm { position: relative; }
.inline-confirm summary { color: var(--accent); cursor: pointer; font-size: 12px; list-style: none; }
.inline-confirm summary::-webkit-details-marker { display: none; }
.inline-confirm > div, .inline-confirm > form { position: absolute; z-index: 5; right: 0; display: flex; align-items: center; gap: 8px; min-width: 190px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px rgb(0 0 0 / 15%); }
.inline-confirm .danger-button { min-height: 34px; padding: 6px 10px; }
.attachment-selection { grid-column: 1 / -1; margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.attachment-list li { flex-wrap: wrap; padding: 11px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.attachment-list li > div { flex: 1; }
.attachment-confirm[open] { flex: 1 0 100%; }
.attachment-confirm[open] summary { margin-left: auto; }
.attachment-confirm > div { position: static; min-width: 0; width: 100%; margin-top: 12px; padding: 12px; flex-wrap: wrap; border: 0; background: var(--amber); box-shadow: none; }
.chooser-actions, .material-actions, .json-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.material-list { margin-top: var(--qa-gap); border: 1px solid var(--line); border-radius: var(--qa-card-radius); overflow: hidden; }
.material-row { border-bottom: 1px solid var(--line); background: var(--surface); }
.material-row:last-child { border-bottom: 0; }
.material-open { display: flex; align-items: center; gap: var(--qa-gap); padding: 16px; color: var(--ink); text-decoration: none; }
.material-open:hover { color: var(--ink); background: var(--surface-soft); }
.material-open svg, .material-choice svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.material-glyph { display: grid; place-items: center; flex-shrink: 0; width: 35px; height: 35px; border-radius: 10px; color: var(--accent); background: var(--tint); }
.material-glyph.note { color: var(--note); background: var(--amber); }
.material-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.material-copy strong { font-weight: 500; }
.material-copy small, .material-choice small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.material-type { padding: 4px 8px; border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.material-actions { padding: 0 16px 12px 63px; }
.material-actions .inline-confirm > div, .material-actions .inline-confirm > form { position: static; min-width: 0; max-width: 100%; flex-wrap: wrap; box-shadow: none; }
.material-actions input { min-width: 0; max-width: 100%; }
.material-chooser { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.material-chooser h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.material-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 13px; }
.material-choice { display: flex; align-items: flex-start; min-width: 0; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); text-decoration: none; }
.material-choice strong { font-weight: 500; font-size: 13px; }
.material-actions form { margin: 0; }
.text-action { padding: 0; border: 0; color: var(--accent); background: transparent; cursor: pointer; font-size: 12px; }
.danger-text { color: var(--danger) !important; }
.json-lab-controls { min-height: var(--qa-field-size); margin: 0 0 var(--qa-gap); }
.json-toolbar, .json-operation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.json-toolbar > label { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.json-toolbar :is(button, label) { min-height: var(--qa-field-size); }
.json-toolbar > label.base64-file-label { color: var(--ink); }
.json-compare-intro { color: var(--muted); }
.json-toolbar > label,
.json-compare-intro,
.json-page :is(.primary-action, .secondary-action, .base64-file-label, .json-pane-head) {
    font-size: var(--qa-field-font);
    line-height: 20px;
}
.json-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.json-pane { display: grid; grid-template-rows: 58px var(--qa-code-min) 40px; min-width: 0; min-height: 0; }
.json-output-pane { border-left: 1px solid var(--line); background: var(--bg); }
.json-pane-head { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); background: var(--surface-soft); font-size: 12px; }
.json-pane textarea, .json-output { width: 100%; height: var(--qa-code-min); min-height: var(--qa-code-min); max-height: var(--qa-code-min); margin: 0; padding: 18px 14px; border: 0; color: var(--ink); background: var(--bg); font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; overflow: auto; }
.json-pane textarea { resize: none; }
.json-pane-foot { height: 40px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.json-material-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.json-material-actions button:disabled { opacity: .5; cursor: default; }
.json-actions { justify-content: flex-end; margin-top: 12px; }
.json-actions .base64-status { margin-right: auto; }
.json-save-panel { display: grid; gap: 12px; margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.json-save-panel[hidden], .material-chooser[hidden], [data-json-save-new][hidden], .json-saved-notice[hidden] { display: none; }
.json-save-panel > button { justify-self: end; }
.json-saved-notice { padding: 13px 15px; border-radius: 10px; background: var(--success-bg); color: var(--success); font-size: 12px; }
.json-actions button:disabled { opacity: .5; cursor: default; }
.json-save-panel > div { flex: 1 1 240px; }
.json-save-panel h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.json-save-panel p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.json-save-panel label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.json-key { color: var(--accent); }.json-string { color: var(--success); }.json-number { color: var(--accent); }.json-literal { color: var(--note); }
.json-page [hidden] { display: none !important; }

@supports (grid-template-rows: subgrid) {
    .json-lab-panels {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        row-gap: var(--qa-gap);
    }

    .json-lab-panel, .json-workspace {
        display: grid;
        grid-column: 1;
        grid-row: 1 / -1;
        grid-template-rows: subgrid;
        min-width: 0;
    }

    .json-lab-controls { grid-row: 1; margin: 0; }
    .json-lab-content { grid-row: 2; min-width: 0; }
    .json-compare-intro { align-content: center; }

    /* Both control rows size the shared track even when the toolbar wraps. */
    .json-page .json-lab-panel[hidden] { display: grid !important; visibility: hidden; }
    .json-lab-panel[hidden] .json-lab-content { display: none; }
}
.json-compare-grid { margin-top: 0; }
.json-compare-grid .json-pane + .json-pane { border-left: 1px solid var(--line); }
.json-compare-grid .json-pane-head { gap: 8px; }
.json-compare-grid .json-pane-head > label:first-child { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.json-compare-grid .base64-file-label { min-width: 0; max-width: 100%; flex: 0 1 auto; padding: 8px 10px; overflow: hidden; white-space: nowrap; }
.json-compare-grid .base64-file-label svg { flex: 0 0 auto; }
.json-compare-grid .json-pane-foot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.json-compare-actions, .json-compare-footer, .json-compare-pager, .json-compare-export { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.json-compare-actions { margin-top: 16px; }
.json-compare-actions span { color: var(--muted); font-size: 11px; }
.json-compare-feedback { min-height: 20px; margin: 14px 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.json-compare-feedback.error { color: var(--danger); }
.json-compare-report { min-width: 0; margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.json-compare-summary { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.json-compare-summary h2 { margin: 0; font-size: 16px; font-weight: 500; }
.json-compare-summary span { color: var(--muted); font-size: 12px; }
.json-compare-list { display: grid; gap: 12px; margin-top: 16px; }
.json-compare-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.json-compare-card-head { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--surface-soft); font-size: 12px; }
.json-compare-card-head code { min-width: 0; overflow-wrap: anywhere; }
.json-compare-card-head span { color: var(--muted); }
.json-compare-added .json-compare-card-head span { color: var(--success); }
.json-compare-removed .json-compare-card-head span { color: var(--danger); }
.json-compare-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.json-compare-value { min-width: 0; padding: 12px; }
.json-compare-value + .json-compare-value { border-left: 1px solid var(--line); }
.json-compare-value span { color: var(--muted); font-size: 11px; }
.json-compare-value pre { max-height: 250px; margin: 6px 0 0; overflow: auto; color: var(--ink); font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.json-compare-value .json-compare-missing { color: var(--muted); font-style: italic; }
.json-compare-empty { margin: 0; padding: 16px; color: var(--muted); background: var(--surface-soft); border-radius: 10px; font-size: 12px; }
.json-compare-footer { justify-content: space-between; margin-top: 16px; }
.json-compare-footer button:disabled, .json-compare-actions button:disabled { opacity: .5; cursor: default; }
.json-compare-pager span { min-width: 42px; text-align: center; color: var(--muted); font-size: 12px; }
@media (max-width: 580px) {
    .json-compare-report { padding: 14px; }
    .json-compare-values { grid-template-columns: 1fr; }
    .json-compare-value + .json-compare-value { border-top: 1px solid var(--line); border-left: 0; }
}
.test-data-page [hidden] { display: none; }
.td-format, .td-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.td-format .active { color: var(--accent); border-color: var(--accent); background: var(--tint); }
.td-limit { margin-left: auto; color: var(--muted); font-size: 11px; }
.td-workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--qa-card-radius); }
.td-settings { min-width: 0; padding: 20px; border-right: 1px solid var(--line); background: var(--surface-soft); }
.td-settings form { display: grid; gap: 14px; }
.td-settings h2, .td-results h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.td-settings label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.td-settings :is(input:not([type="checkbox"], [type="hidden"]), select) { width: 100%; }
.td-save-panel input { width: 100%; min-width: 0; min-height: var(--qa-control); padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--qa-control-radius); color: var(--ink); background: var(--bg); font-size: 13px; }
.td-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.td-generator-pair { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.td-fields details { padding: 12px 0; border-top: 1px solid var(--line); }
.td-fields summary { color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; }
.td-settings .td-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--ink); }
.td-check input { width: 16px; height: 16px; accent-color: var(--primary); }
.td-caption { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.td-wide { width: 100%; }
.td-results { min-width: 0; padding: var(--qa-panel-pad); }
.td-results .section-head { align-items: flex-start; }
.td-results [data-td-status], .td-results [data-td-meta] { color: var(--muted); font-size: 11px; }
.td-format { margin: 16px 0 12px; }
.td-format [data-td-meta] { margin-left: auto; }
.td-table-wrap { min-height: 150px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.td-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.td-table-wrap th, .td-table-wrap td { min-width: 115px; max-width: 260px; padding: 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; text-align: left; vertical-align: top; }
.td-table-wrap th { background: var(--surface-soft); font-weight: 500; }
.td-code { max-height: 500px; min-height: var(--qa-code-min); margin: 0; padding: 16px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface-soft); font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.td-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 12px; }
.td-actions { margin-top: 16px; }
.td-save-panel { display: grid; gap: 12px; margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.td-save-panel label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.td-save-panel > div { display: flex; gap: 8px; }
.td-delete { margin-top: 16px; font-size: 12px; }
.td-delete summary { cursor: pointer; }
.td-delete form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.td-error { margin: 16px 0 0; padding: 12px; border-radius: 10px; color: var(--danger); background: var(--danger-bg); font-size: 12px; }
.tf-workspace { width: 100%; max-width: 1180px; min-width: 0; margin-top: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--qa-card-radius); background: var(--surface); }
.tf-workspace .section-head { margin-bottom: 8px; }
.tf-workspace .section-head small { color: var(--muted); font-size: 11px; }
.tf-workspace form { display: grid; gap: 12px; margin-top: 16px; }
.tf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.tf-workspace label:not(.tf-check) { display: grid; align-content: start; gap: 5px; min-width: 0; color: var(--muted); font-size: 12px; }
.tf-workspace :is(input:not([type="checkbox"]), select) { width: 100%; }
.tf-panel { display: grid; gap: 10px; padding-top: 4px; }
.tf-check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; }
.tf-check input { width: 16px; height: 16px; accent-color: var(--primary); }
.tf-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tf-status { min-height: 20px; margin: 16px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.tf-status.error { color: var(--danger); }
.tf-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; margin-top: 12px; }
.tf-file { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.tf-file-copy { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.tf-file-copy strong { color: var(--ink); font-size: 12px; font-weight: 500; }
.tf-file-copy small, .tf-file-copy span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.tf-file > button { flex: 0 0 auto; }
@media (max-width: 899px) {
    .td-workspace { grid-template-columns: 1fr; }
    .td-settings { border-right: 0; border-bottom: 1px solid var(--line); }
    .td-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
}
@media (max-width: 580px) {
    .td-settings, .td-results { padding: 16px; }
    .td-fields { grid-template-columns: 1fr; }
    .td-limit { margin-left: 0; }
    .tf-workspace { padding: 16px; }
    .tf-file { flex-wrap: wrap; }
}
@media (pointer: coarse) {
    .td-save-panel input { min-height: 44px; font-size: 16px; }
    .td-check { min-height: 44px; }
}
@media (max-width: 850px) {
    .note-workbench { grid-template-columns: 1fr; }
    .note-side-list { max-height: 230px; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .note-side-list { display: flex; flex-wrap: wrap; gap: 6px; }
    .note-side-item { flex: 1 1 130px; width: auto; margin: 0; }
    .note-side-head { width: 100%; }
    .json-grid { grid-template-columns: 1fr; }
    .json-output-pane { border-top: 1px solid var(--line); border-left: 0; }
    .json-compare-grid .json-pane + .json-pane { border-top: 1px solid var(--line); border-left: 0; }
    .base64-grid { grid-template-columns: 1fr; }
    .base64-output-pane { border-top: 1px solid var(--line); border-left: 0; }
    .converter-grid { grid-template-columns: 1fr; }
    .converter-pane + .converter-pane { border-top: 1px solid var(--line); border-left: 0; }
    .text-grid .json-pane + .json-pane { border-top: 1px solid var(--line); border-left: 0; }
    .spelling-grid .json-pane + .json-pane { border-top: 1px solid var(--line); border-left: 0; }
}
@media (pointer: coarse) {
    .json-pane { grid-template-rows: 66px var(--qa-code-min) 40px; }
    .text-grid .json-pane { grid-template-rows: 66px 320px 54px; }
    .spelling-grid .json-pane { grid-template-rows: 66px 320px 54px; }
    button, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select { min-height: var(--qa-field-min-height, 44px); }
    .primary-action, .secondary-action, .base64-file-label, .base64-segment button,
    .account-panel button, .manage-card button, .profile-form button { min-height: 44px; }
    .theme-switch button, .base64-icon-button, .icon-button, .note-side-head a { min-width: 44px; min-height: 44px; }
    input, textarea, select { font-size: 16px; }
    .note-workbench .note-field textarea, .json-pane textarea, .base64-text-source textarea,
    .profile-form input, .catalog-filters input, .catalog-filters select,
    .json-save-panel input, .material-actions input,
    .account-panel input:not([type="checkbox"]):not([type="radio"]),
    .account-panel select, .account-panel textarea,
    .manage-card input:not([type="checkbox"]):not([type="radio"]),
    .manage-card select, .manage-card textarea { font-size: 16px; }
}
@media (max-width: 580px) and (pointer: coarse) {
    .text-grid .json-pane { grid-template-rows: 66px 260px 54px; }
    .spelling-grid .json-pane { grid-template-rows: 66px 260px 54px; }
}
@media (max-width: 580px) {
    :root { --qa-page-y: 24px; --qa-page-x: 16px; --qa-h1: 25px; --qa-panel-pad: 16px; }
    .dashboard { padding: 24px 16px; }
    .dashboard h1 { font-size: var(--qa-h1); }
    .material-choices { grid-template-columns: 1fr; }
    .material-open .material-type { display: none; }
    .note-workbench-main { padding: var(--qa-panel-pad); }
}
@media (max-width: 580px) {
    .chooser-actions { align-items: stretch; flex-direction: column; }
}
@media (max-width: 460px) {
    .material-choices { grid-template-columns: 1fr; }
    .material-open .material-type { display: none; }
    .catalog-filters > *, .catalog-filters select, .catalog-filters .secondary-action { width: 100%; }
    .json-save-panel { align-items: stretch; flex-direction: column; }
}
