:root {
  --accent: #e8452c;
  --accent-soft: rgba(232, 69, 44, .1);
  --bg: #ffffff;
  --fg: #1c1c21;
  --muted: #74747f;
  --line: #e4e4ea;
  --chip: #f3f3f6;
  --chip-hover: #e9e9ef;
  --schwa: #cfcfd8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent-soft: rgba(232, 69, 44, .18);
    --bg: #16161a;
    --fg: #ececf1;
    --muted: #9a9aa6;
    --line: #2c2c34;
    --chip: #222229;
    --chip-hover: #2c2c35;
    --schwa: #4a4a55;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; }

/* ---------- header / search ---------- */
header {
  padding-top: 30vh;
  text-align: center;
  transition: padding-top .6s cubic-bezier(.2, .7, .2, 1);
}
h1 {
  margin: 0 0 .1em;
  font-size: clamp(3rem, 12vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1;
  transition: font-size .6s cubic-bezier(.2, .7, .2, 1);
}
h1 a { text-decoration: none; }
h1 span { color: var(--accent); }
.claim {
  margin: .4em 0 1.4em;
  color: var(--muted);
  max-height: 2em;
  overflow: hidden;
  transition: opacity .4s, max-height .6s, margin .6s;
}
form {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 560px;
  padding: 6px;
  margin: 0 auto;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input {
  flex: 1;
  min-width: 0;
  padding: .55em 0 .55em 1.1em;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.15rem;
  outline: none;
}
input::-webkit-search-cancel-button { display: none; }
form button {
  flex: none;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
form button:hover { filter: brightness(1.08); }
.examples { margin: 1.2em 0 0; color: var(--muted); font-size: .95rem; }
.examples a { text-decoration: none; border-bottom: 1px dotted var(--muted); }
.examples a:hover { color: var(--accent); border-color: var(--accent); }

body.searched header { padding-top: 28px; }
body.searched h1 { font-size: 2.1rem; }
body.searched .claim { opacity: 0; max-height: 0; margin: 0 0 .7em; }
body.searched .examples { display: none; }

/* ---------- results ---------- */
#results { padding: 28px 0 48px; }
#results.enter { animation: slideIn .5s .15s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes slideIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.pattern { text-align: center; margin-bottom: 8px; }
.boxes { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.box {
  min-width: 2.3em;
  padding: .3em .55em;
  border: 2px solid var(--fg);
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
}
.box.stressed { background: var(--accent); border-color: var(--accent); color: #fff; }
.box.schwa { border-color: var(--schwa); color: var(--muted); font-weight: 500; }
.box .len { display: block; font-size: .6rem; font-weight: 500; opacity: .8; letter-spacing: .05em; }
.box.gap { margin-left: 10px; }
.ipa { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.ipa .guess { font-style: italic; }
.note { color: var(--muted); text-align: center; margin: 2em 0; }

.sec { margin-top: 34px; }
.sec h2 { margin: 0 0 4px; font-size: 1.05rem; }
.sec h2 small { color: var(--muted); font-weight: 400; margin-left: .4em; }
.sec p.hint { margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: .42em .95em;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--chip);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.chip:hover { background: var(--chip-hover); }
.chip:active { transform: scale(.96); }
.chip.top { border-color: var(--accent); }
.chip i { font-style: normal; color: var(--muted); margin: 0 .15em; }
.more {
  margin-top: 12px;
  padding: .35em .9em;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
}
.more:hover { text-decoration: underline; }

/* ---------- statische Reimseiten ---------- */
.logo { margin: 0 0 .7em; font-size: 2.1rem; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.logo a { text-decoration: none; }
.logo span { color: var(--accent); }
.crumbs { margin: 22px 0 0; color: var(--muted); font-size: .88rem; }
.crumbs a { color: var(--muted); }
.static article h1 { margin: 18px 0 16px; font-size: clamp(1.6rem, 5vw, 2.2rem); letter-spacing: -.02em; line-height: 1.2; text-align: center; }
.static #results { padding-top: 0; }
.lead { max-width: 640px; margin: 18px auto 0; color: var(--muted); text-align: center; }
.lead strong { color: var(--fg); }
a.chip { display: inline-block; text-decoration: none; }
.all { margin-top: 30px; }
.stand { margin-top: 8px; color: var(--muted); font-size: .82rem; }
.all a, .lead a { color: var(--accent); }
.az { text-align: center; word-spacing: .5em; }
.az a { color: var(--accent); text-decoration: none; font-weight: 600; }
footer .src { font-size: .8rem; }
footer .legal { font-size: .82rem; }
footer .legal a { color: var(--muted); }
.text { max-width: 660px; margin: 0 auto; padding-bottom: 40px; }
.text h1 { text-align: left !important; }
.text h2 { font-size: 1.1rem; margin-top: 1.8em; }
.text .todo { background: var(--accent-soft); padding: 0 .3em; border-radius: 4px; }

/* ---------- footer ---------- */
footer { max-width: 860px; width: 100%; margin: 0 auto; padding: 24px 16px 32px; text-align: center; color: var(--muted); font-size: .9rem; }
summary { cursor: pointer; display: inline-block; padding: .3em .6em; }
summary:hover { color: var(--fg); }
.about { text-align: left; max-width: 620px; margin: 10px auto 0; }
.about a { color: var(--fg); }

@media (max-width: 520px) {
  header { padding-top: 22vh; }
  body.searched h1 { font-size: 1.8rem; }
  input { font-size: 1.05rem; padding-left: .9em; }
  form button { width: 42px; height: 42px; }
  .box { font-size: 1rem; min-width: 2em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
