.problems-shell {
    flex: 1;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 24px 32px 60px;
}

.problems-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    padding: 24px 28px;
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.13), rgba(6, 182, 212, 0.07) 55%, rgba(245, 158, 11, 0.08)),
        var(--bg-glass);
    box-shadow: var(--shadow-glass);
    margin-bottom: 18px;
}

.problems-hero[hidden] {
    display: none !important;
}

.problems-kicker,
.problems-section-head span,
.problem-card__meta,
.problem-context__label,
.problem-reward {
    color: #059669;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.problems-hero h1 {
    max-width: 780px;
    margin: 8px 0 10px;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    letter-spacing: 0;
}

.problems-hero p {
    max-width: 760px;
    margin: 0;
    font-size: 1rem;
}

.problems-hero__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 12px;
}

.problems-hero__stats > div,
.problems-database,
.problem-workbench {
    border: 1px solid var(--border-glass);
    background: var(--bg-surface);
    box-shadow: var(--shadow-glass);
}

.problems-hero__stats > div {
    min-height: 82px;
    border-radius: 14px;
    padding: 16px;
}

.problems-hero__stats strong {
    display: block;
    color: var(--text-primary);
    font: 800 1.8rem var(--font-heading);
    line-height: 1;
    margin-bottom: 8px;
}

.problems-hero__stats span {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
}

.problems-database,
.problem-workbench {
    border-radius: 22px;
}

.problems-database {
    padding: 24px;
    border: 1px solid var(--border-glass);
    background: var(--bg-surface);
    box-shadow: var(--shadow-glass);
}

.problems-database__header,
.problems-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.problems-database__header h2,
.problems-section-head h2 {
    margin: 4px 0 0;
    font-size: 1.55rem;
}

.problems-database__count {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-weight: 800;
    white-space: nowrap;
}

.problem-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    margin-bottom: 20px;
}

.problem-sort-select {
    min-height: 48px;
    padding: 0 36px 0 14px;
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font: 600 0.9rem var(--font-body);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.problem-sort-select:hover {
    border-color: rgba(16, 185, 129, 0.5);
}

.problem-search {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    background: var(--bg-dark);
    color: var(--text-secondary);
}

.problem-search i {
    font-size: 1.15rem;
    color: #059669;
    flex-shrink: 0;
}

.problem-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: 600 0.95rem var(--font-body);
}

.problem-search input::placeholder {
    color: var(--text-muted);
}

.problem-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}

.problem-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    background: var(--bg-glass);
}

.problem-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    color: var(--text-primary);
    font-size: 0.94rem;
}

.problem-table th,
.problem-table td {
    padding: 16px 18px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.problem-table th {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.problem-table tbody tr {
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.problem-table tbody tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.05);
}

.problem-table tbody tr:hover,
.problem-table tbody tr.is-solved {
    background: rgba(16, 185, 129, 0.08);
}

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

.problem-table__id {
    color: #2563eb;
    font-weight: 800;
    white-space: nowrap;
}

.problem-table__id i {
    margin-left: 8px;
    color: #059669;
    vertical-align: -2px;
}

.problem-table__name strong {
    display: block;
    max-width: 460px;
    color: var(--text-primary);
    font: 800 0.96rem var(--font-heading);
    line-height: 1.35;
}

.problem-difficulty {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.problem-difficulty--medium {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.problem-difficulty--hard {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.problem-rating-display {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    color: #f59e0b;
    font-size: 1rem;
    white-space: nowrap;
}

.problem-rating-count {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-left: 0.25rem;
}

.problem-table__attempts {
    color: var(--text-secondary);
    font-weight: 800;
    white-space: nowrap;
}

.problem-table__action,
.problem-table__action-heading {
    width: 74px;
    text-align: center;
}

.problem-filter,
.problem-action,
.problem-site-btn {
    min-height: 40px;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    background: var(--bg-dark);
    color: var(--text-secondary);
    font: 700 0.84rem var(--font-body);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}

.problem-filter {
    padding: 0 12px;
}

.problem-filter:hover,
.problem-filter.is-active,
.problem-site-btn:hover,
.problem-site-btn.is-selected {
    border-color: #10b981;
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
}

.problem-results {
    display: block;
}

.problem-card,
.problem-db-card {
    width: 100%;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    background: var(--bg-glass);
    color: inherit;
    text-align: left;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.problem-db-card {
    min-height: 238px;
    display: flex;
    flex-direction: column;
    cursor: default;
}

.problem-card:hover,
.problem-card.is-active,
.problem-db-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.08);
}

.problem-db-card.is-solved {
    border-color: rgba(16, 185, 129, 0.36);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-glass));
}

.problem-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.problem-card__id {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.problem-card__status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #059669;
    font-size: 0.76rem;
    font-weight: 800;
}

.problem-card__title {
    margin: 0 0 8px;
    color: var(--text-primary);
    font: 800 1rem var(--font-heading);
}

.problem-card__desc {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.45;
}

.problem-db-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
}

.problem-db-card__footer > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b45309;
    font-size: 0.82rem;
    font-weight: 800;
}

.problem-open-btn,
.problem-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: #fff;
    font: 800 0.84rem var(--font-body);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.problem-open-btn {
    padding: 0 13px;
}

.problem-open-btn--icon {
    width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 999px;
}

.problem-back-btn {
    width: fit-content;
    margin-bottom: 18px;
    padding: 0 14px;
    background: var(--bg-dark);
    border-color: var(--border-glass);
    color: var(--text-secondary);
}

.problem-open-btn:hover,
.problem-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.18);
}

.problem-workbench {
    min-height: 620px;
    padding: 24px;
}

.problem-empty {
    min-height: 520px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    text-align: center;
}

.problem-empty i {
    color: #10b981;
    font-size: 3rem;
}

.problem-empty h2,
.problem-empty p {
    max-width: 460px;
    margin: 0;
}

.problem-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.problem-header h2 {
    margin: 6px 0 8px;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.problem-header p {
    max-width: 760px;
    margin: 0;
}

.problem-reward {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    white-space: nowrap;
}

.problem-context {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.problem-context__item {
    padding: 14px;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    background: var(--bg-dark);
}

.problem-context__item strong {
    display: block;
    color: var(--text-primary);
    margin-top: 5px;
}

.problem-map-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 18px;
    align-items: start;
}

.problem-map-wrap {
    min-width: 0;
}

.problem-map {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 420px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 52%, rgba(16, 185, 129, 0.07), transparent 36%),
        linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        linear-gradient(0deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        #f8fafc;
    background-size: auto, 42px 42px, 42px 42px, auto;
    touch-action: none;
    user-select: none;
}

[data-theme="dark"] .problem-map {
    background:
        radial-gradient(circle at 50% 52%, rgba(16, 185, 129, 0.11), transparent 36%),
        linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.08) 1px, transparent 1px),
        #0f172a;
}

.problem-map__factory-ring,
.problem-map__safe-sector,
.problem-map__city {
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.problem-map__factory-ring {
    width: min(70%, 430px);
    aspect-ratio: 1;
    border: 4px solid #ef4444;
    background: rgba(248, 250, 252, 0.92);
}

.problem-map__factory-ring::after {
    content: "";
    position: absolute;
    inset: 31%;
    border: 3px solid rgba(15, 23, 42, 0.88);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .problem-map__factory-ring {
    background: rgba(15, 23, 42, 0.92);
}

[data-theme="dark"] .problem-map__factory-ring::after {
    border-color: rgba(226, 232, 240, 0.88);
    background: rgba(15, 23, 42, 0.92);
}

.problem-map__safe-sector {
    width: min(70%, 430px);
    aspect-ratio: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    background: conic-gradient(from 47deg, rgba(34, 197, 94, 0.34) 0deg 86deg, transparent 86deg 360deg);
    -webkit-mask: radial-gradient(circle closest-side, transparent 0 37.5%, #000 38% 100%, transparent 100.5%);
    mask: radial-gradient(circle closest-side, transparent 0 37.5%, #000 38% 100%, transparent 100.5%);
    z-index: 1;
}

.problem-map.has-result .problem-map__safe-sector {
    opacity: 1;
}

.problem-map__city {
    width: min(26%, 160px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 3px solid rgba(15, 23, 42, 0.88);
    background: rgba(255, 255, 255, 0.96);
    z-index: 2;
}

.problem-map__city span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font: 800 0.86rem var(--font-heading);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .problem-map__city {
    border-color: rgba(226, 232, 240, 0.9);
    background: rgba(15, 23, 42, 0.96);
}

.problem-map__wind {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.86);
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    z-index: 3;
}

.problem-map__wind--nw {
    left: 16%;
    top: 22%;
}

.problem-map__wind--sw {
    left: 14%;
    bottom: 21%;
}

.problem-map__wind--west {
    left: 10%;
    top: 46%;
}

.problem-map__wind i {
    color: #0284c7;
    font-size: 1.55rem;
}

.factory-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 16px;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
    cursor: grab;
    transform: translate(-50%, -50%);
    touch-action: none;
    z-index: 5;
}

.factory-marker:active {
    cursor: grabbing;
}

.factory-marker i {
    font-size: 1.65rem;
}

.factory-marker.is-correct {
    background: #059669;
}

.factory-marker.is-wrong {
    background: #dc2626;
}

.problem-map__hint {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.problem-panel {
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    background: var(--bg-dark);
    padding: 18px;
}

.problem-panel h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}

.problem-panel p {
    margin: 0 0 14px;
    font-size: 0.92rem;
}

.problem-site-btn {
    width: 100%;
    padding: 0 12px;
    text-align: left;
}

.problem-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border-color: transparent;
    background: var(--gradient-primary);
    color: #fff;
}

.problem-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.22);
}

.problem-feedback {
    display: none;
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    background: var(--bg-surface);
}

.problem-feedback.is-visible {
    display: block;
}

.problem-feedback strong {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.problem-feedback p {
    margin: 0;
}

@media (max-width: 1100px) {
    .problem-map-grid {
        grid-template-columns: 1fr;
    }

    .problem-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .problems-shell {
        padding: 20px 16px 48px;
    }

    .problems-hero,
    .problem-header {
        grid-template-columns: 1fr;
        display: grid;
        padding: 22px;
    }

    .problems-hero__stats,
    .problem-context {
        grid-template-columns: 1fr;
    }

    .problem-workbench,
    .problems-database {
        padding: 16px;
        border-radius: 18px;
    }

    .problems-database__header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .problem-results {
        margin: 0 -4px;
    }

    .problem-table {
        min-width: 700px;
        font-size: 0.88rem;
    }

    .problem-table th,
    .problem-table td {
        padding: 13px 14px;
    }

    .problem-db-card__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .problem-open-btn {
        width: 100%;
    }

    .problem-map {
        aspect-ratio: 10 / 12;
        min-height: 410px;
    }

    .factory-marker {
        width: 58px;
        height: 58px;
    }

    .problem-map__wind--nw {
        left: 8%;
        top: 7%;
    }

    .problem-map__wind--sw {
        left: 8%;
        bottom: 7%;
    }

    .problem-map__wind--west {
        left: 2%;
        top: 46%;
    }
}

/* Logistics Hub Elements */
.problem-map__port,
.problem-map__market-city {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 2;
}

.problem-map__port i {
    font-size: 24px;
    color: #0284c7;
    background: white;
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

.problem-map__market-city i {
    font-size: 24px;
    color: #475569;
    background: white;
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(71, 85, 105, 0.2);
}

.problem-map__port span,
.problem-map__market-city span {
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

[data-theme="dark"] .problem-map__port span,
[data-theme="dark"] .problem-map__market-city span {
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.9);
}

[data-theme="dark"] .problem-map__port i { background: #0f172a; box-shadow: none; }
[data-theme="dark"] .problem-map__market-city i { background: #0f172a; box-shadow: none; }

.problem-map__target-area {
    position: absolute;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px dashed #22c55e;
    background: rgba(34, 197, 94, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.problem-map.has-result .problem-map__target-area {
    opacity: 1;
}

.warehouse-marker i {
    color: #6366f1;
}

.problem-map--logistics-hub {
    /* Subtle road/grid pattern */
    background-image: 
        radial-gradient(#94a3b8 1px, transparent 1px),
        linear-gradient(to right, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
    background-size: 20px 20px, 100px 100px, 100px 100px;
    background-position: center;
}

[data-theme="dark"] .problem-map--logistics-hub {
    background-image: 
        radial-gradient(#334155 1px, transparent 1px);
}

/* Star Rating */
.problem-star-rating {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}
.problem-star-rating button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    font-size: 24px;
    color: #94a3b8;
    transition: transform 0.1s;
}

/* Soil Profile Game */
.problem-map--soil-profile {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #f8fafc;
}

[data-theme="dark"] .problem-map--soil-profile {
    background: #0f172a;
}

.problem-soil-layers {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.soil-layer {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
    min-height: 60px;
    position: relative;
}

/* Colors for layers */
.soil-layer--O { background: #3f2a1d; } /* Dark Organic */
.soil-layer--A { background: #5c4033; } /* Topsoil */
.soil-layer--B { background: #8b5a2b; } /* Subsoil clay */
.soil-layer--C { background: #b89f7d; } /* Parent material */
.soil-layer--R { background: #94a3b8; } /* Bedrock */

.soil-layer-info {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
}

.soil-slot {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.soil-desc {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.soil-chips-bank {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0 0 0;
    min-height: 64px;
}

.soil-chip {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 2px solid #e2e8f0;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.soil-chip:active {
    cursor: grabbing;
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

[data-theme="dark"] .soil-chip {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

/* Ensure dropped chips perfectly align in slot */
.soil-slot .soil-chip {
    margin: 0;
    cursor: grab;
}

/* AI Geography Grading */
.problem-map--ai-geography-grading {
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    /* remove the default grid lines for this map */
}

.university-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: #6366f1; /* Indigo */
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.3);
    cursor: grab;
    transform: translate(-50%, -50%);
    touch-action: none;
    z-index: 10;
}

.university-marker:active {
    cursor: grabbing;
}

.university-marker i {
    font-size: 1.5rem;
}

.ai-reasoning-input {
    width: 100%;
    min-height: 100px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font: 400 0.95rem var(--font-body);
    resize: vertical;
}

.ai-reasoning-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.word-count-warning {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: -8px;
    margin-bottom: 12px;
    display: none;
}

.ai-grading-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin-top: 16px;
}

.ai-grading-card__score {
    font-size: 1.8rem;
    font-weight: 800;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-grading-card__feedback {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
}
