* {
    box-sizing: border-box;
}

body {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 18px 48px;
    color: #17211b;
    background: #f7f9f5;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 7vw, 3.5rem);
    line-height: 1;
}

h2 {
    margin-top: 34px;
    margin-bottom: 16px;
    font-size: 1.7rem;
}

.converter {
    display: grid;
    gap: 18px;
    margin-top: 10px;
}

.timezone-card,
.result-panel {
    padding: 18px;
    border: 1px solid #cbd9cc;
    border-radius: 8px;
    background: #ffffff;
}

.label {
    display: block;
    margin-bottom: 6px;
    color: #506052;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#detected-timezone,
#converted-output {
    display: block;
    overflow-wrap: anywhere;
    font-size: 1.35rem;
}

.local-time {
    display: block;
    margin-top: 5px;
    color: #506052;
}

.shift-form {
    display: grid;
    gap: 16px;
}

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

label {
    display: grid;
    gap: 7px;
    color: #243329;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #aebdae;
    border-radius: 6px;
    background: #ffffff;
    color: #17211b;
    font: inherit;
}

input:focus {
    border-color: #2d6f45;
    outline: 3px solid #cdebd6;
}

button {
    min-height: 48px;
    border: 0;
    border-radius: 6px;
    background: #245a39;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

button:hover,
button:focus-visible {
    background: #1b472d;
}

.result-panel {
    border-color: #8fb894;
    background: #eef8ef;
}

#converted-output {
    font-family: "Courier New", Courier, monospace;
    font-weight: 800;
}

.error-message {
    min-height: 1.5em;
    color: #a12a1f;
    font-weight: 700;
}

@media (max-width: 520px) {
    body {
        padding-top: 24px;
    }

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