:root {
  color-scheme: light;
  --ink: #192126;
  --muted: #65727a;
  --paper: #f5f6f2;
  --panel: #ffffff;
  --line: #d9ded7;
  --line-strong: #b9c3bf;
  --accent: #008f8a;
  --accent-strong: #006965;
  --accent-soft: #e1f3ef;
  --hot: #f0a629;
  --hot-soft: #fff1d2;
  --violet: #5b4cc4;
  --charcoal: #11191f;
  --shadow: 0 18px 44px rgba(17, 25, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 143, 138, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(91, 76, 196, 0.07) 1px, transparent 1px),
    var(--paper);
  background-size: 30px 30px;
  font-family: "Yu Gothic UI", "Meiryo UI", "Segoe UI", system-ui, sans-serif;
  line-height: 1.72;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #004d49;
}

.site-hero {
  position: relative;
  min-height: 72vh;
  color: #ffffff;
  background:
    linear-gradient(115deg, rgba(17, 25, 31, 0.94) 0%, rgba(17, 25, 31, 0.86) 46%, rgba(0, 143, 138, 0.54) 100%),
    url("screenshot/yuhex1.jpg") center center / cover;
  border-bottom: 8px solid var(--hot);
  overflow: hidden;
}

.site-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 70px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 42px);
  mask-image: linear-gradient(90deg, #000 0%, transparent 72%);
}

.hero-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 52px;
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
}

.hero-nav a {
  color: #e9fffb;
  text-decoration: none;
  font-weight: 700;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-icon {
  width: clamp(64px, 10vw, 104px);
  height: clamp(64px, 10vw, 104px);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  color: #e9fffb;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

h1 {
  margin: 18px 0 12px;
  font-size: clamp(4rem, 14vw, 9.4rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: #eefcf8;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--accent-strong);
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

.button:hover {
  color: #ffffff;
  background: #004d49;
}

.button.primary {
  color: #241907;
  background: var(--hot);
  border-color: var(--hot);
}

.button.primary:hover {
  color: #241907;
  background: #ffc15d;
}

.button.light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.38);
}

.layout {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  padding: 38px 0 64px;
}

.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
}

.toc {
  padding: 18px;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.toc h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.94rem;
  letter-spacing: 0.08em;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li + li {
  border-top: 1px solid #edf0eb;
}

.toc a {
  display: block;
  padding: 8px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.96rem;
}

main {
  min-width: 0;
}

section,
.page-panel {
  margin-bottom: 28px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

section h2,
.page-panel h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: 0;
}

section h2::before,
.page-panel h2::before {
  content: "";
  width: 12px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--violet));
}

h3 {
  margin: 20px 0 8px;
  font-size: 1.08rem;
}

p {
  margin: 0 0 14px;
}

p:last-child {
  margin-bottom: 0;
}

.note {
  color: var(--muted);
}

.download-heading {
  margin: 22px 0 10px;
  font-size: 1.08rem;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow-wrap: anywhere;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: #25343b;
  background: var(--accent-soft);
  font-weight: 700;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

.downloads a {
  display: inline-block;
  margin-right: 10px;
  font-weight: 700;
}

.feature-grid,
.link-grid,
.edition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.feature-item,
.link-card,
.edition-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.feature-item strong,
.link-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.edition-card h3 {
  margin-top: 0;
}

.edition-card ul {
  margin: 0;
  padding-left: 1.2em;
}

.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

figure img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef3ed;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #25343b;
  font-size: 0.95rem;
}

.shortcut-table td:first-child {
  width: 180px;
  white-space: nowrap;
}

.history {
  margin: 0;
  padding-left: 1.2em;
}

.history-list {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.history-list:last-child {
  margin-bottom: 0;
}

.simple-header {
  color: #ffffff;
  background: var(--charcoal);
  border-bottom: 6px solid var(--hot);
}

.simple-header-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 34px;
}

.simple-header h1 {
  margin: 18px 0 10px;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
}

.simple-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.simple-header nav a {
  color: #e9fffb;
  text-decoration: none;
  font-weight: 700;
}

.simple-main {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.simple-main th {
  width: 120px;
  min-width: 120px;
  white-space: nowrap;
  overflow-wrap: normal;
}

.footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

.language-page[hidden] {
  display: none;
}

html[lang="ja"] .language-page[data-language="en"],
html[lang="en"] .language-page[data-language="ja"] {
  display: none;
}

.language-toggle {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.language-toggle:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-hero::before,
.simple-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -32%;
  width: 24%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.11), transparent);
  /* 横切るスピード */
  animation: hero-shine 16s ease-in-out infinite;
}

.simple-header {
  position: relative;
  overflow: hidden;
}

html.has-js section,
html.has-js .page-panel {
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease, transform 600ms ease;
}

html.has-js section.visible,
html.has-js .page-panel.visible {
  opacity: 1;
  transform: none;
}

section::after,
.page-panel::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -30%;
  width: 18%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  transform: skewX(-12deg);
}

section.visible::after,
.page-panel.visible::after {
  animation: panel-shine 1100ms ease-out 180ms both;
}

.struct-page {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.struct-page > h1 {
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 1;
}

.language-switch {
  text-align: right;
}

.struct-page .language-toggle {
  color: var(--accent-strong);
}

.struct-page pre {
  overflow-x: auto;
  padding: 16px;
  border-left: 4px solid var(--accent);
  background: #eef3ed;
}

@keyframes hero-shine {
  0%,
  
  /* 横切り始めるまでの待機時間の比率 */
  10% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(620%);
  }
}

@keyframes panel-shine {
  from {
    transform: translateX(0) skewX(-12deg);
  }

  to {
    transform: translateX(760%) skewX(-12deg);
  }
}

@media (max-width: 820px) {
  .site-hero {
    min-height: 64vh;
  }

  .hero-shell,
  .layout,
  .footer,
  .simple-header-inner,
  .simple-main {
    width: min(100% - 28px, 1120px);
  }

  .brand-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar {
    position: static;
  }

  html.has-js section,
  html.has-js .page-panel {
    padding: 22px 18px;
  }

  th,
  td {
    display: block;
    width: 100%;
  }

  th {
    border-bottom: 0;
  }

  .shortcut-table td:first-child {
    width: 100%;
  }
}

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

  section,
  .page-panel {
    opacity: 1;
    transform: none;
  }
}
