:root {
  --ink: #0f172a;
  --surface: #ffffff;
  --bg: #f8fafc;
  --panel: #f1f5f9;
  --line: #cbd5e1;
  --navy: #1e3a5f;
  --wood: #854d0e;
  --wood-dark: #451a03;
  --teal: #0f766e;
  --gold: #f59e0b;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Lexend", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--surface);
  border-bottom: 2px solid var(--line);
  padding: 0.75rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.brand h1 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
}

.brand p {
  font-size: 0.8rem;
  color: #64748b;
}

.controls-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.controls-bar select {
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  outline: none;
}

.btn-header {
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-header:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Till Banner */
.till-banner {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.till-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748b;
}

.stat-val {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
}

.order-box {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 0.5rem 1.2rem;
  flex: 1;
  max-width: 480px;
}

.item-pic {
  font-size: 3rem;
  background: #ffffff;
  border-radius: 12px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.item-details {
  display: flex;
  flex-direction: column;
}

.customer-bubble {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
}

.item-title {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}

.price-tag {
  font-size: 1.1rem;
  color: #334155;
}

.price-tag b {
  color: #b45309;
  font-size: 1.3rem;
  font-family: var(--display);
}

.till-streak {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #ea580c;
}

/* Shop Arena */
.shop-arena {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Wooden Counter Tray */
.counter-tray {
  background: linear-gradient(180deg, #78350f, #451a03);
  border: 4px solid #b45309;
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: inset 0 4px 16px rgba(0,0,0,0.4), 0 8px 24px rgba(69, 26, 3, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fef3c7;
  font-size: 0.9rem;
  font-weight: 600;
}

.amount-glow {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
  background: rgba(0,0,0,0.3);
  padding: 0.2rem 0.8rem;
  border-radius: 8px;
  margin-left: 0.4rem;
}

.counter-coins {
  min-height: 140px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 2px dashed rgba(254, 243, 199, 0.3);
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.empty-msg {
  color: rgba(254, 243, 199, 0.6);
  font-size: 1rem;
  font-style: italic;
}

.tray-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.btn-secondary {
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-pay {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  padding: 0.75rem 1.8rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transition: all 0.2s;
}

.btn-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Cash Drawer */
.coin-drawer {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.drawer-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1rem;
}

.coins-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Authentic Euro Coins */
.coin-btn {
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 800;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25), inset 0 2px 4px rgba(255,255,255,0.4);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.coin-btn:hover {
  transform: translateY(-4px) scale(1.08);
}

.coin-btn:active {
  transform: translateY(2px) scale(0.96);
}

/* Copper coins (1c, 2c, 5c) */
.coin-1c {
  width: 48px;
  height: 48px;
  font-size: 0.9rem;
  background: radial-gradient(circle at 35% 35%, #f59e0b, #b45309 60%, #78350f);
  border: 2px solid #78350f;
}

.coin-2c {
  width: 54px;
  height: 54px;
  font-size: 1rem;
  background: radial-gradient(circle at 35% 35%, #f59e0b, #b45309 60%, #78350f);
  border: 2px solid #78350f;
}

.coin-5c {
  width: 60px;
  height: 60px;
  font-size: 1.1rem;
  background: radial-gradient(circle at 35% 35%, #f59e0b, #b45309 60%, #78350f);
  border: 2px solid #78350f;
}

/* Nordic gold coins (10c, 20c, 50c) */
.coin-10c {
  width: 56px;
  height: 56px;
  font-size: 1.05rem;
  background: radial-gradient(circle at 35% 35%, #fef08a, #eab308 65%, #a16207);
  border: 3px solid #854d0e;
  color: #713f12;
}

.coin-20c {
  width: 62px;
  height: 62px;
  font-size: 1.15rem;
  background: radial-gradient(circle at 35% 35%, #fef08a, #eab308 65%, #a16207);
  border: 3px dashed #854d0e;
  color: #713f12;
}

.coin-50c {
  width: 68px;
  height: 68px;
  font-size: 1.25rem;
  background: radial-gradient(circle at 35% 35%, #fef08a, #eab308 65%, #a16207);
  border: 3px solid #854d0e;
  color: #713f12;
}

/* Bi-metallic coins (€1, €2) */
.coin-1e {
  width: 64px;
  height: 64px;
  font-size: 1.2rem;
  background: radial-gradient(circle, #f8fafc 48%, #e2e8f0 55%, #ca8a04 56%, #eab308 100%);
  border: 3px solid #ca8a04;
  color: #1e293b;
}

.coin-2e {
  width: 72px;
  height: 72px;
  font-size: 1.35rem;
  background: radial-gradient(circle, #fde047 48%, #ca8a04 55%, #94a3b8 56%, #cbd5e1 100%);
  border: 3px solid #64748b;
  color: #713f12;
}

/* Coins in counter tray */
.placed-coin {
  animation: dropCoin 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dropCoin {
  0% { transform: scale(1.4) translateY(-20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 2.2rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-card h2 {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy);
}

.stats-pills {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}

.pill {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.pill b {
  color: var(--teal);
}

.modal-btn {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

