/* =========================================================
   spfx.css — SharePoint 講座 ベースレイヤー
   旧 /styles.css 廃止に伴い切り出した自己完結ベース。
   値は旧 styles.css と同一。
   ========================================================= */
:root {
  --brand: #f04e4b;
  --brand-deep: #d63d3a;
  --brand-soft: #fef0ef;
  --ink: #1a1a1a;
  --ink-sub: #4a4a4a;
  --ink-soft: #8a8a8a;
  --ink-faint: #b8b5ad;
  --paper: #fafaf7;
  --paper-deep: #f3f1ea;
  --paper-card: #ffffff;
  --line: #e8e6e0;
  --line-soft: #efede7;
  --mint: #eef3ef;
  --font-jp: "Noto Sans JP", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Noto Serif JP", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --container: 1200px;
  --section-pad: clamp(80px, 12vw, 160px);
  --radius: 2px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-jp);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "palt";
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
@media (max-width: 640px) {
  body { line-height: 1.85; }
  :root { --section-pad: clamp(64px, 14vw, 100px); }
}

/* ===== Container ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}
@media (max-width: 380px) {
  .container { padding: 0 16px; }
}

/* ===== To Top Button ===== */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  display: grid;
  place-items: center;
  grid-template-rows: auto auto;
  gap: 1px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .25s, color .25s, border-color .25s;
  font-family: var(--font-jp);
}
.to-top span {
  font-size: 9px;
  letter-spacing: .15em;
  font-weight: 500;
}
.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-2px);
}
@media (max-width: 640px) {
  .to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }
  .to-top span { font-size: 8px; }
}
