.ap-tool {
    --paper: #f6f6f2;
    --panel: #ffffff;
    --ink: #20241f;
    --muted: #6b7066;
    --line: #e3e4dc;
    --accent: #3e4a3d;
    --accent-d: #2c352c;
    --good: #3e6b4a;
    --good-bg: #e6eee7;
    --mid: #8a7530;
    --mid-bg: #f1ecd9;
    --poor: #8c4a3e;
    --poor-bg: #f1e3de;
    --neutral: #f5f6f1;
    --neutral-2: #edefe7;
    --tan: #c6cbbb;
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
.ap-tool * {
    box-sizing: border-box;
}
.ap-tool [hidden] {
    display: none !important;
}
.ap-tool {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-size: 15px;
    line-height: 1.5;
}
body.lock {
    overflow: hidden;
}
.ap-tool .wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}
.ap-tool button {
    font-family: inherit;
}
.ap-tool a {
    color: inherit;
}
.ap-tool :focus-visible {
    outline: 2.5px solid var(--accent);
    outline-offset: 2px;
}
.ap-tool #cartCount {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ap-tool .hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 34px;
    align-items: center;
    padding: 44px 0 28px;
}
.ap-tool .kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--accent);
}
.ap-tool h1 {
    font-weight: 600;
    font-size: clamp(25px, 3.6vw, 40px);
    line-height: 1.14;
    margin: 12px 0 12px;
    letter-spacing: -0.01em;
}
.ap-tool .sub {
    color: var(--muted);
    max-width: 54ch;
    margin: 0;
}
.ap-tool .steps {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ap-tool .steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 7px 16px 7px 7px;
    font-size: 13px;
    font-weight: 700;
}
.ap-tool .steps li::before{
    display: none;
}
.ap-tool .steps b {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--ink);
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
}
.ap-tool .hero-art {
    margin: 0;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 16px 32px -20px rgba(32, 36, 31, 0.28);
    background: linear-gradient(160deg, #f1f2ec, #e6e9de);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}
.ap-tool .hero-art svg {
    width: 100%;
    height: auto;
    max-width: 360px;
}
.ap-tool .hero-art figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 1;
    background: rgba(32, 36, 31, 0.82);
    color: var(--paper);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 11px;
    border-radius: 7px;
}
.ap-tool .workspace {
    display: grid;
    grid-template-columns: 430px 1fr;
    gap: 24px;
    align-items: start;
    padding-bottom: 4px;
}
.ap-tool .card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
}
.ap-tool .card h2 {
    font-weight: 600;
    font-size: 14.5px;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ap-tool .stepnum {
    width: 23px;
    height: 23px;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.ap-tool .upload-card.dragover {
    outline: 2px dashed var(--accent);
    outline-offset: 4px;
}
.ap-tool #drop {
    border: 2px dashed var(--tan);
    border-radius: 12px;
    min-height: 330px;
    background: var(--neutral);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 26px;
    cursor: pointer;
    transition: 0.2s;
}
.ap-tool #drop:hover {
    border-color: var(--accent);
    background: var(--neutral-2);
}
.ap-tool #drop svg {
    width: 52px;
    height: 52px;
    stroke: var(--muted);
}
.ap-tool #drop p {
    margin: 0;
    font-weight: 700;
}
.ap-tool #drop small {
    color: var(--muted);
}
.ap-tool .btn {
    border-radius: 8px;
    padding: 11px 18px;
    font-weight: 800;
    font-size: 13.5px;
    cursor: pointer;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid transparent;
}
.ap-tool .btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
}
.ap-tool .btn-accent:hover {
    background: var(--accent-d);
    transform: translateY(-1px);
}
.ap-tool .btn-ghost {
    background: transparent;
    border: 1.5px solid var(--tan);
    color: var(--ink);
}
.ap-tool .btn-ghost:hover {
    border-color: var(--ink);
}
.ap-tool .btn-ghost.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.ap-tool .btn svg {
    width: 15px;
    height: 15px;
    margin-right: 7px;
}
.ap-tool .btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.ap-tool .file-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
    min-height: 16px;
}
.ap-tool .preview-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #161613;
}
.ap-tool .pv-node {
    width: 100%;
    max-height: 430px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.ap-tool .preview-wrap.picker .pv-node {
    cursor: crosshair;
}
.ap-tool #loupe {
    position: absolute;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(32, 36, 31, 0.92);
    color: #f6f6f2;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    pointer-events: none;
}
.ap-tool #loupe b {
    font-weight: 700;
}
.ap-tool #loupeSw {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.ap-tool #pickDot {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow:
        0 0 0 2px rgba(32, 36, 31, 0.45),
        0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}
.ap-tool .res-empty {
    border: 2px dashed var(--line);
    border-radius: 12px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    text-align: center;
    padding: 24px;
}
.ap-tool .res-empty svg {
    width: 46px;
    height: 46px;
    opacity: 0.55;
}
.ap-tool .res-head {
    font-size: 12.5px;
    color: var(--muted);
    margin: 0 0 12px;
}
.ap-tool .crow {
    display: grid;
    grid-template-columns: 64px 118px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--neutral);
    animation: rowIn 0.5s both;
}
.ap-tool .crow + .crow {
    margin-top: 10px;
}
@keyframes rowIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .ap-tool .crow {
        animation: none;
    }
}
.ap-tool .crow-sw {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.ap-tool .crow-sw.dashed {
    background: repeating-linear-gradient(45deg, var(--neutral-2) 0 6px, var(--tan) 6px 12px);
    border: 2px dashed var(--tan);
    box-shadow: none;
    opacity: 0.8;
}
.ap-tool .crow-info b {
    font-size: 15px;
    letter-spacing: 0.02em;
}
.ap-tool .crow-info small {
    display: block;
    color: var(--muted);
    font-size: 11.5px;
    margin-top: 3px;
}
.ap-tool .crow-matches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.ap-tool .crow.pick-row.empty {
    border-style: dashed;
    background: transparent;
}
.ap-tool .chip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    padding: 8px 10px;
    cursor: pointer;
    transition: 0.18s;
    text-align: left;
}
.ap-tool .chip:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -12px rgba(32, 36, 31, 0.35);
}
.ap-tool .chip-sq {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    flex: none;
}
.ap-tool .chip-txt b {
    display: block;
    font-size: 12.5px;
    line-height: 1.15;
}
.ap-tool .chip-txt small {
    color: var(--muted);
    font-size: 10.5px;
}
.ap-tool .de {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.ap-tool .de-good {
    background: var(--good-bg);
    color: var(--good);
}
.ap-tool .de-mid {
    background: var(--mid-bg);
    color: var(--mid);
}
.ap-tool .de-poor {
    background: var(--poor-bg);
    color: var(--poor);
}
.ap-tool .repick {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    border: 1.5px dashed var(--tan);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    flex: none;
    transition: 0.15s;
}
.ap-tool .repick svg {
    width: 17px;
    height: 17px;
    margin: 0;
}
.ap-tool .repick:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.ap-tool .pick-cta {
    padding: 9px 14px;
}
.ap-tool .legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    font-size: 12px;
    color: var(--muted);
}
.ap-tool .legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ap-tool .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: none;
}
.ap-tool .harmony-card {
    margin-top: 24px;
}
.ap-tool #harmonyBody {
    display: grid;
    grid-template-columns: 264px 1fr;
    gap: 26px;
    align-items: start;
}
.ap-tool .h-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}
.ap-tool #wheel {
    width: 240px;
    height: 240px;
}
.ap-tool .scheme-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.ap-tool .scheme-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1.5px solid var(--line);
    background: #fff;
    border-radius: 9px;
    padding: 7px 13px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s;
    color: var(--ink);
}
.ap-tool .scheme-tab svg {
    width: 17px;
    height: 17px;
}
.ap-tool .scheme-tab:hover {
    border-color: var(--ink);
}
.ap-tool .scheme-tab.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.ap-tool .base-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}
.ap-tool .base-chip {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    transition: 0.15s;
    padding: 0;
}
.ap-tool .base-chip:hover {
    transform: translateY(-2px);
}
.ap-tool .base-chip.active {
    border-color: var(--ink);
    box-shadow:
        0 0 0 2px var(--panel),
        0 4px 10px rgba(0, 0, 0, 0.18);
}
.ap-tool .base-hex {
    font-size: 12.5px;
    background: var(--neutral);
    border: 1px solid var(--line);
    padding: 4px 9px;
    border-radius: 7px;
}
.ap-tool .scheme-desc {
    margin: 0 0 14px;
    font-size: 13.5px;
    color: var(--muted);
}
.ap-tool .scheme-desc b {
    color: var(--ink);
}
.ap-tool .hs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.ap-tool .hs-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: 0.16s;
    text-align: left;
    padding: 0;
}
.ap-tool .hs-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -14px rgba(32, 36, 31, 0.4);
}
.ap-tool .hs-sw {
    display: block;
    height: 84px;
    position: relative;
}
.ap-tool .hs-dot {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.ap-tool .hs-base {
    position: absolute;
    left: 8px;
    top: 8px;
    background: rgba(32, 36, 31, 0.82);
    color: #f6f6f2;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}
.ap-tool .hs-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
}
.ap-tool .hs-name {
    font-weight: 800;
    font-size: 13px;
}
.ap-tool .hs-code {
    color: var(--muted);
    font-size: 10px;
}
.ap-tool .hs-de {
    display: flex;
    align-items: center;
    gap: 7px;
}
.ap-tool .hs-de small {
    color: var(--muted);
    font-size: 10.5px;
}
.ap-tool .hs-order {
    font-size: 11.5px;
    color: var(--accent);
    font-weight: 800;
}
.ap-tool .coord-btn svg {
    margin-right: 6px;
}
.ap-tool .coord-head {
    padding: 22px 24px 2px;
}
.ap-tool .coord-head h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
}
.ap-tool .coord-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    max-width: 46ch;
}
.ap-tool .coord-body {
    padding: 16px 24px 24px;
}
.ap-tool .coord-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.ap-tool #coordInput {
    flex: 1;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    padding: 12px 14px;
    font-size: 14px;
    background: var(--neutral);
    color: var(--ink);
}
.ap-tool #coordInput:focus {
    outline: none;
    border-color: var(--accent);
}
.ap-tool .coord-preview {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 9px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    background: var(--neutral-2);
}
.ap-tool .coord-modes {
    display: inline-flex;
    background: var(--neutral-2);
    border-radius: 9px;
    padding: 3px;
    margin-top: 14px;
    gap: 2px;
}
.ap-tool .mode-tab {
    border: none;
    background: transparent;
    padding: 7px 13px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: 0.15s;
}
.ap-tool .mode-tab.active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.ap-tool .coord-detected {
    margin: 14px 2px 12px;
    font-size: 12.5px;
    color: var(--muted);
    min-height: 18px;
}
.ap-tool .coord-detected b {
    color: var(--ink);
}
.ap-tool .coord-hex {
    background: var(--neutral-2);
    padding: 1px 7px;
    border-radius: 6px;
    margin-left: 4px;
}
.ap-tool .coord-hint {
    margin: 14px 2px 0;
    font-size: 12.5px;
    color: var(--muted);
}
.ap-tool .coord-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
    margin-top: 4px;
}
.ap-tool .coord-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: 0.15s;
}
.ap-tool .coord-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -12px rgba(32, 36, 31, 0.35);
}
.ap-tool .coord-card-sw {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    flex: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.ap-tool .coord-card-txt {
    flex: 1;
    min-width: 0;
}
.ap-tool .coord-card-txt b {
    display: block;
    font-size: 12.5px;
}
.ap-tool .coord-card-txt small {
    color: var(--muted);
    font-size: 10.5px;
}
.ap-tool .specbox {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 22px;
    margin: 24px 0 44px;
}
.ap-tool .specbox summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ap-tool .specbox summary::before {
    content: "▸";
    transition: 0.2s;
}
.ap-tool .specbox[open] summary::before {
    transform: rotate(90deg);
}
.ap-tool .spec-body {
    padding-top: 16px;
}
.ap-tool .spec-body ol {
    margin: 0 0 16px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13.5px;
}
.ap-tool .spec-body pre {
    background: #20241f;
    color: #e7e8e1;
    border-radius: 10px;
    padding: 16px 18px;
    overflow: auto;
    font-size: 12.5px;
    line-height: 1.55;
}
.ap-tool .spec-note {
    font-size: 12.5px;
    color: var(--muted);
}
.ap-tool .modal-back {
    position: fixed;
    inset: 0;
    background: rgba(24, 27, 22, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
    z-index: 60;
}
.ap-tool .modal-back.show {
    opacity: 1;
    pointer-events: auto;
}
.ap-tool .modal {
    background: var(--panel);
    border-radius: 16px;
    width: min(760px, 100%);
    max-height: calc(92vh - 100px);
    margin-top: 100px;
    overflow: auto;
    transform: translateY(16px) scale(0.98);
    transition: 0.25s;
    position: relative;
}
.ap-tool .modal-back.show .modal {
    transform: none;
}
.ap-tool .modal-x {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}
.ap-tool .modal-banner {
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    padding: 20px 24px;
    position: relative;
}
.ap-tool .m-ban-txt {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}
.ap-tool .m-kicker {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 800;
    opacity: 0.85;
}
.ap-tool .m-ban-txt h3 {
    margin: 0;
    font-size: 23px;
    font-weight: 600;
}
.ap-tool .m-hexchip {
    border: 1.5px solid currentColor;
    border-radius: 7px;
    padding: 3px 10px;
    font-size: 12.5px;
    font-weight: 700;
}
.ap-tool .modal-body {
    padding: 20px 24px 26px;
}
.ap-tool .match-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--neutral);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
}
.ap-tool .match-sw {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}
.ap-tool .match-sw .sw {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.ap-tool .match-de {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.ap-tool .match-de .arr {
    color: var(--muted);
    font-size: 15px;
}
.ap-tool .m-note {
    font-size: 12.5px;
    color: var(--muted);
    margin: 12px 2px 0;
}
.ap-tool .modal-body h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 20px 0 10px;
}
.ap-tool .opts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ap-tool .opt {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 13px 16px;
    background: #fff;
    transition: 0.15s;
}
.ap-tool .opt:hover {
    border-color: var(--tan);
}
.ap-tool .opt-ico {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    color: var(--ink);
}
.ap-tool .opt-ico svg {
    width: 24px;
    height: 24px;
}
.ap-tool .opt-info {
    flex: 1;
    min-width: 0;
}
.ap-tool .opt-info b {
    font-size: 14.5px;
}
.ap-tool .opt-info p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--muted);
}
.ap-tool .opt-price {
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
}
.ap-tool .m-fine {
    margin: 16px 2px 0;
    font-size: 12px;
    color: var(--muted);
}
.ap-tool .cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}
.ap-tool .cat-head h3 {
    margin: 0;
    font-size: 14.5px;
    flex-basis: 100%;
}
.ap-tool .cat-head .modal-x {
    position: static;
}
.ap-tool .cat-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}
.ap-tool #catSearch {
    border: 1.5px solid var(--line);
    border-radius: 9px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    background: var(--neutral);
    width: 210px;
    max-width: 100%;
    flex-grow: 1;
}
.ap-tool #catSearch:focus {
    outline: none;
    border-color: var(--accent);
}
.ap-tool .cat-count {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}
.ap-tool .cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    padding: 18px 22px;
    max-height: 62vh;
    overflow: auto;
}
.ap-tool .cat-cell {
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    padding: 0;
    transition: 0.13s;
    text-align: left;
}
.ap-tool .cat-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -12px rgba(32, 36, 31, 0.35);
}
.ap-tool .cc-sw {
    display: block;
    height: 44px;
}
.ap-tool .cc-t {
    display: block;
    padding: 5px 7px;
}
.ap-tool .cc-t b {
    display: block;
    font-size: 9.8px;
    line-height: 1.2;
    font-weight: 700;
}
.ap-tool .cc-t span {
    color: var(--muted);
    font-size: 9px;
}
.ap-tool #drawerBack {
    position: fixed;
    inset: 0;
    background: rgba(24, 27, 22, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
    z-index: 55;
}
.ap-tool #drawerBack.show {
    opacity: 1;
    pointer-events: auto;
}
.ap-tool #drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(400px, 100%);
    background: var(--panel);
    z-index: 56;
    transform: translateX(105%);
    transition: 0.32s cubic-bezier(0.2, 0.75, 0.25, 1);
    display: flex;
    flex-direction: column;
}
.ap-tool #drawer.show {
    transform: none;
}
.ap-tool .drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}
.ap-tool .drawer-head h3 {
    margin: 0;
    font-size: 15px;
}
.ap-tool #cartItems {
    flex: 1;
    overflow: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ap-tool .cart-item {
    display: flex;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 12px;
    background: #fff;
    align-items: center;
}
.ap-tool .ci-sw {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    flex: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.ap-tool .ci-info {
    flex: 1;
    min-width: 0;
}
.ap-tool .ci-info b {
    font-size: 13px;
    display: block;
}
.ap-tool .ci-info small {
    color: var(--muted);
    font-size: 11.5px;
}
.ap-tool .ci-qty {
    display: flex;
    align-items: center;
    gap: 7px;
}
.ap-tool .qb {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: var(--neutral);
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
}
.ap-tool .ci-price {
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
    min-width: 64px;
    text-align: right;
}
.ap-tool .ci-rm {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
}
.ap-tool .cart-empty {
    text-align: center;
    color: var(--muted);
    padding: 46px 10px;
    font-size: 14px;
}
.ap-tool .drawer-foot {
    border-top: 1px solid var(--line);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ap-tool .total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
}
.ap-tool .total b {
    font-size: 16px;
}
.ap-tool #toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 20px);
    background: var(--ink);
    color: var(--paper);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 70;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    max-width: 90vw;
    text-align: center;
}
.ap-tool #toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 1000px) {
    .ap-tool .workspace {
        grid-template-columns: 1fr;
    }
    .ap-tool .hero {
        grid-template-columns: 1fr;
    }
    .ap-tool .hero-art {
        min-height: 220px;
    }
}
@media (max-width: 860px) {
    .ap-tool #harmonyBody {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .ap-tool .crow {
        grid-template-columns: 56px 1fr;
    }
    .ap-tool .crow-sw {
        width: 56px;
        height: 56px;
    }
    .ap-tool .crow-matches {
        grid-column: 1/-1;
    }
}
.chip-skeleton-wrap {
    display: flex;
    gap: 8px;
    width: 100%;
}
.chip-skeleton {
    flex: 1;
    height: 38px;
    background: #eef0ec;
    border-radius: 8px;
    animation: apPulse 1.4s ease-in-out infinite;
}
@keyframes apPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
.hs-card-skeleton-wrap {
    background: #fff;
    border: 1px solid #e3e4dc;
    border-radius: 12px;
    overflow: hidden;
    height: 84px;
    display: flex;
    animation: apPulse 1.4s ease-in-out infinite;
}
.hs-meta-skeleton {
    flex: 1;
    background: #f7f8f6;
    margin: 12px;
    border-radius: 6px;
}
div.empty{
    width: auto !important;
    height: auto !important;
}
.coord-card-skeleton {
    height: 48px;
    background: #f7f8f6;
    border-radius: 8px;
    border: 1px solid #e3e4dc;
    animation: apPulse 1.4s ease-in-out infinite;
}
.cat-cell-skeleton {
    height: 54px;
    background: #f7f8f6;
    border-radius: 8px;
    border: 1px solid #e3e4dc;
    animation: apPulse 1.4s ease-in-out infinite;
}
.modal {
    max-width: 90% !important;
}
.opt-skeleton {
    height: 64px;
    background: #f7f8f6;
    border-radius: 10px;
    margin-bottom: 12px;
    animation: apPulse 1.4s ease-in-out infinite;
}
.opt-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.opt-link:hover {
    color: var(--btn-accent, #8c4a3e); /* Или ваш цвет активной ссылки на сайте */
    text-decoration: underline;
}

/* Адаптивная сетка карточек до 577px по 2 в ряд */
@media (max-width: 577px) {
    .opts, #mOpts {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Ровно 2 колонки в ряд */
        gap: 12px;
        padding: 4px;
    }
    .opt {
        display: flex;
        flex-direction: column; /* Элементы внутри карточки идут сверху вниз */
        align-items: center;
        text-align: center;
        padding: 10px;
        background: #f7f8f6;
        border-radius: 10px;
        height: 100%;
    }
    .opt-ico {
        width: 70px;
        height: 70px;
        margin-bottom: 8px;
    }
    .opt-info {
        flex: 1;
        margin: 0 0 8px 0;
    }
    .opt-info b {
        font-size: 13px;
        line-height: 1.3;
        display: block;
        margin-bottom: 4px;
    }
    .opt-info p {
        display: none; /* Скрываем длинное описание на мобилках для экономии места */
    }
    .opt-price {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 8px;
    }
    .opt-add {
        width: 100%; /* Кнопка во всю ширину карточки */
        padding: 8px 10px !important;
        font-size: 12px;
    }
}