/* Rappelkiste.de – reduziert, freundlich und mit wenigen lebendigen Akzenten */
:root {
    --fg: #202a42;
    --muted: #606a7d;
    --line: #d8deea;
    --soft: #f4f6fc;
    --accent: #4f65d8;
    --accent-dark: #394da9;
    --violet: #7756c8;
    --coral: #eb6d63;
    --gold: #eeb642;
    --mint: #36a98c;
    --focus: #9aafff;
    --r: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: linear-gradient(180deg, #f9faff 0, #fff 270px);
    color: var(--fg);
    font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    letter-spacing: .002em;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap, .top { max-width: 760px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.center { text-align: center; }
.gap { margin-top: 40px; }

/* Dauerhaft sichtbare Startseiten-Navigation mit kompakter Wort-Bild-Marke. */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(249,250,255,.92); border-bottom: 1px solid rgba(216,222,234,.82); backdrop-filter: blur(12px); }
.top { display: flex; align-items: center; min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
.logo { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 4px 7px 4px 4px; font-weight: 760; font-size: 21px; color: var(--fg); letter-spacing: -.025em; border-radius: 12px; }
.logo:hover { color: var(--accent-dark); background: rgba(79,101,216,.07); text-decoration: none; }
.logo-mark { display: block; width: 34px; height: 34px; flex: 0 0 34px; }
.logo-domain { color: var(--accent); }
.home { padding-top: clamp(44px, 9vh, 86px); }

h1 { font-size: clamp(28px, 5vw, 36px); line-height: 1.18; font-weight: 720; letter-spacing: -.025em; margin: 20px 0 10px; }
.lead { color: var(--muted); margin: 0 0 28px; max-width: 66ch; }

/* Startseite */
.question { text-align: center; font-size: 20px; font-weight: 400; margin: 12px 0 20px; }
.sub { text-align: center; font-size: 15px; font-weight: 400; color: var(--muted); margin: 48px 0 12px; }
.suggest { list-style: none; margin: 8px 0 0; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: 0 12px 30px rgba(50,62,102,.1); }
.suggest a { display: block; min-height: 44px; padding: 9px 12px; color: var(--fg); border-radius: 8px; }
.suggest [aria-selected="true"] a, .suggest a:hover { background: var(--soft); text-decoration: none; }
.search-status { margin: 10px 4px 0; color: var(--muted); font-size: 15px; }
.search-inline { margin: 0 0 16px; }

/* Eingaben */
input[type=text], input[type=search], input[type=number], input[type=date] {
    width: 100%; min-height: 48px; padding: 10px 14px;
    font: inherit; color: inherit; background: #fff;
    border: 1px solid #bec8db; border-radius: 14px; outline: none;
    box-shadow: 0 1px 2px rgba(46,58,96,.04);
}
input[type=search] { border-radius: 16px; min-height: 54px; font-size: 18px; }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--accent);
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,101,216,.09); }
.lbl { display: block; font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.field { margin: 20px 0; }
.field input { border-radius: var(--r); }
.field-num { max-width: 200px; }
.fields { display: flex; gap: 16px; }
.fields .field { flex: 1; }
.number-control { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; min-height: 52px; overflow: hidden; background: #fff; border: 1px solid #bec8db; border-radius: 15px; box-shadow: 0 2px 8px rgba(46,58,96,.06); transition: border-color .16s ease, box-shadow .16s ease; }
.number-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,101,216,.1), 0 3px 10px rgba(46,58,96,.08); }
.number-control input[type=number] { min-width: 0; min-height: 50px; padding: 8px 6px; text-align: center; font-size: 18px; font-weight: 680; font-variant-numeric: tabular-nums; background: #fff; border: 0; border-left: 1px solid #e2e6ef; border-right: 1px solid #e2e6ef; border-radius: 0; box-shadow: none; appearance: textfield; -moz-appearance: textfield; }
.number-control input[type=number]:focus { box-shadow: none; }
.number-control input[type=number]::-webkit-inner-spin-button,
.number-control input[type=number]::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
.number-step { min-width: 48px; padding: 0; color: var(--muted); background: #f7f8fc; border: 0; font: 700 23px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; cursor: pointer; transition: color .16s ease, background-color .16s ease; }
.number-step:hover { color: var(--coral); background: #fff3f1; }
.number-step-plus { color: var(--accent-dark); background: #f2f4ff; }
.number-step-plus:hover { color: #fff; background: var(--accent); }
.number-step:active { transform: none; }
.check { display: flex; gap: 10px; align-items: center; margin: 16px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; }

.editor { margin: 0 0 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 8px; margin: 0 0 8px; }
.list input, .add input { height: 44px; border-radius: var(--r); }
.add { display: flex; gap: 8px; }
.add input { border-style: dashed; }
.del {
    flex: 0 0 44px; height: 44px; padding: 0;
    font-size: 22px; line-height: 1; color: var(--muted);
    background: #fff; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
}
.del:hover { color: var(--fg); border-color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 15px; color: var(--accent); cursor: pointer; }
.more { margin: 8px 0; }
.more summary { cursor: pointer; font-size: 15px; font-weight: 600; padding: 8px 0; }

/* Buttons */
.btn {
    display: inline-flex; min-height: 46px; padding: 10px 20px; align-items: center; justify-content: center;
    font: inherit; font-size: 16px; font-weight: 620; line-height: 1.4; color: var(--fg);
    background: var(--soft); border: 1px solid #c5ced7; border-radius: 12px; cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, transform .08s ease;
}
.btn:hover { text-decoration: none; border-color: #9eabb7; background: #edf1f4; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-main {
    min-width: 220px; min-height: 54px; font-size: 18px; font-weight: 700;
    color: #fff; background: linear-gradient(135deg, var(--accent), var(--violet)); border-color: transparent; box-shadow: 0 5px 14px rgba(79,101,216,.24);
}
.btn-main:hover { color: #fff; background: linear-gradient(135deg, var(--accent-dark), #6244ae); border-color: transparent; }
.btn-quiet { background: #fff; border-color: transparent; color: var(--muted); font-weight: 500; }
.add .btn { flex: 0 0 auto; border-radius: var(--r); }
.run { text-align: center; margin: 20px 0 8px; }
.msg { min-height: 1.5em; margin: 8px 0 0; text-align: center; font-size: 15px; font-weight: 600; }

/* Tabs (eigenes Tool) */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.tabs button {
    padding: 8px 14px; font: inherit; font-size: 15px; color: var(--fg);
    background: #fff; border: 1px solid var(--line); border-radius: 18px; cursor: pointer;
}
.tabs button[aria-pressed=true] { color: var(--accent); border-color: var(--accent); font-weight: 600; }

/* Ergebnis */
.result {
    min-height: 0; margin: 28px 0 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.result:empty { display: none; }
.big { font-size: 56px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.big.long { font-size: 34px; }
.sub-result { font-size: 20px; color: var(--muted); margin-top: 12px; }
.res-list { margin: 0; padding-left: 1.6em; font-size: 22px; font-weight: 600; text-align: left; }
.res-list li { margin: 4px 0; }
.res-list.plain { list-style: none; padding: 0; }
.teams { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; text-align: left; }
.teams h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--muted); }
.teams ul { list-style: none; margin: 0; padding: 0; font-size: 22px; font-weight: 600; }
.fade { animation: fade .25s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0 24px; }
.reroll { max-width: 620px; margin: 0 auto 32px; padding: 16px 18px; border-left: 3px solid var(--coral); background: #fff7f5; border-radius: 0 var(--r) var(--r) 0; }
.reroll p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.reroll-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.reroll .linkbtn { min-height: 44px; padding: 8px; }
.pending { display: flex; gap: 8px; min-height: 64px; align-items: center; }
.pending span { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse .9s ease-in-out infinite alternate; }
.pending span:nth-child(2) { background: var(--coral); }
.pending span:nth-child(3) { background: var(--gold); }
.pending span:nth-child(2) { animation-delay: .15s; }
.pending span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { from { opacity: .25; transform: translateY(3px); } to { opacity: 1; transform: translateY(-3px); } }

/* Würfel und Münze */
.die, .coin {
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; border: 3px solid var(--accent-dark);
}
.die { width: 124px; height: 124px; border-radius: 24px; background: #fff; box-shadow: 0 8px 20px rgba(24,33,43,.1); }
.die-d6 { display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 19px; gap: 8px; }
.pip { width: 18px; height: 18px; margin: auto; border-radius: 50%; background: var(--accent-dark); visibility: hidden; }
.die-d6[data-value="1"] .p5,
.die-d6[data-value="2"] .p1, .die-d6[data-value="2"] .p9,
.die-d6[data-value="3"] .p1, .die-d6[data-value="3"] .p5, .die-d6[data-value="3"] .p9,
.die-d6[data-value="4"] .p1, .die-d6[data-value="4"] .p3, .die-d6[data-value="4"] .p7, .die-d6[data-value="4"] .p9,
.die-d6[data-value="5"] .p1, .die-d6[data-value="5"] .p3, .die-d6[data-value="5"] .p5, .die-d6[data-value="5"] .p7, .die-d6[data-value="5"] .p9,
.die-d6[data-value="6"] .p1, .die-d6[data-value="6"] .p3, .die-d6[data-value="6"] .p4, .die-d6[data-value="6"] .p6, .die-d6[data-value="6"] .p7, .die-d6[data-value="6"] .p9 { visibility: visible; }
.coin { width: 154px; height: 154px; font-size: 25px; border-radius: 50%; padding: 16px; overflow-wrap: anywhere; background: linear-gradient(145deg, #fff8dd, #fff); box-shadow: inset 0 0 0 7px #fff, inset 0 0 0 9px var(--gold), 0 10px 24px rgba(78,72,42,.13); }
.coin-face { max-width: 112px; }
.d20 { position: relative; width: 154px; height: 142px; display: grid; place-items: center; color: #fff; font-size: 42px; font-weight: 750; background: linear-gradient(145deg, var(--accent), var(--violet)); clip-path: polygon(50% 0, 96% 27%, 84% 86%, 50% 100%, 16% 86%, 4% 27%); }
.d20::before { content: ""; position: absolute; inset: 5px; background: #fff; clip-path: inherit; }
.d20 span { position: relative; color: var(--fg); }
.rolling { animation: roll 1.7s cubic-bezier(.2,.8,.2,1); }
@keyframes roll { from { transform: rotate(-520deg) scale(.72); } to { transform: none; } }
.flip { animation: flip 1.7s ease-in-out; }
@keyframes flip { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(900deg) scale(.92); } }
.color-swatch { width: 72px; height: 28px; margin-top: 12px; border: 1px solid var(--line); border-radius: 9px; }

/* Flaschendrehen */
.ring { position: relative; width: min(300px, 80vw); aspect-ratio: 1; margin: 24px auto 8px; }
.ring .name {
    position: absolute; transform: translate(-50%, -50%);
    max-width: 96px; padding: 2px 8px; border-radius: 12px;
    font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ring .name.on { color: #fff; background: var(--accent); }
.bottle {
    position: absolute; left: 50%; top: 50%; width: 28px; height: 126px; margin: -63px 0 0 -14px;
    fill: var(--accent); filter: drop-shadow(0 5px 4px rgba(24,33,43,.18)); transition: transform 3.5s cubic-bezier(.12, .72, .18, 1);
}

/* Verwandte Tools, Werbung */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips a { display: inline-block; padding: 8px 14px; font-size: 15px; color: var(--fg); border: 1px solid var(--line); border-radius: 18px; }
.chips a:hover { text-decoration: none; color: var(--accent-dark); border-color: #aeb9ea; background: #f5f6ff; }
.chips-left { justify-content: flex-start; }
.related { border-top: 1px solid var(--line); padding: 20px 0; }
.related h2 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
/* Werbung: neutral benannte Klassen vermeiden Fehlfilter durch generische Cosmetic-Blocker. */
.recommendation { margin: 30px 0 28px; padding: 19px 20px 17px; border: 1px solid #c8d3dd; border-radius: 16px; background: linear-gradient(145deg, #fff 0%, #f7f9fb 100%); }
.recommendation-kicker { margin: 0 0 7px; font-size: 12px; font-weight: 750; letter-spacing: .065em; text-transform: uppercase; color: var(--muted); }
.recommendation-title { margin: 0 0 4px; font-size: 19px; line-height: 1.3; letter-spacing: -.01em; }
.recommendation-copy { max-width: 62ch; margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.recommendation-actions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.recommendation-action { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 13px; color: var(--fg); background: #fff; border: 1px solid #b9c6d1; border-radius: 11px; font-size: 15px; font-weight: 620; }
.recommendation-action:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-dark); }
.recommendation-action span { margin-left: 5px; color: var(--muted); }
.recommendation-note { margin: 13px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }

/* Kurze, hilfreiche Inhalte unterhalb der Anwendung – bewusst ohne Kartenlayout. */
.tool-copy { border-top: 1px solid var(--line); margin: 42px 0 8px; padding: 30px 0 4px; max-width: 68ch; }
.tool-copy h2 { margin: 0 0 10px; font-size: 23px; line-height: 1.3; letter-spacing: -.015em; }
.tool-copy h2:not(:first-child) { margin-top: 32px; }
.tool-copy h3 { margin: 20px 0 6px; font-size: 17px; line-height: 1.35; }
.tool-copy p { margin: 0 0 12px; color: var(--muted); }
.tool-copy ul { margin: 0; padding-left: 1.25em; color: var(--muted); }
.tool-copy li { margin: 3px 0; }

/* Alle Tools */
.tool-list { list-style: none; margin: 0; padding: 0; }
.tool-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tool-list a { font-weight: 600; }
.tool-list span { display: block; font-size: 15px; color: var(--muted); }

/* Rechtstexte */
.prose h2 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--fg); }
.legal-note { padding: 12px 14px; color: var(--muted) !important; background: var(--soft); border-radius: var(--r); font-size: 15px; }

/* Footer */
.foot { max-width: 760px; margin: 48px auto 0; padding: 20px 16px 32px; text-align: center; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.foot nav { margin: 6px 0; }
.foot a { color: var(--muted); }
.foot a[aria-current] { color: var(--fg); font-weight: 600; }

/* Statistik */
.admin { max-width: 1100px; }
.admin table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 14px; }
.admin th, .admin td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin td.n, .admin th.n { text-align: right; white-space: nowrap; }
.admin h2 { font-size: 18px; margin: 32px 0 8px; }
.admin .scroll { overflow-x: auto; }
.admin code { font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 480px) {
    body { font-size: 16px; }
    .top { min-height: 54px; padding-top: 6px; padding-bottom: 6px; }
    .logo { font-size: 19px; }
    .logo-mark { width: 32px; height: 32px; flex-basis: 32px; }
    .home { padding-top: 38px; }
    h1 { font-size: 24px; }
    .big { font-size: 44px; }
    .big.long { font-size: 28px; }
    .btn-main { width: 100%; }
    .fields { gap: 10px; }
    .number-control { grid-template-columns: 44px minmax(0, 1fr) 44px; }
    .number-step { min-width: 44px; }
    .reroll-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
