:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --brand:#1f4e78;
  --brand-2:#295f90;
  --danger:#b91c1c;
  --ok:#166534;
  --radius:16px;
}

*{box-sizing:border-box}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Arial, "Microsoft JhengHei", sans-serif;
}
.app{
  min-height:100vh;
}
.topbar{
  background:var(--brand);
  color:#fff;
  padding:20px 16px;
  text-align:center;
}
.topbar h1{
  margin:0;
  font-size:24px;
  line-height:1.25;
}
.topbar span{
  font-size:14px;
  font-weight:400;
  opacity:.95;
}
.container{
  max-width:860px;
  margin:0 auto;
  padding:16px;
}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  margin-bottom:16px;
  box-shadow:0 4px 14px rgba(0,0,0,.04);
}
.card h2{
  margin:0 0 14px;
  font-size:20px;
  line-height:1.25;
}
.card h2 span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
  font-weight:400;
}
label{
  display:block;
  margin:10px 0 6px;
  font-size:14px;
  font-weight:700;
}
input, select, button{
  width:100%;
  min-height:46px;
  border-radius:12px;
  border:1px solid var(--line);
  font-size:16px;
}
input, select{
  background:#fff;
  padding:10px 12px;
}
button{
  border:none;
  background:var(--brand);
  color:#fff;
  font-weight:700;
  cursor:pointer;
  margin-top:14px;
}
button:hover{
  background:var(--brand-2);
}
button.secondary{
  width:auto;
  min-height:40px;
  padding:0 14px;
  margin-top:0;
  background:#e5e7eb;
  color:#111827;
}
.row.between{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.info-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
}
.info-grid > div{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:#fafafa;
}
.subline{
  color:var(--muted);
  margin:0 0 12px;
}
.menu-list{
  display:grid;
  gap:12px;
}
.menu-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
}
.menu-item.selected{
  border:2px solid var(--brand);
  background:#f3f8fc;
}
.menu-title{
  font-weight:700;
  font-size:16px;
  margin-bottom:6px;
}
.menu-sub{
  color:var(--muted);
  font-size:14px;
  margin-bottom:6px;
}
.menu-price{
  font-weight:700;
}
.order-box{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.history-list{
  display:grid;
  gap:12px;
}
.history-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
  background:#fafafa;
}
.msg{
  margin:12px 0 0;
  font-size:14px;
  line-height:1.4;
  color:var(--danger);
}
.msg.ok{
  color:var(--ok);
}
.hidden{
  display:none;
}
@media (max-width:640px){
  .info-grid{
    grid-template-columns:1fr;
  }
  .row.between{
    flex-direction:column;
  }
  button.secondary{
    width:100%;
  }
}