:root {
    --app-bg: #eef2f7;
    --app-surface: rgba(255, 255, 255, 0.82);
    --app-surface-strong: rgba(255, 255, 255, 0.9);
    --app-line: rgba(15, 23, 42, 0.09);
    --app-line-strong: rgba(15, 23, 42, 0.14);
    --app-text: #0f172a;
    --app-muted: #667085;
    --app-accent: #0071e3;
    --app-accent-strong: #0058b0;
    --app-accent-soft: rgba(0, 113, 227, 0.12);
    --app-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
    --app-shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.1);
    --app-radius-xl: 28px;
    --app-radius-lg: 22px;
    --app-radius-md: 15px;
    --app-radius-sm: 12px;
}

/* Plate dosing layout */
.dose-tool {
    display: grid;
    gap: 1rem;
}

.dose-hero,
.dose-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--app-radius-xl);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.dose-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: clamp(1.15rem, 2vw, 1.55rem);
    background:
        radial-gradient(circle at 92% 12%, rgba(14, 165, 233, 0.2), rgba(14, 165, 233, 0) 34%),
        linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.78));
}

.dose-eyebrow,
.dose-section-tag {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    color: #075fb8;
    background: rgba(10, 118, 234, 0.1);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dose-eyebrow {
    padding: 0.34rem 0.68rem;
}

.dose-section-tag {
    padding: 0.28rem 0.62rem;
}

.dose-hero h3,
.dose-card h4 {
    margin: 0;
    color: #102036;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.dose-hero h3 {
    margin-top: 0.65rem;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.dose-hero p,
.dose-card-head p {
    margin: 0.4rem 0 0;
    color: var(--app-muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

.dose-hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.dose-hero-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 0.72rem;
    border: 1px solid rgba(10, 118, 234, 0.1);
    border-radius: 999px;
    color: #315b84;
    background: rgba(255, 255, 255, 0.68);
    font-size: 0.75rem;
    font-weight: 700;
}

.dose-card {
    padding: clamp(1rem, 1.8vw, 1.35rem);
}

.dose-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dose-card h4 {
    margin-top: 0.5rem;
    font-size: 1rem;
}

.dose-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dose-mode-switch button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 4.25rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: var(--app-radius-lg);
    color: #52677f;
    background: rgba(248, 250, 252, 0.72);
    text-align: left;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.dose-mode-switch button:hover {
    transform: translateY(-1px);
    border-color: rgba(10, 118, 234, 0.22);
}

.dose-mode-switch button[data-active="true"] {
    color: #075fb8;
    border-color: rgba(10, 118, 234, 0.24);
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.78), rgba(255, 255, 255, 0.92));
    box-shadow: 0 12px 24px rgba(10, 118, 234, 0.1);
}

.dose-mode-switch button > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    border-radius: 0.8rem;
    color: #64748b;
    background: rgba(15, 23, 42, 0.06);
}

.dose-mode-switch button[data-active="true"] > i {
    color: #fff;
    background: linear-gradient(135deg, #0a76ea, #22a5f6);
    box-shadow: 0 8px 18px rgba(10, 118, 234, 0.2);
}

.dose-mode-switch button span {
    display: grid;
    gap: 0.2rem;
}

.dose-mode-switch strong {
    color: inherit;
    font-size: 0.88rem;
}

.dose-mode-switch small {
    color: var(--app-muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.dose-config-grid,
.dose-drug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.dose-drug-grid {
    margin-bottom: 0.85rem;
}

.dose-field,
.dose-item-field {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.dose-field > span,
.dose-item-field small {
    color: #52677f;
    font-size: 0.76rem;
    font-weight: 750;
}

.dose-input {
    width: 100%;
    min-height: 2.7rem;
    padding: 0.62rem 0.78rem;
    border: 1px solid rgba(15, 23, 42, 0.11);
    border-radius: var(--app-radius-md);
    outline: none;
    color: #172b43;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.84rem;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.dose-input:hover {
    border-color: rgba(10, 118, 234, 0.22);
}

.dose-input:focus {
    border-color: rgba(10, 118, 234, 0.54);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10, 118, 234, 0.1);
}

.dose-item-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.7rem;
}

.dose-item-row {
    display: grid;
    grid-template-columns: 2.3rem 2.4rem minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    padding: 0.68rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--app-radius-lg);
    background: rgba(248, 250, 252, 0.7);
}

.dose-gradient-list .dose-item-row {
    grid-template-columns: 2.3rem 1rem minmax(0, 1fr) auto;
}

.dose-item-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    border-radius: 0.72rem;
    color: #075fb8;
    background: rgba(10, 118, 234, 0.1);
    font-size: 0.73rem;
    font-weight: 800;
}

.dose-color-input {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0.18rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.75rem;
    background: #fff;
    cursor: pointer;
}

.dose-gradient-swatch {
    width: 0.8rem;
    height: 2.5rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.dose-unit-preview {
    max-width: 5rem;
    overflow: hidden;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dose-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}

.dose-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border: 0;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.dose-btn:hover {
    transform: translateY(-1px);
}

.dose-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #0874e6, #16a3e6);
    box-shadow: 0 12px 24px rgba(10, 118, 234, 0.22);
}

.dose-btn-light {
    color: #52677f;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.92);
}

.dose-workspace-card {
    overflow: hidden;
}

.dose-empty-state {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    border: 1px dashed rgba(100, 116, 139, 0.28);
    border-radius: var(--app-radius-lg);
    color: #52677f;
    background: rgba(248, 250, 252, 0.58);
    text-align: center;
}

.dose-empty-icon,
.dose-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #0874e6;
    background: rgba(10, 118, 234, 0.1);
}

.dose-empty-icon {
    width: 3.1rem;
    height: 3.1rem;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.dose-empty-state strong {
    color: #20364e;
    font-size: 0.94rem;
}

.dose-empty-state p {
    margin: 0.35rem 0 0;
    color: var(--app-muted);
    font-size: 0.8rem;
}

.dose-summary,
.dose-summary > div,
.dose-plate-head,
.dose-plate-head > div {
    display: flex;
    align-items: center;
}

.dose-summary {
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(34, 197, 94, 0.14);
    border-radius: var(--app-radius-lg);
    background: rgba(240, 253, 244, 0.72);
}

.dose-summary > div {
    gap: 0.7rem;
}

.dose-summary-icon {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    color: #16803c;
    background: rgba(34, 197, 94, 0.12);
}

.dose-summary strong {
    color: #153d28;
    font-size: 0.86rem;
}

.dose-summary p {
    margin: 0.18rem 0 0;
    color: #527161;
    font-size: 0.75rem;
}

.dose-selection-note {
    padding: 0.42rem 0.66rem;
    border-radius: 999px;
    color: #17643a;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 750;
    white-space: nowrap;
}

.dose-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.dose-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    max-width: 100%;
    padding: 0.38rem 0.58rem;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 999px;
    color: #52677f;
    background: rgba(248, 250, 252, 0.8);
    font-size: 0.71rem;
}

.dose-legend-item i {
    width: 0.68rem;
    height: 0.68rem;
    flex: 0 0 auto;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.dose-legend-item strong {
    color: #223a55;
}

.dose-plate-stack {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.dose-plate-block {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--app-radius-lg);
    background: rgba(248, 250, 252, 0.74);
}

.dose-plate-head {
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.65rem;
    color: #64748b;
    font-size: 0.73rem;
}

.dose-plate-head > div {
    gap: 0.5rem;
}

.dose-plate-head strong {
    color: #20364e;
    font-size: 0.85rem;
}

.dose-plate-scroll {
    overflow-x: auto;
    padding: 0.2rem 0 0.3rem;
    overscroll-behavior-x: contain;
}

.dose-plate-grid {
    display: grid;
    grid-template-columns: 28px repeat(var(--dose-cols), var(--dose-cell-size));
    gap: 0.3rem;
    width: max-content;
    min-width: 100%;
}

.dose-axis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    color: #718096;
    font-size: 0.68rem;
    font-weight: 800;
}

.dose-group-axis,
.dose-group-gap,
.dose-group-label {
    min-height: 1.55rem;
}

.dose-group-label {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.28rem 0.45rem;
    border: 1px solid color-mix(in srgb, var(--dose-group-color), #ffffff 58%);
    border-top: 3px solid var(--dose-group-color);
    border-radius: 0.55rem 0.55rem 0.35rem 0.35rem;
    color: #29415b;
    background: color-mix(in srgb, var(--dose-group-color), #ffffff 88%);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dose-group-mixed {
    --dose-group-color: #94a3b8;
    color: #64748b;
}

.dose-group-gap {
    pointer-events: none;
}

.dose-direction-vertical .dose-group-label {
    min-height: 2.7rem;
    padding-inline: 0.22rem;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
}

.dose-well {
    position: relative;
    display: flex;
    width: var(--dose-cell-size);
    height: var(--dose-cell-size);
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.04rem;
    padding: 0.18rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 38%;
    outline: none;
    line-height: 1;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.dose-well:hover {
    z-index: 2;
    transform: translateY(-2px) scale(1.04);
}

.dose-well:focus-visible {
    box-shadow: 0 0 0 3px rgba(10, 118, 234, 0.2);
}

.dose-well-empty {
    color: #a8b5c5;
    background: rgba(255, 255, 255, 0.78);
}

.dose-well-empty span {
    font-size: clamp(0.48rem, 0.8vw, 0.65rem);
}

.dose-well-filled {
    color: var(--dose-well-text);
    border-color: color-mix(in srgb, var(--dose-well-bg), #0f172a 16%);
    background: var(--dose-well-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 5px 10px rgba(15, 23, 42, 0.08);
    cursor: grab;
}

.dose-well-filled:active {
    cursor: grabbing;
}

.dose-well strong {
    font-size: clamp(0.56rem, 0.85vw, 0.72rem);
}

.dose-well small {
    color: inherit;
    font-size: clamp(0.48rem, 0.72vw, 0.62rem);
    opacity: 0.88;
}

.dose-well.is-selected {
    z-index: 3;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.26), 0 8px 16px rgba(15, 23, 42, 0.12);
    transform: scale(1.06);
}

.dose-well.is-dragging {
    opacity: 0.45;
}

@media (max-width: 720px) {
    .dose-hero,
    .dose-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .dose-hero-tags {
        justify-content: flex-start;
    }

    .dose-mode-switch {
        grid-template-columns: 1fr;
    }

    .dose-item-list {
        grid-template-columns: 1fr;
    }

    .dose-selection-note {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .dose-card,
    .dose-hero {
        padding: 0.9rem;
    }

    .dose-actions,
    .dose-btn {
        width: 100%;
    }

    .dose-item-row {
        grid-template-columns: 2.15rem 2.25rem minmax(0, 1fr);
        gap: 0.5rem;
        padding: 0.58rem;
    }

    .dose-gradient-list .dose-item-row {
        grid-template-columns: 2.15rem 0.8rem minmax(0, 1fr);
    }

    .dose-gradient-list .dose-unit-preview {
        grid-column: 3;
        padding-left: 0.1rem;
    }
}

.dose-quick-head,
.dose-editor-head,
.dose-workspace-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dose-quick-head h3 {
    margin: 0.55rem 0 0;
    color: #102036;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 750;
    letter-spacing: -0.02em;
}

.dose-quick-head p,
.dose-workspace-title p {
    margin: 0.35rem 0 0;
    color: var(--app-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.dose-reset-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    flex: 0 0 auto;
    padding: 0.45rem 0.65rem;
    border: 0;
    border-radius: 999px;
    color: #60748d;
    background: rgba(15, 23, 42, 0.05);
    font-size: 0.74rem;
    font-weight: 750;
}

.dose-reset-link:hover {
    color: #075fb8;
    background: rgba(10, 118, 234, 0.09);
}

.dose-mode-tabs {
    display: inline-flex;
    gap: 0.25rem;
    margin: 1rem 0 0.85rem;
    padding: 0.25rem;
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.055);
}

.dose-mode-tabs button {
    min-height: 2.25rem;
    padding: 0.45rem 0.8rem;
    border: 0;
    border-radius: 0.68rem;
    color: #64748b;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 750;
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.dose-mode-tabs button[data-active="true"] {
    color: #075fb8;
    background: #fff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
}

.dose-config-grid-simple {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.dose-editor-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.dose-editor-head {
    align-items: center;
    margin-bottom: 0.7rem;
}

.dose-editor-head strong {
    color: #29415b;
    font-size: 0.82rem;
}

.dose-editor-head span,
.dose-workspace-title > span {
    color: #718096;
    font-size: 0.72rem;
}
.dose-workspace-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.dose-workspace-actions > span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
}

.dose-drug-grid-simple {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.dose-item-row-simple {
    padding: 0.55rem 0.62rem;
}

.dose-item-row-simple .dose-input {
    min-height: 2.35rem;
    padding-block: 0.48rem;
}

.dose-auto-swatch {
    width: 1rem;
    height: 2.2rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.dose-editor-subtitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin: 0.85rem 0 0.55rem;
}

.dose-editor-subtitle strong {
    color: #29415b;
    font-size: 0.78rem;
}

.dose-editor-subtitle span {
    color: #718096;
    font-size: 0.7rem;
}

.dose-multi-swatch {
    display: flex;
    width: 1rem;
    height: 2.2rem;
    overflow: hidden;
    flex-direction: column;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.dose-multi-swatch i {
    min-height: 2px;
    flex: 1;
}

.dose-workspace-title {
    align-items: center;
    margin-bottom: 0.8rem;
}

.dose-workspace-title h4 {
    margin: 0;
}

.dose-workspace-title > span {
    padding: 0.4rem 0.62rem;
    border-radius: 999px;
    color: #075fb8;
    background: rgba(10, 118, 234, 0.09);
    font-weight: 750;
    white-space: nowrap;
}

.dose-summary-simple {
    padding-block: 0.72rem;
}

.dose-select {
    position: relative;
}

.dose-select-button {
    display: flex;
    width: 100%;
    min-height: 2.7rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.62rem 0.78rem;
    border: 1px solid rgba(15, 23, 42, 0.11);
    border-radius: var(--app-radius-md);
    color: #172b43;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.84rem;
    text-align: left;
}

.dose-select-button:hover,
.dose-select[data-open="true"] .dose-select-button {
    border-color: rgba(10, 118, 234, 0.42);
    box-shadow: 0 0 0 3px rgba(10, 118, 234, 0.08);
}

.dose-select-button i {
    color: #718096;
    transition: transform 160ms ease;
}

.dose-select[data-open="true"] .dose-select-button i {
    transform: rotate(180deg);
}

.dose-select-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    display: none;
    gap: 0.2rem;
    padding: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--app-radius-md);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.dose-select[data-open="true"] .dose-select-menu {
    display: grid;
}

.dose-select-menu button {
    min-height: 2.25rem;
    padding: 0.45rem 0.62rem;
    border: 0;
    border-radius: 0.58rem;
    color: #52677f;
    background: transparent;
    font-size: 0.78rem;
    text-align: left;
}

.dose-select-menu button:hover,
.dose-select-menu button[data-active="true"] {
    color: #075fb8;
    background: rgba(10, 118, 234, 0.09);
}

.dose-edge-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.9rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid rgba(14, 116, 144, 0.13);
    border-radius: var(--app-radius-lg);
    background: rgba(240, 249, 255, 0.62);
}

.dose-edge-setting > div:first-child {
    display: grid;
    gap: 0.2rem;
}

.dose-edge-setting strong {
    color: #29415b;
    font-size: 0.8rem;
}

.dose-edge-setting > div:first-child span {
    color: #718096;
    font-size: 0.72rem;
}

.dose-edge-tabs {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.2rem;
    padding: 0.22rem;
    border-radius: 0.72rem;
    background: rgba(15, 23, 42, 0.055);
}

.dose-edge-tabs button {
    min-height: 2.1rem;
    padding: 0.38rem 0.62rem;
    border: 0;
    border-radius: 0.55rem;
    color: #64748b;
    background: transparent;
    font-size: 0.73rem;
    font-weight: 750;
}

.dose-edge-tabs button[data-active="true"] {
    color: #075fb8;
    background: #fff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.dose-range-setting {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.7rem;
    padding: 0.78rem 0.85rem;
    border: 1px solid rgba(234, 88, 12, 0.15);
    border-radius: var(--app-radius-lg);
    background: rgba(255, 247, 237, 0.66);
}

.dose-range-setting[data-visible="true"] {
    display: flex;
}

.dose-range-setting > div:first-child {
    display: grid;
    gap: 0.2rem;
}

.dose-range-setting strong {
    color: #7c2d12;
    font-size: 0.8rem;
}

.dose-range-setting > div:first-child span {
    color: #9a654d;
    font-size: 0.72rem;
}

.dose-range-inputs {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    flex: 0 0 auto;
}

.dose-range-inputs .dose-field {
    width: 6.5rem;
}

.dose-range-inputs .dose-input {
    text-transform: uppercase;
}

.dose-range-arrow {
    display: inline-flex;
    min-height: 2.7rem;
    align-items: center;
    color: #9a654d;
}

.dose-input-invalid {
    border-color: rgba(220, 38, 38, 0.58) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.09) !important;
}

.dose-well-locked {
    cursor: not-allowed;
    opacity: 0.9;
}

.dose-well-pbs {
    border-color: #bae6fd;
    color: #0369a1;
    background: repeating-linear-gradient(135deg, #e0f2fe, #e0f2fe 5px, #bae6fd 5px, #bae6fd 7px);
}

.dose-well-unused {
    border-style: dashed;
    color: #94a3b8;
    background: rgba(226, 232, 240, 0.66);
}

.dose-well-locked strong {
    font-size: clamp(0.48rem, 0.78vw, 0.65rem);
}

@media (max-width: 840px) {
    .dose-config-grid-simple {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 520px) {
    .dose-quick-head,
    .dose-workspace-title {
        align-items: flex-start;
    }

    .dose-config-grid-simple,
    .dose-drug-grid-simple {
        grid-template-columns: 1fr 1fr;
    }

    .dose-mode-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .dose-mode-tabs button {
        padding-inline: 0.45rem;
    }

    .dose-edge-setting {
        align-items: flex-start;
        flex-direction: column;
    }

    .dose-range-setting {
        align-items: flex-start;
        flex-direction: column;
    }

    .dose-edge-tabs {
        width: 100%;
    }

    .dose-edge-tabs button {
        flex: 1;
    }

    .dose-range-inputs {
        width: 100%;
    }

    .dose-range-inputs .dose-field {
        width: auto;
        flex: 1;
    }
}

@media (max-width: 380px) {
    .dose-config-grid-simple,
    .dose-drug-grid-simple {
        grid-template-columns: 1fr;
    }
}

html {
    scroll-behavior: smooth;
}

body.app-shell-body {
    color: var(--app-text);
    font-family: "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
    background:
        radial-gradient(1200px 800px at -12% -8%, rgba(0, 113, 227, 0.13), rgba(0, 113, 227, 0) 62%),
        radial-gradient(1000px 700px at 108% 104%, rgba(95, 145, 210, 0.14), rgba(95, 145, 210, 0) 60%),
        linear-gradient(160deg, #f8fafc 0%, #eef2f7 48%, #f6f8fb 100%);
    overflow-x: hidden;
}

body.app-shell-body::before,
body.app-shell-body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
    border-radius: 999px;
    filter: blur(20px);
}

body.app-shell-body::before {
    width: 30rem;
    height: 30rem;
    top: -12rem;
    left: -8rem;
    background: radial-gradient(circle at 34% 35%, rgba(0, 113, 227, 0.28), rgba(0, 113, 227, 0));
}

body.app-shell-body::after {
    width: 26rem;
    height: 26rem;
    right: -8rem;
    bottom: -7rem;
    background: radial-gradient(circle at 58% 48%, rgba(116, 146, 186, 0.24), rgba(116, 146, 186, 0));
}

.app-shell {
    position: relative;
    z-index: 1;
    width: 95% !important;
    max-width: 1800px;
    padding-top: clamp(1.9rem, 3vh, 2.6rem) !important;
    padding-bottom: clamp(1.6rem, 2.6vh, 2.3rem) !important;
}

.app-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(148, 163, 184, 0.16) 0.5px, transparent 0.5px);
    background-size: 4px 4px;
    opacity: 0.2;
}

.glass-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.82)) !important;
    border-radius: var(--app-radius-xl) !important;
    border-color: rgba(255, 255, 255, 0.68) !important;
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    box-shadow: var(--app-shadow) !important;
}

.app-header {
    position: relative;
    overflow: hidden;
    padding: 1.15rem clamp(1.25rem, 2vw, 2rem) !important;
}

.app-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
        radial-gradient(circle at 100% 0%, rgba(10, 118, 234, 0.12), rgba(10, 118, 234, 0) 30%);
    pointer-events: none;
}

.app-header-grid {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.app-brand-block {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.app-title-row {
    display: flex;
    align-items: center;
    gap: 0.9rem 1rem;
    flex-wrap: wrap;
}

.app-title-row h1 {
    color: #0b1220;
    font-size: clamp(1.8rem, 3vw, 2.35rem) !important;
    font-weight: 740;
    letter-spacing: -0.035em;
}

.app-header-summary {
    display: grid;
    justify-items: end;
    gap: 0.22rem;
    flex: 0 0 auto;
    color: #475467;
    text-align: right;
}

.app-header-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 2.35rem;
    padding: 0.48rem 0.9rem;
    border: 1px solid rgba(0, 113, 227, 0.22);
    border-radius: 999px;
    color: var(--app-accent-strong);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.app-header-nav-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 113, 227, 0.42);
    background: #fff;
    box-shadow: 0 12px 24px rgba(0, 113, 227, 0.14);
}

.app-header-nav-btn i {
    line-height: 1;
}

.app-header-nav-btn::after {
    content: "\2192";
    margin-left: 0.12rem;
    font-size: 0.95rem;
    line-height: 1;
    transition: transform 180ms ease;
}

.app-header-nav-btn:hover::after {
    transform: translateX(2px);
}

.app-header-summary strong {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
}

.app-header-summary small {
    color: #7a8799;
    font-size: 0.76rem;
}

.app-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.app-badge-row-inline {
    margin-top: 0;
}

.app-badge,
.panel-badge,
.panel-status,
.app-summary-label,
.app-sidebar-note-label,
.app-hero-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    letter-spacing: 0.03em;
}

.app-badge {
    padding: 0.38rem 0.78rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--app-accent-strong);
    background: #e7f2ff;
    border: 1px solid #b8d8ff;
    box-shadow: none;
}

.app-summary-label,
.app-sidebar-note-label {
    padding: 0.3rem 0.7rem;
    width: fit-content;
    font-size: 0.7rem;
    font-weight: 700;
    color: #47617e;
    background: rgba(15, 23, 42, 0.05);
}

.app-stage {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    scroll-margin-top: 1.5rem;
}

.app-sidebar,
.app-main {
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.app-stage > .app-sidebar.glass-card,
.app-stage > .app-main.glass-card {
    box-shadow: none !important;
}

.app-stage > .app-sidebar.glass-card::before,
.app-stage > .app-sidebar.glass-card::after,
.app-stage > .app-main.glass-card::before,
.app-stage > .app-main.glass-card::after {
    content: none !important;
    display: none !important;
}

.app-main,
.panel-stage,
#panel-content {
    overflow: visible !important;
}

.app-main {
    padding: clamp(1rem, 1.5vw, 1.4rem) !important;
}

@media (min-width: 1024px) {
    .app-stage {
        grid-template-columns: 300px minmax(0, 1fr) !important;
    }

    .app-stage > .app-sidebar.glass-card,
    .app-stage > .app-main.glass-card {
        border-radius: var(--app-radius-lg) !important;
        border: 1px solid rgba(255, 255, 255, 0.72) !important;
        background: linear-gradient(170deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76)) !important;
        box-shadow: none !important;
    }
}

.mobile-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.mobile-guide-modal[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
}

.mobile-guide-dialog {
    width: min(100%, 24rem);
    padding: 1.1rem;
    border-radius: var(--app-radius-xl) !important;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.mobile-guide-dialog-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--app-accent), #22a5f6);
    box-shadow: 0 12px 24px rgba(10, 118, 234, 0.22);
}

.mobile-guide-dialog-copy h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
    color: #0f1f35;
}

.mobile-guide-dialog-copy p {
    margin: 0.35rem 0 0;
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--app-muted);
}

.mobile-guide-close {
    width: 100%;
    min-height: 2.85rem;
    border: 0;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--app-accent), #22a5f6);
    box-shadow: 0 14px 28px rgba(10, 118, 234, 0.24);
}

.menu-guide-btn {
    position: relative;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    animation: menuGuidePulse 1.9s ease-in-out infinite;
}

@keyframes menuGuidePulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 14px 28px rgba(10, 118, 234, 0.2);
    }
}

#feature-nav,
#feature-nav-mobile {
    gap: 0.45rem;
}

.feature-btn {
    border: 1px solid transparent;
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        background-color 220ms ease,
        box-shadow 220ms ease,
        color 220ms ease;
}

.feature-btn:hover {
    transform: translateY(-1px);
}

.desktop-feature-btn,
.mobile-feature-btn {
    padding: 0.68rem 0.72rem !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.desktop-feature-btn[data-active="true"],
.mobile-feature-btn[data-active="true"] {
    color: #fff;
    background: linear-gradient(135deg, var(--app-accent), #2f8cff);
    border-color: rgba(0, 113, 227, 0.38);
    box-shadow: 0 14px 28px rgba(0, 113, 227, 0.28);
}

.feature-btn-layout,
.feature-btn-main,
.feature-btn-copy {
    display: flex;
}

.feature-btn-layout {
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.feature-btn-main {
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.feature-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.feature-btn-copy {
    flex-direction: column;
    gap: 0.16rem;
    min-width: 0;
}

.feature-btn-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #13253c;
}

.feature-btn-subtitle {
    display: block;
    overflow: visible;
    min-height: 1.96rem;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--app-muted);
    white-space: normal;
    -webkit-box-orient: initial;
    -webkit-line-clamp: unset;
}

.feature-btn-index {
    flex-shrink: 0;
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 700;
    color: #6a7c94;
    background: rgba(15, 23, 42, 0.05);
}

.desktop-feature-btn[data-active="true"] .feature-btn-index,
.mobile-feature-btn[data-active="true"] .feature-btn-index {
    color: #fff;
    background: linear-gradient(135deg, var(--app-accent), #22a5f6);
    box-shadow: 0 10px 24px rgba(10, 118, 234, 0.24);
}

.feature-nav-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.03));
    color: #5e6e84;
}

.desktop-feature-btn[data-active="true"] .feature-btn-name,
.mobile-feature-btn[data-active="true"] .feature-btn-name {
    color: #fff;
}

.desktop-feature-btn[data-active="true"] .feature-btn-subtitle,
.mobile-feature-btn[data-active="true"] .feature-btn-subtitle {
    color: rgba(255, 255, 255, 0.78);
}

.desktop-feature-btn[data-active="true"] .feature-nav-icon,
.mobile-feature-btn[data-active="true"] .feature-nav-icon,
.desktop-feature-btn[data-active="true"] .feature-btn-index,
.mobile-feature-btn[data-active="true"] .feature-btn-index {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.app-panel-head {
    margin-bottom: 1rem !important;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--app-radius-lg);
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
    box-shadow: none;
}

.panel-title-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.mobile-feature-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.25rem;
    padding: 0.42rem 0.82rem;
    border: 1px solid rgba(239, 68, 68, 0.24);
    border-radius: 999px;
    background: #fee2e2;
    color: #c81e1e;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.12);
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.mobile-feature-switch-btn:hover {
    border-color: rgba(239, 68, 68, 0.36);
    background: #fecaca;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.16);
}

@media (min-width: 1024px) {
    .mobile-feature-switch-btn {
        display: none;
    }
}

.panel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.panel-badge,
.panel-status {
    padding: 0.28rem 0.68rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.panel-badge {
    color: var(--app-accent-strong);
    background: rgba(10, 118, 234, 0.1);
}

.panel-status {
    color: #47617d;
    background: rgba(15, 23, 42, 0.05);
}

.panel-subtitle {
    margin: 0.3rem 0 0;
    font-size: 0.87rem;
    color: var(--app-muted);
}

.panel-stage {
    position: relative;
    min-height: 0;
    padding-top: 0;
    background: transparent;
    border-radius: 0 !important;
    overflow: visible !important;
}

.panel-stage::before {
    content: none;
}

#panel-content {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#panel-content > * {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 100%;
}

.site-logo {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        0 16px 32px rgba(0, 113, 227, 0.28) !important;
}

.feature-icon,
.other-tool-icon,
.other-tool-arrow,
.mobile-guide-dialog-icon,
.menu-guide-btn {
    flex-shrink: 0;
}

.feature-icon {
    min-width: 2rem;
    min-height: 2rem;
    aspect-ratio: 1 / 1;
}

.feature-nav-icon i,
.feature-icon i,
.other-tool-arrow i,
.mobile-guide-dialog-icon i,
.menu-guide-btn i {
    line-height: 1;
}

.other-tool-icon {
    line-height: 1;
    aspect-ratio: 1 / 1;
}

.seed-tool,
.bca-tool,
.mol-tool,
.animal-tool,
.prep-tool,
.pcr-tool,
.dt-tool {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.seed-tool {
    gap: 0.75rem;
}

.bca-tool {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.seed-mode-panel {
    display: grid;
    gap: 0.85rem;
    padding: 0.9rem !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.seed-mode-switch {
    display: inline-flex;
    width: fit-content;
    align-self: flex-start;
}

.seed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
    justify-content: flex-start;
    align-items: start;
    gap: 1rem 1.15rem;
}

.seed-field {
    width: 100%;
    max-width: 360px;
}

.seed-field-full {
    max-width: 520px;
}

.seed-input-wrap,
.seed-inline {
    max-width: 100%;
}

.seed-extra {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
    padding: 0.15rem 0 0;
}

.seed-extra-input {
    width: auto;
    max-width: 140px;
}

.seed-extra-input .seed-input {
    min-width: 100px;
}

.seed-actions {
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.1rem;
}

.bca-hero,
.mol-hero,
.animal-hero,
.prep-hero,
.dt-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.1rem 0 0.2rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.bca-top-grid,
.bca-bottom {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.bca-top-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) !important;
}

.bca-top-grid > .bca-card,
.bca-chart-shell,
.bca-chart {
    min-width: 0;
    max-width: 100%;
}

.bca-chart-shell {
    overflow: hidden !important;
}

.bca-chart canvas {
    display: block !important;
    max-width: 100% !important;
}

@media (max-width: 1279px) {
    .bca-top-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.bca-eyebrow,
.mol-eyebrow,
.animal-eyebrow,
.prep-eyebrow,
.dt-eyebrow,
.bca-pill,
.mol-section-tag,
.animal-section-tag,
.prep-section-tag,
.pcr-section-tag,
.dt-section-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.74rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--app-accent-strong);
    background: rgba(10, 118, 234, 0.1);
}

.bca-hero h3,
.mol-hero h3,
.animal-hero h3,
.prep-hero h3,
.dt-hero h3 {
    margin-top: 0.6rem;
    font-size: 1.26rem;
}

.bca-hero p,
.mol-hero p,
.animal-hero p,
.prep-hero p,
.dt-hero p,
.bca-hint,
.mol-hint,
.animal-hint,
.prep-hint,
.pcr-hint,
.dt-hint {
    margin: 0.55rem 0 0;
    line-height: 1.65;
    color: var(--app-muted);
}

.bca-hero-pills,
.mol-hero-tags,
.animal-hero-tags,
.prep-hero-tags,
.dt-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.bca-hero-pills span,
.mol-hero-tags span,
.animal-hero-tags span,
.prep-hero-tags span,
.dt-hero-tags span {
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2a4868;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.seed-mode-panel,
.bca-card,
.mol-card,
.mol-mini-card,
.animal-card,
.animal-result-card,
.prep-card,
.prep-result-card,
.pcr-card,
.pcr-template-box,
.dt-card,
.dt-result-card,
.dt-table-wrap,
.bca-chart-shell,
.bca-block {
    border-radius: var(--app-radius-lg) !important;
    border: 1px solid rgba(255, 255, 255, 0.64) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.58)) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
}

.seed-mode-panel,
.bca-card,
.mol-card,
.mol-mini-card,
.animal-card,
.prep-card,
.pcr-card,
.dt-card {
    padding: 1rem;
}

.bca-head,
.bca-card-head,
.mol-card-head,
.animal-card-head,
.prep-card-head,
.pcr-card-head,
.dt-card-head,
.pcr-subhead,
.prep-subhead,
.animal-subhead,
.bca-subhead,
.dt-subhead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.seed-title,
.bca-card h3,
.bca-card h4,
.mol-card h4,
.mol-mini-card h5,
.animal-card h4,
.prep-card h4,
.pcr-card h4,
.dt-card h4 {
    color: #0f1f35;
}

.seed-grid,
.bca-top-grid,
.mol-grid,
.mol-mini-grid,
.animal-grid,
.prep-grid,
.pcr-grid,
.dt-grid {
    gap: 0.9rem;
}

.seed-field,
.mol-field,
.animal-field,
.prep-field,
.pcr-field,
.dt-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.seed-label,
.mol-field > span,
.animal-field > span,
.prep-field > span,
.pcr-field > span,
.dt-field > span,
.bca-inline span:first-child {
    font-size: 0.8rem;
    font-weight: 700;
    color: #29425f;
}

.seed-input,
.bca-input,
.mol-input,
.animal-input,
.prep-input,
.pcr-input,
.dt-input,
.dt-textarea {
    width: 100%;
    border-radius: var(--app-radius-md) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #102036 !important;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.seed-input,
.bca-input,
.mol-input,
.animal-input,
.prep-input,
.pcr-input,
.dt-input {
    min-height: 2.85rem;
    padding: 0 0.95rem;
}

.dt-textarea {
    min-height: 13rem;
    padding: 0.9rem 0.95rem;
    resize: vertical;
}

.seed-input:hover,
.bca-input:hover,
.mol-input:hover,
.animal-input:hover,
.prep-input:hover,
.pcr-input:hover,
.dt-input:hover,
.dt-textarea:hover,
.x-select-btn:hover,
.bca-select-btn:hover,
.mol-select-btn:hover,
.animal-select-btn:hover,
.prep-select-btn:hover,
.pcr-select-btn:hover,
.dt-select-btn:hover {
    border-color: rgba(10, 118, 234, 0.36) !important;
}

.seed-input:focus,
.bca-input:focus,
.mol-input:focus,
.animal-input:focus,
.prep-input:focus,
.pcr-input:focus,
.dt-input:focus,
.dt-textarea:focus {
    border-color: rgba(10, 118, 234, 0.66) !important;
    box-shadow: 0 0 0 4px rgba(10, 118, 234, 0.12) !important;
}

.schedule-tool {
    display: grid;
    gap: 1rem;
}

.schedule-card,
.schedule-print-sheet,
.schedule-group {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--app-radius-lg);
    background: #fff;
}

.schedule-card {
    padding: 1rem;
}

.schedule-card-head,
.schedule-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.schedule-section-tag {
    display: inline-flex;
    width: fit-content;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 113, 227, 0.08);
    color: #0b63c7;
    font-size: 0.72rem;
    font-weight: 700;
}

.schedule-card h4,
.schedule-result-head h4,
.schedule-group h5 {
    margin: 0.35rem 0 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
}

.schedule-hint,
.schedule-result-head p {
    margin: 0.45rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.6;
}

.schedule-grid {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.9rem;
}

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

.schedule-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.schedule-grid-three {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(320px, 1.25fr);
}

.schedule-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.schedule-field {
    display: grid;
    gap: 0.42rem;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
}

.schedule-field > span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #29425f;
}

.schedule-input,
.schedule-textarea {
    width: 100%;
    border-radius: var(--app-radius-md) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #102036 !important;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.schedule-input {
    min-height: 2.85rem;
    padding: 0 0.95rem;
}

.schedule-textarea {
    min-height: 8.5rem;
    padding: 0.9rem 0.95rem;
    resize: vertical;
}

.schedule-textarea-small {
    min-height: 6.8rem;
}

.schedule-input:hover,
.schedule-textarea:hover {
    border-color: rgba(10, 118, 234, 0.36) !important;
}

.schedule-input:focus,
.schedule-textarea:focus {
    border-color: rgba(10, 118, 234, 0.66) !important;
    box-shadow: 0 0 0 4px rgba(10, 118, 234, 0.12) !important;
}

.schedule-datetime {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
    gap: 0.55rem;
}

.schedule-datetime-date,
.schedule-datetime-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.85rem;
    border-radius: var(--app-radius-md);
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.35rem 0.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.schedule-datetime-date:focus-within,
.schedule-datetime-time:focus-within {
    border-color: rgba(10, 118, 234, 0.66);
    box-shadow: 0 0 0 4px rgba(10, 118, 234, 0.12);
}

.schedule-datetime-date span,
.schedule-datetime-time span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.schedule-datetime-input {
    width: 2.35rem;
    min-width: 0;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #102036;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 800;
    outline: none;
}

.schedule-datetime-year {
    width: 4.1rem;
}

.schedule-datetime-input:focus {
    background: #eff6ff;
    color: #0b63c7;
}

.schedule-datetime-now {
    flex: 0 0 auto;
    min-height: 2rem;
    border: 1px solid rgba(10, 118, 234, 0.2);
    border-radius: 0.58rem;
    background: rgba(0, 113, 227, 0.08);
    color: #0b63c7;
    padding: 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.schedule-datetime-now:hover {
    background: rgba(0, 113, 227, 0.13);
}

.schedule-segment,
.schedule-choice-grid,
.schedule-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.schedule-segment button,
.schedule-choice-grid button,
.schedule-btn {
    min-height: 2.35rem;
    border-radius: 0.66rem;
    padding: 0 1rem;
    font-size: 0.86rem;
    font-weight: 700;
    transition: background 180ms ease, box-shadow 180ms ease, border-color 180ms ease, color 180ms ease;
}

.schedule-segment button,
.schedule-choice-grid button {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.82);
    color: #334155;
    text-align: center;
}

.schedule-segment button[data-active="true"],
.schedule-choice-grid button[data-active="true"] {
    color: #fff;
    background: linear-gradient(135deg, #0071e3, #00a0dc);
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(0, 113, 227, 0.2);
}

.schedule-choice-grid {
    margin-top: 0;
}

.schedule-choice-grid button {
    flex: 1 1 8.5rem;
}

.schedule-choice-compact button {
    flex-basis: 7rem;
}

.schedule-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    color: #334155;
}

.schedule-btn-primary {
    background: linear-gradient(135deg, #0071e3, #00a0dc);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 18px rgba(0, 113, 227, 0.2);
}

.schedule-btn-light {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.82);
}

.schedule-status {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.5;
}

.schedule-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.8rem, 1fr));
    gap: 0.5rem;
    margin-top: 0.85rem;
    max-height: 22rem;
    overflow: auto;
    padding: 0.2rem 0.1rem 0.3rem;
}

.schedule-time-cell {
    min-height: 2.35rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.62rem;
    background: #fff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.schedule-time-cell:hover {
    border-color: rgba(10, 118, 234, 0.36);
    background: #f8fafc;
}

.schedule-time-cell[data-active="true"] {
    border-color: rgba(0, 113, 227, 0.62);
    background: #eff6ff;
    color: #0b63c7;
    box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.18);
}

.schedule-time-cell[data-start="true"] {
    cursor: default;
    border-color: rgba(15, 23, 42, 0.14);
    background: #f8fafc;
    color: #475569;
    box-shadow: none;
}

.schedule-empty {
    grid-column: 1 / -1;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: var(--app-radius-md);
    background: #f8fafc;
    color: #64748b;
    padding: 0.9rem;
    font-size: 0.84rem;
}

#schedule-print-root {
    display: none;
}

.schedule-result {
    margin-top: 1rem;
}

.schedule-print-sheet {
    padding: 1rem;
}

.schedule-result-count {
    min-width: 4.2rem;
    border-radius: var(--app-radius-md);
    background: #eff6ff;
    color: #0b63c7;
    padding: 0.6rem 0.75rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
}

.schedule-result-count span {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.schedule-alert {
    margin-top: 0.9rem;
    border-radius: var(--app-radius-md);
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 0.75rem 0.85rem;
    color: #334155;
    font-size: 0.84rem;
    line-height: 1.6;
}

.schedule-alert strong {
    display: block;
    color: #0f172a;
    font-size: 0.86rem;
}

.schedule-alert p,
.schedule-alert ul {
    margin: 0.25rem 0 0;
}

.schedule-alert ul {
    padding-left: 1.1rem;
}

.schedule-alert-info {
    background: #f8fafc;
}

.schedule-alert-warn {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, 0.28);
}

.schedule-alert-danger {
    background: #fff1f2;
    border-color: rgba(244, 63, 94, 0.28);
}

.schedule-table-wrap {
    margin-top: 0.9rem;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--app-radius-md);
}

.schedule-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
    background: #fff;
}

.schedule-table th,
.schedule-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 0.68rem 0.75rem;
    text-align: left;
    color: #1e293b;
    font-size: 0.84rem;
    vertical-align: middle;
}

.schedule-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.schedule-table tbody tr:last-child td {
    border-bottom: 0;
}

.schedule-edit-cell {
    border-radius: 0.35rem;
    outline: none;
}

.schedule-edit-cell:hover {
    background: #f8fafc;
}

.schedule-edit-cell:focus {
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.32);
}

.schedule-done-cell {
    width: 5.8rem;
    text-align: center;
}

.schedule-check-box {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    border: 1.8px solid #64748b;
    border-radius: 0.2rem;
    background: #fff;
}

.schedule-group {
    margin-top: 1rem;
    padding: 0.9rem;
}

.schedule-group h5 {
    margin-top: 0;
}

@media (max-width: 960px) {
    .schedule-grid-four,
    .schedule-grid-three,
    .schedule-grid-two {
        grid-template-columns: minmax(0, 1fr);
    }

    .schedule-card-head,
    .schedule-result-head {
        flex-direction: column;
    }

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

@media print {
    @page {
        margin: 12mm;
    }

    html,
    body {
        min-height: 0 !important;
        margin: 0 !important;
        background: #fff !important;
        background-color: #fff !important;
        background-image: none !important;
    }

    html::before,
    html::after,
    body::before,
    body::after {
        display: none !important;
        content: none !important;
        background: none !important;
    }

    body.schedule-printing > *:not(#schedule-print-root) {
        display: none !important;
    }

    body.schedule-printing {
        background: #fff !important;
        background-color: #fff !important;
        background-image: none !important;
    }

    #schedule-print-root {
        display: block !important;
        position: static !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    #schedule-print-root::before,
    #schedule-print-root::after,
    #schedule-print-root *::before,
    #schedule-print-root *::after {
        display: none !important;
        content: none !important;
        background: none !important;
        box-shadow: none !important;
    }

    #schedule-print-root * {
        visibility: visible !important;
        background: #fff !important;
        background-color: #fff !important;
        background-image: none !important;
        box-shadow: none !important;
    }

    .schedule-print-sheet {
        border: 0;
        border-radius: 0;
        padding: 0;
        background: #fff !important;
        box-shadow: none !important;
    }

    .schedule-result-head h4,
    .schedule-result-head p {
        color: #000 !important;
    }

    .schedule-result-count {
        display: none !important;
    }

    .schedule-alert-danger,
    .schedule-section-tag {
        display: none !important;
    }

    .schedule-table-wrap {
        overflow: visible;
        border-radius: 0;
        border-color: #999 !important;
        background: #fff !important;
    }

    .schedule-table {
        min-width: 0;
        page-break-inside: auto;
        background: #fff !important;
    }

    .schedule-table th,
    .schedule-table td {
        color: #000;
        border-color: #aaa;
        background: #fff !important;
        padding: 0.42rem 0.5rem;
        font-size: 10.5pt;
    }

    .schedule-table th {
        background: #fff !important;
        color: #000 !important;
    }

    .schedule-edit-cell,
    .schedule-edit-cell:focus,
    .schedule-edit-cell:hover {
        background: transparent !important;
        box-shadow: none !important;
    }

    .schedule-alert,
    .schedule-group {
        break-inside: avoid;
    }
}

.x-select-btn,
.bca-select-btn,
.mol-select-btn,
.animal-select-btn,
.prep-select-btn,
.pcr-select-btn,
.dt-select-btn {
    width: 100%;
    min-height: 2.85rem;
    padding: 0.45rem 0.95rem;
    border-radius: var(--app-radius-md);
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86));
    color: #11233a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.x-select.open .x-select-btn,
.bca-select.open .bca-select-btn,
.mol-select.open .mol-select-btn,
.animal-select.open .animal-select-btn,
.prep-select.open .prep-select-btn,
.pcr-select.open .pcr-select-btn,
.dt-select.open .dt-select-btn {
    border-color: rgba(10, 118, 234, 0.66);
    box-shadow: 0 0 0 4px rgba(10, 118, 234, 0.12);
}

.x-select-menu,
.bca-select-menu,
.mol-select-menu,
.animal-select-menu,
.prep-select-menu,
.pcr-select-menu,
.dt-select-menu,
.prep-combo-menu {
    margin-top: 0.45rem;
    padding: 0.4rem;
    border-radius: var(--app-radius-lg) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
    z-index: 200 !important;
}

.x-select,
.bca-select,
.mol-select,
.animal-select,
.prep-select,
.pcr-select,
.dt-select,
.prep-combo {
    position: relative;
}

.x-select.open,
.bca-select.open,
.mol-select.open,
.animal-select.open,
.prep-select.open,
.pcr-select.open,
.dt-select.open,
.prep-combo.open {
    z-index: 2400 !important;
}

.x-select.open .x-select-menu,
.bca-select.open .bca-select-menu,
.mol-select.open .mol-select-menu,
.animal-select.open .animal-select-menu,
.prep-select.open .prep-select-menu,
.pcr-select.open .pcr-select-menu,
.dt-select.open .dt-select-menu,
.prep-combo.open .prep-combo-menu {
    z-index: 2500 !important;
}

.prep-tool,
.prep-stack,
.prep-row,
.prep-row-grid,
.prep-field,
.prep-inline {
    overflow: visible !important;
}

.prep-solute-row {
    position: relative;
}

.prep-solute-row.is-combo-open {
    z-index: 2300 !important;
    margin-bottom: clamp(13.5rem, 36vh, 19rem);
}

.prep-combo-menu {
    max-height: min(19rem, 48vh) !important;
    overscroll-behavior: contain;
}

.bca-card,
.mol-card,
.mol-mini-card,
.animal-card,
.prep-card,
.pcr-card,
.dt-card,
.schedule-card {
    overflow: visible !important;
}

.x-select-option,
.bca-select-option,
.mol-select-option,
.animal-select-option,
.prep-select-option,
.pcr-select-option,
.dt-select-option,
.prep-combo-option {
    border-radius: var(--app-radius-sm) !important;
    min-height: 2.4rem;
    transition: background-color 140ms ease, color 140ms ease;
}

.x-select-option:hover,
.bca-select-option:hover,
.mol-select-option:hover,
.animal-select-option:hover,
.prep-select-option:hover,
.pcr-select-option:hover,
.dt-select-option:hover,
.prep-combo-option:hover {
    background: rgba(10, 118, 234, 0.08) !important;
}

.x-select-option.is-selected,
.bca-select-option.is-selected,
.mol-select-option.is-selected,
.animal-select-option.is-selected,
.prep-select-option.is-selected,
.pcr-select-option.is-selected,
.dt-select-option.is-selected,
.prep-combo-option.is-selected {
    background: rgba(10, 118, 234, 0.14) !important;
    color: var(--app-accent-strong) !important;
    font-weight: 700;
}

.seed-btn,
.bca-btn,
.mol-btn,
.animal-btn,
.prep-btn,
.pcr-btn,
.dt-btn {
    min-height: 2.8rem;
    padding: 0.66rem 1rem;
    border-radius: 999px !important;
    border: 1px solid transparent;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.seed-btn:hover,
.bca-btn:hover,
.mol-btn:hover,
.animal-btn:hover,
.prep-btn:hover,
.pcr-btn:hover,
.dt-btn:hover {
    transform: translateY(-1px);
}

.seed-btn-primary,
.bca-btn-primary,
.mol-btn-primary,
.animal-btn-primary,
.prep-btn-primary,
.pcr-btn-primary,
.dt-btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, var(--app-accent), #26a3f2) !important;
    box-shadow: 0 14px 28px rgba(10, 118, 234, 0.24) !important;
}

.seed-btn-secondary,
.bca-btn-secondary,
.mol-btn-secondary,
.animal-btn-secondary {
    color: #0f2540 !important;
    background: rgba(10, 118, 234, 0.08) !important;
    border-color: rgba(10, 118, 234, 0.12) !important;
}

.seed-btn-secondary,
.bca-btn-light,
.mol-btn-light,
.animal-btn-light,
.prep-btn-light,
.pcr-btn-light,
.dt-btn-light,
.dt-btn-ghost {
    color: #0f2540 !important;
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
}

.bca-paste-mode {
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
}

.bca-paste-mode label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
}

.bca-paste-mode input {
    accent-color: var(--app-accent);
}

.mol-mode-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.4rem;
    max-width: 100%;
    padding: 0.25rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
}

.mol-mode-toggle button {
    flex: 0 0 auto;
    min-height: 2.2rem;
    border: 0;
    border-radius: 999px;
    padding: 0 0.9rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.mol-mode-toggle button[data-active="true"] {
    color: #fff;
    background: linear-gradient(135deg, var(--app-accent), #26a3f2);
    box-shadow: 0 8px 16px rgba(10, 118, 234, 0.18);
}

.mol-batch-wrap {
    margin-top: 1rem;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--app-radius-md);
}

.mol-batch-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #fff;
}

.mol-batch-table th,
.mol-batch-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 0.55rem;
}

.mol-batch-table th {
    background: #f8fafc;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: left;
}

.mol-batch-input {
    width: 100%;
    min-height: 2.35rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.62rem;
    background: #fff;
    padding: 0 0.65rem;
    color: #102036;
    font-weight: 700;
    outline: none;
}

.mol-batch-input:focus {
    border-color: rgba(10, 118, 234, 0.58);
    box-shadow: 0 0 0 3px rgba(10, 118, 234, 0.1);
}

.mol-batch-computed {
    border-color: rgba(22, 163, 74, 0.46) !important;
    background: #ecfdf5 !important;
    color: #166534 !important;
}

.mol-batch-invalid {
    border-color: rgba(220, 38, 38, 0.5) !important;
    background: #fef2f2 !important;
}

.mol-batch-status {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.dt-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.dt-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.85rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    padding: 0 0.9rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
}

.dt-radio-group input {
    accent-color: var(--app-accent);
}

.seed-actions,
.bca-actions,
.bca-bottom,
.mol-actions,
.animal-actions,
.prep-actions,
.pcr-actions,
.dt-action-strip,
.dt-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.seed-result,
.mol-result,
.animal-result,
.prep-result,
.pcr-result,
.dt-result,
#bca-result-container {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

#mobile-sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#feature-nav-mobile {
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.seed-alert,
.bca-alert,
.animal-alert,
.prep-alert,
.pcr-alert,
.dt-empty,
.pcr-template-summary,
.prep-template-summary,
.bca-curve-info {
    border-radius: var(--app-radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.seed-alert,
.bca-alert,
.animal-alert,
.prep-alert,
.pcr-alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
}

.bca-hot {
    overflow: hidden;
}

.dt-table-wrap {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.animal-inline {
    flex-wrap: nowrap;
}

.animal-inline > .animal-input,
.animal-inline > .animal-unit,
.animal-inline > .animal-select,
.animal-solvent-main,
.animal-solvent-percent-wrap,
.animal-solvent-percent-wrap > .animal-input,
.pcr-component-col,
.pcr-component-col .pcr-inline > * {
    min-width: 0;
}

.animal-inline > .animal-input {
    flex: 1 1 auto;
}

.animal-inline > .animal-select,
.animal-inline > .animal-unit {
    flex-shrink: 0;
}

.animal-solvent-main {
    overflow: hidden;
}

.animal-solvent-nameplate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcr-table-wrap,
.pcr-layout-table-wrap {
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.pcr-table,
.pcr-layout-table {
    min-width: 560px;
}

.seed-result-card,
.animal-result-card,
.prep-result-card,
.dt-result-card,
.bca-block {
    padding: 1rem;
}

.seed-result-grid,
.animal-stats,
.prep-stats,
.dt-stats,
.mol-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.dt-summary {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    gap: 0.65rem !important;
}

.dt-stats {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.65rem;
}

.seed-result-item,
.animal-stat,
.prep-stat,
.dt-stat,
.mol-stat {
    padding: 0.82rem 0.88rem;
    border-radius: var(--app-radius-md);
    background: rgba(15, 23, 42, 0.035);
}

.dt-stat {
    gap: 0.18rem;
    padding: 0.72rem 0.82rem;
    border-radius: var(--app-radius-sm);
    min-height: 0;
}

.seed-result-item span,
.animal-stat span,
.prep-stat span,
.dt-stat span,
.mol-stat span {
    display: block;
    font-size: 0.76rem;
    color: var(--app-muted);
}

.seed-result-item strong,
.animal-stat strong,
.prep-stat strong,
.dt-stat strong,
.mol-stat strong {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.96rem;
    color: #102036;
}

.dt-stat strong {
    margin-top: 0.14rem;
    font-size: 0.9rem;
    line-height: 1.35;
}

.dt-table {
    background: rgba(255, 255, 255, 0.7);
}

.dt-table-cell {
    border-color: rgba(15, 23, 42, 0.08) !important;
}

.other-tools-section {
    position: relative;
    overflow: hidden;
}

.other-tools-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
        radial-gradient(circle at 100% 0%, rgba(10, 118, 234, 0.08), rgba(10, 118, 234, 0) 28%);
}

.other-tools-head,
.other-tools-grid {
    position: relative;
    z-index: 1;
}

.other-tools-head {
    margin-bottom: 1.15rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.other-tools-refresh {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.85rem;
    font-size: 0.82rem;
    color: var(--app-accent, #0a76ea);
    border-radius: 999px;
    border: 1px solid rgba(10, 118, 234, 0.24);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--app-shadow-soft);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.other-tools-refresh:hover {
    transform: translateY(-1px);
    border-color: rgba(10, 118, 234, 0.5);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.other-tools-refresh:active {
    transform: translateY(0);
}

.other-tools-refresh i {
    font-size: 0.95rem;
    line-height: 1;
}

.other-tools-refresh.is-spinning i {
    animation: other-tools-refresh-spin 500ms ease;
}

@keyframes other-tools-refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.other-tools-title {
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    color: #0f1f35;
}

.other-tools-subtitle {
    margin: 0.38rem 0 0;
    font-size: 0.86rem;
    color: var(--app-muted);
}

.other-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.other-tool-card,
.other-tools-empty {
    border-radius: var(--app-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.76);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.68));
    box-shadow: var(--app-shadow-soft);
}

.other-tool-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 210px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.other-tool-card:hover {
    transform: translateY(-2px);
    border-color: rgba(10, 118, 234, 0.16);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.other-tool-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.other-tool-icon,
.other-tool-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.other-tool-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--app-radius-md);
    background: rgba(10, 118, 234, 0.1);
    font-size: 1.45rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.other-tool-arrow {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    color: var(--app-accent-strong);
    background: rgba(15, 23, 42, 0.05);
}

.other-tool-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
    color: #102036;
}

.other-tool-desc {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--app-muted);
}

.other-tool-link {
    margin-top: auto;
    font-size: 0.76rem;
    line-height: 1.55;
    color: #35628f;
    word-break: break-all;
}

.other-tools-empty {
    padding: 1rem 1.1rem;
    font-size: 0.88rem;
    color: var(--app-muted);
}

.main-site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.32rem;
    padding: 0.35rem 1rem 0.2rem;
    color: rgba(71, 85, 105, 0.76);
    font-size: 0.78rem;
    line-height: 1.7;
    text-align: center;
}

.main-site-footer-tagline {
    color: #1f3655;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.main-site-footer-copy {
    color: #415673;
    font-weight: 650;
}

.main-site-footer-statement,
.main-site-footer-contact,
.main-site-footer-icp {
    max-width: 58rem;
}

@media (max-width: 1023px) {
    .panel-stage {
        min-height: 520px;
    }

    .bca-hero,
    .mol-hero,
    .animal-hero,
    .prep-hero,
    .dt-hero {
        flex-direction: column;
    }

    .app-panel-head {
        align-items: flex-start;
    }

    .panel-title-row {
        align-items: flex-start;
    }

    .animal-select {
        flex: 0 0 110px;
        max-width: 110px;
    }

    .animal-solvent-row {
        grid-template-columns: 56px minmax(0, 1fr) minmax(110px, 132px);
        gap: 0.6rem;
        padding: 0.72rem 2.8rem 0.72rem 0.72rem;
    }

    .animal-solvent-percent-wrap {
        gap: 0.35rem;
    }

    .pcr-table-head,
    .pcr-table-row,
    .pcr-layout-head,
    .pcr-layout-row {
        grid-template-columns: 1.5fr 1fr 0.8fr 0.8fr;
    }

    .seed-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 767px) {
    .app-shell {
        width: 95%;
        /* Match the mobile `py-4` spacing; the larger clamp is for desktop. */
        padding-top: 1rem !important;
    }

    .app-header-grid {
        display: block;
    }

    .app-header-summary {
        display: none;
    }

    .app-title-row {
        display: block;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .app-title-row h1 {
        font-size: 1.55rem !important;
        line-height: 1.25;
    }

    .app-badge-row-inline {
        margin-top: 0.7rem;
    }

    .app-badge {
        padding: 0.38rem 0.78rem;
        font-size: 0.76rem;
    }

    .app-stage {
        padding: 0;
        border-radius: 0;
    }

    .seed-mode-panel,
    .bca-card,
    .mol-card,
    .mol-mini-card,
    .animal-card,
    .prep-card,
    .pcr-card,
    .dt-card {
        border-radius: var(--app-radius-lg) !important;
    }

    .feature-btn-subtitle,
    .panel-subtitle {
        font-size: 0.8rem;
    }

    .panel-title-row {
        gap: 0.55rem;
    }

    .mol-card-head {
        flex-direction: column;
    }

    .mol-mode-toggle {
        align-self: flex-start;
    }

    .mobile-feature-switch-btn {
        min-height: 2.1rem;
        padding: 0.36rem 0.74rem;
    }

    .seed-actions,
    .bca-actions,
    .bca-bottom,
    .mol-actions,
    .animal-actions,
    .prep-actions,
    .pcr-actions,
    .dt-action-strip,
    .dt-result-actions {
        flex-direction: column;
    }

    .seed-btn,
    .bca-btn,
    .mol-btn,
    .animal-btn,
    .prep-btn,
    .dt-btn {
        width: 100%;
        justify-content: center;
    }

    .pcr-actions .pcr-btn {
        width: 100%;
        justify-content: center;
    }

    .pcr-file-toolbar .pcr-btn,
    .pcr-plate-export-btn {
        width: auto;
    }

    .feature-nav-icon {
        min-width: 2.5rem;
        min-height: 2.5rem;
    }

    .feature-icon {
        min-width: 2.1rem;
        min-height: 2.1rem;
    }

    .other-tool-icon {
        width: 3.1rem;
        height: 3.1rem;
    }

    .other-tools-grid {
        grid-template-columns: 1fr;
    }

    .seed-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .seed-field,
    .seed-field-full,
    .seed-extra {
        max-width: 100%;
        width: 100%;
    }

    .seed-extra {
        align-items: flex-start;
    }

    .seed-extra-input {
        max-width: 160px;
    }

    .animal-select {
        flex-basis: 108px;
        max-width: 108px;
    }

    .animal-solvent-table {
        overflow: visible;
    }

    .animal-solvent-row {
        grid-template-columns: 52px minmax(0, 1fr) minmax(104px, 120px);
        gap: 0.5rem;
        padding: 0.68rem 2.55rem 0.68rem 0.68rem;
    }

    .animal-solvent-nameplate,
    .animal-solvent-main .animal-input,
    .animal-solvent-percent-wrap .animal-input {
        font-size: 0.8rem;
    }

    .animal-unit {
        min-width: 4.1rem;
    }

    .pcr-table,
    .pcr-layout-table {
        min-width: 520px;
    }
}

.pcr-tool {
    --pcr-blue: #0a76ea;
    --pcr-blue-soft: #eff6ff;
    --pcr-line: rgba(15, 23, 42, 0.1);
    --pcr-muted: #64748b;
    --pcr-text: #102036;
    position: relative;
    min-width: 0;
}

.pcr-editor-stack,
.pcr-result-stack,
.pcr-result-section,
.pcr-warning-list {
    display: grid;
    gap: 1rem;
}

.pcr-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.pcr-card,
.pcr-result-card,
.pcr-result-section {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.72) !important;
    border-radius: var(--app-radius-lg) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68)) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055) !important;
}

.pcr-card,
.pcr-result-card,
.pcr-result-section {
    padding: 1rem;
}

.pcr-card-head,
.pcr-result-head,
.pcr-result-section-head,
.pcr-subhead,
.pcr-batch-head,
.pcr-plate-block-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.pcr-card-head,
.pcr-result-section-head {
    margin-bottom: 0.9rem;
}

.pcr-card-head h4,
.pcr-result-head h4,
.pcr-result-section-head h4,
.pcr-subhead h5,
.pcr-batch-head h5 {
    margin: 0.35rem 0 0;
    color: var(--pcr-text);
    font-weight: 800;
}

.pcr-card-head h4,
.pcr-result-head h4,
.pcr-result-section-head h4 {
    font-size: 1.02rem;
}

.pcr-subhead h5,
.pcr-batch-head h5 {
    font-size: 0.92rem;
}

.pcr-hint,
.pcr-batch-head p,
.pcr-result-head p,
.pcr-result-empty p,
.pcr-result-section-head > span {
    margin: 0.35rem 0 0;
    color: var(--pcr-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.pcr-native-select {
    appearance: auto;
    cursor: pointer;
}

.pcr-custom-select {
    position: relative;
    width: 100%;
    min-width: 0;
}

.pcr-select-trigger {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 2.85rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--app-radius-md);
    outline: none;
    color: #102036;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    font-size: 0.84rem;
    font-weight: 600;
    text-align: left;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.pcr-select-trigger:hover:not(:disabled) {
    border-color: rgba(10, 118, 234, 0.36);
}

.pcr-select-trigger:focus-visible,
.pcr-custom-select.is-open .pcr-select-trigger {
    border-color: rgba(10, 118, 234, 0.66);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(10, 118, 234, 0.12);
}

.pcr-select-trigger-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    flex: 1 1 auto;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcr-select-chevron {
    flex: 0 0 auto;
    color: #718096;
    font-size: 0.72rem;
    transition: transform 160ms ease;
}

.pcr-custom-select.is-open .pcr-select-chevron {
    transform: rotate(180deg);
}

.pcr-custom-select.is-open.is-up .pcr-select-chevron {
    transform: rotate(0deg);
}

.pcr-custom-select.is-disabled,
.pcr-select-trigger:disabled {
    cursor: not-allowed;
}

.pcr-select-trigger:disabled {
    color: #7c8797;
    border-color: rgba(148, 163, 184, 0.24);
    background: #eef2f6;
    box-shadow: none;
    opacity: 0.78;
}

.pcr-select-portal {
    position: fixed;
    z-index: 12000;
    display: grid;
    gap: 0.18rem;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.38rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--app-radius-md);
    outline: none;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.pcr-select-portal[hidden] {
    display: none;
}

.pcr-select-portal.is-open {
    animation: pcrSelectOpen 140ms ease-out;
}

.pcr-select-portal.is-up {
    transform-origin: bottom center;
}

.pcr-select-option {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 2.35rem;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border: 0;
    border-radius: 0.65rem;
    outline: none;
    color: #334155;
    background: transparent;
    font-size: 0.8rem;
    line-height: 1.4;
    text-align: left;
    overflow-wrap: anywhere;
    transition: color 120ms ease, background 120ms ease;
}

.pcr-select-option:hover,
.pcr-select-option.is-active {
    color: #075fb8;
    background: rgba(10, 118, 234, 0.09);
}

.pcr-select-option.is-selected {
    color: var(--app-accent-strong);
    background: rgba(10, 118, 234, 0.14);
    font-weight: 750;
}

.pcr-select-option.is-selected.is-active {
    box-shadow: inset 0 0 0 1px rgba(10, 118, 234, 0.18);
}

.pcr-select-option:disabled,
.pcr-select-option.is-disabled {
    color: #94a3b8;
    background: transparent;
    cursor: not-allowed;
    opacity: 0.72;
}

@keyframes pcrSelectOpen {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pcr-textarea {
    min-height: 6rem !important;
    padding: 0.72rem 0.82rem !important;
    resize: vertical;
    line-height: 1.55;
}

.pcr-field small {
    color: #7a8799;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.5;
}

.pcr-template-toolbar,
.pcr-config-toolbar,
.pcr-file-toolbar,
.pcr-list-footer,
.pcr-actions,
.pcr-button-group {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.pcr-template-toolbar > .pcr-field {
    width: min(100%, 22rem);
}

.pcr-template-toolbar > .pcr-template-parts {
    width: min(100%, 10rem);
}

.pcr-template-description {
    flex: 1 1 18rem;
    min-height: 2.85rem;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(10, 118, 234, 0.12);
    border-radius: var(--app-radius-md);
    color: #47617d;
    background: rgba(239, 246, 255, 0.68);
    font-size: 0.78rem;
    line-height: 1.5;
}

.pcr-component-board {
    margin-top: 0.9rem;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--pcr-line);
    border-radius: var(--app-radius-lg);
    background: rgba(255, 255, 255, 0.74);
}

.pcr-component-head,
.pcr-component-row {
    display: grid;
    grid-template-columns: 3.4rem minmax(11rem, 1.45fr) minmax(8rem, 0.75fr) minmax(9.5rem, 0.9fr) minmax(12rem, 1.1fr) 2.8rem;
    gap: 0.55rem;
    align-items: center;
}

.pcr-component-head {
    padding: 0.68rem 0.75rem;
    color: #60748d;
    background: #f5f8fc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
}

.pcr-component-row {
    padding: 0.58rem 0.75rem;
    border-top: 1px solid rgba(15, 23, 42, 0.065);
    transition: background 160ms ease, opacity 160ms ease;
}

.pcr-component-row:first-child {
    border-top: 0;
}

.pcr-component-row.is-disabled {
    background: rgba(248, 250, 252, 0.82);
    opacity: 0.68;
}

.pcr-component-row.is-disabled .pcr-component-enabled {
    opacity: 1;
}

.pcr-component-cell,
.pcr-input-unit {
    min-width: 0;
}

.pcr-component-cell .pcr-input,
.pcr-component-cell .pcr-select-trigger {
    min-height: 2.35rem;
    padding-inline: 0.68rem;
    font-size: 0.8rem;
}

.pcr-input-unit {
    display: flex;
    align-items: stretch;
}

.pcr-input-unit .pcr-input {
    min-width: 0;
    border-radius: var(--app-radius-md) 0 0 var(--app-radius-md) !important;
}

.pcr-input-unit > span {
    display: inline-flex;
    min-width: 3.15rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.55rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-left: 0;
    border-radius: 0 var(--app-radius-md) var(--app-radius-md) 0;
    color: #60748d;
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 800;
}

.pcr-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #52677f;
    font-size: 0.75rem;
    font-weight: 750;
}

.pcr-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--pcr-blue);
}

.pcr-icon-btn {
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.72rem;
    color: #64748b;
    background: #fff;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.pcr-danger-btn,
.pcr-btn-danger {
    color: #be123c !important;
    border-color: rgba(225, 29, 72, 0.2) !important;
    background: #fff1f2 !important;
}

.pcr-danger-btn:hover,
.pcr-btn-danger:hover {
    color: #9f1239 !important;
    border-color: rgba(225, 29, 72, 0.32) !important;
    background: #ffe4e6 !important;
}

.pcr-input:disabled,
.pcr-btn:disabled {
    color: #7c8797 !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: #eef2f6 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.78;
}

.pcr-btn:disabled:hover {
    transform: none;
    filter: none;
}

.pcr-list-footer {
    justify-content: space-between;
    margin-top: 0.75rem;
    color: #60748d;
    font-size: 0.76rem;
}

.pcr-list-footer strong {
    color: #173453;
}

.pcr-scale-grid,
.pcr-layout-grid,
.pcr-stats {
    display: grid;
    gap: 0.75rem;
}

.pcr-scale-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pcr-layout-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
    align-items: start;
}

.pcr-name-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.85rem;
}

.pcr-name-card,
.pcr-batch-card {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.085);
    border-radius: var(--app-radius-lg);
    background: rgba(248, 250, 252, 0.7);
}

.pcr-name-table-wrap {
    max-height: 18rem;
    margin-top: 0.65rem;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--app-radius-md);
    background: #fff;
    overscroll-behavior: contain;
}

.pcr-name-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.pcr-name-table th,
.pcr-name-table td {
    padding: 0.28rem 0.4rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    color: #52677f;
    font-size: 0.72rem;
    text-align: left;
    vertical-align: middle;
}

.pcr-name-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding-block: 0.42rem;
    background: #f5f8fc;
    font-weight: 800;
}

.pcr-name-table th:first-child {
    width: 3.25rem;
    text-align: center;
}

.pcr-name-table tbody th {
    color: #718096;
    background: #f8fafc;
    font-weight: 800;
}

.pcr-name-table tbody tr:last-child > * {
    border-bottom: 0;
}

.pcr-name-input.pcr-input {
    min-height: 2rem;
    padding: 0.3rem 0.2rem;
    border: 0 !important;
    border-bottom: 1px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.78rem;
}

.pcr-name-input.pcr-input:hover {
    border-bottom-color: rgba(10, 118, 234, 0.22) !important;
}

.pcr-name-input.pcr-input:focus,
.pcr-name-input.pcr-input:focus-visible {
    border-bottom-color: var(--pcr-blue) !important;
    outline: none;
    box-shadow: 0 1px 0 var(--pcr-blue) !important;
}

.pcr-inline-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.7rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: var(--app-radius-md);
    color: #8a4b0f;
    background: #fffbeb;
    font-size: 0.78rem;
    line-height: 1.55;
}

.pcr-mix-extra-field {
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid rgba(10, 118, 234, 0.12);
    border-radius: var(--app-radius-md);
    background: rgba(239, 246, 255, 0.56);
}

.pcr-mix-extra-field > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcr-mix-extra-field .pcr-input-unit {
    width: 100%;
}

.pcr-mix-extra-field > small {
    margin-top: -0.12rem;
}

.pcr-config-toolbar {
    justify-content: space-between;
}

.pcr-recipe-picker {
    flex: 1 1 20rem;
    max-width: 34rem;
}

.pcr-button-group {
    flex: 1 1 32rem;
    justify-content: flex-end;
}

.pcr-file-toolbar {
    align-items: center;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.pcr-file-toolbar > span {
    color: #718096;
    font-size: 0.74rem;
}

.pcr-actions {
    align-items: center;
    margin-top: 0.9rem;
}

.pcr-result-shell {
    min-width: 0;
}

.pcr-result-empty {
    display: flex;
    min-height: 13rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    border: 1px dashed rgba(100, 116, 139, 0.3);
    border-radius: var(--app-radius-lg);
    color: #60748d;
    background: rgba(248, 250, 252, 0.66);
    text-align: center;
}

.pcr-result-empty i {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.65rem;
    border-radius: 999px;
    color: var(--pcr-blue);
    background: rgba(10, 118, 234, 0.1);
    font-size: 1.25rem;
}

.pcr-result-empty strong {
    color: #20364e;
    font-size: 0.94rem;
}

.pcr-result-empty p {
    max-width: 42rem;
}

.pcr-error-card {
    border-color: rgba(225, 29, 72, 0.18) !important;
    background: #fff7f8 !important;
    color: #9f1239;
}

.pcr-error-card ul {
    display: grid;
    gap: 0.45rem;
    margin: 0.75rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.82rem;
    line-height: 1.55;
}

.pcr-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 0.9rem;
}

.pcr-stat {
    min-width: 0;
    padding: 0.72rem 0.76rem;
    border: 1px solid rgba(15, 23, 42, 0.075);
    border-radius: var(--app-radius-md);
    background: rgba(248, 250, 252, 0.78);
}

.pcr-stat span,
.pcr-stat strong {
    display: block;
}

.pcr-stat span {
    color: #718096;
    font-size: 0.71rem;
    font-weight: 700;
    line-height: 1.4;
}

.pcr-stat strong {
    margin-top: 0.25rem;
    color: #173453;
    font-size: 0.95rem;
}

.pcr-warning-list {
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.pcr-warning-list .pcr-inline-warning {
    margin-top: 0;
}

.pcr-batch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.pcr-batch-head > div {
    min-width: 0;
}

.pcr-batch-head > div > span,
.pcr-batch-head > b,
.pcr-subhead > span {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 0.3rem 0.56rem;
    border-radius: 999px;
    color: #35628f;
    background: rgba(10, 118, 234, 0.08);
    font-size: 0.7rem;
    font-weight: 750;
}

.pcr-batch-head > b {
    color: #52677f;
    background: #fff;
}

.pcr-batch-total {
    margin-top: 0.65rem;
    color: #60748d;
    font-size: 0.76rem;
    text-align: right;
}

.pcr-batch-total strong {
    color: #173453;
}

.pcr-result-card .pcr-table-wrap,
.pcr-batch-card .pcr-table-wrap {
    margin-top: 0.75rem;
}

.pcr-table-wrap {
    max-width: 100%;
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, 0.075);
    border-radius: var(--app-radius-md);
    background: #fff;
}

.pcr-data-table {
    width: 100%;
    min-width: 35rem;
    border-collapse: collapse;
    color: #263f59;
    background: #fff;
    font-size: 0.77rem;
}

.pcr-data-table th,
.pcr-data-table td {
    padding: 0.58rem 0.65rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.065);
    text-align: left;
    vertical-align: top;
}

.pcr-data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #60748d;
    background: #f5f8fc;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.pcr-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.pcr-data-table tbody tr:hover td {
    background: #f8fbff;
}

.pcr-batch-card .pcr-data-table th:nth-child(4),
.pcr-batch-card .pcr-mix-system-quantity {
    color: #dc2626;
    font-weight: 850;
}

.pcr-movement-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.85rem;
    margin-top: 0.8rem;
    padding: 0.75rem;
    border: 1px solid rgba(10, 118, 234, 0.12);
    border-radius: var(--app-radius-md);
    background: rgba(239, 246, 255, 0.58);
}

.pcr-movement-copy {
    min-width: 0;
    flex: 1 1 28rem;
}

.pcr-movement-copy strong,
.pcr-movement-copy span {
    display: block;
}

.pcr-movement-copy strong {
    color: #173453;
    font-size: 0.8rem;
}

.pcr-movement-copy span {
    margin-top: 0.25rem;
    color: #60748d;
    font-size: 0.74rem;
    line-height: 1.55;
}

.pcr-movement-picker {
    width: min(100%, 22rem);
    flex: 0 1 22rem;
}

.pcr-color-legends {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.8rem;
    padding: 0.7rem;
    border: 1px solid rgba(15, 23, 42, 0.075);
    border-radius: var(--app-radius-md);
    background: rgba(248, 250, 252, 0.76);
}

.pcr-plate-zoom-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 0.65rem;
    padding: 0.52rem 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.075);
    border-radius: var(--app-radius-md);
    background: rgba(248, 250, 252, 0.76);
}

.pcr-plate-zoom-title {
    margin-right: auto;
    color: #60748d;
    font-size: 0.72rem;
    font-weight: 800;
}

.pcr-plate-zoom-btn,
.pcr-plate-zoom-reset {
    width: auto;
    min-height: 2rem;
    padding: 0.34rem 0.62rem;
    font-size: 0.72rem;
}

.pcr-plate-zoom-btn {
    width: 2rem;
    padding-inline: 0;
    font-size: 1rem;
    line-height: 1;
}

.pcr-plate-zoom-output {
    min-width: 3.4rem;
    color: #173453;
    font-size: 0.74rem;
    font-weight: 850;
    text-align: center;
}

.pcr-gene-legend,
.pcr-repeat-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.pcr-gene-legend-item {
    display: inline-flex;
    min-width: 0;
    max-width: 15rem;
    align-items: center;
    gap: 0.38rem;
    padding: 0.28rem 0.52rem;
    border: 1px solid hsl(var(--pcr-gene-h) 58% 72%);
    border-radius: 999px;
    color: hsl(var(--pcr-gene-h) 48% 28%);
    background: hsl(var(--pcr-gene-h) 70% 93%);
    font-size: 0.7rem;
    font-weight: 780;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcr-gene-legend-item i {
    width: 0.72rem;
    height: 0.72rem;
    flex: 0 0 auto;
    border-radius: 0.24rem;
    background: hsl(var(--pcr-gene-h) 68% 62%);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.pcr-repeat-legend > span {
    color: #60748d;
    font-size: 0.68rem;
    font-weight: 800;
}

.pcr-repeat-legend > span:not(:first-child) {
    margin-left: 0.45rem;
}

.pcr-kind-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 750;
}

.pcr-legend-sample,
.pcr-kind-sample {
    color: #155e75;
    background: #ecfeff;
}

.pcr-plate-stack {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.8rem;
}

.pcr-plate-block {
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--app-radius-lg);
    background: rgba(248, 250, 252, 0.76);
}

.pcr-plate-block-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
    color: #718096;
    font-size: 0.73rem;
}

.pcr-plate-block-summary,
.pcr-plate-export-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.pcr-plate-block-head strong {
    color: #20364e;
    font-size: 0.85rem;
}

.pcr-plate-export-actions {
    justify-content: flex-end;
}

.pcr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    line-height: 1.2;
}

.pcr-btn > i {
    display: inline-flex;
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.pcr-btn > i::before {
    display: block;
    line-height: 1;
    vertical-align: 0;
}

.pcr-btn-label {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.pcr-plate-export-btn {
    width: auto;
    min-height: 2.15rem;
    padding: 0.42rem 0.68rem;
    font-size: 0.72rem;
}

.pcr-plate-wrap {
    overflow: auto;
    padding: 0.15rem 0 0.35rem;
    overscroll-behavior: contain;
}

.pcr-plate-stage {
    position: relative;
    width: 1px;
    height: 1px;
    min-width: 1px;
    min-height: 1px;
}

.pcr-plate-grid {
    position: absolute;
    inset: 0 auto auto 0;
    display: grid;
    gap: 0.28rem;
    width: max-content;
    min-width: 0;
    transform: scale(1);
    transform-origin: top left;
}

.pcr-plate-grid-96 {
    grid-template-columns: 1.7rem repeat(12, 6.6rem);
}

.pcr-plate-grid-384 {
    grid-template-columns: 1.7rem repeat(24, 5.6rem);
}

.pcr-plate-grid-384 .pcr-well {
    min-height: 4.5rem;
    gap: 0.08rem;
    padding: 0.3rem 0.22rem;
}

.pcr-plate-grid-384 .pcr-well-content,
.pcr-plate-grid-384 .pcr-well-gene,
.pcr-plate-grid-384 .pcr-well-condition {
    font-size: clamp(0.52rem, 0.48rem + 0.08vw, 0.58rem);
}

.pcr-plate-grid-384 .pcr-well-repeats {
    height: 1rem;
    grid-template-columns: repeat(2, 1.25rem);
}

.pcr-plate-grid-384 .pcr-s-token,
.pcr-plate-grid-384 .pcr-r-token {
    width: 1.25rem;
    height: 1rem;
    font-size: 0.52rem;
}

.pcr-plate-axis {
    display: flex;
    min-height: 1.55rem;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 0.65rem;
    font-weight: 800;
}

.pcr-well {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 4.8rem;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.12rem;
    padding: 0.38rem 0.3rem;
    overflow: visible;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 0.78rem;
    outline: none;
    color: #60748d;
    background: #fff;
    line-height: 1.18;
    text-align: center;
    touch-action: manipulation;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

.pcr-well:hover:not(:disabled) {
    z-index: 2;
    transform: translateY(-1px) scale(1.03);
    border-color: rgba(10, 118, 234, 0.42);
}

.pcr-well:focus-visible {
    box-shadow: 0 0 0 3px rgba(10, 118, 234, 0.18);
}

.pcr-well-content {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-rows: minmax(0.9rem, auto) minmax(0.9rem, auto) 1.15rem;
    align-items: center;
    justify-items: stretch;
    gap: 0.12rem;
    overflow: visible;
    font-size: clamp(0.64rem, 0.6rem + 0.08vw, 0.72rem);
    line-height: 1.1;
    text-align: center;
}

.pcr-well-row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-self: stretch;
    text-align: center;
}

.pcr-well-gene,
.pcr-well-condition {
    display: block;
    overflow: visible;
    overflow-wrap: anywhere;
    color: hsl(var(--pcr-gene-h) 44% 22%);
    font-size: inherit;
    font-weight: 800;
    line-height: 1.1;
    white-space: normal;
}

.pcr-well-gene {
    min-height: 0.9rem;
    font-weight: 900;
}

.pcr-well-condition {
    min-height: 0.9rem;
}

.pcr-well-repeats {
    display: grid;
    width: max-content;
    height: 1.15rem;
    grid-template-columns: repeat(2, 1.45rem);
    align-items: stretch;
    justify-content: center;
    justify-self: center;
    align-self: center;
    gap: 0.24rem;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(-2px);
}

.pcr-s-token,
.pcr-r-token {
    position: relative;
    display: block;
    width: 1.45rem;
    min-width: 0;
    height: 1.15rem;
    padding: 0;
    border-radius: 999px;
    box-sizing: border-box;
    font-size: 0.56rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.01em;
    text-align: center;
}

.pcr-token-text {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: max-content;
    line-height: 1;
    transform: translate(-50%, -50%);
}

.pcr-s-token {
    background: rgba(255, 255, 255, 0.68);
}

.pcr-repeat-color-1 {
    color: #dc2626;
}

.pcr-repeat-color-2 {
    color: #16803c;
}

.pcr-repeat-color-3 {
    color: #2563eb;
}

.pcr-r-token {
    color: #fff;
    text-shadow: 0 1px 1px rgba(15, 23, 42, 0.22);
}

.pcr-repeat-bg-1 {
    background: #dc2626;
}

.pcr-repeat-bg-2 {
    background: #16803c;
}

.pcr-repeat-bg-3 {
    background: #2563eb;
}

.pcr-well-empty-label {
    color: #94a3b8;
    font-size: 0.58rem;
    font-weight: 750;
}

.pcr-well-empty {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.72);
}

.pcr-well-sample {
    color: hsl(var(--pcr-gene-h) 44% 22%);
    border-color: hsl(var(--pcr-gene-h) var(--pcr-gene-s) var(--pcr-gene-border-l));
    background: hsl(var(--pcr-gene-h) var(--pcr-gene-s) var(--pcr-condition-l));
}

.pcr-well:active:not(:disabled) {
    cursor: grabbing;
}

.pcr-well.is-movement-member {
    border-color: rgba(10, 118, 234, 0.5);
    box-shadow: inset 0 0 0 1px rgba(10, 118, 234, 0.16);
}

.pcr-well.is-movement-member::before {
    content: "";
    position: absolute;
    inset: 0.18rem;
    pointer-events: none;
    border: 1px solid rgba(10, 118, 234, 0.32);
    border-radius: 0.58rem;
}

.pcr-well.is-selected {
    z-index: 3;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.24), 0 8px 18px rgba(15, 23, 42, 0.12);
    transform: scale(1.04);
}

.pcr-well.is-dragging {
    z-index: 4;
    cursor: grabbing;
    opacity: 0.46;
    transform: scale(0.96);
}

.pcr-well.is-drop-target,
.pcr-well.is-swap-target {
    z-index: 3;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.32), inset 0 0 0 2px rgba(255, 255, 255, 0.72);
    transform: translateY(-1px);
}

.pcr-well.is-swap-target {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.34), inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.pcr-well.is-drop-invalid {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.34), inset 0 0 0 2px rgba(255, 255, 255, 0.72);
    cursor: not-allowed;
}

.pcr-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 5000;
    max-width: min(28rem, calc(100vw - 2rem));
    padding: 0.72rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--app-radius-md);
    color: #334155;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.6rem);
    transition: opacity 180ms ease, transform 180ms ease;
}

.pcr-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pcr-toast-success {
    color: #166534;
    border-color: rgba(22, 163, 74, 0.2);
    background: #f0fdf4;
}

.pcr-toast-warning {
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.24);
    background: #fffbeb;
}

.pcr-toast-error {
    color: #9f1239;
    border-color: rgba(225, 29, 72, 0.2);
    background: #fff1f2;
}

@media (min-width: 821px) and (max-width: 1180px) {
    .pcr-component-head,
    .pcr-component-row {
        min-width: 61rem;
    }


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

    .pcr-layout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .pcr-card-head,
    .pcr-result-head,
    .pcr-result-section-head,
    .pcr-batch-head,
    .pcr-subhead {
        flex-direction: column;
    }

    .pcr-component-head {
        display: none;
    }

    .pcr-component-list {
        display: grid;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .pcr-component-row {
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.75rem;
        border: 1px solid rgba(15, 23, 42, 0.085);
        border-radius: var(--app-radius-md);
        background: rgba(248, 250, 252, 0.72);
    }

    .pcr-component-row:first-child {
        border-top: 1px solid rgba(15, 23, 42, 0.085);
    }

    .pcr-component-cell {
        display: grid;
        grid-template-columns: minmax(5rem, 0.32fr) minmax(0, 1fr);
        align-items: center;
        gap: 0.65rem;
    }

    .pcr-component-cell::before {
        content: attr(data-label);
        color: #60748d;
        font-size: 0.73rem;
        font-weight: 800;
    }

    .pcr-component-enabled {
        justify-self: start;
    }

    .pcr-icon-btn {
        justify-self: end;
    }

    .pcr-scale-grid,
    .pcr-layout-grid,
    .pcr-stats,
    .pcr-name-grid,
    .pcr-batch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcr-button-group {
        justify-content: flex-start;
    }

    .pcr-movement-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .pcr-movement-picker {
        width: 100%;
        flex-basis: auto;
    }
}

@media (max-width: 560px) {
    .pcr-card,
    .pcr-result-card,
    .pcr-result-section {
        padding: 0.85rem !important;
    }

    .pcr-scale-grid,
    .pcr-layout-grid,
    .pcr-stats,
    .pcr-name-grid,
    .pcr-batch-grid {
        grid-template-columns: 1fr;
    }

    .pcr-template-toolbar,
    .pcr-config-toolbar,
    .pcr-file-toolbar,
    .pcr-list-footer,
    .pcr-actions,
    .pcr-button-group {
        align-items: stretch;
        flex-direction: column;
    }

    .pcr-template-toolbar > .pcr-field,
    .pcr-recipe-picker,
    .pcr-button-group,
    .pcr-template-description {
        width: 100%;
        max-width: none;
        flex-basis: auto;
    }

    .pcr-btn {
        width: 100%;
        justify-content: center;
    }

    .pcr-file-toolbar .pcr-btn {
        width: 100%;
        justify-content: center;
    }

    .pcr-name-table-wrap {
        max-height: 15rem;
    }

    .pcr-name-table th:first-child {
        width: 2.8rem;
    }

    .pcr-color-legends {
        padding: 0.58rem;
    }

    .pcr-plate-zoom-toolbar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pcr-plate-zoom-title {
        width: 100%;
        margin-right: 0;
        text-align: center;
    }

    .pcr-plate-zoom-btn,
    .pcr-plate-zoom-reset {
        width: auto;
    }

    .pcr-gene-legend-item {
        max-width: 11rem;
    }

    .pcr-plate-block-head,
    .pcr-plate-export-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pcr-plate-export-actions {
        width: 100%;
    }

    .pcr-plate-export-btn {
        width: 100%;
        justify-content: center;
    }

    .pcr-repeat-legend > span:not(:first-child) {
        flex-basis: 100%;
        margin-left: 0;
        margin-top: 0.15rem;
    }

    .pcr-select-trigger {
        min-height: 2.7rem;
        padding-inline: 0.78rem;
    }

    .pcr-select-portal {
        border-radius: 0.8rem;
        padding: 0.3rem;
    }

    .pcr-select-option {
        min-height: 2.5rem;
        padding-inline: 0.58rem;
    }

    .pcr-toast {
        right: 0.65rem;
        bottom: calc(0.65rem + env(safe-area-inset-bottom));
        max-width: calc(100vw - 1.3rem);
    }
}

@media (hover: none), (pointer: coarse) {
    .pcr-select-trigger,
    .pcr-select-option,
    .pcr-icon-btn,
    .pcr-well {
        min-height: 2.75rem;
    }

    .pcr-well {
        min-height: 4.25rem;
        cursor: pointer;
        touch-action: pan-x pan-y;
    }

    .pcr-well:hover:not(:disabled),
    .pcr-well.is-selected,
    .pcr-well.is-drop-target,
    .pcr-well.is-swap-target {
        transform: none;
    }

    .pcr-plate-wrap {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .pcr-plate-block {
        scroll-snap-align: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pcr-tool *,
    .pcr-tool *::before,
    .pcr-tool *::after,
    .pcr-select-portal,
    .pcr-toast {
        animation: none !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }

    .pcr-tool .pcr-btn:hover,
    .pcr-tool .pcr-well:hover:not(:disabled),
    .pcr-tool .pcr-well.is-selected,
    .pcr-tool .pcr-well.is-dragging,
    .pcr-tool .pcr-well.is-drop-target,
    .pcr-tool .pcr-well.is-swap-target,
    .pcr-toast,
    .pcr-toast.is-visible {
        transform: none !important;
    }
}
