/* app.css */

:root {
  --bg: #ffffff;
  --fg: #111111;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --fg: #f5f5f5;
}

html {
  background-color: var(--bg);
  transition: background-color 0.3s, color 0.3s;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: "Inter", "Noto Sans JP", sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

html, body {
  overscroll-behavior-y: none;
}


/* Footer styles */
.site-footer {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 28px 16px;
  background: transparent;
  color: var(--fg);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 20px;
  width: 100%;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.footer-link {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 120ms ease, transform 120ms ease;
}

/* Force link/visited/hover/active/focus inside footer to inherit color and override global a:visited */
.footer-link:link,
.footer-link:visited,
.footer-link:hover,
.footer-link:active,
.footer-link:focus {
  color: inherit !important;
}

.footer-link:hover {
  opacity: 0.95;
  text-decoration: underline;
  transform: translateY(-1px);
}

/* External icon: subtle indicator for external links */
.externalIcon {
  font-size: 0.8em;
  opacity: 0.6;
  transition: opacity 120ms ease, transform 120ms ease;
  /* keep color inherited */
}

.footer-link:hover > .externalIcon {
  opacity: 0.9;
  transform: translateY(-1px);
}

.footer-link.isDisabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(0,0,0,0.04);
  padding-top: 12px;
}

@media (max-width: 900px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}


/* Header mini nav (right-top small links) */
.header-mini-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-mini-nav-link {
  color: inherit;
  opacity: 0.8;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 120ms ease, text-decoration 120ms ease;
}

/* prevent visited color leak */
.header-mini-nav-link:link,
.header-mini-nav-link:visited,
.header-mini-nav-link:hover,
.header-mini-nav-link:active,
.header-mini-nav-link:focus {
  color: inherit !important;
}

.header-mini-nav-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.header-mini-nav-link.isDisabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}
