
:root {
  --bg: #f7f7f5; --surface: #ffffff; --text: #1f2328; --muted: #6b7076; --line: #e3e3df;
  --accent: #2f6fde; --accent-text: #ffffff; --danger: #c43d3d; --chip: #efefeb; --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a; --surface: #202124; --text: #e8e8e6; --muted: #9a9ea4; --line: #33353a;
    --accent: #6b9bff; --accent-text: #0f1115; --danger: #ff7a7a; --chip: #2a2c30;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
button, input { font: inherit; color: inherit; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px 48px; }
.narrow { max-width: 400px; margin: 12vh auto 0; padding: 0 16px; }
.brand { font-weight: 700; letter-spacing: .02em; }
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 24px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
input[type=email], input[type=text], input[inputmode=numeric] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.code { letter-spacing: .4em; font-size: 20px; text-align: center; }
.btn { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.link.danger { color: var(--danger); }
.error { color: var(--danger); font-size: 14px; min-height: 1.4em; margin: 0; }
header.top { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
header.top .who { margin-left: auto; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { background: none; border: 0; padding: 8px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: var(--chip); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px; }
.chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.entry + .entry { margin-top: 8px; }
.entry .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.entry .title { font-weight: 600; margin-top: 2px; }
.entry .text { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .btn { margin-top: 12px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
.badge { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; color: var(--muted); }
.danger-zone { margin-top: 24px; }
@media (max-width: 520px) {
  .narrow { margin-top: 8vh; }
  header.top .email { display: none; }
}
