:root {
  color-scheme: light;
  --bg: #fff4dc;
  --surface: #fffefa;
  --surface-2: #fff0bd;
  --panel: #fff7d8;
  --ink: #11100e;
  --muted: #655949;
  --soft: #7d715f;
  --line: #191714;
  --line-soft: rgba(25, 23, 20, 0.18);
  --accent: #d9362b;
  --accent-2: #f6c445;
  --accent-ink: #fffefa;
  --success: #1f7a4d;
  --warning: #a66a00;
  --danger: #b42318;
  --focus: #d9362b;
  --button-shadow: #191714;
  --shadow-hard: 7px 7px 0 #191714;
  --shadow-soft: 0 18px 46px rgba(44, 34, 20, 0.12);
  --radius: 14px;
  --page-width: 1040px;
  --page-gutter: 32px;
  --display: "Arial Black", Impact, system-ui, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17130f;
  --surface: #241f18;
  --surface-2: #362b18;
  --panel: #2e2619;
  --ink: #fff7e9;
  --muted: #c9bda8;
  --soft: #a99b87;
  --line: #fff0cf;
  --line-soft: rgba(255, 240, 207, 0.18);
  --accent: #ff6b5f;
  --accent-2: #f6c445;
  --accent-ink: #180e08;
  --success: #42be65;
  --warning: #f1c21b;
  --danger: #ff8389;
  --focus: #ff6b5f;
  --button-shadow: rgba(0, 0, 0, 0.58);
  --shadow-hard: 7px 7px 0 #fff0cf;
  --shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--body);
  line-height: 1.55;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--page-width), calc(100% - var(--page-gutter)));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  width: min(var(--page-width), calc(100% - var(--page-gutter)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  background: var(--bg);
  border-bottom: 2px solid transparent;
  transition: transform 0.22s ease, border-color 0.15s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-soft);
}

.site-header.is-hidden {
  transform: translateY(-110%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent-ink);
  background: var(--accent);
  border: 2px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--line);
  font-family: var(--display);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.nav-links a:hover {
  color: var(--ink);
}

.theme-toggle {
  width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  color: var(--muted);
}

.theme-toggle:hover {
  color: var(--ink);
}

.theme-icon {
  display: block;
}

[data-theme="light"] .icon-sun,
[data-theme="dark"] .icon-moon {
  display: none;
}

.hero-section {
  padding: 20px 0 46px;
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
}

.hero-section > .wrap {
  --hero-width: 100%;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.hero-copy {
  width: var(--hero-width);
  max-width: none;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: var(--display);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

h1 {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
  justify-self: center;
  font-family: var(--display);
  text-align: center;
  font-size: clamp(1.95rem, 3.5vw, 3.05rem);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

@media (min-width: 1080px) {
  .hero-copy h1 {
    white-space: nowrap;
  }
}

.hero-subtitle {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(0.94rem, 1.45vw, 1.04rem);
}

.hero-tags {
  width: min(720px, 100%);
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
}

.hero-tag {
  min-height: 36px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: #11100e;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 0 rgba(25, 23, 20, 0.2);
}

.tag-free {
  background: #b9f6ca;
}

.tag-login {
  background: #bfdbfe;
}

.tag-local {
  background: #fde68a;
}

.tag-upload {
  background: #fecdd3;
}

.tag-manager {
  background: #ddd6fe;
}

.generator-card {
  width: var(--hero-width);
  margin: 0 auto;
  padding: clamp(18px, 2.8vw, 30px);
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 7px 0 var(--line);
  scroll-margin-top: 88px;
}

.button {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--button-shadow);
}

.button:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 var(--button-shadow);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.button.secondary,
.button.ghost {
  min-width: 108px;
  background: var(--accent-2);
  color: #11100e;
}

.button.warning {
  color: #11100e;
  background: var(--accent-2);
}

.button.text-button {
  min-height: 38px;
  min-width: 118px;
  padding: 0 10px;
  color: var(--danger);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.button.text-button:hover {
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.button.text-button.is-confirming {
  color: var(--accent-ink);
  background: var(--danger);
  border: 2px solid var(--line);
  box-shadow: 0 3px 0 var(--button-shadow);
}

.button.text-button.is-confirming:hover {
  color: var(--accent-ink);
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--button-shadow);
}

.secure-warning {
  margin: 0 0 14px;
  padding: 16px;
  display: grid;
  gap: 10px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 16px;
}

.secure-warning span {
  color: var(--muted);
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.password-output {
  --password-font-max: 18px;
  --password-font-min: 3px;
  min-height: 70px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: 16px;
  font-family: var(--mono);
  font-size: var(--password-font-max);
  font-weight: 850;
  overflow: hidden;
  overflow-wrap: normal;
  white-space: nowrap;
}

.password-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  position: relative;
  width: 66px;
  min-height: 48px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--accent-ink);
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--button-shadow);
}

.icon-button:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 var(--button-shadow);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.icon-button::after {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  z-index: 20;
  padding: 6px 8px;
  color: var(--accent-ink);
  background: var(--ink);
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

[data-theme="dark"] .icon-button::after {
  color: #11100e;
  background: var(--line);
}

[data-theme="dark"] .generator-card {
  box-shadow: none;
}

[data-theme="dark"] .icon-button,
[data-theme="dark"] .icon-button:hover {
  box-shadow: none;
}

[data-theme="dark"] .brand-mark {
  box-shadow: none;
}

.icon-button:hover::after,
.icon-button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.copy-button {
  color: #11100e;
  background: var(--accent-2);
}

.settings {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.seed-form {
  display: grid;
  gap: 16px;
}

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

.seed-field {
  display: grid;
  gap: 7px;
  padding: 14px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 16px;
  font-weight: 900;
}

.seed-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  font-family: var(--mono);
  font-weight: 800;
}

.seed-field small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.seed-submit {
  justify-self: start;
}

.range-box,
.checks {
  padding: 14px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 16px;
}

.range-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 900;
}

.range-line strong {
  color: var(--ink);
  font-family: var(--mono);
}

input[type="range"] {
  --fill: 20%;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  margin-top: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--fill), rgba(25, 23, 20, 0.18) var(--fill));
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 3px solid var(--surface);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--line);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--surface);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--line);
}

.checks {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.check {
  position: relative;
  min-height: 64px;
  cursor: pointer;
}

.check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.check span {
  height: 100%;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 2px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  font-weight: 900;
}

.check small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.check input:checked + span {
  color: var(--accent);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.check input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.strength-panel {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}

.strength-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-weight: 850;
}

.strength-bar {
  height: 13px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(25, 23, 20, 0.12);
}

.strength-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.strength-bar span[data-strength="weak"] {
  background: var(--danger);
}

.strength-bar span[data-strength="good"] {
  background: var(--warning);
}

.strength-bar span[data-strength="strong"],
.strength-bar span[data-strength="very-strong"] {
  background: var(--success);
}

.security-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: var(--muted);
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 850;
}

.security-notice[data-tone="warning"] {
  color: #11100e;
  background: #fde68a;
}

.security-notice[data-tone="caution"] {
  color: #11100e;
  background: #fecdd3;
}

.security-notice[data-tone="info"] {
  color: #11100e;
  background: #bfdbfe;
}

.live-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 850;
}

.live-message.success {
  color: var(--success);
}

.live-message.error {
  color: var(--danger);
}

.live-message.warning {
  color: var(--warning);
}

.history {
  margin-top: 16px;
  border-top: 2px solid var(--line);
}

.history summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

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

.history summary::after {
  content: "+";
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.35rem;
}

.history[open] summary::after {
  content: "-";
}

.history-title {
  color: var(--ink);
}

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

.history-clear-inline {
  margin: 0 0 0 4px;
  padding: 0;
  color: var(--danger);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.history-clear-inline:hover {
  color: var(--ink);
}

.history-clear-inline.is-confirming {
  color: var(--accent);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  width: 44px;
  height: 26px;
  padding: 3px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.switch span::before {
  content: "";
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 999px;
  background: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch input:checked + span::before {
  transform: translateX(18px);
  background: var(--accent);
}

.switch input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.storage-notice {
  margin: 14px 0 0;
  color: var(--warning);
  font-weight: 900;
}

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

.history-item {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 14px;
}

.history-password {
  font-family: var(--mono);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.history-time {
  display: block;
  margin-top: 4px;
  color: var(--soft);
  font-size: 0.78rem;
}

.history-copy {
  min-height: 38px;
  padding: 0 12px;
}

.history-empty {
  margin: 0;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 14px;
}


.section {
  padding: 66px 0;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 30px;
  text-align: center;
}

.section-title {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.14;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.guide-steps {
  max-width: 680px;
  margin: 0 auto;
  display: grid;
  gap: 0;
}

.guide-step,
.practice-item,
.use-row,
.principle-list li {
  display: grid;
  gap: 12px;
}

.step-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--muted);
  border: 2px solid var(--line-soft);
  border-radius: 50%;
}

.guide-step {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-bottom: 2px solid var(--line-soft);
  align-items: start;
}

.guide-step:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.guide-step h3,
.practice-item h3,
.use-row h3,
.principles-panel h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.guide-step p,
.practice-item p,
.use-row p,
.principle-list span {
  margin: 6px 0 0;
  color: var(--muted);
}

.icon-badge {
  --badge-bg: var(--accent);
  --badge-fg: #11100e;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: var(--badge-fg);
  background: color-mix(in srgb, var(--badge-bg) 72%, var(--surface));
  border: 0;
  border-radius: 999px;
}

.icon-badge.small {
  width: 34px;
  height: 34px;
}

.icon-badge svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-badge.small svg {
  width: 17px;
  height: 17px;
}

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

.how-item {
  padding: 24px 22px;
  background: var(--panel);
  border: 2px solid var(--line-soft);
  border-radius: 14px;
}

.how-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.how-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.derivation-panel {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.seed-detail-section .section-title {
  margin-bottom: 34px;
}

.derivation-flow {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) 24px minmax(112px, 0.9fr) 24px minmax(128px, 1fr) 24px minmax(100px, 0.75fr) 24px minmax(150px, 1.15fr);
  gap: 8px;
  align-items: center;
  padding: 18px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 5px 0 rgba(25, 23, 20, 0.13);
}

.derivation-token {
  min-height: 86px;
  padding: 14px 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 14px;
  text-align: center;
}

.derivation-token strong {
  font-size: 1rem;
  line-height: 1.2;
}

.derivation-token small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
}

.derivation-token.result {
  background: var(--surface-2);
}

.derivation-op {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 900;
}

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

.derivation-copy article {
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--line-soft);
  border-radius: 14px;
}

.derivation-copy h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.derivation-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.section-link-note {
  max-width: 680px;
  margin: 24px auto 0;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.section-link-note a,
.how-item p a,
.practice-item p a {
  color: var(--accent);
  font-weight: 900;
}

.guide-section .section-title,
.how-section .section-title,
.use-section .section-title,
.practice-section > .section-title,
.faq-section .section-title {
  max-width: 820px;
  margin: 0 auto 28px;
}

.faq-section {
  background: var(--panel);
  border-top: 2px solid var(--line-soft);
}

.practice-list {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 52px;
  row-gap: 0;
  border-top: 2px solid var(--line-soft);
}

.practice-item {
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 22px 0;
  border-left: 0;
  border-bottom: 2px solid var(--line-soft);
  align-items: start;
}

.use-list {
  display: grid;
  gap: 0;
  border-top: 2px solid var(--line-soft);
}

.use-row {
  grid-template-columns: 36px 180px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-left: 0;
  border-bottom: 2px solid var(--line-soft);
}

.use-row p {
  margin-top: 0;
}


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

.card,
.setting-card,
.privacy-card,
.content-panel,
.page-panel {
  padding: 22px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 5px 0 rgba(25, 23, 20, 0.13);
}

[data-theme="dark"] .card,
[data-theme="dark"] .setting-card,
[data-theme="dark"] .privacy-card,
[data-theme="dark"] .content-panel,
[data-theme="dark"] .page-panel {
  box-shadow: 0 5px 0 rgba(255, 240, 207, 0.13);
}

.card .num {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 900;
}

.card h3,
.setting-card h3,
.privacy-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card p,
.setting-card p,
.privacy-card p,
.content-panel p,
.faq-list p,
.page-panel p,
.page-panel li,
.site-footer p {
  margin-bottom: 0;
  color: var(--muted);
}

.content-panel {
  max-width: 820px;
  margin: 0 auto;
}

.process {
  display: grid;
  gap: 12px;
  counter-reset: step;
}

.process article {
  position: relative;
  min-height: 96px;
  padding: 20px 20px 20px 78px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  counter-increment: step;
}

.process article::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 22px;
  top: 22px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 900;
}

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

.setting-list {
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.setting-list li {
  padding: 14px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 14px;
}

.privacy-list {
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

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

.privacy-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--accent);
}

.best-list {
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.best-list li {
  position: relative;
  min-height: 58px;
  padding: 15px 16px 15px 44px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-weight: 850;
}

.best-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 19px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--success);
}

.faq-list {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: transparent;
  border-top: 2px solid var(--line-soft);
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  overflow: visible;
}

.faq-list details {
  padding: 18px 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 900;
}

.faq-list p {
  margin-top: 10px;
}

.cta-section {
  padding: 64px 0;
  text-align: center;
  border-top: 2px solid var(--line-soft);
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-inner p {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.site-footer {
  padding: 36px 0;
  color: var(--muted);
  border-top: 2px solid var(--line);
  background: rgba(255, 254, 250, 0.55);
}

[data-theme="dark"] .site-footer {
  background: rgba(36, 31, 24, 0.66);
}

.footer-inner,
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: start;
  gap: 48px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-col strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.65;
  margin-bottom: 2px;
}

.footer-nav-col a {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
}

.footer-brand {
  margin: 0;
}

.copyright {
  text-align: right;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 40;
  padding: 14px 16px;
  color: var(--accent-ink);
  background: var(--danger);
  border: 2px solid var(--line);
  border-radius: 14px;
  text-align: center;
  font-weight: 900;
}


.page-main {
  padding: 72px 0 58px;
}

.page-hero {
  max-width: 790px;
  margin-bottom: 34px;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.page-hero p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.page-panel section + section {
  margin-top: 28px;
}

.page-panel h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.page-panel h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.page-panel ul {
  margin: 0;
  padding-left: 20px;
}

.page-panel a,
.page-hero a {
  color: var(--accent);
  font-weight: 900;
}

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

.page-note {
  margin-top: 28px;
  color: var(--muted);
}

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

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav-links {
    display: none;
  }

  .grid3,
  .best-list,
  .derivation-copy,
  .how-list,
  .split-heading,
  .seed-fields,
  .settings,
  .settings-grid,
  .faq-list,
  .page-grid,
  .practice-list {
    grid-template-columns: 1fr;
  }

  .use-row {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
  }

  .use-row p {
    grid-column: 2;
  }

  .derivation-flow {
    grid-template-columns: repeat(9, max-content);
    overflow-x: auto;
    align-items: stretch;
    -webkit-overflow-scrolling: touch;
  }

  .derivation-token {
    width: 150px;
  }

  .derivation-op {
    width: 24px;
  }

  .footer-inner,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }

  .copyright {
    text-align: left;
  }
}

@media (max-width: 620px) {
  body {
    overflow-x: hidden;
  }

  .wrap,
  .site-header {
    width: min(calc(100% - 22px), var(--page-width));
  }

  .site-header {
    height: 66px;
  }

  .brand {
    font-size: 0.94rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }


  .hero-section {
    padding-top: 14px;
  }

  h1 {
    font-size: 1.94rem;
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-tags {
    gap: 8px;
  }

  .hero-tag {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .generator-card {
    width: 100%;
    padding: 16px;
    box-shadow: 0 5px 0 var(--line);
  }

  [data-theme="dark"] .generator-card {
    box-shadow: none;
  }

  .password-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .password-output {
    --password-font-max: 15px;
    min-height: 58px;
    padding: 10px 12px;
  }

  .password-actions {
    justify-content: stretch;
    gap: 6px;
  }

  .icon-button {
    width: 100%;
    min-height: 44px;
  }

  .button.secondary {
    width: 100%;
  }

  .seed-submit {
    width: 100%;
  }

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

  .seed-field {
    padding: 12px;
  }

  .seed-field input {
    min-width: 0;
  }

  .strength-meta,
  .range-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .history-copy {
    width: 100%;
  }

  .section {
    padding: 54px 0;
  }

  .footer-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
