.tip-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tip-preset {
    min-width: 54px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.tip-preset:hover,
.tip-preset.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.tip-preset:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.tip-field-note {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.tip-input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    transition: var(--transition);
}

.tip-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.tip-currency-select {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    appearance: none;
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.tip-currency-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.tip-breakdown {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.tip-breakdown strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
}

.tip-example {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.tip-example h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 1.25rem;
}

.tip-example-intro {
    margin: 0 0 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tip-example-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tip-example-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.04);
}

.tip-example-card h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 0.9rem;
}

.tip-example-source {
    margin: 0;
    color: var(--text-secondary);
    font: 400 0.85rem/1.7 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.tip-status-error {
    color: #dc2626;
}

@media (max-width: 640px) {
    .tip-presets {
        gap: 6px;
    }

    .tip-preset {
        flex: 1 1 56px;
    }

    .tip-example {
        padding: 16px;
    }

    .tip-example-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-color-scheme: dark) {
    .tip-currency-select option {
        background-color: var(--bg);
        color: var(--text);
    }

    .tip-preset:hover,
    .tip-preset.active {
        color: #93c5fd;
    }

    .tip-status-error {
        color: #fca5a5;
    }
}
