*, *::before, *::after { box-sizing: border-box; }

:root {
	--ink: #2c2440;
	--muted: #7b7191;
	--line: #e6e0f0;
	--paper: #ffffff;
	--cream: #f7f4fb;
	--work: #8b5cf6;
	--work-dark: #6d28d9;
	--work-soft: #f1e9fd;
	--pink: #ec4899;
	--rest: #22c55e;
	--rest-dark: #15803d;
	--rest-soft: #e6f9ee;
	--shadow: 0 14px 35px rgba(90, 50, 150, .12);
	--pastel-lavender: #d9cdf5;
	--pastel-pink: #f6d3e6;
}

html { height: 100%; }
body { display: flex; flex-direction: column; margin: 0; min-height: 100%; min-width: 320px; background: var(--cream); color: var(--ink); font-family: 'Dosis', sans-serif; font-size: 17px; }
a { color: inherit; text-decoration: none; }
button { border: 0; cursor: pointer; font: inherit; }

.header { background: linear-gradient(120deg, var(--pastel-lavender), var(--pastel-pink)); color: var(--ink); flex: none; }
.header-title { font-size: clamp(2rem, 7vw, 3.2rem); margin: auto; padding: 26px 20px 10px; text-align: center; }
.header-title a { color: var(--ink); }
nav { margin: auto; max-width: 900px; }
nav ul { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0 12px 18px; }
nav li { border-bottom: 3px solid transparent; font-size: .9rem; font-weight: 700; letter-spacing: .05em; padding: 10px 18px; text-transform: uppercase; }
nav a:hover li, nav a.active li { border-color: var(--ink); }

.core { background: var(--cream); display: flex; flex: 1 0 auto; flex-direction: column; justify-content: center; padding: 28px 18px; }
.content { margin: auto; max-width: 1040px; width: 100%; }

.wt-shell { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 22px; margin: 20px auto; max-width: 480px; padding: clamp(22px, 5vw, 40px); }

.wt-modes { background: var(--cream); border-radius: 999px; display: flex; gap: 6px; padding: 6px; }
.wt-mode-btn { background: transparent; border-radius: 999px; color: var(--muted); flex: 1; font-size: .85rem; font-weight: 700; letter-spacing: .04em; padding: 10px 14px; text-transform: uppercase; transition: background .2s, color .2s; }
.wt-mode-btn.active { background: var(--work); box-shadow: 0 6px 14px rgba(139, 92, 246, .35); color: white; }

.wt-settings { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.wt-field { color: var(--muted); display: flex; flex-direction: column; font-size: .8rem; font-weight: 700; gap: 6px; letter-spacing: .03em; text-transform: uppercase; }
.wt-field input { border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; font-size: 1.05rem; font-weight: 400; letter-spacing: normal; padding: 10px 12px; text-transform: none; }
.wt-field input:disabled { background: var(--cream); cursor: not-allowed; }

.wt-display { background: var(--cream); border: 2px solid var(--line); border-radius: 14px; padding: 36px 20px; text-align: center; transition: background .3s, border-color .3s; }
.wt-display[data-phase="work"] { background: var(--work-soft); border-color: var(--work); }
.wt-display[data-phase="rest"] { background: var(--rest-soft); border-color: var(--rest); }
.wt-phase-label { color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .14em; margin: 0 0 10px; text-transform: uppercase; }
.wt-display[data-phase="work"] .wt-phase-label { color: var(--work-dark); }
.wt-display[data-phase="rest"] .wt-phase-label { color: var(--rest-dark); }
.wt-time { font-size: clamp(3rem, 14vw, 4.5rem); font-variant-numeric: tabular-nums; font-weight: 700; margin: 0; }
.wt-display[data-phase="work"] .wt-time { color: var(--work-dark); }
.wt-display[data-phase="rest"] .wt-time { color: var(--rest-dark); }
.wt-note { color: var(--muted); font-size: .9rem; margin: 10px 0 0; min-height: 1.2em; }

.wt-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.button { background: var(--ink); border-radius: 8px; color: white; display: inline-block; font-size: 1rem; font-weight: 700; padding: 12px 22px; transition: background .15s; }
.button:hover { background: #443a63; }
.button.work { background: var(--work); }
.button.work:hover { background: var(--work-dark); }
.button.rest { background: var(--rest); }
.button.rest:hover { background: var(--rest-dark); }
.button.secondary { background: white; border: 1px solid var(--line); color: var(--ink); }
.button.secondary:hover { background: var(--cream); }
.button:disabled { cursor: not-allowed; opacity: .45; }

.footer { background: linear-gradient(120deg, var(--pastel-lavender), var(--pastel-pink)); color: var(--ink); flex: none; font-size: .85rem; padding: 28px 10%; }

@media (max-width: 420px) {
	.wt-settings { grid-template-columns: 1fr; }
}
