* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
    padding: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
    padding: 32px;
    transition: all 0.3s ease;
}

/* ===== HEADER ===== */
header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f4f8;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-title {
    color: #4299e1;
    flex-shrink: 0;
}

/* ===== FILE INFO ===== */
.file-info-block {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 14px 4px 10px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e8ecf1;
}

.icon-file {
    color: #718096;
    flex-shrink: 0;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: #2d3748;
    letter-spacing: 0.2px;
}

/* ===== STATS ===== */
.stats-block {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f7fafc;
    padding: 8px 20px;
    border-radius: 10px;
    border: 1px solid #e8ecf1;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-stats {
    color: #718096;
    flex-shrink: 0;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    min-width: 20px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    font-weight: 400;
    color: #718096;
    letter-spacing: 0.3px;
    text-transform: lowercase;
}

.stat-divider {
    width: 1px;
    height: 24px;
    background: #dce2e9;
}

/* ===== ALERTS ===== */
.alert {
    padding: 16px 24px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 14px;
    word-break: break-word;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.icon-alert {
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-error {
    background: #fff5f5;
    color: #9b2c2c;
    border: 1px solid #feb2b2;
}

.alert-error .icon-alert {
    color: #9b2c2c;
}

.alert-warning {
    background: #fffff0;
    color: #744210;
    border: 1px solid #f6e05e;
}

.alert-warning .icon-alert {
    color: #744210;
}

.alert-warning small {
    display: block;
    margin-top: 5px;
    opacity: 0.8;
}

/* ===== SEARCH ===== */
.search-section {
    margin-bottom: 28px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f7fafc;
    padding: 4px 4px 4px 16px;
    border-radius: 16px;
    border: 2px solid #edf2f7;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #4299e1;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.1);
}

.search-icon {
    color: #a0aec0;
    flex-shrink: 0;
    margin-right: 8px;
}

.search-box input {
    flex: 1;
    padding: 14px 0;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #2d3748;
    outline: none;
    min-width: 100px;
}

.search-box input::placeholder {
    color: #a0aec0;
}

.search-box .search-clear {
    padding: 8px 12px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: none;
    flex-shrink: 0;
}

.search-box .search-clear.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box .search-clear:hover {
    color: #4a5568;
    background: #edf2f7;
}

.search-box .search-count {
    padding: 8px 16px;
    font-size: 13px;
    color: #718096;
    background: #edf2f7;
    border-radius: 10px;
    font-weight: 500;
    margin-left: 8px;
    white-space: nowrap;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 4px;
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #f7fafc;
    color: #2d3748;
}

.tab-btn.active {
    background: #4299e1;
    color: white;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.tab-btn .badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 1px 10px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 6px;
}

.tab-btn.active .badge {
    background: rgba(255,255,255,0.25);
}

/* ===== SPECIALTY HEADER ===== */
.specialty-header {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    font-size: 15px;
    word-break: break-word;
    letter-spacing: 0.2px;
}

/* ===== TABLE ===== */
.table-container {
    overflow-x: auto;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0;
    border-top: none;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 450px;
}

thead {
    background: #f7fafc;
}

thead th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid #edf2f7;
    color: #2d3748;
    vertical-align: middle;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: #f7fafc;
}

tbody tr:last-child td {
    border-bottom: none;
}

.privilege-row {
    background: linear-gradient(90deg, #f0fff4 0%, #ffffff 100%);
}

.privilege-row td:first-child {
    border-left: 4px solid #48bb78;
}

.privilege-row:hover {
    background: #e6fffa !important;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    min-width: 32px;
}

.badge-privilege {
    background: #c6f6d5;
    color: #276749;
    box-shadow: 0 2px 4px rgba(72, 187, 120, 0.2);
}

.badge-privilege svg {
    stroke: #276749;
}

.badge-no-privilege {
    background: #edf2f7;
    color: #718096;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status svg {
    flex-shrink: 0;
}

.status.priority {
    background: #fefcbf;
    color: #744210;
    box-shadow: 0 2px 4px rgba(214, 188, 0, 0.2);
}

.status.priority svg {
    stroke: #744210;
}

.status.normal {
    background: #edf2f7;
    color: #718096;
}

/* ===== SEARCH RESULTS ===== */
.search-results {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    animation: fadeIn 0.3s ease;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.search-results h2 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.search-results .result-count {
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    background: #f7fafc;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid #edf2f7;
    min-width: 24px;
    text-align: center;
}

.results-grid {
    display: grid;
    gap: 12px;
}

.result-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    transition: all 0.3s ease;
    word-break: break-word;
}

.result-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateX(4px);
    border-color: #4299e1;
}

.result-card.privilege-card {
    border-left: 4px solid #48bb78;
    background: #f0fff4;
}

/* Группа в результатах поиска */
.result-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.icon-folder {
    color: #4299e1;
    flex-shrink: 0;
}

.match-type {
    font-size: 11px;
    color: #4299e1;
    background: #ebf8ff;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.result-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px 20px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
    padding: 4px 0;
}

.result-label {
    color: #718096;
    font-weight: 400;
    white-space: nowrap;
    min-width: 120px;
}

.result-value {
    color: #2d3748;
    font-weight: 600;
    word-break: break-word;
}

.result-card.privilege-card .result-value {
    color: #276749;
}

/* ===== СКРЫТИЕ ТАБЛИЦ ПРИ ПОИСКЕ ===== */
.results-section {
    transition: all 0.3s ease;
}

body.search-active .results-section {
    display: none;
}

body.search-active .search-results {
    display: block;
}

/* ===== FOOTER ===== */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #edf2f7;
    text-align: center;
    color: #a0aec0;
    font-size: 13px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================ */
/* ===== MOBILE ADAPTATION ===== */
/* ============================================ */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 16px;
        border-radius: 18px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .stats-block {
        justify-content: space-around;
        padding: 10px 14px;
        gap: 8px;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .stat-divider {
        display: none;
    }
    
    .search-box {
        padding: 4px 4px 4px 14px;
        border-radius: 14px;
    }
    
    .search-box input {
        font-size: 16px;
        padding: 12px 0;
    }
    
    .tabs {
        gap: 4px;
        padding-bottom: 4px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        padding: 8px 14px;
        font-size: 12px;
        flex-shrink: 0;
        border-radius: 8px;
    }
    
    .tab-btn .badge {
        font-size: 10px;
        padding: 0px 7px;
    }
    
    .specialty-header {
        font-size: 13px;
        padding: 10px 16px;
        border-radius: 10px 10px 0 0;
    }
    
    table {
        font-size: 13px;
        min-width: 380px;
    }
    
    thead th {
        padding: 10px 12px;
        font-size: 10px;
    }
    
    tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .badge {
        font-size: 14px;
        padding: 2px 8px;
        min-width: 26px;
    }
    
    .status {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .search-results h2 {
        font-size: 17px;
    }
    
    .result-card {
        padding: 14px 16px;
        border-radius: 12px;
    }
    
    .result-body {
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
    }
    
    .result-item {
        font-size: 12px;
        padding: 2px 0;
    }
    
    .result-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 6px;
    }
    
    .container {
        padding: 12px;
        border-radius: 14px;
    }
    
    header h1 {
        font-size: 18px;
    }
    
    header h1 .icon-title {
        width: 20px;
        height: 20px;
    }
    
    .file-info-block {
        padding: 3px 10px 3px 8px;
    }
    
    .file-name {
        font-size: 12px;
    }
    
    .stats-block {
        padding: 8px 10px;
        gap: 4px;
        justify-content: space-between;
    }
    
    .stat-item {
        flex: 1;
        min-width: 50px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-icon {
        font-size: 13px;
    }
    
    .search-box {
        padding: 4px 4px 4px 10px;
        border-radius: 12px;
    }
    
    .search-box input {
        font-size: 16px;
        padding: 10px 0;
    }
    
    .search-box .search-count {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .tab-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    table {
        font-size: 12px;
        min-width: 320px;
    }
    
    thead th {
        padding: 8px 10px;
        font-size: 9px;
    }
    
    tbody td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .badge {
        font-size: 12px;
        padding: 1px 6px;
        min-width: 22px;
    }
    
    .status {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    .specialty-header {
        font-size: 12px;
        padding: 8px 14px;
    }
    
    .result-card {
        padding: 12px 14px;
        border-radius: 10px;
    }
    
    .result-body {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    
    .result-item {
        font-size: 12px;
        padding: 2px 0;
        flex-wrap: wrap;
    }
    
    .result-label {
        min-width: 90px;
    }
    
    .result-group {
        font-size: 13px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .match-type {
        font-size: 10px;
        padding: 1px 8px;
    }
    
    .search-results .result-count {
        font-size: 12px;
        padding: 2px 10px;
    }
    
    .alert {
        font-size: 12px;
        padding: 10px 14px;
    }
    
    footer {
        font-size: 11px;
        margin-top: 24px;
    }
}

/* ===== TOUCH OPTIMIZATION ===== */
@media (hover: none) {
    .tab-btn:hover {
        background: transparent;
        color: #718096;
    }
    
    .tab-btn.active:hover {
        background: #4299e1;
        color: white;
    }
    
    tbody tr:hover {
        background: transparent;
    }
    
    .privilege-row:hover {
        background: linear-gradient(90deg, #f0fff4 0%, #ffffff 100%);
    }
    
    .result-card:hover {
        transform: none;
        box-shadow: none;
        border-color: #e2e8f0;
    }
    
    .result-card:active {
        transform: scale(0.99);
        border-color: #4299e1;
    }
}

/* В style.css добавить, если нужно выделить уникальные значения */
.stat-item .stat-label-unique {
    color: #4299e1;
    font-weight: 500;
}



/* ===== БЮДЖЕТНЫЕ СТРОКИ В ТАБЛИЦЕ ===== */
.budget-row {
    background: linear-gradient(90deg, #f0fff4 0%, #ffffff 100%);
}

.budget-row td:first-child {
    border-left: 4px solid #48bb78;
    padding-left: 14px;
}

.budget-row:hover {
    background: #e6fffa !important;
}

/* Если у студента есть и льгота, и бюджет - приоритет у льготы */
.privilege-row.budget-row {
    background: linear-gradient(90deg, #ebf8ff 0%, #f0fff4 50%, #ffffff 100%);
}

.privilege-row.budget-row td:first-child {
    border-left: 4px solid #4299e1;
}


/* ===== БЮДЖЕТНЫЕ КАРТОЧКИ В РЕЗУЛЬТАТАХ ПОИСКА ===== */
.budget-card {
    border-left: 4px solid #48bb78 !important;
    background: #f0fff4 !important;
}

.budget-card:hover {
    border-color: #48bb78 !important;
}

.privilege-card.budget-card {
    border-left: 4px solid #4299e1 !important;
    background: linear-gradient(90deg, #ebf8ff 0%, #f0fff4 50%, #ffffff 100%) !important;
}

/* ===== БЮДЖЕТНЫЕ СТРОКИ В ТАБЛИЦЕ ===== */
.budget-row {
    background: linear-gradient(90deg, #f0fff4 0%, #ffffff 100%);
}

.budget-row td:first-child {
    border-left: 4px solid #48bb78;
    padding-left: 14px;
}

.budget-row:hover {
    background: #e6fffa !important;
}

/* Если у студента есть и льгота, и бюджет - приоритет у льготы */
.privilege-row.budget-row {
    background: linear-gradient(90deg, #ebf8ff 0%, #f0fff4 50%, #ffffff 100%);
}

.privilege-row.budget-row td:first-child {
    border-left: 4px solid #4299e1;
}

/* ===== БЮДЖЕТНЫЕ КАРТОЧКИ В РЕЗУЛЬТАТАХ ПОИСКА ===== */
.budget-card {
    border-left: 4px solid #48bb78 !important;
    background: #f0fff4 !important;
}

.budget-card:hover {
    border-color: #48bb78 !important;
}

.privilege-card.budget-card {
    border-left: 4px solid #4299e1 !important;
    background: linear-gradient(90deg, #ebf8ff 0%, #f0fff4 50%, #ffffff 100%) !important;
}

/* ===== ПОДСКАЗКА ===== */
.hint-section {
    margin-bottom: 20px;
}

.hint-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.hint-toggle:hover {
    background: #edf2f7;
    border-color: #4299e1;
}

.hint-toggle svg {
    flex-shrink: 0;
}

.hint-toggle span {
    flex: 1;
    text-align: left;
}

.hint-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.hint-toggle.active .hint-arrow {
    transform: rotate(180deg);
}

.hint-content {
    display: none;
    padding: 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    animation: fadeIn 0.3s ease;
}

.hint-content.open {
    display: block;
}

/* ===== БЛОКИ ПОДСКАЗКИ ===== */
.hint-block {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #edf2f7;
}

.hint-block:last-child {
    margin-bottom: 0;
}

.hint-block-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1.2;
}

.hint-block-body {
    flex: 1;
    min-width: 0;
}

.hint-block-title {
    font-weight: 700;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 4px;
}

.hint-block-text {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
}

.hint-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.hint-list span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hint-block-text strong {
    color: #2d3748;
}

/* ===== СПЕЦИАЛЬНОСТИ СКРОЛЛ ===== */
.hint-block-specialties {
    flex-direction: column;
}

.hint-block-specialties .hint-block-icon {
    align-self: flex-start;
}

.hint-block-specialties .hint-block-body {
    width: 100%;
}

.hint-specialties-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 4px 0 8px 0;
}

.hint-table {
    width: 100%;
    min-width: 200px;
    font-size: 12px;
    border-collapse: collapse;
}

.hint-table thead th {
    background: #edf2f7;
    padding: 4px 8px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    font-size: 11px;
    white-space: nowrap;
}

.hint-table tbody td {
    padding: 3px 8px;
    border-bottom: 1px solid #edf2f7;
    font-size: 12px;
    white-space: nowrap;
}

.hint-table tbody tr:hover {
    background: #edf2f7;
}

.hint-note {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 8px 12px;
    background: #ebf8ff;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.8;
    color: #2b6cb0;
}

.hint-note-item {
    white-space: nowrap;
}

.hint-note-item strong {
    color: #2b6cb0;
}

/* ===== ЛЕГЕНДА ===== */
.hint-block-legend .hint-block-body {
    width: 100%;
}

.hint-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-top: 2px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    white-space: nowrap;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.legend-budget {
    background: #f0fff4;
    border-left: 3px solid #48bb78;
}

.legend-privilege {
    background: #ebf8ff;
    border-left: 3px solid #4299e1;
}

.legend-budget-privilege {
    background: linear-gradient(90deg, #ebf8ff, #f0fff4);
    border-left: 3px solid #4299e1;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .hint-toggle {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .hint-content {
        padding: 12px;
    }
    
    .hint-block {
        padding: 10px 12px;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .hint-block-icon {
        font-size: 20px;
    }
    
    .hint-block-title {
        font-size: 13px;
    }
    
    .hint-block-text {
        font-size: 12px;
    }
    
    .hint-table {
        font-size: 11px;
    }
    
    .hint-table thead th,
    .hint-table tbody td {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    .hint-note {
        font-size: 11px;
        padding: 6px 10px;
        flex-direction: column;
        gap: 2px;
    }
    
    .hint-note-item {
        white-space: normal;
    }
    
    .hint-legend {
        gap: 6px 12px;
    }
    
    .legend-item {
        font-size: 12px;
    }
    
    .legend-color {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .hint-toggle {
        font-size: 12px;
        padding: 8px 10px;
        border-radius: 10px;
        gap: 6px;
    }
    
    .hint-toggle svg {
        width: 16px;
        height: 16px;
    }
    
    .hint-content {
        padding: 8px;
        border-radius: 0 0 10px 10px;
    }
    
    .hint-block {
        padding: 8px 10px;
        margin-bottom: 6px;
        border-radius: 8px;
        gap: 8px;
    }
    
    .hint-block-icon {
        font-size: 18px;
    }
    
    .hint-block-title {
        font-size: 12px;
    }
    
    .hint-block-text {
        font-size: 11px;
    }
    
    .hint-table {
        font-size: 10px;
        min-width: 150px;
    }
    
    .hint-table thead th,
    .hint-table tbody td {
        padding: 2px 4px;
        font-size: 10px;
    }
    
    .hint-note {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .hint-legend {
        gap: 4px 8px;
    }
    
    .legend-item {
        font-size: 11px;
        gap: 4px;
    }
    
    .legend-color {
        width: 14px;
        height: 14px;
        border-radius: 3px;
    }
    
    .hint-list span {
        font-size: 11px;
    }
}

/* ===== ТАЧ-УСТРОЙСТВА ===== */
@media (hover: none) {
    .hint-toggle:hover {
        background: #f7fafc;
        border-color: #e2e8f0;
    }
    
    .hint-toggle:active {
        background: #edf2f7;
        border-color: #4299e1;
    }
    
    .hint-table tbody tr:hover {
        background: transparent;
    }
}