:root {
  --bg: #101014;
  --card: #17171d;
  --card2: #1f1f26;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --border: rgba(255,255,255,0.08);
  --line: rgba(255,255,255,0.1);
  --hover: rgba(255,255,255,0.06);
  --brand: #f2b13d;
  --brand-600: #d9971f;
  --brand-300: #f5c561;
  --brand-400: #f4bc4f;
  --brand-soft: rgba(242,177,61,0.12);
  --ring: rgba(242,177,61,0.28);
  --pos: #8fce5a;
  --neg: #e5534b;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
html {
  background: var(--bg);
  color: var(--fg);
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 0.9375rem;
}
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}
main.narrow { max-width: 452px; }
p { margin: 0 0 16px; }
a {
  color: var(--brand-300);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(245,197,97,0.35);
}
a:hover { text-decoration-color: currentColor; }
code, pre { font-family: var(--mono); }
code { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--ring); color: var(--fg); }

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  line-height: 1;
  border-radius: 8px;
}
.brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; color: var(--brand); flex: none; }
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a, .site-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(244,244,245,0.82);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav button:hover { background: rgba(255,255,255,0.1); color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--brand-400); background: var(--brand-soft); }
.site-nav form { margin: 0; display: contents; }
.who {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 240px;
  padding: 0 12px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-button { display: none; }

/* 見出しと本文の階層 */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}
h1::before {
  content: "";
  flex: none;
  width: 4px;
  height: 1.1em;
  border-radius: 2px;
  background: var(--brand);
}
.page-head h1 { margin: 0; }
.lead { color: var(--muted); font-size: 0.9375rem; margin: -8px 0 24px; }
.note { color: var(--muted); font-size: 0.8125rem; margin: 12px 0 0; }
.crumbs { font-size: 0.8125rem; color: var(--muted); margin: 0 0 12px; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pos); }

/* 面 */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.04);
  padding: 24px;
  margin: 0 0 16px;
}
.card > :last-child { margin-bottom: 0; }
.table-card { padding: 0; overflow: hidden; }

/* フォーム部品 */
.field { margin: 0 0 16px; }
.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(244,244,245,0.75);
  margin: 0 0 6px;
}
.input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card2);
  color: var(--fg);
  font: inherit;
  font-size: 0.9375rem;
}
.input::placeholder { color: rgba(161,161,170,0.7); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
#secret { font-family: var(--mono); letter-spacing: 0.04em; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--card2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.btn-primary:hover { background: var(--brand-400); border-color: var(--brand-400); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 0.8125rem; }
.btn-block { width: 100%; min-height: 44px; font-size: 0.9375rem; margin-top: 8px; }
.actions { display: flex; gap: 10px; margin: 0 0 16px; }
/* 文言が「コピーしました」に変わって幅が縮んでも段組みが変わらないよう、等幅固定にする */
.actions .btn { flex: 1 1 0; min-width: 0; }
@media (max-width: 600px) {
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; min-height: 44px; }
}
.error {
  display: flex;
  gap: 10px;
  border: 1px solid rgba(229,83,75,0.4);
  background: rgba(229,83,75,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
  margin: 0 0 16px;
}
.error::before {
  content: "";
  flex: none;
  width: 3px;
  border-radius: 2px;
  background: var(--neg);
}

/* ログイン・エラー */
.auth { padding-top: 16px; }
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 24px;
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.auth-brand .logo { width: 40px; height: 40px; }
.auth-foot { text-align: center; font-size: 0.8125rem; color: var(--muted); margin: 20px 0 0; }
.err { text-align: center; padding: 40px 24px; }
h1.err-status {
  display: block;
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin: 0 0 12px;
}
h1.err-status::before { display: none; }
.err-link { margin: 0; font-size: 0.875rem; }

/* 受信箱の表 */
table { width: 100%; border-collapse: collapse; }
th {
  height: 44px;
  padding: 0 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,0.03); }
.mails { table-layout: fixed; }
.mails .when {
  width: 104px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mails .from { width: 30%; color: var(--muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
.mails .subj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mails .subj a { color: var(--fg); text-decoration: none; font-weight: 500; }
.mails .subj a:hover { color: var(--brand-300); text-decoration: underline; }
.mails .code { width: 184px; white-space: nowrap; }
.mails .code code { font-size: 1.125rem; font-weight: 700; letter-spacing: 0.08em; }
.mails .code .btn { margin-left: 8px; vertical-align: middle; }
.mails .empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* メール1通 */
.meta {
  display: grid;
  grid-template-columns: 5em minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
  font-size: 0.9375rem;
}
.meta dt { color: var(--muted); font-size: 0.8125rem; padding-top: 2px; }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.otp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 12px;
}
.otp .label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 4px;
}
.big {
  display: block;
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
}
pre.body {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.7;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 0;
}

/* 2FA */
.totp {
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 16px 20px;
  margin: 4px 0 20px;
}
.totp .big { font-size: 3rem; letter-spacing: 0.22em; min-height: 1.1em; }
#code.msg { font-family: inherit; font-size: 0.9375rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
#left {
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  min-height: 1.3em;
  margin: 10px 0 12px;
}
.barwrap { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
#bar { height: 100%; width: 0; background: var(--brand); }
#bar.low { background: var(--neg); }

/* フッター */
.site-footer { border-top: 1px solid var(--line); background: var(--card); }
.site-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}
.domains { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); line-height: 1.7; overflow-wrap: anywhere; margin: 16px 0 0; }

@media (max-width: 720px) {
  .site-header-inner { height: 56px; }
  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    margin-right: -8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--fg);
    cursor: pointer;
  }
  .menu-button:hover { background: rgba(255,255,255,0.1); }
  .menu-button svg { width: 22px; height: 22px; }
  .menu-button .ico-close { display: none; }
  .menu-button[aria-expanded="true"] .ico-menu { display: none; }
  .menu-button[aria-expanded="true"] .ico-close { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 40;
    margin: 0;
    padding: 12px 16px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -16px rgba(0,0,0,0.7);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a, .site-nav button {
    width: 100%;
    min-height: 44px;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: normal;
  }
  .site-nav form { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
  .site-nav form button { color: var(--neg); }
  .who {
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
    padding: 6px 12px 12px;
    margin: 0 0 6px;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 600px) {
  main { padding: 24px 12px 48px; }
  .card { padding: 20px 16px; }
  .otp, pre.body { padding: 16px; }
  .big { font-size: 2rem; }
  .totp .big { font-size: 2.5rem; }
  .btn, .btn-sm { min-height: 44px; }
  .mails thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mails, .mails tbody { display: block; width: 100%; }
  .crumbs a, .auth-foot a, .err-link a { display: inline-flex; align-items: center; min-height: 44px; }
  .mails tr {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "when code" "subj code" "from code";
    column-gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .mails tbody tr:last-child { border-bottom: 0; }
  .mails tbody tr:hover { background: rgba(255,255,255,0.03); }
  .mails td { display: block; padding: 0; border: 0; }
  .mails .when, .mails .from, .mails .code { width: auto; }
  .mails tbody tr:hover td { background: transparent; }
  .mails .when { grid-area: when; font-size: 0.75rem; }
  .mails .subj { grid-area: subj; white-space: normal; overflow-wrap: anywhere; margin-top: 2px; }
  .mails .subj a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
  .mails .from { grid-area: from; margin-top: 2px; }
  .mails .code {
    position: relative;
    z-index: 1;
    grid-area: code;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .mails .code .btn { margin: 0; }
  .mails .empty { grid-column: 1 / -1; padding: 40px 8px; }
}

/* 入力欄の内側右端に貼り付けアイコンを浮かせる。入力欄側は文字が重ならないよう右に空ける */
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 40px; }
.paste-button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* 見た目は 32px のまま、押せる範囲だけ 44px に広げる */
.paste-button::before { content: ""; position: absolute; inset: -6px; }
.paste-button svg { width: 16px; height: 16px; }
.paste-button:hover, .paste-button:focus-visible { color: var(--brand); }
.paste-button.is-failed { color: var(--neg); box-shadow: 0 0 0 1px var(--neg); }

/* 受信箱の更新ボタンは見出しの行に収める */
.page-head .btn { align-self: center; height: 32px; min-height: 32px; padding: 0 12px; font-size: 0.8125rem; }

/* シャドウバン */
.sb-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 8px;
}
.sb-progress-head .pct { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--brand-400); }
.sb-bar { height: 100%; width: 0; background: var(--brand); }
.sb-profile { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0 0 16px; }
.sb-avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card2);
}
.sb-profile-info { min-width: 0; }
.sb-profile-name { font-weight: 700; overflow-wrap: anywhere; }
.sb-profile-handle, .sb-profile-counts { font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.sb-verified {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  vertical-align: middle;
}
.sb-verdict {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  margin: 0 0 16px;
}
.sb-verdict .sb-label { font-size: 1.25rem; font-weight: 700; }
.sb-verdict p { margin: 6px 0 0; font-size: 0.875rem; color: var(--muted); }
.sb-verdict.tone-ok { border-color: rgba(143,206,90,0.4); background: rgba(143,206,90,0.08); }
.sb-verdict.tone-ok .sb-label { color: var(--pos); }
.sb-verdict.tone-warn { border-color: rgba(242,177,61,0.4); background: rgba(242,177,61,0.08); }
.sb-verdict.tone-warn .sb-label { color: var(--brand-300); }
.sb-verdict.tone-bad { border-color: rgba(229,83,75,0.4); background: rgba(229,83,75,0.1); }
.sb-verdict.tone-bad .sb-label { color: var(--neg); }
.sb-notice {
  border: 1px solid rgba(229,83,75,0.4);
  background: rgba(229,83,75,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.8125rem;
  margin: 0 0 16px;
}
.sb-flags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.sb-chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.sb-chip.tone-ok { color: var(--pos); border-color: rgba(143,206,90,0.4); }
.sb-chip.tone-warn { color: var(--brand-300); border-color: rgba(242,177,61,0.4); }
.sb-chip.tone-bad { color: var(--neg); border-color: rgba(229,83,75,0.4); }
.sb-chip.tone-neutral { color: var(--muted); }
.sb-items { border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; margin: 0 0 16px; }
.sb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.sb-item:last-child { border-bottom: 0; }
.sb-item-label { font-size: 0.9375rem; font-weight: 500; }
.sb-item-hint { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.sb-latest { font-size: 0.8125rem; color: var(--muted); margin: 0 0 16px; }
.sb-evidence { margin: 0; }
.sb-evidence summary {
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card2);
  font-size: 0.875rem;
  font-weight: 600;
}
.sb-evidence[open] summary { border-radius: 8px 8px 0 0; }
.sb-evidence-body {
  padding: 12px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.sb-evidence-body h3 { font-size: 0.8125rem; font-weight: 600; color: var(--fg); margin: 12px 0 6px; }
.sb-evidence-body h3:first-child { margin-top: 0; }
.sb-query {
  display: block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  margin: 0 0 6px;
}
.sb-samples { list-style: none; margin: 0; padding: 0; }
.sb-samples li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}
.sb-samples .found { font-weight: 600; color: var(--fg); margin-top: 4px; }
.sb-out h2 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 8px; }
.sb-summary { font-size: 0.8125rem; color: var(--muted); margin: 0 0 16px; }
.sb-summary .ok { color: var(--pos); font-weight: 600; }
.sb-summary .bad { color: var(--neg); font-weight: 600; }
.sb-summary .neutral { color: var(--fg); font-weight: 600; }
.sb-posts { list-style: none; margin: 0; padding: 0; }
.sb-post { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin: 0 0 12px; }
.sb-post:last-child { margin-bottom: 0; }
.sb-post-text {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sb-post-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.75rem; color: var(--muted); margin: 0 0 8px; }
.sb-post-meta a { display: inline-flex; align-items: center; min-height: 24px; }
.sb-post-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 0.6875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin: 0 0 10px;
}
.sb-post-badges { display: flex; flex-wrap: wrap; gap: 6px; }
