* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(233, 75, 119, 0.05) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, rgba(25, 168, 113, 0.05) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 12% 4%, rgba(233, 75, 119, 0.18), transparent 30%),
    radial-gradient(circle at 86% 0%, rgba(25, 168, 113, 0.16), transparent 29%),
    linear-gradient(180deg, #fffaf7 0%, var(--bg) 42%, #fffdf8 100%);
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

a {
  color: #b32d5d;
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid #1f6feb;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-140%);
  padding: 8px 12px;
  background: #fff;
  border: 2px solid #1f6feb;
  border-radius: 10px;
  color: #12376f;
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px clamp(14px, 3vw, 24px) 72px;
}

.hero {
  background:
    linear-gradient(120deg, rgba(49, 24, 63, 0.94) 0%, rgba(175, 46, 100, 0.9) 45%, rgba(22, 145, 103, 0.91) 100%),
    url("https://gametora.com/images/umamusume/supports/tex_support_card_30296.png");
  background-size: cover;
  background-position: center 20%;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -96px;
  width: 390px;
  height: 210px;
  border: 18px solid rgba(255, 255, 255, 0.2);
  border-left-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: rotate(-10deg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 22%, rgba(255, 255, 255, 0.2), transparent 11%),
    linear-gradient(90deg, rgba(32, 14, 42, 0.26), transparent 58%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 14px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

h1 {
  margin: 18px 0 10px;
  font-size: clamp(32px, 4.8vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.91);
  font-size: 17px;
  font-weight: 600;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.image-credit {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.image-credit a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section {
  margin-top: 26px;
  background: rgba(255, 250, 247, 0.94);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(18px, 3vw, 26px);
  box-shadow: 0 12px 34px rgba(102, 34, 58, 0.08);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 25px;
  line-height: 1.35;
}

.section-title::before {
  content: "";
  width: 10px;
  height: 32px;
  border-radius: 999px;
  background: var(--red);
  flex: 0 0 auto;
}

.section-title.green::before {
  background: var(--green);
}

.section-title.orange::before {
  background: var(--orange);
}

.guide-list,
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.guide-card,
.link-card,
.notice {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.guide-card {
  display: grid;
  gap: 10px;
  border-left: 6px solid var(--red);
  background:
    linear-gradient(90deg, var(--red-soft), #fff 36%),
    var(--paper-strong);
}

.guide-card h3,
.link-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}

.guide-card p,
.link-card p,
.notice p {
  margin: 6px 0 0;
  color: var(--muted);
}

.guide-card .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 7px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(233, 75, 119, 0.22);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 7px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(233, 75, 119, 0.22);
}

.guide-card .button:hover {
  text-decoration: none;
  background: linear-gradient(135deg, #d63e68, #dd7628);
}

.button:hover {
  text-decoration: none;
  background: linear-gradient(135deg, #d63e68, #dd7628);
}

.link-card {
  min-height: 112px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(102, 34, 58, 0.1);
}

.link-card.official {
  border-top: 5px solid var(--red);
}

.link-card.strategy {
  border-top: 5px solid var(--green);
}

.notice {
  display: grid;
  gap: 12px;
  background: linear-gradient(135deg, var(--red-soft), var(--green-soft));
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.notice p {
  margin: 0;
  color: var(--ink);
}

.feedback-section {
  background: linear-gradient(135deg, #fff, var(--green-soft));
}

.feedback-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.feedback-summary p {
  margin: -8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.feedback-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 8px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(25, 168, 113, 0.2);
}

.feedback-button:hover {
  text-decoration: none;
  background: linear-gradient(135deg, #148c60, #2c67bd);
}

.share-section {
  background: linear-gradient(135deg, #fff, var(--red-soft));
}

.share-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.share-summary p {
  margin: -8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.share-open-button,
.share-copy-button,
.share-close-button {
  border: 0;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.share-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 24px rgba(233, 75, 119, 0.22);
}

.share-open-button:hover {
  transform: translateY(-1px);
}

.share-dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.share-dialog::backdrop {
  background: rgba(39, 27, 46, 0.46);
  backdrop-filter: blur(4px);
}

.share-dialog-panel {
  padding: 22px;
  border: 1px solid rgba(240, 217, 218, 0.94);
  border-radius: 18px;
  background: var(--paper-strong);
  box-shadow: 0 26px 70px rgba(39, 27, 46, 0.24);
}

.share-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.share-dialog-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.share-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--gray-soft);
}

.share-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 12px;
}

.share-link {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 112px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(102, 34, 58, 0.08);
}

.share-link span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.share-link strong {
  font-size: 13px;
  line-height: 1.25;
}

.share-link:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.share-link.x {
  border-color: #24292f33;
}

.share-link.x span {
  background: #111;
}

.share-link.line {
  border-color: #19a87155;
}

.share-link.line span {
  background: #19a871;
}

.share-link.mixi2 {
  border-color: #16a08555;
}

.share-link.mixi2 span {
  background: #16a085;
  font-size: 18px;
}

.share-link.facebook {
  border-color: #3479d755;
}

.share-link.facebook span {
  background: #3479d7;
  font-family: Arial, sans-serif;
}

.share-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--gray-soft);
}

html[data-view="desktop"] .hero-tags,
html[data-view="desktop"] .category-links {
  row-gap: 8px;
}

html[data-view="desktop"] .guide-card,
html[data-view="desktop"] .link-card {
  min-width: 0;
}

.share-url {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.share-copy-button {
  min-height: 40px;
  padding: 7px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
}

.share-copy-status {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.floating-menu {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.floating-menu-button,
.floating-menu-close {
  border: 0;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.floating-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 16px 34px rgba(102, 34, 58, 0.24);
  pointer-events: auto;
}

.floating-menu-button:hover {
  transform: translateY(-1px);
}

.floating-menu-icon,
.floating-menu-icon::before,
.floating-menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.floating-menu-icon {
  position: relative;
}

.floating-menu-icon::before,
.floating-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.floating-menu-icon::before {
  top: -6px;
}

.floating-menu-icon::after {
  top: 6px;
}

.floating-menu-panel {
  order: -1;
  width: min(360px, calc(100vw - 28px));
  max-height: min(72vh, 620px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(240, 217, 218, 0.96);
  border-radius: 18px;
  background: rgba(255, 250, 247, 0.96);
  box-shadow: 0 24px 64px rgba(39, 27, 46, 0.22);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.floating-menu-panel[hidden] {
  display: none;
}

.floating-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.floating-menu-head strong {
  font-size: 17px;
  line-height: 1.35;
}

.floating-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--gray-soft);
}

.floating-menu-group {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.floating-menu-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.floating-menu-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.floating-menu-links {
  display: grid;
  gap: 8px;
}

.floating-menu-group > a,
.floating-menu-links a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 8px 18px rgba(102, 34, 58, 0.06);
}

.floating-menu-group > a:hover,
.floating-menu-links a:hover {
  background: var(--red-soft);
  text-decoration: none;
}

.floating-menu-share .share-open-button {
  width: 100%;
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(102, 34, 58, 0.08);
}

html[data-view="mobile"] .floating-menu {
  right: max(10px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
}

html[data-view="mobile"] .floating-menu-button {
  justify-content: center;
  width: 46px;
  height: 46px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(102, 34, 58, 0.22);
}

html[data-view="mobile"] .floating-menu-button-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

html[data-view="mobile"] .floating-menu-icon,
html[data-view="mobile"] .floating-menu-icon::before,
html[data-view="mobile"] .floating-menu-icon::after {
  width: 20px;
}

html[data-view="mobile"] .floating-menu-icon::before {
  top: -7px;
}

html[data-view="mobile"] .floating-menu-icon::after {
  top: 7px;
}

html[data-view="mobile"] .floating-menu.is-open .floating-menu-icon {
  background: transparent;
}

html[data-view="mobile"] .floating-menu.is-open .floating-menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

html[data-view="mobile"] .floating-menu.is-open .floating-menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

html[data-view="mobile"] .floating-menu-panel {
  width: min(320px, calc(100vw - 20px));
  max-height: 68vh;
}


/* ── トグルボタン ── */
.view-toggle-btn {
  display: none;
  min-height: 38px;
  padding: 7px 14px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(102, 34, 58, 0.08);
}

.view-toggle-btn:hover {
  background: var(--red-soft);
}

/* ── モバイルレイアウト（html[data-view="mobile"] が付いた場合のみ有効） ── */
@media (max-width: 768px) {
  html[data-view="mobile"] .page {
    padding: 10px 10px 44px;
  }

  html[data-view="mobile"] .hero {
    border-radius: 14px;
    padding: 20px 14px;
  }

  html[data-view="mobile"] .section {
    margin-top: 16px;
    border-radius: 12px;
    padding: 16px 14px;
  }

  html[data-view="mobile"] h1 {
    font-size: 30px;
    line-height: 1.2;
  }

  html[data-view="mobile"] .lead {
    font-size: 15px;
  }

  html[data-view="mobile"] .section-title {
    font-size: 20px;
  }

  html[data-view="mobile"] .hero-tags span {
    min-height: 30px;
    font-size: 12px;
  }

  html[data-view="mobile"] .guide-list,
  html[data-view="mobile"] .link-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  html[data-view="mobile"] .guide-card,
  html[data-view="mobile"] .link-card,
  html[data-view="mobile"] .notice {
    border-radius: 10px;
    padding: 14px;
  }

  html[data-view="mobile"] .button,
  html[data-view="mobile"] .guide-card .button,
  html[data-view="mobile"] .feedback-button {
    width: 100%;
  }

  html[data-view="mobile"] .feedback-summary {
    align-items: stretch;
    flex-direction: column;
  }

  html[data-view="mobile"] .share-summary {
    align-items: stretch;
    flex-direction: column;
  }

  html[data-view="mobile"] .share-open-button {
    width: 100%;
  }

  html[data-view="mobile"] .share-links,
  html[data-view="mobile"] .share-copy {
    grid-template-columns: 1fr;
  }

  html[data-view="mobile"] .share-link,
  html[data-view="mobile"] .share-copy-button {
    width: 100%;
  }

}
