@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/rubik-hebrew-400.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/rubik-hebrew-500.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/rubik-hebrew-700.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/rubik-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/rubik-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/rubik-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #1e1a16;
  --muted: #6d645a;
  --paper: #fffaf4;
  --line: #eadfce;
  --field: #fff;
  --teal: #0f5f5a;
  --teal-dark: #0b4440;
  --brass: #b8893d;
  --danger: #8a2e2e;
  --danger-bg: #f8ece8;
  --shadow: 0 24px 60px rgba(40, 30, 20, 0.12);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  min-height: 100dvh;
  font-family: Rubik, "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 50% -80px, #f7f1e4 0%, transparent 70%),
    #d7d0c4;
  line-height: 1.45;
}

.shell {
  width: min(440px, 100%);
  margin: 0 auto;
  background: var(--paper);
  min-height: 100dvh;
  padding: 22px 18px 28px;
}

.top {
  margin-bottom: 8px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

h1 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.2;
  font-weight: 700;
}

.lede, .hint, .footnote, .plate-caption, .back {
  color: var(--muted);
}

.lede { margin: 8px 0 18px; }
.lede + .lede { margin-top: -10px; }
.lede-emphasis {
  color: var(--ink);
  font-weight: 700;
}
.lede-quiet {
  font-size: 0.85rem;
}

form { display: flex; flex-direction: column; gap: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

label { font-weight: 500; }

input[type="text"],
input[type="password"],
input[type="search"],
select {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid #ddd4c6;
  background: var(--field);
  padding: 0 14px;
  font: inherit;
  color: inherit;
}

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

.photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.file-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 16px;
  border: 1px dashed var(--brass);
  background: #f6f1e8;
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.file-button.is-camera {
  border-style: solid;
  border-color: var(--teal);
  background: var(--teal);
  color: #f7f3ea;
}

.file-button.is-camera:active { background: var(--teal-dark); }

input.is-invalid { border-color: var(--danger); }

.primary, .choice {
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.primary {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  background: var(--teal);
  color: #f7f3ea;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}

.primary:active { transform: scale(0.985); background: var(--teal-dark); }

a.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.done-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.current-apartment .chip { margin: 0; }

.choices {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  background: #f6f1e8;
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 0;
  border: 1px solid var(--line);
  min-height: 96px;
}

.choice-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fffdf8;
  color: var(--teal);
  border: 1px solid var(--line);
}

.choice-icon svg {
  width: 28px;
  height: 28px;
}

.choice-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.choice strong { font-size: 1.15rem; }
.choice-copy span { color: var(--muted); }
.choice:active { transform: scale(0.99); }

.banner, .notice {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 14px;
}

.banner {
  background: var(--danger-bg);
  color: #6d2424;
  border: 1px solid #e2b2aa;
}

.notice {
  background: #f3eee6;
  border: 1px solid var(--line);
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.92rem;
}

.counter {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.optional {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.plate {
  position: sticky;
  top: 8px;
  z-index: 2;
  margin: 6px 0 4px;
  padding: 14px 12px;
  border-radius: 12px;
  background: #fffdf8;
  border: 1px solid #c8ad78;
}

.plate-inner {
  display: flex;
  flex-direction: column;
  height: 8.75rem;
}

.plate-line {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 0;
  padding: 0 10px;
  color: #1e1a16;
  text-align: center;
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.2;
  border-top: 1px solid rgba(184, 137, 61, 0.45);
  overflow: hidden;
  white-space: nowrap;
}

.plate-line:first-child { border-top: 0; }

.plate.is-partial .plate-line { border-top: 0; }

.plate.is-partial .plate-line:not(.is-empty) ~ .plate-line:not(.is-empty) {
  border-top: 1px solid rgba(184, 137, 61, 0.45);
}

.plate.is-partial .plate-line.is-empty { display: none; }

.plate-line.is-empty {
  color: transparent;
  cursor: pointer;
}

.plate-line.is-empty::before {
  content: attr(data-placeholder);
  color: rgba(30, 26, 22, 0.38);
}

.optional-long { display: none; }

.plate-caption { margin: 4px 0 14px; text-align: center; font-size: 0.9rem; }

.apartment-search { display: none; }

.apartment-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.apartment-option {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: center;
  background: #f3eee6;
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 52px;
  font: inherit;
  color: inherit;
  padding: 0 8px;
  cursor: pointer;
}

.apartment-option.is-selected {
  border-color: var(--teal);
  background: #e7f3f1;
}

.chip {
  margin: 8px 0 0;
  color: var(--teal-dark);
  font-weight: 500;
}

.apt-id {
  direction: ltr;
  unicode-bidi: isolate;
}

.photo-frame {
  margin-top: 8px;
  border-radius: 18px;
  overflow: hidden;
  background: #1e1a16;
  aspect-ratio: 1;
  max-height: 320px;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.back { margin: 14px 0 0; }
.back a, .footnote a { color: var(--teal-dark); }

.footnote {
  margin: 28px 0 0;
  font-size: 0.85rem;
}

.footnote bdi {
  unicode-bidi: isolate;
  direction: ltr;
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}

.is-enhanced .apartment-search { display: block; }
.is-enhanced label[for="apartment"] { display: none; }

.is-enhanced .native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 760px) {
  body { padding: 28px 16px 40px; }
  .shell {
    min-height: auto;
    border-radius: 32px;
    box-shadow: var(--shadow);
  }
}

@media (hover: hover) {
  .choice:hover { border-color: var(--teal); }
  .primary:hover { background: var(--teal-dark); }
}

@media (prefers-reduced-motion: reduce) {
  .primary, .choice { transition: none; }
}

.picker-label {
  margin: 14px 0 0;
  font-weight: 500;
}

.edit-apartment {
  margin-top: 8px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.field-optional input { border-style: dashed; }

.plate-dock { display: contents; }

.wizard-only { display: none; }

.wizard-kicker { margin: 0 0 14px; font-weight: 700; }

.wizard-back {
  appearance: none;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
}

.confirm-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.confirm-card p { margin: 0 0 6px; }
.confirm-card p:last-child { margin-bottom: 0; }

.weekly-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.weekly-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f3eee6;
  cursor: pointer;
  font-weight: 700;
}

.weekly-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.weekly-option:has(input:checked) {
  border-color: var(--teal);
  background: #e7f3f1;
}

.weekly-option span {
  direction: ltr;
  unicode-bidi: isolate;
}

.is-enhanced .wizard-only { display: block; }

.is-enhanced .wizard-vspace {
  display: block;
  height: 16px;
}

.is-enhanced .wizard-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.is-enhanced .wizard-actions .primary { flex: 1; margin-top: 0; }

.is-enhanced [data-step] { display: none; }
.is-enhanced [data-step].is-current { display: block; }

.is-enhanced [data-flow] [data-submit] { display: none; }
.is-enhanced [data-flow][data-wizard-step="3"] [data-submit] { display: block; }

.is-enhanced [data-flow] .plate-dock { display: none; }
.is-enhanced [data-flow][data-wizard-step="2"] .plate-dock,
.is-enhanced [data-flow][data-wizard-step="3"] .plate-dock { display: block; }
