@charset "UTF-8";

:root {
  color-scheme: light;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: #302c3b;
  background: #f7f7f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --accent: #6552c9;
  --muted: #746c7c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
body[data-view="countdown"] { background: #ece9f8; }
body[data-state="complete"][data-view="countdown"] { background: #e6efe9; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid #8e7ce7; outline-offset: 5px; }
h1:focus { outline: none; }
svg { flex-shrink: 0; }
.language-switcher { position: fixed; z-index: 5; top: max(16px, env(safe-area-inset-top)); right: max(20px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 5px; max-width: calc(100vw - 32px); min-height: 44px; padding: 4px 8px; border: 1px solid #e1dce780; border-radius: 10px; background: #ffffffb3; color: #61576d; }
.language-switcher svg { width: 17px; height: 17px; }
.language-switcher select { max-width: 135px; min-width: 0; min-height: 34px; padding: 4px; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 12px; cursor: pointer; }
.language-switcher option { background: #fff; color: #302c3b; }

.create-screen, .message-screen { min-height: 100svh; display: grid; place-items: center; padding: 56px 24px; }
.create-content { width: min(100%, 414px); }
.brand { display: flex; align-items: center; justify-content: center; gap: 9px; width: fit-content; margin: 0 auto 46px; color: #2c2b37; font-size: 27px; letter-spacing: -1.5px; font-weight: 750; text-decoration: none; line-height: 1; }
.brand svg { width: 29px; height: 29px; color: var(--accent); }
.brand span { color: var(--accent); margin-left: -8px; }
.form-intro { text-align: center; margin-bottom: 33px; }
.form-intro h1 { font-size: clamp(34px, 5vw, 43px); line-height: 1.2; font-weight: 600; letter-spacing: -2px; margin: 0; text-wrap: balance; }
.form-intro h1 span { color: var(--accent); }
.form-intro h1 .heading-lead { color: inherit; }
.event-form { border: 1px solid #e8e6e0; border-radius: 22px; background: #fff; padding: 29px; box-shadow: 0 8px 30px #3a314304; }
.field-group { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field-group label { color: #57515f; font-size: 12px; font-weight: 600; }
input { width: 100%; min-width: 0; min-height: 48px; padding: 12px; border: 1px solid #e1dfe7; border-radius: 9px; background: #fff; color: #433e4b; font-size: 14px; line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #797281; }
input:hover { border-color: #bcb3d6; }
input:focus { outline: none; border-color: #8a77d5; box-shadow: 0 0 0 3px #eeebfa; }
input[aria-invalid="true"] { border-color: #b44758; }
input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; padding: 0; margin: 0; }
input[type="date"], input[type="time"] { font-size: 13px; padding-right: 10px; }
.field-hint { color: var(--muted); font-size: 10px; line-height: 1; text-align: right; }
.date-time-fields { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-top: 21px; }
.timezone-note { margin: 13px 0 26px; color: var(--muted); font-size: 10px; line-height: 1.5; display: flex; align-items: center; gap: 5px; }
.timezone-note svg { width: 13px; height: 13px; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; border: 1px solid var(--accent); border-radius: 10px; padding: 14px 16px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.5; transition: background .15s; }
.primary-button:not(:disabled):hover { background: #5542b8; border-color: #5542b8; }
.primary-button svg { width: 17px; height: 17px; }
.form-error { margin: -7px 0 17px; font-size: 12px; line-height: 1.6; color: #a52f44; }

.countdown-screen { min-height: 100svh; display: grid; place-items: center; padding: 72px 38px 100px; }
.countdown-content { width: min(100%, 780px); text-align: center; }
.countdown-content h1 { color: #383048; margin: 0; font-size: clamp(28px, 4.3vw, 50px); line-height: 1.24; letter-spacing: -1.5px; font-weight: 550; overflow-wrap: anywhere; }
.calendar-units { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 31px; }
.calendar-unit { color: #66567f; font-size: clamp(15px, 2.3vw, 21px); line-height: 1.5; }
.calendar-unit + .calendar-unit::before { content: "·"; margin-right: 14px; color: #89799c; }
.calendar-unit strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.timer { display: grid; grid-template-columns: minmax(0, 1fr) 19px minmax(0, 1fr) 19px minmax(0, 1fr); align-items: center; gap: 11px; margin: 37px auto 0; position: relative; }
.time-unit { display: flex; flex-direction: column; gap: 19px; min-width: 0; }
.time-value { color: #3b324d; display: grid; place-items: center; background: #ffffffad; border: 1px solid #ffffffdc; border-radius: 22px; font-size: clamp(54px, 12vw, 122px); font-weight: 450; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -4px; padding: 30px 4px 34px; }
.time-label { color: #6f647b; font-size: 11px; font-weight: 600; letter-spacing: 2.1px; text-transform: uppercase; }
.time-separator { color: #9e91b1; font-size: 43px; font-weight: 300; transform: translateY(-19px); }
.event-date-row { margin: 37px auto 0; color: #6f647b; font-size: 14px; line-height: 1.8; }
.completion-message { font-size: 16px; color: #496a55; margin: 20px 0 0; }
body[data-state="complete"] .time-value { color: #365841; }
.delete-button { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: #766b84; background: transparent; border: 1px solid transparent; border-radius: 12px; transition: color .15s, background .15s; }
.delete-button svg { width: 20px; height: 20px; }
.delete-button:hover { background: #ffffff70; color: #963c53; }

.message-screen { text-align: center; }
.message-screen > div { max-width: 460px; }
.message-screen h1 { font-size: 30px; font-weight: 550; letter-spacing: -1px; margin: 0; }
.message-screen p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 17px 0 25px; }
.text-link { color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 600; }
.text-link span { margin-left: 5px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.delete-dialog { width: min(400px, calc(100% - 40px)); border: 1px solid #e7e2eb; border-radius: 20px; padding: 28px; color: #383048; background: #fff; box-shadow: 0 20px 80px #30203d20; }
.delete-dialog::backdrop { background: #21172d45; backdrop-filter: blur(3px); }
.delete-dialog h2 { font-size: 22px; font-weight: 600; letter-spacing: -.5px; margin: 0; }
.delete-dialog > p:not(.form-error) { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 13px 0 26px; }
.delete-dialog .form-error { margin-top: -8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.secondary-button, .danger-button { border: 1px solid #e5dfeb; border-radius: 9px; padding: 11px 14px; font-size: 12px; font-weight: 600; line-height: 1.5; background: #fff; color: #61576d; }
.danger-button { background: #a13750; border-color: #a13750; color: #fff; }
.secondary-button:hover { background: #f6f4f9; }
.danger-button:hover { background: #8c2a41; }
.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; }
.noscript-note { max-width: 440px; margin: 20px auto; background: #fff2d8; padding: 20px; border-radius: 12px; color: #6c4f15; }

@media (max-width: 600px) {
  .create-screen { padding: 88px 21px 38px; }
  .language-switcher { right: max(16px, env(safe-area-inset-right)); }
  .brand { margin-bottom: 34px; font-size: 25px; }
  .form-intro { margin-bottom: 26px; }
  .form-intro h1 { font-size: 35px; letter-spacing: -1.7px; }
  .event-form { padding: 25px 22px; }
  input { font-size: 16px; }
  input[type="date"], input[type="time"] { font-size: 14px; }
  .date-time-fields { gap: 11px; }
  .countdown-screen { padding: 88px 20px 92px; }
  .countdown-content h1 { font-size: clamp(28px, 7vw, 37px); letter-spacing: -.9px; }
  .calendar-units { margin-top: 24px; gap: 10px; }
  .calendar-unit { font-size: 16px; }
  .calendar-unit + .calendar-unit::before { margin-right: 10px; }
  .timer { grid-template-columns: minmax(0, 1fr) 7px minmax(0, 1fr) 7px minmax(0, 1fr); gap: 5px; margin-top: 29px; }
  .time-unit { gap: 15px; }
  .time-value { font-size: clamp(42px, 13.5vw, 76px); padding: 23px 0 25px; border-radius: 14px; letter-spacing: -1.7px; }
  .time-label { font-size: 9px; letter-spacing: 1px; }
  .time-separator { font-size: 26px; transform: translateY(-15px); }
  .event-date-row { font-size: 12px; margin-top: 29px; }
  .delete-button { right: 16px; bottom: 16px; }
  .dialog-actions { flex-direction: column; }
}

@media (max-width: 359px) {
  .create-screen { padding-inline: 16px; }
  .event-form { padding-inline: 18px; }
  .countdown-screen { padding-inline: 15px; }
  .time-value { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
