/* PizzaLogic: Artisan Dough Calculator - Styles */

/* Color scheme variables */
:root {
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary-color: #667eea;
    --primary-hover: #764ba2;
    --card-bg: white;
    --card-text: #333;
    --card-heading: #667eea;
    --label-color: #555;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --input-bg: white;
    --step-title: #333;
    --step-text: #555;
    --tip-bg: #f8f9fa;
    --header-text: white;
}

/* Dark theme */
[data-theme="dark"] {
    --primary-start: #1a1a2e;
    --primary-end: #16213e;
    --primary-color: #e94560;
    --primary-hover: #ff6b6b;
    --card-bg: #1f1f1f;
    --card-text: #e0e0e0;
    --card-heading: #e94560;
    --label-color: #aaa;
    --border-color: #444;
    --border-light: #333;
    --input-bg: #2a2a2a;
    --step-title: #e0e0e0;
    --step-text: #bbb;
    --tip-bg: #2a2a2a;
    --header-text: #e0e0e0;
}

/* Light theme */
[data-theme="light"] {
    --primary-start: #f5f7fa;
    --primary-end: #e4e8eb;
    --primary-color: #5a67d8;
    --primary-hover: #4c51bf;
    --card-bg: white;
    --card-text: #333;
    --card-heading: #5a67d8;
    --label-color: #555;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --input-bg: white;
    --step-title: #333;
    --step-text: #555;
    --tip-bg: #f8f9fa;
    --header-text: #333;
}

/* Cool theme */
[data-theme="cool"] {
    --primary-start: #2193b0;
    --primary-end: #6dd5ed;
    --primary-color: #2193b0;
    --primary-hover: #1a7a94;
    --card-bg: white;
    --card-text: #333;
    --card-heading: #2193b0;
    --label-color: #555;
    --border-color: #d0e8f0;
    --border-light: #e8f4f8;
    --input-bg: white;
    --step-title: #333;
    --step-text: #555;
    --tip-bg: #e8f7fa;
    --header-text: white;
}

/* Warm theme */
[data-theme="warm"] {
    --primary-start: #ee9ca7;
    --primary-end: #ffdde1;
    --primary-color: #d35d6e;
    --primary-hover: #c44d5e;
    --card-bg: #fffaf8;
    --card-text: #4a3f3f;
    --card-heading: #d35d6e;
    --label-color: #6b5858;
    --border-color: #f0d8d8;
    --border-light: #fae8e8;
    --input-bg: white;
    --step-title: #4a3f3f;
    --step-text: #6b5858;
    --tip-bg: #fff5f5;
    --header-text: #4a3f3f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    min-height: 100vh;
    padding: 12px;
    color: var(--card-text);
    font-size: 14px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: var(--header-text);
    margin-bottom: 12px;
    font-size: 1.6em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    margin-bottom: 12px;
}

.card h2 {
    color: var(--card-heading);
    margin-bottom: 12px;
    font-size: 1.15em;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--label-color);
    font-size: 0.85em;
}

input[type="number"],
select {
    padding: 8px;
    border: 2px solid var(--border-color);
    font-size: 0.95em;
    transition: border-color 0.3s;
    background-color: var(--input-bg);
    color: var(--card-text);
}

select {
    border-radius: 8px;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

select {
    cursor: pointer;
    background-color: var(--input-bg);
}

.results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.result-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
}

.result-label {
    font-size: 0.8em;
    opacity: 0.9;
    margin-bottom: 2px;
}

.result-value {
    font-size: 1.4em;
    font-weight: bold;
}

.result-unit {
    font-size: 0.7em;
    opacity: 0.8;
}

.result-tsp {
    font-size: 0.7em;
    opacity: 0.85;
    margin-top: 2px;
}

.info-text {
    background: var(--tip-bg);
    padding: 10px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 0.85em;
    color: var(--step-text);
    border-left: 3px solid var(--primary-color);
    line-height: 1.5;
}

.starter-note {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.85em;
    color: #856404;
}

/* Instructions styling */
.instructions-container {
    margin-top: 12px;
}

.instruction-phase {
    margin-bottom: 16px;
}

.instruction-phase:last-child {
    margin-bottom: 0;
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1em;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border-light);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.phase-icon {
    font-size: 1.1em;
}

.instruction-step {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--step-text);
}

.instruction-step:last-child {
    border-bottom: none;
}

.instruction-step.step-warning {
    background: #fff5f5;
    border: 2px solid #feb2b2;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    color: #c53030;
}

[data-theme="dark"] .instruction-step.step-warning {
    background: #3c1e1e;
    border-color: #9b2c2c;
    color: #feb2b2;
}

.instruction-step.step-warning .step-title {
    color: inherit;
    font-size: 1.1em;
}

.instruction-step.step-warning .step-tip {
    background: rgba(255,255,255,0.5);
    border-left-color: #c53030;
    color: #742a2a;
}

[data-theme="dark"] .instruction-step.step-warning .step-tip {
    background: rgba(0,0,0,0.3);
    border-left-color: #feb2b2;
    color: #feb2b2;
}

.instruction-step.step-important .step-title {
    color: var(--primary-color);
    font-size: 1.05em;
}

.step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 700;
    margin-top: 2px;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    color: var(--step-title);
}

.step-tip {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--tip-bg);
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--step-text);
    border-left: 3px solid var(--primary-color);
    font-style: italic;
}

.step-tip .video-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-style: normal;
    margin-left: 8px;
    transition: opacity 0.2s;
}

.step-tip .video-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Timeline Visualizer */
.timeline-container {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
    user-select: none;
}

.timeline-header:hover {
    opacity: 0.8;
}

.timeline-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-toggle-icon {
    font-size: 0.8em;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.timeline-toggle-icon.open {
    transform: rotate(0deg);
}

.timeline-toggle-icon:not(.open) {
    transform: rotate(-90deg);
}

.timeline-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--card-heading);
}

.timeline-total {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--tip-bg);
    padding: 4px 12px;
    border-radius: 20px;
}

.timeline-track {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.timeline-track.open {
    max-height: 1000px;
    opacity: 1;
}

.timeline-event {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.timeline-marker {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.timeline-icon {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.timeline-content {
    flex: 1;
    margin-left: 16px;
    padding-top: 8px;
}

.timeline-label {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--card-heading);
    margin-bottom: 2px;
}

.timeline-time {
    font-size: 0.85em;
    color: var(--card-text);
    opacity: 0.8;
}

.timeline-line {
    position: absolute;
    left: 19px;
    top: 40px;
    bottom: -8px;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--border-color) 100%);
    border-radius: 2px;
    z-index: 1;
}

/* Desktop: Horizontal timeline */
@media (min-width: 768px) {
    .timeline-track {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0;
    }

    .timeline-track.open {
        max-height: 200px;
    }

    .timeline-event {
        flex-direction: column;
        align-items: center;
        flex: 1;
        text-align: center;
    }

    .timeline-marker {
        width: 48px;
        height: 48px;
        font-size: 1.4em;
    }

    .timeline-content {
        margin-left: 0;
        margin-top: 12px;
        padding-top: 0;
    }

    .timeline-label {
        font-size: 0.9em;
    }

    .timeline-time {
        font-size: 0.8em;
    }

    .timeline-line {
        left: auto;
        right: -50%;
        top: 23px;
        bottom: auto;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, var(--primary-color) 0%, var(--border-color) 100%);
    }
}

/* Mobile responsive timeline */
@media (max-width: 600px) {
    .timeline-container {
        padding: 16px;
        margin: 16px 0;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .timeline-total {
        align-self: flex-start;
    }

    .timeline-marker {
        width: 36px;
        height: 36px;
        font-size: 1.1em;
    }

    .timeline-content {
        margin-left: 12px;
        padding-top: 6px;
    }

    .timeline-label {
        font-size: 0.9em;
    }

    .timeline-time {
        font-size: 0.8em;
    }

    .timeline-line {
        left: 17px;
        top: 36px;
    }
}

/* Custom stepper control styles */
.stepper {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.stepper-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.stepper-btn[data-action="dec"] {
    border-radius: 6px 0 0 6px;
}

.stepper-btn[data-action="inc"] {
    border-radius: 0 6px 6px 0;
}

.stepper-btn:hover {
    opacity: 0.9;
}

.stepper-btn:active {
    opacity: 0.8;
}

.stepper-value {
    flex: 1;
    text-align: center;
    font-size: 0.95em;
    font-weight: 600;
    padding: 0 6px;
    background: var(--input-bg);
    color: var(--card-text);
    border: none;
    min-width: 50px;
    height: 36px;
}

.stepper-value:focus {
    outline: none;
    background: #f8f8f8;
}

/* Hide native number input spinners */
.stepper-value::-webkit-outer-spin-button,
.stepper-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.stepper-value[type=number] {
    -moz-appearance: textfield;
}

/* Two-column grid for compact fields */
.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-grid-2col .form-group {
    margin-bottom: 0;
}

/* Temperature unit toggle */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.toggle-label {
    font-size: 0.8em;
    color: #555;
    font-weight: 600;
}

.toggle-label.active {
    color: var(--primary-color);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 22px;
    background: var(--primary-color);
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.celsius::after {
    transform: translateX(22px);
}

/* Mode toggle styles */
.mode-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.mode-toggle {
    display: flex;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 3px;
}

.mode-btn {
    padding: 7px 18px;
    border: none;
    background: transparent;
    color: white;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    border-radius: 17px;
    transition: all 0.3s;
}

.mode-btn.active {
    background: white;
    color: var(--primary-color);
}

.mode-btn:not(.active):hover {
    background: rgba(255,255,255,0.1);
}

/* Style cards for simple mode */
.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.style-card {
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: var(--card-bg);
}

.style-card:hover {
    border-color: var(--primary-color);
}

.style-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 10%, transparent) 0%, color-mix(in srgb, var(--primary-hover) 10%, transparent) 100%);
}

.style-card-name {
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 2px;
}

.style-card-desc {
    font-size: 0.75em;
    color: #777;
}

/* Time selector for simple mode */
.time-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.time-option {
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 0.9em;
    background: var(--card-bg);
}

.time-option:hover {
    border-color: var(--primary-color);
}

.time-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 10%, transparent) 0%, color-mix(in srgb, var(--primary-hover) 10%, transparent) 100%);
}

/* Dough details toggle */
.details-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
    font-size: 0.9em;
}

.details-toggle:hover {
    color: var(--primary-hover);
}

.details-toggle-icon {
    transition: transform 0.2s;
    font-size: 0.75em;
}

.details-toggle-icon.open {
    transform: rotate(90deg);
}

.details-content {
    display: none;
    margin-top: 10px;
}

.details-content.open {
    display: block;
}

.details-summary {
    background: var(--tip-bg);
    border-radius: 6px;
    padding: 10px;
    font-size: 0.85em;
    line-height: 1.5;
}

.details-summary .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid var(--border-light);
}

.details-summary .detail-row:last-child {
    border-bottom: none;
}

.details-summary .detail-label {
    color: var(--step-text);
}

.details-summary .detail-value {
    font-weight: 600;
    color: var(--step-title);
}

.details-summary .detail-note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    color: var(--step-text);
    font-size: 0.8em;
}

/* Info toggle (About Calculations) */
.info-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85em;
}

.info-toggle:hover {
    color: var(--primary-hover);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.8em;
    font-weight: bold;
    font-style: italic;
    flex-shrink: 0;
}

.info-content {
    display: none;
    margin-top: 10px;
}

.info-content.open {
    display: block;
}

.calc-info-section {
    background: var(--tip-bg);
    border-radius: 8px;
    padding: 12px;
}

.calc-info-step {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85em;
    line-height: 1.5;
    color: var(--step-text);
}

.calc-info-step:last-child {
    border-bottom: none;
}

/* Preset buttons for advanced mode */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.preset-btn {
    padding: 6px 12px;
    border: 2px solid var(--primary-color);
    background: var(--card-bg);
    color: var(--primary-color);
    font-size: 0.8em;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: transparent;
}

.preset-btn:active {
    transform: scale(0.98);
}

.preset-btn.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: transparent;
}

.preset-btn.preset-custom {
    border-style: dashed;
}

.preset-btn.preset-custom.selected {
    border-style: solid;
}

.preset-size-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

/* Theme selector */
.theme-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-selector label {
    color: var(--header-text);
    font-size: 0.8em;
    font-weight: 600;
}

.theme-selector select {
    padding: 5px 8px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.2);
    color: var(--header-text);
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
}

.theme-selector select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
}

.theme-selector select option {
    color: #000;
    background: #fff;
}

[data-theme="light"] .theme-selector select {
    border-color: rgba(0,0,0,0.2);
    background: rgba(0,0,0,0.05);
}

.preset-size-input {
    max-width: 280px;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Modal overlay and dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

.modal-dialog {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 480px;
    width: 100%;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px 12px 24px;
    border-bottom: 2px solid var(--border-light);
}

.modal-title {
    margin: 0;
    font-size: 1.3em;
    color: var(--card-heading);
    font-weight: 700;
}

.modal-body {
    padding: 20px 24px;
    color: var(--card-text);
    line-height: 1.6;
    font-size: 0.95em;
}

.modal-body p {
    margin: 0 0 12px 0;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-actions {
    padding: 12px 24px 20px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.modal-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-btn-secondary {
    background: var(--tip-bg);
    color: var(--card-text);
    border: 2px solid var(--border-color);
}

.modal-btn-secondary:hover {
    background: var(--border-light);
}

@media (max-width: 600px) {
    .modal-dialog {
        max-width: 100%;
    }

    .modal-header {
        padding: 16px 20px 10px 20px;
    }

    .modal-title {
        font-size: 1.15em;
    }

    .modal-body {
        padding: 16px 20px;
        font-size: 0.9em;
    }

    .modal-actions {
        flex-direction: column-reverse;
        padding: 10px 20px 16px 20px;
    }

    .modal-btn {
        width: 100%;
        padding: 12px 16px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 8px;
    }

    h1 {
        font-size: 1.3em;
        margin-bottom: 10px;
    }

    .card {
        padding: 12px;
        border-radius: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-2col {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stepper-btn {
        width: 34px;
        height: 34px;
        font-size: 1.1em;
    }

    .stepper-value {
        min-width: 40px;
        height: 34px;
    }

    .result-item {
        padding: 10px 6px;
    }

    .result-value {
        font-size: 1.2em;
    }

    .preset-btn {
        padding: 5px 10px;
        font-size: 0.75em;
    }
}
