/* ==========================================================================
   Vakantiechecker — vernieuwd designsysteem
   Deze laag staat na styles.css en geeft de app een rustiger, professioneler
   uiterlijk. De bestaande functionaliteit en klassennamen blijven intact.
   ========================================================================== */

:root {
  --primary: #0e6f8c;
  --primary-dark: #09546c;
  --primary-soft: #e8f5f9;
  --primary-line: #bfe0e8;
  --accent: #e9a23b;
  --accent-soft: #fff6e8;
  --ink: #112a3c;
  --ink-soft: #355064;
  --muted: #5f7384;
  --line: #d8e3ea;
  --line-soft: #e8eff4;
  --bg: #f2f6f8;
  --card: #ffffff;
  --green-soft: #eaf5ee;
  --green-line: #b7ddc5;
  --red-soft: #fdf0f0;
  --red-line: #f2c3c3;
  --maybe-soft: #fff8e3;
  --maybe-line: #f3d98b;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(17, 42, 60, 0.04), 0 10px 30px -24px rgba(17, 42, 60, 0.25);
  --shadow-md: 0 24px 60px -24px rgba(17, 42, 60, 0.28), 0 2px 6px rgba(17, 42, 60, 0.04);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --appbar-h: 68px;
  --tabs-h: 52px;
  color-scheme: light;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--appbar-h) + 24px);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
}

::selection {
  background: var(--primary);
  color: #ffffff;
}

:where(a) {
  color: var(--primary-dark);
}

.btn:focus-visible,
.tab:focus-visible,
.brush-btn:focus-visible,
.name-option:focus-visible,
.cal-nav:focus-visible,
.cal-day:focus-visible .cal-day-inner,
.heat-day:focus-visible,
.segmented button:focus-visible,
.vote-btn:focus-visible,
.icon-btn:focus-visible,
.menu-item:focus-visible {
  outline: 3px solid rgba(14, 111, 140, 0.5);
  outline-offset: 2px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Knoppen en formuliervelden ---------------------------------- */

.btn {
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 12px;
  border-color: var(--line);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: background 0.16s ease, border-color 0.16s ease,
    box-shadow 0.16s ease, transform 0.12s ease;
}

.btn:hover {
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 22px -16px rgba(14, 111, 140, 0.9);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: #f7fafc;
  border-color: #c6d5df;
}

.btn-sm {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.input {
  min-height: 46px;
  padding: 11px 14px;
  border-color: var(--line);
  border-radius: 12px;
  background: #fbfdfe;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input:hover {
  border-color: #c4d3dd;
}

.input:focus {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(14, 111, 140, 0.12);
}

textarea.input {
  min-height: 104px;
  resize: vertical;
}

select.input[data-country-select],
select.input[data-city-select] {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%235f7384' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

select.input[data-country-select]:disabled,
select.input[data-city-select]:disabled {
  border-color: var(--line-soft);
  background-color: #eef3f6;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}

select.input[data-country-select] option,
select.input[data-city-select] option {
  color: var(--ink);
}

.villa-form [data-new-country]:not([hidden]),
.villa-form [data-new-city]:not([hidden]) {
  border-color: var(--primary-line);
  background-color: #f7fbfc;
}

.input-sm {
  width: 68px;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 13.5px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.hint {
  font-size: 12.5px;
  line-height: 1.5;
}

code {
  background: #eef4f7;
  color: var(--ink-soft);
}

/* ---------- Scherm 1: naam kiezen ---------------------------------------- */

.screen-name {
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 56px);
  background:
    radial-gradient(1100px 600px at 8% -10%, #dceef3 0%, transparent 62%),
    radial-gradient(900px 550px at 102% 104%, #fae7d4 0%, transparent 56%),
    var(--bg);
}

.name-wrap {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 0;
  text-align: left;
  background: var(--card);
  border: 1px solid rgba(17, 42, 60, 0.08);
  border-radius: 30px;
  overflow: hidden;
  box-shadow:
    0 40px 90px -55px rgba(17, 42, 60, 0.45),
    0 2px 8px rgba(17, 42, 60, 0.04);
}

.name-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 34px;
  min-height: 680px;
  padding: clamp(32px, 4vw, 56px);
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 8%, rgba(240, 180, 92, 0.28), transparent 38%),
    linear-gradient(150deg, #0b3142 0%, #0b5268 48%, #0e7b91 100%);
}

.name-brand-panel::before {
  content: "";
  position: absolute;
  right: -190px;
  bottom: -170px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(255, 255, 255, 0.035),
    0 0 0 122px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.name-brand-panel::after {
  content: "";
  position: absolute;
  top: 34%;
  left: -100px;
  width: 280px;
  height: 280px;
  border-radius: 44%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  transform: rotate(20deg);
  pointer-events: none;
}

.name-brand-panel > * {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.brand-mark svg {
  width: 32px;
  height: 32px;
}

.brand-lockup-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.brand-tagline {
  color: rgba(255, 255, 255, 0.64);
  font-size: 11.5px;
  font-weight: 500;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 520px;
  margin-block: auto;
  text-align: left;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  max-width: 12ch;
  color: #ffffff;
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-sub {
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15.5px;
  line-height: 1.7;
}

.hero-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.hero-point-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  color: #a9dce5;
}

.hero-point-icon svg {
  width: 19px;
  height: 19px;
}

.hero-points strong {
  display: block;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-points small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.5;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.proof-avatars {
  display: flex;
}

.proof-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -8px;
  border: 2px solid #105569;
  border-radius: 50%;
  background: var(--proof-color, #2a9d8f);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.proof-avatar:first-child {
  margin-left: 0;
}

.hero-proof-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hero-proof-text strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 12.5px;
}

.hero-proof-text small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
}

.name-action-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(28px, 4vw, 52px);
  background: var(--card);
}

.name-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.name-card-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-badge {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.name-title {
  color: var(--ink);
  font-size: clamp(26px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.name-sub {
  max-width: 46ch;
  font-size: 13.5px;
  line-height: 1.6;
}

.name-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.name-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #fbfdfe;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease, transform 0.12s ease;
}

.name-option:hover {
  border-color: rgba(14, 111, 140, 0.35);
  background: #f7fbfc;
  box-shadow: 0 8px 20px -18px rgba(17, 42, 60, 0.4);
  transform: translateY(-1px);
}

.name-option.is-me {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.name-option .avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
  box-shadow: 0 0 0 3px rgba(17, 42, 60, 0.04);
}

.name-option-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-option-tag {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-option-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.name-option.is-me .name-option-check {
  opacity: 1;
  transform: scale(1);
}

/* De check neemt alleen ruimte in als hij ook echt zichtbaar is; zo houdt de
   statusregel op smalle schermen meer ruimte over. */
.name-option:not(.is-me) .name-option-check {
  display: none;
}

.name-card .hint {
  margin-top: 0;
}

.name-back {
  align-self: flex-start;
  min-height: 42px;
  margin-top: 2px;
}

.name-note {
  max-width: 48ch;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
}

/* ---------- Appbalk ------------------------------------------------------ */

.appbar {
  z-index: 60;
  min-height: 68px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.appbar-left {
  min-width: 0;
  gap: 12px;
}

.appbar-right {
  flex: none;
  gap: 4px;
}

.logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  background: linear-gradient(145deg, #0d7897, #0a5168);
  color: #ffffff;
  font-size: 0;
  box-shadow: 0 8px 18px -10px rgba(14, 111, 140, 0.8);
}

.logo svg {
  width: 29px;
  height: 29px;
}

.appbar-title {
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.appbar-sub {
  font-size: 11.5px;
  color: var(--muted);
}

.appbar .btn {
  min-height: 42px;
  padding: 9px 12px;
  border-color: transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-soft);
}

.appbar .btn:hover {
  border-color: transparent;
  background: #f1f6f8;
  box-shadow: none;
}

.appbar .btn-sm {
  font-size: 13px;
  font-weight: 600;
}

#btn-account {
  padding: 5px 9px 5px 5px;
  border-color: var(--line-soft);
  background: #f7fafb;
}

#btn-account:hover {
  background: #eff5f8;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 10.5px;
}

.icon-chevron {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.badge-demo {
  border: 1px solid #f1dca4;
  background: var(--accent-soft);
  color: #8a5b08;
}

/* ---------- Fasebalk ----------------------------------------------------- */

.phase-bar {
  flex-wrap: nowrap;
  gap: 16px;
  padding: 9px 24px;
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid var(--line-soft);
}

.phase-steps {
  flex-wrap: nowrap;
  gap: 0;
  min-width: 0;
}

.phase-step {
  gap: 7px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.phase-step:hover:not(.is-current):not(:disabled) {
  border-color: transparent;
  background: #eef5f7;
  color: var(--ink);
}

.phase-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #edf3f6;
  color: var(--muted);
  font-size: 10.5px;
}

.phase-step.is-done {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.phase-step.is-done .phase-step-num {
  background: var(--green);
  color: #ffffff;
}

.phase-step.is-current {
  padding-left: 7px;
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
}

.phase-step.is-current .phase-step-num {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.phase-step.is-locked {
  opacity: 0.42;
}

.phase-arrow {
  margin: 0 2px;
  color: #c1cfd8;
  font-size: 10px;
}

.phase-now {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.phase-side {
  gap: 8px;
  margin-left: auto;
}

.phase-admin-btn {
  border-color: var(--line-soft);
  background: var(--card);
}

.phase-dialog-status {
  border: 1px solid var(--line-soft);
  background: #f8fbfc;
  font-size: 12.5px;
}

.phase-dialog-badge {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* ---------- Deelnemersstrook -------------------------------------------- */

.group-strip {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 12px;
  min-height: 52px;
  padding: 9px 24px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: var(--card);
  color: var(--muted);
  font-size: 12.5px;
}

.group-avatars {
  flex: none;
}

.group-avatars .avatar {
  width: 30px;
  height: 30px;
  margin-left: -7px;
  border: 2px solid var(--card);
  font-size: 9.5px;
}

.group-avatars .avatar:first-child {
  margin-left: 0;
}

.group-more {
  width: 30px;
  height: 30px;
  margin-left: -7px;
  font-size: 10px;
}

.group-text {
  min-width: 0;
  overflow: hidden;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Tabbladen ---------------------------------------------------- */

.tabs {
  z-index: 45;
  justify-content: center;
  gap: 5px;
  padding: 9px 24px;
  background: rgba(242, 246, 248, 0.9);
  border-bottom: 1px solid rgba(216, 227, 234, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}

.tab.is-active {
  border-color: var(--line-soft);
  background: var(--card);
  color: var(--primary-dark);
  box-shadow: 0 8px 24px -20px rgba(17, 42, 60, 0.4), 0 1px 2px rgba(17, 42, 60, 0.04);
}

.tab-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
}

.tab-icon svg {
  width: 100%;
  height: 100%;
}

.tab-dot {
  top: 6px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--card);
}

/* ---------- Inhoud en kaarten ------------------------------------------- */

.content {
  max-width: 1120px;
  gap: 22px;
  padding: 28px 24px 56px;
}

.view {
  gap: 22px;
}

.card {
  padding: 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

/* De kalender leest prettiger op een rustige, gecentreerde breedte. Het
   overzicht en de villa's gebruiken de volledige inhoudsbreedte. */
#view-calendar > .card,
#view-calendar > .hint-card {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
}

#calendar,
#view-calendar .cal-footer,
#view-calendar .cal-toolbar {
  max-width: 760px;
  margin-inline: auto;
}

.card-head {
  gap: 16px;
  margin-bottom: 18px;
}

.card-title {
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.card-sub {
  max-width: 74ch;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.card-tools {
  gap: 10px;
}

.period-note {
  margin-top: 10px;
  padding: 5px 11px;
  border-color: var(--primary-line);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11.5px;
  font-weight: 700;
}

.hint-card {
  border-color: #d8e9ef;
  background: #f7fbfd;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
}

.notice {
  padding: 14px 16px;
  border: 1px solid var(--maybe-line);
  border-radius: 12px;
  background: var(--maybe-soft);
  color: var(--maybe-ink);
  font-size: 13px;
  line-height: 1.55;
}

.banner {
  gap: 14px;
  padding: 16px 18px;
  border-color: var(--green-line);
  border-radius: 16px;
  background: var(--green-soft);
}

.banner-emoji {
  font-size: 20px;
}

.banner-title {
  font-size: 14.5px;
  font-weight: 700;
}

.banner-text {
  font-size: 12.5px;
  line-height: 1.55;
}

/* ---------- Kalender ----------------------------------------------------- */

.brush {
  width: fit-content;
  gap: 4px;
  margin: 6px 0 18px;
  padding: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #f2f7f9;
}

.brush-btn {
  gap: 7px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
}

.brush-btn:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.7);
}

.brush-btn.is-active {
  border-color: var(--line-soft);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 4px 14px -10px rgba(17, 42, 60, 0.45);
}

.brush-btn[data-brush="yes"].is-active {
  border-color: var(--green-line);
  background: var(--green-soft);
  color: var(--green);
}

.brush-btn[data-brush="maybe"].is-active {
  border-color: var(--maybe-line);
  background: var(--maybe-soft);
  color: var(--maybe-ink);
}

.brush-btn[data-brush="no"].is-active {
  border-color: var(--red-line);
  background: var(--red-soft);
  color: var(--red-ink);
}

.brush-btn[data-brush="clear"].is-active {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink);
}

/* De tests en de betekenis van de kleuren blijven ongewijzigd. */
.brush-btn[data-brush="clear"] .brush-dot {
  border-color: #717171;
}

.cal-steps {
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #f7fafc;
}

.cal-steps-row {
  gap: 6px;
}

.cal-step {
  gap: 6px;
  padding: 5px 11px 5px 7px;
  border-color: var(--line-soft);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cal-step-num {
  width: 18px;
  height: 18px;
  font-size: 9.5px;
}

.cal-step.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 16px -12px rgba(14, 111, 140, 0.9);
}

.cal-step.is-active .cal-step-num {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.cal-step.is-done {
  border-color: var(--green-line);
  background: var(--green-soft);
  color: var(--green);
}

.cal-step-cancel {
  width: 30px;
  height: 30px;
  border-color: var(--line);
  color: var(--ink-soft);
}

.cal-step-cancel:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.cal-step-hint {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.cal-head {
  margin-bottom: 12px;
}

.cal-title {
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cal-nav {
  width: 40px;
  height: 40px;
  border-color: var(--line-soft);
  border-radius: 12px;
  background: #f7fafc;
  color: var(--ink-soft);
  font-size: 22px;
}

.cal-nav:hover:not(:disabled) {
  border-color: var(--primary-line);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.cal-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cal-day-inner {
  width: 40px;
  height: 40px;
  margin: 4px auto;
  font-size: 14.5px;
  font-weight: 600;
}

.cal-day::before {
  top: 5px;
  bottom: 5px;
}

.cal-day:hover:not(.is-disabled) .cal-day-inner {
  background: #eef5f8;
}

.cal-day.is-today .cal-day-inner {
  box-shadow: inset 0 0 0 1.5px #b8c9d3;
}

.cal-day.is-disabled {
  color: #b3c0c9;
}

.cal-day.is-disabled::after {
  background: #dde6ec;
}

.cal-day.is-outside {
  opacity: 0.28;
}

.cal-day.is-start .cal-day-inner {
  outline-color: var(--primary);
  animation: none;
}

.cal-day.is-preview-end .cal-day-inner {
  outline-color: var(--primary);
}

.cal-periods {
  margin-top: 18px;
}

.cal-empty {
  font-size: 12.5px;
}

.period-head {
  font-size: 12.5px;
}

.period-chip {
  gap: 8px;
  min-height: 38px;
  padding: 7px 7px 7px 12px;
  border-color: var(--line-soft);
  border-radius: 11px;
  background: #f7fafc;
  font-size: 12.5px;
}

.period-chip-remove {
  width: 24px;
  height: 24px;
  background: #e8eff4;
  font-size: 14px;
}

.cal-footer {
  margin-top: 18px;
}

.cal-toolbar {
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top-color: var(--line-soft);
}

.cal-toolbar .btn {
  min-height: 38px;
  font-size: 12.5px;
}

.save-status {
  font-size: 12.5px;
}

/* ---------- Overzicht ---------------------------------------------------- */

.stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.stat {
  position: relative;
  justify-content: flex-end;
  min-height: 112px;
  padding: 16px;
  overflow: hidden;
  border-color: var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
  box-shadow: var(--shadow-sm);
}

.stat::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -54px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: var(--primary-soft);
  opacity: 0.75;
  pointer-events: none;
}

.stat:nth-child(2)::after {
  background: var(--green-soft);
}

.stat:nth-child(3)::after {
  background: var(--maybe-soft);
}

.stat:nth-child(4)::after {
  background: var(--primary-soft);
}

.stat-num {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.stat-label {
  position: relative;
  z-index: 1;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
}

.stat-sub {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 11.5px;
}

.inline-field {
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
}

.partial-tools {
  gap: 10px;
}

.segmented {
  border-color: var(--line);
  background: #f7fafc;
}

.segmented button {
  min-height: 34px;
  font-size: 12.5px;
}

.segmented button.is-active {
  background: var(--ink);
}

.window {
  gap: 13px;
  padding: 16px;
  border-color: var(--line-soft);
  border-radius: 16px;
  background: #fbfdfe;
}

.window.is-best {
  border-color: var(--green-line);
  background: linear-gradient(135deg, #eff9f3, #fbfdfc);
  box-shadow: 0 16px 34px -32px rgba(31, 111, 74, 0.6);
}

.window-rank {
  width: 32px;
  height: 32px;
  border-color: var(--line-soft);
  background: var(--card);
  color: var(--muted);
  font-size: 12.5px;
}

.window.is-best .window-rank {
  border-color: var(--green);
  background: var(--green);
}

.window-body {
  gap: 7px;
}

.window-dates {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.window-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.window-badge {
  padding: 4px 10px;
  border-color: var(--line-soft);
  background: var(--card);
  font-size: 11px;
  font-weight: 800;
}

.window-people {
  gap: 7px;
  margin-top: 3px;
}

.people-line {
  gap: 7px;
}

.people-label {
  min-width: 112px;
  color: var(--green);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chips {
  gap: 5px;
}

.chip {
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-color: var(--line-soft);
  background: var(--card);
  font-size: 12px;
}

.chip-dot {
  width: 7px;
  height: 7px;
}

.window-legend {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.55;
}

.window-more {
  margin-top: 14px;
}

.window-more .btn {
  min-height: 36px;
}

.window-actions .btn {
  min-height: 36px;
}

.range-tools {
  gap: 10px;
}

.input-date {
  min-width: 160px;
}

.range-head {
  margin-top: 4px;
}

.range-title {
  font-size: 14.5px;
  font-weight: 700;
}

.range-count {
  padding: 4px 10px;
  border-color: var(--line-soft);
  background: #f7fafc;
  font-size: 11px;
  font-weight: 800;
}

.range-meta {
  margin: 4px 2px 12px;
  font-size: 11.5px;
}

.range-cols {
  gap: 10px;
}

.range-list {
  gap: 7px;
}

.dd-head {
  margin-bottom: 12px;
}

.dd-title {
  font-size: 14.5px;
  font-weight: 700;
}

.dd-count {
  padding: 4px 10px;
  background: #f7fafc;
  font-size: 11px;
  font-weight: 800;
}

.dd-col {
  padding: 14px;
  border-color: var(--line-soft);
  border-radius: 14px;
  background: #f8fbfc;
}

.dd-col-title {
  margin-bottom: 9px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.heat-grid {
  gap: 5px;
}

.heat-day {
  border-color: var(--line-soft);
  border-radius: 10px;
  background: #f8fbfc;
}

.heat-day.has-data {
  border-color: transparent;
}

.heat-num {
  font-weight: 600;
  opacity: 0.65;
}

.heat-count {
  font-size: 14px;
  font-weight: 800;
}

.heat-day.is-today {
  border-color: var(--primary);
}

.heat-legend {
  margin-top: 14px;
  font-size: 11.5px;
}

.daytable {
  max-height: 620px;
}

.dayrow {
  padding: 12px 2px;
  border-bottom-color: var(--line-soft);
}

.dayrow-date {
  font-size: 13px;
  font-weight: 700;
}

.bar-track {
  height: 7px;
  background: #e9f0f3;
}

.dayrow-count {
  font-size: 12.5px;
}

.dayrow-people {
  gap: 6px;
  margin-top: 9px;
}

.mini-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.person {
  gap: 12px;
  padding: 12px 0;
  border-bottom-color: var(--line-soft);
}

.person-name {
  font-size: 13.5px;
  font-weight: 700;
}

.person-dates {
  font-size: 11.5px;
}

.person-count {
  font-size: 12.5px;
}

.you-badge {
  background: var(--primary);
}

.maybe-badge,
.no-badge,
.part-badge {
  font-size: 9.5px;
}

.empty {
  gap: 10px;
  padding: 42px 24px;
  border-color: var(--line);
  background: #fbfdfe;
}

.empty-emoji {
  font-size: 32px;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
}

/* ---------- Villa's ------------------------------------------------------ */

#villas-root,
#ranking-root {
  gap: 18px;
}

.villa-intro .notice {
  margin-top: 4px;
}

.villa-summary {
  margin-top: 14px;
  padding-top: 14px;
  border-top-color: var(--line-soft);
  font-size: 12.5px;
}

.villa-guest-setting {
  margin-top: 14px;
  padding-top: 14px;
  border-top-color: var(--line-soft);
}

.villa-admin-tools {
  margin-top: 14px;
  padding-top: 14px;
  border-top-color: var(--line);
}

.villa-map-card {
  padding-bottom: 20px;
}

.villa-map {
  height: 380px;
  border-color: var(--line-soft);
  border-radius: 14px;
}

.villa-map-style {
  border-color: var(--line-soft);
  background: #f2f7f9;
}

.villa-map-style-btn {
  min-height: 32px;
  font-size: 11.5px;
}

.villa-country {
  gap: 18px;
}

.villa-country + .villa-country {
  margin-top: 12px;
  padding-top: 24px;
  border-top-color: var(--line);
}

.villa-country-head {
  padding: 14px 18px;
  border-color: var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(90deg, #ffffff, #f8fbfc);
}

.villa-country-name {
  font-size: 21px;
  font-weight: 800;
}

.villa-group-head {
  top: calc(var(--appbar-h, 68px) + var(--tabs-h, 52px));
  padding: 10px 14px;
  border-color: rgba(216, 227, 234, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px -26px rgba(17, 42, 60, 0.5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.villa-group-country {
  color: var(--primary-dark);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.villa-city {
  font-size: 17px;
  font-weight: 800;
}

.villa-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.villa-card {
  border-color: var(--line-soft);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(17, 42, 60, 0.04), 0 18px 44px -38px rgba(17, 42, 60, 0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.villa-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(17, 42, 60, 0.04), 0 24px 50px -34px rgba(17, 42, 60, 0.35);
}

.villa-photo {
  background: linear-gradient(135deg, #e8f2f5, #eef4f7);
}

.villa-photo-frame {
  background: linear-gradient(135deg, #e8f2f5, #eef4f7);
}

.villa-photo-nav {
  width: 38px;
  height: 38px;
  background: rgba(17, 42, 60, 0.6);
  backdrop-filter: blur(8px);
}

.villa-photo-count {
  padding: 5px 9px;
  background: rgba(17, 42, 60, 0.68);
  font-size: 10.5px;
  backdrop-filter: blur(8px);
}

.villa-price {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(17, 42, 60, 0.88);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.villa-body {
  gap: 10px;
  padding: 16px;
}

.villa-location {
  border-color: var(--line-soft);
  background: #f7fafc;
  letter-spacing: 0.05em;
}

.villa-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.villa-author {
  font-size: 11.5px;
}

.villa-desc {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.villa-link {
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11.5px;
}

.villa-link:hover {
  background: #ddf0f5;
}

.villa-distance {
  font-size: 11.5px;
}

.villa-cost-preview {
  padding: 10px 12px;
  border-color: var(--line-soft);
  border-radius: 12px;
  background: #f8fbfc;
}

.villa-cost-rate {
  color: var(--green);
  font-size: 16px;
}

.villa-cost-meta {
  font-size: 10.5px;
}

.vote-group {
  background: #eef4f7;
}

.vote-btn {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12.5px;
}

.villa-actions {
  gap: 8px;
}

.villa-comments {
  border-top-color: var(--line);
}

.villa-comment-body {
  background: #f7fafc;
}

.villa-comments-list {
  gap: 11px;
}

/* ---------- Top 3 en ranking -------------------------------------------- */

.ranking-layout {
  gap: 18px;
}

.ranking-legend {
  margin-top: 12px;
  padding-top: 12px;
  border-top-color: var(--line-soft);
}

.ranking-legend-item {
  padding: 6px 10px;
  border-color: var(--line-soft);
  background: #f7fafc;
  font-size: 11.5px;
}

.ranking-card-title {
  font-size: 17px;
  font-weight: 800;
}

.rank-slot {
  padding: 11px;
  border-color: var(--line-soft);
  border-radius: 13px;
  background: #f8fbfc;
}

.rank-slot.has-villa {
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.rank-picker {
  border-color: var(--line-soft);
  border-radius: 13px;
  background: #f8fbfc;
}

.rank-choice {
  border-color: var(--line-soft);
  border-radius: 11px;
}

.rank-choice.is-picked {
  border-color: var(--primary-line);
  background: var(--primary-soft);
}

.rank-slot-1 .rank-slot-badge {
  border-color: #f1d27a;
  background: #fff2c6;
  color: #8a5a00;
}

.ranking-winner {
  padding: 14px 16px;
  border-color: #f0d58a;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7db, #fffdf4);
}

.rank-row {
  padding: 13px;
  border-color: var(--line-soft);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.rank-row.is-podium {
  background: linear-gradient(90deg, rgba(255, 247, 219, 0.7), var(--card) 62%);
}

.rank-title {
  font-size: 14.5px;
  font-weight: 700;
}

.rank-points {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.rank-voters {
  gap: 5px;
}

.rank-voter {
  border-color: var(--line-soft);
  background: #f7fafc;
  font-size: 10.5px;
}

/* ---------- Menu, dialoog en toast -------------------------------------- */

.menu {
  top: calc(var(--appbar-h, 68px) + 8px);
  padding: 8px;
  border-color: var(--line-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.menu-head {
  padding: 9px 9px 13px;
  border-bottom-color: var(--line-soft);
}

.menu-item {
  min-height: 42px;
  border-radius: 10px;
  font-size: 13.5px;
}

.menu-item:hover {
  background: #f4f8fa;
}

.menu-info {
  border-radius: 10px;
  background: #f8fbfc;
}

.dialog {
  width: min(460px, calc(100vw - 28px));
  border: 1px solid rgba(17, 42, 60, 0.08);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.dialog::backdrop {
  background: rgba(9, 32, 46, 0.5);
  backdrop-filter: blur(4px);
}

.dialog-form {
  gap: 13px;
  padding: 24px;
}

.dialog-title {
  font-size: 17px;
  font-weight: 800;
}

.dialog-actions {
  gap: 8px;
  margin-top: 8px;
}

.villa-form {
  gap: 14px;
  padding: 24px;
}

.villa-dialog {
  width: min(580px, calc(100vw - 28px));
}

.villa-cost-dialog {
  width: min(760px, calc(100vw - 28px));
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-color: var(--line-soft);
  color: var(--ink-soft);
}

.icon-btn:hover {
  background: #f2f7f9;
}

.form-grid {
  gap: 12px;
}

.villa-cost-summary {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8fbfc;
}

.villa-cost-rows {
  gap: 4px;
}

.villa-cost-row {
  padding: 8px 6px;
  border-bottom-color: var(--line-soft);
}

.villa-cost-note {
  border-color: var(--green-line);
  background: var(--green-soft);
}

.toast-wrap {
  bottom: 24px;
}

.toast {
  max-width: min(440px, calc(100vw - 28px));
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 18px 40px -20px rgba(17, 42, 60, 0.7);
}

/* ---------- Responsief: kleinere laptops en tablets --------------------- */

@media (max-width: 900px) {
  .name-wrap {
    max-width: 680px;
    grid-template-columns: minmax(0, 1fr);
  }

  .name-brand-panel,
  .name-action-panel {
    min-width: 0;
  }

  .name-brand-panel {
    min-height: auto;
    gap: 26px;
    padding: 36px 32px;
  }

  .hero {
    margin: 0;
  }

  .hero-title {
    max-width: 16ch;
  }

  .name-action-panel {
    padding: 30px 32px 34px;
  }

  .ranking-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Responsief: telefoon en compacte tablet --------------------- */

@media (max-width: 760px) {
  .screen-app {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  /* Op de kalender is de kalender zelf het belangrijkste. De groepsstrook
     staat op de andere tabbladen; zo houd je op een telefoon meer dagen in
     beeld. */
  .screen-app:has(#tab-calendar.is-active) .group-strip {
    display: none;
  }

  .appbar {
    min-height: 60px;
    padding: 8px 12px;
    gap: 8px;
  }

  .appbar-left {
    flex: 1;
    min-width: 0;
    gap: 10px;
  }

  .logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .logo svg {
    width: 26px;
    height: 26px;
  }

  .appbar-titles {
    min-width: 0;
  }

  .appbar-title {
    max-width: 100%;
    font-size: 15px;
  }

  .appbar-sub {
    display: none;
  }

  .appbar-right {
    gap: 2px;
  }

  .appbar .btn {
    width: 44px;
    min-height: 44px;
    padding: 0;
  }

  .appbar .btn-text,
  .appbar .icon-chevron {
    display: none;
  }

  #btn-account {
    width: 44px;
    min-height: 44px;
    padding: 0;
    border-color: transparent;
    border-radius: 50%;
    background: transparent;
  }

  #btn-account .avatar-sm {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .badge-demo {
    display: none;
  }

  .phase-bar {
    gap: 8px;
    padding: 7px 12px;
    overflow: hidden;
  }

  .phase-steps {
    flex: 1;
    overflow-x: auto;
    padding: 1px;
    scrollbar-width: none;
  }

  .phase-steps::-webkit-scrollbar {
    display: none;
  }

  .phase-step {
    flex: none;
    gap: 6px;
    padding: 5px 8px;
    font-size: 11.5px;
  }

  .phase-step.is-current {
    padding-left: 6px;
  }

  .phase-step-num {
    width: 20px;
    height: 20px;
    font-size: 9.5px;
  }

  .phase-arrow {
    font-size: 9px;
  }

  .phase-now {
    display: none;
  }

  .phase-admin-btn {
    width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .phase-admin-btn .btn-text {
    display: none;
  }

  .group-strip {
    flex-wrap: wrap;
    gap: 6px 10px;
    min-height: 0;
    padding: 8px 12px;
  }

  .group-avatars .avatar {
    width: 26px;
    height: 26px;
    font-size: 8.5px;
  }

  .group-more {
    width: 26px;
    height: 26px;
    font-size: 9px;
  }

  .group-text {
    flex: 1 1 100%;
    overflow: visible;
    white-space: normal;
    font-size: 11px;
    line-height: 1.4;
  }

  /* De tabbladen worden op de telefoon een rustige bottomnavigation. */
  .tabs {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 80;
    display: flex;
    justify-content: stretch;
    gap: 4px;
    padding: 6px;
    overflow: visible;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
      0 24px 60px -24px rgba(17, 42, 60, 0.38),
      0 2px 10px rgba(17, 42, 60, 0.05);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
  }

  .tab {
    flex: 1 1 0;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 8px 4px;
    border: 0;
    border-radius: 14px;
    font-size: 10.5px;
    font-weight: 600;
  }

  .tab:hover {
    background: #f5f9fa;
  }

  .tab.is-active {
    border: 0;
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: none;
  }

  .tab-icon {
    width: 20px;
    height: 20px;
  }

  .tab-dot {
    top: 4px;
    right: calc(50% - 17px);
    width: 7px;
    height: 7px;
    border: 2px solid var(--card);
    box-shadow: none;
  }

  .villa-group-head {
    top: var(--appbar-h, 60px);
  }

  .menu {
    right: 10px;
    width: min(320px, calc(100vw - 20px));
  }

  .toast-wrap {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }

  .dialog {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }

  .villa-dialog,
  .villa-cost-dialog {
    width: 100%;
    max-height: 94dvh;
  }

  .dialog-form,
  .villa-form {
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  }

  .dialog-actions {
    flex-wrap: wrap;
  }

  .dialog-actions .btn {
    flex: 1 1 auto;
  }
}

/* ---------- Responsief: telefoon ---------------------------------------- */

@media (max-width: 700px) {
  .screen-name {
    display: block;
    padding: 0;
    background: var(--bg);
  }

  .name-wrap {
    max-width: none;
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    background: transparent;
  }

  .name-brand-panel {
    min-width: 0;
    gap: 22px;
    padding: 24px 20px 32px;
    border-radius: 0 0 26px 26px;
  }

  .name-brand-panel::before {
    right: -230px;
    bottom: -260px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .brand-mark svg {
    width: 29px;
    height: 29px;
  }

  .brand-name {
    font-size: 15px;
  }

  .brand-tagline {
    font-size: 11px;
  }

  .hero {
    gap: 11px;
  }

  .eyebrow {
    padding: 6px 10px;
    font-size: 9.5px;
  }

  .hero-title {
    max-width: 15ch;
    font-size: clamp(32px, 9vw, 40px);
    line-height: 1.05;
  }

  .hero-sub {
    max-width: 44ch;
    font-size: 13.5px;
    line-height: 1.6;
  }

  .hero-points,
  .hero-proof {
    display: none;
  }

  .name-action-panel {
    position: relative;
    z-index: 2;
    gap: 14px;
    margin-top: -18px;
    padding: 0 12px calc(32px + env(safe-area-inset-bottom));
    background: transparent;
  }

  .name-card {
    gap: 16px;
    padding: 20px 16px;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: var(--card);
    box-shadow: var(--shadow-md);
  }

  .name-title {
    font-size: 25px;
  }

  .name-sub {
    font-size: 13px;
  }

  .name-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .name-option {
    min-width: 0;
    min-height: 56px;
    gap: 8px;
    padding: 8px;
  }

  .name-option .avatar {
    width: 32px;
    height: 32px;
    font-size: 10px;
  }

  .name-option-name {
    font-size: 13px;
  }

  .name-option-tag {
    display: -webkit-box;
    overflow: hidden;
    font-size: 9.5px;
    line-height: 1.3;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .name-option-check {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .name-back {
    align-self: stretch;
  }

  .name-note {
    max-width: none;
    padding: 0 10px;
    text-align: center;
  }

  .content {
    max-width: none;
    gap: 14px;
    padding: 14px 12px 24px;
  }

  .view {
    gap: 14px;
  }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .card-head {
    gap: 10px;
    margin-bottom: 14px;
  }

  .card-title {
    font-size: 18px;
  }

  .card-sub {
    font-size: 12.8px;
    line-height: 1.55;
  }

  /* Op de telefoon leggen de kwastjes en de stappenbalk al uit wat je moet
     doen. Zo blijft de kalender zelf meteen in beeld. */
  #view-calendar .card-sub {
    display: none;
  }

  #view-calendar .card-head {
    margin-bottom: 12px;
  }

  .brush {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
    padding: 5px;
    border-radius: 16px;
  }

  .brush-btn {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 58px;
    padding: 7px 4px;
    border-radius: 11px;
    font-size: 10.5px;
    line-height: 1.2;
    text-align: center;
  }

  .brush-dot {
    width: 13px;
    height: 13px;
  }

  .cal-steps {
    padding: 10px;
  }

  .cal-step {
    font-size: 11.5px;
  }

  .cal-step-hint {
    font-size: 11.5px;
  }

  .cal-title {
    font-size: 17px;
  }

  .cal-nav {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 21px;
  }

  .cal-weekdays {
    font-size: 10px;
  }

  .cal-day-inner {
    width: 38px;
    height: 38px;
    margin: 4px auto;
    font-size: 14px;
  }

  .cal-toolbar .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }

  .period-chip {
    min-height: 42px;
  }

  .period-chip-remove {
    width: 32px;
    height: 32px;
  }

  .save-status {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat {
    min-height: 102px;
    padding: 14px;
    border-radius: 14px;
  }

  .stat-num {
    font-size: 25px;
  }

  .stat-label {
    font-size: 11.5px;
  }

  .stat-sub {
    font-size: 10.5px;
  }

  .partial-tools {
    gap: 8px;
    font-size: 12px;
  }

  .partial-tools select.input-sm {
    min-width: 120px;
  }

  .window {
    padding: 13px;
    border-radius: 14px;
  }

  .window-top {
    align-items: flex-start;
  }

  .window-dates {
    font-size: 14px;
  }

  .people-label {
    min-width: 100%;
    font-size: 10px;
  }

  .people-line {
    gap: 5px;
  }

  .dd-cols {
    gap: 8px;
  }

  .dd-col {
    padding: 12px;
  }

  .heat-day {
    border-radius: 9px;
  }

  .dayrow-date {
    font-size: 12.5px;
  }

  .dayrow-count {
    font-size: 12px;
  }

  .empty {
    padding: 34px 18px;
  }

  .villa-country-head {
    padding: 12px 14px;
  }

  .villa-country-name {
    font-size: 19px;
  }

  .villa-group-head {
    padding: 9px 12px;
  }

  .villa-grid {
    grid-template-columns: 1fr;
  }

  .villa-map {
    height: 280px;
  }

  .villa-body {
    padding: 14px;
  }

  .villa-photo-frame {
    aspect-ratio: 16 / 10;
  }

  .villa-cost-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .villa-cost-breakdown {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .villa-cost-person-total {
    grid-column: 2;
    grid-row: 1;
  }

  .rank-row {
    padding: 11px;
  }

  .ranking-winner {
    padding: 13px;
  }

  .toast {
    font-size: 12.5px;
  }

  .heat-legend {
    gap: 6px;
  }
}

/* ---------- Responsief: heel smal --------------------------------------- */

@media (max-width: 520px) {
  .name-list {
    gap: 7px;
  }

  .step-badge {
    font-size: 9.5px;
  }

  .name-title {
    font-size: 23px;
  }

  .name-card {
    padding: 18px 14px;
  }

  .cal-step-text {
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-num {
    font-size: 23px;
  }

  .ranking-layout {
    gap: 14px;
  }

  .rank-slot-points {
    display: none;
  }

  .villa-map {
    height: 260px;
  }

  .dialog-form,
  .villa-form {
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 370px) {
  .name-list {
    grid-template-columns: 1fr;
  }

  .appbar-title {
    font-size: 14px;
  }

  .tab {
    font-size: 10px;
  }

  .hero-title {
    font-size: 30px;
  }
}

@media (pointer: coarse) {
  .cal-day,
  .tab,
  .brush-btn,
  .btn,
  .name-option,
  .vote-btn {
    -webkit-tap-highlight-color: transparent;
  }
}
