/* ============================================================
   cosmotrail — Astro-Tools (Rechner) Styling, "Celestial Editorial".
   Wird via extra_css='ct-tools.css' nur auf ct-Tool-Seiten geladen.
   Palette: Papier #FCFAF4 · Cream #F6EFDF · Night #16182C · Gold #C19A45.
   ============================================================ */

:root {
  --ctt-paper:#FCFAF4; --ctt-cream:#F6EFDF; --ctt-night:#16182C; --ctt-night-2:#1E2138;
  --ctt-gold:#C19A45; --ctt-gold-bright:#D9BE7E; --ctt-ink:#16182C;
  --ctt-line:rgba(20,18,40,.13); --ctt-muted:#6E6A60; --ctt-soft:#8C8678;
  --ctt-card:#FFFFFF; --ctt-radius:16px;
  --ctt-shadow:0 18px 40px -22px rgba(18,20,40,.34);
}

/* ---- Layout ---- */
.tool-page { background: var(--ctt-paper); color: var(--ctt-ink); }
.tool-wrap { max-width: 880px; margin: 0 auto; padding: 28px 20px 72px; }
.tool-head { margin: 8px 0 28px; }
.tool-eyebrow { font-weight: 800; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--ctt-gold); margin: 0 0 10px; }
.tool-head h1 { font-weight: 900; font-size: clamp(28px, 4.2vw, 44px); letter-spacing: -1px; line-height: 1.08; margin: 0 0 14px; color: var(--ctt-ink); }
.tool-lead { font-size: 17px; line-height: 1.6; color: var(--ctt-muted); margin: 0 0 14px; max-width: 60ch; }
.tool-privacy { font-size: 13px; color: var(--ctt-soft); margin: 0; }

/* Breadcrumbs (View::breadcrumbs) */
.breadcrumbs, .tool-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ctt-soft); margin-bottom: 16px; }
.breadcrumbs a, .tool-crumbs a { color: var(--ctt-gold); text-decoration: none; }

/* ---- Tool-Card / Formular ---- */
.tool-app { margin: 8px 0 28px; }
.tool-card { background: var(--ctt-card); border: 1px solid var(--ctt-line); border-radius: var(--ctt-radius); box-shadow: var(--ctt-shadow); padding: 26px 26px 30px; }
.tool-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.tool-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tool-field--full { grid-column: 1 / -1; }
.tool-field label { font-weight: 700; font-size: 13px; color: var(--ctt-ink); }
.tool-field input[type=text], .tool-field input[type=number], .tool-field input[type=date], .tool-field input[type=time], .tool-field select,
.ct-tool input[type=text], .ct-tool input[type=number], .ct-tool input[type=date], .ct-tool input[type=time], .ct-tool select {
  font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--ctt-line); border-radius: 12px;
  background: var(--ctt-paper); color: var(--ctt-ink); outline: none; width: 100%; box-sizing: border-box;
}
.tool-field input:focus, .tool-field select:focus, .ct-tool input:focus, .ct-tool select:focus { border-color: var(--ctt-gold); box-shadow: 0 0 0 3px rgba(193,154,69,.18); }
.pv-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
@media (max-width: 620px){ .tool-fields { grid-template-columns: 1fr; } }

/* Primär-Button */
.ct-btn, .tool-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; padding: 13px 24px; border-radius: 999px; border: 1px solid var(--ctt-night); background: var(--ctt-night); color: #fff; cursor: pointer; transition: transform .12s, background .15s; margin-top: 6px; }
.ct-btn:hover, .tool-btn:hover { transform: translateY(-1px); background: #0F1020; }
.ct-btn--gold { background: var(--ctt-gold); border-color: var(--ctt-gold); color: var(--ctt-night); }
.ct-btn--gold:hover { background: #A8842F; }

/* ---- Ergebnis ---- */
.tool-result { margin-top: 22px; }
.tool-result:empty { display: none; }
.ct-res { background: var(--ctt-night); color: #fff; border-radius: var(--ctt-radius); padding: 26px 28px; position: relative; overflow: hidden; }
.ct-res__label { font-weight: 800; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--ctt-gold-bright); margin-bottom: 10px; }
.ct-res__big { font-weight: 900; font-size: clamp(28px, 6vw, 44px); letter-spacing: -1px; line-height: 1; margin: 0 0 8px; color: #fff; }
.ct-res__big .glyph { color: var(--ctt-gold-bright); margin-right: 10px; }
.ct-res__sub { font-size: 14px; color: rgba(255,255,255,.78); margin: 0 0 4px; }
.ct-res__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 18px; }
.ct-res__cell { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px 14px; }
.ct-res__cell dt, .ct-res__k { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ctt-gold-bright); }
.ct-res__cell dd, .ct-res__v { font-size: 16px; font-weight: 700; color: #fff; margin: 4px 0 0; }
.ct-res__text { font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.82); margin-top: 14px; }
.ct-res__glyph { font-size: 46px; color: var(--ctt-gold-bright); }
.ct-res a { color: var(--ctt-gold-bright); font-weight: 700; }

/* Helle Ergebnis-Variante (z. B. Listen/Kalender) */
.ct-res--light { background: var(--ctt-card); color: var(--ctt-ink); border: 1px solid var(--ctt-line); box-shadow: var(--ctt-shadow); }
.ct-res--light .ct-res__big { color: var(--ctt-ink); }
.ct-res--light .ct-res__sub, .ct-res--light .ct-res__text { color: var(--ctt-muted); }
.ct-res--light .ct-res__label { color: var(--ctt-gold); }

/* Chips / Badges */
.ct-chip { display: inline-block; font-weight: 700; font-size: 11px; letter-spacing: .5px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.85); margin: 2px 4px 2px 0; }

/* Auswahl-Grid (z. B. zwei Sternzeichen, Karten) */
.ct-pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin-top: 6px; }
.ct-pick { text-align: center; padding: 12px 6px; border: 1px solid var(--ctt-line); border-radius: 12px; background: var(--ctt-paper); cursor: pointer; font: inherit; transition: border-color .15s, transform .15s; }
.ct-pick:hover { transform: translateY(-2px); border-color: var(--ctt-gold); }
.ct-pick[aria-pressed="true"] { border-color: var(--ctt-gold); background: rgba(193,154,69,.12); }
.ct-pick .glyph { font-size: 24px; color: var(--ctt-ink); display:block; }
.ct-pick small { display: block; font-size: 11px; font-weight: 700; margin-top: 4px; }

/* ---- Statische Sektionen / FAQ ---- */
.tool-disclaimer { font-size: 13px; line-height: 1.55; color: var(--ctt-soft); background: var(--ctt-cream); border-radius: 12px; padding: 14px 16px; margin: 8px 0 28px; }
.tool-section { margin: 28px 0; }
.tool-section h2 { font-weight: 900; font-size: 22px; letter-spacing: -.5px; color: var(--ctt-ink); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--ctt-line); }
.tool-section ul { padding-left: 20px; color: var(--ctt-muted); line-height: 1.7; }
.tool-faq__item { padding: 14px 0; border-bottom: 1px solid var(--ctt-line); }
.tool-faq__item h3 { font-weight: 800; font-size: 16px; color: var(--ctt-ink); margin: 0 0 6px; }
.tool-faq__item p { font-size: 14.5px; line-height: 1.6; color: var(--ctt-muted); margin: 0; }

/* Glyph-Font (Tierkreis/Planeten) */
.glyph { font-family: 'Noto Sans Symbols2','Segoe UI Symbol','Noto Sans Symbols','DejaVu Sans', sans-serif; font-variant-emoji: text; line-height: 1; display: inline-block; }

/* Tabellen (Kalender/Termine) */
.ct-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.ct-table th { text-align: left; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ctt-soft); padding: 8px 10px; border-bottom: 2px solid var(--ctt-line); }
.ct-table td { padding: 9px 10px; border-bottom: 1px solid var(--ctt-line); color: var(--ctt-ink); }
.ct-table tr:hover td { background: var(--ctt-cream); }

/* ===== SEO-Content-Blöcke (Erklär / Deutung / interne Links) — Aufgabe 1.1/1.2 ===== */
.ct-seo { margin-top: 28px; }
.ct-seo > h2 { font-size: 21px; font-weight: 900; letter-spacing: -.4px; color: var(--ctt-ink); margin: 0 0 12px; }
.ct-seo__text { font-size: 15px; line-height: 1.7; color: var(--ctt-ink); }
.ct-seo__text p { margin: 0 0 12px; }
.ct-seo__text p:last-child { margin-bottom: 0; }
.ct-seo__text a { color: var(--ctt-gold); text-decoration: underline; text-underline-offset: 2px; }
.ct-interpret__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 6px; }
.ct-interpret__item { background: var(--ctt-card, #fff); border: 1px solid var(--ctt-line); border-radius: 14px; padding: 16px 18px; }
.ct-interpret__item h3 { font-size: 15px; font-weight: 900; letter-spacing: -.2px; color: var(--ctt-ink); margin: 0 0 6px; display: flex; align-items: center; gap: 7px; }
.ct-interpret__item h3 .glyph { color: var(--ctt-gold); font-size: 17px; font-family: 'Noto Sans Symbols2','Segoe UI Symbol','Noto Sans Symbols','DejaVu Sans',sans-serif; }
.ct-interpret__item p { font-size: 13.5px; line-height: 1.6; color: var(--ctt-muted); margin: 0; }
.ct-interpret__link { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 800; letter-spacing: .4px; color: var(--ctt-gold); text-decoration: none; }
.ct-interpret__link:hover { color: var(--ctt-ink); }
.ct-related { background: var(--ctt-cream); border: 1px solid var(--ctt-line); border-radius: var(--ctt-radius, 16px); padding: 20px 22px; }
.ct-related__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 22px; }
.ct-related__list a { display: inline-flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ctt-ink); text-decoration: none; padding: 4px 0; }
.ct-related__list a:hover { color: var(--ctt-gold); }
.ct-related__arrow { color: var(--ctt-gold); font-weight: 800; }
@media (max-width: 640px){
  .ct-interpret__grid, .ct-related__list { grid-template-columns: 1fr; }
}

/* ───────── Tarot-Tageskarte: 3D-Flip-Card ───────── */
.trt-shell { text-align: center; }
.trt-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 0 4px; }
.trt-card { perspective: 1400px; width: min(300px, 76vw); }
.trt-card__inner { position: relative; width: 100%; aspect-ratio: 1024 / 1536; transform-style: preserve-3d; transition: transform .85s cubic-bezier(.2,.75,.2,1); }
.trt-card__inner.is-flipped { transform: rotateY(180deg); }
.trt-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 16px; overflow: hidden; border: 1px solid var(--ctt-gold); box-shadow: 0 26px 55px -22px rgba(18,20,40,.6), 0 0 0 1px rgba(193,154,69,.25); background: var(--ctt-night); }
.trt-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trt-face--front { transform: rotateY(180deg); }
.trt-face--back { background: linear-gradient(160deg, var(--ctt-night), var(--ctt-night-2)); }
.trt-card__inner { animation: trt-float 6s ease-in-out infinite; }
.trt-card__inner.is-flipped { animation: none; }
@keyframes trt-float { 0%,100% { transform: translateY(0) rotateZ(-.4deg); } 50% { transform: translateY(-7px) rotateZ(.4deg); } }
.trt-card.is-shuffling .trt-card__inner { animation: trt-shuffle .46s ease; }
@keyframes trt-shuffle {
  0% { transform: translateY(0) rotateZ(0) scale(1); }
  30% { transform: translateY(-10px) rotateZ(-3deg) scale(1.03); box-shadow: 0 0 40px rgba(193,154,69,.5); }
  60% { transform: translateY(-4px) rotateZ(3deg) scale(1.02); }
  100% { transform: translateY(0) rotateZ(0) scale(1); }
}
.trt-hint { margin: 0; color: var(--ctt-muted); font-size: 15px; max-width: 32ch; }
.trt-result { margin-top: 22px; }
.trt-result.is-shown .ct-res { animation: trt-reveal .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes trt-reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.trt-share { margin-top: 18px; }
.trt-share .share-bar { justify-content: center; border: none; padding: 0; }
@media (prefers-reduced-motion: reduce) {
  .trt-card__inner, .trt-card.is-shuffling .trt-card__inner, .trt-result.is-shown .ct-res { animation: none; }
  .trt-card__inner { transition: transform .3s ease; }
}
