/* 部品の動きだけ(見た目は題材ごとに決める)。色は各サイトで --ad-line / --ad-text / --focus を定義する。 */
*, *::before, *::after { box-sizing: border-box; }
:focus-visible { outline: 3px solid var(--focus, currentColor); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button, select, input, .btn { min-height: 44px; }
[hidden] { display: none !important; }

/* 広告(サイト優先): 本文の幅は --main-w でサイトが決める。縦長枠は本文の外の余白に固定表示し、本文を狭めない。
   表示する幅は各サイトの CSS で `@media (min-width: 本文幅+2*(160+32)px) { .ad-slot.rail { display:flex } .ad-slot.inline { display:none } }` と書く。 */
.layout { max-width: var(--main-w, 720px); margin: 0 auto; padding: 0 16px; }
.main { min-width: 0; }
.ad-slot { border: 1px dashed var(--ad-line, #8888); border-radius: 8px; display: flex; flex-direction: column; }
.ad-slot small { font-size: 11px; color: var(--ad-text, inherit); padding: 2px 8px; }
.ad-slot .ad-body { flex: 1; }
.ad-slot.inline { width: 100%; max-width: 336px; min-height: 280px; margin: 32px auto 0; }
.ad-slot.rail { display: none; position: fixed; top: 24px; width: 160px; height: 600px; }
.rail.left { right: calc(50% + var(--main-w, 720px) / 2 + 16px); }
.rail.right { left: calc(50% + var(--main-w, 720px) / 2 + 16px); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
