/* Booking app. iOS-style frosted glass, large type, made for one hand on a phone. */
:root {
  --mist: #F3F1EC;
  --lavender: #CFE6DF;
  --peach: #F3E3C3;
  --label: #1C1C1E;
  --secondary: #6E6E73;
  --tertiary: #AEAEB2;
  --accent: #0A665D;
  --accent-deep: #064040;
  --gold: #C3A262;
  --green: #30D158;
  --orange: #FF9F0A;
  --red: #FF453A;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --hairline: rgba(60, 60, 67, 0.14);
  --edge: rgba(255, 255, 255, 0.75);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --radius-group: 22px;
  --radius-control: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { font-size: 20px; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--label);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}

/* Two soft lights behind the glass, so the panels have something to frost. */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vmax 50vmax at 12% 8%, var(--lavender), transparent 60%),
    radial-gradient(55vmax 45vmax at 95% 70%, var(--peach), transparent 62%),
    var(--mist);
}

button, input { font: inherit; color: inherit; }

button { cursor: pointer; border: 0; background: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }

.screen { padding: calc(env(safe-area-inset-top, 0px) + 18px) 16px calc(170px + var(--safe-bottom)); max-width: 560px; margin: 0 auto; }

.large-title { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; margin: 6px 4px 18px; }

.group {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--edge);
  border-radius: var(--radius-group);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 30px -18px rgba(28, 28, 30, 0.35);
  margin-bottom: 22px;
  overflow: hidden;
}

.group-title { font-size: 0.8rem; color: var(--secondary); margin: 0 6px 8px; font-weight: 500; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 18px;
  width: 100%;
  text-align: left;
}

.row + .row { border-top: 1px solid var(--hairline); }

.row .label { flex: 0 0 auto; color: var(--secondary); min-width: 4.2em; }

.row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 1.05rem;
  padding: 8px 0;
  outline: none;
}

.row input::placeholder { color: var(--tertiary); }

.row .value { flex: 1; font-size: 1.05rem; }

.row .value.empty { color: var(--tertiary); }

.chevron { color: var(--tertiary); font-size: 1.1rem; }

.hint { font-size: 0.8rem; color: var(--secondary); margin: -14px 8px 20px; }

.hint.warn { color: #B25000; }

/* Rooms: one tap each. A booked room fades and cannot be picked. */
.rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px; }

.room {
  min-height: 64px;
  border-radius: var(--radius-control);
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease;
}

.room small { font-weight: 500; font-size: 0.6rem; color: var(--secondary); }

.room[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.room[aria-pressed="true"] small { color: rgba(255, 255, 255, 0.85); }

.room:disabled { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }

.room:active:not(:disabled) { transform: scale(0.96); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; }

.chip {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  font-weight: 500;
}

.chip[aria-pressed="true"] { background: var(--label); color: #fff; border-color: var(--label); }

/* Price: a big figure, the per night or total switch beside it. */
.price { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }

.price .rupee { font-size: 1.6rem; color: var(--secondary); }

.price input { flex: 1; min-width: 0; font-size: 1.8rem; font-weight: 600; border: 0; background: transparent; outline: none; letter-spacing: -0.01em; }

.segment { display: inline-flex; background: rgba(118, 118, 128, 0.14); border-radius: 12px; padding: 3px; }

.segment button { min-height: 40px; padding: 0 14px; border-radius: 9px; font-size: 0.8rem; font-weight: 600; color: var(--secondary); }

.segment button[aria-pressed="true"] { background: #fff; color: var(--label); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }

.quick { display: flex; gap: 8px; padding: 0 18px 14px; flex-wrap: wrap; }

.quick button { min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(10, 102, 93, 0.1); color: var(--accent); font-size: 0.8rem; font-weight: 600; }

/* Aadhaar: two large camera tiles, front and back. */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; }

.card-tile {
  position: relative;
  aspect-ratio: 1.58;
  border-radius: 16px;
  border: 1.5px dashed rgba(60, 60, 67, 0.3);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  font-weight: 600;
}

.card-tile small { font-weight: 500; font-size: 0.68rem; color: var(--secondary); text-align: center; padding: 0 8px; }

.card-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card-tile.has-image { border-style: solid; border-color: transparent; }

.card-tile .badge {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.66rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.badge.ok { color: #1F7A3A; }
.badge.bad { color: #C2271D; }
.badge.busy { color: var(--secondary); }

.card-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.card-note { padding: 0 18px 14px; font-size: 0.8rem; color: var(--secondary); }

.card-note button { color: var(--accent); font-weight: 600; min-height: 40px; }

.guest-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 0; font-weight: 600; }

.guest-head button { color: var(--red); font-weight: 500; min-height: 44px; }

.add-guest { width: 100%; min-height: 56px; color: var(--accent); font-weight: 600; }

/* The bottom bar stays in reach of a thumb: total on the left, Save on the right. */
.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(76px + var(--safe-bottom));
  padding: 10px 16px;
  display: flex;
  justify-content: center;
}

.action-inner {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 20px;
  border-radius: 24px;
  background: var(--glass-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--edge);
  box-shadow: 0 18px 40px -20px rgba(28, 28, 30, 0.45);
}

.total { flex: 1; min-width: 0; }

.total strong { display: block; font-size: 1.3rem; letter-spacing: -0.01em; }

.total span { font-size: 0.72rem; color: var(--secondary); }

.primary {
  min-height: 56px;
  padding: 0 24px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 8px 20px -10px rgba(10, 102, 93, 0.8);
}

.primary[aria-disabled="true"] { background: rgba(10, 102, 93, 0.35); box-shadow: none; }

.primary.wide { width: 100%; }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 0 calc(8px + var(--safe-bottom));
  display: flex;
  justify-content: center;
  gap: 8px;
  background: rgba(243, 241, 236, 0.72);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-top: 1px solid var(--hairline);
}

.tabbar button { flex: 0 1 180px; min-height: 52px; border-radius: 14px; font-size: 0.8rem; font-weight: 600; color: var(--secondary); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }

.tabbar button svg { width: 24px; height: 24px; }

.tabbar button[aria-current="page"] { color: var(--accent); }

/* Bookings list. */
.search { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border-radius: 14px; background: rgba(118, 118, 128, 0.12); margin-bottom: 22px; }

.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 1rem; min-height: 48px; }

.booking { display: flex; gap: 14px; align-items: center; min-height: 76px; padding: 12px 18px; width: 100%; text-align: left; }

.booking + .booking { border-top: 1px solid var(--hairline); }

.booking .room-pill { flex: 0 0 auto; min-width: 72px; text-align: center; padding: 8px 8px; border-radius: 12px; background: rgba(10, 102, 93, 0.1); color: var(--accent); font-weight: 700; font-size: 0.8rem; }

.booking .who { flex: 1; min-width: 0; }

.booking .who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.booking .who span { font-size: 0.75rem; color: var(--secondary); }

.booking .amount { font-weight: 600; font-size: 0.9rem; }

.booking.cancelled .who strong, .booking.cancelled .amount { text-decoration: line-through; color: var(--secondary); }

.empty-state { text-align: center; padding: 32px 24px; color: var(--secondary); }

/* Sheets slide up from the bottom, like iOS. */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.28); animation: fade 200ms ease; z-index: 20; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92dvh;
  overflow-y: auto;
  z-index: 21;
  margin: 0 auto;
  max-width: 560px;
  padding: 10px 16px calc(20px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background: rgba(246, 247, 250, 0.9);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  border-top: 1px solid var(--edge);
  animation: rise 300ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.grabber { width: 40px; height: 5px; border-radius: 3px; background: rgba(60, 60, 67, 0.3); margin: 0 auto 10px; }

.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.sheet-head h2 { font-size: 1.1rem; margin: 0; }

.sheet-head button { color: var(--accent); font-weight: 600; min-height: 44px; padding: 0 6px; }

@keyframes rise { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* The date picker. The chosen stay is one continuous glass band across the days. */
.month-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 4px 10px; }

.month-head strong { font-size: 1.15rem; }

.month-head button { width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; color: var(--accent); background: rgba(10, 102, 93, 0.1); }

.weekdays, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }

.weekdays span { text-align: center; font-size: 0.65rem; font-weight: 600; color: var(--secondary); padding: 6px 0; }

.days { row-gap: 6px; }

.day {
  position: relative;
  min-width: 0;
  padding: 0;
  height: 50px;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day span { position: relative; z-index: 1; width: min(44px, 100%); aspect-ratio: 1; height: auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.day.today span { color: var(--accent); font-weight: 700; }

.day.past { color: var(--tertiary); }

.day.booked span { color: var(--tertiary); text-decoration: line-through; }

.day.booked { cursor: not-allowed; }

.day.in-range::before {
  content: "";
  position: absolute;
  inset: 3px 0;
  background: rgba(10, 102, 93, 0.14);
}

.day.start::before { left: 50%; }
.day.end::before { right: 50%; }
.day.start.end::before { display: none; }

.day.start span, .day.end span { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 6px 14px -6px rgba(10, 102, 93, 0.9); }

.stay-summary { margin: 16px 4px 14px; font-size: 1rem; min-height: 1.4em; }

.stay-summary strong { font-size: 1.2rem; }

.legend { font-size: 0.72rem; color: var(--secondary); margin: 0 4px 14px; }

.detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; }

.detail-row + .detail-row { border-top: 1px solid var(--hairline); }

.detail-row span:first-child { color: var(--secondary); }

.detail-row span:last-child { text-align: right; font-weight: 500; }

.sheet .actions { display: grid; gap: 10px; }

.secondary { min-height: 54px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--hairline); font-weight: 600; color: var(--accent); }

.destructive { min-height: 54px; border-radius: 16px; background: rgba(255, 69, 58, 0.12); color: #C2271D; font-weight: 600; }

/* Sign in. */
.signin { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 420px; margin: 0 auto; }

.signin h1 { font-size: 1.8rem; letter-spacing: -0.02em; margin: 0 0 6px; text-align: center; }

.signin p { color: var(--secondary); margin: 0 0 28px; text-align: center; }

.pin-dots { display: flex; gap: 16px; justify-content: center; margin-bottom: 28px; }

.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--label); }

.pin-dots i.on { background: var(--label); }

.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; justify-items: center; }

.pad button { width: 80px; height: 80px; border-radius: 50%; font-size: 1.6rem; font-weight: 500; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--edge); }

.pad button:active { background: rgba(255, 255, 255, 0.95); }

.pad .blank { visibility: hidden; }

.pin-error { color: #C2271D; text-align: center; min-height: 1.4em; margin-top: 18px; font-size: 0.85rem; }

#toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  transform: translate(-50%, -140%);
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  border-radius: 18px;
  background: rgba(28, 28, 30, 0.86);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: transform 300ms cubic-bezier(0.2, 0.9, 0.3, 1), opacity 200ms ease, visibility 0s linear 300ms;
}

#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 300ms cubic-bezier(0.2, 0.9, 0.3, 1), opacity 200ms ease; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

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

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .group, .action-inner, .sheet { background: rgba(255, 255, 255, 0.96); }
}

.sheet-hint { margin: 0 0 18px; }

.row .value .sub { display: block; font-size: 0.75rem; color: var(--secondary); }

.segment.kind { display: flex; margin: 0 0 18px; padding: 4px; border-radius: 14px; }

.segment.kind button { flex: 1; min-height: 48px; font-size: 0.9rem; }

.row input[type="time"] { flex: 0 0 auto; width: 7.5em; font-size: 1.05rem; text-align: left; }

.time-note { flex: 1; text-align: right; color: var(--secondary); font-size: 0.8rem; }

/* Press feedback: everything tappable gives way slightly under a finger, as on iOS. */
button, .card-tile { transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease; }

.primary:active, .secondary:active, .destructive:active, .chip:active, .quick button:active,
.segment button:active, .add-guest:active, .tabbar button:active, .month-head button:active,
.room:active:not(:disabled), .guest-head button:active, .card-note button:active { transform: scale(0.95); }

.primary:active { background: var(--accent-deep); box-shadow: none; }

.chip:active, .room:active:not(:disabled) { background: rgba(255, 255, 255, 1); }

button.row:active, .booking:active, .add-guest:active { background: rgba(60, 60, 67, 0.08); }

.card-tile:active { transform: scale(0.97); background: rgba(10, 102, 93, 0.1); }

.day:active span { transform: scale(0.88); background: rgba(10, 102, 93, 0.18); }

.day span { transition: transform 120ms ease, background-color 120ms ease; }

.pad button:active { transform: scale(0.92); }

.sheet-head button:active, .tabbar button:active { opacity: 0.6; }

/* The price figure needs room for five digits beside the per night or total switch. */
.price input { min-width: 5.2ch; font-size: 1.6rem; }

.price .segment button { padding: 0 10px; }

/* HRK branding. The lion sits small at the top of each screen and large where there is room. */
.brandbar { display: flex; align-items: center; gap: 10px; margin: 0 4px 2px; color: var(--accent-deep); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em; }

.brandbar .logo { width: 34px; height: auto; display: block; filter: drop-shadow(0 2px 4px rgba(6, 64, 64, 0.2)); }

.signin-logo .logo { width: 132px; height: auto; display: block; margin: 0 auto 8px; filter: drop-shadow(0 10px 18px rgba(6, 64, 64, 0.22)); }

.signin .signin-brand { margin: 0 0 18px; color: var(--accent-deep); font-weight: 600; font-size: 0.8rem; text-align: center; }

.splash { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--accent-deep); font-weight: 600; font-size: 0.8rem; }

.splash .logo { width: 120px; height: auto; animation: breathe 1.6s ease-in-out infinite; }

@keyframes breathe { 50% { transform: scale(1.04); opacity: 0.85; } }

/* Spinners for Save and the card check. */
.spinner { display: inline-block; width: 1em; height: 1em; margin-right: 8px; vertical-align: -0.14em; border-radius: 50%; border: 2px solid rgba(10, 102, 93, 0.25); border-top-color: var(--accent); animation: spin 700ms linear infinite; }

.spinner.light { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }

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

/* Moving between tabs. */
.screen.enter-right { animation: from-right 280ms cubic-bezier(0.2, 0.9, 0.3, 1); }
.screen.enter-left { animation: from-left 280ms cubic-bezier(0.2, 0.9, 0.3, 1); }

@keyframes from-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes from-left { from { opacity: 0; transform: translateX(-28px); } }

/* Sheets slide back down when closed. */
#sheet-root.closing .sheet { animation: sink 220ms ease-in forwards; }
#sheet-root.closing .scrim { animation: fade-out 220ms ease-in forwards; }

@keyframes sink { to { transform: translateY(100%); } }
@keyframes fade-out { to { opacity: 0; } }

/* The saved moment. */
.success { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(246, 242, 234, 0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: fade 200ms ease; }

.success.leaving { animation: fade-out 260ms ease forwards; }

.success-card { width: min(320px, 100%); padding: 26px 24px 24px; border-radius: 28px; text-align: center; background: rgba(255, 255, 255, 0.8); border: 1px solid var(--edge); box-shadow: 0 30px 60px -30px rgba(6, 64, 64, 0.5); animation: pop 420ms cubic-bezier(0.2, 1.3, 0.4, 1); display: flex; flex-direction: column; align-items: center; gap: 6px; }

.success-card .logo { width: 96px; height: auto; margin-bottom: 4px; }

.success-card strong { font-size: 1.25rem; letter-spacing: -0.01em; }

.success-card span { color: var(--secondary); font-size: 0.85rem; }

.tick { width: 58px; height: 58px; margin: 2px 0 6px; }

.tick circle { fill: var(--accent); stroke: var(--gold); stroke-width: 3; stroke-dasharray: 176; stroke-dashoffset: 176; animation: draw 520ms 120ms ease-out forwards; }

.tick path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 320ms 520ms ease-out forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.86) translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  .tick circle, .tick path { stroke-dashoffset: 0; }
}

/* Dragging across the calendar selects a stay, so the grid must not scroll or select text. */
.days { touch-action: none; -webkit-user-select: none; user-select: none; }

.day::before { transition: background-color 120ms ease; }

.returning { margin: -12px 8px 20px; padding: 10px 14px; border-radius: 14px; background: rgba(10, 102, 93, 0.1); color: var(--accent-deep); font-size: 0.78rem; font-weight: 500; }

/* No double-tap zoom anywhere. */
/* Scrolling only: no pinch and no double-tap zoom. Elements that need drags set touch-action: none. */
html, body, * { touch-action: pan-x pan-y; }

/* Day timeline: one row per room across the day. */
.timeline { padding: 12px 14px 10px; }

.tl-scale { position: relative; height: 18px; margin-left: 58px; font-size: 0.55rem; color: var(--secondary); }

.tl-scale span { position: absolute; top: 0; transform: translateX(-50%); }

.tl-scale span:first-child { transform: none; }
.tl-scale span:last-child { transform: translateX(-100%); }

.tl-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }

.tl-row + .tl-row { border-top: 1px solid var(--hairline); }

.tl-room { flex: 0 0 50px; min-height: 40px; font-weight: 700; font-size: 0.75rem; text-align: left; color: var(--label); border-radius: 10px; padding: 0 6px; }

.tl-row.selected .tl-room { background: var(--accent); color: #fff; }

.tl-track {
  position: relative;
  flex: 1;
  height: 34px;
  border-radius: 10px;
  background:
    linear-gradient(to right, transparent calc(25% - 0.5px), rgba(60, 60, 67, 0.12) calc(25% - 0.5px), rgba(60, 60, 67, 0.12) calc(25% + 0.5px), transparent calc(25% + 0.5px), transparent calc(50% - 0.5px), rgba(60, 60, 67, 0.18) calc(50% - 0.5px), rgba(60, 60, 67, 0.18) calc(50% + 0.5px), transparent calc(50% + 0.5px), transparent calc(75% - 0.5px), rgba(60, 60, 67, 0.12) calc(75% - 0.5px), rgba(60, 60, 67, 0.12) calc(75% + 0.5px), transparent calc(75% + 0.5px)),
    rgba(118, 118, 128, 0.08);
}

.tl-block {
  position: absolute;
  top: 3px;
  bottom: 3px;
  min-width: 4px;
  border-radius: 7px;
  padding: 0 5px;
  font-size: 0.55rem;
  font-weight: 600;
  line-height: 28px;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
}

.tl-block.stay { background: var(--accent); }
.tl-block.hourly { background: var(--gold); color: #3B2E12; }
.tl-block.gap { padding: 0; background: repeating-linear-gradient(135deg, rgba(60, 60, 67, 0.22) 0 3px, transparent 3px 7px); }
.tl-block.new { background: rgba(10, 102, 93, 0.14); border: 2px dashed var(--accent); color: var(--accent-deep); line-height: 24px; }
.tl-block.new.clash { background: rgba(255, 69, 58, 0.14); border-color: var(--red); color: #C2271D; }

button.tl-block:active { filter: brightness(0.9); }

.tl-now { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--red); border-radius: 1px; }

.tl-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0 58px; font-size: 0.62rem; color: var(--secondary); }

.tl-legend .key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.key.stay { background: var(--accent); }
.key.hourly { background: var(--gold); }
.key.gap { background: repeating-linear-gradient(135deg, rgba(60, 60, 67, 0.3) 0 2px, transparent 2px 5px); }

.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }

.day-nav button { min-width: 48px; min-height: 48px; border-radius: 50%; font-size: 1.4rem; color: var(--accent); background: rgba(10, 102, 93, 0.1); }

.day-nav .day-title { flex: 1; border-radius: 14px; font-size: 0.95rem; font-weight: 600; color: var(--label); background: var(--glass-strong); border: 1px solid var(--hairline); }

/* Hourly time grid */
.lengths { display: flex; gap: 8px; padding: 12px 14px 4px; }
.lengths .chip { flex: 1; justify-content: center; }

.slot-scroll { position: relative; max-height: 46vh; overflow-y: auto; margin: 8px 14px 12px; border-radius: 14px; background: rgba(118, 118, 128, 0.06); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.slot-grid { position: relative; }

.slot { display: block; width: 100%; height: 30px; padding: 3px 0 0 8px; border-top: 1px solid rgba(60, 60, 67, 0.16); text-align: left; font-size: 0.62rem; color: var(--secondary); }
.slot.half { border-top: 1px dashed rgba(60, 60, 67, 0.08); }
.slot:active { background: rgba(10, 102, 93, 0.08); }

.slot-block, .sel-block { position: absolute; left: 62px; right: 8px; border-radius: 8px; padding: 4px 8px; font-size: 0.7rem; font-weight: 600; text-align: left; overflow: hidden; }
.slot-block.stay { background: var(--accent); color: #fff; }
.slot-block.hourly { background: var(--gold); color: #3B2E12; }
.slot-block.gap { padding: 0; border-radius: 0 0 8px 8px; background: repeating-linear-gradient(135deg, rgba(60, 60, 67, 0.22) 0 3px, transparent 3px 7px); }

.sel-block { z-index: 2; overflow: visible; background: rgba(10, 102, 93, 0.18); border: 2px solid var(--accent); color: var(--accent-deep); box-shadow: 0 6px 18px rgba(6, 64, 64, 0.18); touch-action: none; cursor: grab; }
.sel-block.clash { background: rgba(255, 69, 58, 0.16); border-color: var(--red); color: #C2271D; }

.sel-handle { position: absolute; left: 50%; bottom: -14px; width: 56px; height: 28px; margin-left: -28px; touch-action: none; cursor: ns-resize; }
.sel-handle::after { content: ''; position: absolute; left: 14px; right: 14px; top: 11px; height: 6px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.sel-block.clash .sel-handle::after { background: var(--red); }

.slot-empty { margin: 8px 14px 12px; }
.hint.warn { color: #C2271D; }
.slot-block { display: flex; align-items: flex-start; }
.lengths .chip { white-space: nowrap; padding-left: 4px; padding-right: 4px; }
.sel-gap { pointer-events: none; z-index: 1; border-left: 2px dashed var(--accent); border-right: 2px dashed var(--accent); }

/* Sign in with Google */
.google-button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; margin: 8px 0 4px; border-radius: 16px; background: #fff; border: 1px solid rgba(60, 60, 67, 0.22); color: #1F1F1F; font-size: 1.05rem; font-weight: 600; text-decoration: none; box-shadow: 0 6px 18px rgba(6, 64, 64, 0.1); }
.google-button svg { width: 22px; height: 22px; }
.google-button:active { transform: scale(0.98); background: #F4F4F4; }
.signin .signin-or { margin: 22px 0 16px; font-size: 0.85rem; }
