/* Lindy 共通CSS（全サイト）。正本は shared/lindy.css。各サイトへは tools/sync-shared.sh でコピーする。 */

/* ── 全室共通の3テーマ（羊皮紙 paper / 白紙 white / 夜更け night）と古典活字 */
:root {
  --serif: "Shippori Mincho","Hiragino Mincho ProN","Yu Mincho","YuMincho","Noto Serif JP","Noto Serif CJK JP","Source Han Serif JP","EB Garamond","Iowan Old Style","Palatino Linotype","Book Antiqua",Georgia,serif;
}
html[data-ct="paper"], html[data-ct="paper"] .reader, html[data-ct="paper"] .reader[class],
html[data-ct="white"], html[data-ct="white"] .reader, html[data-ct="white"] .reader[class] {
  --paper: #ffffff !important; --paper-2: #f6f6f4 !important; --card: #f6f6f4 !important;
  --ink: #141414 !important; --ink-2: #3d3d3a !important; --ink-3: #77746d !important; --mute: #77746d !important;
  --ai: #141414 !important; --line: rgba(20,20,20,.15) !important; --line-2: rgba(20,20,20,.08) !important;
  --bg: #ffffff !important; --fg: #141414 !important; --dim: #77746d !important;
  color-scheme: light;
}
html[data-ct="night"], html[data-ct="night"] .reader, html[data-ct="night"] .reader[class] {
  --paper: #111111 !important; --paper-2: #1a1a1a !important; --card: #1a1a1a !important;
  --ink: #e8e6e1 !important; --ink-2: #b5b2aa !important; --ink-3: #85827a !important; --mute: #85827a !important;
  --ai: #e8e6e1 !important; --line: rgba(255,255,255,.16) !important; --line-2: rgba(255,255,255,.08) !important;
  --bg: #111111 !important; --fg: #e8e6e1 !important; --dim: #85827a !important;
  color-scheme: dark;
}
html[data-room-theme="dark"], html[data-room-theme="dark"][data-ct] {
  --paper: #0b0b0d !important; --paper-2: #141418 !important; --card: #15151a !important;
  --ink: #efece6 !important; --ink-2: #b4b0a8 !important; --ink-3: #76726b !important; --mute: #76726b !important;
  --ai: #efece6 !important; --line: rgba(255,255,255,.12) !important; --line-2: rgba(255,255,255,.06) !important;
  --bg: #0b0b0d !important; --fg: #efece6 !important; --dim: #76726b !important;
  color-scheme: dark;
}
html[data-room-theme="dark"] body {
  background: #0b0b0d !important;
  color: #efece6 !important;
}
.ctseg .s-paper { display: none !important; }
html[data-ct] body {
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: var(--serif) !important;
}

/* ── テーマ切替丸玉（枠線・四角を排した柔らかい円形） */
.ctseg {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.ctseg button {
  width: 26px !important;
  height: 26px !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 50% !important;
  opacity: 0.45;
  padding: 0 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(128,128,128,.35) !important;
}
.ctseg button.on {
  opacity: 1;
  box-shadow: inset 0 0 0 1.5px currentColor !important;
}
.ctseg .s-paper { background: #f4efe3 !important; color: #1f1a14 !important; }
.ctseg .s-white { background: #ffffff !important; color: #141414 !important; }
.ctseg .s-night { background: #17150f !important; color: #d9d0bf !important; }

/* ── 全室共通ヘッダー（左：書物風タイトル＆部屋切替、右：組版記号） */
.lsh-bar, nav.tabs {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  max-width: 1120px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 20px 8px !important;
  background: transparent !important;
}
.lsh-bar[hidden], nav.tabs[hidden] {
  display: none !important;
}
.lsh-acts {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.lsh-sym {
  background: none !important;
  border: 0 !important;
  outline: 0 !important;
  padding: 6px 8px;
  color: inherit;
  opacity: 0.62;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lsh-sym:hover, .lsh-sym.cur, .lsh-sym.on, .tabs a.cur, .tabs .tab.on {
  opacity: 1 !important;
}

/* ── 物質感（紙のテクスチャ／微小ノイズ） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.026;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
[data-ct="night"] body::before, html.night body::before {
  opacity: 0.015;
}

/* ── ボーダーの完全撤廃（ネガティブスペースで語る） */
header, .bar, .tabs, .r-bar, .r-scrub, nav.tabs, .h-head, .home-head,
.tab, button.tab, .header-bar, .head-bar, .top-bar, .sub-bar,
.tabs .rsep, .rsep, .pwa-bar, .h-settings, .r-settings {
  border: none !important;
  box-shadow: none !important;
}
.tabs .rsep, .rsep {
  display: none !important;
}

/* ── 中央寄せの題名・作者・キャプション：要素の幅を文字に合わせる */
.det h1,.det.art h1,.det .who,.det .perf,
.home h1,.src,
.pl h1,.pl p,
.wd-meta
{width:fit-content;max-width:100%;margin-inline:auto}

/* ── Chrome翻訳／日本語テキストの視覚補正 */
html.translated-ltr .r-body,
html.translated-ltr .r-body p,
html.translated-ltr font,
.r-body:lang(ja),
.r-body.cjk {
  font-weight: 500 !important;
  color: var(--ink) !important;
  letter-spacing: 0.02em !important;
  -webkit-font-smoothing: antialiased;
}
