/* Three separate glass controls share the width of the mobile page. */
.coffee-menu {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  width: min(100%, 402px);
  padding: 0 18px;
  transform: translateX(-50%);
  pointer-events: none;
}

.coffee-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 54px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.77);
  border-radius: 27px;
  color: #26352d;
  font: 600 14px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.01em;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.16) 46%, rgba(255, 255, 255, 0.3) 100%);
  -webkit-backdrop-filter: blur(12px) saturate(1.4) brightness(1.04);
  backdrop-filter: blur(12px) saturate(1.4) brightness(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.32),
    inset 0 0 0 1px rgba(48, 69, 55, 0.04),
    0 5px 16px rgba(39, 52, 39, 0.14),
    0 12px 25px rgba(39, 52, 39, 0.08);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 130ms ease, background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.coffee-option[aria-pressed="true"] {
  color: #173629;
  border-color: rgba(55, 100, 71, 0.58);
  background: linear-gradient(145deg, rgba(229, 247, 225, 0.72), rgba(174, 209, 164, 0.4) 55%, rgba(221, 241, 216, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(61, 100, 69, 0.17),
    inset 0 0 0 1px rgba(72, 119, 81, 0.1),
    0 5px 16px rgba(39, 52, 39, 0.16),
    0 12px 25px rgba(39, 52, 39, 0.08);
}

/* Shape and weight distinguish the selected type in addition to its tint. */
.coffee-option[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #426b4d;
}

.coffee-option:active,
.coffee-option.is-pressed {
  transform: scale(0.97);
  box-shadow: inset 2px 3px 8px rgba(45, 70, 49, 0.14),
    inset -2px -2px 8px rgba(255, 255, 255, 0.56),
    0 3px 8px rgba(39, 52, 39, 0.12);
}

.coffee-option:focus-visible {
  outline: 3px solid #325b3d;
  outline-offset: 3px;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .coffee-option { background: rgba(250, 251, 246, 0.91); }
  .coffee-option[aria-pressed="true"] { background: #d4e5d0; }
}

@media (prefers-reduced-motion: reduce) {
  .coffee-option { transition: none; }
  .coffee-option:active, .coffee-option.is-pressed { transform: none; }
}
