*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #1c1917;
  --surface:    #292524;
  --surface-2:  #3a3330;
  --accent:     #c8956c;
  --accent-dim: #8c6040;
  --text:       #f5f0eb;
  --muted:      #a89080;
  --border:     #3f3632;
  --radius:     16px;
  --shadow:     0 8px 32px rgba(0,0,0,.45);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
}
header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--accent);
}
header p {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .25rem;
}

.app {
  display: flex;
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
  flex: 1;
  align-items: flex-start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 0 0 250px;
}

.option-group h2 {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: .65rem;
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.radio-group label,
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .9rem;
  cursor: pointer;
  padding: .4rem .6rem;
  border-radius: 8px;
  color: var(--text);
  transition: background .15s;
}
.radio-group label:hover,
.checkbox-group label:hover {
  background: var(--surface-2);
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding-top: 1rem;
}

.cup-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cup {
  position: relative;
  width: 180px;
  height: 210px;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: 10px 10px 40px 40px;
  overflow: hidden;
  box-shadow: var(--shadow), inset 0 -6px 16px rgba(0,0,0,.3);
}

.cup-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--fill-height, 65%);
  background: var(--fill-colour, #7b4f2e);
  transition: height .4s ease, background .4s ease;
  border-radius: 0 0 37px 37px;
}

.cup-fill::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 14px;
  background: rgba(255,255,255,.18);
  border-radius: 50% 50% 0 0 / 7px 7px 0 0;
}

.cup-shine {
  position: absolute;
  top: 10px;
  left: 16px;
  width: 16px;
  height: 70px;
  background: rgba(255,255,255,.12);
  border-radius: 12px;
  transform: rotate(-8deg);
  pointer-events: none;
}

.cup-base {
  width: 210px;
  height: 12px;
  background: var(--surface-2);
  border-radius: 0 0 50px 50px;
  border: 2px solid var(--border);
  border-top: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}

.cup-handle {
  position: absolute;
  right: -28px;
  top: 55px;
  width: 34px;
  height: 65px;
  border: 8px solid var(--border);
  border-left: none;
  border-radius: 0 32px 32px 0;
}

.badges {
  position: absolute;
  top: -10px;
  right: -42px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge {
  display: none;
  width: 30px;
  height: 30px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: .9rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  animation: popIn .2s cubic-bezier(.34,1.56,.64,1);
}

.badge.visible { display: flex; }

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  width: 100%;
  max-width: 320px;
}

.summary h3 {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: .8rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .88rem;
  padding: .28rem 0;
  color: var(--text);
}

.summary-row span:last-child {
  color: var(--muted);
  font-size: .84rem;
}

.summary-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: .75rem 0;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
}

@media (max-width: 620px) {
  .app {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1rem 3rem;
  }
  .panel { flex: unset; width: 100%; max-width: 400px; }
  .visual { width: 100%; }
}