* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html {
    background: #0a0a0a;
    min-height: 100vh;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    color: white;
    padding: 0;
    margin: 0;
}

body::before {
    content: '';
    position: fixed;
    top: -200vh;
    left: 0;
    right: 0;
    height: 500vh;
    background: #0a0a0a;
    z-index: -1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.025em;
    margin: 0;
}

.source-badge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 140, 0, 0.15) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.date {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 400;
}

.update-time {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.price-table {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr 1.5fr;
    background: var(--bg-glass-hover);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-header div:nth-child(2),
.table-header div:nth-child(3),
.table-header div:nth-child(4) {
    text-align: center;
}

.metal-row {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr 1.5fr;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    align-items: center;
}

.metal-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.metal-row:last-child {
    border-bottom: none;
}

.metal-info {
    display: flex;
    flex-direction: column;
}

.metal-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #ffffff;
    letter-spacing: -0.025em;
}

.metal-detail {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 400;
}

.price-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #ffffff;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.change.positive {
    color: #ef4444;
}

.change.negative {
    color: var(--primary);
}

.change.neutral {
    color: #fbbf24;
}

.loading {
    color: #94a3b8;
    font-size: 1rem;
}

.last-updated {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.info-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 140, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.info-section h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.guide-content {
    display: grid;
    gap: 25px;
}

.guide-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-item h3 {
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.guide-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-item li {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.guide-item li::before {
    content: "▸";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.guide-item li strong {
    color: #fbbf24;
}

.guide-item p {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 10px 0;
    padding-left: 0;
}

@media (min-width: 768px) {
    .guide-content {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.note {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.note p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 5px;
}

.service-info {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.service-info h3 {
    color: #e2e8f0;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.service-details {
    display: grid;
    gap: 12px;
}

.service-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-item strong {
    color: var(--primary);
    min-width: 120px;
    margin-right: 12px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .service-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* Visitor Counter */
.visitor-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    padding: 20px;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.visitor-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.visitor-icon {
    font-size: 1.2rem;
}

.visitor-label {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

.visitor-count {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 60px;
    text-align: right;
}

.visitor-divider {
    color: rgba(255, 215, 0, 0.3);
    font-size: 1.2rem;
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    .visitor-counter {
        flex-direction: column;
        gap: 12px;
    }

    .visitor-divider {
        display: none;
    }

    .visitor-stat {
        width: 100%;
        justify-content: center;
    }

    .visitor-count {
        text-align: center;
    }
}

/* 예전 footer 스타일 제거됨 - base.njk의 common-footer 사용 */

/* 광고 컨테이너 */
.ad-container {
    margin: 20px 0;
    text-align: center;
}

.ad-banner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculator-section {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 24px;
    margin-top: 1rem;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    color: #ffffff;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.metal-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    text-align: left;
}

.weight-conversion {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    justify-content: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    max-width: 130px;
}

.conversion-symbol {
    font-size: 1rem;
    font-weight: 600;
    color: #94a3b8;
    padding-bottom: 10px;
}

.metal-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    width: 100%;
}

.metal-button {
    padding: 10px 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.metal-button:hover {
    border-color: var(--primary);
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.metal-button.active {
    border-color: var(--primary);
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.metal-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.weight-input,
.don-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: var(--bg-glass);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.weight-input:focus,
.don-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.weight-input::placeholder,
.don-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.result-section {
    margin-top: 18px;
    text-align: center;
    padding: 14px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 600;
}

.result-price {
    font-size: 3.2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    transform: scale(1);
}

.result-price.animate {
    transform: scale(1.05);
}

.result-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.conversion-display {
    margin: 6px 0;
    text-align: center;
    padding: 6px 16px;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    transition: all 0.3s ease;
}

.conversion-display.hidden {
    opacity: 0;
    transform: translateY(-10px);
}

.fee-notice {
    margin-top: 12px;
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.result-detail {
    margin-top: 15px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 400;
    text-align: center;
    line-height: 1.5;
}

.calculation-details {
    margin: 12px 0;
    padding: 12px;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.detail-info-text {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 4px 0;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.detail-value {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.action-buttons {
    margin-top: 20px;
    text-align: center;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.detail-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.share-button {
    margin-top: 20px;
    text-align: center;
}

.share-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.share-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.share-icon {
    width: 16px;
    height: 16px;
}

/* 지도 섹션 스타일 */
.map-section {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-header {
    text-align: center;
    margin-bottom: 25px;
}

.map-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.map-header p {
    color: #94a3b8;
    font-size: 1rem;
}

.map-container {
    position: relative;
}

.map-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.gold-map {
    flex: 1;
    height: 400px;
    background: rgba(17, 17, 17, 0.9);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

/* 이 지역 재검색 버튼 */
.map-research-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: linear-gradient(135deg, var(--primary) 0%, #f59e0b 100%);
    color: #0f172a;
    border: none;
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.map-research-btn.visible {
    display: flex;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.map-research-btn:hover {
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
}

.map-research-btn:active {
    box-shadow: 0 1px 4px rgba(255, 215, 0, 0.3);
}

.map-research-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.shop-list {
    flex: 0 0 300px;
    height: 400px;
    background: rgba(17, 17, 17, 0.8);
    border-radius: 15px;
    border: 2px solid var(--primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shop-list-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 15px;
}

.shop-list-header .ad-link {
    color: #64748b;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.shop-list-header .ad-link:hover {
    color: var(--primary);
}

.shop-items {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.empty-message {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 40px 20px;
    line-height: 1.6;
}

.shop-item {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.shop-item:last-child {
    border-bottom: none;
}

.shop-info {
    flex: 1;
    cursor: pointer;
}

.shop-actions {
    display: flex;
    align-items: center;
}

.shop-name {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-name .distance {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 500;
}

.shop-address {
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-phone {
    display: none;
}

.directions-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.directions-btn:hover {
    background: var(--primary-gradient);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.directions-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.directions-btn svg {
    width: 16px;
    height: 16px;
}

.map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 1.1rem;
    gap: 15px;
}

.location-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.location-btn:hover {
    background: var(--primary-gradient);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.map-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.search-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.search-btn.active {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: #fbbf24;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        align-items: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .source-badge {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .calculator-title {
        font-size: 1.3rem;
    }
    
    .calculator-form {
        gap: 20px;
    }
    
    .weight-conversion {
        gap: 10px;
    }
    
    .input-group {
        max-width: 120px;
    }
    
    .conversion-symbol {
        font-size: 1rem;
        padding-bottom: 10px;
    }
    
    .weight-input,
    .don-input {
        font-size: 1rem;
        padding: 12px 14px;
    }
    
    .input-label {
        font-size: 0.85rem;
    }
    
    .result-price {
        font-size: 2rem;
    }
    
    .price-table {
        font-size: 0.85rem;
    }
    
    .table-header {
        padding: 15px 10px;
        font-size: 0.75rem;
        grid-template-columns: 1.5fr 1.5fr 1.5fr 1.2fr;
    }

    .metal-row {
        padding: 20px 10px;
        grid-template-columns: 1.5fr 1.5fr 1.5fr 1.2fr;
    }
    
    .metal-name {
        font-size: 1.1rem;
    }
    
    .metal-detail {
        font-size: 0.8rem;
    }
    
    .price {
        font-size: 1rem;
    }
    
    .change {
        font-size: 0.8rem;
    }
    
    .map-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .map-header h2 {
        font-size: 1.5rem;
    }
    
    .map-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .gold-map {
        width: 100%;
        height: 300px;
        flex: none;
    }
    
    .shop-list {
        width: 100%;
        flex: none;
        height: 250px;
    }
    
    .shop-list-header {
        padding: 8px 12px;
    }

    .shop-item {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .directions-btn {
        min-width: 32px;
        height: 32px;
        padding: 6px 8px;
    }
    
    .directions-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .search-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .map-section {
        padding: 15px;
        margin: 15px 0;
        border-radius: 15px;
    }

    .map-header h2 {
        font-size: 1.3rem;
    }

    .map-header p {
        font-size: 0.85rem;
    }

    .gold-map {
        height: 250px;
        border-radius: 10px;
    }

    .shop-list {
        height: 200px;
    }

    .shop-list-header {
        padding: 6px 10px;
    }

    .shop-item {
        padding: 8px 10px;
    }

    .location-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* 광고 스타일 */
.ad-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 10px;
}

.ad-banner {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .ad-container {
        margin: 15px 0;
    }

    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .detail-btn, .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* App Download Banner */
.app-banner {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 2rem auto 2rem auto;
    max-width: 1200px;
    backdrop-filter: blur(10px);
}

.app-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.app-banner-text {
    font-size: 0.95rem;
    color: #e2e8f0;
}

.app-banner-text strong {
    color: #fbbf24;
    font-weight: 700;
}

.app-banner-buttons {
    display: flex;
    gap: 10px;
}

.app-banner-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    color: #fbbf24;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.app-banner-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.app-banner-btn svg {
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .app-banner-text {
        font-size: 0.85rem;
    }

    .app-banner-buttons {
        justify-content: center;
    }

    .app-banner-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #fbbf24;
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 10000;
    transition: bottom 0.3s ease-in-out;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.toast.show {
    bottom: 30px;
}

@media (max-width: 768px) {
    .toast {
        bottom: -100px;
        font-size: 0.9rem;
        padding: 14px 20px;
        max-width: calc(100% - 40px);
        white-space: normal;
        text-align: center;
    }

    .toast.show {
        bottom: 20px;
    }
}

/* Source Toggle Button */
.source-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.source-label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.source-toggle {
    display: flex;
    background: var(--bg-glass);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.source-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.source-btn:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

.source-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #1e293b;
    font-weight: 600;
}

/* Margin Info Banner */
.margin-info-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.margin-info-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.margin-info-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #60a5fa;
}

.margin-info-detail {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.margin-highlight {
    color: #fbbf24;
    font-weight: 600;
}

/* 국제시세 컬럼 스타일 */
.price-section:nth-child(4) {
    color: #60a5fa;
}

.price-section:nth-child(4) .price {
    color: #60a5fa;
    font-size: 0.95em;
}

@media (max-width: 768px) {
    .source-toggle-container {
        margin-top: 10px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .source-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .margin-info-banner {
        padding: 10px 12px;
    }

    .margin-info-content {
        gap: 4px;
    }

    .margin-info-title {
        font-size: 0.85rem;
    }

    .margin-info-detail {
        font-size: 0.7rem;
        line-height: 1.4;
    }
}

/* ==========================================
   UX Improvements - Phase 1, 2, 3
   ========================================== */

/* Phase 1: CTA Button - Calculator to Gold Dealer */
.dealer-cta-button {
    width: auto;
    margin: 0.75rem auto 0 auto;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #FCD34D 0%, #FBBF24 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.dealer-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35);
}

.cta-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1F2937;
}

.cta-arrow {
    font-size: 0.9rem;
    color: #1F2937;
    transition: transform 0.3s ease;
}

.dealer-cta-button:hover .cta-arrow {
    transform: translateX(3px);
}

/* Phase 2: News Widget */
.news-widget-section {
    max-width: 1200px;
    margin: 4rem auto 2rem;
    padding: 0 20px;
}

.news-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.news-widget-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e2e8f0;
}

.news-widget-more {
    font-size: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.news-widget-more:hover {
    transform: translateX(4px);
}

.news-widget-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
    color: #94a3b8;
}

.news-widget-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.news-widget-item {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.news-widget-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(251, 191, 36, 0.3);
    border-color: var(--primary);
}

.news-widget-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-widget-item-description {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-widget-item-date {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .news-widget-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .news-widget-section {
        margin: 2rem auto 1.5rem;
        padding: 0 15px;
    }

    .news-widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .news-widget-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-widget-title {
        font-size: 1.3rem;
    }

    .news-widget-more {
        font-size: 0.9rem;
    }

    .news-widget-item {
        padding: 1.2rem;
    }

    .news-widget-item-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .news-widget-section {
        margin: 1.5rem auto 1rem;
        padding: 0 12px;
    }

    .news-widget-header {
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }

    .news-widget-title {
        font-size: 1.15rem;
    }

    .news-widget-item {
        padding: 1rem;
        border-radius: 12px;
    }

    .news-widget-item-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .news-widget-item-description {
        font-size: 0.85rem;
    }
}

/* Phase 3: Affiliate Banners */
.affiliate-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 2px solid #FCD34D;
    border-radius: 12px;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.affiliate-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(252, 211, 77, 0.3);
}

.affiliate-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.affiliate-content {
    flex: 1;
}

.affiliate-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.25rem;
}

.affiliate-description {
    font-size: 0.9rem;
    color: #4B5563;
}

.affiliate-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    color: #1F2937;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.affiliate-button:hover {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .affiliate-banner {
        flex-direction: column;
        text-align: center;
    }

    .affiliate-button {
        width: 100%;
    }
}

/* ==========================================
   Popular Guides Widget (홈 → 블로그 흐름 유도)
   ========================================== */
.popular-guides {
    max-width: 1200px;
    margin: 2rem auto 1.5rem;
    padding: 0 20px;
}

.popular-guides-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.popular-guides-header h2 {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    margin: 0;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.popular-guides-more {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}
.popular-guides-more:hover { color: #FFD700; }

.popular-guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.popular-guide-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #141414 0%, #0a0a0a 100%);
    border: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: 16px;
    padding: 1.25rem;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.popular-guide-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 0.45);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.15);
}

.popular-guide-badge {
    align-self: flex-start;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    letter-spacing: -0.2px;
}

.popular-guide-card h3 {
    font-size: 1.05rem;
    color: #e4e4e7;
    margin: 0 0 0.55rem;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: -0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-guide-card p {
    font-size: 0.85rem;
    color: #a1a1aa;
    margin: 0;
    line-height: 1.55;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .popular-guides-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .popular-guide-card { padding: 1rem; }
}

/* ==========================================
   Calculator Typography Refresh (폰트 크기만 키움)
   - 기존 색상/레이아웃/보더 유지, 글자 크기만 키워 시원시원하게.
   - letter-spacing 음수값 사용 금지: gradient + clip 조합에서 마지막
     "원" 글자가 풀스크린에서 잘리는 현상 방지.
   ========================================== */
.calculator-section .calculator-title {
    font-size: clamp(1.5rem, 2.6vw, 2.2rem) !important;
}
.calculator-section .input-label {
    font-size: clamp(1rem, 1.4vw, 1.4rem) !important;
}
.calculator-section .weight-input,
.calculator-section .don-input {
    font-size: clamp(1.2rem, 1.8vw, 1.8rem) !important;
    padding: 14px 16px;
}
.calculator-section .conversion-symbol {
    font-size: clamp(1.1rem, 1.6vw, 1.6rem);
}
.calculator-section .result-label {
    font-size: clamp(1rem, 1.3vw, 1.3rem);
}
.calculator-section .result-price {
    font-size: clamp(2.4rem, 9vw, 5rem);
    line-height: 1.1;
    padding: 0;
    white-space: nowrap;
    word-break: keep-all;
    max-width: 100%;
}
.calculator-section .fee-notice {
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
}
.calculator-section .metal-button {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    padding: 14px 16px;
}
.calculator-section .detail-btn,
.calculator-section .share-btn {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    padding: 12px 24px;
}

/* 공유하기: 메탈 active 버튼과 동일한 골드 그라데이션 + 다크 텍스트 */
.calculator-section .share-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
    font-weight: 700;
}
.calculator-section .share-btn,
.calculator-section .share-btn .share-icon {
    color: #1a1a1a !important;
    fill: #1a1a1a !important;
}
.calculator-section .share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.42) !important;
}

/* 주변 금거래소 버튼: 골드 outlined (보조 액션) */
.calculator-section .dealer-cta-button {
    width: auto;
    margin: 12px auto 0;
    padding: 12px 28px;
    background: rgba(255, 215, 0, 0.04) !important;
    border: 2px solid rgba(255, 215, 0, 0.6) !important;
    border-radius: 12px;
    box-shadow: none !important;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}
.calculator-section .dealer-cta-button:hover {
    background: rgba(255, 215, 0, 0.1) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2) !important;
    transform: none;
}
.calculator-section .dealer-cta-button .cta-text {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    font-weight: 600;
    color: #FFD700;
}
.calculator-section .dealer-cta-button .cta-arrow {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: #FFD700;
    font-weight: 600;
}
.calculator-section .dealer-cta-button:hover .cta-arrow {
    transform: translateX(3px);
}

/* 모바일: result-section 좌우 패딩 좁혀 가격 한 줄 보장 */
@media (max-width: 480px) {
    .calculator-section .result-section {
        padding: 20px 12px 22px;
    }
    .calculator-section .result-price {
        font-size: clamp(2rem, 11vw, 3.5rem);
    }
}

/* === Segmented Control 공통 (모바일 + 데스크탑) ===
   - 데스크탑(≥769px): 5개 한 줄 + 골드 indicator 슬라이드
   - 481~768px: 5개 한 줄, indicator 숨김
   - ≤480px: 3+2 wrap, indicator 숨김 */

/* 기본 (모든 폭 공통): metal-buttons는 항상 relative,
   indicator는 항상 absolute. 미디어쿼리 전환 시 indicator의
   inline width가 flex 슬롯으로 작동해 빈 공간 생기는 버그 방지. */
.calculator-section .metal-buttons {
    position: relative;
}
.calculator-section .metal-buttons .metal-indicator {
    position: absolute;
    top: 6px;
    bottom: 6px;
    /* CSS-only 초기 위치: 첫 버튼(순금 24K) 커버.
       grid 5등분 + container padding 6px*2 기준이라 calc 정확.
       JS가 active 버튼의 offsetLeft/Width로 정밀 보정. */
    left: 6px;
    width: calc(20% - 2.4px);
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.35);
    transition: left 340ms cubic-bezier(0.32, 0.72, 0, 1),
                width 340ms cubic-bezier(0.32, 0.72, 0, 1),
                opacity 200ms ease;
    z-index: 0;
    pointer-events: none;
    will-change: left, width;
}
@media (max-width: 480px) {
    .calculator-section .metal-buttons .metal-indicator {
        display: none;
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .calculator-section .metal-buttons {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 0;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 18px;
        padding: 6px;
        backdrop-filter: blur(8px);
    }
    .calculator-section .metal-buttons .metal-button {
        min-width: 0;
        background: transparent !important;
        border: 1px solid transparent !important;
        backdrop-filter: none !important;
        color: #94a3b8 !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 12px;
        padding: 10px 6px !important;
        font-size: clamp(0.85rem, 1.8vw, 1.05rem) !important;
        white-space: nowrap;
        position: relative;
        z-index: 1;
        transition: color 200ms ease;
    }
    .calculator-section .metal-buttons .metal-button.active {
        background: transparent !important;
        color: #1a1a1a !important;
        font-weight: 700 !important;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

@media (max-width: 480px) {
    .calculator-section .metal-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 16px;
        padding: 6px;
    }
    .calculator-section .metal-buttons .metal-button {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 0;
        background: transparent !important;
        border: 1px solid transparent !important;
        backdrop-filter: none !important;
        color: #94a3b8 !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 12px;
        padding: 11px 6px !important;
        font-size: clamp(0.82rem, 3.2vw, 1rem) !important;
        white-space: nowrap;
        transition: background 200ms ease, color 200ms ease;
    }
    .calculator-section .metal-buttons .metal-button.active {
        background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
        color: #1a1a1a !important;
        font-weight: 700 !important;
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
    }
}

@media (min-width: 769px) {
    .calculator-section .metal-buttons {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 0;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 18px;
        padding: 6px;
        backdrop-filter: blur(8px);
    }
    .calculator-section .metal-buttons .metal-button {
        position: relative;
        z-index: 1;
        min-width: 0;
        background: transparent !important;
        border: none !important;
        backdrop-filter: none !important;
        color: #94a3b8;
        transform: none !important;
        box-shadow: none !important;
        transition: color 200ms ease;
        border-radius: 12px;
    }
    .calculator-section .metal-buttons .metal-button:hover {
        background: transparent !important;
        color: #e4e4e7;
        transform: none !important;
    }
    .calculator-section .metal-buttons .metal-button.active {
        background: transparent !important;
        color: #1a1a1a;
        font-weight: 700;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    .calculator-section .metal-buttons .metal-button:focus {
        box-shadow: none !important;
    }
}
