.calculator-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
    padding: 10px;
}

.calculator-box {
    background: #fff;
    padding: 25px;
    border: 1px solid #e1e1e1;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* 모드 선택기 스타일 */
.mode-selector {
    display: flex;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 25px;
    gap: 5px;
}

.mode-option {
    flex: 1;
    cursor: pointer;
}

.mode-option input {
    display: none;
}

.mode-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 7px;
    font-size: 0.95em;
    font-weight: bold;
    color: #64748b;
    transition: all 0.2s;
}

.mode-option input:checked + .mode-label {
    background: #fff;
    color: #007bff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.group-title {
    font-size: 1.15em;
    font-weight: bold;
    color: #444;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.divider {
    border: 0;
    border-top: 1px dashed #eee;
    margin: 30px 0;
}

.calc-sentence {
    font-size: 1.15em;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.sentence-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
    line-height: 1.5;
}

.fee-row {
    margin-top: 5px;
    padding-top: 12px;
    border-top: 1px dashed #e1e1e1;
}

.tax-row {
    margin-top: 0;
    padding-top: 8px;
    padding-bottom: 12px;
}

.calc-sentence input[type="number"], .calc-sentence input[type="text"] {
    width: 180px;
    height: 48px;
    padding: 8px;
    font-size: 1.25em;
    text-align: right;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #007bff;
    font-weight: bold;
    font-family: monospace;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.fee-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.fee-input-wrapper:focus-within {
    border-color: #007bff;
}

#feeRate, #taxRate {
    width: 90px;
    height: 34px;
    font-size: 1em;
    border: none;
    border-radius: 0;
    padding: 0;
    text-align: center;
}

.adjust-btn-small {
    background: #f1f3f5;
    border: none;
    width: 30px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    color: #495057;
    transition: background 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.adjust-btn-small:hover {
    background: #e9ecef;
}

.adjust-btn-small:active {
    background: #dee2e6;
}

.calc-sentence input[type="number"]:focus {
    border-color: #007bff;
    outline: none;
}

/* Hide spin buttons */
.calc-sentence input::-webkit-outer-spin-button,
.calc-sentence input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.calc-sentence input[type=number] {
  -moz-appearance: textfield;
}

.highlight-result-row {
    margin-top: 10px;
    background: #eef6ff;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #cce5ff;
}

.calc-result {
    font-size: 1.3em;
    text-decoration: underline;
    text-underline-offset: 4px;
    word-break: break-all;
    font-weight: 800;
}

.result-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    padding: 4px;
    margin: 0 4px;
    border-radius: 4px;
    transition: background 0.2s;
    vertical-align: middle;
}
.result-copy-btn:hover { background: #d0e7ff; }
.result-copy-btn:active { transform: scale(0.9); }

.summary-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #777;
    margin-top: 10px;
    padding: 0 5px;
}
.summary-item .s-val { font-weight: normal; font-family: monospace; }

/* Knobs Layout */
.knob-row {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    flex-wrap: wrap;
}

.knob-row.inside-sentence {
    margin: 10px 0 15px 0;
    padding: 10px 0;
    border-top: 1px dashed #e1e1e1;
    border-bottom: 1px dashed #e1e1e1;
}

.slider-label {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
}

.slider-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.adjust-btn {
    background: #f1f3f5;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4em;
    color: #495057;
    transition: all 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    line-height: 1;
}

.adjust-btn:active {
    background: #e9ecef;
    transform: scale(0.92);
}

.knob-outer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.knob-container {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    border: 2px solid #e1e1e1;
    touch-action: none;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.knob {
    width: 76px;
    height: 76px;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border-radius: 50%;
    position: relative;
    cursor: grab;
    box-shadow: 4px 4px 10px #d1d1d1, -4px -4px 10px #ffffff;
    will-change: transform;
}

.knob:active {
    cursor: grabbing;
}

.knob-pointer {
    position: absolute;
    width: 6px;
    height: 20px;
    background: #007bff;
    border-radius: 3px;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0,123,255,0.4);
}

.knob-hint {
    font-size: 0.8em;
    color: #888;
    line-height: 1.5;
}

.reset-btn {
    background: #f1f3f5;
    color: #495057;
    border: 1px solid #e1e1e1;
    cursor: pointer;
    transition: background 0.2s;
}
.reset-btn:hover { background: #e9ecef; }

.share-section {
    display: flex;
    gap: 12px;
    margin-top: 35px;
}

.share-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.share-btn.primary {
    background: #007bff;
    color: white;
}
.share-btn.primary:hover { background: #0056b3; }

.info-section {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

/* Colors for profit/loss */
.color-up { color: #ff3b30 !important; }
.color-down { color: #007aff !important; }
.color-neutral { color: #555 !important; }