:root {
  --foam: #f7fcfe;
  --white: #ffffff;
  --pale-blue: #e9f7fc;
  --sky: #72c7e7;
  --sky-strong: #1fa5e4;
  --ocean: #167da4;
  --ink: #17364a;
  --muted: #668191;
  --line: #d5e8ef;
  --line-strong: #b8d7e3;
  --sun: #ffd166;
  --danger: #c84a4a;
  --success: #248b72;
  --shadow: 0 10px 28px rgba(30, 100, 130, 0.12);
  --shadow-soft: 0 4px 14px rgba(30, 100, 130, 0.08);
  --radius: 8px;
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  color-scheme: light;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--foam);
  -webkit-font-smoothing: antialiased;
}

body.sheet-open {
  overflow: hidden;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(31, 165, 228, 0.38);
  outline-offset: 2px;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
.brand,
.order-number {
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
}

.hidden {
  display: none !important;
}

.loading-state,
.error-state,
.empty-state {
  display: grid;
  min-height: 52vh;
  place-items: center;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.guest-mode {
  background: #dff3fa;
}

.guest-shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--foam);
  box-shadow: 0 0 48px rgba(23, 81, 110, 0.12);
}

.guest-header {
  padding: 20px 18px 0;
  background: var(--white);
}

.brand-row {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  color: #143d62;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.location-badge,
.live-indicator {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #d4ecf5;
  border-radius: var(--radius);
  background: var(--pale-blue);
  color: #21465d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.location-badge::before {
  width: 7px;
  height: 13px;
  border: 2px solid var(--sky-strong);
  border-top: 0;
  border-radius: 1px;
  content: "";
  transform: skew(-7deg);
}

.tide-line {
  width: calc(100% + 36px);
  height: 19px;
  margin: 5px -18px 0;
  color: var(--sky-strong);
}

.tide-line svg {
  display: block;
  width: 100%;
  height: 100%;
}

.menu-content {
  padding: 18px 16px 112px;
}

.menu-heading h1 {
  max-width: 350px;
  font-size: 29px;
  line-height: 1.05;
}

.menu-heading p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 18px 0 14px;
}

.category-tab {
  min-width: 0;
  min-height: 42px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #315165;
  font-size: 13px;
  font-weight: 700;
}

.category-tab.active {
  background: var(--sky-strong);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.cocktail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cocktail-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.cocktail-image-button {
  display: block;
  width: 100%;
  padding: 0;
  background: #d9f0f7;
}

.cocktail-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.cocktail-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: end;
  min-height: 92px;
  padding: 10px;
}

.cocktail-name {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.22;
}

.cocktail-price {
  margin-top: 4px;
  color: var(--ocean);
  font-size: 13px;
  font-weight: 800;
}

.popular-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: #775b00;
  font-size: 10px;
  font-weight: 700;
}

.popular-note::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sun);
  content: "";
}

.icon-button,
.plus-button,
.step-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ocean);
  font-weight: 800;
}

.plus-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--sky-strong);
  color: var(--white);
  font-size: 23px;
  line-height: 1;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
}

.cart-bar {
  position: fixed;
  z-index: 30;
  right: max(14px, calc((100vw - 430px) / 2 + 14px));
  bottom: var(--safe-bottom);
  left: max(14px, calc((100vw - 430px) / 2 + 14px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  padding: 9px 10px 9px 15px;
  border-radius: var(--radius);
  background: #113d59;
  color: var(--white);
  box-shadow: 0 12px 30px rgba(17, 61, 89, 0.28);
}

.cart-summary {
  min-width: 0;
}

.cart-summary strong,
.cart-summary span {
  display: block;
}

.cart-summary strong {
  font-size: 14px;
}

.cart-summary span {
  margin-top: 2px;
  color: #cdebf5;
  font-size: 11px;
}

.cart-bar-button,
.primary-button,
.staff-action {
  min-height: 46px;
  border-radius: var(--radius);
  background: var(--sky-strong);
  color: var(--white);
  font-weight: 800;
}

.cart-bar-button {
  padding: 0 15px;
  background: var(--white);
  color: #164664;
  font-size: 13px;
}

.detail-page {
  min-height: 100dvh;
  padding-bottom: 96px;
  background: var(--foam);
}

.detail-topbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  min-height: 64px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.detail-topbar h1 {
  text-align: center;
  font-size: 18px;
}

.detail-summary {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  background: var(--white);
}

.detail-summary img {
  width: 130px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
}

.detail-copy {
  padding-top: 9px;
}

.detail-copy h2 {
  font-size: 25px;
  line-height: 1.05;
}

.detail-price {
  margin-top: 6px;
  color: var(--sky-strong);
  font-size: 22px;
  font-weight: 800;
}

.ingredients {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.pour-section {
  padding: 22px 16px 0;
}

.pour-section h2 {
  margin-bottom: 12px;
  font-size: 19px;
}

.pour-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.pour-option,
.upsell-option {
  display: grid;
  width: 100%;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  text-align: left;
}

.pour-option:last-child,
.upsell-option:last-child {
  border-bottom: 0;
}

.radio {
  width: 20px;
  height: 20px;
  border: 2px solid #9cb6c3;
  border-radius: 50%;
  background: var(--white);
  box-shadow: inset 0 0 0 4px var(--white);
}

.selected .radio {
  border-color: var(--sky-strong);
  background: var(--sky-strong);
}

.option-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.option-detail {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.option-price {
  color: #284b60;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.option-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--sun);
  color: #674e00;
  font-size: 9px;
  font-weight: 800;
  vertical-align: 1px;
}

.detail-action {
  position: fixed;
  z-index: 20;
  right: max(14px, calc((100vw - 430px) / 2 + 14px));
  bottom: var(--safe-bottom);
  left: max(14px, calc((100vw - 430px) / 2 + 14px));
}

.primary-button {
  width: 100%;
  padding: 0 18px;
  box-shadow: 0 8px 22px rgba(31, 165, 228, 0.26);
}

.primary-button:disabled,
.staff-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

.sheet-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(17, 42, 57, 0.52);
  backdrop-filter: blur(2px);
}

.bottom-sheet {
  width: min(100%, 430px);
  max-height: 88dvh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  background: var(--white);
  box-shadow: 0 -18px 48px rgba(18, 57, 76, 0.2);
  animation: sheet-in 180ms ease-out;
}

.sheet-handle {
  width: 54px;
  height: 5px;
  margin: 11px auto 3px;
  border-radius: 5px;
  background: #c6d3da;
}

.upsell-sheet {
  padding: 11px 16px calc(18px + env(safe-area-inset-bottom));
}

.added-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--sky-strong);
  font-size: 13px;
  font-weight: 700;
}

.check-disc {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--sky-strong);
  color: var(--white);
  font-size: 12px;
}

.upsell-title {
  margin-top: 25px;
  text-align: center;
}

.upsell-title h2 {
  font-size: 26px;
}

.upsell-title p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.upsell-list {
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.upsell-actions {
  margin-top: 20px;
}

.text-button {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  background: transparent;
  color: #27495d;
  font-weight: 700;
}

.cart-sheet {
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
}

.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
}

.sheet-heading h2 {
  font-size: 24px;
}

.cart-lines {
  border-top: 1px solid var(--line);
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line h3 {
  font-size: 15px;
}

.cart-line-detail {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.cart-line-price {
  color: var(--ocean);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.cart-line-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
}

.step-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
}

.quantity-value {
  min-width: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.remove-button {
  margin-left: 4px;
  padding: 6px 2px;
  background: transparent;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 0;
  font-size: 16px;
  font-weight: 800;
}

.cart-total strong {
  color: var(--ocean);
  font-size: 22px;
}

.confirmation-page {
  min-height: 100dvh;
  padding: 24px 16px 32px;
  background: var(--foam);
}

.confirmation-card {
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.confirmation-check {
  display: inline-grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: var(--sky-strong);
  color: var(--white);
  font-size: 25px;
}

.confirmation-card h1 {
  margin-top: 13px;
  font-size: 27px;
}

.confirmation-card > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.confirmation-number {
  margin-top: 24px;
  color: var(--sky-strong);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
}

.confirmation-location {
  margin-top: 7px;
  color: #25495f;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 26px;
}

.status-step {
  position: relative;
  padding-top: 22px;
  color: #90a4ae;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
}

.status-step::before {
  position: absolute;
  z-index: 2;
  top: 0;
  left: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border: 2px solid #bed1d9;
  border-radius: 50%;
  background: var(--white);
  content: "";
}

.status-step::after {
  position: absolute;
  top: 7px;
  left: 50%;
  width: calc(100% + 5px);
  height: 2px;
  background: #d6e2e7;
  content: "";
}

.status-step:last-child::after {
  display: none;
}

.status-step.done,
.status-step.current {
  color: var(--ocean);
}

.status-step.done::before,
.status-step.current::before {
  border-color: var(--sky-strong);
  background: var(--sky-strong);
}

.status-step.done::after {
  background: var(--sky-strong);
}

.confirmation-actions {
  margin-top: 22px;
}

.toast {
  position: fixed;
  z-index: 100;
  top: 14px;
  left: 50%;
  max-width: calc(100vw - 28px);
  padding: 11px 15px;
  border-radius: var(--radius);
  background: #123c56;
  color: var(--white);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.staff-mode {
  min-width: 320px;
  background: #edf8fc;
}

.staff-shell {
  width: min(100%, 1440px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 32px clamp(18px, 4vw, 58px) 50px;
}

.staff-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.staff-header h1 {
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1;
}

.staff-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

.live-indicator {
  margin-top: 3px;
  background: var(--white);
  color: #225066;
  font-size: 13px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sky-strong);
  box-shadow: 0 0 0 5px rgba(31, 165, 228, 0.12);
}

.staff-tide {
  height: 25px;
  margin: 12px calc(clamp(18px, 4vw, 58px) * -1) 8px;
  color: var(--sky-strong);
}

.staff-tide svg {
  width: 100%;
  height: 100%;
}

.orders-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.order-card {
  position: relative;
  display: grid;
  grid-template-columns: 200px minmax(260px, 1fr) 165px;
  gap: 24px;
  align-items: center;
  min-height: 158px;
  padding: 20px 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.order-card.new-order {
  border-color: #b9dfea;
  background: #effaff;
}

.order-card.new-order::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--sky-strong);
  content: "";
}

.order-card.arrived {
  animation: order-arrived 900ms ease-out 2;
}

.status-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  background: #dbeaf0;
  color: #35596c;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge.new {
  background: var(--sun);
  color: #624b00;
}

.status-badge.preparing {
  background: #dceffa;
  color: var(--ocean);
}

.status-badge.ready {
  background: #d9f0e9;
  color: #226d5d;
}

.order-number {
  margin-top: 8px;
  color: var(--sky-strong);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.order-location {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-count,
.order-age {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.order-items {
  display: grid;
  gap: 11px;
}

.order-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
}

.order-item-qty {
  color: var(--sky-strong);
  font-size: 15px;
  font-weight: 800;
}

.order-item-name {
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
}

.order-item-price {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-item-detail {
  grid-column: 2 / -1;
  margin-top: -7px;
  color: var(--muted);
  font-size: 11px;
}

.staff-action {
  width: 100%;
  padding: 0 15px;
  background: var(--sky-strong);
}

.staff-action.secondary {
  border: 1px solid var(--sky-strong);
  background: var(--white);
  color: var(--ocean);
}

.staff-action.ready {
  background: var(--success);
}

.staff-empty {
  display: grid;
  min-height: 50vh;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.staff-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 24px;
}

.staff-toast {
  top: 22px;
  background: var(--sky-strong);
  font-size: 15px;
}

@keyframes sheet-in {
  from { transform: translateY(28px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes order-arrived {
  0%, 100% { box-shadow: var(--shadow-soft); }
  50% { box-shadow: 0 0 0 5px rgba(31, 165, 228, 0.24), var(--shadow); }
}

@media (max-width: 760px) {
  .staff-shell {
    padding: 24px 14px 40px;
  }

  .staff-header {
    align-items: center;
  }

  .staff-header h1 {
    font-size: 32px;
  }

  .staff-meta {
    font-size: 13px;
  }

  .live-indicator {
    padding: 7px 9px;
    font-size: 10px;
  }

  .staff-tide {
    margin-right: -14px;
    margin-left: -14px;
  }

  .order-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
    padding: 18px;
  }

  .order-items {
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 360px) {
  .menu-heading h1 {
    font-size: 26px;
  }

  .cocktail-grid {
    gap: 9px;
  }

  .cocktail-info {
    grid-template-columns: minmax(0, 1fr) 34px;
    padding: 9px;
  }

  .plus-button {
    width: 34px;
    height: 34px;
  }

  .detail-summary {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .detail-summary img {
    width: 112px;
  }

  .detail-copy h2 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
