:root { --fg: #1d1d1f; --muted: #666; --accent: #d9480f; --bg: #fffaf5; --card: #fff; --line: #eadfd6; }
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--fg); background: var(--bg); }
main { max-width: 760px; margin: 0 auto; padding: 1rem; }
a { color: var(--accent); }
.site-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: var(--card); }
.site-header nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--fg); }
.site-footer { max-width: 760px; margin: 2rem auto; padding: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.small { font-size: .875rem; color: var(--muted); }
button, .button { display: inline-block; font: inherit; padding: .5rem 1rem; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; }
button:disabled { opacity: .5; cursor: default; }
button.link { background: none; color: var(--accent); padding: 0; text-decoration: underline; }
button.danger { background: #c92a2a; }
form.inline { display: inline; }
input { font: inherit; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; width: 100%; max-width: 24rem; }
label { display: block; margin: .5rem 0 .25rem; }
label.checkbox { display: flex; gap: .5rem; align-items: flex-start; }
label.checkbox input { width: auto; margin-top: .35rem; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .75rem; display: flex; flex-direction: column; gap: .5rem; }
button.topic { background: none; color: var(--fg); text-align: left; padding: 0; font-weight: 600; }
button.topic:hover { color: var(--accent); }
.joke-form { margin-top: .75rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.joke-box { margin-top: 1.5rem; min-height: 6rem; scroll-margin-top: 1rem; }
.headlines { margin-top: 1.5rem; }
.joke { font-size: 1.3rem; white-space: pre-wrap; }
.error { color: #c92a2a; }
.notice { background: #fff3bf; border-radius: 8px; padding: .5rem .75rem; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.pack { align-items: center; text-align: center; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal h2 { margin-top: 1.75rem; }
.lang-switch { float: right; }
code.token { word-break: break-all; font-size: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.switcher select, .inline-select { font: inherit; font-size: .9rem; padding: .2rem .3rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
button.small-button { padding: .2rem .5rem; font-size: .85rem; }
.joke-options { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-label { display: inline; margin: 0; }
.region-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.ai-written { font-style: italic; }
.loading { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
