:root {
  color-scheme: light;
  --bg: #f6f7f7;
  --card: #ffffff;
  --text: #121817;
  --muted: #77817f;
  --line: #e6eceb;
  --cyan: #08d0c3;
  --cyan-soft: #ddfbf8;
  --amber-soft: #fff3dc;
  --amber: #b76d08;
  --shadow: 0 14px 36px rgba(18, 24, 23, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Pretendard, "Pretendard Variable", "Noto Sans KR", system-ui, sans-serif;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app {
  width: min(760px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

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

.kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch,
.summary article,
.latest-strip,
.list-panel,
.food-card,
.modal-sheet {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  box-shadow: none;
}

.lang-switch button,
.filters button {
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lang-switch button {
  min-width: 36px;
  min-height: 30px;
}

.lang-switch button.is-active,
.filters button.is-active {
  background: var(--text);
  color: #fff;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.summary article {
  padding: 14px;
}

.summary i,
.summary svg {
  width: 19px;
  height: 19px;
  color: var(--cyan);
  margin-bottom: 9px;
}

.summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary strong {
  display: block;
  margin-top: 8px;
  color: var(--cyan);
  font-size: 30px;
  line-height: 1;
}

.latest-strip {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
}

.latest-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--cyan-soft);
}

.latest-icon svg {
  width: 22px;
  height: 22px;
  color: #008b83;
}

.latest-strip span,
.latest-strip strong {
  display: block;
}

.latest-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.latest-strip strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-panel {
  padding: 14px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.list-head h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.filters {
  display: inline-flex;
  gap: 5px;
  border-radius: 999px;
  background: #f0f3f2;
  padding: 5px;
}

.filters button {
  min-height: 30px;
  padding: 0 12px;
}

.food-list {
  display: grid;
  gap: 9px;
}

.food-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  box-shadow: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.food-card:hover {
  border-color: rgba(8, 208, 195, 0.55);
  transform: translateY(-1px);
}

.line-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: var(--cyan-soft);
}

.line-icon svg {
  width: 23px;
  height: 23px;
  color: #008b83;
}

.food-main {
  min-width: 0;
}

.food-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 850;
}

.food-meta,
.food-time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.food-meta {
  margin-top: 4px;
}

.food-time {
  margin-top: 6px;
}

.status-badge {
  justify-self: end;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-badge.is-in {
  background: var(--cyan-soft);
  color: #008b83;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 38px 12px;
  color: var(--muted);
  text-align: center;
}

.empty-state div {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--cyan-soft);
}

.empty-state svg {
  width: 26px;
  height: 26px;
  color: #008b83;
}

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

.empty-state p {
  margin-bottom: 0;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 10;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 23, 0.42);
  backdrop-filter: blur(8px);
}

.modal-sheet {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: min(700px, calc(100% - 24px));
  transform: translateX(-50%);
  padding: 18px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.modal-header h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--cyan-soft);
  color: #008b83;
  font-size: 22px;
}

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

.detail-field {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fafcfc;
  padding: 12px;
}

.detail-field.wide {
  grid-column: 1 / -1;
}

.detail-field span,
.detail-field strong {
  display: block;
}

.detail-field span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.detail-field strong {
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .app {
    width: min(100% - 18px, 760px);
    padding-top: 12px;
  }

  .topbar,
  .list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: space-between;
  }

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

  .filters {
    width: 100%;
  }

  .filters button {
    flex: 1;
  }

  .food-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .line-icon {
    width: 44px;
    height: 44px;
  }

  .status-badge {
    grid-column: 2;
    justify-self: start;
  }
}
