/* RPGDiary Legal Pages */

@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Noto+Sans+JP:wght@400;500;700&display=swap");

:root {
  --primary: #d4a537;
  --primary-light: #e8c256;
  --primary-pale: #f7e8bb;
  --primary-dark: #9f7316;
  --secondary: #23173f;
  --secondary-soft: #3a2a65;
  --surface: #fffdfa;
  --surface-strong: #ffffff;
  --surface-alt: #f6f0e6;
  --text-primary: #1b1630;
  --text-secondary: #655f78;
  --text-muted: #8d87a1;
  --border-light: rgba(35, 23, 63, 0.08);
  --border-strong: rgba(212, 165, 55, 0.28);
  --shadow-sm: 0 10px 24px rgba(35, 23, 63, 0.08);
  --shadow-md: 0 24px 60px rgba(35, 23, 63, 0.12);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 32px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.85;
  background:
    radial-gradient(circle at top left, rgba(232, 194, 86, 0.2), transparent 26%),
    radial-gradient(circle at top right, rgba(74, 49, 153, 0.14), transparent 24%),
    linear-gradient(180deg, #f8f2e8 0%, #f9f7f2 28%, #f6f3ee 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(212, 165, 55, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 165, 55, 0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.legal-header-inner {
  max-width: 1200px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Press Start 2P", "Noto Sans JP", sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--primary);
  padding-inline: 0.08em;
}

.legal-header-logo::before {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  position: relative;
  top: -1px;
  background: url("/logo.png") center/cover no-repeat;
}

.legal-header-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.legal-header-back:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 165, 55, 0.12);
}

.legal-main {
  width: min(960px, calc(100vw - 32px));
  margin: 36px auto 72px;
  padding: 40px 32px 48px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 253, 250, 0.98)),
    var(--surface);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.legal-main::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-light), var(--secondary-soft));
}

.legal-main h1 {
  font-family: "Press Start 2P", "Noto Sans JP", sans-serif;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.legal-main > p:first-of-type {
  display: inline-flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.legal-intro,
.legal-main p {
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--text-secondary);
}

.legal-main h2 {
  display: inline-flex;
  align-items: center;
  margin-top: 34px;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212, 165, 55, 0.14), rgba(212, 165, 55, 0.04));
  color: var(--secondary);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.legal-main h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.legal-main ul {
  margin-bottom: 16px;
  padding-left: 0;
  list-style: none;
}

.legal-main ul li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 20px;
  font-size: 15px;
  color: var(--text-secondary);
}

.legal-main ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(212, 165, 55, 0.18);
}

.legal-main a {
  color: var(--secondary-soft);
  border-bottom: 1px solid rgba(58, 42, 101, 0.18);
  transition:
    color 0.18s ease,
    border-color 0.18s ease;
}

.legal-main a:hover {
  color: var(--primary-dark);
  border-bottom-color: rgba(159, 115, 22, 0.32);
}

.support-card,
.faq-list details {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
}

.support-card {
  margin-top: 20px;
  padding: 24px 28px;
}

.support-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(35, 23, 63, 0.08);
}

.support-item:last-child {
  border-bottom: 0;
}

.support-label {
  min-width: 112px;
  color: var(--text-primary);
  font-weight: 700;
}

.support-value {
  color: var(--text-secondary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--primary-dark);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: 0;
  padding: 0 18px 18px;
  font-size: 14px;
}

.legal-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top, rgba(232, 194, 86, 0.16), transparent 22%),
    linear-gradient(180deg, #1f1538 0%, #150d29 100%);
  color: #f4f0ff;
}

.legal-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 40px;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 14px;
}

.legal-footer-links a,
.legal-footer-links span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 240, 255, 0.86) !important;
  font-size: 13px;
  font-weight: 700;
}

.legal-footer-links a:hover {
  background: rgba(232, 194, 86, 0.16);
  color: #fff7dd !important;
}

.legal-footer-copy {
  color: rgba(244, 240, 255, 0.54);
  font-size: 12px;
}

@media (max-width: 720px) {
  .legal-header-inner {
    height: 56px;
    padding: 0 16px;
  }

  .legal-header-logo {
    font-size: 18px;
  }

  .legal-header-logo::before {
    width: 30px;
    height: 30px;
  }

  .legal-header-back {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .legal-main {
    width: min(100vw - 20px, 960px);
    margin: 24px auto 48px;
    padding: 28px 18px 34px;
    border-radius: 24px;
  }

  .legal-main h1 {
    font-size: 26px;
  }

  .legal-main h2 {
    font-size: 16px;
    margin-top: 28px;
  }

  .support-card {
    padding: 18px 16px;
  }

  .support-item {
    flex-direction: column;
    gap: 4px;
  }

  .support-label {
    min-width: 0;
  }

  .legal-footer-inner {
    padding: 24px 16px 30px;
  }
}
