/* chill in – Chill-Pass: Ansagen & Aktionen. Mobile first.
 * Bewusst ohne Klassennamen wie „popup“, „modal“ oder „promo-banner“ – die blenden Werbeblocker gern aus. */
.chnw-pass, .chnw-tabw, .chnw-band {
	--g: #183325; --g2: #24493A; --ink: #1D1D1B; --creme: #F7F0E1; --beige: #F3E6CB; --kor: #EC6644; --kord: #B5442A; --gold: #D8B652;
	--sans: Outfit, "Segoe UI", "Helvetica Neue", Arial, sans-serif; --serif: Domine, Georgia, "Times New Roman", serif;
	font-family: var(--sans); -webkit-font-smoothing: antialiased; box-sizing: border-box; text-align: left;
}
.chnw-pass *, .chnw-tabw *, .chnw-band * { box-sizing: border-box; }

/* Farbwelten */
.chnw-t-gruen   { --bg: var(--g);     --fg: var(--beige); --hd: var(--beige); --kick: var(--gold); --btn: var(--kor); --btnfg: var(--g);     --soft: rgba(243,230,203,.14); }
.chnw-t-creme   { --bg: var(--creme); --fg: #24302A;      --hd: var(--g);     --kick: var(--kord); --btn: var(--kor); --btnfg: var(--g);     --soft: rgba(24,51,37,.08); }
.chnw-t-koralle { --bg: var(--kor);   --fg: var(--g);     --hd: var(--g);     --kick: var(--g);    --btn: var(--g);   --btnfg: var(--beige); --soft: rgba(24,51,37,.12); }
.chnw-t-gold    { --bg: var(--gold);  --fg: var(--g);     --hd: var(--g);     --kick: var(--g);    --btn: var(--g);   --btnfg: var(--beige); --soft: rgba(24,51,37,.10); }

/* ---------- Chill-Pass: Karte im Liftticket-Look ---------- */
.chnw-pass {
	position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 99991;
	animation: chnw-in .55s cubic-bezier(.2,.9,.3,1.25) both;
}
.chnw-pass.chnw-fab { bottom: calc(94px + env(safe-area-inset-bottom)); }
.chnw-pass.has-ava { padding-top: 24px; }
.chnw-pass.is-out { animation: chnw-out .3s ease forwards; }
@keyframes chnw-in { from { opacity: 0; transform: translateY(40px) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes chnw-out { to { opacity: 0; transform: translate(70px, 10px) rotate(7deg) scale(.88); } }

.chnw-pass__card {
	position: relative; background: var(--bg); color: var(--fg);
	border: 2px solid var(--ink); border-radius: 20px 24px 18px 22px;
	box-shadow: 4px 4px 0 var(--ink), 0 18px 40px rgba(24,51,37,.28);
	transform: rotate(-1deg); transition: transform .25s ease;
}
.chnw-pass:hover .chnw-pass__card { transform: rotate(0); }
.chnw-pass__in { display: flex; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); overflow-y: auto; overscroll-behavior: contain; border-radius: inherit; }
.chnw-pass__stub { flex: none; width: 38px; position: relative; display: flex; align-items: center; justify-content: center; border-right: 2px dashed currentColor; opacity: .55; }
.chnw-pass__stub::before { content: ""; position: absolute; top: 14px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid currentColor; }
.chnw-pass__stub span { writing-mode: vertical-rl; transform: rotate(180deg); font: 800 11px/1 var(--sans); letter-spacing: .28em; margin-top: 20px; white-space: nowrap; }
.chnw-pass__main { flex: 1; min-width: 0; padding: 14px 14px 14px 12px; }
.chnw-pass__img { height: 104px; border-radius: 12px; background: center / cover no-repeat; margin: 0 40px 12px 0; border: 2px solid var(--ink); }
.chnw-kick { font: 800 12px/1.25 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--kick); margin: 2px 40px 6px 0; }
.chnw-ttl { font: 700 19px/1.22 var(--serif); color: var(--hd); margin: 0 40px 8px 0; }
.chnw-kick + .chnw-ttl { margin-right: 6px; }
.chnw-txt { font-size: 14.5px; line-height: 1.45; margin: 0 0 10px; }
.chnw-txt a { color: inherit; text-decoration: underline; font-weight: 600; }
.chnw-txt b, .chnw-txt strong { color: var(--hd); font-weight: 700; }

.chnw-x {
	position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0;
	background: var(--soft); color: var(--fg); font: 400 22px/1 var(--sans); cursor: pointer; display: flex; align-items: center; justify-content: center;
	-webkit-tap-highlight-color: transparent;
}
.chnw-x:hover { filter: brightness(1.15); }

.chnw-code {
	display: flex; flex-wrap: wrap; width: 100%; align-items: center; justify-content: space-between; gap: 4px 10px; margin: 0 0 10px; padding: 10px 12px;
	border: 2px dashed currentColor; border-radius: 12px; background: var(--soft); color: var(--hd); cursor: pointer; font-family: var(--sans); text-align: left;
}
.chnw-code__c { font: 800 16px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; white-space: nowrap; }
.chnw-code__h { flex: none; font: 600 12px/1.2 var(--sans); opacity: .8; }
.chnw-code.is-ok { border-style: solid; }
.chnw-code.is-ok .chnw-code__h { opacity: 1; font-weight: 800; }
.chnw-cd { display: inline-block; font: 700 13px/1.2 var(--sans); background: var(--soft); color: var(--hd); border-radius: 999px; padding: 6px 11px; margin: 0 0 12px; }

.chnw-btn {
	display: flex; align-items: center; justify-content: center; width: 100%; padding: 12px 18px; border-radius: 999px;
	background: var(--btn); color: var(--btnfg) !important; font: 700 16px/1.2 var(--sans); text-decoration: none !important;
	border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); transition: transform .15s ease, box-shadow .15s ease;
}
.chnw-btn::after { content: "→"; margin-left: 8px; transition: transform .15s ease; }
.chnw-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.chnw-btn:hover::after { transform: translateX(3px); }

/* Chillo schaut über die Karte */
.chnw-ava {
	position: absolute; top: 0; right: 58px; z-index: 3; width: 52px; height: 52px; border-radius: 50%;
	background: var(--g); color: var(--kor); border: 3px solid var(--kor); padding: 7px 6px 5px;
	box-shadow: 0 6px 16px rgba(24,51,37,.3); transform-origin: 50% 100%; animation: chnw-peek 5s ease-in-out infinite;
}
.chnw-ava svg { display: block; width: 100%; height: 100%; }
@keyframes chnw-peek { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }

.chnw-test { display: inline-block; background: var(--gold); color: var(--g); font: 800 10px/1 var(--sans); letter-spacing: .08em; padding: 4px 7px; border-radius: 999px; border: 2px solid var(--g); margin: 0 0 8px; }

/* fest eingebaut per [chill_pass] */
.chnw-pass--inline { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; max-width: 460px; margin: 24px auto; animation: none; }
.chnw-pass--inline .chnw-pass__in { max-height: none; }

/* ---------- Lasche am rechten Rand ---------- */
.chnw-tabw {
	position: fixed; right: 0; top: 38%; z-index: 99989; display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
	animation: chnw-tabin .45s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes chnw-tabin { from { transform: translateX(115%); } to { transform: none; } }
.chnw-tab {
	display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px 14px 9px; cursor: pointer;
	background: var(--bg); color: var(--hd); border: 2px solid var(--ink); border-right: 0; border-radius: 16px 0 0 16px;
	box-shadow: -3px 3px 0 var(--ink); font-family: var(--sans); animation: chnw-nudge 7s ease-in-out 3s infinite;
	-webkit-tap-highlight-color: transparent;
}
.chnw-tab:hover { padding-right: 12px; }
.chnw-tab__i { font-size: 20px; line-height: 1; }
.chnw-tab__l { writing-mode: vertical-rl; transform: rotate(180deg); font: 800 13px/1.35 var(--sans); letter-spacing: .08em; text-transform: uppercase; max-height: 160px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@keyframes chnw-nudge { 0%, 86%, 100% { transform: none; } 90% { transform: translateX(-7px); } 94% { transform: none; } 97% { transform: translateX(-3px); } }
.chnw-tab__x {
	width: 26px; height: 26px; margin-right: 6px; border-radius: 50%; border: 2px solid var(--ink); padding: 0;
	background: #fff; color: var(--ink); font: 600 15px/1 var(--sans); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: .85;
}

/* ---------- Ansage-Band oben ---------- */
.chnw-band {
	position: relative; z-index: 99980; background: var(--bg); color: var(--fg); border-bottom: 2px solid var(--ink);
	font: 500 14px/1.45 var(--sans); padding: 9px 48px 9px 14px; text-align: center; animation: chnw-drop .4s ease both;
}
.chnw-band.is-out { animation: chnw-up .25s ease forwards; }
@keyframes chnw-drop { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes chnw-up { to { transform: translateY(-100%); opacity: 0; } }
.chnw-band__c > * { margin-right: 8px; vertical-align: middle; }
.chnw-band__c > *:last-child { margin-right: 0; }
.chnw-band__k {
	display: inline-block; font: 800 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px 5px;
	background: var(--btn); color: var(--btnfg); border: 2px solid var(--ink); border-radius: 8px 10px 7px 9px; box-shadow: 2px 2px 0 var(--ink); transform: rotate(-2deg);
}
.chnw-band strong { font-weight: 700; color: var(--hd); }
.chnw-band__a { color: var(--hd) !important; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.chnw-band__a::after { content: " →"; }
.chnw-band .chnw-code { display: inline-flex; width: auto; padding: 3px 9px; margin-bottom: 0; border-radius: 8px; }
.chnw-band .chnw-code__c { font-size: 13px; }
.chnw-band .chnw-code__h { font-size: 11px; }
.chnw-band .chnw-code--plain { font: 800 13px/1.2 ui-monospace, Menlo, Consolas, monospace; cursor: default; }
.chnw-band .chnw-cd { margin-bottom: 0; padding: 3px 9px; font-size: 12px; }
.chnw-band .chnw-test { margin-bottom: 0; }
.chnw-band .chnw-x { top: 50%; right: 8px; width: 32px; height: 32px; margin-top: -16px; font-size: 19px; }
/* Laufband */
.chnw-band--run { padding-left: 0; overflow: hidden; white-space: nowrap; text-align: left; }
.chnw-band__track { display: inline-flex; animation: chnw-run 24s linear infinite; }
.chnw-band--run .chnw-band__c { display: inline-block; padding: 0 48px 0 24px; }
.chnw-band--run .chnw-x { background: var(--bg); box-shadow: -16px 0 14px 4px var(--bg); }
.chnw-band--run:hover .chnw-band__track, .chnw-band--run:focus-within .chnw-band__track { animation-play-state: paused; }
@keyframes chnw-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Fokus gut sichtbar */
.chnw-pass button:focus-visible, .chnw-pass a:focus-visible, .chnw-band button:focus-visible, .chnw-band a:focus-visible, .chnw-tabw button:focus-visible {
	outline: 3px solid var(--gold); outline-offset: 2px;
}

/* ---------- Zusammenspiel mit Chillo ---------- */
/* Chat offen → Karte & Lasche weg */
.chillo-open .chnw-pass:not(.chnw-pass--inline), .chillo-open .chnw-tabw, .chillo-is-open .chnw-pass:not(.chnw-pass--inline), .chillo-is-open .chnw-tabw { display: none; }
/* Auf einer Seite mit Chill-Pass kein Newsletter-Popup und keine Sprechblase gleichzeitig */
html.chnw-on .chillo-pop, html.chnw-on .chillo-teaser { display: none !important; }

@media (min-width: 600px) {
	.chnw-pass, .chnw-pass.chnw-fab { left: 24px; right: auto; bottom: 24px; width: 392px; }
	.chnw-pass--inline { left: auto; bottom: auto; width: auto; }
	.chnw-ttl { font-size: 23px; }
	.chnw-txt { font-size: 15px; line-height: 1.5; }
	.chnw-pass__main { padding: 16px 16px 16px 14px; }
	.chnw-band { font-size: 15px; }
	.chnw-tabw { top: 42%; }
}
@media (prefers-reduced-motion: reduce) {
	.chnw-pass, .chnw-tabw, .chnw-tab, .chnw-band, .chnw-ava, .chnw-band__track { animation: none !important; }
	.chnw-pass__card { transform: none; }
	.chnw-band--run { white-space: normal; text-align: center; padding-left: 14px; }
	.chnw-band--run .chnw-band__c[aria-hidden] { display: none; }
}
@media print { .chnw-pass, .chnw-tabw, .chnw-band { display: none !important; } }
