:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --surface: #ffffff;
  --surface-muted: #eef2ea;
  --text: #17211c;
  --muted: #5b675f;
  --line: #d9e0d6;
  --primary: #116149;
  --primary-dark: #0b4334;
  --accent: #b84233;
  --accent-soft: #f7dfd9;
  --gold: #b4842c;
  --blue: #2867ad;
  --shadow: 0 24px 70px rgba(20, 35, 28, 0.12);
  font-family:
    "Yu Gothic UI",
    "Hiragino Kaku Gothic ProN",
    "Meiryo",
    system-ui,
    sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101511;
  --surface: #18211c;
  --surface-muted: #202b25;
  --text: #eff6f1;
  --muted: #b6c2ba;
  --line: #314039;
  --primary: #58c7a1;
  --primary-dark: #d9fff1;
  --accent: #ff8b77;
  --accent-soft: #432620;
  --gold: #e5bd6b;
  --blue: #83b9f4;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(17, 97, 73, 0.08), transparent 320px),
    var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

h1,
h2,
h3,
p,
li,
span,
strong,
summary,
a,
button,
input {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-header,
.brand,
.top-nav,
.header-actions,
.language-switcher,
.hero,
.hero-copy,
.hero-visual,
.notice-band,
.layout,
.sidebar,
.content,
.doc-section,
.facts-grid article,
.operation-grid article,
.compat-table,
.compat-table > div,
.compat-table span,
.steps li,
.timeline article,
.two-column,
.warning-list li,
.indicator-list article,
.faq details,
.support-list span,
.seller-copy {
  min-width: 0;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand > span {
  min-width: 0;
}

.brand strong {
  font-size: 15px;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.top-nav a,
.language-switcher a,
.icon-button,
.primary-action,
.secondary-action {
  min-height: 40px;
  border-radius: 8px;
}

.top-nav a {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.top-nav a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.language-switcher a:hover,
.language-switcher a.active {
  background: var(--primary);
  color: #fff;
}

[data-theme="dark"] .language-switcher a:hover,
[data-theme="dark"] .language-switcher a.active {
  color: #062016;
}

.icon-button {
  width: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(42px, 8vw, 92px) clamp(20px, 6vw, 78px) 34px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
}

.hero p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  background: var(--primary);
  color: #fff;
}

[data-theme="dark"] .primary-action {
  color: #062016;
}

.secondary-action {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.hero-visual {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--primary) 24%, transparent), transparent 34%),
    linear-gradient(145deg, var(--surface), var(--surface-muted));
  box-shadow: var(--shadow);
}

.hero-visual img {
  display: block;
  width: min(72%, 360px);
  margin: 0 auto;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.16));
}

.signal-grid {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.signal-grid span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.notice-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 clamp(20px, 6vw, 78px) 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.notice-band article {
  min-height: 132px;
  padding: 22px;
  background: var(--surface);
}

.notice-band strong {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 16px;
}

.notice-band span {
  color: var(--muted);
  font-size: 14px;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding: 0 clamp(20px, 6vw, 78px) 72px;
}

.sidebar {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

#manualSearch {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.sidebar nav {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}

.sidebar a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.sidebar a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.content {
  display: grid;
  gap: 26px;
}

.doc-section {
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 40px rgba(20, 35, 28, 0.05);
}

.doc-section[hidden] {
  display: none;
}

.doc-section h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.25;
}

.doc-section h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.45;
}

.doc-section p {
  margin: 0 0 18px;
  color: var(--muted);
}

.doc-section p:last-child {
  margin-bottom: 0;
}

.facts-grid,
.operation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.facts-grid article,
.operation-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.compat-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compat-table > div {
  display: grid;
  grid-template-columns: 160px 130px 1fr;
  gap: 1px;
  background: var(--line);
}

.compat-table span {
  padding: 14px;
  background: var(--surface);
  color: var(--muted);
}

.compat-table .table-head span {
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 700;
}

.callout {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface));
}

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

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li,
.warning-list li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.steps li:last-child,
.warning-list li:last-child {
  border-bottom: 0;
}

.steps strong,
.warning-list strong {
  color: var(--text);
}

.steps span,
.warning-list span {
  color: var(--muted);
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.timeline article {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-areas:
    "num title"
    "num text";
  gap: 4px 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.step-number {
  grid-area: num;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

[data-theme="dark"] .step-number {
  color: #062016;
}

.timeline h3 {
  grid-area: title;
}

.timeline p {
  grid-area: text;
}

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

.check-list,
.warning-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}

.check-list li::before {
  position: absolute;
  left: 0;
  color: var(--primary);
  content: "✓";
  font-weight: 800;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

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

.indicator-list article {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.dot {
  display: block;
  width: 18px;
  height: 18px;
  margin-top: 5px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.dot.blue {
  background: #2f86df;
}

.dot.red {
  background: #dd493f;
}

.dot.white {
  background: #fff;
}

.dot.black {
  background: #121212;
}

.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.faq summary {
  min-height: 52px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
}

.faq details p {
  padding: 0 18px 18px;
}

.support-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.support-list span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 14px;
}

.seller-copy {
  padding: 20px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
}

.dynamic-doc .dynamic-summary {
  margin-bottom: 18px;
  font-weight: 700;
}

.markdown-body {
  display: grid;
  gap: 10px;
}

.markdown-body h3,
.markdown-body h4,
.markdown-body p,
.markdown-body ul,
.markdown-body ol {
  margin: 0;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 22px;
  color: var(--muted);
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--surface-muted);
}

.site-public-notice {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 6vw, 78px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--primary);
  font-weight: 700;
}

.no-results {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: 320px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--muted);
}

.auth-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
}

.auth-open,
.auth-submit,
.auth-switch,
.auth-logout,
.auth-close,
.verification-send,
.ticket-submit,
.ticket-refresh,
.user-actions button {
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.auth-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  max-width: min(220px, calc(100vw - 36px));
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.auth-open-avatar,
.user-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 88%, var(--primary));
  color: var(--primary-dark);
  font-weight: 900;
  line-height: 1;
}

.auth-open-avatar {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.auth-open-text {
  overflow: hidden;
  max-width: 150px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-card {
  position: absolute;
  right: 0;
  bottom: 52px;
  width: min(430px, calc(100vw - 28px));
  max-height: min(76vh, 720px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.auth-close {
  width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--text);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form input,
.verification-row input,
.captcha-row input,
.ticket-form input,
.ticket-form select,
.ticket-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.ticket-form textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.6;
}

.auth-submit,
.auth-logout,
.verification-send,
.ticket-submit {
  min-height: 42px;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.verification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.verification-send {
  padding: 0 12px;
  white-space: nowrap;
}

.captcha-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.captcha-question {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.verification-send:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.auth-switch {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--text);
}

.auth-logout {
  width: 100%;
}

.user-center {
  display: grid;
  gap: 12px;
}

.user-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.user-avatar {
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: #fff;
}

.user-role {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.user-actions button,
.ticket-refresh {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.user-actions button.active {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: var(--primary);
  color: #fff;
}

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

.ticket-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ticket-title-line,
.ticket-message-line,
.ticket-submit {
  grid-column: 1 / -1;
}

.ticket-list-panel {
  display: grid;
  gap: 10px;
}

.ticket-list-head,
.ticket-item-head,
.ticket-meta {
  display: flex;
  align-items: center;
}

.ticket-list-head {
  justify-content: space-between;
  gap: 10px;
}

.ticket-refresh {
  padding: 7px 10px;
  font-size: 13px;
}

.ticket-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.ticket-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.ticket-item-head {
  justify-content: space-between;
  gap: 10px;
}

.ticket-item p {
  margin: 8px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.ticket-status {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, var(--surface));
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.ticket-status.closed {
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
  color: var(--primary);
}

.ticket-meta {
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticket-meta span {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.ticket-reply {
  margin-top: 10px;
  padding: 10px;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ticket-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--line));
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.ticket-empty {
  margin: 0;
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.auth-user,
.auth-message {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.auth-message {
  margin: 10px 0 0;
}

.auth-message.error {
  color: var(--accent);
}

.ticket-page {
  min-height: 100vh;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 82%, #fff) 0%, var(--surface) 100%);
}

.ticket-page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
}

.ticket-page-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.ticket-page-brand img {
  width: 34px;
  height: 34px;
}

.ticket-page-header nav a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.ticket-page-main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

.ticket-detail-shell {
  display: grid;
  gap: 18px;
}

.ticket-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.ticket-detail-head h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.ticket-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-detail-meta span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ticket-thread {
  display: grid;
  gap: 12px;
}

.ticket-thread-message {
  width: min(760px, 100%);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ticket-thread-message.admin {
  margin-left: auto;
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.ticket-thread-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticket-thread-meta strong {
  color: var(--text);
}

.ticket-thread-message p {
  margin: 10px 0 0;
  color: var(--text);
  line-height: 1.75;
  white-space: pre-wrap;
}

.ticket-reply-form {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.ticket-reply-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.ticket-reply-form textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.65;
  padding: 12px;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .header-actions {
    align-self: start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .notice-band,
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: auto;
  }

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

  .facts-grid,
  .operation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    line-height: 1.65;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small {
    display: none;
  }

  .top-nav {
    grid-column: 1 / -1;
    margin: 2px -12px 0;
    padding: 0 12px 2px;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 10px;
    background: var(--surface-muted);
    font-size: 13px;
    white-space: nowrap;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    gap: 6px;
    justify-content: flex-end;
  }

  .language-switcher {
    max-width: none;
    padding: 2px;
    overflow: visible;
  }

  .language-switcher a {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .icon-button {
    width: 36px;
    min-height: 36px;
    font-size: 16px;
  }

  .hero {
    gap: 18px;
    padding: 24px 14px 18px;
  }

  .eyebrow,
  .section-kicker {
    margin-bottom: 9px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: clamp(30px, 8.5vw, 36px);
    line-height: 1.12;
  }

  .hero p {
    margin-top: 14px;
    font-size: 15px;
  }

  .hero-visual {
    min-height: 0;
    padding: 18px;
  }

  .hero-visual img {
    width: min(46%, 150px);
    margin-bottom: 14px;
  }

  .signal-grid {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .signal-grid span {
    padding: 9px 10px;
    font-size: 12px;
  }

  .notice-band,
  .layout {
    margin-right: 14px;
    margin-left: 14px;
    padding-right: 0;
    padding-left: 0;
  }

  .notice-band {
    margin-bottom: 18px;
  }

  .notice-band article {
    min-height: 0;
    padding: 16px;
  }

  .notice-band strong {
    margin-bottom: 6px;
    font-size: 15px;
  }

  .layout {
    gap: 16px;
    padding-bottom: 40px;
  }

  .sidebar {
    padding: 14px;
  }

  .sidebar nav {
    display: flex;
    gap: 7px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar a {
    flex: 0 0 auto;
    padding: 8px 10px;
    background: var(--surface-muted);
    white-space: nowrap;
  }

  #manualSearch {
    min-height: 40px;
    font-size: 15px;
  }

  .sidebar nav,
  .compat-table > div,
  .steps li,
  .warning-list li,
  .two-column,
  .indicator-list {
    grid-template-columns: 1fr;
  }

  .doc-section {
    padding: 20px 14px;
  }

  .content {
    gap: 16px;
  }

  .doc-section h2 {
    margin-bottom: 14px;
    font-size: clamp(24px, 7vw, 30px);
  }

  .doc-section h3 {
    font-size: 16px;
  }

  .doc-section p,
  .compat-table span,
  .steps span,
  .warning-list span {
    font-size: 15px;
    white-space: normal;
  }

  .facts-grid,
  .operation-grid {
    gap: 10px;
  }

  .facts-grid article,
  .operation-grid article,
  .indicator-list article {
    padding: 14px;
  }

  .compat-table span {
    padding: 11px 12px;
  }

  .steps li,
  .warning-list li {
    gap: 6px;
    padding: 12px 0;
  }

  .timeline article {
    grid-template-columns: 38px 1fr;
    padding: 14px;
  }

  .step-number {
    width: 32px;
    height: 32px;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 22px;
  }

  .primary-action,
  .secondary-action {
    flex: 1 1 140px;
    min-height: 42px;
    padding: 10px 12px;
    white-space: normal;
  }

  .site-footer {
    display: block;
    padding: 24px 18px;
  }

  .site-footer a {
    display: inline-block;
    margin-top: 10px;
  }

  .auth-panel {
    right: 12px;
    bottom: 12px;
  }

  .auth-card {
    width: min(410px, calc(100vw - 24px));
    max-height: calc(100vh - 82px);
  }
}

@media (max-width: 420px) {
  .brand strong {
    max-width: 120px;
  }

  .language-switcher a {
    padding-right: 7px;
    padding-left: 7px;
  }

  .top-nav a,
  .sidebar a,
  .support-list span {
    max-width: 75vw;
  }

  .hero h1 {
    font-size: 30px;
  }

  .doc-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .auth-card {
    width: calc(100vw - 24px);
  }

  .auth-open-text {
    display: none;
  }

  .auth-open {
    width: 48px;
    min-height: 48px;
    justify-content: center;
    padding: 8px;
    border-radius: 999px;
  }

  .auth-open-avatar {
    width: 32px;
    height: 32px;
  }

  .ticket-form,
  .verification-row,
  .user-actions {
    grid-template-columns: 1fr;
  }

  .verification-send {
    width: 100%;
  }

  .ticket-page-header {
    padding-inline: 14px;
  }

  .ticket-page-main {
    width: calc(100% - 28px);
    padding-top: 22px;
  }

  .ticket-detail-head {
    display: grid;
  }

  .ticket-thread-message.admin {
    margin-left: 0;
  }
}

@media print {
  .site-header,
  .sidebar,
  .hero-actions,
  .site-footer,
  .no-results {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .hero,
  .layout,
  .notice-band {
    display: block;
    margin: 0;
    padding: 0;
  }

  .hero-visual {
    display: none;
  }

  .doc-section,
  .notice-band article {
    break-inside: avoid;
    box-shadow: none;
  }
}
