:root { --blue: #0262e0; --blue-d: #0149ad; --yellow: #ecc51d; --ink: #14213d; --muted: #66708a; --line: #e3e8f2; --bg: #f4f7fc; --card: #fff; --red: #d64545; }
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
button, input { font: inherit; }
.wrap { max-width: 460px; margin: 0 auto; padding: 24px 16px 48px; }
.brand { text-align: center; margin-bottom: 18px; }
.brand img { width: 64px; height: auto; }
.brand .by { font-size: 12px; letter-spacing: .2em; color: var(--blue); font-weight: 700; margin-top: 4px; }
.brand h1 { font-size: 22px; margin: 8px 0 0; }
.card { background: var(--card); border-radius: 18px; padding: 22px 20px; box-shadow: 0 6px 24px rgba(2, 98, 224, .08); }
label { display: block; font-weight: 600; margin: 0 0 8px; }
.field { margin-bottom: 20px; }
input[type=text], input[type=password], input[type=number] { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 18px; background: #fff; color: var(--ink); }
input:focus { outline: none; border-color: var(--blue); }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--blue); background: #fff; color: var(--blue); font-size: 26px; line-height: 1; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 60px; text-align: center; font-size: 30px; font-weight: 700; }
.btn { display: block; width: 100%; padding: 15px; border: 0; border-radius: 14px; background: var(--blue); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; }
.btn:active { background: var(--blue-d); }
.btn:disabled { opacity: .6; }
.btn.ghost { background: transparent; color: var(--blue); font-weight: 600; font-size: 15px; margin-top: 10px; }
.err { color: var(--red); margin: 12px 0 0; min-height: 1.2em; font-size: 15px; }
.result { text-align: center; }
.result .hello { font-size: 18px; margin: 0 0 4px; }
.result .sub { color: var(--muted); margin: 0 0 18px; }
.tablebig { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 150px; height: 150px; border-radius: 50%; background: var(--blue); color: #fff; margin: 4px 6px 14px; box-shadow: inset 0 0 0 6px var(--yellow); }
.tablebig b { font-size: 56px; line-height: 1; }
.tablebig span { font-size: 16px; margin-top: 4px; }
.seats { font-size: 20px; font-weight: 700; color: var(--blue-d); line-height: 1.6; margin: 0 0 12px; }
.notice { background: #fff8db; border: 1px solid var(--yellow); border-radius: 12px; padding: 12px 14px; font-size: 15px; text-align: left; margin-top: 8px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 24px; }
[hidden] { display: none !important; }

/* 管理頁 */
.admin .wrap { max-width: 1180px; }
.admin header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.admin header img { width: 40px; }
.admin header h1 { font-size: 20px; margin: 0; flex: 1; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 16px; }
.stat { display: flex; gap: 10px; flex-wrap: wrap; }
.stat div { flex: 1; min-width: 90px; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-size: 26px; color: var(--blue); }
.stat span { font-size: 13px; color: var(--muted); }
h2 { font-size: 17px; margin: 0 0 14px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.heads { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 16px; }
.heads label { font-weight: 500; font-size: 13px; color: var(--muted); margin: 0; }
.heads input { font-size: 15px; padding: 8px 10px; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr #qr { padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr code { font-size: 13px; word-break: break-all; text-align: center; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tbl { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fff; }
.tbl h3 { margin: 0 0 6px; font-size: 15px; display: flex; justify-content: space-between; }
.tbl h3 small { color: var(--muted); font-weight: 500; }
.tbl h3 small.full { color: var(--red); }
.tbl ol { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.tbl li { display: flex; gap: 6px; padding: 2px 0; border-bottom: 1px dashed var(--line); }
.tbl li:last-child { border-bottom: 0; }
.tbl li i { font-style: normal; color: var(--muted); width: 18px; text-align: right; }
.tbl li.head { color: var(--blue-d); font-weight: 700; }
.tbl li.empty { color: #b5bccb; }
.tbl li.split::after { content: "拆桌"; margin-left: auto; font-size: 11px; color: #9a7b00; background: #fff3c4; border-radius: 6px; padding: 0 5px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; font-size: 13px; }
.small { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; }
.small.danger { color: var(--red); border-color: #f1c4c4; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input { flex: 1; min-width: 160px; font-size: 15px; padding: 8px 12px; }
.scroll { overflow-x: auto; }
@media print {
  body.admin { background: #fff; }
  .admin .noprint { display: none !important; }
  .card { box-shadow: none; }
}
.bigs { display: flex; flex-wrap: wrap; justify-content: center; }
.bigs .tablebig:not(:only-child) { width: 104px; height: 104px; }
.bigs .tablebig:not(:only-child) b { font-size: 40px; }
