:root {
  --ink: #123747;
  --ink-soft: #365765;
  --sand: #f6f1e8;
  --paper: #fffdf9;
  --line: #ded8cd;
  --orange: #ec7049;
  --orange-dark: #d95a34;
  --green: #168464;
  --green-soft: #dff3e9;
  --gray-soft: #eeece7;
  --amber: #b7791f;
  --shadow: 0 20px 50px rgba(30, 49, 56, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--sand);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
}

html[dir="rtl"] {
  font-family: "Noto Sans Arabic", system-ui, sans-serif;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 3%, rgba(236, 112, 73, 0.12), transparent 26rem),
    var(--sand);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: contain;
}

.beta-badge {
  padding: 4px 7px;
  border: 1px solid rgba(202, 139, 24, 0.28);
  border-radius: 999px;
  color: #9a6810;
  background: #fff6d9;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.language-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(18, 55, 71, 0.16);
  border-radius: 12px;
  color: var(--ink-soft);
  background: rgba(255, 253, 249, 0.62);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.utility-button,
.install-button {
  color: var(--ink);
  font-weight: 700;
}

.install-button {
  color: var(--green);
  border-color: rgba(22, 132, 100, 0.28);
  background: rgba(225, 245, 238, 0.72);
}

.language-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.booking-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.booking-link:hover {
  background: #082b3a;
  transform: translateY(-1px);
}

.booking-link.compact {
  min-height: 40px;
  padding-inline: 16px;
  border: 1px solid rgba(18, 55, 71, 0.16);
  background: rgba(255, 253, 249, 0.72);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.7fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: 28px 0 34px;
}

.hero-copy {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[dir="rtl"] .eyebrow {
  letter-spacing: 0;
  text-transform: none;
}

h1,
h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.035em;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2 {
  font-family: "Noto Kufi Arabic", sans-serif;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2.1rem, 4.1vw, 3.8rem);
  line-height: 1.1;
}

.hero-text {
  max-width: 580px;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 1.45vw, 1.08rem);
  line-height: 1.6;
}

.notification-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 13px;
  padding: 17px;
  border: 1px solid rgba(18, 55, 71, 0.12);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.82);
  box-shadow: 0 16px 36px rgba(44, 60, 65, 0.07);
  backdrop-filter: blur(10px);
}

.notification-card.enabled {
  border-color: rgba(22, 132, 100, 0.3);
  background: var(--green-soft);
}

.bell {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  color: var(--orange);
  background: rgba(236, 112, 73, 0.12);
  font-size: 0.8rem;
  box-shadow: inset 0 0 0 8px rgba(236, 112, 73, 0.06);
}

.notification-title {
  margin: 0 0 7px;
  font-weight: 700;
}

.notification-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.notification-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.primary-button,
.text-button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  min-height: 40px;
  padding: 0 17px;
  border-radius: 12px;
  color: white;
  background: var(--orange);
  font-size: 0.86rem;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--orange-dark);
}

.text-button {
  padding: 8px 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
}

.text-button:hover {
  color: var(--ink);
}

.calendar-panel {
  overflow: hidden;
  border: 1px solid rgba(18, 55, 71, 0.12);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.calendar-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--line);
}

.quick-stats {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  padding: 15px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 55, 71, 0.025);
}

.quick-stat {
  display: grid;
  gap: 3px;
  padding-inline: 20px;
}

.quick-stat:first-child {
  padding-inline-start: 0;
}

.quick-stat:last-child {
  padding-inline-end: 0;
}

.quick-stat + .quick-stat {
  border-inline-start: 1px solid var(--line);
}

.quick-stat span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.quick-stat strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
}

.quick-stats[aria-busy="true"] {
  opacity: 0.62;
}

.month-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.month-controls h2 {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  min-width: 205px;
  margin: 0;
  text-align: center;
  font-size: 1.75rem;
}

.month-code {
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--muted);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: transparent;
  font-size: 1.05rem;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--ink);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.last-checked {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 8px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.available {
  background: var(--green);
}

.legend-dot.closed {
  background: #b4b1aa;
}

.legend-dot.unknown {
  background: var(--amber);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.weekdays {
  padding: 16px 22px 10px;
  color: #7b898f;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.dates {
  gap: 7px;
  padding: 4px 22px 24px;
}

.date-cell {
  position: relative;
  min-height: 92px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--ink);
  background: #f7f5f0;
  text-align: start;
  transition: border 150ms ease, transform 150ms ease, background 150ms ease;
}

button.date-cell {
  cursor: pointer;
}

button.date-cell:hover {
  transform: translateY(-2px);
}

.date-cell.empty {
  background: transparent;
}

.date-cell.past {
  color: #aaa69f;
  background: transparent;
}

.date-cell.today {
  border-color: var(--coral);
  box-shadow: inset 0 0 0 1px rgba(242, 105, 66, 0.12);
}

.today-badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-size: 0.57rem;
  font-weight: 800;
}

.date-cell.available {
  border-color: rgba(22, 132, 100, 0.28);
  background: var(--green-soft);
}

.date-cell.available:hover,
.date-cell.available:focus-visible {
  border-color: var(--green);
}

.date-cell.unknown {
  background: #fff7df;
}

.date-number {
  font-weight: 700;
}

.date-status {
  position: absolute;
  right: 11px;
  bottom: 11px;
  left: 11px;
  color: #817d75;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
}

.date-status.seat-status {
  display: block;
}

.date-status.seat-status strong {
  font-size: 0.82rem;
}

.date-cell.available .date-status {
  color: var(--green);
}

.date-cell.unknown .date-status {
  color: var(--amber);
}

.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 30px;
  border-top: 1px solid var(--line);
  color: #718187;
  font-size: 0.78rem;
}

.refresh-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.refresh-status-separator {
  color: rgba(113, 129, 135, 0.7);
}

.refresh-icon.spinning {
  animation: rotate 900ms linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.refresh-button {
  color: var(--orange-dark);
}

.details-panel {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 28px;
  align-items: center;
  margin-top: 18px;
  padding: 26px 28px;
  border-radius: 22px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.details-panel h2 {
  margin: 0;
  font-size: 1.6rem;
}

.details-panel .eyebrow {
  color: #f2a991;
}

.slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.slot-chip {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  line-height: 1.4;
}

.slot-chip strong {
  display: block;
  font-size: 0.83rem;
}

.details-panel .booking-link {
  color: var(--ink);
  background: white;
  white-space: nowrap;
}

.how-it-works {
  display: grid;
  grid-template-columns: 0.7fr 1.5fr;
  gap: 70px;
  align-items: start;
  padding: 88px 0 66px;
}

.how-it-works h2 {
  max-width: 350px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.how-it-works ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-it-works li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(18, 55, 71, 0.13);
}

.how-it-works li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--orange-dark);
  background: rgba(236, 112, 73, 0.1);
  font-size: 0.76rem;
  font-weight: 700;
}

.how-it-works li p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.how-it-works strong {
  color: var(--ink);
}

.ad-placeholder {
  display: grid;
  min-height: 112px;
  margin-bottom: 58px;
  place-items: center;
  align-content: center;
  border: 1px dashed rgba(18, 55, 71, 0.24);
  border-radius: 18px;
  color: #899498;
  background: rgba(255, 253, 249, 0.4);
  text-align: center;
}

.ad-placeholder span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ad-placeholder p {
  margin: 6px 0 0;
  font-size: 0.76rem;
}

footer {
  display: grid;
  gap: 14px;
  padding: 24px 0 32px;
  border-top: 1px solid rgba(18, 55, 71, 0.13);
  color: #657980;
  font-size: 0.75rem;
}

footer p {
  margin: 0;
}

.footer-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 17px;
  border: 1px solid rgba(18, 55, 71, 0.1);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.62);
}

.footer-contact h2 {
  margin: 0;
  color: #718187;
  font-size: 0.68rem;
  font-weight: 700;
}

.contact-identity {
  display: grid;
  gap: 2px;
}

.contact-links {
  display: flex;
  gap: 8px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(22, 132, 100, 0.2);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--green-soft);
  font-weight: 700;
  text-decoration: none;
}

.contact-links a:hover {
  border-color: var(--green);
}

.contact-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: 0.7rem;
  font-weight: 800;
}

.linkedin-icon {
  font-family: Arial, sans-serif;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.beta-note {
  padding: 11px 13px;
  border: 1px solid rgba(202, 139, 24, 0.2);
  border-radius: 12px;
  color: #7b6332;
  background: rgba(255, 246, 217, 0.64);
  line-height: 1.65;
}

.preferences-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(10, 33, 43, 0.28);
}

.preferences-dialog::backdrop {
  background: rgba(10, 33, 43, 0.58);
  backdrop-filter: blur(4px);
}

.preferences-form {
  display: grid;
  gap: 13px;
  padding: 22px;
}

.preferences-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 3px;
}

.preferences-heading h2 {
  margin: 3px 0 0;
  font-size: 1.2rem;
}

.preferences-kicker {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
}

.dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(18, 55, 71, 0.12);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  cursor: pointer;
  font-size: 1.25rem;
}

.preference-option {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid rgba(18, 55, 71, 0.12);
  border-radius: 14px;
  cursor: pointer;
}

.preference-option:has(input:checked) {
  border-color: rgba(22, 132, 100, 0.42);
  background: var(--green-soft);
}

.preference-option input {
  margin-top: 5px;
  accent-color: var(--green);
}

.preference-option span {
  display: grid;
  gap: 2px;
}

.preference-option small {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.watched-dates {
  display: grid;
  grid-template-columns: repeat(7, minmax(38px, 1fr));
  gap: 6px;
  max-height: 285px;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid rgba(18, 55, 71, 0.1);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.72);
}

.watched-dates[hidden] {
  display: none;
}

.watched-month-label {
  grid-column: 1 / -1;
  margin: 7px 0 2px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.watched-date {
  position: relative;
}

.watched-date input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.watched-date span {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(18, 55, 71, 0.1);
  border-radius: 10px;
  color: var(--ink-soft);
  background: white;
  cursor: pointer;
  font-size: 0.76rem;
}

.watched-date input:checked + span {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.preferences-error {
  margin: 0;
  color: #a53b26;
  font-size: 0.76rem;
}

.preferences-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 3px;
}

.toast {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 44px));
  padding: 13px 16px;
  border-radius: 13px;
  color: white;
  background: var(--ink);
  box-shadow: 0 14px 40px rgba(10, 33, 43, 0.24);
  font-size: 0.84rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

@media (max-width: 520px) {
  .preferences-form {
    padding: 17px;
  }

  .watched-dates {
    grid-template-columns: repeat(5, minmax(38px, 1fr));
  }
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(236, 112, 73, 0.35);
  outline-offset: 3px;
}

@media (max-width: 850px) {
  .hero,
  .how-it-works,
  .details-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 24px;
  }

  .calendar-toolbar {
    flex-direction: column;
  }

  .legend {
    justify-content: flex-start;
  }

  .details-panel .booking-link {
    justify-self: start;
  }

  .how-it-works {
    gap: 34px;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
  }

  .site-header {
    min-height: auto;
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 10px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .beta-badge {
    padding: 3px 6px;
    font-size: 0.52rem;
  }

  .header-actions {
    width: 100%;
    order: 2;
    justify-content: space-between;
    gap: 6px;
  }

  .language-button {
    padding-inline: 9px;
    font-size: 0.7rem;
  }

  .booking-link.compact {
    flex: 1 1 auto;
    padding-inline: 12px;
    font-size: 0.78rem;
  }

  .hero {
    gap: 20px;
    padding: 22px 2px 28px;
  }

  h1 {
    font-size: clamp(2rem, 9.5vw, 2.8rem);
  }

  .calendar-panel {
    border-radius: 20px;
  }

  .calendar-toolbar {
    padding: 22px 16px 17px;
  }

  .quick-stats {
    grid-template-columns: 1fr 1fr;
    padding: 13px 16px;
  }

  .quick-stat {
    padding-inline: 12px;
  }

  .quick-stat.nearest {
    grid-column: 1 / -1;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--line);
  }

  .quick-stat.nearest + .quick-stat {
    padding-block-start: 10px;
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  .quick-stat:last-child {
    padding-block-start: 10px;
  }

  .month-controls {
    width: 100%;
    justify-content: space-between;
  }

  .month-controls h2 {
    min-width: 0;
    font-size: 1.45rem;
  }

  .weekdays {
    padding-inline: 8px;
  }

  .dates {
    gap: 3px;
    padding: 2px 8px 16px;
  }

  .date-cell {
    min-height: 66px;
    padding: 8px 6px;
    border-radius: 11px;
  }

  .date-status {
    right: 5px;
    bottom: 7px;
    left: 5px;
    font-size: 0.57rem;
    white-space: normal;
  }

  .date-status.seat-status {
    white-space: nowrap;
  }

  .date-status.seat-status strong {
    font-size: 0.7rem;
    line-height: 1;
  }

  .today-badge {
    top: 6px;
    inset-inline-end: 5px;
    padding-inline: 4px;
    font-size: 0.48rem;
  }

  .calendar-footer {
    padding-inline: 16px;
  }

  .how-it-works {
    padding: 66px 4px 48px;
  }

  footer {
    gap: 12px;
  }

  .footer-contact {
    align-items: flex-start;
    gap: 12px;
    padding: 13px;
  }

  .contact-links a {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 0.7rem;
  }

  .footer-meta {
    flex-direction: column;
    gap: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
