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

html,
body {
    height: 100%;
    background: transparent;
}

body {
    --ios-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --card-bg: var(--theme-card-bg);
    --ink: var(--theme-ink);
    --ink-muted: var(--theme-ink-muted);
    --ink-faint: var(--theme-ink-faint);
    --week-pill: var(--theme-week-pill);
    --card-shadow: var(--theme-card-shadow);
    --accent: #ff453a;
    --accent-contrast: #ffffff;
    font-family: var(--ios-font);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* ---------- Themes ---------- */

body.theme-light {
    --theme-card-bg: #ffffff;
    --theme-ink: #1d1d1f;
    --theme-ink-muted: #86868b;
    --theme-ink-faint: #d2d2d7;
    --theme-week-pill: rgba(60, 60, 67, 0.08);
    --theme-card-shadow: 0 16px 36px rgba(15, 17, 21, 0.16), 0 2px 8px rgba(15, 17, 21, 0.08);
}

body.theme-dark {
    --theme-card-bg: #1c1c1e;
    --theme-ink: #ffffff;
    --theme-ink-muted: rgba(235, 235, 245, 0.55);
    --theme-ink-faint: rgba(235, 235, 245, 0.24);
    --theme-week-pill: rgba(255, 255, 255, 0.09);
    --theme-card-shadow: 0 16px 36px rgba(0, 0, 0, 0.38), 0 2px 8px rgba(0, 0, 0, 0.24);
}

/* ---------- Scene ---------- */

.widget-shell {
    height: 100%;
}

.scene-surface {
    position: relative;
    height: 100%;
    display: grid;
    place-items: center;
    padding: clamp(10px, 4vw, 32px);
    background: var(--surface-bg-override, transparent);
    container: scene / inline-size;
}

.config-trigger {
    position: absolute;
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    z-index: 5;
    width: 36px;
    height: 36px;
    border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--card-bg) 82%, transparent);
    color: var(--ink);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-2px) scale(0.96);
    backdrop-filter: blur(14px);
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.scene-surface:hover .config-trigger,
.config-trigger:hover,
.config-trigger:focus-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.config-trigger:hover {
    background: color-mix(in srgb, var(--card-bg) 94%, transparent);
}

.config-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- Card ---------- */

.ios-card {
    position: relative;
    container: card / inline-size;
    display: grid;
    background: var(--card-bg);
    color: var(--ink);
    box-shadow: var(--card-shadow);
    transition: background 0.3s ease, color 0.3s ease;
    animation: card-in 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.month-nav {
    position: absolute;
    top: clamp(8px, 2.4cqw, 14px);
    right: clamp(8px, 2.4cqw, 14px);
    z-index: 2;
    display: none;
    gap: clamp(3px, 1cqw, 5px);
    opacity: 0.42;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.month-nav__button {
    width: clamp(27px, 8cqw, 34px);
    height: clamp(27px, 8cqw, 34px);
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--ink) 8%, transparent);
    color: var(--ink);
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

body.mode-month .month-nav:not(.hidden),
body.mode-months .month-nav:not(.hidden) {
    display: flex;
}

.month-nav:hover,
.month-nav:focus-within {
    opacity: 1;
}

.month-nav__button:hover,
.month-nav__button:focus-visible {
    transform: translateX(1px);
    background: color-mix(in srgb, var(--ink) 14%, transparent);
}

.month-nav__button:first-child:hover,
.month-nav__button:first-child:focus-visible {
    transform: translateX(-1px);
}

.month-nav__button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pane {
    display: none;
    grid-area: 1 / 1;
    min-width: 0;
    min-height: 0;
}

/* ---------- Mode: day ---------- */

body.mode-day .ios-card {
    width: min(64cqw, 64vh, 200px);
    aspect-ratio: 1;
    border-radius: 22.5%;
}

body.mode-day .pane-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4cqw;
}

.day-weekday {
    color: var(--accent);
    font-weight: 600;
    font-size: clamp(13px, 13.5cqw, 28px);
    line-height: 1;
}

.day-number {
    color: var(--ink);
    font-weight: 300;
    font-size: clamp(42px, 46cqw, 96px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* ---------- Mode: today ---------- */

body.mode-today .ios-card {
    width: min(96cqw, 540px);
    aspect-ratio: 2.12 / 1;
    border-radius: clamp(18px, 5cqw, 28px);
    padding: clamp(12px, 3.6cqw, 22px) clamp(14px, 4cqw, 24px);
}

body.mode-today .pane-today {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(12px, 6cqw, 36px);
}

.today-left {
    display: flex;
    flex-direction: column;
    gap: 0.6cqw;
}

.today-weekday {
    color: var(--accent);
    font-weight: 600;
    font-size: clamp(11px, 4cqw, 22px);
    letter-spacing: 0.05em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.today-day {
    color: var(--ink);
    font-weight: 400;
    font-size: clamp(30px, 11.5cqw, 62px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.today-weather {
    margin-top: auto;
    color: var(--ink-muted);
    font-weight: 400;
    font-size: clamp(11px, 3.8cqw, 20px);
    line-height: 1.25;
    padding-bottom: 0.5cqw;
}

.today-right {
    display: flex;
    flex-direction: column;
    gap: clamp(2px, 1.2cqw, 8px);
}

.today-month {
    color: var(--accent);
    font-weight: 600;
    font-size: clamp(10px, 3.1cqw, 17px);
    letter-spacing: 0.08em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.today-right .mini-grid {
    flex: 1;
}

body.mode-today .mini-grid {
    font-size: clamp(9px, 2.55cqw, 14px);
}

/* ---------- Mode: month ---------- */

body.mode-month .ios-card {
    width: min(84cqw, 330px);
    aspect-ratio: 1 / 1.04;
    border-radius: clamp(16px, 6cqw, 24px);
    padding: clamp(12px, 5cqw, 20px);
}

body.mode-month .pane-month {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 2.5cqw, 12px);
}

.month-heading {
    display: flex;
    align-items: baseline;
    gap: 0.35em;
    padding-right: clamp(58px, 17cqw, 74px);
    line-height: 1.2;
}

.month-title {
    color: var(--accent);
    font-weight: 600;
    font-size: clamp(15px, 6cqw, 22px);
}

.month-year {
    color: var(--ink-muted);
    font-weight: 500;
    font-size: clamp(13px, 5cqw, 19px);
    font-variant-numeric: tabular-nums;
}

.pane-month .mini-grid {
    flex: 1;
}

body.mode-month .mini-grid {
    font-size: clamp(10px, 4.4cqw, 16px);
}

/* ---------- Mode: months ---------- */

body.mode-months .ios-card {
    width: min(96cqw, 620px);
    aspect-ratio: 2.08 / 1;
    border-radius: clamp(18px, 5cqw, 28px);
    padding: clamp(12px, 3.4cqw, 22px) clamp(14px, 4cqw, 26px);
}

body.mode-months .pane-months {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(14px, 6cqw, 38px);
}

.mini-month {
    display: flex;
    flex-direction: column;
    gap: clamp(2px, 1.4cqw, 9px);
    min-width: 0;
}

.months-title {
    color: var(--ink);
    font-weight: 600;
    font-size: clamp(12px, 3cqw, 18px);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.mode-months .mini-month:last-child .months-title {
    padding-right: clamp(58px, 17cqw, 74px);
}

.mini-month .mini-grid {
    flex: 1;
}

body.mode-months .mini-grid {
    font-size: clamp(8.5px, 2.2cqw, 13.5px);
}

/* ---------- Mini month grid ---------- */

.mini-grid {
    display: grid;
    grid-auto-rows: 1fr;
    min-height: 0;
    font-variant-numeric: tabular-nums;
}

.mini-grid__row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-radius: 999px;
}

.mini-grid.has-weeknums .mini-grid__row {
    grid-template-columns: minmax(0, 0.9fr) repeat(7, minmax(0, 1fr));
}

.mini-grid__head,
.mini-grid__cell,
.mini-grid__weeknum {
    display: grid;
    place-items: center;
    line-height: 1;
    min-width: 0;
}

.mini-grid__head {
    color: var(--ink-muted);
    font-weight: 600;
    font-size: 0.86em;
}

.mini-grid__weeknum {
    color: var(--ink-faint);
    font-weight: 500;
    font-size: 0.78em;
}

.mini-grid__cell {
    position: relative;
    isolation: isolate;
    color: var(--ink);
    font-weight: 600;
}

.mini-grid__cell.is-weekend {
    color: var(--ink-muted);
}

.mini-grid__cell.is-overflow {
    color: var(--ink-faint);
    font-weight: 500;
}

.mini-grid__cell.is-today {
    color: var(--accent-contrast);
    font-weight: 700;
}

.mini-grid__cell.is-today::before {
    content: '';
    position: absolute;
    z-index: -1;
    width: 1.85em;
    height: 1.85em;
    border-radius: 50%;
    background: var(--accent);
}

.mini-grid__row.is-current-week {
    background: var(--week-pill);
}

/* ---------- Narrow embeds ---------- */

@container scene (max-width: 400px) {
    body.mode-months .ios-card {
        width: min(96cqw, 340px);
        aspect-ratio: auto;
    }

    body.mode-months .pane-months {
        grid-template-columns: minmax(0, 1fr);
        gap: clamp(12px, 5cqw, 20px);
        padding: 1cqw 0;
    }

    .months-title {
        font-size: clamp(13px, 5.5cqw, 18px);
    }

    body.mode-months .mini-grid {
        font-size: clamp(10px, 4.2cqw, 15px);
        grid-auto-rows: minmax(1.9em, 1fr);
    }

    body.mode-today .pane-today {
        gap: clamp(10px, 4cqw, 16px);
    }
}

/* ---------- Modal ---------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    justify-content: flex-end;
    background: rgba(15, 15, 20, 0.36);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: min(420px, 100%);
    height: 100%;
    overflow-y: auto;
    background: #f5f5f7;
    color: #1d1d1f;
    box-shadow: -24px 0 60px rgba(10, 10, 14, 0.22);
    transform: translateX(100%);
    transition: transform 0.32s ease;
}

.modal-overlay.is-open .modal-container {
    transform: translateX(0);
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 24px 18px;
    background: rgba(245, 245, 247, 0.92);
    border-bottom: 1px solid rgba(60, 60, 67, 0.12);
    backdrop-filter: blur(12px);
}

.modal-eyebrow {
    margin: 0 0 4px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #86868b;
}

.modal-header h1 {
    margin: 0;
    font-size: 1.42rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1d1d1f;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(60, 60, 67, 0.1);
    color: #3c3c43;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(60, 60, 67, 0.18);
}

.modal-body {
    padding: 12px 0 28px;
}

.config-section {
    padding: 18px 24px 24px;
    border-bottom: 1px solid rgba(60, 60, 67, 0.1);
}

.config-section:last-child {
    border-bottom: none;
}

.section-header {
    margin-bottom: 14px;
}

.section-header h2 {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1d1d1f;
}

.section-header p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6e6e73;
}

/* Mode cards */

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

.mode-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(20, 20, 26, 0.07);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.mode-card:hover {
    transform: translateY(-1px);
}

.mode-card.is-active {
    border-color: #0a84ff;
}

.mode-card__preview {
    height: 64px;
    border-radius: 11px;
    background: linear-gradient(160deg, #e7e7ec, #dcdce2);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.pm {
    background: #1c1c1e;
    border-radius: 9px;
    box-shadow: 0 5px 12px rgba(10, 10, 14, 0.32);
    color: #ffffff;
}

.pm-day {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.pm-today {
    width: 76px;
    height: 40px;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
}

.pm-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.pm-month {
    width: 42px;
    height: 46px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 7px 8px;
}

.pm-months {
    width: 76px;
    height: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 7px;
    padding: 8px 9px;
}

.pm-wk {
    width: 14px;
    height: 4px;
    border-radius: 2px;
    background: #ff453a;
}

.pm-big {
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.pm-dots {
    width: 100%;
    height: 100%;
    min-height: 22px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.78) 1px, transparent 1.4px);
    background-size: 6px 6px;
    background-position: center;
}

.mode-card__copy strong,
.mode-card__copy span {
    display: block;
}

.mode-card__copy strong {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1d1d1f;
}

.mode-card__copy span {
    margin-top: 2px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #6e6e73;
}

/* Theme cards */

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

.theme-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(20, 20, 26, 0.07);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-card:hover {
    transform: translateY(-1px);
}

.theme-card.is-active {
    border-color: #0a84ff;
}

.theme-card__preview {
    position: relative;
    height: 64px;
    border-radius: 11px;
    display: grid;
    place-items: center;
}

.preview-light {
    background: #ffffff;
    border: 1px solid #e3e3e8;
    color: #1d1d1f;
}

.preview-dark {
    background: #1c1c1e;
    color: #ffffff;
}

.pv-day {
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1;
}

.pv-dot {
    position: absolute;
    right: 14px;
    bottom: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff453a;
}

.theme-card__copy strong,
.theme-card__copy span {
    display: block;
}

.theme-card__copy strong {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1d1d1f;
}

.theme-card__copy span {
    margin-top: 2px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #6e6e73;
}

/* Accent swatches */

.accent-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.accent-swatch {
    width: 34px;
    height: 34px;
    border: 3px solid #f5f5f7;
    border-radius: 50%;
    background: var(--swatch);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.accent-swatch:hover {
    transform: scale(1.08);
}

.accent-swatch.is-active {
    box-shadow: 0 0 0 2.5px #0a84ff;
}

/* Segmented control */

.segmented-control {
    display: inline-grid;
    grid-auto-flow: column;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(60, 60, 67, 0.1);
    margin-bottom: 16px;
}

.segment {
    min-width: 54px;
    border: none;
    border-radius: 9px;
    padding: 8px 14px;
    background: transparent;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: #3c3c43;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.segment.is-active {
    background: #ffffff;
    color: #1d1d1f;
    box-shadow: 0 1px 4px rgba(20, 20, 26, 0.16);
}

/* Toggles */

.toggle-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(20, 20, 26, 0.07);
    cursor: pointer;
}

.toggle-option + .toggle-option {
    margin-top: 10px;
}

.toggle-copy strong,
.toggle-copy span {
    display: block;
}

.toggle-copy strong {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1d1d1f;
}

.toggle-copy span {
    margin-top: 2px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #6e6e73;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 29px;
    border-radius: 999px;
    background: rgba(120, 120, 128, 0.32);
    transition: background 0.2s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.toggle-option input:checked ~ .toggle-switch {
    background: #34c759;
}

.toggle-option input:checked ~ .toggle-switch::after {
    transform: translateX(19px);
}

.toggle-option input:focus-visible ~ .toggle-switch {
    outline: 2px solid #0a84ff;
    outline-offset: 2px;
}

.weather-config-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 10px;
    margin: 12px 0 14px;
}

/* Inputs */

.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6e6e73;
}

.date-input,
.url-input,
.text-input,
.custom-color-group input[type='text'] {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(60, 60, 67, 0.16);
    padding: 0 14px;
    background: #ffffff;
    color: #1d1d1f;
    font: inherit;
}

.date-input {
    max-width: 180px;
}

.bg-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.bg-preset {
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 10px 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(20, 20, 26, 0.07);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1d1d1f;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.bg-preset:hover {
    transform: translateY(-1px);
}

.bg-preset.is-active {
    border-color: #0a84ff;
}

.bg-preset__swatch {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.bg-swatch--transparent {
    background:
        linear-gradient(45deg, #d4d4da 25%, transparent 25%, transparent 75%, #d4d4da 75%),
        linear-gradient(45deg, #d4d4da 25%, transparent 25%, transparent 75%, #d4d4da 75%);
    background-position: 0 0, 6px 6px;
    background-size: 12px 12px;
}

.custom-color-group {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 10px;
}

.custom-color-group input[type='color'] {
    width: 54px;
    height: 46px;
    border: 1px solid rgba(60, 60, 67, 0.16);
    border-radius: 12px;
    padding: 0;
    background: #ffffff;
    cursor: pointer;
}

.apply-btn,
.copy-btn {
    min-height: 46px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    background: #0a84ff;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.apply-btn:hover,
.copy-btn:hover {
    transform: translateY(-1px);
    background: #0071e3;
}

.url-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.url-input {
    font-size: 0.84rem;
}

.copy-feedback {
    margin: 8px 0 0;
    min-height: 1.2em;
    font-size: 0.82rem;
    color: #34c759;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.copy-feedback.is-active {
    opacity: 1;
}

.instructions-list {
    margin: 0;
    padding-left: 18px;
    color: #3c3c43;
    line-height: 1.7;
    font-size: 0.92rem;
}

.instructions-list code,
.section-header code {
    padding: 0.15em 0.42em;
    border-radius: 6px;
    background: rgba(60, 60, 67, 0.1);
    font-size: 0.92em;
}

/* ---------- State & a11y ---------- */

.hidden {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .ios-card {
        animation: none;
    }

    .modal-overlay,
    .modal-container,
    .toggle-switch,
    .toggle-switch::after {
        transition: none;
    }
}
