:root {
  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.28);
  --glass-shadow: 0 8px 32px rgba(30, 12, 2, 0.35);
  --accent: #ffb26b;
  --accent-strong: #ff8c42;
  --text: #fdf3e7;
  --text-dim: rgba(253, 243, 231, 0.72);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, #2b1608 0%, #4a2712 35%, #7a4623 70%, #c98a4b 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

.blob-1 {
  width: 340px;
  height: 340px;
  background: #ff8c42;
  top: -80px;
  left: -100px;
}

.blob-2 {
  width: 280px;
  height: 280px;
  background: #6b3e1e;
  bottom: 10%;
  right: -80px;
}

.blob-3 {
  width: 220px;
  height: 220px;
  background: #ffd8a8;
  bottom: -100px;
  left: 20%;
}

.wrapper {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.hero {
  text-align: center;
  padding: 28px 20px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  letter-spacing: 0.5px;
}

.tagline {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.4;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.group {
  border: 1px solid var(--glass-border);
  padding: 16px;
}

legend {
  padding: 0 6px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

legend small {
  display: block;
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 2px;
}

/* Coffee cards */
.coffee-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.coffee-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  padding: 16px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.coffee-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.coffee-card .icon {
  font-size: 1.6rem;
  line-height: 1;
}

.coffee-card .name {
  font-weight: 600;
  font-size: 0.92rem;
}

.coffee-card .sub {
  font-size: 0.73rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.coffee-card:active {
  transform: scale(0.97);
}

.coffee-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 178, 107, 0.18);
  box-shadow: 0 0 0 2px rgba(255, 178, 107, 0.4), 0 6px 18px rgba(255, 140, 66, 0.25);
  transform: translateY(-2px);
}

.coffee-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Pills (location) */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  position: relative;
  cursor: pointer;
}

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

.pill span {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pill:has(input:checked) span {
  border-color: var(--accent);
  background: rgba(255, 178, 107, 0.22);
  box-shadow: 0 0 0 2px rgba(255, 178, 107, 0.35);
}

.pill:focus-within span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Time toggle */
.toggle-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.toggle {
  position: relative;
  flex: 1;
  cursor: pointer;
}

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

.toggle span {
  display: block;
  text-align: center;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.toggle:has(input:checked) span {
  border-color: var(--accent-strong);
  background: rgba(255, 140, 66, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 140, 66, 0.4);
}

.toggle:focus-within span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Comment */
textarea {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 70px;
  scroll-margin: 16px;
}

textarea::placeholder {
  color: rgba(253, 243, 231, 0.5);
}

textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Submit button */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #2b1608;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 140, 66, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  position: sticky;
  bottom: 12px;
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: -120px;
  transform: translateX(-50%);
  max-width: 90vw;
  width: 380px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(20, 10, 4, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 0.88rem;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transition: bottom 0.35s ease;
  z-index: 10;
}

.toast.show {
  bottom: 24px;
}

.toast.error {
  border-color: rgba(255, 100, 100, 0.5);
}

.toast.success {
  border-color: rgba(120, 255, 170, 0.5);
}

.footer {
  text-align: center;
  margin-top: 22px;
  padding-bottom: 12px;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.footer strong {
  color: var(--text);
}

/* Larger screens */
@media (min-width: 560px) {
  .coffee-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .mug-scroll {
    overflow-x: visible;
    flex-wrap: wrap;
  }

  .mug-card {
    width: calc(20% - 10px);
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .submit-btn {
    position: static;
  }
}
