.capital-calculator-modal-root {
    display: contents;
}

.capital-calculator-open-card {
    position: absolute;
    right: 126px;
    top: 320px;
    z-index: 12;
    width: 238px;
    min-height: 214px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 13px;
    padding: 18px;
    border: 1px solid rgba(255, 210, 31, 0.78);
    border-radius: 8px;
    background:
        radial-gradient(circle at 78% 8%, rgba(255, 224, 102, 0.22), transparent 42%),
        linear-gradient(180deg, rgba(8, 21, 40, 0.94), rgba(5, 13, 28, 0.9));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), 0 0 0 5px rgba(255, 210, 31, 0.1);
    color: #ffffff;
    text-align: left;
    text-decoration: none;
    pointer-events: auto;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.capital-calculator-open-card:hover {
    transform: translateY(-4px);
    border-color: #ffe066;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38), 0 0 0 5px rgba(255, 210, 31, 0.16);
}

.capital-calculator-open-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ffd21f;
    color: #07111f;
}

.capital-calculator-open-icon i,
.capital-calculator-open-icon svg {
    width: 23px;
    height: 23px;
}

.capital-calculator-open-eyebrow {
    color: #ffe066;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
}

.capital-calculator-open-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 950;
    line-height: 1.18;
    letter-spacing: 0;
    word-break: keep-all;
}

.capital-calculator-open-desc {
    color: rgba(238, 245, 255, 0.82);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.42;
}

.capital-calculator-open-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 39px;
    border-radius: 8px;
    background: #ffd21f;
    color: #07111f;
    font-size: 14px;
    font-weight: 950;
}

.capital-calculator-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: none;
    color: #e5edf8;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.capital-calculator-modal.is-open {
    display: block;
}

.capital-calculator-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(14px);
}

.capital-calculator-dialog {
    position: absolute;
    inset: 22px;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 8px;
    background:
        radial-gradient(circle at 82% 8%, rgba(14, 165, 233, 0.22), transparent 34%),
        linear-gradient(180deg, #0f172a 0%, #020617 100%);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.capital-calculator-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.82);
    background: rgba(15, 23, 42, 0.96);
}

.capital-calculator-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #f8fafc;
    font-weight: 950;
}

.capital-calculator-brand-mark {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
}

.capital-calculator-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.capital-calculator-top-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.capital-calculator-action {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid rgba(71, 85, 105, 0.9);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.capital-calculator-action:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.78);
    background: rgba(30, 41, 59, 0.94);
}

.capital-calculator-action:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.capital-calculator-action.is-primary {
    border-color: rgba(37, 99, 235, 0.7);
    background: #2563eb;
    color: #ffffff;
}

.capital-calculator-action.is-icon {
    width: 36px;
    padding: 0;
}

.capital-calculator-body {
    min-height: 0;
    overflow: auto;
    padding: 22px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.62) rgba(15, 23, 42, 0.72);
}

.capital-calculator-body::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

.capital-calculator-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.72);
    border-left: 1px solid rgba(51, 65, 85, 0.5);
}

.capital-calculator-body::-webkit-scrollbar-thumb {
    min-height: 44px;
    border: 3px solid rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.88), rgba(37, 99, 235, 0.82));
}

.capital-calculator-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7dd3fc, #3b82f6);
}

.capital-calculator-body::-webkit-scrollbar-corner {
    background: rgba(15, 23, 42, 0.72);
}

.capital-calculator-shell {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.85fr);
    gap: 22px;
}

.capital-calculator-panel,
.capital-calculator-result-card,
.capital-calculator-detail-card,
.capital-calculator-upload {
    border: 1px solid rgba(51, 65, 85, 0.82);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.capital-calculator-upload {
    margin-bottom: 18px;
    padding: 26px;
    border-style: dashed;
    text-align: center;
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.capital-calculator-upload.is-dragging {
    border-color: #38bdf8;
    background: rgba(8, 47, 73, 0.48);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.16);
}

.capital-calculator-upload-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 1px solid rgba(71, 85, 105, 0.75);
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.82);
    color: #60a5fa;
}

.capital-calculator-upload-title {
    color: #f1f5f9;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.45;
}

.capital-calculator-upload-desc {
    margin-top: 5px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.55;
}

.capital-calculator-file-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 18px;
    padding: 0 24px;
    border: 1px solid rgba(59, 130, 246, 0.75);
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.capital-calculator-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.capital-calculator-status {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    color: #e2e8f0;
    font-weight: 900;
}

.capital-calculator-status.is-visible {
    display: flex;
}

.capital-calculator-warning {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
}

.capital-calculator-panel {
    overflow: visible;
    margin-bottom: 18px;
}

.capital-calculator-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.82);
    background: rgba(15, 23, 42, 0.78);
    color: #f8fafc;
    font-size: 18px;
    font-weight: 900;
}

.capital-calculator-panel--blue .capital-calculator-panel-header svg {
    color: #38bdf8;
}

.capital-calculator-panel--amber .capital-calculator-panel-header svg {
    color: #fbbf24;
}

.capital-calculator-panel--green .capital-calculator-panel-header svg {
    color: #34d399;
}

.capital-calculator-panel--purple .capital-calculator-panel-header svg {
    color: #c084fc;
}

.capital-calculator-panel-body {
    padding: 18px;
}

.capital-calculator-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.capital-calculator-grid + .capital-calculator-grid {
    margin-top: 10px;
}

.capital-calculator-field {
    min-width: 0;
}

.capital-calculator-field.is-sub {
    margin-top: 10px;
    padding-left: 18px;
    border-left: 2px solid rgba(51, 65, 85, 0.95);
}

.capital-calculator-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.capital-calculator-label {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 850;
}

.capital-calculator-field.is-sub .capital-calculator-label {
    color: #94a3b8;
}

.capital-calculator-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border: 1px solid rgba(59, 130, 246, 0.45);
    border-radius: 6px;
    background: rgba(30, 64, 175, 0.34);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 950;
}

.capital-calculator-tooltip {
    position: relative;
    display: inline-flex;
    color: #64748b;
    cursor: help;
}

.capital-calculator-tooltip-text {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 3;
    display: none;
    width: min(270px, 70vw);
    padding: 11px;
    border: 1px solid rgba(51, 65, 85, 0.95);
    border-radius: 8px;
    background: #0f172a;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.55;
    white-space: normal;
}

.capital-calculator-tooltip:hover .capital-calculator-tooltip-text,
.capital-calculator-tooltip:focus-within .capital-calculator-tooltip-text {
    display: block;
}

.capital-calculator-input-wrap {
    position: relative;
}

.capital-calculator-won {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 900;
}

.capital-calculator-input {
    width: 100%;
    min-height: 43px;
    padding: 9px 13px 9px 32px;
    border: 1px solid rgba(51, 65, 85, 0.95);
    border-radius: 8px;
    outline: 0;
    background: #0b1121;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.22);
    color: #f8fafc;
    text-align: right;
    font-size: 15px;
    font-weight: 900;
}

.capital-calculator-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), inset 0 2px 8px rgba(0, 0, 0, 0.22);
}

.capital-calculator-hint {
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    text-align: right;
}

.capital-calculator-right {
    position: relative;
    min-width: 0;
}

.capital-calculator-sticky {
    position: sticky;
    top: 0;
    display: grid;
    gap: 18px;
}

.capital-calculator-result-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    background:
        radial-gradient(circle at 90% -10%, rgba(37, 99, 235, 0.18), transparent 36%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 13, 27, 0.96));
}

.capital-calculator-result-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9, #7c3aed);
}

.capital-calculator-result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 850;
}

.capital-calculator-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.capital-calculator-result-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-top: 13px;
}

.capital-calculator-result-label {
    color: #cbd5e1;
    font-weight: 800;
    white-space: nowrap;
}

.capital-calculator-result-value {
    min-width: 0;
    color: #f8fafc;
    font-size: 21px;
    font-weight: 900;
    text-align: right;
    overflow-wrap: anywhere;
}

.capital-calculator-result-value.is-negative {
    color: #f87171;
}

.capital-calculator-final {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    text-align: center;
}

.capital-calculator-final-label {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 850;
}

.capital-calculator-final-value {
    margin-top: 6px;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 950;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.capital-calculator-final-value.is-negative {
    color: #f87171;
}

.capital-calculator-detail-card {
    padding: 18px;
}

.capital-calculator-help-modal {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.capital-calculator-help-modal.is-open {
    display: flex;
}

.capital-calculator-help-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(8px);
}

.capital-calculator-help-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.42);
    border-radius: 8px;
    background: #0f172a;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
    color: #e5edf8;
}

.capital-calculator-help-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.82);
}

.capital-calculator-help-eyebrow {
    margin-bottom: 5px;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 900;
}

.capital-calculator-help-header h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 21px;
    line-height: 1.32;
    font-weight: 950;
    letter-spacing: 0;
}

.capital-calculator-help-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(71, 85, 105, 0.9);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
    cursor: pointer;
}

.capital-calculator-help-body {
    min-height: 0;
    overflow: auto;
    padding: 18px 22px;
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, 0.72) rgba(15, 23, 42, 0.92);
}

.capital-calculator-help-body::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

.capital-calculator-help-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.92);
    border-left: 1px solid rgba(51, 65, 85, 0.82);
}

.capital-calculator-help-body::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 3px solid rgba(15, 23, 42, 0.92);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(125, 211, 252, 0.92), rgba(37, 99, 235, 0.86));
}

.capital-calculator-help-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #bae6fd, #60a5fa);
}

.capital-calculator-help-body::-webkit-scrollbar-corner {
    background: rgba(15, 23, 42, 0.92);
}

.capital-calculator-help-lead {
    margin: 0 0 16px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.65;
    word-break: keep-all;
}

.capital-calculator-help-steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.capital-calculator-help-steps li {
    position: relative;
    min-width: 0;
    padding: 13px 14px 13px 42px;
    border: 1px solid rgba(51, 65, 85, 0.82);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.72);
}

.capital-calculator-help-steps li::before {
    content: counter(list-item);
    position: absolute;
    left: 13px;
    top: 14px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
}

.capital-calculator-help-steps strong {
    display: block;
    margin-bottom: 5px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 950;
}

.capital-calculator-help-steps span {
    display: block;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.58;
    word-break: keep-all;
}

.capital-calculator-help-notice {
    margin-top: 16px;
    padding: 12px 13px;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
    font-size: 13px;
    line-height: 1.58;
    word-break: keep-all;
}

.capital-calculator-help-footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 22px 18px;
    border-top: 1px solid rgba(51, 65, 85, 0.82);
}

.capital-calculator-help-confirm {
    min-width: 86px;
    min-height: 38px;
    border: 1px solid rgba(37, 99, 235, 0.72);
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
    cursor: pointer;
}

.capital-calculator-detail-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 950;
}

.capital-calculator-detail-row {
    display: none;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.58);
    color: #94a3b8;
    font-size: 14px;
}

.capital-calculator-detail-row.is-visible {
    display: flex;
}

.capital-calculator-detail-row:last-child {
    border-bottom: 0;
}

.capital-calculator-detail-amount {
    color: #e2e8f0;
    font-weight: 900;
    text-align: right;
    overflow-wrap: anywhere;
}

.capital-calculator-empty {
    padding: 18px 0;
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

.capital-calculator-loading {
    animation: capitalCalculatorSpin 1s linear infinite;
}

body.capital-calculator-lock {
    overflow: hidden;
}

.capital-calculator-modal[data-capital-theme="light"] {
    color: #1e293b;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-backdrop {
    background: rgba(226, 232, 240, 0.72);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-dialog {
    border-color: rgba(148, 163, 184, 0.75);
    background:
        radial-gradient(circle at 82% 8%, rgba(14, 165, 233, 0.14), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.22);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-topbar {
    border-bottom-color: rgba(203, 213, 225, 0.95);
    background: rgba(255, 255, 255, 0.94);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-brand {
    color: #0f172a;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-action {
    border-color: rgba(148, 163, 184, 0.82) !important;
    background: rgba(248, 250, 252, 0.96) !important;
    background-color: rgba(248, 250, 252, 0.96) !important;
    color: #1e293b;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-action:hover {
    border-color: rgba(37, 99, 235, 0.52) !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-action.is-primary {
    border-color: rgba(37, 99, 235, 0.68) !important;
    background: #2563eb !important;
    background-color: #2563eb !important;
    color: #ffffff;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-body {
    scrollbar-color: rgba(37, 99, 235, 0.58) rgba(226, 232, 240, 0.92);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-body::-webkit-scrollbar-track,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-body::-webkit-scrollbar-corner {
    background: rgba(226, 232, 240, 0.92);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-body::-webkit-scrollbar-track {
    border-left-color: rgba(203, 213, 225, 0.9);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-body::-webkit-scrollbar-thumb {
    border-color: rgba(226, 232, 240, 0.92);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.78), rgba(37, 99, 235, 0.78));
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-panel,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-result-card,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-detail-card,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-upload {
    border-color: rgba(203, 213, 225, 0.95);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-upload.is-dragging {
    border-color: #2563eb;
    background: rgba(219, 234, 254, 0.74);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.12);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-upload-icon {
    border-color: rgba(191, 219, 254, 0.95);
    background: #eff6ff;
    color: #2563eb;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-upload-title,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-panel-header,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-detail-title {
    color: #0f172a;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-upload-desc,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-field.is-sub .capital-calculator-label,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-hint,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-detail-row,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-empty {
    color: #64748b;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-status,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-label,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-detail-amount {
    color: #1e293b;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-badge {
    border-color: rgba(15, 23, 42, 0.28);
    background: #ffffff;
    color: #000000;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-panel-header {
    border-bottom-color: rgba(203, 213, 225, 0.95);
    background: rgba(248, 250, 252, 0.92);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-field.is-sub {
    border-left-color: rgba(203, 213, 225, 0.95);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-input {
    border-color: rgba(203, 213, 225, 0.95);
    background: #ffffff;
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14), inset 0 2px 8px rgba(15, 23, 42, 0.05);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-tooltip-text {
    border-color: rgba(203, 213, 225, 0.95);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    color: #1e293b;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-result-card {
    background:
        radial-gradient(circle at 90% -10%, rgba(14, 165, 233, 0.14), transparent 36%),
        linear-gradient(135deg, #ffffff, #f8fafc);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-result-top,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-final-label {
    color: #64748b;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-result-label,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-result-value,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-final-value {
    color: #0f172a;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-result-value.is-negative,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-final-value.is-negative {
    color: #dc2626;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-final,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-detail-row {
    border-color: rgba(203, 213, 225, 0.86);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-backdrop {
    background: rgba(226, 232, 240, 0.72);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-dialog {
    border-color: rgba(148, 163, 184, 0.75);
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
    color: #1e293b;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-header,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-footer {
    border-color: rgba(203, 213, 225, 0.95);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-eyebrow {
    color: #2563eb;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-header h2,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-steps strong {
    color: #0f172a;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-close {
    border-color: rgba(148, 163, 184, 0.82);
    background: #f8fafc;
    color: #1e293b;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-lead,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-steps span {
    color: #475569;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-body {
    scrollbar-color: rgba(37, 99, 235, 0.62) rgba(226, 232, 240, 0.96);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-body::-webkit-scrollbar-track,
.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-body::-webkit-scrollbar-corner {
    background: rgba(226, 232, 240, 0.96);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-body::-webkit-scrollbar-track {
    border-left-color: rgba(203, 213, 225, 0.95);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-body::-webkit-scrollbar-thumb {
    border-color: rgba(226, 232, 240, 0.96);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.78), rgba(37, 99, 235, 0.82));
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-steps li {
    border-color: rgba(203, 213, 225, 0.95);
    background: #f8fafc;
}

.capital-calculator-modal[data-capital-theme="light"] .capital-calculator-help-notice {
    border-color: rgba(245, 158, 11, 0.38);
    background: #fffbeb;
    color: #78350f;
}

@keyframes capitalCalculatorSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1100px) {
    .capital-calculator-open-card {
        position: relative;
        right: auto;
        top: auto;
        align-self: center;
        width: min(100%, 334px);
        max-width: calc(100vw - 32px);
        min-height: 0;
        margin: 0 auto 12px auto;
        padding: 14px;
    }

    .capital-calculator-open-card .capital-calculator-open-icon,
    .capital-calculator-open-card .capital-calculator-open-eyebrow,
    .capital-calculator-open-card .capital-calculator-open-desc {
        display: none;
    }

    .capital-calculator-open-title {
        font-size: 16px;
        text-align: center;
    }

    .capital-calculator-open-action {
        min-height: 42px;
    }

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

    .capital-calculator-sticky {
        position: static;
    }
}

@media (max-width: 760px) {
    .capital-calculator-dialog {
        inset: 0;
        border-radius: 0;
    }

    .capital-calculator-topbar {
        padding: 10px 12px;
    }

    .capital-calculator-brand-text {
        max-width: 210px;
    }

    .capital-calculator-action span:not([data-capital-help-icon]):not([data-capital-export-pdf-icon]):not([data-capital-theme-icon]) {
        display: none;
    }

    .capital-calculator-body {
        padding: 14px;
    }

    .capital-calculator-upload {
        padding: 20px 14px;
    }

    .capital-calculator-status {
        align-items: stretch;
        flex-direction: column;
    }

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

    .capital-calculator-panel-header {
        font-size: 16px;
    }

    .capital-calculator-result-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .capital-calculator-result-value {
        width: 100%;
    }

    .capital-calculator-help-modal {
        padding: 12px;
    }

    .capital-calculator-help-header,
    .capital-calculator-help-body,
    .capital-calculator-help-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .capital-calculator-help-header h2 {
        font-size: 18px;
    }
}
