@font-face {
  font-family: 'LINE Seed JP';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/LINESeedJP_OTF_Rg.woff2') format('woff2'),
       url('/assets/fonts/LINESeedJP_OTF_Rg.woff') format('woff');
}
@font-face {
  font-family: 'LINE Seed JP';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/LINESeedJP_OTF_Bd.woff2') format('woff2'),
       url('/assets/fonts/LINESeedJP_OTF_Bd.woff') format('woff');
}
:root {
  --blue: #0b5cff;
  --blue-dark: #0848c8;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f6f8;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "LINE Seed JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--blue); }
.topbar {
  background: #0b1220;
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand { font-weight: 700; letter-spacing: .3px; display: flex; align-items: center; gap: 12px; }
.topbar .brand .logo { height: 26px; width: auto; display: block; }
.topbar .brand .brand-sub { font-size: 14px; font-weight: 600; color: #c7d2e0; padding-left: 12px; border-left: 1px solid #33415c; }
.nav { background: #fff; border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 960px; margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; }
.navbtn {
  background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 14px 18px; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.navbtn:hover { color: var(--ink); }
.navbtn.active { color: var(--blue); border-color: var(--blue); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.container { max-width: 960px; margin: 0 auto; padding: 28px 20px 80px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}
textarea { min-height: 80px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: #fff; border: 0; border-radius: 8px;
  padding: 11px 20px; font-size: 15px; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--blue-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: #fff; color: var(--err); border: 1px solid #f3c2c2; }
.btn.block { width: 100%; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.zero { background: #f3f4f6; color: var(--muted); }
.badge.revoked { background: #fee2e2; color: var(--err); }
.badge.expired { background: #fef3c7; color: var(--warn); }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 10px 0; }
.alert.err { background: #fef2f2; color: var(--err); border: 1px solid #fecaca; }
.alert.ok { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }
.dropzone {
  border: 2px dashed #c7d2e0; border-radius: 10px; padding: 26px; text-align: center;
  color: var(--muted); cursor: pointer; background: #fafbfc;
}
.dropzone.drag { border-color: var(--blue); background: #f0f5ff; }
.filelist { list-style: none; padding: 0; margin: 12px 0 0; }
.filelist li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hidden { display: none !important; }

/* アイコン */
.ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; flex: none; }
.muted-ico { color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 2px; background: #eef2f7; color: #334155;
  border-radius: 999px; padding: 3px 10px 3px 8px; font-size: 13px; margin: 2px 4px 2px 0; white-space: nowrap;
}
.chip .ico { width: 14px; height: 14px; margin-right: 3px; }

/* 概要（キー・バリュー）テーブル */
table.kv { width: 100%; border-collapse: collapse; }
table.kv th, table.kv td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
table.kv th { width: 130px; color: var(--muted); font-weight: 600; background: #f7f8fa; white-space: nowrap; }

/* データテーブル */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.data thead th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; background: #f7f8fa; }

/* 受信者ブロック / URLコピー */
.recipient-block { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 12px 0; background: #fafbfc; }
.recipient-head { display: flex; align-items: center; margin-bottom: 10px; }
.urlrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.urlrow-ico { color: var(--muted); display: inline-flex; }
.urlinput {
  flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-family: ui-monospace, monospace; font-size: 13px; background: #fff; color: #334155;
}
.copybtn { padding: 8px 14px; white-space: nowrap; }
.copybtn.ok { background: #f0fdf4; color: var(--ok); border-color: #bbf7d0; }

/* ロールバッジ */
.badge.role-moderator { background: #ede9fe; color: #6d28d9; }
.badge.role-admin { background: #dbeafe; color: #1d4ed8; }
.badge.role-staff { background: #f3f4f6; color: #475569; }
h3 .ico { width: 18px; height: 18px; vertical-align: -4px; }

/* 送信履歴一覧: 折り返し防止（狭い画面は横スクロール） */
.table-scroll { width: 100%; overflow-x: auto; }
.list-transfers .nowrap { white-space: nowrap; }
.list-transfers th { white-space: nowrap; }
.list-transfers .col-to { min-width: 200px; }
.list-transfers td, .list-transfers th { vertical-align: middle; }
.link-box { background: #f3f4f6; border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; }
.steps { display: flex; gap: 8px; margin-bottom: 24px; }
.steps .step { flex: 1; text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 8px; border-bottom: 3px solid var(--line); }
.steps .step.active { color: var(--blue); border-color: var(--blue); font-weight: 700; }
.center-wrap { max-width: 460px; margin: 48px auto; padding: 0 20px; }
.passcode-input { font-size: 28px; letter-spacing: 12px; text-align: center; font-family: ui-monospace, monospace; }
.cone { font-size: 64px; text-align: center; margin: 20px 0; }
.site-footer {
  margin-top: 48px; padding: 24px 20px 36px; text-align: center;
  color: var(--muted); font-size: 13px; border-top: 1px solid var(--line);
}
.site-footer p { margin: 4px 0; }
.site-footer .copyright { color: #9ca3af; font-size: 12px; }
