*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: #2a2320;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

em, i       { font-style: normal; }
a           { color: inherit; text-decoration: none; }
img         { display: block; max-width: 100%; }
button      { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
[hidden]    { display: none !important; }

input:focus,
textarea:focus {
  outline: 2px solid rgba(217, 116, 65, 0.3);
  outline-offset: 2px;
}

::selection { background: var(--ink); color: var(--bg); }

/* ===== ローディングオーバーレイ ===== */
#loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: loading-out 0.5s ease 1.2s forwards;
  pointer-events: none;
}

#loading .loading__logo-en {
  font-family: 'Caveat', cursive;
  font-size: 36px;
  color: var(--accent);
  transform: rotate(-3deg);
  display: inline-block;
  animation: loading-logo-in 0.7s ease 0.1s both;
}

#loading .loading__logo-ja {
  font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 4px;
  margin-top: -4px;
  animation: loading-logo-in 0.7s ease 0.2s both;
}

#loading .loading__dots {
  display: flex;
  gap: 8px;
  animation: loading-logo-in 0.5s ease 0.5s both;
}

#loading .loading__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: loading-dot-bounce 0.8s ease infinite;
}

#loading .loading__dot:nth-child(2) { animation-delay: 0.15s; background: var(--accent-gold); }
#loading .loading__dot:nth-child(3) { animation-delay: 0.3s; }

/* コンテンツのフェードイン */
.l-shell {
  animation: loading-shell-in 0.6s ease 1.3s both;
}

@keyframes loading-out {
  to { opacity: 0; visibility: hidden; }
}

@keyframes loading-logo-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes loading-dot-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes loading-shell-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.u-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.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;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  z-index: 9999;
  transition: top 0.2s;

  &:focus { top: 0; }
}
