/* ==========================================================================
   TowerManDB Design Tokens (S2)
   仕様: S2 ブリーフの「デザイントークン（厳守）」セクション
   作成: 2026-05-28
   ========================================================================== */

:root {
  /* ---------- Color ---------- */
  --tm-bg: #FFFFFF;
  --tm-bg-alt: #FAFAF8;
  --tm-text-primary: #1A1A1A;
  --tm-text-secondary: #555555;
  --tm-text-muted: #8A8A8A;
  --tm-border: #E5E3DE;
  --tm-border-strong: #C8C5BE;
  --tm-accent: #14233F;
  --tm-accent-hover: #1F2D4D;
  --tm-accent-soft: #F0F2F7;
  --tm-warning: #8B6914;
  --tm-positive: #2D5F3F;
  --tm-negative: #7A2424;

  /* ---------- Typography ---------- */
  --tm-font-jp: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --tm-font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --tm-fs-xs: 12px;
  --tm-fs-sm: 13px;
  --tm-fs-base: 15px;
  --tm-fs-md: 17px;
  --tm-fs-lg: 20px;
  --tm-fs-xl: 24px;
  --tm-fs-2xl: 32px;
  --tm-fs-3xl: 40px;
  --tm-lh-tight: 1.3;
  --tm-lh-base: 1.7;
  --tm-lh-loose: 1.9;
  --tm-fw-regular: 400;
  --tm-fw-medium: 500;
  --tm-fw-semibold: 600;

  /* ---------- Spacing (8px grid) ---------- */
  --tm-space-1: 4px;
  --tm-space-2: 8px;
  --tm-space-3: 12px;
  --tm-space-4: 16px;
  --tm-space-5: 24px;
  --tm-space-6: 32px;
  --tm-space-7: 48px;
  --tm-space-8: 64px;
  --tm-space-9: 96px;

  /* ---------- Radius / Shadow ---------- */
  --tm-radius-sm: 2px;
  --tm-radius-md: 4px;
  --tm-radius-lg: 8px;
  --tm-radius-pill: 999px;
  --tm-shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04);
  --tm-shadow-md: 0 2px 8px rgba(26, 26, 26, 0.06);
  --tm-shadow-lg: 0 8px 24px rgba(26, 26, 26, 0.08);

  /* ---------- Layout ---------- */
  --tm-container-max: 1180px;
  --tm-container-px: 24px;

  /* ---------- Transitions ---------- */
  --tm-transition-fast: 120ms ease;
  --tm-transition-base: 200ms ease;
}

@media (min-width: 768px) {
  :root {
    --tm-container-px: 32px;
  }
}

/* ==========================================================================
   Reset / Base
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
}

button {
  cursor: pointer;
  text-align: inherit;
}

a {
  color: var(--tm-text-primary);
  text-decoration: none;
  transition: color var(--tm-transition-base);
}

a:hover {
  color: var(--tm-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--tm-accent);
  outline-offset: 2px;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--tm-font-jp);
  font-size: var(--tm-fs-base);
  line-height: var(--tm-lh-base);
  font-weight: var(--tm-fw-regular);
  letter-spacing: 0.02em;
  color: var(--tm-text-primary);
  background: var(--tm-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:lang(en), .tm-en {
  font-family: var(--tm-font-en);
  letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--tm-fw-semibold);
  line-height: var(--tm-lh-tight);
  letter-spacing: 0.02em;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Accessibility helpers */
.tm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tm-container {
  max-width: var(--tm-container-max);
  margin: 0 auto;
  padding-left: var(--tm-container-px);
  padding-right: var(--tm-container-px);
}
