:root {
    color-scheme: light;
    --mint: #71e4a9;
    --teal: #00565f;
    --ink: #233d3b;
    --border: #dde7e1;
    --muted: #667a74;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: #edf3ef;
    -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select, input[type="checkbox"], input[type="radio"], input[type="range"], label { cursor: pointer; }
button, input, select { accent-color: var(--teal); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, code:focus-visible { outline: 3px solid #188a70; outline-offset: 4px; }
button:disabled { cursor: default; opacity: .6; }
[hidden], .js [hidden].enhanced-only { display: none !important; }
.enhanced-only { display: none !important; }
.js .enhanced-only { display: inline-flex !important; }
.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: 12px; left: 12px; transform: translateY(-200%); background: var(--teal); color: white; padding: 10px 15px; border-radius: 8px; z-index: 10; }
.skip-link:focus { transform: none; }
.site-header { max-width: 920px; padding: 0 24px; margin: 56px auto 26px; text-align: center; }
h1 { margin: 0; color: var(--teal); font-size: 29px; font-weight: 600; letter-spacing: -.9px; line-height: 1.3; }
.page-shell { max-width: 920px; margin: 0 auto; padding: 0 24px; }
#generator-form { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #88baa4; border-radius: 18px; background: white; overflow: hidden; box-shadow: 0 16px 40px #00565f1f, 0 3px 10px #00565f0a; scroll-margin-top: 20px; }
fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
.mode-switch { grid-column: 1 / -1; display: flex; gap: 6px; padding: 8px; background: var(--teal); border-bottom: 1px solid var(--teal); }
.mode-switch label { position: relative; flex: 1; min-width: 0; }
.mode-switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; z-index: 1; }
.mode-switch label > span { display: flex; justify-content: center; align-items: center; min-height: 44px; border-radius: 10px; color: #e4f5ed; font-weight: 600; transition: background .15s, color .15s; }
.mode-switch input:checked + span { background: var(--mint); color: var(--teal); }
.mode-switch input:hover + span { background: #146c73; }
.mode-switch input:checked:hover + span { background: #8aebba; }
.mode-switch input:focus-visible + span { outline: 3px solid var(--mint); outline-offset: -3px; }
.mode-switch input:checked:focus-visible + span { outline-color: var(--teal); }
#generator { min-width: 0; padding: 28px; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 48px; }
.form-row > label { line-height: 1.5; font-weight: 500; }
.length-row { row-gap: 8px; margin-bottom: 15px; }
.length-control { display: contents; }
.length-control input[type="number"] { grid-row: 1; grid-column: 2; }
input[type="number"] { width: 65px; height: 39px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 8px; color: var(--teal); background: #f8fbf9; font-weight: 600; text-align: center; }
input[type="range"] { appearance: none; grid-row: 2; grid-column: 1 / -1; width: 100%; height: 6px; margin: 10px 0; border-radius: 6px; background: #bfe8d1; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 19px; height: 19px; border: 4px solid var(--teal); border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #fff; }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 4px solid var(--teal); border-radius: 50%; background: white; box-shadow: 0 0 0 3px #fff; }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--teal); }
input[type="checkbox"] { appearance: none; position: relative; width: 38px; height: 23px; margin: 0; border: 1px solid #cbd8d0; border-radius: 20px; background: #d8e2dc; flex-shrink: 0; transition: background .15s; }
input[type="checkbox"]::after { content: ""; position: absolute; width: 17px; height: 17px; left: 2px; top: 2px; background: white; border-radius: 50%; box-shadow: 0 1px 3px #001c2424; transition: transform .15s; }
input[type="checkbox"]:checked { background: var(--teal); border-color: var(--teal); }
input[type="checkbox"]:checked::after { transform: translateX(15px); }
.checkbox-control, .quantity-control { display: flex; align-items: center; gap: 13px; }
.checkbox-control > input { order: 1; }
.checkbox-control > span, .quantity-control > span { color: var(--muted); font-size: 11px; font-weight: 400; }
.checkbox-control > span { font-family: Consolas, monospace; }
.quantity-row { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 17px; }
select { width: fit-content; max-width: 100%; padding: 8px 10px; height: 38px; border: 1px solid var(--border); border-radius: 8px; background: white; color: inherit; font-size: 12px; }
.generate-action { margin-top: 23px; }
button { border: 1px solid transparent; border-radius: 9px; padding: 11px 18px; font-weight: 600; transition: background .15s; }
.generate-button { width: 100%; min-height: 47px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--teal); color: white; }
.generate-button:hover { background: #00464d; }
.result-panel { min-width: 0; padding: 28px; background: #def3e6; border-left: 1px solid #b5d6c5; display: flex; flex-direction: column; scroll-margin-top: 18px; }
h2 { font-size: 14px; font-weight: 600; margin: 0; }
.clear-button { align-self: center; background: none; color: var(--muted); padding: 4px 8px; font-size: 11px; font-weight: 400; text-decoration: underline; text-underline-offset: 3px; border-radius: 0; }
.result-output { display: flex; flex-direction: column; gap: 17px; margin: auto 0; }
.copy-actions { display: flex; flex-direction: column; gap: 8px; }
.results { min-width: 0; min-height: 126px; border: 1px solid #a9d4be; border-radius: 12px; background: white; display: flex; flex-direction: column; justify-content: center; }
.result-item { display: flex; align-items: center; gap: 10px; padding: 23px 20px; min-width: 0; }
.generated-value { flex: 1; min-width: 0; font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 23px; font-weight: 500; color: var(--teal); line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; user-select: all; }
.result-number, .result-item .copy-item { display: none !important; }
.copy-button { background: var(--mint); border-color: #68daa0; color: #124837; min-height: 45px; align-items: center; justify-content: center; gap: 9px; }
.copy-button:hover { background: #5bd99b; }
.results.is-bulk { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; justify-content: flex-start; }
.is-bulk .result-item { border-bottom: 1px solid #e5eee8; padding: 13px; }
.is-bulk .result-item:last-child { border-bottom: 0; }
.is-bulk .generated-value { font-size: 15px; }
.is-bulk .result-number { display: inline !important; color: var(--muted); font-size: 10px; }
.js .is-bulk .copy-item { display: inline-flex !important; background: #f0f6f2; color: var(--teal); border-color: #dfebe3; padding: 7px; font-size: 11px; flex-shrink: 0; border-radius: 6px; }
.result-actions { min-height: 26px; padding-top: 10px; text-align: center; }
.field-hint { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 6px 0; }
.empty-message { margin: 0; padding: 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.error-message { background: #fff5ef; border: 1px solid #dfb89f; color: #7f3d19; padding: 12px; border-radius: 7px; font-size: 13px; line-height: 1.5; margin-bottom: 0; }
.site-footer { max-width: 920px; margin: 20px auto 0; padding: 0 24px 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.site-footer p { margin: 0; }
.privacy-note { display: flex; align-items: center; gap: 8px; color: var(--teal); font-size: 14px; font-weight: 600; }
.privacy-note svg { color: var(--teal); flex-shrink: 0; }
.site-footer a { color: inherit; text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 12px 18px; border-radius: 9px; background: var(--teal); color: white; width: max-content; max-width: calc(100% - 32px); font-size: 13px; opacity: 0; pointer-events: none; box-shadow: 0 4px 18px #002a3326; }
.toast.is-visible { opacity: 1; }
.clipboard-helper { position: fixed; left: -9999px; top: 0; }
@media (max-width: 700px) {
    .site-header { max-width: 560px; margin-top: 30px; margin-bottom: 22px; }
    h1 { font-size: 25px; letter-spacing: -.75px; }
    .page-shell { max-width: 560px; }
    #generator-form { grid-template-columns: 1fr; border-radius: 15px; }
    #generator { padding: 23px; }
    .result-panel { border-left: 0; border-top: 1px solid #b5d6c5; padding: 21px 23px; }
    .results { min-height: 92px; }
    .generated-value { font-size: 22px; }
    .result-item { padding: 19px; }
    .result-actions { min-height: 0; padding-top: 0; }
    .result-actions:has(.field-hint:not([hidden])) { padding-top: 8px; }
    .site-footer { max-width: 560px; flex-direction: column; gap: 8px; margin-top: 18px; text-align: center; }
}
@media (max-width: 400px) {
    .site-header, .page-shell, .site-footer { padding-left: 16px; padding-right: 16px; }
    h1 { font-size: 22px; letter-spacing: -.65px; }
    #generator, .result-panel { padding: 20px; }
    .generated-value { font-size: 20px; }
    .result-item { padding: 16px; }
    .form-row { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media (forced-colors: active) {
    input[type="checkbox"] { appearance: auto; }
    input[type="checkbox"]::after { display: none; }
    .mode-switch input:checked + span { outline: 2px solid Highlight; }
}
@media print { .result-panel, .toast { display: none !important; } }
