/* Pie Phone im Browser (E465). Farben und Aufbau folgen dem Pie Phone im Spiel: hell fürs normale, dunkel fürs Pro. */
:root {
	--grund: #fff6de;
	--karte: #ffffff;
	--schrift: #3a2a1a;
	--leise: #9c8b74;
	--linie: #eadcbb;
	--rahmen: #f4e9cf;
	--gruen: #3dbb5a;
	--blau: #3b82e0;
	--rot: #d94a3d;
	--gold: #c9912a;
	--blase: #ffffff;
	--farbe: #5a6474;
}
.pro {
	--grund: #221a33;
	--karte: #352b45;
	--schrift: #f4ede0;
	--leise: #a99cb0;
	--linie: #4a3d58;
	--rahmen: #1c1730;
	--blase: #4a3f58;
	--gold: #e8b04a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: #1b1b1f; overscroll-behavior: none; }
body {
	font: 16px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--schrift);
	display: flex; justify-content: center;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
h1, h2, h3, p, ol { margin: 0; }
small { color: var(--leise); font-size: 0.82em; }

.handy {
	position: relative; width: 100%; max-width: 460px; height: 100%; height: 100dvh;
	background: var(--grund); color: var(--schrift); overflow: hidden;
	display: flex; flex-direction: column;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.handy.pro { background: linear-gradient(#1e1830, #2c1f3a 55%, #4a2a1a); }
@media (min-width: 520px) {
	body { align-items: center; }
	.handy { height: min(900px, 96vh); border: 10px solid var(--rahmen); border-radius: 34px; box-shadow: 0 0 0 2px #b98a4a, 0 20px 60px #000a; }
	.handy.pro { border-color: #15121f; box-shadow: 0 0 0 3px #d08a3a, 0 20px 60px #000a; }
}
.lade { margin: auto; color: var(--leise); padding: 24px; text-align: center; }

/* Seiten */
.seite, .start { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.inhalt { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px 18px; display: flex; flex-direction: column; gap: 8px; }
.leiste { background: var(--farbe); color: #fff; display: flex; align-items: center; gap: 8px; padding: 10px 10px; min-height: 56px; }
.leiste .titel { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; }
.leiste .titel b { font-size: 1.12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leiste small { color: #ffffffcc; }
.zurueck { width: 40px; height: 40px; font-size: 30px; line-height: 1; color: #fff; }
.platz { width: 40px; }
.reiter { display: flex; margin: 10px 12px 0; background: #0000000f; border-radius: 999px; padding: 3px; }
.pro .reiter { background: #ffffff14; }
.reiter button { flex: 1; padding: 7px 4px; border-radius: 999px; color: var(--leise); position: relative; }
.reiter button.an { background: var(--karte); color: var(--schrift); font-weight: 600; box-shadow: 0 1px 2px #0002; }
.leer { color: var(--leise); text-align: center; padding: 28px 12px; }
.klein { color: var(--leise); font-size: 0.86em; }
.gross { font-size: 1.15em; font-weight: 600; }
.riesig { font-size: 2.6em; font-weight: 700; text-align: center; }
.fehler { color: var(--rot); font-weight: 600; }
.gold { color: var(--gold); }
h3 { font-size: 0.9em; color: var(--leise); font-weight: 600; margin-top: 8px; }

/* Zeilen */
.zeile { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--linie); text-align: left; width: 100%; }
.zeile.hoch { align-items: flex-start; }
.zeile .mitte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zeile .mitte b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile .mitte p { margin-top: 4px; overflow-wrap: anywhere; }
.zeile .rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.einzeilig { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
small.online { color: var(--gruen); }
small.besetzt { color: #e08a1e; }
.kopfbild { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--farbe); color: #fff; font-weight: 700; display: grid; place-items: center; }
.punkt { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--grund); background: var(--leise); }
.punkt.online { background: var(--gruen); }
.punkt.besetzt { background: #e08a1e; }
.punkt.neu { right: 8px; top: 4px; bottom: auto; width: 9px; height: 9px; border: 0; background: #e08a1e; }
.rund { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--farbe); color: #fff; font-size: 19px; display: grid; place-items: center; -webkit-text-fill-color: #fff; }
.rund.gruen, .gross.gruen { background: var(--gruen); }
.rund.blau { background: var(--blau); }
.rund.los { background: var(--gruen); }
.pfeil { width: 40px; text-align: center; font-size: 20px; color: var(--gruen); }
.pfeil.rot, .rot { color: var(--rot); }
.gruen { color: #2c9a48; }
.zahl { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #e53935; color: #fff; font: 700 13px/22px system-ui, sans-serif; font-style: normal; text-align: center; border: 2px solid #fff; }
.zahl.frei { position: static; border: 0; }

/* Startbildschirm */
.start { background:
	linear-gradient(90deg, #f2a6ad55 50%, transparent 50%) 0 0 / 36px 36px,
	linear-gradient(#f2a6ad55 50%, transparent 50%) 0 0 / 36px 36px, #fff3ee; }
.pro .start { background: none; }
.statuszeile { display: flex; justify-content: space-between; padding: 8px 16px 0; font-size: 0.9em; font-weight: 600; }
.uhr { text-align: center; font-size: 3.4em; font-weight: 700; line-height: 1.1; letter-spacing: 1px; }
.marke { text-align: center; color: #c9772f; font-weight: 600; margin-bottom: 10px; }
.pro .marke { color: var(--gold); }
.raster { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 6px; padding: 8px 14px 14px; align-content: start; }
.kachel { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.kachel .bild { position: relative; width: 64px; height: 64px; border-radius: 16px; background: var(--farbe); color: #fff; font-size: 26px; font-weight: 700; display: grid; place-items: center; box-shadow: inset 0 -4px 0 #0003, 0 2px 4px #0003; }
.kachel .name { max-width: 100%; font-size: 0.86em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schloss { position: absolute; right: -6px; bottom: -6px; font-size: 16px; font-style: normal; background: #f2c14e; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.kachel .bild:has(.schloss) { filter: saturate(0.45); }
.dock { display: flex; justify-content: space-around; margin: 0 12px 12px; padding: 12px 6px 8px; background: #ffffffb0; border-radius: 22px; }
.pro .dock { background: #ffffff1c; }

/* Bänder und Meldungen */
.band { display: block; width: calc(100% - 24px); margin: 8px 12px 0; padding: 9px 12px; border-radius: 12px; background: #0000000d; color: var(--schrift); font-size: 0.9em; text-align: center; }
.pro .band { background: #ffffff1a; }
.band.warn { position: absolute; left: 0; right: 0; bottom: 10px; background: #d94a3d; color: #fff; z-index: 6; }
.band.knopf { background: var(--gruen); color: #fff; font-weight: 600; }
.band.laeuft { flex: none; width: 100%; margin: 0; border-radius: 0; padding: 9px 12px; background: #2a9a48; color: #fff; font-weight: 600; }
.meldung { position: absolute; left: 12px; right: 12px; top: calc(66px + env(safe-area-inset-top)); z-index: 9; background: #222c; color: #fff; padding: 11px 14px; border-radius: 14px; box-shadow: 0 4px 14px #0006; backdrop-filter: blur(6px); overflow-wrap: anywhere; }

/* Tippen */
.tippen { display: flex; gap: 8px; align-items: center; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
.inhalt .tippen, .anruf .tippen { padding: 4px 0 0; }
.feld { flex: 1; min-width: 0; border: 2px solid var(--linie); border-radius: 999px; background: var(--karte); padding: 9px 14px; outline: none; font-size: 16px; }
.feld:focus { border-color: var(--blau); }
.feld::placeholder { color: var(--leise); }

/* SMS-Blasen */
.blase { align-self: flex-start; max-width: 82%; background: var(--blase); border: 2px solid var(--linie); border-radius: 14px 14px 14px 4px; padding: 7px 11px 4px; display: flex; flex-direction: column; }
.blase.ich { align-self: flex-end; background: var(--blau); border-color: var(--blau); color: #fff; border-radius: 14px 14px 4px 14px; }
.blase p { overflow-wrap: anywhere; white-space: pre-wrap; }
.blase time { font-size: 0.72em; color: var(--leise); align-self: flex-end; }
.blase.ich time, .blase.ich small { color: #ffffffcc; }

/* Gespräch */
.anruf { position: absolute; inset: 0; z-index: 4; background: linear-gradient(#1f3d2c, #14241c); color: #fff; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: calc(34px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom)); text-align: center; }
.anruf > .kopfbild { width: 96px; height: 96px; font-size: 40px; margin-top: 18px; }
.anruf h2 { font-size: 1.7em; }
.anruf .klein { color: #ffffffb0; }
.anruf > button.klein { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 12px; color: #ffffffcc; padding: 6px; }
.laufzeit { font-size: 1.3em; font-variant-numeric: tabular-nums; }
.tonzeile { background: #ffffff1c; border-radius: 999px; padding: 6px 14px; font-size: 0.9em; }
.tonzeile.warn { background: #d94a3d; }
.rundeKoepfe { display: flex; gap: 8px; margin-top: 18px; }
.funk { flex: 1; min-height: 60px; width: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.funk .blase { background: #ffffff22; border-color: transparent; color: #fff; }
.anruf .tippen { width: 100%; }
.anruf .feld { background: #ffffff22; border-color: transparent; color: #fff; }
.anruf .feld::placeholder { color: #ffffff99; }
.knoepfe { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
button.gross { flex: 1 1 120px; padding: 15px 10px; border-radius: 999px; background: #ffffff2b; color: #fff; font-size: 1.05em; }
button.gross.rot { background: var(--rot); color: #fff; }
button.gross.an { background: #fff; color: #14241c; }

/* Karten und Knöpfe */
.karte { background: var(--karte); border-radius: 16px; padding: 12px; }
.karte.gruen { background: linear-gradient(#2a9d76, #1f7a5a); color: #fff; display: flex; flex-direction: column; gap: 2px; padding: 16px; }
.karte.gruen b { font-size: 2em; }
.karte.gruen small { color: #ffffffd0; }
button.breit { width: 100%; padding: 12px; border-radius: 999px; background: var(--karte); color: #1f7a5a; font-weight: 700; box-shadow: 0 1px 2px #0002; }
.pro button.breit { color: #7fe0b5; }
button.breit.voll { background: var(--farbe, #1f7a5a); color: #fff; }
button.breit.voll:not([style]) { background: #1f7a5a; }
button.breit.rot { color: var(--rot); }
button.breit:disabled { opacity: 0.45; }
button.breit.appKnopf { text-align: left; border-radius: 14px; color: var(--schrift); font-weight: 600; padding: 12px 14px; }
.appZeile { padding: 2px 4px; overflow-wrap: anywhere; }
.vorzeichen { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #3dbb5a2e; color: #2c9a48; font-weight: 700; font-size: 20px; }
.vorzeichen.rot { background: #d94a3d2e; color: var(--rot); }
.betrag { white-space: nowrap; }
.betragFeld { display: flex; align-items: center; gap: 8px; font-size: 1.6em; }
.betragFeld .feld { text-align: right; font-size: 1em; border-radius: 16px; }

/* Dorfbook */
.post { background: var(--karte); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.post > p { overflow-wrap: anywhere; white-space: pre-wrap; }
.post .zeile { border: 0; padding: 0; }
.foto { width: 100%; border-radius: 10px; display: block; image-rendering: auto; }
.foto.leer { background: #0000000f; color: var(--leise); text-align: center; padding: 40px 0; }
.unter { display: flex; align-items: center; gap: 12px; }
.daumen { padding: 5px 12px; border-radius: 999px; background: #0000000d; font-weight: 700; color: var(--leise); }
.pro .daumen { background: #ffffff1a; }
.daumen.an { background: #e5393522; color: #e53935; }
.kommentar { font-size: 0.93em; overflow-wrap: anywhere; border-top: 1px solid var(--linie); padding-top: 5px; }
button.klein { color: var(--leise); font-size: 0.86em; padding: 6px; }

/* Pro-Apps */
.wetter { display: flex; align-items: flex-end; gap: 2px; height: 90px; }
.wetter i { flex: 1; border-radius: 3px 3px 0 0; }
.wetter .w0 { height: 22%; background: #f2c14e; }
.wetter .w1 { height: 62%; background: #4a8fe0; }
.wetter .w2 { height: 100%; background: #7a5ad0; }
.wetter .wx { height: 40%; background: #9c9c9c66; }
.achse { display: flex; justify-content: space-between; }
.balken { position: relative; height: 14px; border-radius: 7px; background: #00000022; }
.balken i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: linear-gradient(90deg, #6fe08a, #f2d27a 30%, #ff8a80 60%); }
.balken u { position: absolute; left: 25%; top: -3px; bottom: -3px; width: 2px; background: var(--schrift); }
.schalter { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; background: var(--karte); border-radius: 14px; text-align: left; }
.schalter i { flex: none; width: 46px; height: 26px; border-radius: 13px; background: var(--leise); position: relative; transition: background 0.15s; }
.schalter i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.schalter.an i { background: var(--gruen); }
.schalter.an i::after { left: 23px; }

/* Koppeln */
.koppeln { margin: auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.koppeln ol { text-align: left; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

.hoerer { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
