html,
body {
    min-height: 100%;
    margin: 0;
    background: #050505;
}

body.app-non-overlay {
    min-height: 100vh;
    background: radial-gradient(circle at top, #1a1a1a 0%, #0a0a0a 45%, #050505 100%);
    background-attachment: fixed;
    color: #fff;
}

.app-shell {
    --panel: #1a1a1a;
    --panel-alt: #222222;
    --panel-strong: #2a2a2a;
    --accent: #f2c46b;
    --accent-strong: #f2c46b;
    --accent-dark: #c97632;
    --border: #3d2716;
    --muted: #a0a0a0;
    color: #fff;
}

.app-shell.dark,
.dark .app-shell {
    --panel: #0a0a0a;
    --panel-alt: #121212;
    --panel-strong: #1a1a1a;
    --accent: #f2c46b;
    --accent-strong: #f9d97d;
    --accent-dark: #c97632;
    --border: #3d2716;
    --muted: #6c6c6c;
}

.app-shell .panel {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.app-shell .panel-head {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
    border-bottom: 1px solid var(--border);
}

.app-shell .hero {
    background: linear-gradient(180deg, var(--panel-strong) 0%, var(--panel-alt) 100%);
}

.app-shell .btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #111;
}

.app-shell .btn-secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
}

.app-shell .btn-ghost {
    background: var(--panel-strong);
    border: 1px solid var(--border);
    color: #fff;
}

.app-shell .pill {
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.control-shell,
.control-shell button,
.control-shell input,
.control-shell select,
.control-shell textarea {
    font-family: 'Tajawal', 'Inter', sans-serif;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.timer-planner {
    --planner-surface: linear-gradient(180deg, rgba(244, 247, 252, 0.98), rgba(230, 239, 252, 0.94));
    --planner-border: rgba(138, 176, 235, 0.35);
    --planner-blue: #2e7df6;
    --planner-blue-soft: #dcebff;
    --planner-blue-strong: #1855d8;
    --planner-text: #17315d;
    --planner-text-soft: #6b7f9e;
    background: var(--planner-surface);
    border: 1px solid var(--planner-border);
    border-radius: 28px;
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 18px 44px rgba(17, 46, 96, 0.2);
}

.timer-planner__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.timer-planner__eyebrow {
    color: var(--planner-text-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.timer-planner__headline {
    color: var(--planner-text);
    font-size: 1.15rem;
    font-weight: 900;
}

.timer-planner__hero-time {
    background: rgba(46, 125, 246, 0.12);
    border: 1px solid rgba(46, 125, 246, 0.18);
    color: var(--planner-blue-strong);
    border-radius: 18px;
    padding: 12px 14px;
    font-size: 1.1rem;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.timer-planner__days {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.timer-day-chip {
    appearance: none;
    border: 1px solid rgba(113, 139, 180, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.64);
    color: var(--planner-text);
    padding: 10px 8px;
    text-align: center;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 8px 20px rgba(77, 104, 150, 0.08);
}

.timer-day-chip:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.88);
}

.timer-day-chip.is-active {
    background: linear-gradient(180deg, #5ea7ff, #2e7df6);
    color: #fff;
    box-shadow: 0 14px 30px rgba(46, 125, 246, 0.28);
}

.timer-day-chip__weekday,
.timer-day-chip__meta {
    display: block;
}

.timer-day-chip__weekday {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.78;
}

.timer-day-chip__day {
    display: block;
    font-size: 1.25rem;
    line-height: 1.05;
    font-weight: 900;
    margin: 4px 0;
}

.timer-day-chip__meta {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.72;
}

.timer-planner__body {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.timer-planner__dial-card,
.timer-planner__controls {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(162, 187, 224, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.timer-planner__dial-card {
    display: grid;
    place-items: center;
    padding: 16px;
}

.timer-planner__controls {
    padding: 14px;
    display: grid;
    gap: 12px;
}

.timer-planner__nudge-row,
.timer-planner__quick-row,
.timer-planner__fields {
    display: grid;
    gap: 8px;
}

.timer-planner__nudge-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timer-planner__quick-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timer-planner__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timer-nudge,
.timer-quick-chip,
.timer-planner__apply {
    appearance: none;
    border: 0;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.86rem;
    padding: 12px 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.timer-nudge,
.timer-quick-chip {
    background: rgba(46, 125, 246, 0.1);
    color: var(--planner-blue-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.timer-nudge:hover,
.timer-quick-chip:hover,
.timer-planner__apply:hover {
    transform: translateY(-1px);
}

.timer-planner__field {
    display: grid;
    gap: 6px;
    color: var(--planner-text);
    font-size: 0.78rem;
    font-weight: 800;
}

.timer-planner__input {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(129, 164, 214, 0.32);
    background: rgba(255, 255, 255, 0.88);
    color: var(--planner-text);
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.timer-planner__summary {
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(215, 232, 255, 0.68), rgba(227, 239, 255, 0.42));
    color: var(--planner-text);
    padding: 12px 14px;
    display: grid;
    gap: 4px;
}

.timer-planner__summary span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--planner-text-soft);
}

.timer-planner__summary strong {
    font-size: 0.98rem;
    font-weight: 900;
}

.timer-planner__apply {
    background: linear-gradient(180deg, #4a97ff, #216be8);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 14px 30px rgba(33, 107, 232, 0.28);
}

.radial {
    --border-width: 18px;
    --diameter: min(100%, 280px);
    --handle-size: 38px;
    width: var(--diameter);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    position: relative;
}

.radial__ring,
.radial__track,
.radial__labels {
    position: absolute;
    inset: 0;
}

.radial__track {
    border-radius: 50%;
    background:
        conic-gradient(from -90deg, #2f80ed 0 var(--progress-stop, 0%), rgba(141, 188, 251, 0.22) var(--progress-stop, 0%) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(221, 233, 251, 0.8));
    box-shadow: inset 0 0 0 1px rgba(148, 174, 212, 0.2), 0 18px 42px rgba(53, 91, 152, 0.16);
    mask: radial-gradient(circle, transparent calc(50% - var(--border-width)), #000 calc(50% - var(--border-width) + 1px));
}

.radial__labels span {
    position: absolute;
    font-size: 0.72rem;
    font-weight: 800;
    color: #6280ad;
}

.radial__center {
    width: calc(100% - 74px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(237, 244, 255, 0.96), rgba(218, 230, 247, 0.95));
    display: grid;
    place-items: center;
    text-align: center;
    padding: 20px;
    box-shadow: inset 0 2px 12px rgba(255, 255, 255, 0.88), inset 0 -10px 24px rgba(111, 144, 197, 0.12);
}

.radial__caption {
    color: #6a82a7;
    font-size: 0.75rem;
    font-weight: 800;
}

.radial__time {
    margin: 0;
    color: #17315d;
    font-size: 1.85rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.radial__sub {
    color: #6a82a7;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
}

.radial__handle {
    width: var(--handle-size);
    height: var(--handle-size);
    position: absolute;
    left: 50%;
    top: calc(var(--border-width) * 0.6);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid #fff;
    background: linear-gradient(180deg, #6fb2ff, #2f80ed);
    box-shadow: 0 14px 28px rgba(47, 128, 237, 0.35);
    display: grid;
    place-items: center;
    cursor: grab;
}

.radial__handle span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
}

.radial__handle:active {
    cursor: grabbing;
}

@media (max-width: 767px) {
    .timer-planner__days {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .timer-planner__body,
    .timer-planner__fields {
        grid-template-columns: 1fr;
    }

    .timer-planner__nudge-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@keyframes splashBounce {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes splashShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.splash-logo {
    animation: splashBounce 2s ease-in-out infinite;
}

.splash-shimmer {
    animation: splashShimmer 2s infinite;
}