:root {
  --component-tab-indicator: 4px;
  --component-shot-width: 280px;
  --component-fab-offset: 20px;
  --component-device-icon: 58px;
  --component-rule-height: 46px;
  --component-store-dark: #1d1d22;
  --component-store-hover: #34343a;
}

.fact-row {
  display: flex;
  max-width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.fact-chip,
.term-chip {
  display: inline-flex;
  max-width: 100%;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-page);
  color: var(--color-text);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
}

.fact-chip-accent {
  border-color: var(--color-accent-line);
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
}

.fact-chip svg {
  width: 15px;
  height: 15px;
}

.app-store-button {
  display: inline-flex;
  min-height: 54px;
  max-width: 100%;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border: 1px solid var(--component-store-dark);
  border-radius: var(--radius-pill);
  background: var(--component-store-dark);
  color: var(--color-on-dark);
  box-shadow: var(--shadow-lift);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.app-store-button:hover {
  transform: translateY(-1px);
  background: var(--component-store-hover);
  color: var(--color-on-dark);
}

.app-store-button svg {
  width: 24px;
  height: 24px;
}

.store-button-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.15;
}

.store-button-copy small {
  color: var(--color-on-dark);
  font-size: 10.5px;
  opacity: 0.84;
}

.store-button-copy strong {
  color: var(--color-on-dark);
  font-size: 15px;
  font-weight: 720;
}

.tab-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.55fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: stretch;
}

.tab-list {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px;
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  color: var(--color-text);
}

.tab-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}

.tab-button::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: var(--component-tab-indicator);
  border-radius: var(--radius-pill);
  background: transparent;
  content: "";
}

.tab-button[aria-selected="true"] {
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

.tab-button[aria-selected="true"]::before {
  background: var(--color-accent);
}

.tab-button svg {
  width: 21px;
  height: 21px;
  color: var(--color-muted);
}

.tab-button[aria-selected="true"] svg {
  color: var(--color-accent-deep);
}

.tab-label {
  flex: 1 1 auto;
  font-weight: 650;
}

.tab-chevron {
  flex: 0 0 auto;
  color: var(--color-muted);
  font-size: 18px;
}

.tab-panel {
  padding: clamp(26px, 4vw, 46px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  opacity: 1;
  transform: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

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

.tab-panel.is-entering {
  opacity: 0;
  transform: translateY(8px);
}

.toc {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  z-index: 10;
  display: flex;
  max-width: 100%;
  gap: 7px;
  padding: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  scrollbar-width: thin;
}

.toc.is-static {
  position: static;
}

.toc a {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.toc a:hover,
.toc a[aria-current="true"] {
  background: var(--color-panel);
  color: var(--color-text);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

.faq-item summary {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  padding: 16px 52px 16px 20px;
  cursor: pointer;
  color: var(--color-text);
  font-weight: 700;
  list-style: none;
}

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

.faq-item summary::after {
  position: absolute;
  right: 20px;
  color: var(--color-accent-deep);
  content: "+";
  font-size: 24px;
  font-weight: 400;
}

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

.faq-answer {
  padding: 0 20px 18px;
  color: var(--color-muted);
}

.faq-answer > :last-child {
  margin-bottom: 0;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.term-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

.term-card dt {
  margin-bottom: 8px;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.term-card dd {
  margin: 0;
  color: var(--color-muted);
}

.screenshot-row {
  display: flex;
  max-width: 100%;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.official-shot {
  width: min(100%, var(--component-shot-width));
  flex: 0 0 auto;
  margin: 0;
}

.official-shot img,
.shot-placeholder {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 19.5;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--color-panel), var(--color-panel-strong));
  color: var(--color-text);
  box-shadow: var(--shadow-lift);
  object-fit: contain;
}

.shot-placeholder {
  position: relative;
}

.shot-placeholder::before,
.shot-placeholder::after {
  position: absolute;
  right: 18px;
  left: 18px;
  border-radius: var(--radius-md);
  background: var(--color-page);
  box-shadow: var(--shadow-soft);
  content: "";
}

.shot-placeholder::before {
  top: 15%;
  height: 22%;
}

.shot-placeholder::after {
  top: 42%;
  height: 38%;
}

.official-shot figcaption {
  margin-top: 10px;
  color: var(--color-muted);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.device-card {
  display: flex;
  min-width: 0;
  min-height: 176px;
  align-items: center;
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.device-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.device-icon {
  display: grid;
  width: var(--component-device-icon);
  height: var(--component-device-icon);
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
}

.device-icon svg {
  width: 34px;
  height: 34px;
}

.device-copy {
  min-width: 0;
}

.device-copy h3 {
  margin-bottom: 4px;
  font-size: 21px;
}

.device-copy p {
  margin-bottom: 8px;
  color: var(--color-muted);
  font-size: 14px;
}

.device-link {
  color: var(--color-accent-deep);
  font-size: 13px;
  font-weight: 700;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  display: flex;
  min-width: 0;
  min-height: 250px;
  padding: 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--color-muted);
  font-size: 12px;
}

.article-card h3 {
  font-size: 21px;
}

.article-card p {
  color: var(--color-muted);
  font-size: 14px;
}

.article-card-link {
  margin-top: auto;
  color: var(--color-accent-deep);
  font-size: 13px;
  font-weight: 750;
}

.callout {
  position: relative;
  margin-block: 24px;
  padding: 20px 22px 20px 48px;
  border: 1px solid var(--color-accent-line);
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.callout::before {
  position: absolute;
  top: 22px;
  left: 21px;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  box-shadow: 0 0 0 5px var(--color-accent-soft);
  content: "";
}

.callout-success {
  border-color: var(--color-success);
  background: var(--color-success-soft);
  color: var(--color-text);
}

.callout-success::before {
  background: var(--color-success);
  box-shadow: 0 0 0 5px var(--color-success-soft);
}

.callout-warning {
  border-color: var(--color-warning);
  background: var(--color-warning-soft);
  color: var(--color-text);
}

.callout-warning::before {
  background: var(--color-warning);
  box-shadow: 0 0 0 5px var(--color-warning-soft);
}

.dl-fab {
  position: fixed;
  right: var(--component-fab-offset);
  bottom: var(--component-fab-offset);
  z-index: 35;
  display: flex;
  max-width: min(330px, calc(100vw - var(--gutter) * 2));
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-lift);
}

.dl-fab-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
}

.dl-fab-icon svg {
  width: 21px;
  height: 21px;
}

.dl-fab-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.3;
}

.dl-fab-copy strong {
  color: var(--color-text);
  font-size: 13px;
}

.dl-fab-copy small {
  color: var(--color-muted);
  font-size: 11px;
}

.end-store-card {
  display: flex;
  margin-top: 48px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  color: var(--color-text);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.end-store-card-copy {
  max-width: 630px;
}

.end-store-card-copy > :last-child {
  margin-bottom: 0;
}

.hero-preview {
  position: relative;
  min-height: 752px;
  display: flex;
  padding-top: 40px;
  padding-bottom: 64px;
  overflow-x: clip;
  align-items: center;
}

.hero-preview::after {
  position: absolute;
  top: 50%;
  right: -8%;
  width: 940px;
  height: 940px;
  border-radius: var(--radius-pill);
  background: radial-gradient(closest-side, var(--color-accent-glow), var(--color-accent-glow-soft) 42%, transparent 74%);
  content: "";
  pointer-events: none;
  transform: translateY(-50%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero-copy {
  max-width: 580px;
}

.hero-copy h1 {
  margin-top: 22px;
}

.hero-actions {
  margin-top: 28px;
}

.device-strip {
  display: flex;
  margin-top: 30px;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.device-strip-label {
  margin-right: 7px;
  color: var(--color-muted);
  font-size: 12.5px;
}

.device-strip a,
.device-strip span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-size: 12.5px;
  font-weight: 600;
}

.device-strip svg {
  width: 17px;
  height: 17px;
  color: var(--color-muted);
}

.rule-stage {
  position: relative;
  padding: 22px 30px 44px 10px;
}

.rule-judge {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-hero);
  transform: rotate(-2deg);
}

.rule-judge-head,
.rule-judge-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rule-judge-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel);
  color: var(--color-text);
}

.rule-head-tags,
.rule-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rule-head-note,
.rule-judge-foot {
  color: var(--color-muted);
  font-size: 12px;
}

.rule-list {
  position: relative;
  padding: 12px;
}

.rule-scan {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  height: var(--component-rule-height);
  border-radius: 12px;
  background: linear-gradient(90deg, var(--color-accent-soft), var(--color-ink-04));
  box-shadow: inset 3px 0 0 var(--color-accent);
  animation: rule-scan 6s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  pointer-events: none;
}

.rule-line {
  position: relative;
  z-index: 1;
  display: grid;
  height: var(--component-rule-height);
  padding-inline: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.rule-line + .rule-line::before {
  position: absolute;
  top: 0;
  right: 14px;
  left: 14px;
  height: 1px;
  background: var(--color-panel-strong);
  content: "";
}

.rule-code {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-code em {
  color: var(--color-muted);
  font-style: normal;
}

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.verdict::after,
.legend-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  content: "";
}

.verdict b {
  display: inline-flex;
  min-width: 74px;
  justify-content: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.verdict-proxy b {
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
}

.verdict-proxy::after,
.legend-proxy {
  background: var(--color-accent);
}

.verdict-direct b {
  background: var(--color-success-soft);
  color: var(--color-text);
}

.verdict-direct::after,
.legend-direct {
  background: var(--color-success);
}

.verdict-reject b {
  background: var(--color-error-soft);
  color: var(--color-text);
}

.verdict-reject::after,
.legend-reject {
  background: var(--color-error);
}

.rule-judge-foot {
  padding: 12px 20px 14px;
  border-top: 1px solid var(--color-border);
}

.rule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.store-float {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-page);
  color: var(--color-text);
  box-shadow: var(--shadow-lift);
}

.store-float-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: linear-gradient(145deg, var(--color-accent), var(--color-accent-deep));
  color: var(--color-on-accent);
}

.store-float-mark svg {
  width: 20px;
  height: 20px;
}

.store-float-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.store-float-copy strong {
  color: var(--color-text);
  font-size: 14px;
}

.store-float-copy small {
  color: var(--color-muted);
  font-size: 11px;
}

@keyframes rule-scan {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  3%,
  12% {
    opacity: 1;
    transform: translateY(0);
  }
  16%,
  25% {
    transform: translateY(46px);
  }
  29%,
  38% {
    transform: translateY(92px);
  }
  42%,
  51% {
    transform: translateY(138px);
  }
  55%,
  64% {
    transform: translateY(184px);
  }
  68%,
  77% {
    transform: translateY(230px);
  }
  81%,
  95% {
    opacity: 1;
    transform: translateY(276px);
  }
  100% {
    opacity: 0;
    transform: translateY(276px);
  }
}

@media (max-width: 920px) {
  .hero-preview {
    min-height: 0;
    padding-top: 32px;
    padding-bottom: 56px;
  }

  .hero-preview::after {
    top: auto;
    right: -30%;
    bottom: -10%;
    width: 700px;
    height: 700px;
    transform: none;
  }

  .hero-grid,
  .tab-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 44px;
  }

  .tab-list {
    display: flex;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    overscroll-behavior-inline: contain;
  }

  .tab-button {
    width: auto;
    min-width: max-content;
    min-height: 46px;
    padding: 9px 15px;
    border-radius: var(--radius-pill);
  }

  .tab-button::before,
  .tab-chevron {
    display: none;
  }

  .rule-judge {
    max-width: none;
    transform: none;
  }

  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fact-row {
    flex-direction: row;
    align-items: center;
  }

  .glossary-grid,
  .device-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .device-card {
    min-height: 150px;
    padding: 22px;
  }

  .screenshot-row {
    flex-direction: column;
    align-items: center;
  }

  .official-shot {
    width: min(100%, var(--component-shot-width));
  }

  .end-store-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .rule-stage {
    padding: 16px 0 42px;
  }

  .rule-line {
    gap: 8px;
    padding-inline: 9px;
    font-size: 10.5px;
  }

  .verdict b {
    min-width: 62px;
    padding-inline: 7px;
    font-size: 9px;
  }

  .rule-head-note,
  .rule-judge-foot > span {
    display: none;
  }

  .store-float {
    right: 4px;
  }

  .dl-fab {
    right: var(--gutter);
    bottom: var(--gutter);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rule-scan {
    opacity: 1;
    animation: none;
    transform: translateY(276px);
  }
}