/* ═══════════════════════════════════════════════════════════
   年収手取り計算ツール — styles
   prefix: tc-
═══════════════════════════════════════════════════════════ */

.tc-container {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px 40px;
    color: #1f2937;
}

/* ── Feature Banner ── */
.tc-feature-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1.5px solid #6ee7b7;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
}

.tc-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tc-feature-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}

.tc-feature-item strong {
    font-size: 12px;
    font-weight: 700;
    color: #065f46;
    display: block;
    margin-bottom: 2px;
}

.tc-feature-item p {
    font-size: 11px;
    color: #047857;
    margin: 0;
    line-height: 1.35;
}

@media (max-width: 600px) {
    .tc-feature-banner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Step Cards ── */
.tc-step-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.tc-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: 0.4px;
}

.tc-step-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 18px;
}

/* ── Slider Section ── */
.tc-slider-value-wrap {
    text-align: center;
    margin-bottom: 12px;
}

.tc-slider-yen-label {
    font-size: 15px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 4px;
}

.tc-slider-amount {
    font-size: 42px;
    font-weight: 800;
    color: #065f46;
    letter-spacing: -1px;
    line-height: 1;
}

.tc-slider-amount span {
    font-size: 22px;
    font-weight: 700;
    color: #059669;
    margin-left: 4px;
}

.tc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #6ee7b7, #10b981, #059669);
    outline: none;
    margin-bottom: 10px;
    cursor: pointer;
}

.tc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.5);
    border: 3px solid #fff;
    transition: transform 0.1s;
}

.tc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.tc-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.5);
    border: 3px solid #fff;
}

.tc-slider-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.tc-direct-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.tc-direct-input-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
}

.tc-direct-input {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    font-family: inherit;
    background: transparent;
    border: none;
    outline: none;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ── Option Selects ── */
.tc-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 480px) {
    .tc-options-grid {
        grid-template-columns: 1fr;
    }
}

.tc-option-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tc-option-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
}

.tc-option-select {
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%236b7280'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
    transition: border-color 0.15s;
}

.tc-option-select:focus {
    outline: none;
    border-color: #10b981;
}

/* ── Result Card ── */
.tc-result-main {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 2px solid #6ee7b7;
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.tc-result-main::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 50%;
}

.tc-result-label {
    font-size: 12px;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.tc-take-home-amount {
    font-size: 44px;
    font-weight: 900;
    color: #065f46;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.tc-take-home-sub {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.tc-take-home-sub span {
    font-size: 13px;
    font-weight: 600;
    color: #047857;
    background: rgba(255, 255, 255, 0.6);
    padding: 4px 10px;
    border-radius: 20px;
}

/* ── Pie Chart ── */
.tc-chart-section {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tc-chart-wrap {
    flex-shrink: 0;
}

.tc-chart-canvas {
    width: 180px;
    height: 180px;
    display: block;
}

.tc-chart-legend {
    flex: 1;
    min-width: 180px;
}

.tc-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.tc-legend-item:last-child {
    border-bottom: none;
}

.tc-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.tc-legend-name {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.tc-legend-amount {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.tc-legend-pct {
    font-size: 11px;
    color: #9ca3af;
    min-width: 38px;
    text-align: right;
}

/* ── Breakdown Table ── */
.tc-breakdown {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.tc-breakdown-title {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 12px;
}

.tc-breakdown-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.tc-breakdown-row:last-child {
    border-bottom: none;
}

.tc-breakdown-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tc-breakdown-name {
    flex: 1;
    font-size: 13px;
    color: #4b5563;
    font-weight: 600;
}

.tc-breakdown-amount {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.tc-breakdown-pct {
    font-size: 11px;
    color: #9ca3af;
    min-width: 46px;
    text-align: right;
}

/* ── Disclaimer ── */
.tc-disclaimer {
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ── Share Button ── */
.tc-btn-share {
    display: block;
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #10b981;
    border: 2px solid #6ee7b7;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: all 0.15s;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.tc-btn-share:hover {
    background: #ecfdf5;
    border-color: #10b981;
}

/* ── Share Preview (same pattern as sleep-cycle) ── */
.tc-share-preview {
    margin-bottom: 16px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.tc-share-hint {
    font-size: 13px;
    font-weight: 700;
    color: #4b5563;
    margin: 0 0 12px;
    line-height: 1.4;
}

.tc-share-img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto 16px;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

.tc-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.tc-btn-copy-img,
.tc-btn-download {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    flex: 1;
    min-width: 140px;
}

.tc-btn-copy-img {
    background: #ecfdf5;
    color: #059669;
    border: 1.5px solid #6ee7b7;
}

.tc-btn-download {
    background: #10b981;
    color: white;
    border: none;
}

.tc-btn-copy-img:hover {
    background: #d1fae5;
}

.tc-btn-download:hover {
    background: #059669;
}

/* ── Compare Table ── */
.tc-compare-section {
    margin-top: 8px;
}

.tc-compare-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tc-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1.5px solid #d1fae5;
}

.tc-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 480px;
}

.tc-compare-table thead th {
    background: #ecfdf5;
    padding: 10px 12px;
    font-weight: 700;
    color: #065f46;
    border-bottom: 2px solid #6ee7b7;
    white-space: nowrap;
    text-align: right;
}

.tc-compare-table thead th:first-child {
    text-align: left;
}

.tc-compare-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #374151;
}

.tc-compare-table tbody td:first-child {
    text-align: left;
    font-weight: 700;
    color: #1f2937;
}

.tc-compare-table tbody tr:last-child td {
    border-bottom: none;
}

.tc-compare-table tbody tr.tc-table-highlight td {
    background: #d1fae5;
    font-weight: 700;
    color: #065f46;
}

/* ── Toast ── */
.tc-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1f2937;
    color: #d1fae5;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease, opacity 0.25s;
    opacity: 0;
    z-index: 9999;
    white-space: nowrap;
}

.tc-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .tc-take-home-amount {
        font-size: 34px;
    }

    .tc-chart-section {
        flex-direction: column;
        align-items: center;
    }

    .tc-chart-legend {
        width: 100%;
    }
}