/* ═══════════════════════════════════════════════════════════════
   UJIYARI — Reset & Base
═══════════════════════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  color: var(--color-text-secondary);
  background-color: var(--color-bg);
  line-height: var(--leading-normal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-brand-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-brand-dark); }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  color: inherit;
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
}

::selection {
  background: var(--color-brand);
  color: var(--color-white);
}

:focus-visible {
  outline: 2px solid var(--color-brand-light);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Smooth scrollbar on supported browsers */
@supports (scrollbar-width: thin) {
  * { scrollbar-width: thin; scrollbar-color: var(--color-border) transparent; }
}

/* ── Ensure [hidden] always hides — browser UA can be overridden by CSS */
[hidden] { display: none !important; }

/* ── Superscript & Subscript ───────────────────────────────── */
/* Global fix: browser defaults often break line-height in running text */
sup, sub {
  font-size: 0.72em;
  line-height: 0;       /* removes vertical impact on surrounding line */
  position: relative;
  vertical-align: baseline;
}
sup { top: -0.5em; }
sub { bottom: -0.25em; }
