@layer base, components, responsive;
@layer base {
  :root { color-scheme: dark; --bg: #0e1011; --surface: #16191b; --surface-2: #1c2022; --line: #303638; --text: #f3f5f1; --muted: #aab3ac; --accent: #c4f568; --accent-ink: #18220d; --warn: #ffc68b; --radius: 16px; --ease: cubic-bezier(.23,1,.32,1); font-family: 'Segoe UI', system-ui, sans-serif; }
  :root[data-theme='light'] { color-scheme: light; --bg: #f5f6f1; --surface: #fff; --surface-2: #edf0e9; --line: #ccd3c6; --text: #17201a; --muted: #536153; --accent: #c4f568; --accent-ink: #18220d; --warn: #8a4200; }
  @media (prefers-color-scheme: light) { :root[data-theme='auto'] { color-scheme: light; --bg: #f5f6f1; --surface: #fff; --surface-2: #edf0e9; --line: #ccd3c6; --text: #17201a; --muted: #536153; --accent: #c4f568; --accent-ink: #18220d; --warn: #8a4200; } }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; }
  button, input, select, textarea { font: inherit; }
  button, select, summary, a { -webkit-tap-highlight-color: transparent; }
  button, a, summary { touch-action: manipulation; }
  button { cursor: pointer; }
  button:disabled { cursor: default; opacity: .45; }
  a { color: inherit; text-underline-offset: 4px; }
  button, a, input, select, textarea, summary, [tabindex] { outline-offset: 4px; }
  :focus-visible { outline: 2px solid var(--accent); box-shadow: 0 0 0 5px var(--bg); }
  :root[data-theme='light'] :focus-visible { outline-color: #415a20; }
  h1, h2, h3, p { margin: 0; }
  [hidden] { display: none !important; }
  svg { width: 20px; height: 20px; flex-shrink: 0; }
  .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; }
  .skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 12px; border-radius: 8px; }
  .skip-link:focus { top: 12px; }
}

@layer components {
  .choice-field, .length-controls { margin: 0 0 10px; }
  .choice-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
  .choice-button { position: relative; cursor: pointer; flex: 1; }
  .universe .choice-button { flex: 0 0 auto; }
  .choice-button input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; z-index: 1; cursor: pointer; }
  .choice-button span { min-height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; padding: 6px 10px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 8px; font-size: 12px; white-space: nowrap; }
  .choice-button input:checked + span { background: var(--surface-2); color: var(--text); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  :root[data-theme='light'] .choice-button input:checked + span { border-color: #415a20; box-shadow: inset 0 0 0 1px #415a20; }
  .choice-button input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
  :root[data-theme='light'] .choice-button input:focus-visible + span { outline-color: #415a20; }
  .choice-button input:disabled + span { opacity: .4; cursor: default; }
  .length-controls .row label { display: flex; align-items: baseline; justify-content: space-between; }
  .length-controls output { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text); }
  input[type='range'] { width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
  :root[data-theme='light'] input[type='range'] { accent-color: #536c2e; }
  .settings-row { display: grid; grid-template-columns: 1.15fr 1.15fr 1fr; gap: 10px; }
  .settings-row .choice-button span { padding-left: 5px; padding-right: 5px; }
  .settings-row .choice-buttons { flex-wrap: nowrap; gap: 3px; }
  #relax-length { margin: 0 0 10px; }
  .quick-effects .effect-button span { position: relative; flex-direction: column; gap: 0; min-height: 50px; line-height: 1.3; }
  .effect-button i { font-size: 12px; font-style: normal; opacity: .8; }
  .effect-button small { position: absolute; top: 4px; right: 7px; display: none; font-size: 12px; }
  .effect-button input:checked + span small { display: block; }
  .shell { width: min(1200px, calc(100% - 64px)); margin: 0 auto; }
  .site-header { height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 32px; }
  .brand { min-height: 44px; display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 25px; font-weight: 750; letter-spacing: -1px; }
  .brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 25px; font-weight: 800; }
  .site-nav { display: flex; gap: 24px; }
  .site-nav a { display: flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; font-size: 13px; text-decoration: none; color: var(--muted); }
  .site-nav a[aria-current='page'] { color: var(--text); font-weight: 650; }
  .header-actions { display: flex; gap: 8px; margin-left: auto; }
  .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: transparent; font-size: 13px; font-weight: 550; }
  .counter { background: var(--surface-2); padding: 0 7px; border-radius: 5px; }
  .hero { padding: 24px 0 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 36px; }
  .eyebrow { color: var(--muted); font-size: 12px; letter-spacing: 2px; font-weight: 650; margin-bottom: 14px; }
  h1 { font-size: clamp(34px,3.5vw,44px); line-height: 1.06; letter-spacing: -2.8px; font-weight: 700; max-width: 760px; }
  h1 em { font-style: normal; color: var(--accent); }
  :root[data-theme='light'] h1 em { color: #47661c; }
  .intro { color: var(--muted); font-size: 14px; max-width: 305px; padding-bottom: 4px; }
  .intro strong { color: var(--text); font-weight: 550; }
  .tool { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 24px; }
  .control-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; }
  .modes { display: flex; padding: 4px; border-radius: 10px; background: var(--bg); gap: 4px; margin-bottom: 20px; }
  .modes a { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; border-radius: 7px; }
  .modes a[aria-current='page'] { color: var(--text); background: var(--surface-2); box-shadow: 0 1px 3px #0002; }
  .field { margin-bottom: 18px; }
  .field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; }
  label { font-size: 12px; font-weight: 600; }
  .optional, .field-count { color: var(--muted); font-size: 12px; font-weight: 400; }
  input[type='text'], input[type='number'], select, textarea { font-size: 16px; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
  input::placeholder { color: var(--muted); }
  .helper { margin-top: 7px; font-size: 12px; color: var(--muted); }
  .warning-text { color: var(--warn) !important; }
  details.options { border-top: 1px solid var(--line); margin-top: 8px; padding: 8px 0; }
  summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; list-style: none; gap: 10px; }
  summary::-webkit-details-marker { display: none; }
  summary::after { content: '+'; font-size: 18px; font-weight: 400; }
  details[open] > summary::after { content: '−'; }
  .option-content { padding-top: 6px; }
  .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
  legend { font-size: 12px; font-weight: 600; margin-bottom: 7px; }
  .check-row { display: flex; align-items: center; min-height: 44px; gap: 10px; font-weight: 400; }
  input[type='checkbox'] { accent-color: var(--accent); width: 18px; height: 18px; }
  .primary-button { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 750; }
  @media (hover: hover) and (pointer: fine) {
    button:hover:not(:disabled), .modes a:hover { filter: brightness(1.08); }
    .copy-name:hover .pseudo { color: var(--accent); }
    :root[data-theme='light'] .copy-name:hover .pseudo { color: #415a20; }
  }
  @media (pointer: fine) { button { transition: transform 130ms var(--ease); } button:active:not(:focus-visible):not(:disabled) { transform: scale(.975); } }
  .private-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); padding-top: 12px; }
  .private-note svg { width: 13px; height: 13px; }
  .discord-note, .style-warning { font-size: 12px; color: var(--muted); margin: 10px 0 16px; }
  .discord-note a { display: inline-flex; min-height: 44px; align-items: center; }
  .results-top { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin: 0 0 8px; min-height: 48px; }
  h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.55px; font-weight: 650; }
  .results-title { display: flex; align-items: center; gap: 10px; }
  .result-count { font-size: 12px; font-weight: 550; border: 1px solid var(--line); border-radius: 20px; padding: 3px 8px; color: var(--muted); white-space: nowrap; }
  .batch-message { color: var(--muted); font-size: 12px; min-height: 24px; margin-bottom: 10px; }
  .clipboard-buffer { position: fixed; left: 0; top: 0; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; pointer-events: none; }
  .result-grid { align-content: start; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .result-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .copy-name { display: block; width: 100%; text-align: left; padding: 12px 14px 0; min-height: 44px; border: 0; background: transparent; color: var(--text); }
  .pseudo { font-size: 18px; letter-spacing: -.5px; font-weight: 630; line-height: 1.5; overflow-wrap: anywhere; }
  .card-meta { display: flex; align-items: center; justify-content: space-between; gap: 0; padding: 0 6px 6px 14px; }
  .card-meta > span { font-size: 12px; color: var(--muted); }
  .card-actions { display: flex; }
  .icon-button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); border: 0; border-radius: 7px; flex-shrink: 0; }
  .icon-button svg { width: 16px; height: 16px; }
  .favorite-button[aria-pressed='true'] { color: var(--accent); }
  .favorite-button[aria-pressed='true'] svg { fill: currentColor; }
  :root[data-theme='light'] .favorite-button[aria-pressed='true'] { color: #415a20; }
  .format-badge { display: block; font-size: 12px; line-height: 1.4; padding: 0 14px 12px; color: var(--accent); }
  :root[data-theme='light'] .format-badge { color: #415a20; }
  .format-badge.invalid { color: var(--warn); }
  .permanent-note { color: var(--muted); font-size: 12px; padding: 18px 0; display: flex; gap: 7px; align-items: flex-start; }
  .permanent-note svg { width: 14px; height: 14px; margin-top: 2px; }
  .variant-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 12px; }
  .editorial { padding: 64px 0 48px; margin-top: 36px; border-top: 1px solid var(--line); }
  .section-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
  .section-top .eyebrow { margin: 0; }
  .guide-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 38px; }
  .guide-grid h3 { font-size: 16px; margin-bottom: 12px; }
  .guide-grid p, .guide-grid ul { font-size: 13px; color: var(--muted); line-height: 1.8; }
  .guide-grid ul { margin: 0; padding-left: 18px; }
  .examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
  .examples span { border: 1px solid var(--line); padding: 5px 9px; border-radius: 6px; font-size: 12px; color: var(--text); }
  .faq { max-width: 800px; margin: 0 auto 60px; }
  .faq h2 { margin-bottom: 18px; }
  .faq details { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .faq summary { font-size: 14px; }
  .faq details p { color: var(--muted); font-size: 13px; padding: 0 28px 16px 0; }
  .site-footer { border-top: 1px solid var(--line); padding: 28px 0 34px; color: var(--muted); font-size: 12px; }
  .footer-row { display: flex; justify-content: space-between; gap: 20px; }
  .footer-links { display: flex; gap: 16px; }
  .privacy-details { margin-top: 16px; max-width: 850px; }
  .privacy-details summary { justify-content: flex-start; font-size: 12px; }
  .privacy-details p { margin-bottom: 10px; }
  dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); width: min(740px,calc(100% - 32px)); padding: 24px; max-height: 85dvh; overflow-y: auto; }
  dialog::backdrop { background: #000b; }
  .dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
  dialog .result-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dialog-footer { margin-top: 20px; }
  .manual-help { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
  textarea { min-height: 160px; resize: vertical; }
  .toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; border: 1px solid var(--line); padding: 12px 20px; background: var(--text); color: var(--bg); border-radius: 12px; font-size: 13px; box-shadow: 0 8px 30px #0003; z-index: 5; pointer-events: none; }
  noscript p { border: 1px solid var(--line); padding: 12px; margin-bottom: 12px; }
}
@layer responsive {
  @media (min-width: 761px) { .control-panel { padding: 16px; } .control-panel .modes { margin-bottom: 10px; } .control-panel .field { margin-bottom: 10px; } .hero { gap: 20px; } }
  @media (min-width: 761px) and (max-width: 1100px) { .settings-row { grid-template-columns: 1fr 1fr; } #separator { grid-column: 1 / -1; } .universe .choice-button { flex-grow: 1; } }
  @media (max-width: 760px) { .settings-row { grid-template-columns: 1fr 1fr; } #separator { grid-column: 1 / -1; } .universe .choice-button { flex-grow: 1; } .effect-button b { font-size: 12px; } .length-controls legend .optional { display: none; } }
  @media (max-width: 1150px) { .tool { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; } .result-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
  @media (max-width: 760px) {
    .shell { width: calc(100% - 32px); }
    .site-header { height: 68px; gap: 10px; }
    .brand { font-size: 22px; }
    .brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 22px; }
    .site-nav { display: flex; gap: 0; }
    .site-nav a:not([href='/pseudo-gamer/']) { display: none; }
    #theme { width: 44px; padding: 0; flex-shrink: 0; }
    #theme .theme-label { display: none; }
    #theme .theme-symbol { font-size: 16px; }
    .header-actions { gap: 6px; }
    .header-actions .text-button { padding: 8px; font-size: 12px; }
    .hero { padding: 20px 0 16px; display: block; }
    .eyebrow { font-size: 12px; letter-spacing: 1.6px; margin-bottom: 10px; }
    h1 { font-size: 36px; letter-spacing: -1.5px; line-height: 1.1; }
    .intro { font-size: 12px; max-width: 100%; margin-top: 12px; }
    .tool { display: block; }
    .control-panel { padding: 16px; }
    .modes { margin-bottom: 12px; }
    .field { margin-bottom: 12px; }
    .helper { font-size: 12px; }
    .private-note { padding-top: 8px; }
    details.options { padding: 0; margin-top: 4px; margin-bottom: 4px; }
    .results { margin-top: 20px; }
    .batch-message { min-height: 22px; margin-bottom: 12px; }
    .results-top h2 { font-size: 18px; }
    .results-title { gap: 8px; }
    .results-top { gap: 8px; }
    .results-top .text-button { font-size: 12px; padding: 8px; }
    .result-count { font-size: 12px; }
    .result-grid { grid-template-columns: 1fr; gap: 10px; }
    .copy-name { padding: 14px 16px 0; min-height: 50px; }
    .card-meta { padding-left: 16px; }
    .pseudo { font-size: 20px; }
    .editorial { padding: 32px 0; margin-top: 20px; }
    .section-top { display: block; margin-bottom: 22px; }
    .section-top .eyebrow { margin-top: 8px; }
    .guide-grid { grid-template-columns: 1fr; gap: 26px; }
    .faq { margin-bottom: 36px; }
    .footer-row { display: block; }
    .footer-links { flex-wrap: wrap; margin-top: 14px; gap: 10px; }
    .footer-links a { display: flex; align-items: center; min-height: 44px; }
    dialog { padding: 16px; }
    dialog .result-grid { grid-template-columns: 1fr; }
  }
  @media (min-width: 390px) and (max-width: 760px) {
    .result-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #results .card-meta { flex-wrap: wrap; gap: 2px; padding-left: 12px; }
    #results .card-meta > span { flex-basis: 100%; }
    #results .card-actions { margin-left: -6px; }
    #results .copy-name { padding-left: 12px; padding-right: 12px; }
    #results .pseudo { font-size: 18px; }
  }
  @media (max-width: 380px) { h1 { font-size: 34px; } .header-actions .text-button { font-size: 12px; } }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } button:active { transform: none !important; } }
  @media (forced-colors: active) { .result-card, .control-panel, .primary-button { border: 1px solid ButtonText; } :focus-visible { outline: 2px solid Highlight; } }
  @media (prefers-color-scheme: light) {
    :root[data-theme='auto'] h1 em, :root[data-theme='auto'] .format-badge, :root[data-theme='auto'] .favorite-button[aria-pressed='true'] { color: #415a20; }
    :root[data-theme='auto'] :focus-visible { outline-color: #415a20; }
    :root[data-theme='auto'] .copy-name:hover .pseudo { color: #415a20; }
  }
}

@layer components {
  .choice-field, .length-controls, .quick-effects { margin-bottom: 6px; }
  .choice-field legend, .quick-effects legend { margin-bottom: 4px; }
  .length-controls legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .private-note { padding-top: 6px; }
  .card-meta .format-badge { padding: 0; margin: 0; white-space: nowrap; }
  .control-panel:has(#word:placeholder-shown) #normalization { display: none; }
}
@layer responsive {
  @media (min-width: 761px) { .control-panel .field { margin-bottom: 8px; } .control-panel .modes { margin-bottom: 10px; } }
  @media (min-width: 761px) and (max-height: 800px) { .site-header { height: 64px; } .hero { padding: 12px 0; } .hero .eyebrow, .hero .intro, .private-note { display: none; } }
  @media (max-width: 760px) {
    #generator { display: flex; flex-direction: column; }
    #generator > .field { order: 1; }
    #style { order: 2; }
    .quick-effects { order: 3; }
    #generate, .mobile-results { order: 4; }
    .length-controls { order: 5; margin-top: 10px; }
    .settings-row { order: 6; }
    #discord-note { order: 7; }
    .private-note { order: 8; }
    .mobile-results { display: flex; min-height: 44px; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); margin-top: 4px; }
  }
  @media (min-width: 761px) { .mobile-results { display: none; } }
}


@layer components {
  .quick-effects { margin: 0 0 8px; }
  .effect-buttons { display: flex; gap: 8px; }
  .effect-button { position: relative; flex: 1; cursor: pointer; }
  .effect-button input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
  .effect-button span { display: flex; gap: 8px; justify-content: center; align-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); font-size: 13px; }
  .effect-button b { font-weight: 600; }
  .effect-button input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .effect-button input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
  :root[data-theme='light'] .effect-button input:focus-visible + span { outline-color: #415a20; }
  .effect-button input:disabled + span { opacity: .5; cursor: default; }
  .option-content { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; }
  .option-content > fieldset, .option-content > .field { margin-bottom: 0; }
  .discord-note { grid-column: 1 / -1; }
}
@layer responsive {
  @media (min-width: 761px) {
    .hero { padding: 16px 0; }
    .hero .eyebrow { margin-bottom: 8px; }
    .modes { margin-bottom: 14px; }
    .control-panel .field { margin-bottom: 14px; }
    .tool { gap: 24px; }
  }
  @media (max-width: 400px) { .effect-buttons { gap: 5px; } .effect-button span { gap: 5px; font-size: 12px; } }
  @media (min-width: 761px) and (max-height: 800px) {
    #results { gap: 10px; }
    #results .card-meta { padding-bottom: 0; }
    .permanent-note { padding: 12px 0; }
    .control-panel .modes { margin-bottom: 12px; }
    .control-panel .field { margin-bottom: 12px; }
    .control-panel .primary-button { min-height: 48px; }
  }
  @media (max-width: 760px) {
    .hero .intro { display: none; }
    .control-panel:has(#word:placeholder-shown) #normalization { display: none; }
    .quick-effects:has(input:checked) #effects-help { display: block; }
    .quick-effects:not(:has(input:checked)) #effects-help { display: none; }
  }
}

@layer components {
  :root { --range-track: #475249; --range-border: #82917a; --range-fill: #c4f568; --range-thumb: #e9facc; --range-thumb-border: #33411f; }
  :root[data-theme='light'] { --range-track: #d8dfd0; --range-border: #718064; --range-fill: #536c2e; --range-thumb: #536c2e; --range-thumb-border: #fff; }
  @media (prefers-color-scheme: light) { :root[data-theme='auto'] { --range-track: #d8dfd0; --range-border: #718064; --range-fill: #536c2e; --range-thumb: #536c2e; --range-thumb-border: #fff; } }
  .modes button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; border-radius: 7px; }
  .modes button[aria-selected='true'] { color: var(--text); background: var(--surface-2); box-shadow: 0 1px 3px #0002; }
  .settings-row.style-settings { grid-template-columns: 1fr; }
  .length-controls .row { gap: 28px; }
  .length-controls .row label { justify-content: center; gap: 8px; text-align: center; }
  input[type='range'] { appearance: none; -webkit-appearance: none; width: calc(100% - 16px); margin-inline: 8px; background: transparent; }
  input[type='range']::-webkit-slider-runnable-track { height: 6px; border: 1px solid var(--range-border); border-radius: 8px; background: linear-gradient(to right,var(--range-fill) 0 var(--range-progress,0%),var(--range-track) var(--range-progress,0%) 100%); }
  input[type='range']::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; background: var(--range-thumb); border: 2px solid var(--range-thumb-border); border-radius: 50%; box-shadow: 0 1px 3px #0004; }
  input[type='range']::-moz-range-track { height: 6px; border: 1px solid var(--range-border); border-radius: 8px; background: var(--range-track); }
  input[type='range']::-moz-range-progress { height: 6px; border-radius: 8px; background: var(--range-fill); }
  input[type='range']::-moz-range-thumb { width: 16px; height: 16px; background: var(--range-thumb); border: 2px solid var(--range-thumb-border); border-radius: 50%; box-shadow: 0 1px 3px #0004; }
  @media (forced-colors: active) {
    input[type='range']::-webkit-slider-runnable-track { background: Canvas; border-color: CanvasText; }
    input[type='range']::-webkit-slider-thumb { background: Highlight; border-color: CanvasText; }
    input[type='range']::-moz-range-track { background: Canvas; border-color: CanvasText; }
    input[type='range']::-moz-range-thumb { background: Highlight; border-color: CanvasText; }
  }
}
@layer responsive {
  @media (max-width: 760px) {
    #style-warning { order: 3; }
    body[data-mode='stylize'] .settings-row { order: 2; }
    body[data-mode='stylize'] #separator { grid-column: auto; }
    .length-controls .row { gap: 22px; }
  }
}

@layer components {
  .discord-note { margin: 0; }
  .feedback-form { border-top: 1px solid var(--line); padding-top: 6px; display: grid; gap: 4px; }
  .feedback-form > label { font-size: 12px; color: var(--muted); font-weight: 500; }
  .feedback-row { display: flex; align-items: flex-start; gap: 8px; }
  #feedback-message { display: block; min-height: 44px; height: 44px; max-height: 120px; resize: vertical; line-height: 1.4; padding: 10px 12px; font-size: 14px; }
  #feedback-send { flex-shrink: 0; min-height: 44px; font-size: 12px; }
  .feedback-status { color: var(--muted); font-size: 12px; line-height: 1.5; }
  .feedback-status.warning-text { color: var(--warn); }
}
@layer responsive {
  @media (min-width: 761px) and (max-height: 800px) {
    .permanent-note { padding: 4px 0 0; }
    .control-panel:has(#platform-discord:checked) .field { margin-bottom: 8px; }
  }
  @media (max-width: 760px) {
    .feedback-form { padding-top: 10px; }
    #feedback-message { font-size: 16px; }
  }
}

.analytics-banner{position:fixed;z-index:12;bottom:16px;left:50%;transform:translateX(-50%);width:min(760px,calc(100% - 32px));padding:16px 20px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 8px 40px #0005;display:flex;align-items:center;gap:24px}.analytics-banner[hidden]{display:none}.analytics-banner p{font-size:14px;line-height:1.5;margin:6px 0 0}.analytics-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex-shrink:0}.analytics-actions button{min-width:88px;min-height:44px;border:1px solid var(--line);border-radius:10px}.analytics-actions a{grid-column:1/-1;text-align:center;font-size:13px;min-height:24px}.analytics-banner strong{font-size:16px}@media(max-width:600px){.analytics-banner{bottom:8px;padding:14px;gap:12px;align-items:stretch;flex-direction:column}.analytics-actions{grid-template-columns:1fr 1fr}.analytics-actions a{min-height:24px}.analytics-banner p{font-size:13px}}
