:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #17332d;
  background: #f3f5ef;
  --ink: #17332d;
  --green: #1f4b40;
  --green-dark: #15382f;
  --orange: #a75c32;
  --line: #d9dfd6;
  --muted: #64726c;
  --paper: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.auth-page { background: #eef1eb; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); }
.brand-panel { padding: clamp(44px, 7vw, 110px); display: flex; flex-direction: column; justify-content: space-between; color: #eef7f1; background: radial-gradient(circle at 15% 20%, #2c6758, transparent 35%), var(--green-dark); }
.brand-kicker { margin: 24px 0 8px; color: #bdd2c9; letter-spacing: .08em; text-transform: uppercase; }
.brand-panel h1 { max-width: none; margin: 0; font-size: clamp(2.6rem, 4.6vw, 5.2rem); line-height: 1; letter-spacing: -.05em; white-space: nowrap; }
.brand-subtitle { max-width: 560px; margin: 28px 0 0; color: #cbdad3; font-size: .95rem; line-height: 1.7; }
.version-badge { display: inline-flex; width: fit-content; padding: 6px 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; color: #d8e7df; font-size: .76rem; letter-spacing: .08em; }
.prototype-note { margin: 60px 0 0; color: #9fb9ae; font-size: .82rem; }
.auth-card { width: min(460px, calc(100% - 48px)); margin: auto; padding: 48px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: 0 24px 70px rgba(31, 55, 47, .08); }
.auth-card-heading h2, .registration-card h1 { margin: 4px 0 8px; font-size: 2rem; }
.auth-card-heading > p:last-child, .form-intro { color: var(--muted); }
.section-label { margin: 0; color: var(--orange); font-size: .75rem; font-weight: 800; letter-spacing: .12em; }
.stacked-form { display: grid; gap: 10px; margin-top: 30px; }
.stacked-form label { margin-top: 8px; font-size: .9rem; font-weight: 700; }
.stacked-form input:not([type="checkbox"]), .stacked-form textarea, .stacked-form select { width: 100%; padding: 12px 14px; border: 1px solid #bdc8c0; border-radius: 10px; background: #fbfcfa; }
.stacked-form input:focus, .stacked-form textarea:focus { outline: 3px solid rgba(31, 75, 64, .12); border-color: var(--green); }
.primary-button, .secondary-button { padding: 12px 18px; border-radius: 10px; font-weight: 750; cursor: pointer; }
.primary-button { margin-top: 14px; border: 0; color: white; background: var(--green); }
.primary-button:hover { background: var(--green-dark); }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: white; }
.inline-button { display: inline-block; text-decoration: none; }
.invite-help { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .88rem; }
.invite-help p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.message, .form-errors { margin: 18px 0; padding: 12px 14px; border-radius: 10px; background: #edf6ed; color: #245a3d; }
.errorlist { margin: 2px 0 0; padding-left: 18px; color: #a13b30; font-size: .82rem; }

.form-page { padding: 32px; background: #eef1eb; }
.registration-shell { width: min(760px, 100%); margin: auto; }
.corner-brand { display: inline-flex; gap: 10px; align-items: baseline; margin-bottom: 28px; text-decoration: none; font-weight: 800; }
.corner-brand small { color: var(--orange); }
.registration-card { padding: clamp(28px, 6vw, 56px); border: 1px solid var(--line); border-radius: 24px; background: white; }
.registration-form { grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group:nth-of-type(4), .field-group:nth-of-type(5), .field-group:nth-of-type(6), .checkbox-group, .registration-form > button { grid-column: 1 / -1; }
.checkbox-group { display: block; padding: 14px; border-radius: 10px; background: #f5f7f3; }
.checkbox-group label { margin: 0 0 0 6px; font-weight: 500; }
.help-text { color: var(--muted); line-height: 1.45; }
.empty-state { width: min(560px, calc(100% - 40px)); margin: 18vh auto; text-align: center; }
.empty-state .version-badge { margin: auto; color: var(--orange); border-color: #d7b8a6; }

.workspace-page { background: #f5f6f2; }
.workspace-header { position: sticky; z-index: 10; top: 0; display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: stretch; min-height: 72px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.workspace-brand { min-width: 280px; display: flex; flex-direction: column; justify-content: center; text-decoration: none; }
.workspace-brand strong { font-size: .82rem; white-space: nowrap; }
.workspace-brand small { margin-top: 3px; color: var(--muted); font-size: .66rem; letter-spacing: .08em; }
.workspace-nav { display: flex; flex: 1; overflow-x: auto; }
.nav-tab { display: flex; gap: 7px; align-items: center; padding: 0 18px; border-bottom: 3px solid transparent; color: #68756f; text-decoration: none; white-space: nowrap; font-size: .9rem; }
.nav-tab span { color: #a1aaa5; font-size: .7rem; }
.nav-tab:hover { color: var(--ink); background: #f8faf7; }
.nav-tab.active { color: var(--ink); border-bottom-color: var(--orange); font-weight: 750; }
.account-area { position: relative; display: grid; align-self: center; }
.account-menu { position: static; }
.account-menu summary { display: flex; gap: 10px; align-items: center; min-width: 190px; padding: 7px 10px; border-radius: 12px; cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { background: #f2f5f1; }
.account-avatar { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: .86rem; font-weight: 800; }
.account-avatar.large { flex-basis: 44px; width: 44px; height: 44px; font-size: 1rem; }
.account-identity { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.account-identity strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.account-identity small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.account-chevron { color: var(--muted); }
.account-data-shortcut { width: fit-content; margin: -4px 34px 3px 54px; padding: 0; border: 0; color: var(--orange); background: transparent; font-size: .7rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.account-data-shortcut:hover { text-decoration: underline; }
.account-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 300px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 18px 50px rgba(31, 55, 47, .14); }
.account-overview { display: flex; gap: 12px; align-items: center; padding: 4px 4px 14px; border-bottom: 1px solid var(--line); }
.account-overview div { display: flex; min-width: 0; flex-direction: column; }
.account-overview strong, .account-overview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-overview strong { font-size: .92rem; }
.account-overview span { margin-top: 3px; color: var(--muted); font-size: .73rem; }
.account-dropdown nav { display: grid; gap: 3px; padding: 9px 0; }
.account-dropdown nav a, .account-dropdown button { width: 100%; padding: 10px 11px; border: 0; border-radius: 8px; color: var(--ink); background: transparent; text-align: left; text-decoration: none; font-size: .84rem; cursor: pointer; }
.account-dropdown nav a:hover, .account-dropdown button:hover { background: #f2f5f1; }
.account-dropdown form { padding-top: 9px; border-top: 1px solid var(--line); }
.account-dropdown button { color: #8d4035; }
.workspace-main { width: min(1320px, calc(100% - 40px)); margin: 26px auto; }
.workspace-title h1 { margin: 7px 0 8px; font-size: clamp(2.1rem, 5vw, 4rem); }
.workspace-title > p:last-child { max-width: 680px; color: var(--muted); font-size: 1.05rem; }
.content-card { margin-top: 34px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.content-card h2 { margin-top: 0; }
.content-card p { color: var(--muted); line-height: 1.65; }
.action-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.action-card button { padding: 11px 15px; border: 0; border-radius: 9px; color: #8d9993; background: #edf0eb; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.summary-grid article { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.summary-grid strong { font-size: 2.2rem; }
.summary-grid span { margin-top: 5px; color: var(--muted); }
.profile-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.profile-card dl div { padding-bottom: 14px; border-bottom: 1px solid #edf0eb; }
.profile-card dt { color: var(--muted); font-size: .78rem; }
.profile-card dd { margin: 5px 0 0; }
.muted { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* 数据录入工作台 */
.entry-intro { margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
.entry-intro p { margin: 0; }
.entry-module { margin-bottom: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.62); overflow: hidden; }
.module-heading { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 13px 18px; border: 0; color: var(--ink); background: #edf2ed; text-align: left; cursor: pointer; }
.module-heading > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.module-heading strong { font-size: 1.18rem; }
.module-heading small, .module-meta { color: var(--muted); font-size: .76rem; }
.module-meta { display: flex; gap: 18px; align-items: center; white-space: nowrap; }
.module-body { padding: 12px; }
.record-card-list { display: grid; gap: 16px; }
.record-card { border: 1px solid var(--line); border-radius: 15px; background: white; overflow: hidden; box-shadow: 0 7px 22px rgba(31,55,47,.04); }
.record-summary { width: 100%; display: grid; grid-template-columns: auto minmax(180px,1.4fr) minmax(120px,1fr) auto auto auto; gap: 12px; align-items: center; padding: 13px 16px; border: 0; color: var(--ink); background: #fbfcfa; text-align: left; cursor: pointer; }
.record-summary code { color: var(--muted); font-size: .72rem; }
.record-summary time, .summary-custom { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.record-status { padding: 4px 7px; border-radius: 99px; color: #6d756e; background: #ecefeb; font-size: .68rem; white-space: nowrap; }
.record-status.complete { color: #245a3d; background: #e3f1e6; }
.record-status.draft { color: #87512e; background: #f6eadf; }
.record-form { padding: 12px; }
.record-form fieldset { margin: 0 0 18px; padding: 18px; border: 1px solid #e4e9e2; border-radius: 12px; }
.record-form legend { padding: 0 8px; font-weight: 750; }
.form-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px 12px; }
.form-grid label, .file-grid label, .raw-data-grid label, .oxide-grid label { display: flex; min-width: 0; flex-flow: row wrap; gap: 3px 5px; align-items: center; color: #354b45; font-size: .76rem; font-weight: 700; }
.form-grid label > input, .form-grid label > select, .form-grid label > textarea, .file-grid label > input, .raw-data-grid label > input, .raw-data-grid label > select { flex: 1 0 100%; }
.form-grid .full { grid-column: 1 / -1; }
.record-form input:not([type=file]), .record-form select, .record-form textarea, .data-window-controls input, .data-window-controls select { width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid #bdc8c0; border-radius: 7px; color: var(--ink); background: #fbfcfa; font-size: .8rem; line-height: 1.25; }
.record-form textarea { min-height: 76px; resize: vertical; }
.record-form input:focus, .record-form select:focus, .record-form textarea:focus { outline: 3px solid rgba(31,75,64,.12); border-color: var(--green); }
.record-form input:disabled { color: #77827d; background: #eef1ed; }
.unit { color: var(--muted); font-size: .7rem; font-weight: 500; }
.field-note { margin: 0 0 12px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.field-tip { position: relative; display: inline-grid; width: 17px; height: 17px; place-items: center; border: 1px solid #aebbb4; border-radius: 50%; color: var(--green); font-size: .67rem; cursor: help; }
.field-tip.show-help::after, .field-tip:hover::after, .field-tip:focus::after { display: none; content: none; }
.field-tip-popover { position: fixed; z-index: 120; width: max-content; max-width: min(320px,calc(100vw - 20px)); padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; box-shadow: 0 8px 24px rgba(31,55,47,.2); font-size: .72rem; font-weight: 500; line-height: 1.5; white-space: pre-line; }
.entry-table { width: 100%; border-collapse: collapse; }
.entry-table th { padding: 8px; color: var(--muted); font-size: .72rem; font-weight: 700; text-align: left; }
.entry-table td { padding: 6px 4px; border-top: 1px solid #edf0eb; vertical-align: top; }
.entry-table input, .entry-table select { min-width: 86px; }
.result-table { display: block; overflow-x: auto; }
.result-table td:nth-child(2) input, .result-table td:nth-child(3) select, .result-table td:nth-child(5) input { min-width: 145px; }
.result-table td:nth-child(4) input { min-width: 130px; }
.row-remove, .text-button { padding: 7px 9px; border: 0; color: var(--orange); background: transparent; cursor: pointer; }
.row-remove { font-size: 1.1rem; }
.file-grid, .raw-data-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 14px; }
.oxide-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.xrf-total { margin-top: 12px; color: var(--muted); font-size: .78rem; text-align: right; }
.raw-data-grid section { min-width: 0; padding: 14px; border: 1px solid #edf0eb; border-radius: 10px; }
.raw-data-grid h3 { margin: 0 0 12px; font-size: .95rem; }
.raw-data-grid label + label, .standard-fields label + label { margin-top: 10px; }
.standard-fields { margin-top: 12px; }
.card-actions, .module-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.card-actions { position: sticky; bottom: 0; margin: 0 -18px -18px; padding: 12px 18px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
.card-actions .primary-button, .data-window-footer .primary-button { margin-top: 0; }
.save-state { flex: 1; color: var(--muted); font-size: .75rem; }
.form-message { min-height: 0; margin-bottom: 8px; font-size: .78rem; }
.form-message.success { color: #245a3d; }
.form-message.error { padding: 9px; border-radius: 8px; color: #8d4035; background: #fbecea; }
.module-actions { padding-top: 16px; }

.data-work-window { position: static; width: 100%; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 8px 24px rgba(31,55,47,.08); overflow: hidden; }
.data-window-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; color: white; background: var(--green); }
.data-window-header > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.data-window-header small { color: #d6e4de; font-size: .7rem; }
.data-window-header button { padding: 4px 8px; border: 0; color: white; background: transparent; font-size: 1.1rem; cursor: pointer; }
.data-window-controls { display: grid; grid-template-columns: 1fr 130px; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.data-window-list { max-height: 260px; overflow-y: auto; }
.data-row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-bottom: 1px solid #edf0eb; cursor: pointer; }
.data-row:hover { background: #f5f7f3; }
.data-row span { display: flex; min-width: 0; flex-direction: column; }
.data-row strong, .data-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-row small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.empty-window { padding: 30px; color: var(--muted); text-align: center; }
.data-window-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.data-window-footer a { color: var(--orange); font-size: .75rem; }
.data-window-dock { position: fixed; z-index: 24; right: 18px; bottom: 18px; padding: 11px 14px; border: 0; border-radius: 99px; color: white; background: var(--green); box-shadow: 0 10px 30px rgba(31,55,47,.2); cursor: pointer; }
.my-data-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }
.toolbar-actions .primary-button { margin-top: 0; }
.my-data-table-wrap { overflow-x: auto; }
.my-data-table { width: 100%; border-collapse: collapse; }
.my-data-table th, .my-data-table td { padding: 11px 9px; border-bottom: 1px solid #edf0eb; text-align: left; white-space: nowrap; }
.my-data-table th { color: var(--muted); font-size: .75rem; }
.my-data-table td { font-size: .82rem; }
.my-data-table a { color: var(--orange); font-weight: 700; }

.form-section { margin: 0 0 8px; border: 1px solid #e1e7df; border-radius: 10px; background: #fff; overflow: hidden; }
.form-section > summary { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: #f7f9f6; cursor: pointer; list-style: none; font-size: .9rem; font-weight: 760; }
.form-section > summary::-webkit-details-marker { display: none; }
.form-section[open] > summary { border-bottom: 1px solid #e7ebe5; background: #f1f5f1; }
.section-progress { margin-left: 6px; padding: 2px 7px; border-radius: 99px; color: #426259; background: #e1ebe5; font-size: .66rem; font-weight: 700; }
.section-chevron { color: var(--muted); }
.section-content { padding: 10px 12px; }
.measurement-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.compact-group { min-width: 0; padding: 9px; border: 1px solid #e8ece6; border-radius: 8px; background: #fbfcfa; }
.compact-group h3 { display: flex; gap: 5px; align-items: center; margin: 0 0 7px; font-size: .78rem; }
.inline-fields, .compound-control, .age-control { display: flex; gap: 6px; align-items: end; }
.inline-fields label { flex: 1; min-width: 0; color: var(--muted); font-size: .69rem; }
.inline-fields input { margin-top: 3px; }
.compound-control > input { min-width: 0; flex: 1; }
.compound-control > select { width: auto; min-width: 104px; }
.control-suffix { min-height: 34px; display: grid; place-items: center; margin-left: -7px; padding: 0 10px; border: 1px solid #bdc8c0; border-left: 0; border-radius: 0 7px 7px 0; background: #eef1ed; }
.density-saved, .canonical-hint { display: block; margin-top: 5px; color: var(--muted); font-size: .66rem; }
.paste-summary { margin-left: 10px; color: var(--muted); font-size: .75rem; }
.age-control input { min-width: 70px; }
.age-control select { width: 66px; min-width: 66px; }

.paste-dialog { width: min(680px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 14px; color: var(--ink); box-shadow: 0 24px 80px rgba(18,44,37,.28); }
.paste-dialog::backdrop { background: rgba(18,35,30,.38); backdrop-filter: blur(2px); }
.paste-dialog form > header, .paste-dialog form > footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 15px; }
.paste-dialog form > header { border-bottom: 1px solid var(--line); }
.paste-dialog header div { display: flex; flex-direction: column; gap: 3px; }
.paste-dialog header small { color: var(--muted); }
.paste-dialog header button { border: 0; background: transparent; font-size: 1.25rem; cursor: pointer; }
.paste-dialog form > footer { justify-content: flex-end; border-top: 1px solid var(--line); }
.paste-dialog .primary-button { margin: 0; }
.paste-input { display: block; width: calc(100% - 30px); min-height: 180px; margin: 15px; padding: 11px; border: 1px solid #aebbb4; border-radius: 8px; font-family: Consolas, monospace; resize: vertical; }
.paste-example { margin: 0 15px 12px; padding: 10px; border-radius: 7px; color: #89918d; background: #f2f3f1; font: .72rem/1.45 Consolas, monospace; white-space: pre; }
.paste-feedback { min-height: 20px; margin: 0 15px; color: #9a4137; font-size: .78rem; }
.inline-form { display: inline; }
.danger-link, .restore-link { padding: 0; border: 0; background: transparent; color: #9a4137; font-weight: 700; cursor: pointer; }
.restore-link { color: #27614b; }

@media (max-width: 850px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 42vh; padding: 42px 28px; }
  .brand-panel h1 { font-size: clamp(2rem, 8.5vw, 3.3rem); }
  .auth-card { margin: 28px auto; padding: 30px; }
  .workspace-header { grid-template-columns: 1fr auto; padding: 0 18px; gap: 0 14px; }
  .workspace-brand { min-height: 56px; }
  .workspace-nav { grid-column: 1 / -1; min-height: 56px; }
  .nav-tab { padding: 0 14px; }
  .account-menu summary { min-width: 0; }
  .account-identity { display: none; }
  .account-data-shortcut { margin: -3px 8px 3px; font-size: .66rem; }
}

@media (max-width: 620px) {
  .qxrd-paste-strip { grid-template-columns: 1fr; }
  .registration-form, .profile-card dl, .summary-grid { grid-template-columns: 1fr; }
  .field-group { grid-column: 1 / -1; }
  .action-card { align-items: start; flex-direction: column; }
  .workspace-main { width: min(100% - 28px, 1120px); margin-top: 34px; }
  .workspace-brand small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .form-grid, .file-grid, .raw-data-grid, .measurement-groups { grid-template-columns: 1fr; }
  .oxide-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .record-summary { grid-template-columns: auto minmax(130px,1fr) auto; }
  .record-summary .summary-custom, .record-summary time, .record-summary code { display: none; }
  .module-body { padding: 10px; }
  .record-form { padding: 12px; }
  .record-form fieldset { padding: 12px; }
  .card-actions { margin: 0 -12px -12px; padding: 10px 12px; flex-wrap: wrap; }
  .data-window-controls { grid-template-columns: 1fr; }
  .my-data-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { justify-content: flex-start; }
}

/* Compact data-entry workspace */
.workspace-main { width: min(1440px, calc(100% - 24px)); margin: 14px auto; }
.entry-intro { margin-bottom: 8px; font-size: .82rem; }
.entry-module { margin-bottom: 12px; border-radius: 14px; }
.module-heading { padding: 9px 14px; }
.module-body { padding: 8px; }
.record-card-list { gap: 8px; }
.record-head { display: grid; grid-template-columns: 1fr auto; align-items: stretch; background: #fbfcfa; }
.record-summary { grid-template-columns: auto minmax(145px,.9fr) minmax(190px,1.05fr) minmax(120px,.8fr) minmax(110px,.65fr) auto; gap: 10px; padding: 9px 12px; background: transparent; }
.summary-completeness { color: #365f50; font-size: .72rem; font-weight: 700; white-space: nowrap; }.summary-completeness.core-complete { color: #176246; }
.header-remove { margin: 7px 9px 7px 0; padding: 0 10px; border: 1px solid #d9c3bc; border-radius: 7px; color: #8d4035; background: white; cursor: pointer; }
.record-form { padding: 8px; }
.form-grid { gap: 6px 9px; }
.record-form input:not([type=file]), .record-form select, .record-form textarea { min-height: 31px; padding: 4px 7px; border-radius: 6px; }
.file-grid, .raw-data-grid { gap: 10px; margin-top: 9px; }
.oxide-grid { grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px 7px; margin-top: 7px; }
.oxide-grid label { font-size: .68rem; }
.raw-data-grid section { padding: 10px; }
.data-work-window { position: fixed; z-index: 40; top: 82px; right: 14px; width: min(430px, calc(100vw - 28px)); max-height: calc(100vh - 100px); margin: 0; box-shadow: 0 18px 55px rgba(31,55,47,.24); }
.data-window-list { max-height: calc(100vh - 290px); }
.form-section > summary { padding: 7px 10px; font-size: .84rem; }
.section-content { padding: 7px 9px; }
.measurement-groups { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.compact-group { padding: 7px; }
.source-disabled { opacity: .62; }
.psd-toolbar { display: flex; flex-wrap: wrap; gap: 7px 10px; align-items: center; }
.psd-results { display: flex; flex: 1; gap: 6px; justify-content: flex-end; }
.psd-results label { display: flex; min-width: 105px; align-items: center; gap: 4px; color: var(--muted); font-size: .7rem; }
.psd-results input { width: 70px !important; }
.psd-results span { font-size: .68rem; }
.field-tip.show-help::after, .field-tip:hover::after, .field-tip:focus::after { white-space: pre-line; }
.field-example-visual { margin: 16px; padding: 16px; border: 1px solid #d9dfda; border-radius: 9px; color: #7d8882; background: #f1f3f0; }
.field-example-visual pre { margin: 0; color: #6f7974; font: .82rem/1.7 Consolas, monospace; white-space: pre-wrap; }
.field-example-visual svg { display: block; width: 100%; max-height: 230px; }
.field-example-visual svg path { fill: none; stroke: #7c8882; stroke-width: 2; }
.field-example-visual svg .example-curve { stroke: #527266; stroke-width: 3; }
.field-example-visual svg text { fill: #66726c; font-size: 12px; }
.field-example-visual .required-example, .field-example-visual svg .required-example { color: #b42318; fill: #b42318; font-weight: 800; }
.field-example-caption { margin: 0 16px 14px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.record-card { border: 2px solid #c5d1c9; box-shadow: 0 2px 8px rgba(31,55,47,.09); }
.record-head { background: #eaf0eb; border-bottom: 1px solid #cfd9d2; }
.record-form[hidden] + * { display: none; }
.material-form > .form-section:first-of-type .form-grid { grid-template-columns: repeat(5,minmax(120px,1fr)); }
.fixed-unit { min-height: 31px; display: grid; place-items: center; padding: 0 8px; border: 1px solid #bdc8c0; border-radius: 6px; background: #eef1ed; white-space: nowrap; }
.three-source-grid, .two-source-grid { display: grid; gap: 7px; margin: 7px 0; }
.three-source-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.two-source-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.source-option { min-width: 0; min-height: 58px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 7px 9px; border: 1px solid #cad4cd; border-radius: 8px; color: var(--ink); background: #f8faf7; text-align: left; }
button.source-option { width: 100%; cursor: pointer; }
.source-option input[type=file] { width: 100%; font-size: .7rem; }
.source-option small { color: var(--muted); }
.psd-results { margin-top: 7px; }
.standard-meta { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 7px; }
.nmr-block + .nmr-block { margin-top: 9px; padding-top: 9px; border-top: 1px solid #e2e7e3; }
.qxrd-result-editor { margin-top: 10px; border: 1px solid #dce6df; border-radius: 9px; background: #f8fbf9; }
.qxrd-result-editor > summary { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; cursor: pointer; list-style: none; }
.qxrd-result-editor > summary::-webkit-details-marker { display: none; }
.qxrd-result-editor > summary span:first-child { display: grid; gap: 2px; }
.qxrd-result-editor > summary small { color: #65786f; font-weight: 500; }
.qxrd-result-editor > summary span:last-child { color: #a74e26; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.qxrd-result-body { padding: 0 10px 10px; }
.qxrd-paste-strip { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; margin: 8px 0; }
.qxrd-paste-strip textarea { min-height: 64px; resize: vertical; font: .76rem/1.45 ui-monospace,Consolas,monospace; }
.qxrd-table { min-width: 820px; }
.qxrd-table th:nth-child(1) { width: 17%; }.qxrd-table th:nth-child(2) { width: 12%; }.qxrd-table th:nth-child(3) { width: 14%; }.qxrd-table th:nth-child(4) { width: 17%; }.qxrd-table th:nth-child(5) { width: 13%; }.qxrd-table th:nth-child(6) { width: 22%; }
.qxrd-table input,.qxrd-table select { width: 100%; min-width: 0; }
.qxrd-paste-feedback { min-height: 18px; margin: 5px 0 0; color: #365f50; font-size: .75rem; }
.nmr-mode { max-width: 190px; }
.source-disabled { opacity: .45; background: #eef0ee; }
.data-window-controls { padding: 8px; }
.data-row { padding: 7px 10px; }
.data-window-list { scrollbar-width: thin; }
.measurement-workflow { display: grid; grid-template-columns: minmax(0,3fr) 34px minmax(190px,1fr); gap: 8px; align-items: stretch; width: 100%; }
.data-mode { width: min(190px,100%) !important; margin-bottom: 5px; }
.compact-source-grid { margin: 0; }
.compact-source-grid .source-option { min-height: 48px; padding: 5px 7px; }
.workflow-arrow { display: grid; place-items: center; color: #82928a; font-size: 1.5rem; font-weight: 800; }
.workflow-arrow.pulse { animation: result-pulse .7s ease-out; }
@keyframes result-pulse { 0% { color: var(--orange); transform: translateX(-5px) scale(1.25); } 100% { color: #82928a; transform: none; } }
.psd-results.result-panel { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0; padding: 7px; border: 1px solid #d8e0da; border-radius: 8px; background: #f7faf7; }
.psd-results.result-panel label { min-width: 0; display: grid; grid-template-columns: 30px 1fr 24px; }
.psd-results.result-panel input { width: 100% !important; }
.psd-completeness { color: var(--muted); font-size: .65rem; }
.image-source input[type=file] { max-width: 100%; }
.image-source select, .image-source input:not([type=file]) { min-height: 27px !important; font-size: .68rem; }
.image-source .text-button { padding: 2px 0; font-size: .7rem; }
.characterization-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 8px; }
.analysis-subsection { min-width: 0; padding: 7px; border: 1px solid #e3e8e4; border-radius: 8px; }
.analysis-subsection h3 { margin: 0 0 5px; font-size: .8rem; }
.analysis-toolbar { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; }
.analysis-toolbar .secondary-button { min-height: 29px; padding: 4px 8px; font-size: .72rem; font-weight: 700; line-height: 1.25; }
.analysis-toolbar .xrf-total { margin: 0 0 0 auto; }
.xrf-panel .analysis-toolbar { min-height: 34px; padding: 4px 0 2px; border-top: 1px solid #edf0ed; border-bottom: 1px solid #edf0ed; }
.xrf-panel .paste-summary { margin-left: 0; }
.xrf-panel .oxide-grid { grid-template-columns: repeat(5,minmax(70px,1fr)); }
.xrf-panel .oxide-grid input { min-height: 27px; padding: 3px 5px; }
.ftir-panel .three-source-grid { grid-template-columns: repeat(3,minmax(105px,1fr)); }
.image-paste-zone { margin: 15px; padding: 34px 16px; border: 2px dashed #aebbb4; border-radius: 10px; color: var(--muted); background: #f5f7f4; text-align: center; }
.image-paste-zone:focus { outline: 3px solid rgba(31,75,64,.15); border-color: var(--green); }
.image-paste-preview { display: grid; place-items: center; margin: 0 15px 12px; }
.image-paste-preview img { max-width: 100%; max-height: 260px; border: 1px solid var(--line); }

/* Entry workspace visual hierarchy and curve capture */
.entry-module { border: 1px solid #d6dfd9; background: #f6f8f5; box-shadow: 0 4px 16px rgba(31,55,47,.045); }
.module-heading { border-radius: 13px 13px 0 0; background: #edf3ee; }
.record-card { overflow: hidden; border-color: #b7c8bd; background: #fff; box-shadow: 0 4px 13px rgba(31,55,47,.11); }
.record-card + .record-card { margin-top: 3px; }
.record-head { overflow: hidden; border-radius: 14px 14px 0 0; border-bottom-color: #b9c9bf; background: linear-gradient(90deg,#e4eee7 0,#f2f6f2 72%,#e8f0ea 100%); }
.record-card:has(.record-form[hidden]) .record-head { border-radius: 14px; border-bottom: 0; }
.record-summary:hover { background: rgba(255,255,255,.5); }
.record-form { background: #fbfcfa; }
.form-section { overflow: hidden; border-color: #d5ddd7; border-radius: 9px; background: #fff; }
.form-section:has(.field-tip.show-help), .form-section:has(.field-tip:focus) { position: relative; z-index: 25; }
.form-section[open] { border-color: #9eb5a7; box-shadow: 0 2px 8px rgba(31,55,47,.07); }
.form-section > summary { border-radius: 8px; background: #f1f5f1; }
.form-section[open] > summary { border-radius: 8px 8px 0 0; }
.form-section[open] > summary { color: #153f34; background: #e7efe9; }
.form-section > summary:hover { background: #e9f0eb; }
.record-form input:not([type=file]):focus, .record-form select:focus, .record-form textarea:focus { outline: 2px solid rgba(167,82,40,.18); border-color: #9a5a39; box-shadow: none; }
.data-block-heading, .analysis-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.data-block-heading > strong { color: #193f35; font-size: .76rem; white-space: nowrap; }
.data-block-heading .data-mode { width: 145px !important; margin: 0; }
.analysis-title h3 { margin: 0; }
.analysis-title small { color: var(--muted); font-size: .66rem; }
.compact-source-grid { grid-template-columns: repeat(3,minmax(105px,1fr)); }
.source-option { border-color: #c7d3cb; background: #fbfcfa; }
.source-option:not(.source-disabled):hover { border-color: #87a092; background: #f2f7f3; }
.source-option:not(.source-disabled) { box-shadow: inset 0 2px 0 rgba(31,75,64,.05); }
.source-option strong { font-size: .72rem; line-height: 1.25; }
.source-option input[type=file] { color: var(--muted); }
.clipboard-button { min-height: 28px; padding: 3px 8px; border-color: #9fb4a7; font-size: .68rem; }
.image-source .clipboard-button { margin: 1px 0; }
.workflow-arrow { position: relative; }
.workflow-arrow::after { content: "提取"; position: absolute; top: calc(50% + 17px); color: var(--muted); font-size: .56rem; font-weight: 500; }
.result-panel { border-left: 3px solid #8ca697 !important; }
.raw-data-grid { grid-template-columns: minmax(0,.95fr) minmax(0,1.15fr); }
.nmr-block { padding: 7px; border: 1px solid #e0e7e2; border-radius: 8px; background: #fafcfa; }
.nmr-block + .nmr-block { margin-top: 7px; padding-top: 7px; border-top-color: #d5dfd8; }
.characterization-grid { align-items: start; }
.xrf-panel .oxide-grid { grid-template-columns: repeat(7,minmax(62px,1fr)); }
.xrf-panel .oxide-grid label { min-width: 0; }
.xrf-panel .oxide-grid input { width: 100%; }
.curve-digitizer-dialog { width: min(980px,calc(100vw - 28px)); }
.digitizer-body { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 12px; padding: 14px; }
.digitizer-canvas-wrap { position: relative; min-height: 260px; display: grid; place-items: center; overflow: auto; border: 1px solid #c9d4cd; border-radius: 9px; background: #eef1ee; }
.digitizer-canvas { max-width: 100%; cursor: crosshair; box-shadow: 0 2px 10px rgba(31,55,47,.15); }
.digitizer-status { position: absolute; left: 8px; bottom: 8px; padding: 4px 7px; border-radius: 5px; color: white; background: rgba(24,61,51,.84); font-size: .68rem; }
.digitizer-controls { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 7px; }
.digitizer-controls label { min-width: 0; color: var(--muted); font-size: .68rem; }
.digitizer-controls input, .digitizer-controls select { width: 100%; min-height: 31px; margin-top: 3px; }
.digitizer-curve-controls, .digitizer-normalize, .digitizer-note { grid-column: 1 / -1; }
.digitizer-curve-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding-bottom: 7px; border-bottom: 1px solid #dce3de; }
.digitizer-curve-controls[hidden] { display: none; }
.digitizer-normalize { display: flex; align-items: flex-start; gap: 6px; color: var(--ink) !important; }
.digitizer-normalize input { width: auto; min-height: auto; margin-top: 2px; }
.digitizer-note { margin: 3px 0 0; }
.curve-digitizer-dialog .paste-feedback { min-height: 24px; margin: 0 14px; color: #a53b2c; font-weight: 700; }
.digitizer-canvas.needs-action { animation: calibration-needed .55s ease-out; }

/* TR-MAT-002 / TR-UX-006: compact, owner-visible curve results. */
.owner-curve-panel { margin-top: .75rem; padding: .65rem .75rem; border: 1px solid #d7e0db; border-radius: 10px; background: #f8faf8; }
.owner-curve-head, .curve-card-head, .review-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.owner-curve-head div, .curve-card-head div { display: grid; gap: .15rem; }
.owner-curve-actions { display: flex !important; align-items: center; gap: .45rem !important; }
.owner-curve-head small, .curve-card-head small { color: #65736d; }
.owner-curve-panel canvas { display: block; width: 100%; height: 112px; margin-top: .45rem; border-radius: 7px; }
.owner-curve-table { margin-top: .6rem; }
.owner-curve-table table, .curve-table-panel table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.owner-curve-table th, .owner-curve-table td, .curve-table-panel th, .curve-table-panel td { padding: .38rem .55rem; border-bottom: 1px solid #e1e7e3; text-align: left; }
.curve-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .45rem 0; color: #65736d; }
[aria-disabled="true"] { pointer-events: none; opacity: .48; }

/* TR-ADMIN-001: superuser-only read-only research console. */
.review-page { background: #f2f5f3; }
.review-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: .8rem clamp(1rem,4vw,3.5rem); color: #fff; background: #173f33; box-shadow: 0 2px 12px rgba(19,50,41,.18); }
.review-header > div { display: grid; gap: .1rem; }.review-header a { color: inherit; text-decoration: none; font-weight: 700; }.review-header small { color: #c8d9d2; }.review-header nav { display: flex; gap: 1.25rem; }
.review-main { width: min(1500px, calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0 3rem; }
.review-title { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.2rem; }.review-title h1 { margin: .15rem 0; }.review-title p { margin: 0; color: #65736d; }
.review-summary-grid { display: grid; grid-template-columns: repeat(5,minmax(130px,1fr)); gap: .75rem; margin-bottom: 1rem; }.review-summary-grid article { display: grid; gap: .2rem; padding: 1rem; border: 1px solid #d8e1dc; border-radius: 12px; background: #fff; }.review-summary-grid strong { font-size: 1.6rem; color: #244f40; }.review-summary-grid span { color: #65736d; font-size: .84rem; }
.review-filters { display: grid; grid-template-columns: minmax(220px,2fr) repeat(5,minmax(115px,1fr)) auto auto; gap: .65rem; align-items: end; padding: 1rem; margin-bottom: 1rem; border: 1px solid #d8e1dc; border-radius: 12px; background: #fff; }.review-filters label { display: grid; gap: .3rem; color: #53635c; font-size: .82rem; }.review-filters input,.review-filters select { min-width: 0; }
.review-table-card,.review-section { padding: 1rem; margin-bottom: 1rem; border: 1px solid #d8e1dc; border-radius: 12px; background: #fff; }.review-table { width: 100%; border-collapse: collapse; }.review-table th,.review-table td { padding: .7rem .65rem; border-bottom: 1px solid #e2e8e4; text-align: left; vertical-align: top; }.review-table td strong,.review-table td small { display: block; }.review-table td small { margin-top: .2rem; color: #718078; }
.status-pill,.quality-ok,.quality-warn { display: inline-flex; width: max-content; padding: .18rem .48rem; border-radius: 999px; font-size: .76rem; font-weight: 750; }.status-pill.complete,.quality-ok { color: #216348; background: #ddf3e8; }.status-pill.draft,.quality-warn { color: #8a5b18; background: #fff0d5; }.quality-warn { margin: .1rem .25rem .1rem 0; }
.review-info-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .55rem; margin-bottom: .7rem; }.review-info-grid article { display: grid; align-content: start; gap: .12rem; min-width: 0; padding: .65rem .8rem; border: 1px solid #d8e1dc; border-radius: 10px; background: #fff; }.review-info-grid article.wide { grid-column: span 2; }.review-info-grid strong,.review-info-grid small { overflow-wrap: anywhere; }.review-info-grid span,.review-info-grid small { color: #65736d; }
.review-section-head { margin-bottom: .8rem; }.review-section-head h2,.review-section-head p { margin: 0; }.review-section-head p { margin-top: .2rem; color: #65736d; }
.metric-grid { display: grid; grid-template-columns: repeat(6,minmax(120px,1fr)); gap: .6rem; }.metric-grid span { display: grid; gap: .2rem; padding: .7rem; border-radius: 8px; background: #f4f7f5; color: #65736d; }.metric-grid strong { color: #263b33; }
.review-curves-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }.review-curve-card { min-width: 0; padding: .7rem; border: 1px solid #dce4df; border-radius: 10px; background: #fafcfb; }.curve-version-tabs { display: flex; flex-wrap: wrap; align-content: flex-start; gap: .3rem; max-height: 4.9rem; overflow-y: auto; padding: .4rem 0; scrollbar-gutter: stable; }.curve-version-button { flex: 0 0 auto; padding: .26rem .5rem; border: 1px solid #cbd8d1; border-radius: 999px; color: #3b5d50; background: #fff; cursor: pointer; }.curve-version-button.active { color: #fff; border-color: #326b58; background: #326b58; }.curve-inspection-meta { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 1.6rem; }.curve-inspection-meta span { padding: .16rem .4rem; border-radius: 5px; color: #53635c; background: #eaf0ed; font-size: .75rem; }.curve-review-canvas { display: block; width: 100%; height: 190px; margin: .4rem 0; border: 1px solid #e0e7e3; border-radius: 8px; }.curve-review-actions { display: flex; gap: .5rem; }
.link-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: .55rem; }.link-list a,.link-list > div { display: flex; justify-content: space-between; gap: .5rem; padding: .7rem; border: 1px solid #dce4df; border-radius: 8px; color: #284f40; text-decoration: none; background: #f8faf9; }.history-strip { display: flex; gap: .6rem; overflow-x: auto; }.history-strip article { display: grid; flex: 0 0 210px; gap: .2rem; padding: .7rem; border-radius: 8px; background: #f4f7f5; }.history-strip span,.history-strip small { color: #65736d; }

@media (max-width: 980px) { .review-summary-grid { grid-template-columns: repeat(2,1fr); }.review-filters,.review-info-grid { grid-template-columns: repeat(2,1fr); }.metric-grid { grid-template-columns: repeat(3,1fr); }.review-curves-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .review-header { align-items: flex-start; }.review-header nav { display: grid; gap: .3rem; text-align: right; }.review-main { width: min(100% - 1rem,1500px); }.review-filters,.review-info-grid,.metric-grid { grid-template-columns: 1fr; }.review-info-grid article.wide { grid-column: auto; }.review-title { align-items: flex-start; flex-direction: column; }.owner-curve-panel canvas { height: 96px; } }
.curve-source-files { display: grid; gap: .3rem; margin-top: .65rem; padding-top: .6rem; border-top: 1px solid #e0e7e3; }
.curve-source-files a { overflow-wrap: anywhere; color: #2b624f; text-decoration: none; }
.curve-source-files small { color: #6b7973; }
.compact-review-table { min-width: 520px; }
.chemistry-metric-grid { grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); }
.review-note { margin: .8rem 0 0; padding: .65rem .75rem; border-radius: 8px; background: #f4f7f5; }
.review-two-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.review-two-columns h3 { margin: 0 0 .5rem; }
@media (max-width: 980px) { .review-two-columns { grid-template-columns: 1fr; } }
@keyframes calibration-needed { 0%,100% { outline: 0 solid rgba(183,65,44,0); } 45% { outline: 5px solid rgba(183,65,44,.42); } }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; }

/* Structured MIX workflow */
.mix-form .section-content { display: grid; gap: 7px; }
.mix-form { --mix-section-text: .84rem; --mix-subsection-text: .9rem; --mix-field-text: .72rem; --mix-control-text: .8rem; --mix-note-text: .68rem; }
.mix-form .form-section > summary { font-size: var(--mix-section-text); line-height: 1.3; }
.mix-form .subsection-head > strong { font-size: var(--mix-subsection-text); line-height: 1.25; }
.mix-form .form-grid label, .mix-form .entry-table th { font-size: var(--mix-field-text); line-height: 1.25; }
.mix-form input:not([type=file]), .mix-form select, .mix-form textarea { font-size: var(--mix-control-text); line-height: 1.25; }
.mix-form .field-note, .mix-form .subsection-head small, .mix-form .inline-optional { font-size: var(--mix-note-text); line-height: 1.35; }
.mix-form .form-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px 8px; }
.mix-form .process-grid { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 5px 7px; }
.process-grid .process-short { grid-column: span 1; }
.process-grid .process-medium { grid-column: span 2; }
.process-grid .process-wide { grid-column: span 2; }
.process-grid .process-age { grid-column: span 2; }
.mix-material-pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.mix-block { min-width: 0; padding: 6px 8px; border: 1px solid #dbe3dd; border-radius: 9px; background: #fbfcfa; }
.mix-block + .mix-block { margin-top: 2px; }
.subsection-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; margin: 2px 0 6px; color: #193f35; }
.subsection-head small { color: var(--muted); font-size: .68rem; font-weight: 500; }
.subsection-head.minor { margin-top: 12px; padding-top: 9px; border-top: 1px solid #e1e7e2; }
.compact-total { display: flex; gap: 7px; align-items: center; padding: 3px 4px 3px 8px; border: 1px solid #b9cec1; border-radius: 7px; color: #214d40; background: #edf5f0; font-size: .72rem; font-weight: 750; }
.compact-total span { white-space: nowrap; }
.compact-total input { width: 112px !important; min-height: 27px !important; border-color: #9fb9aa !important; background: #fff !important; }
.mix-block .field-note { margin-bottom: 4px; line-height: 1.3; }
.mix-block .entry-table th { padding: 4px; }
.mix-block .entry-table td { padding: 3px 2px; }
.mix-block .entry-table input, .mix-block .entry-table select { min-height: 29px; padding: 3px 6px; }
.composition-table { table-layout: fixed; }
.composition-table th:last-child { width: 32px; }
.solid-composition-table th:nth-child(2) { width: 42%; }
.activator-composition-table th:nth-child(2) { width: 42%; }
.activator-species-control { display: flex; gap: 4px; }
.activator-species-control .activator-custom { flex: 1; min-width: 110px; }
.aggregate-grid { grid-template-columns: minmax(90px,1fr) minmax(170px,2fr) repeat(7,minmax(80px,1fr)) !important; gap: 5px 8px !important; }
.aggregate-grid .aggregate-source { grid-column: auto; }
.stone-property-grid { grid-template-columns: minmax(190px,2fr) repeat(5,minmax(105px,1fr)) !important; }
.row-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: .74rem; }
.row-footer strong { color: #1d5745; }
.full-label { display: grid; gap: 4px; margin-top: 8px; color: #354b45; font-size: .74rem; font-weight: 700; }
.table-scroll { width: 100%; overflow-x: auto; }
.specimen-table { min-width: 900px; }
.curing-table { min-width: 860px; table-layout: fixed; }
.specimen-table input, .specimen-table select, .curing-table input, .curing-table select { min-width: 88px; }
.curing-table th:nth-child(1) { width: 19%; }
.curing-table th:nth-child(2), .curing-table th:nth-child(3) { width: 11%; }
.curing-table th:nth-child(4) { width: 19%; }
.curing-table th:nth-child(5) { width: 36%; }
.curing-table th:last-child { width: 32px; }
.curing-table th { padding: 3px 4px; }
.curing-table td { padding: 2px; vertical-align: middle; }
.curing-end-cell { display: flex; align-items: center; gap: 6px; }
.curing-end-cell .curing-end-control { min-width: 0; flex: 1; }
.curing-method-control { display: flex; gap: 4px; }
.curing-method-control .curing-custom { min-width: 90px; flex: 1; }
.specimen-table input[type=radio], .specimen-table input[type=checkbox] { min-width: auto; width: auto; }
.advanced-block { padding: 7px 9px; border: 1px dashed #c7d2ca; border-radius: 8px; background: #f7f9f6; }
.advanced-block > summary { color: #315a4e; font-size: .75rem; font-weight: 750; cursor: pointer; }
.performance-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.performance-toolbar .field-note { margin: 0; }
.performance-toolbar label { display: flex; gap: 6px; align-items: center; color: #354b45; font-size: .74rem; }
.performance-toolbar input { width: auto !important; min-height: auto !important; }
.strength-warning { min-width: 0; padding: 3px 7px; border-left: 3px solid #b66a3c; border-radius: 4px; color: #74432c !important; background: #fff3e9; font-size: .68rem !important; font-weight: 700 !important; }
.result-table { width: 100%; min-width: 960px; table-layout: fixed; }
.fresh-result-table { width: 100%; min-width: 0; }
.fresh-result-table th:nth-child(1) { width: 44%; }
.fresh-result-table th:nth-child(2) { width: 16%; }
.fresh-result-table th:nth-child(3) { width: 36%; }
.fresh-result-table th:nth-child(4) { width: 32px; }
.hardened-result-table th:nth-child(1) { width: 130px; }
.hardened-result-table th:nth-child(2) { width: 220px; }
.hardened-result-table th:nth-child(3) { width: 275px; }
.hardened-result-table th:nth-child(4) { width: 135px; }
.hardened-result-table th:nth-child(5) { width: auto; }
.hardened-result-table th:nth-child(6) { width: 32px; }
.performance-group { min-width: 0; padding: 7px 8px; border: 1px solid #dfe6e1; border-radius: 8px; background: #fafcfa; }
.hardened-performance-head { display: grid; grid-template-columns: auto minmax(320px,1fr) auto; justify-content: stretch; }
.hardened-performance-head .age-hint { text-align: right; white-space: nowrap; }
.property-editor { display: grid; gap: 4px; }
.custom-property-fields { display: grid; grid-template-columns: 1fr 70px; gap: 4px; min-width: 190px; }
.custom-property-fields input { min-width: 88px !important; }
.custom-property-fields[hidden] { display: none; }
.property-not-applicable { background: #fff1ee; }
.property-not-applicable .property-name { border-color: #bd6657 !important; }
.sand-block[hidden], .stone-block[hidden] { display: none; }
.inline-optional { margin-top: 5px; color: var(--muted); font-size: .7rem; }
.inline-optional summary { cursor: pointer; }
.inline-optional textarea { min-height: 50px; margin-top: 4px; }
.text-button { width: max-content; max-width: 100%; justify-self: start; }
.conditional-other[hidden], .experiment-field[hidden], .literature-field[hidden] { display: none; }
.sand-custom-field[hidden] { display: none; }
.continues-control { display: flex; align-items: center; gap: 4px; margin: 0; color: #355047; font-size: .68rem; font-weight: 650; white-space: nowrap; }
.continues-control input { width: auto !important; min-width: 0 !important; min-height: 0 !important; }
.curing-end-control[hidden] { display: none; }
.sieve-heading { margin-top: 7px !important; padding-top: 6px !important; }
.sieve-scroll { overflow-x: auto; }
.sieve-table { display: block; width: 100%; min-width: 930px; max-width: none; }
.sieve-table tbody { display: grid; grid-template-rows: repeat(2,minmax(35px,auto)); grid-template-columns: 92px; grid-auto-columns: minmax(102px,1fr); grid-auto-flow: column; gap: 4px 6px; align-items: center; width: 100%; }
.sieve-table tbody::before, .sieve-table tbody::after { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; align-self: stretch; padding: 4px 6px; color: var(--muted); background: #fbfcfa; font-size: var(--mix-field-text); font-weight: 700; }
.sieve-table tbody::before { content: "筛孔 / mm"; grid-row: 1; grid-column: 1; }
.sieve-table tbody::after { content: "累计筛余 / %"; grid-row: 2; grid-column: 1; }
.sieve-table tbody tr { display: contents; }
.sieve-table tbody tr > td:first-child { grid-row: 1; align-self: stretch; }
.sieve-table tbody tr > td:nth-child(2) { grid-row: 2; align-self: stretch; }
.sieve-table td { display: block; min-width: 0; padding: 2px !important; border-top: 0 !important; }
.sieve-table input { min-width: 0 !important; }
.sieve-position { display: grid; grid-template-columns: minmax(48px,1fr) auto; gap: 2px; align-items: center; min-height: 29px; height: 100%; }
.sieve-pan-label { width: 100%; padding: 5px 7px; border: 1px solid #c8d2cb; border-radius: 6px; color: #315247; background: #eef3ef; }
.sieve-actions { display: inline-flex; gap: 0; }
.sieve-actions button { width: 17px; min-height: 26px; padding: 0; border: 0; background: transparent; font-size: .8rem; cursor: pointer; }
.row-insert { color: #28705a; }
.compact-group h3, .compact-group h3 .unit { font-size: .74rem; line-height: 1.25; }
.compact-group h3 .unit { color: var(--muted); font-weight: 600; }
.measurement-groups .compound-control select, .measurement-groups .compound-control input { font-size: .72rem; }
.form-message.floating-feedback { position: fixed; z-index: 100; left: 50%; bottom: 18px; width: min(720px,calc(100vw - 28px)); margin: 0; transform: translateX(-50%); border: 1px solid #d9a69e; box-shadow: 0 10px 35px rgba(91,39,31,.22); font-size: .82rem; font-weight: 750; }

@media (max-width: 900px) {
  .oxide-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .record-summary { grid-template-columns: auto minmax(130px,1fr) minmax(120px,1fr) auto; }
  .record-summary time { display: none; }
  .material-form > .form-section:first-of-type .form-grid { grid-template-columns: repeat(4,minmax(110px,1fr)); }
  .measurement-workflow { grid-template-columns: 1fr; }
  .workflow-arrow { transform: rotate(90deg); }
  .characterization-grid { grid-template-columns: 1fr; }
  .raw-data-grid { grid-template-columns: 1fr; }
  .digitizer-body { grid-template-columns: 1fr; }
  .mix-form .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mix-form .process-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .process-grid > label { grid-column: auto !important; }
  .aggregate-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .aggregate-grid .aggregate-source { grid-column: span 2; }
  .mix-material-pair { grid-template-columns: 1fr; }
  .sieve-table { min-width: 930px; }
  .hardened-performance-head { grid-template-columns: 1fr; }
  .hardened-performance-head .age-hint { text-align: left; }
}
