﻿:root {
  --ink: #241b16;
  --coffee: #9a5a32;
  --deep: #5a321e;
  --paper: #fffaf2;
  --cream: #f4eadc;
  --line: rgba(90, 50, 30, 0.18);
  --green: #61724f;
  --berry: #b95058;
  --gold: #c7934f;
  --shadow: 0 18px 48px rgba(36, 27, 22, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #ead8c1, #fbf4e9 42%, #eef0e5);
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.kiosk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  min-height: 100vh;
}

.screen {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 100vh;
  padding: 22px;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.84);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 2px solid var(--coffee);
  border-radius: 50%;
  background: white;
  color: var(--coffee);
  font-size: 28px;
}

.brand strong {
  display: block;
  color: var(--deep);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
}

.brand span {
  color: #725d51;
  font-size: 15px;
  font-weight: 800;
}

.order-type {
  display: flex;
  gap: 10px;
}

.pill {
  min-width: 112px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--deep);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.pill.active {
  background: var(--deep);
  color: white;
}

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

.category-tab {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--deep);
  cursor: pointer;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 1000;
  box-shadow: 0 8px 22px rgba(36, 27, 22, 0.08);
}

.category-tab.active {
  background: var(--coffee);
  color: white;
}

.menu-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  min-height: 0;
}

.menu-panel,
.ingredient-panel,
.cart {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.9);
  box-shadow: var(--shadow);
}

.menu-panel {
  overflow: auto;
  padding: 18px;
}

.menu-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.menu-heading h1 {
  margin: 0;
  color: var(--deep);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.menu-heading span {
  color: #735e51;
  font-weight: 800;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 14px;
}

.menu-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 218px;
  padding: 16px;
  border: 1px solid rgba(90, 50, 30, 0.16);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 18px rgba(36, 27, 22, 0.08);
}

.menu-card:active {
  transform: scale(0.98);
}

.drink-art {
  display: grid;
  height: 86px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 6px;
  background: var(--cream);
  font-size: 46px;
}

.menu-card h2 {
  margin: 0 0 8px;
  color: var(--deep);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.16;
}

.menu-card p {
  margin: 0;
  color: #715f54;
  font-size: 14px;
  line-height: 1.45;
  word-break: keep-all;
}

.price {
  margin-top: 16px;
  color: var(--coffee);
  font-size: 24px;
  font-weight: 1000;
}

.ingredient-panel {
  overflow: auto;
  padding: 18px;
}

.ingredient-panel h2 {
  margin: 0 0 12px;
  color: var(--deep);
  font-size: 24px;
}

.ingredient-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ingredient-card strong {
  display: block;
  color: var(--deep);
  font-size: 18px;
}

.ingredient-card span {
  color: #715f54;
  line-height: 1.5;
}

.cart {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  border-radius: 0;
  background: #fffdf8;
}

.cart-head {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--deep);
  color: white;
}

.cart-head h2 {
  margin: 0;
  font-size: 30px;
}

.cart-head p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

.cart-list {
  overflow: auto;
  padding: 18px;
}

.empty-cart {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 2px dashed var(--line);
  border-radius: 8px;
  color: #766357;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  word-break: keep-all;
}

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

.cart-item strong {
  color: var(--deep);
  font-size: 19px;
}

.cart-item span {
  color: #715f54;
  font-weight: 800;
}

.qty {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 10px;
}

.qty button {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--deep);
  cursor: pointer;
  font-size: 26px;
  font-weight: 1000;
}

.qty strong {
  text-align: center;
  font-size: 22px;
}

.checkout {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: white;
}

.total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.total span {
  color: #725d51;
  font-weight: 900;
}

.total strong {
  color: var(--deep);
  font-size: 32px;
}

.customer {
  width: 100%;
  height: 54px;
  margin-bottom: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.checkout-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

.clear,
.pay {
  min-height: 64px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 1000;
}

.clear {
  background: #eaded1;
  color: var(--deep);
}

.pay {
  background: var(--berry);
  color: white;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  max-width: min(560px, calc(100vw - 32px));
  padding: 16px 22px;
  border-radius: 999px;
  background: var(--deep);
  color: white;
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

@media (max-width: 1080px) {
  .kiosk {
    grid-template-columns: 1fr;
  }

  .screen {
    min-height: auto;
  }

  .cart {
    min-height: auto;
    max-height: none;
    border-radius: 8px;
    margin: 0 22px 22px;
  }

  .menu-area {
    grid-template-columns: 1fr;
  }

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

  .ingredient-panel h2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .screen {
    padding: 12px;
  }

  .cart {
    margin: 0 12px 12px;
  }

  .topbar,
  .menu-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-type,
  .category-tabs {
    width: 100%;
  }

  .category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-grid,
  .ingredient-panel {
    grid-template-columns: 1fr;
  }

  .menu-card {
    min-height: 186px;
  }
}
