:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #6a6a66;
  --line: #e6e6e2;
  --focus: #111111;
  --ok: #1a7a3a;
  --bad: #b42318;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 560;
  letter-spacing: -0.03em;
}

h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: uppercase; color: var(--muted); }
h3 { font-size: 15px; font-weight: 600; }

.top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-inner, .wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.top-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 18px;
}

.brand {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.live {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 48px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 50vh;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
}

.list { list-style: none; margin: 0; padding: 0; }

.order, .place {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.order:last-child, .place:last-child { border-bottom: 0; }

.order-main { display: flex; gap: 14px; min-width: 0; }

.order-id {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
  padding-top: 2px;
  width: 48px;
  flex: none;
}

.order-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: none;
}

.preview, .meta, .hint, time {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.preview { color: var(--ink); }

time { font-variant-numeric: tabular-nums; font-size: 12px; }

.add { padding: 16px 18px; border-bottom: 1px solid var(--line); }

.add label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.row { display: flex; gap: 8px; }

.row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0 10px;
  font: inherit;
  color: var(--ink);
}

.row input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--surface);
}

.row button {
  height: 36px;
  padding: 0 14px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 560;
  cursor: pointer;
}

.text-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-btn.copied { text-decoration: none; color: var(--ok); }

.place { display: block; }

.place-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.invite { margin-top: 10px; }
.invite summary {
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  list-style: none;
}
.invite summary::-webkit-details-marker,
.invite summary::marker { display: none; content: ""; }
.invite .hide { display: none; }
.invite[open] .show { display: none; }
.invite[open] .hide { display: inline; }

.link {
  display: block;
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.warn, .ok { font-size: 12px; margin: 8px 0 0; }
.warn { color: var(--bad); }
.ok { color: var(--ok); }

.empty { padding: 28px 18px; color: var(--muted); }
.empty p { margin: 0 0 6px; }

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

.login { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.login label { font-size: 12px; color: var(--muted); }
.login input {
  height: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 10px;
  font: inherit;
}
.login input:focus { outline: none; border-color: var(--ink); }
.login button {
  margin-top: 8px;
  height: 36px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 560;
  cursor: pointer;
}

.home { display: grid; place-items: center; min-height: 100vh; }
.home-box { max-width: 440px; padding: 24px; }
.lede { margin: 10px 0 0; color: var(--muted); }

.stack { display: flex; flex-direction: column; gap: 8px; }
.stack input[type="text"],
.stack input[type="password"],
.stack input[type="tel"],
.stack input[type="file"] {
  height: 36px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0 10px;
  font: inherit;
  color: var(--ink);
}
.stack input[type="file"] {
  padding: 6px 10px;
  background: var(--surface);
}
.stack button {
  margin-top: 8px;
  height: 36px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 560;
  cursor: pointer;
  align-self: start;
  padding: 0 14px;
}
.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}
.chk input { margin: 0; }
.mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.mini input[type="file"] { font: inherit; font-size: 12px; }
.mini button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
}
.danger { color: var(--bad); }
.flash { margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); }

@media (max-width: 800px) {
  .wrap { grid-template-columns: 1fr; }
  .top-inner { flex-direction: column; align-items: flex-start; }
  .order { flex-direction: column; }
  .order-side { align-items: flex-start; }
}
