/* Liar's Dice（ライアーズダイス）· 上架用页面（隐私政策 / 用户协议 / 技术支持 / 删除账号）公共样式 */
:root {
  --bg: #f6f5fa;
  --surface: #ffffff;
  --text: #1c1a26;
  --muted: #5f5b73;
  --line: #e4e1ee;
  --accent: #5b35e8;
  --accent-strong: #4a26d1;
  --accent-soft: #eee9ff;
  --accent-text: #ffffff;
  --warn-bg: #fff6e5;
  --warn-line: #f0cf8f;
  --warn-text: #5c3f08;
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e15;
    --surface: #18161f;
    --text: #ebe8f5;
    --muted: #a39fb6;
    --line: #2b2839;
    --accent: #a58bff;
    --accent-strong: #bba6ff;
    --accent-soft: #241e3b;
    --accent-text: #140f26;
    --warn-bg: #2a2214;
    --warn-line: #5c4a22;
    --warn-text: #f1d9a6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  overflow-wrap: anywhere;
}

/* 日英切换：lang.js 设置 <html data-lang>，只显示当前语言的内容 */
html[data-lang="ja"] body [lang="en"],
html[data-lang="en"] body [lang="ja"] { display: none !important; }

.wrap { max-width: 780px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

/* 顶栏 */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.top-row { display: flex; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.logo { width: 34px; height: 34px; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name b { font-size: 16px; }
.brand-name span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.platform {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.lang-switch { flex: none; display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 8px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); font-weight: 600; }

.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none;
  padding: 8px 12px 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tabs a:first-child { padding-left: 0; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

/* 正文 */
main { padding-top: 28px; padding-bottom: 48px; }
.doc h1 { font-size: 28px; line-height: 1.3; margin: 0 0 8px; letter-spacing: -0.01em; }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.doc h2 { font-size: 20px; line-height: 1.4; margin: 40px 0 12px; scroll-margin-top: 130px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 1.4em; }
.doc li { margin: 6px 0; }
.doc li > ul { margin: 6px 0 0; }
.doc strong { font-weight: 650; }

.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 16px 18px; margin: 20px 0 24px; }
.callout.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); }
.callout-title { font-weight: 700; margin: 0 0 4px !important; }
.callout ul { margin: 0; }

.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 18px; margin: 0 0 8px; }
.toc-title { font-weight: 600; font-size: 15px; margin: 0 0 6px !important; }
.toc ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { text-decoration: none; font-size: 15px; }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 15px; line-height: 1.6; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; font-weight: 600; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; width: 22%; }

.steps { list-style: none; padding: 0 !important; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 3px 0 0 44px; margin: 0 0 14px; min-height: 32px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
}
.alpha { list-style: lower-alpha; }
.alpha li { padding-left: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text) !important;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { background: var(--accent-strong); }

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0 28px;
}
.contact p { margin: 0 !important; }
.contact .label { color: var(--muted); font-size: 14px; }
.contact .email { font-size: 20px; font-weight: 600; word-break: break-all; }
.contact .email a { color: var(--text); text-decoration: none; }

details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 0 0 10px; }
summary { cursor: pointer; list-style: none; position: relative; padding: 14px 44px 14px 16px; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details > p { padding: 0 16px; }
details > p:last-child { padding-bottom: 14px; margin-bottom: 0; }

.links { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.plain { list-style: none; padding: 0 !important; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 20px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot p { margin: 0; }

@media (max-width: 560px) {
  .doc h1 { font-size: 24px; }
  .toc ol { columns: 1; }
  .brand-name span { display: none; }

  /* 窄屏：表格每一行显示成一张卡片，列名（data-label）显示在内容上方 */
  .table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: auto; min-width: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tr { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 6px 0 8px; margin: 0 0 12px; }
  .table-wrap td { border: 0; padding: 6px 16px; }
  .table-wrap td:first-child { font-size: 16px; padding-top: 10px; }
  .table-wrap td:first-child br { display: none; }
  .table-wrap td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 2px;
  }
}

@media print {
  .top { position: static; backdrop-filter: none; }
  .lang-switch, .tabs { display: none; }
  details { border: 0; }
  details > p { padding: 0; }
}
