/* Misscall Design System - Main Site CSS */

/* --- 1. Design System Tokens & Global Variables --- */
:root {
    --mg-black: #0a0a0c;
    --mg-card: #161618;
    --mg-card-inner: #111113;
    --mg-card-soft: #1c1c20;
    --mg-card-hover: #222226;
    --mg-border: #2a2a2e;
    --mg-border-light: rgba(255, 255, 255, 0.08);
    --mg-orange: #d71920;
    --mg-amber: #d71920;
    --mg-green: #10b981;
    --mg-rose: #f43f5e;
    --mg-text: #f3f4f6;
    --mg-muted: #9ca3af;
    --primary-gradient: linear-gradient(135deg, #d71920 0%, #d71920 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.site-main {
    background-color: var(--mg-black);
    color: var(--mg-text);
    font-family: 'Sarabun', 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Strict Hide Rule to prevent cross-view bleeding */
.hidden,
.app-view.hidden,
#financeLimitView.hidden,
#calculatorView.hidden,
.results-container.hidden,
.results-placeholder.hidden {
    display: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0c;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d71920;
}

/* Ambient Glow Background */
.ambient-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 40% -10%, rgba(215, 25, 32, 0.15), transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(215, 25, 32, 0.08), transparent 30%);
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
}

/* --- 2. Header & Navigation --- */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px clamp(16px, 3vw, 40px);
    background: rgba(14, 14, 17, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--mg-border-light);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-header-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.brand-logo-badge .brand-pct {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: #0a0a0c;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(215, 25, 32, 0.4);
}

.brand-logo-badge .brand-name-orange {
    color: var(--mg-amber);
}

.brand-subhead {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 14px;
}

.brand-subhead .brand-calc-label {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.brand-subhead .brand-calc-desc {
    font-size: 11px;
    color: var(--mg-muted);
    line-height: 1.2;
}

.partner-logo {
    display: block;
    max-height: 42px;
    object-fit: contain;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-tabs {
    display: flex;
    align-items: center;
    background: #161618;
    border: 1px solid var(--mg-border);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.main-tab {
    padding: 8px 22px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--mg-muted);
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.main-tab i {
    font-size: 14px;
}

.main-tab:hover {
    color: #ffffff;
}

.main-tab.active {
    background: var(--primary-gradient);
    color: #0a0a0c;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(215, 25, 32, 0.4);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-switch {
    display: inline-block;
}

.theme-switch-checkbox {
    display: none;
}

.theme-switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 48px;
    height: 26px;
    background: #222226;
    border: 1px solid var(--mg-border);
    border-radius: 999px;
    padding: 3px 6px;
    position: relative;
    cursor: pointer;
    font-size: 11px;
    color: #d71920;
}

.theme-switch-ball {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 999px;
    transition: transform 0.25s ease;
    box-shadow: 0 0 8px rgba(215, 25, 32, 0.5);
}

.theme-switch-checkbox:checked + .theme-switch-label .theme-switch-ball {
    transform: translateX(22px);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #1c1c20;
    border: 1.5px solid var(--mg-orange);
    display: grid;
    place-items: center;
    color: var(--mg-amber);
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 0 12px rgba(215, 25, 32, 0.3);
}

/* สวิตช์ลูกค้าต่างชาติ: เปิดแล้วยอดจัดทั้งหน้า -10% */
.foreign-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 6px 0 12px;
    border-radius: 999px;
    border: 1px solid var(--mg-border);
    background: #1c1c20;
    color: var(--mg-muted);
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s ease;
}

.foreign-toggle:hover {
    color: var(--mg-text);
    border-color: rgba(56, 189, 248, 0.5);
}

.foreign-toggle-track {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #2a2a2e;
    transition: background 0.25s ease;
}

.foreign-toggle-ball {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #9ca3af;
    transition: transform 0.25s ease, background 0.25s ease;
}

.foreign-toggle[aria-pressed="true"] {
    color: #ffffff;
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.foreign-toggle[aria-pressed="true"] i {
    color: #38bdf8;
}

.foreign-toggle[aria-pressed="true"] .foreign-toggle-track {
    background: #0ea5e9;
}

.foreign-toggle[aria-pressed="true"] .foreign-toggle-ball {
    transform: translateX(14px);
    background: #ffffff;
}

.foreign-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1380px;
    margin: 16px auto 0;
    width: calc(100% - 2 * clamp(16px, 2.5vw, 32px));
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #7dd3fc;
    font-size: 13.5px;
    position: relative;
    z-index: 1;
}

.foreign-notice strong {
    color: #ffffff;
}

/* --- 3. Calculator View Layout (12 Columns: 5 Left / 7 Right) --- */
#calculatorView.active {
    display: block;
    width: 100%;
    max-width: 1380px;
    margin: 32px auto 48px;
    padding: 0 clamp(16px, 2.5vw, 32px);
}

.calculator-layout-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
}

.calculator-left-col {
    grid-column: span 5 / span 5;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* กัน grid item ดันความกว้างตามเนื้อหาข้างใน (แถบทิปเป็น flex ยาว 3 หน้า) */
    min-width: 0;
}

.calculator-right-col {
    grid-column: span 7 / span 7;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 90px;
    min-width: 0;
}

/* Form Container Card */
.calculator-form {
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.form-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mg-border-light);
}

.form-kicker i {
    color: var(--mg-orange);
    font-size: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--mg-muted);
    font-size: 13px;
    font-weight: 600;
}

.form-group label i {
    color: var(--mg-amber);
    margin-right: 6px;
    width: 16px;
    text-align: center;
}

.input-group {
    display: flex;
    align-items: center;
    width: 100%;
    height: 48px;
    background: var(--mg-card-inner);
    border: 1px solid var(--mg-border);
    border-radius: 12px;
    padding: 0 14px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.input-group:focus-within {
    border-color: var(--mg-orange);
    box-shadow: 0 0 0 2px rgba(215, 25, 32, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.input-group input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.input-group input::placeholder {
    color: #6b7280;
}

.input-group select {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23D71920%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 10px auto;
    padding-right: 24px;
}

.input-group select option {
    background: #161618;
    color: #ffffff;
}

.input-group span {
    color: var(--mg-amber);
    font-size: 14px;
    font-weight: 700;
    margin-left: 8px;
    flex-shrink: 0;
}

#companyCardContainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.company-card {
    height: 48px;
    background: var(--mg-card-inner);
    border: 1px solid var(--mg-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--mg-muted);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.company-card i {
    font-size: 18px;
}

.company-card:hover {
    border-color: rgba(215, 25, 32, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

.company-card.selected {
    background: var(--mg-card-soft);
    border: 2px solid var(--mg-orange);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(215, 25, 32, 0.35);
}

.company-card.selected i {
    color: var(--mg-amber);
}

.calculate-btn {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: #0a0a0c;
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 16px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(215, 25, 32, 0.35);
    transition: all 0.25s ease;
    margin-top: 8px;
}

.calculate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(215, 25, 32, 0.55);
}

.calculate-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.promo-button {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.45) 0%, rgba(215, 25, 32, 0.35) 100%);
    border: 1.5px solid var(--mg-orange);
    color: #ffffff;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    animation: pulse-border 2.5s infinite;
    transition: transform 0.2s;
}

.promo-button:hover {
    transform: translateY(-1px);
}

@keyframes pulse-border {
    0%, 100% {
        border-color: #d71920;
        box-shadow: 0 0 10px rgba(215, 25, 32, 0.35);
    }
    50% {
        border-color: #d71920;
        box-shadow: 0 0 20px rgba(215, 25, 32, 0.65);
    }
}

/* --- แบนเนอร์ทิป 3 หน้า (เนื้อหาฝังในโค้ดที่ TIP_SLIDES ใน index.html) --- */
.tip-banner {
    position: relative;
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 14px;
    padding: 14px 0;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.45s ease;
}

.carousel-item {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 38px;
    overflow: hidden;
    text-align: center;
}

.tip-title {
    display: block;
    color: var(--mg-orange);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
}

.tip-line {
    display: block;
    color: var(--mg-text);
    font-size: 12.5px;
    line-height: 1.45;
}

.tip-line + .tip-line {
    margin-top: 3px;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--mg-border);
    color: var(--mg-muted);
    font-size: 13px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-nav-btn:hover {
    color: #fff;
    background: var(--mg-orange);
    border-color: var(--mg-orange);
}

.carousel-nav-btn.prev {
    left: 6px;
}

.carousel-nav-btn.next {
    right: 6px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #3a3a40;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot.active {
    background: var(--mg-orange);
    width: 16px;
}

.loader {
    color: var(--mg-muted);
    font-size: 13px;
    text-align: center;
    padding: 12px;
}

/* --- 4. Right Side: Result Dashboard --- */
.results-container {
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    animation: fade-in 0.3s ease forwards;
}

.result-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--mg-border-light);
}

.result-status-header .status-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
}

.result-status-header .status-title i {
    color: var(--mg-orange);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 999px;
    color: #34d399;
    font-size: 12px;
    font-weight: 700;
}

.status-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: neon-pulse 1.8s infinite;
}

@keyframes neon-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 6px #10b981;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
        box-shadow: 0 0 14px #10b981, 0 0 20px rgba(16, 185, 129, 0.5);
    }
}

/* Stat Boxes (2 Columns) */
.results-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.stat-box {
    position: relative;
    overflow: hidden;
    background: var(--mg-card-soft);
    border: 1px solid var(--mg-border);
    border-radius: 14px;
    padding: 16px 18px;
}

.stat-box-bg-glow {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(215, 25, 32, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--mg-muted);
    font-size: 13px;
    font-weight: 600;
}

.stat-label i {
    color: var(--mg-amber);
    font-size: 13px;
}

.stat-value {
    display: block;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin-top: 4px;
    line-height: 1.2;
}

/* Installment Cards Grid */
.installment-section {
    margin-bottom: 20px;
}

.section-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-subhead span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-subhead span i {
    color: var(--mg-orange);
}

.section-subhead small {
    color: var(--mg-muted);
    font-size: 12px;
}

.installment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.installment-card {
    background: var(--mg-card-inner);
    border: 1px solid var(--mg-border);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    transition: all 0.2s ease;
}

.installment-card:hover {
    border-color: var(--mg-orange);
    background: var(--mg-card-soft);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(215, 25, 32, 0.25);
}

.installment-term {
    display: block;
    color: var(--mg-muted);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.installment-card:hover .installment-term {
    color: var(--mg-amber);
}

.installment-price {
    display: block;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.installment-price small {
    font-size: 11px;
    font-weight: 400;
    color: var(--mg-muted);
}

/* งวดที่ยังไม่เปิดให้ผ่อน (ชีทใส่ข้อความไว้แทนตัวเลข) */
.installment-card.is-pending {
    opacity: 0.55;
    border-style: dashed;
}

.installment-card.is-pending:hover {
    border-color: var(--mg-border);
    background: var(--mg-card-inner);
    transform: none;
    box-shadow: none;
}

.installment-price.pending-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--mg-muted);
}

/* Summary Receipt */
.payout-details-receipt {
    background: var(--mg-card-inner);
    border: 1px solid var(--mg-border);
    border-radius: 14px;
    padding: 18px 20px;
}

.receipt-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mg-muted);
    letter-spacing: 0.5px;
    border-bottom: 1px dashed var(--mg-border);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.receipt-header i {
    color: var(--mg-amber);
}

.receipt-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.receipt-rows .result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--mg-muted);
}

.receipt-rows .result-row span:last-child {
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
}

.text-subtle-rose {
    color: #f87171 !important;
}

/* Net Transfer Total Card */
.receipt-total-card {
    background: #18181c;
    border: 1px solid rgba(215, 25, 32, 0.35);
    border-left: 4px solid var(--mg-orange);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label-wrap .total-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    display: block;
}

.total-label-wrap .total-desc {
    color: var(--mg-muted);
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

.total-transfer-gradient {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #d71920 20%, #d71920 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(215, 25, 32, 0.4));
    line-height: 1;
}

/* Initial Placeholder */
.results-placeholder {
    background: var(--mg-card);
    border: 1px dashed var(--mg-border);
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 480px;
}

.results-placeholder .placeholder-icon {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    /* ไอคอนแอปมีพื้นหลังในตัวอยู่แล้ว ไม่ต้องใส่กรอบซ้อน แค่เรืองแสงส้มรับกับธีม */
    filter: drop-shadow(0 6px 20px rgba(215, 25, 32, 0.35));
    animation: placeholderFloat 4.5s ease-in-out infinite;
}

.results-placeholder .placeholder-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
}

@keyframes placeholderFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    .results-placeholder .placeholder-icon { animation: none; }
}

.results-placeholder h3 {
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
}

.results-placeholder p {
    color: var(--mg-muted);
    font-size: 13.5px;
    max-width: 360px;
    line-height: 1.5;
}

/* --- 5. Matrix Price Table View (#financeLimitView) --- */
#financeLimitView.active {
    display: block;
    width: 100%;
    max-width: 1720px;
    margin: 32px auto 48px;
    padding: 0 clamp(16px, 2vw, 32px);
    animation: fade-in 0.3s ease forwards;
}

.finance-limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(22, 22, 24, 0.95), rgba(17, 17, 19, 0.95));
    border: 1px solid var(--mg-border);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.finance-limit-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
}

.executive-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(215, 25, 32, 0.12);
    border: 1px solid rgba(215, 25, 32, 0.3);
    color: var(--mg-orange);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.finance-limit-header h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 60%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.finance-limit-header p {
    color: var(--mg-muted);
    font-size: 13.5px;
    margin-top: 4px;
}

.header-stat-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: rgba(215, 25, 32, 0.08);
    border: 1px solid rgba(215, 25, 32, 0.25);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(215, 25, 32, 0.1);
}

.stat-badge-pulse {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: neon-pulse 1.8s infinite;
}

.stat-badge-info {
    display: flex;
    flex-direction: column;
}

.stat-badge-label {
    font-size: 11px;
    color: var(--mg-muted);
    font-weight: 600;
}

.stat-badge-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--mg-amber);
}

.finance-control-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.finance-type-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 20px;
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.finance-type-filter .filter-label {
    color: var(--mg-muted);
    font-size: 13px;
    font-weight: 700;
    margin-right: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.finance-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--mg-border);
    border-radius: 999px;
    background: var(--mg-card-inner);
    color: var(--mg-muted);
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.finance-type-chip .chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--mg-muted);
}

.finance-type-chip:hover {
    border-color: var(--mg-orange);
    color: #ffffff;
    transform: translateY(-1px);
}

.finance-type-chip.active {
    background: var(--primary-gradient);
    color: #0a0a0c;
    border-color: transparent;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(215, 25, 32, 0.4);
}

.finance-type-chip.chip-new.active {
    background: linear-gradient(135deg, #d71920 0%, #d71920 100%);
    color: #0a0a0c;
    box-shadow: 0 4px 16px rgba(215, 25, 32, 0.45);
}

.finance-type-chip.chip-used.active {
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    color: #0f172a;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.finance-type-chip.chip-import.active {
    background: linear-gradient(135deg, #c4b5fd 0%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.45);
}

.finance-limit-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1.8fr) repeat(3, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 14px;
}

.finance-limit-toolbar label {
    display: block;
    margin-bottom: 6px;
    color: var(--mg-muted);
    font-size: 12px;
    font-weight: 700;
}

.finance-limit-toolbar input,
.finance-limit-toolbar select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--mg-border);
    border-radius: 10px;
    background: var(--mg-card-inner);
    color: #ffffff;
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 13.5px;
    padding: 0 12px;
    outline: none;
    transition: border-color 0.2s;
}

.finance-limit-toolbar input:focus,
.finance-limit-toolbar select:focus {
    border-color: var(--mg-orange);
    box-shadow: 0 0 0 2px rgba(215, 25, 32, 0.2);
}

.finance-limit-toolbar select option {
    background: #161618;
    color: #ffffff;
}

.finance-limit-status {
    padding: 36px;
    color: var(--mg-muted);
    text-align: center;
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 14px;
}

.finance-condition-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px 16px;
    background: var(--mg-card-inner);
    border: 1px solid var(--mg-border);
    border-radius: 10px;
}

.finance-condition-legend > span {
    color: var(--mg-muted);
    font-size: 12px;
    font-weight: 600;
}

.condition-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}

.condition-legend-item.condition-new {
    background: rgba(215, 25, 32, 0.15);
    border-color: rgba(215, 25, 32, 0.35);
    color: #ffd166;
}

.condition-legend-item.condition-used {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.condition-legend-item.condition-import {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.35);
    color: #c4b5fd;
}

.condition-legend-item.over-legend {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.over-dot-inline {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.finance-matrix-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.matrix-series {
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 16px;
    overflow: hidden;
}

.matrix-series-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(90deg, #1c1c20, #161618);
    border-bottom: 1px solid var(--mg-border);
}

.matrix-series-header p {
    color: var(--mg-orange);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.matrix-series-header h3 {
    color: var(--mg-amber);
    font-size: 18px;
    font-weight: 800;
}

.matrix-series-header span {
    padding: 4px 10px;
    border: 1px solid rgba(215, 25, 32, 0.3);
    border-radius: 999px;
    color: var(--mg-amber);
    font-size: 12px;
    font-weight: 700;
}

.matrix-table-scroll {
    overflow-x: auto;
}

.finance-matrix-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.finance-matrix-table th,
.finance-matrix-table td {
    border-bottom: 1px solid var(--mg-border);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

.finance-matrix-table thead th {
    padding: 12px 14px;
    background: #161618;
    color: var(--mg-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    width: 155px;
}

.finance-matrix-table .matrix-sticky-left,
.finance-matrix-table .matrix-model-cell {
    position: sticky;
    left: 0;
    z-index: 5;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    text-align: left;
    background: #131315;
    border-right: 1px solid var(--mg-border);
    padding: 14px 18px;
}

.finance-matrix-table th.matrix-note-header,
.finance-matrix-table td.matrix-note-cell {
    width: 280px;
    min-width: 280px;
}

.finance-matrix-table tbody tr:hover .matrix-model-cell {
    background: #1a1a1e;
}

.model-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-title-wrap strong {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.over-dot-neon {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.matrix-model-cell span {
    display: block;
    color: var(--mg-muted);
    font-size: 11px;
    margin-top: 2px;
}

.matrix-model-cell small {
    display: block;
    color: #6b7280;
    font-size: 11px;
    margin-top: 2px;
}

.model-over-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 10px;
    font-weight: 700;
    margin-top: 6px;
}

.model-over-badge-clean {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #34d399;
    font-size: 11px;
    font-weight: 700;
    margin-top: 5px;
}

.condition-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    gap: 8px;
    border-bottom: 1px solid rgba(42, 42, 46, 0.6);
}

.condition-price:last-child {
    border-bottom: none;
}

.condition-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.condition-new .condition-badge {
    background: rgba(215, 25, 32, 0.15);
    border-color: rgba(215, 25, 32, 0.35);
    color: #ffd166;
}

.condition-used .condition-badge {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.condition-import .condition-badge {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.35);
    color: #c4b5fd;
}

/* ป้าย RAM ข้างสภาพเครื่อง (เฉพาะ Android ที่ชีทระบุ RAM มาด้วย) */
.ram-chip {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--mg-muted);
    font-size: 9.5px;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.2px;
}

body.light-mode .ram-chip {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

.condition-price-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-grow: 1;
}

.condition-price strong {
    color: var(--mg-amber);
    font-size: 16.5px;
    font-weight: 800;
    text-align: right;
    line-height: 1.1;
}

.price-over-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 9.5px;
    font-weight: 800;
    margin-top: 2px;
}

.empty-condition-price {
    opacity: 0.35;
}

.empty-condition-price .condition-badge {
    opacity: 0.4;
}

.empty-dash {
    color: #6b7280 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.empty-price {
    display: block;
    color: #3a3a40;
    font-size: 14px;
    font-weight: 700;
    padding: 12px;
}

.matrix-note-cell {
    min-width: 280px;
    text-align: left;
    padding: 10px 14px !important;
    font-size: 12px;
    color: var(--mg-muted);
}

.matrix-note-cell .over-note {
    color: #34d399;
    font-weight: 600;
}

.text-emerald {
    color: #10b981 !important;
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 6. Responsive Styles --- */
/* แถบเตือนเวลาดึงข้อมูลสดไม่ได้แล้วต้องใช้ข้อมูลสำรองจาก localStorage */
.offline-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(215, 25, 32, 0.10);
    border: 1px solid rgba(215, 25, 32, 0.35);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #ffd166;
    font-size: 13px;
    line-height: 1.5;
}

.offline-notice i {
    color: var(--mg-amber);
    margin-top: 2px;
}

.offline-notice strong {
    color: #ffffff;
}

/* เผื่อระยะให้ header ที่ลอยอยู่ ตอนเลื่อนมาที่ผลลัพธ์อัตโนมัติบนจอแคบ */
#results {
    scroll-margin-top: 78px;
}

/* --- iPad แนวนอน / จอเตี้ย: บีบระยะให้ผลลัพธ์จบในหน้าเดียว ไม่ต้องเลื่อนหายอดโอน --- */
/* ป้ายแท็บ: จอกว้างใช้ข้อความเต็ม จอแคบใช้ข้อความย่อ (มี 3 แท็บแล้วยาวเกิน) */
.main-tab .tab-short { display: none; }

@media (min-width: 993px) and (max-height: 860px) {
    .header {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .calculator-form {
        padding: 18px 20px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        margin-bottom: 6px;
    }

    .calculate-btn {
        padding: 13px;
    }

    .results-container {
        padding: 16px 18px;
    }

    .result-status-header {
        padding-bottom: 10px;
        margin-bottom: 12px;
    }

    .result-status-header .status-title {
        font-size: 15px;
    }

    .results-stat-grid {
        gap: 10px;
        margin-bottom: 12px;
    }

    .stat-box {
        padding: 10px 14px;
    }

    .stat-value {
        font-size: 21px;
    }

    /* 7 งวดลงได้ 2 แถวแทน 3 แถว ประหยัดความสูงไป 1 แถวเต็ม */
    .installment-section {
        margin-bottom: 12px;
    }

    .section-subhead {
        margin-bottom: 8px;
    }

    .installment-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .installment-card {
        padding: 9px 6px;
    }

    .installment-price {
        font-size: 16px;
    }

    .payout-details-receipt {
        padding: 12px 16px;
    }

    .receipt-header {
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    .receipt-rows {
        gap: 5px;
        margin-bottom: 10px;
    }

    .total-transfer-gradient {
        font-size: 27px;
    }
}

@media (max-width: 992px) {
    /* --- ตารางยอดจัด: จอแคบเปลี่ยนจากตารางเลื่อนแนวนอน เป็นการ์ดต่อรุ่น ---
       เดิมตารางกว้าง ~1,120px ยัดในจอ 340px ทำให้ราคาโดนตัดกลางคัน ต้องสไลด์ทีละการ์ด */
    .matrix-table-scroll {
        overflow-x: visible;
    }

    .finance-matrix-table,
    .finance-matrix-table tbody,
    .finance-matrix-table tr,
    .finance-matrix-table th,
    .finance-matrix-table td {
        display: block;
        width: auto;
    }

    .finance-matrix-table {
        table-layout: auto;
    }

    .finance-matrix-table thead {
        display: none;
    }

    .finance-matrix-table tbody tr {
        border-bottom: 6px solid var(--mg-black);
    }

    .finance-matrix-table tbody tr:last-child {
        border-bottom: none;
    }

    /* หัวการ์ด = ชื่อรุ่น (เลิก sticky เพราะไม่มีการเลื่อนแนวนอนแล้ว) */
    .finance-matrix-table .matrix-model-cell {
        position: static;
        width: auto;
        min-width: 0;
        max-width: none;
        border-right: none;
        background: #17171a;
    }

    .finance-matrix-table td {
        border-right: none;
        border-bottom: none;
        text-align: left;
        padding: 0 16px;
    }

    /* ป้ายความจุจาก data-label ที่มีอยู่แล้วในโค้ด */
    .finance-matrix-table td::before {
        content: attr(data-label);
        display: block;
        margin: 12px 0 2px;
        color: var(--mg-orange);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.5px;
    }

    .finance-matrix-table td.matrix-note-cell {
        width: auto;
        min-width: 0;
        padding-bottom: 12px;
    }

    /* ความจุที่ไม่มีราคาเลย และแถวเงื่อนไขที่ว่าง ไม่ต้องโชว์บนจอแคบ */
    .finance-matrix-table td.matrix-empty-cell,
    .finance-matrix-table .empty-condition-price {
        display: none;
    }

    /* ราคาได้พื้นที่เต็มความกว้าง อ่านครบไม่โดนตัด */
    .condition-price {
        padding: 8px 0;
    }

    .condition-price strong {
        font-size: 18px;
    }

    /* --- ขยายปุ่มให้นิ้วกดง่าย (Apple แนะนำอย่างน้อย 44px) --- */
    .main-tab {
        min-height: 44px;
    }

    .carousel-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    /* ปุ่มเลื่อนใหญ่ขึ้น ต้องเผื่อระยะข้างให้ข้อความไม่โดนทับ */
    .carousel-item {
        padding: 0 52px;
    }

    /* ขยายพื้นที่กดของจุดด้วย pseudo-element หน้าตาจุดยังเล็กเท่าเดิม */
    .carousel-dot {
        position: relative;
    }

    .carousel-dot::after {
        content: '';
        position: absolute;
        top: -16px;
        bottom: -16px;
        left: -9px;
        right: -9px;
    }

    .calculator-layout-grid {
        grid-template-columns: 1fr;
    }

    .calculator-left-col,
    .calculator-right-col {
        grid-column: span 1 / span 1;
        position: static;
    }

    .header {
        flex-wrap: wrap;
    }

    .header-center {
        order: 3;
        flex: 1 0 100%;
        margin-top: 8px;
    }

    .main-tabs {
        width: 100%;
        justify-content: center;
    }

    .main-tab {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    /* 3 แท็บบนจอแคบ ใช้ข้อความย่อ จะได้อยู่บรรทัดเดียว */
    .main-tab .tab-full { display: none; }
    .main-tab .tab-short { display: inline; }

    .main-tab {
        font-size: 12.5px;
        padding-left: 10px;
        padding-right: 10px;
        gap: 6px;
        white-space: nowrap;
    }

    .main-tabs {
        gap: 4px;
    }

    .installment-grid {
        grid-template-columns: 1fr 1fr;
    }

    .results-stat-grid {
        grid-template-columns: 1fr;
    }

    .brand-subhead {
        display: none;
    }

    /* จอมือถือเหลือแค่ไอคอนลูกโลก + สวิตช์ ประหยัดที่ header */
    .foreign-toggle-text {
        display: none;
    }

    .foreign-toggle {
        padding-left: 10px;
    }

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

/* --- 8. Light Mode System Overrides --- */
body.site-main.light-mode {
    --mg-black: #f8fafc;
    --mg-card: #ffffff;
    --mg-card-inner: #f1f5f9;
    --mg-card-soft: #e2e8f0;
    --mg-card-hover: #cbd5e1;
    --mg-border: #cbd5e1;
    --mg-border-light: rgba(0, 0, 0, 0.08);
    --mg-text: #0f172a;
    --mg-muted: #64748b;
    background-color: var(--mg-black);
    color: var(--mg-text);
}

body.light-mode ::-webkit-scrollbar-track {
    background: #f8fafc;
}
body.light-mode ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

body.light-mode .ambient-glow {
    background:
        radial-gradient(circle at 40% -10%, rgba(215, 25, 32, 0.08), transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(215, 25, 32, 0.05), transparent 30%);
}

body.light-mode .header {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .brand-logo-badge,
body.light-mode .brand-calc-label {
    color: #0f172a;
}

body.light-mode .brand-subhead {
    border-left-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .brand-calc-desc {
    color: #64748b;
}

body.light-mode .main-tabs {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

body.light-mode .main-tab {
    color: #64748b;
}

body.light-mode .main-tab.active {
    color: #ffffff;
}

body.light-mode .theme-switch-label {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

body.light-mode .foreign-toggle {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

body.light-mode .foreign-toggle-track {
    background: #cbd5e1;
}

body.light-mode .foreign-toggle[aria-pressed="true"] {
    background: #e0f2fe;
    border-color: #0ea5e9;
    color: #0c4a6e;
}

body.light-mode .foreign-notice {
    background: #e0f2fe;
    color: #075985;
}

body.light-mode .foreign-notice strong {
    color: #0c4a6e;
}

body.light-mode .user-avatar {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.light-mode .calculator-form,
body.light-mode .results-placeholder {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.light-mode .form-group label {
    color: #334155;
}

body.light-mode .input-group {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

body.light-mode .input-group input,
body.light-mode .input-group select {
    color: #0f172a !important;
}

body.light-mode .input-group select option {
    background: #ffffff;
    color: #0f172a;
}

body.light-mode .company-card {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

body.light-mode .company-card.selected {
    background: #ffffff;
    border-color: #d71920;
    color: #0f172a;
}

body.light-mode .result-status-header .status-title {
    color: #0f172a;
}

body.light-mode .stat-box {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.light-mode .stat-value {
    color: #0f172a;
}

body.light-mode .section-subhead span {
    color: #0f172a;
}

body.light-mode .installment-card {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.light-mode .installment-price {
    color: #0f172a;
}

body.light-mode .payout-details-receipt {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.light-mode .receipt-header {
    border-bottom-color: #cbd5e1;
    color: #64748b;
}

body.light-mode .receipt-rows .result-row span:last-child {
    color: #0f172a;
}

body.light-mode .receipt-total-card {
    background: #f1f5f9;
    border-color: rgba(215, 25, 32, 0.4);
}

body.light-mode .total-label-wrap .total-title {
    color: #0f172a;
}

body.light-mode .finance-limit-header h2 {
    color: #0f172a;
}

body.light-mode .finance-type-filter {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.light-mode .finance-type-chip {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
}

body.light-mode .finance-type-chip.active {
    color: #0a0a0c;
}

body.light-mode .finance-limit-toolbar {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.light-mode .finance-limit-toolbar input,
body.light-mode .finance-limit-toolbar select {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

body.light-mode .finance-limit-toolbar select option {
    background: #ffffff;
    color: #0f172a;
}

body.light-mode .finance-matrix-table {
    background: #ffffff;
}

body.light-mode .finance-matrix-table th,
body.light-mode .finance-matrix-table td {
    background: #ffffff;
    color: #0f172a;
    border-color: #e2e8f0;
}

body.light-mode .matrix-series-header {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

body.light-mode .matrix-series-header h3 {
    color: #0f172a;
}

body.light-mode .matrix-sticky-left {
    background: #ffffff !important;
    color: #0f172a !important;
}

body.light-mode .matrix-model-title,
/* .matrix-model-title ไม่มีใน HTML แล้ว ชื่อรุ่นจริงอยู่ใน .model-title-wrap strong */
body.light-mode .model-title-wrap strong {
    color: #0f172a;
}

body.light-mode .matrix-note-text {
    color: #475569;
}

/* --- 9. History Button & Price History Modal --- */
.history-btn {
    background: rgba(215, 25, 32, 0.12);
    border: 1px solid rgba(215, 25, 32, 0.3);
    color: var(--mg-orange);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.history-btn:hover {
    background: var(--mg-orange);
    color: #0a0a0c;
    box-shadow: 0 0 10px rgba(215, 25, 32, 0.5);
    transform: scale(1.1);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 20px;
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: var(--mg-card-inner);
    border-bottom: 1px solid var(--mg-border);
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-title-group i {
    font-size: 20px;
    color: var(--mg-orange);
}

.modal-title-group h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--mg-text);
}

.modal-title-group p {
    font-size: 12px;
    color: var(--mg-muted);
    margin-top: 2px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--mg-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #ffffff;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}

.history-item {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--mg-border);
}

.history-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--mg-orange);
    box-shadow: 0 0 8px var(--mg-orange);
}

.history-content {
    background: var(--mg-card-inner);
    border: 1px solid var(--mg-border);
    border-radius: 12px;
    padding: 12px 16px;
}

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

.history-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.history-storage {
    color: var(--mg-muted);
    font-size: 12px;
    font-weight: 600;
}

.history-price {
    color: var(--mg-amber);
    font-size: 16px;
    font-weight: 800;
}

.history-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-over-tag {
    color: #34d399;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-note {
    color: var(--mg-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-empty {
    text-align: center;
    padding: 30px;
    color: var(--mg-muted);
    font-size: 14px;
}

body.light-mode .history-btn {
    background: rgba(215, 25, 32, 0.1);
    border-color: rgba(215, 25, 32, 0.3);
    color: var(--mg-orange);
}
body.light-mode .modal-container {
    background: #ffffff;
    border-color: #cbd5e1;
}
body.light-mode .modal-header {
    background: #f1f5f9;
    border-bottom-color: #cbd5e1;
}
body.light-mode .modal-title-group h3 {
    color: #0f172a;
}
body.light-mode .history-content {
    background: #f8fafc;
    border-color: #cbd5e1;
}
body.light-mode .history-price {
    color: #0f172a;
}

body.light-mode .matrix-sticky-left {
    background: #ffffff !important;
    color: #0f172a !important;
}

body.light-mode .matrix-model-title,
/* .matrix-model-title ไม่มีใน HTML แล้ว ชื่อรุ่นจริงอยู่ใน .model-title-wrap strong */
body.light-mode .model-title-wrap strong {
    color: #0f172a;
}

body.light-mode .matrix-note-text {
    color: #475569;
}

/* --- History Timestamp & Production Reset State --- */
.history-time-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--mg-border);
}

.history-timestamp {
    color: var(--mg-muted);
    font-size: 11px;
    font-weight: 600;
}

.history-empty-reset {
    text-align: center;
    padding: 36px 20px;
    background: var(--mg-card-inner);
    border: 1px dashed var(--mg-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.history-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(215, 25, 32, 0.12);
    border: 1px solid rgba(215, 25, 32, 0.3);
    color: var(--mg-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.history-empty-reset h4 {
    font-size: 15px;
    font-weight: 800;
    color: var(--mg-text);
    margin-bottom: 6px;
}

.history-empty-reset p {
    font-size: 12.5px;
    color: var(--mg-muted);
    max-width: 420px;
    line-height: 1.5;
    margin-bottom: 16px;
}

body.light-mode .history-empty-reset {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.light-mode .history-empty-reset h4 {
    color: #0f172a;
}

/* --- 10. Quick Installment Preview Popover --- */
.quick-installment-popover {
    position: fixed;
    z-index: 1000;
    width: 360px;
    max-width: 92vw;
    background: linear-gradient(145deg, rgba(22, 22, 26, 0.98), rgba(15, 15, 18, 0.98));
    border: 1px solid rgba(215, 25, 32, 0.4);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(215, 25, 32, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 16px;
    animation: popoverFade 0.2s ease-out;
    pointer-events: auto;
}

@keyframes popoverFade {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.popover-device-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--mg-orange);
    display: block;
}

.popover-header h4 {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.popover-price-wrap {
    text-align: right;
}

.popover-price-label {
    font-size: 10px;
    color: var(--mg-muted);
    display: block;
}

.popover-price-wrap strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--mg-amber);
}

.popover-down-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.popover-down-selector span {
    font-size: 11px;
    font-weight: 700;
    color: var(--mg-muted);
}

.down-pills {
    display: flex;
    gap: 4px;
}

.down-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--mg-muted);
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.down-pill:hover {
    border-color: var(--mg-orange);
    color: #ffffff;
}

.down-pill.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #0a0a0c;
    font-weight: 800;
}

.popover-down-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    color: var(--mg-muted);
    margin-bottom: 8px;
}

.popover-down-summary strong {
    color: #ffffff;
}

.popover-terms-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.popover-term-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 8px;
    text-align: center;
}

.term-label {
    display: block;
    font-size: 10px;
    color: var(--mg-muted);
    font-weight: 600;
}

.term-monthly {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--mg-amber);
    margin-top: 2px;
}

.popover-calc-btn {
    width: 100%;
    padding: 8px 12px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    color: #0a0a0c;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(215, 25, 32, 0.3);
}

.popover-calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(215, 25, 32, 0.45);
}

body.light-mode .quick-installment-popover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

body.light-mode .popover-header h4 {
    color: #0f172a;
}

body.light-mode .popover-down-summary {
    background: #f1f5f9;
}

body.light-mode .popover-down-summary strong {
    color: #0f172a;
}

body.light-mode .popover-term-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .term-monthly {
    color: #0f172a;
}

/* --- ปุ่มคัดลอกสรุปผลคำนวณ (ไว้ส่ง LINE) --- */
.copy-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.copy-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--mg-border);
    background: var(--mg-card-inner);
    color: var(--mg-text);
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s, background .18s, color .18s;
}

.copy-btn i { color: var(--mg-orange); transition: color .18s; }

.copy-btn:hover {
    border-color: var(--mg-orange);
    background: var(--mg-card-soft);
}

.copy-btn.primary {
    border-color: rgba(215, 25, 32, 0.45);
}

.copy-btn.copied {
    border-color: var(--mg-green);
    color: var(--mg-green);
}

.copy-btn.copied i { color: var(--mg-green); }

.copy-btn:focus-visible {
    outline: 2px solid var(--mg-orange);
    outline-offset: 2px;
}

.copy-hint {
    margin: 8px 2px 0;
    color: var(--mg-muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 640px) {
    .copy-actions { flex-direction: column; }
}
/* ---------- ป้าย NEW ของรุ่นที่เพิ่งลงใหม่ ---------- */
.matrix-series.is-new-series {
    position: relative;
    border: 3px solid transparent;
    background:
        linear-gradient(var(--mg-card), var(--mg-card)) padding-box,
        linear-gradient(120deg, #d71920, #ff4d6d, #7c5cff, #00d4ff, #d71920) border-box;
    background-size: auto, 300% 300%;
    animation: newSeriesBorder 3.5s linear infinite, newSeriesLift 2.6s ease-in-out infinite;
    box-shadow: 0 0 0 1px rgba(215, 25, 32, 0.18), 0 16px 44px rgba(255, 77, 109, 0.28);
}

@keyframes newSeriesBorder {
    0%   { background-position: 0 0, 0% 50%; }
    100% { background-position: 0 0, 300% 50%; }
}

/* เรืองแสงเข้ม-อ่อนสลับกัน ให้สะดุดตาแม้เลื่อนผ่านเร็วๆ */
@keyframes newSeriesLift {
    0%, 100% { box-shadow: 0 0 0 1px rgba(215, 25, 32, 0.18), 0 16px 44px rgba(255, 77, 109, 0.28); }
    50%      { box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.10), 0 22px 60px rgba(255, 77, 109, 0.50); }
}

.matrix-series.is-new-series .matrix-series-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #3a2213, #241729 55%, #161618);
}

/* แสงกวาดผ่านหัวตารางเป็นจังหวะ */
.matrix-series.is-new-series .matrix-series-header::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: skewX(-18deg);
    animation: newSheen 2.6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes newSheen {
    0%, 45% { left: -60%; }
    100%    { left: 130%; }
}

/* ป้าย NEW ใหญ่ อ่านชัด อยู่เหนือแสงกวาด */
.new-flare.new-flare {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    padding: 6px 15px 6px 13px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    background: linear-gradient(135deg, #ff3d5f 0%, #ff7a00 50%, #e5242b 100%);
    color: #2b0800;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
    overflow: visible;
    box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.22), 0 8px 26px rgba(255, 61, 95, 0.6);
    animation: newFlarePulse 1.5s ease-in-out infinite;
}

.new-flare.new-flare i,
.new-flare.new-flare em {
    position: relative;
    z-index: 2;
    font-style: normal;
}

.new-flare.new-flare em {
    letter-spacing: 2px;
    /* ขอบขาวบางๆ รอบตัวอักษร ให้อ่านออกแม้แสงกวาดผ่าน */
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75), 0 0 6px rgba(255, 255, 255, 0.45);
}

.new-flare.new-flare i {
    font-size: 13px;
}

/* แสงวิ่งในตัวป้าย อยู่ใต้ตัวอักษร ไม่บังการอ่าน */
.new-flare.new-flare::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%);
    background-size: 280% 100%;
    animation: newFlareShine 2.2s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes newFlareShine {
    0%   { background-position: 180% 0; }
    100% { background-position: -80% 0; }
}

@keyframes newFlarePulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.22), 0 8px 26px rgba(255, 61, 95, 0.60); }
    50%      { transform: scale(1.09); box-shadow: 0 0 0 9px rgba(215, 25, 32, 0.06), 0 12px 34px rgba(255, 61, 95, 0.85); }
}

/* ประกายรอบป้าย 5 จุด */
.new-flare.new-flare .spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 0 10px #ffd166, 0 0 18px #d71920;
    opacity: 0;
    animation: newSpark 1.8s ease-in-out infinite;
}

.new-flare.new-flare .s1 { top: -7px;    left: 14px;   animation-delay: 0s; }
.new-flare.new-flare .s2 { bottom: -7px; right: 20px;  animation-delay: .35s; }
.new-flare.new-flare .s3 { top: 3px;     right: -8px;  animation-delay: .7s; }
.new-flare.new-flare .s4 { bottom: -6px; left: 8px;    animation-delay: 1.05s; }
.new-flare.new-flare .s5 { top: -6px;    right: 30px;  animation-delay: 1.4s; }

@keyframes newSpark {
    0%, 60%, 100% { opacity: 0; transform: scale(.3); }
    75%           { opacity: 1; transform: scale(1.6); }
}

/* ป้ายเล็กที่ชื่อรุ่น */
.new-chip.new-chip {
    position: relative;
    display: inline-block;
    padding: 3px 9px;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    border-radius: 7px;
    background: linear-gradient(135deg, #ff3d5f, #d71920);
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.2px;
    line-height: 1.35;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 61, 95, 0.18), 0 3px 14px rgba(255, 61, 95, 0.55);
    animation: newChipGlow 1.5s ease-in-out infinite;
}

@keyframes newChipGlow {
    0%, 100% { filter: brightness(1);    box-shadow: 0 0 0 3px rgba(255, 61, 95, 0.18), 0 3px 14px rgba(255, 61, 95, 0.55); }
    50%      { filter: brightness(1.35); box-shadow: 0 0 0 7px rgba(255, 61, 95, 0.05), 0 5px 20px rgba(255, 61, 95, 0.85); }
}

body.light-mode .matrix-series.is-new-series .matrix-series-header {
    background: linear-gradient(90deg, #ffe2c4, #ffd9e3 55%, #ffffff);
}

body.light-mode .matrix-series.is-new-series .matrix-series-header::after {
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
}

body.light-mode .new-flare {
    border-color: rgba(120, 30, 0, 0.35);
}

body.light-mode .new-flare em {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* เครื่องที่ตั้งค่าลดการเคลื่อนไหว ให้เห็นป้ายแต่ไม่ขยับ */
@media (prefers-reduced-motion: reduce) {
    .matrix-series.is-new-series,
    .matrix-series.is-new-series .matrix-series-header::after,
    .new-flare,
    .new-flare::before,
    .new-flare .spark,
    .new-chip {
        animation: none;
    }
    .new-flare::before { opacity: 0; }
    .new-flare .spark { opacity: .9; }
}

/* Misscall identity; keep the existing calculator layout and color theme. */
.finance-limit-header h2 { background: none; -webkit-text-fill-color: currentColor; }
body.light-mode .finance-limit-header { background: #ffffff; border-color: #cbd5e1; box-shadow: none; }
body.light-mode .finance-limit-header p,
body.light-mode .stat-badge-label { color: #475569; }
body.light-mode .stat-badge-val { color: #b50e16; }
body.light-mode .executive-badge { color: #b50e16; }
.brand-logo-badge .brand-pct { box-shadow: none; background: var(--mg-orange); color: #0a0a0c; }
.misscall-footer { padding: 20px 24px; color: var(--mg-muted); font-size: 12px; text-align: center; }
.misscall-footer a { color: var(--mg-amber); text-underline-offset: 3px; }
body.light-mode .misscall-footer { color: #4b5563; }
body.light-mode .misscall-footer a { color: #b50e16; }
@media (max-width: 600px) { .misscall-footer span { display: block; margin-top: 4px; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
