:root {
  --ink: #1b1b2e; --pink: #ff5d8f; --blue: #3a86ff; --yellow: #ffd23f; --green: #2dc653; --purple: #9d4edd;
  --panel: rgba(255, 255, 255, .96); --font: 'Fredoka', 'Arial Rounded MT Bold', system-ui, sans-serif; --title: 'Lilita One', 'Arial Black', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #58b4ff; font-family: var(--font); color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; }
.hidden { display: none !important; }
.ingame { display: none; }
body.playing .ingame { display: block; }

/* Schilder in der Welt */
#labels, #floaters { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; font-weight: 700; line-height: 1.15; will-change: transform;
  text-shadow: -1.5px -1.5px 0 #1b1b2e, 1.5px -1.5px 0 #1b1b2e, -1.5px 1.5px 0 #1b1b2e, 1.5px 1.5px 0 #1b1b2e, 0 2px 4px rgba(0,0,0,.5); color: #fff; }
.lbl-cr { font-size: 13px; }
.lbl-cr .nm { font-size: 14px; }
.lbl-cr .hearts { font-size: 11px; text-shadow: none; }
.lbl-char { font-size: 15px; font-family: var(--title); letter-spacing: .5px; }
.lbl-char.me b { color: #9ad1ff; }
.lbl-cash { background: linear-gradient(#5ff08a, #22b14c); border: 2.5px solid #fff; border-radius: 12px; padding: 1px 8px; font-size: 13px; box-shadow: 0 3px 0 #13702f, 0 4px 10px rgba(0,0,0,.3); text-shadow: 0 1px 0 #13702f; }
.lbl-lock { font-size: 12px; background: rgba(27,27,46,.75); padding: 2px 8px; border-radius: 10px; text-shadow: none; }
.lbl-lock.on { background: rgba(220,30,60,.85); }
.lbl-pad { font-size: 14px; background: rgba(27,27,46,.55); padding: 3px 10px; border-radius: 12px; text-shadow: none; }
.lbl-pad small { font-weight: 500; font-size: 11px; opacity: .9; }
.alarm { color: #ff4d5e; animation: blink .4s infinite alternate; font-size: 16px; }
@keyframes blink { to { opacity: .35; } }
.ok { color: #6dff8f; } .no { color: #ff6b6b; } .inc { color: #ffe066; }
.gen { color: #e0aaff; font-size: 11px; }
.r0 { color: #d6dde4; } .r1 { color: #5df07a; } .r2 { color: #c49bff; } .r3 { color: #ffd23f; } .r4 { color: #ff4d5e; }
.r5 { background: linear-gradient(90deg, #ff7ae0, #ffd23f, #5df07a, #4cc9f0, #ff7ae0); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: rb 2s linear infinite; text-shadow: none; filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000); }
.r6 { color: #fff; text-shadow: 0 0 6px #fff, 0 0 12px #c77dff, -1px -1px 0 #000, 1px 1px 0 #000; }
@keyframes rb { to { background-position: 200% 0; } }
.mut { padding: 0 5px; border-radius: 6px; font-size: 11px; text-shadow: none; color: #1b1b2e; }
.mut.gold { background: linear-gradient(#fff3b0, #ffb703); }
.mut.diamant { background: linear-gradient(#e0fbff, #4cc9f0); }
.mut.mond { background: linear-gradient(#d0bfff, #7b2ff7); color: #fff; }
.mut.regenbogen { background: linear-gradient(90deg, #ff5d8f, #ffd23f, #5df07a, #4cc9f0, #b77bff); }
b.mond { color: #c9a7ff; }

.floater { position: absolute; transform: translate(-50%, -50%); font-family: var(--title); font-size: 22px; color: #fff; pointer-events: none;
  text-shadow: -2px -2px 0 #1b1b2e, 2px -2px 0 #1b1b2e, -2px 2px 0 #1b1b2e, 2px 2px 0 #1b1b2e; animation: up 1.3s ease-out forwards; }
.floater.pos { color: #6dff8f; } .floater.neg { color: #ff8fa3; }
.floater.slap { color: #ffd23f; font-size: 30px; animation: slapUp 1.1s ease-out forwards; }
@keyframes up { 0% { opacity: 0; margin-top: 10px; } 15% { opacity: 1; } 100% { opacity: 0; margin-top: -70px; } }
@keyframes slapUp { 0% { transform: translate(-50%,-50%) scale(.3) rotate(-10deg); } 20% { transform: translate(-50%,-50%) scale(1.3) rotate(6deg); } 100% { transform: translate(-50%,-110%) scale(1) rotate(0); opacity: 0; } }

/* HUD */
#hud { position: fixed; left: 16px; top: 14px; pointer-events: none; }
#money { font-family: var(--title); font-size: 46px; color: #6dff8f; line-height: 1;
  text-shadow: -3px -3px 0 #1b1b2e, 3px -3px 0 #1b1b2e, -3px 3px 0 #1b1b2e, 3px 3px 0 #1b1b2e, 0 5px 0 #1b1b2e; }
#income { font-weight: 700; font-size: 18px; color: #ffe066; margin-top: 4px; text-shadow: -1.5px -1.5px 0 #1b1b2e, 1.5px -1.5px 0 #1b1b2e, -1.5px 1.5px 0 #1b1b2e, 1.5px 1.5px 0 #1b1b2e; }
#stars { font-weight: 700; font-size: 14px; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; margin-top: 2px; }
#lockState { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); padding: 7px 18px; border-radius: 30px; font-weight: 700; font-size: 16px; color: #fff; border: 3px solid #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.25); pointer-events: none; white-space: nowrap; }
#lockState.open { background: #ff8c42; animation: pulse 1.2s infinite; }
#lockState.locked { background: #e5383b; }
#lockState.night { background: #5a189a; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.05); } }
#topbtns { position: fixed; right: 14px; top: 14px; }
#topbtns button { font-size: 20px; min-width: 46px; height: 46px; border-radius: 14px; border: 3px solid #fff; background: var(--blue); color: #fff; margin-left: 6px; font-weight: 700;
  box-shadow: 0 4px 0 #1d4fa8; transition: transform .1s; }
#topbtns button:active { transform: translateY(3px); box-shadow: 0 1px 0 #1d4fa8; }
#topbtns button.off { background: #8d99ae; box-shadow: 0 4px 0 #5c677d; }
#btnLex { background: var(--purple) !important; box-shadow: 0 4px 0 #5a189a !important; }
#minimap { position: fixed; right: 14px; top: 74px; border-radius: 14px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.3); width: 200px; height: 125px; }
#toasts { position: fixed; left: 16px; top: 120px; width: min(420px, 60vw); pointer-events: none; }
.toast { background: var(--panel); border-radius: 14px; padding: 9px 14px; margin-bottom: 8px; font-size: 15px; font-weight: 500; border-left: 7px solid var(--blue);
  box-shadow: 0 4px 14px rgba(0,0,0,.2); animation: tin .3s cubic-bezier(.2,1.4,.5,1); transition: opacity .4s, transform .4s; }
.toast.good { border-left-color: var(--green); } .toast.bad { border-left-color: #e5383b; } .toast.tip { border-left-color: #ffd23f; background: #fffbe6; } .toast.rare { border-left-color: var(--pink); background: #fff0f6; }
.toast.out { opacity: 0; transform: translateX(-30px); }
@keyframes tin { from { opacity: 0; transform: translateX(-40px) scale(.9); } }
#hint { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; transition: .15s; background: rgba(27,27,46,.85); color: #fff; padding: 10px 20px;
  border-radius: 30px; font-size: 18px; font-weight: 600; pointer-events: none; white-space: nowrap; border: 3px solid rgba(255,255,255,.8); }
#hint.show { opacity: 1; transform: translateX(-50%); }
#hint kbd, .help kbd { display: inline-block; background: #fff; color: var(--ink); border-radius: 7px; padding: 0 8px; margin-right: 6px; font-family: var(--title); box-shadow: 0 3px 0 #adb5bd; }
#banner { position: fixed; top: 22%; left: 50%; transform: translate(-50%, -50%) scale(.4); opacity: 0; pointer-events: none; text-align: center; transition: none; }
#banner.show { animation: ban 4.2s cubic-bezier(.2,1.5,.5,1) forwards; }
@keyframes ban { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.4); } 8% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 85% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-70%) scale(.9); } }
#banner .bt { font-family: var(--title); font-size: clamp(34px, 6vw, 64px); color: #ffd23f; white-space: nowrap;
  text-shadow: -4px -4px 0 #1b1b2e, 4px -4px 0 #1b1b2e, -4px 4px 0 #1b1b2e, 4px 4px 0 #1b1b2e, 0 7px 0 #1b1b2e; }
#banner .bs { display: inline-block; margin-top: 8px; background: var(--panel); padding: 8px 18px; border-radius: 16px; font-size: 18px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
#banner .bs span { text-shadow: -1px -1px 0 #1b1b2e, 1px -1px 0 #1b1b2e, -1px 1px 0 #1b1b2e, 1px 1px 0 #1b1b2e; font-weight: 700; }

/* Touch */
#touch { display: none !important; }
body.touch.playing #touch { display: block !important; }
#joy { position: fixed; left: 28px; bottom: 28px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.25); border: 4px solid rgba(255,255,255,.7); }
#joyKnob { position: absolute; left: 35px; top: 35px; width: 62px; height: 62px; border-radius: 50%; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
#btnAct, #btnSlap { position: fixed; bottom: 34px; width: 92px; height: 92px; border-radius: 50%; border: 4px solid #fff; font-size: 34px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
#btnAct small, #btnSlap small { font-size: 12px; font-weight: 700; margin-top: 3px; }
#btnAct { right: 26px; background: var(--green); box-shadow: 0 6px 0 #13702f; }
#btnSlap { right: 132px; bottom: 54px; width: 78px; height: 78px; font-size: 28px; background: var(--pink); box-shadow: 0 6px 0 #b51d5a; }
body.touch #hint { bottom: 140px; font-size: 16px; }

/* Fenster */
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(20,10,50,.45); z-index: 10; padding: 16px; }
.panel { position: relative; background: var(--panel); border-radius: 26px; padding: 22px 26px; width: min(520px, 100%); max-height: 88vh; overflow: auto; box-shadow: 0 10px 0 rgba(0,0,0,.15), 0 20px 50px rgba(0,0,0,.35); border: 4px solid #fff; animation: pop .25s cubic-bezier(.2,1.5,.5,1); }
.panel.wide { width: min(900px, 100%); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.panel h2 { font-family: var(--title); font-size: 34px; margin: 0 0 12px; color: var(--purple); letter-spacing: .5px; }
.panel h3 { margin: 18px 0 8px; }
.x { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: none; background: #e9ecef; font-size: 18px; font-weight: 700; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: #f3f0ff; margin-bottom: 10px; }
.item .ic { font-size: 36px; width: 50px; text-align: center; }
.item .tx { flex: 1; font-size: 16px; } .item small { color: #555; }
.item button, button.big { border: 3px solid #fff; background: var(--green); color: #fff; font-weight: 700; font-size: 17px; border-radius: 14px; padding: 9px 16px; box-shadow: 0 4px 0 #13702f; min-width: 90px; }
.item button:disabled, button.big:disabled { background: #adb5bd; box-shadow: 0 4px 0 #6c757d; cursor: default; }
.warn { color: #c1121f; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.card { background: linear-gradient(#f7f0ff, #e7dcff); border-radius: 16px; padding: 6px 6px 8px; text-align: center; cursor: pointer; transition: transform .1s; }
.card:hover { transform: translateY(-3px) rotate(-1deg); }
.card img { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; border-radius: 10px; }
.card .cn { font-weight: 700; font-size: 13px; line-height: 1.1; }
.card .cr { font-size: 12px; font-weight: 700; text-shadow: -1px -1px 0 #1b1b2e, 1px -1px 0 #1b1b2e, -1px 1px 0 #1b1b2e, 1px 1px 0 #1b1b2e; }
.card .cg { font-size: 10px; color: #7a6b99; }
.card.unk { background: #ddd8e8; cursor: default; }
.lexsum { font-size: 18px; } .empty { color: #777; grid-column: 1/-1; }
.help { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.help > div { background: #f3f0ff; border-radius: 16px; padding: 4px 14px 8px; }
.help h4 { margin: 10px 0 4px; font-size: 17px; } .help p { margin: 6px 0; font-size: 15px; line-height: 1.35; }
.new { background: var(--pink); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 8px; vertical-align: middle; }

/* Startbildschirm */
.modal.ask { z-index: 30; }
.modal.start { flex-direction: column; background: radial-gradient(ellipse at center, rgba(255,255,255,0) 30%, rgba(40,10,90,.45)); gap: 18px; }
.logo { text-align: center; transform: rotate(-3deg); animation: logoIn .9s cubic-bezier(.2,1.6,.5,1); }
@keyframes logoIn { from { transform: rotate(-3deg) scale(.2); opacity: 0; } }
.logo .l1, .logo .l2 { font-family: var(--title); line-height: .9; letter-spacing: 2px; }
.logo .l1 { font-size: clamp(56px, 11vw, 120px); color: #ff5d8f; text-shadow: -5px -5px 0 #fff, 5px -5px 0 #fff, -5px 5px 0 #fff, 5px 5px 0 #fff, 0 10px 0 #b51d5a, 0 14px 20px rgba(0,0,0,.35); }
.logo .l2 { font-size: clamp(50px, 10vw, 108px); color: #ffd23f; text-shadow: -5px -5px 0 #1b1b2e, 5px -5px 0 #1b1b2e, -5px 5px 0 #1b1b2e, 5px 5px 0 #1b1b2e, 0 10px 0 #1b1b2e, 0 14px 20px rgba(0,0,0,.35); animation: wob 2.4s ease-in-out infinite; }
@keyframes wob { 50% { transform: rotate(2deg) scale(1.03); } }
.logo .sub { display: inline-block; margin-top: 12px; background: #3a86ff; color: #fff; font-family: var(--title); font-size: clamp(18px, 3vw, 28px); padding: 4px 20px; border-radius: 30px; border: 4px solid #fff; box-shadow: 0 5px 0 #1d4fa8; }
.startbox { background: var(--panel); border-radius: 26px; padding: 18px 22px; width: min(480px, 100%); text-align: center; border: 4px solid #fff; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.pitch { font-size: 16px; line-height: 1.4; margin: 0 0 12px; }
.diff span { font-weight: 600; font-size: 14px; color: #555; }
.diff div { display: flex; gap: 6px; justify-content: center; margin: 6px 0 14px; flex-wrap: wrap; }
.diff button { border: 3px solid #e0d6ff; background: #fff; border-radius: 14px; padding: 7px 12px; font-size: 15px; font-weight: 600; }
.diff button.sel { border-color: var(--purple); background: #f3eaff; box-shadow: 0 3px 0 var(--purple); }
button.big { display: block; width: 100%; margin: 8px 0; font-size: 22px; padding: 12px; font-family: var(--title); letter-spacing: .5px; }
button.big small { display: block; font-family: var(--font); font-size: 13px; opacity: .9; }
button.big.alt { background: var(--pink); box-shadow: 0 4px 0 #b51d5a; }
button.link { border: none; background: none; color: var(--blue); font-weight: 600; font-size: 15px; margin-top: 4px; }

@media (max-width: 700px) {
  #money { font-size: 34px; } #income { font-size: 15px; }
  #minimap { width: 140px; height: 88px; top: 70px; }
  #topbtns button { min-width: 38px; height: 38px; font-size: 16px; margin-left: 3px; }
  #lockState { top: auto; bottom: 190px; font-size: 13px; }
  #toasts { top: 100px; width: 70vw; } .toast { font-size: 13px; }
  .lbl-cr { font-size: 11px; } .lbl-cr .nm { font-size: 12px; }
}
.card .cr.r5 { text-shadow: none; }
@media (max-height: 520px) {
  .modal.start { flex-direction: row; gap: 14px; overflow: auto; }
  .logo .l1 { font-size: 46px; } .logo .l2 { font-size: 42px; } .logo .sub { font-size: 15px; padding: 3px 12px; }
  .pitch { display: none; } .startbox { padding: 10px 14px; width: min(400px, 100%); }
  button.big { font-size: 18px; padding: 8px; margin: 5px 0; }
  #money { font-size: 30px; } #income { font-size: 13px; }
  #minimap { width: 120px; height: 75px; top: 58px; }
  #topbtns { top: 8px; } #topbtns button { min-width: 34px; height: 34px; font-size: 15px; margin-left: 3px; border-width: 2px; }
  #toasts { width: 44vw; top: 78px; } .toast { font-size: 12px; padding: 5px 10px; margin-bottom: 5px; }
  #lockState { top: 8px; bottom: auto; font-size: 12px; padding: 4px 12px; }
  #joy { width: 110px; height: 110px; left: 16px; bottom: 16px; } #joyKnob { left: 21px; top: 21px; width: 60px; height: 60px; }
  #btnAct { width: 76px; height: 76px; bottom: 18px; right: 16px; font-size: 28px; }
  #btnSlap { width: 62px; height: 62px; right: 102px; bottom: 34px; font-size: 22px; }
  body.touch #hint { bottom: 12px; font-size: 13px; }
  .lbl-pad { display: none; }
}

/* Startbildschirm: Name, Aussehen, Mitspielen */
.who label { display: block; font-weight: 600; font-size: 15px; color: #555; }
.who input, .join input { font-family: var(--title); font-size: 22px; padding: 6px 12px; border-radius: 14px; border: 3px solid #e0d6ff; width: 210px; text-align: center; color: var(--ink); margin-top: 4px; outline: none; }
.who input:focus, .join input:focus { border-color: var(--purple); }
.namerow { display: inline-flex; align-items: center; gap: 6px; }
.dice { font-size: 22px; width: 44px; height: 44px; margin-top: 4px; border-radius: 14px; border: 3px solid #e0d6ff; background: #fff; padding: 0; }
.dice:active { transform: rotate(40deg) scale(.9); }
.looks { display: grid; grid-template-columns: auto auto; gap: 6px 10px; justify-content: center; align-items: center; margin: 10px 0 4px; font-size: 13px; font-weight: 600; color: #555; }
.looks > div { display: flex; gap: 6px; }
.sw { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #ddd; padding: 0; }
.sw.sel { box-shadow: 0 0 0 3px var(--ink); transform: scale(1.1); }
.join { margin-top: 10px; padding-top: 10px; border-top: 2px dashed #e0d6ff; }
.join span { font-weight: 600; font-size: 14px; color: #555; }
.join > div:first-of-type { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.join input { width: 110px; letter-spacing: 4px; }
.join button { border: 3px solid #fff; background: var(--blue); color: #fff; font-weight: 700; font-size: 16px; border-radius: 14px; padding: 6px 14px; box-shadow: 0 4px 0 #1d4fa8; }
#joinMsg { min-height: 18px; font-size: 13px; color: #c1121f; margin-top: 4px; font-weight: 600; }
#room { position: fixed; right: 14px; top: 208px; width: 200px; background: rgba(255,255,255,.94); border-radius: 14px; padding: 7px 10px; font-size: 13px; font-weight: 600; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.2); pointer-events: none; }
#room .code { font-family: var(--title); font-size: 20px; letter-spacing: 2px; color: var(--purple); }
.floater.bark { color: #fff; font-size: 20px; }
@media (max-width: 700px) { #room { width: 140px; top: 165px; font-size: 11px; } }
@media (max-height: 520px) { #room { width: 120px; top: 140px; font-size: 10px; } .looks { margin: 4px 0; } .who input { font-size: 17px; width: 160px; } .sw { width: 24px; height: 24px; } }

/* Halloween */
.mut.kuerbis { background: linear-gradient(#ffc06b, #ff7b00); }
.mut.frost { background: linear-gradient(#e0f4ff, #7ec8f0); color: #1d3557; }
#candy { position: fixed; left: 16px; top: 98px; background: linear-gradient(#3c1a5b, #241036); color: #fff; border: 3px solid #ff8c1a; border-radius: 16px; padding: 4px 12px; font-size: 16px; font-weight: 700; box-shadow: 0 4px 0 #7a3d00; pointer-events: none; max-width: 340px; }
#candy small { display: block; font-weight: 500; font-size: 12px; color: #ffd6a8; }
body.playing #candy.hidden { display: none; }
#toasts { top: 160px; }
#eventBadge { display: inline-block; margin-top: 10px; background: linear-gradient(#ff9a3c, #ff6a00); color: #fff; font-family: var(--title); font-size: clamp(16px, 2.4vw, 22px); padding: 4px 16px; border-radius: 20px; border: 3px solid #3c1a5b; transform: rotate(2deg); animation: wob 2s ease-in-out infinite; }
@media (max-height: 520px) { #candy { top: 60px; font-size: 13px; max-width: 220px; } #toasts { top: 132px; } }

/* Werkzeugleiste */
#toolbar { position: fixed; left: 16px; bottom: 18px; display: flex; gap: 8px; }
#toolbar button { position: relative; width: 58px; height: 58px; border-radius: 16px; border: 3px solid #fff; background: #3c1a5b; color: #fff; font-size: 28px; box-shadow: 0 4px 0 #1b0b2b; overflow: hidden; padding: 0; }
#toolbar button.ready { background: linear-gradient(#7b2ff7, #4b1a9a); }
#toolbar .ti { position: relative; z-index: 1; }
#toolbar .tk { position: absolute; left: 4px; top: 1px; font-size: 11px; font-weight: 700; z-index: 2; opacity: .85; }
#toolbar .tn { position: absolute; right: 3px; bottom: 1px; font-size: 12px; font-weight: 700; z-index: 2; background: #ff5d8f; border-radius: 8px; padding: 0 4px; }
#toolbar .tc { position: absolute; inset: 0; border-radius: 13px; }
body.touch #toolbar { left: auto; right: 18px; bottom: 150px; flex-direction: column-reverse; }
body.touch #toolbar button { width: 52px; height: 52px; font-size: 24px; }
/* Shop */
.shopinfo { background: #f3eaff; border-radius: 12px; padding: 8px 12px; font-size: 14px; }
#shopList h3 { margin: 14px 0 6px; }
.item.locked { opacity: .6; }
/* Wer ist online */
#nameMsg { min-height: 0; font-size: 13px; color: #c1121f; font-weight: 600; }
.online { margin: 8px 0 4px; padding: 8px 10px; background: #f6f2ff; border-radius: 14px; font-size: 14px; text-align: left; max-height: 150px; overflow: auto; }
.online .on, #onlineBox .on { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.online small, #onlineBox small { color: #6b5f86; }
.online button, #onlineBox button { margin-left: auto; border: 2px solid #fff; background: var(--blue); color: #fff; font-weight: 700; border-radius: 10px; padding: 3px 9px; font-size: 13px; box-shadow: 0 3px 0 #1d4fa8; }
.online button:disabled, #onlineBox button:disabled { background: #adb5bd; box-shadow: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #adb5bd; display: inline-block; }
.dot.host, .dot.guest { background: #2dc653; box-shadow: 0 0 0 3px rgba(45,198,83,.25); }
#onlineBox { position: fixed; right: 14px; top: 290px; width: 220px; background: rgba(255,255,255,.95); border-radius: 14px; padding: 8px 10px; font-size: 13px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.2); max-height: 220px; overflow: auto; }
#onlineBox .oh { font-weight: 700; }
@media (max-width: 700px), (max-height: 520px) { #onlineBox { display: none !important; } }
.modal.start { overflow-y: auto; justify-content: safe center; }
.r7 { background: linear-gradient(90deg, #7af0ff, #b77bff, #ff7ae0, #7af0ff); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: rb 1.5s linear infinite; text-shadow: none; filter: drop-shadow(0 0 2px #2b0a5c) drop-shadow(0 0 1px #000); }
.card .cr.r7 { text-shadow: none; }
.card .hint { font-size: 18px; color: var(--ink); }
.stars { color: #ffd23f; text-shadow: 0 0 4px #ff9e00, -1px -1px 0 #1b1b2e, 1px 1px 0 #1b1b2e; }

/* Großansicht im Lexikon */
#mView { z-index: 12; }
.panel.view { text-align: center; }
.panel.view h2 { margin-bottom: 2px; }
#viewInfo { font-weight: 700; font-size: 16px; }
#viewInfo .cr { text-shadow: -1px -1px 0 #1b1b2e, 1px -1px 0 #1b1b2e, -1px 1px 0 #1b1b2e, 1px 1px 0 #1b1b2e; }
#viewBox { width: 100%; height: min(62vh, 560px); margin: 0 0 4px; border-radius: 20px; background: radial-gradient(circle at 50% 40%, #ffffff, #e7dcff 70%); touch-action: none; overflow: hidden; }
#viewBox canvas { display: block; width: 100%; height: 100%; }
.viewhint { font-size: 13px; margin: 4px 0 0; }
/* Einstellungen */
.setrow { text-align: center; margin-bottom: 8px; }
.setrow small { display: block; color: #666; font-size: 13px; margin-top: -6px; }
button.big.app { background: var(--blue); box-shadow: 0 4px 0 #1d4fa8; font-size: 18px; }

/* Sammelkarte für neu entdeckte Kreaturen */
#mCard { position: fixed; inset: 0; z-index: 11; display: flex; align-items: center; justify-content: center; background: rgba(20,10,50,.35); padding: 16px; --rc: #c49bff; }
.scard { position: relative; width: min(330px, 86vw); padding: 10px 12px 12px; border-radius: 24px; text-align: center; overflow: hidden;
  background: linear-gradient(160deg, #fff 0%, #f3eaff 60%, #e2d4ff 100%); border: 6px solid var(--rc); box-shadow: 0 0 0 4px #fff, 0 0 40px var(--rc), 0 18px 40px rgba(0,0,0,.4);
  transform: perspective(900px) rotateY(90deg) scale(.6); opacity: 0; }
#mCard.show .scard { animation: cardIn .7s cubic-bezier(.2,1.4,.5,1) forwards; }
@keyframes cardIn { to { transform: perspective(900px) rotateY(0) scale(1); opacity: 1; } }
.scard::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.75) 50%, transparent 60%); animation: shine 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes shine { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
.sc-top { font-family: var(--title); font-size: 24px; color: #fff; background: var(--rc); border-radius: 14px; padding: 4px; text-shadow: -2px -2px 0 #1b1b2e, 2px -2px 0 #1b1b2e, -2px 2px 0 #1b1b2e, 2px 2px 0 #1b1b2e; letter-spacing: 1px; }
#cardBox { height: min(46vh, 300px); margin: 8px 0 4px; border-radius: 16px; background: radial-gradient(circle at 50% 40%, #fff, #eadfff 75%); touch-action: none; }
#cardBox canvas { display: block; width: 100%; height: 100%; }
#cardBox.pic { background: #fbf6ec; overflow: hidden; }
#cardBox img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sc-kind { font-weight: 700; font-size: 14px; color: #666; }
.sc-name { font-family: var(--title); font-size: 30px; color: var(--purple); line-height: 1.05; }
.sc-meta { font-weight: 700; font-size: 16px; margin-top: 4px; }
.sc-meta span { text-shadow: -1px -1px 0 #1b1b2e, 1px -1px 0 #1b1b2e, -1px 1px 0 #1b1b2e, 1px 1px 0 #1b1b2e; }
.sc-hint { font-size: 12px; color: #888; margin-top: 6px; }
.scard::after { z-index: 0; }
.scard > * { position: relative; z-index: 1; }
.sc-meta span.r5, .sc-meta span.r7, #viewInfo .cr.r5, #viewInfo .cr.r7 { text-shadow: none; }

/* Große Karte: 3D links, Steckbrief rechts (hochkant untereinander) */
.panel.view { width: min(1000px, 100%); border-color: var(--rc, #fff); }
.vcard { display: flex; gap: 18px; align-items: stretch; text-align: left; }
.vleft { flex: 1.25; min-width: 0; text-align: center; }
.vright { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 6px 34px 0 0; }
.vright h2 { font-size: 36px; line-height: 1.05; margin: 2px 0 2px; }
#viewDe { font-weight: 700; font-size: 20px; color: #6b5a8e; margin-bottom: 6px; }
#viewInfo { font-size: 18px; margin-bottom: 8px; }
#viewInfo .stars { color: #ffb703; text-shadow: -1px -1px 0 #1b1b2e, 1px -1px 0 #1b1b2e, -1px 1px 0 #1b1b2e, 1px 1px 0 #1b1b2e; }
#viewFacts table { width: 100%; border-collapse: collapse; font-size: 16px; }
#viewFacts th { text-align: left; color: #7a6b99; font-weight: 600; padding: 5px 10px 5px 0; white-space: nowrap; vertical-align: top; }
#viewFacts td { padding: 5px 0; font-weight: 600; border-bottom: 2px dotted #e2d6ff; }
#viewFacts small { color: #7a6b99; font-weight: 500; }
.vbtns { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.vbtns button { flex: 1; font-size: 18px; padding: 10px; border-radius: 14px; border: 3px solid #fff; background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 4px 0 #1d4fa8; }
.vbtns button.hidden { display: none; }
#viewPrev, #viewNext { flex: 0 0 56px; }
@media (max-width: 760px), (orientation: portrait) {
  .vcard { flex-direction: column; gap: 6px; }
  #viewBox { height: min(42vh, 420px); }
  .vright h2 { font-size: 28px; } #viewDe { font-size: 17px; } #viewFacts table { font-size: 14px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #viewBox { height: 70vh; } .vright h2 { font-size: 24px; } #viewFacts table { font-size: 13px; } #viewFacts th, #viewFacts td { padding: 2px 6px 2px 0; }
}
/* Misch-Tipp über dem Funkenbogen auf dem Teppich */
.lbl-hint { font-size: 17px; background: linear-gradient(90deg, #7b2ff7, #b05cff); color: #fff; padding: 4px 12px; border-radius: 14px; border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.25); text-shadow: 0 1px 2px rgba(0,0,0,.35); animation: hintPulse 1s ease-in-out infinite alternate; white-space: nowrap; }
@keyframes hintPulse { from { scale: 1; } to { scale: 1.08; } }
/* Handy hochkant: Knöpfe in zwei Reihen rechts, damit das Geld links frei bleibt; Minikarte, Spiel-Code, Bonbons und
   Hinweise darunter in zwei Spalten ohne Überlappung */
@media (orientation: portrait) and (max-width: 600px) {
  #hud { left: 12px; top: 10px; }
  #money { font-size: 30px; } #income { font-size: 13px; }
  #topbtns { top: 8px; right: 8px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 168px; }
  #topbtns button { min-width: 37px; height: 37px; font-size: 15px; margin-left: 0; border-width: 2px; }
  #minimap { top: 96px; right: 8px; width: 120px; height: 75px; }
  #room { top: 180px; right: 8px; width: 120px; font-size: 10px; } #room .code { font-size: 16px; }
  #candy { top: 72px; left: 12px; max-width: calc(100vw - 150px); font-size: 13px; }
  #toasts { top: 144px; left: 12px; width: calc(100vw - 150px); }
}
/* Papa-Ansicht auf dem Startbildschirm */
.adminbox { margin: 8px 0 4px; padding: 8px 10px; background: #fff8e1; border: 2px solid #ffd23f; border-radius: 14px; font-size: 14px; text-align: left; max-height: 170px; overflow: auto; }
.adminbox .ah { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.adminbox .ah a { color: var(--blue); text-decoration: none; }
.adminbox .ar { margin-top: 4px; line-height: 1.25; }
.adminbox small { color: #6b5f86; }
.adminbox.hidden { display: none; }
/* große Karte: gemaltes Bild über dem 3D-Fenster */
#viewBox { position: relative; }
#viewPic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fbf6ec; border-radius: 20px; z-index: 1; }
#viewPic.hidden { display: none; }
#viewMode.hidden { display: none; }
/* große Karte: Misch-Übersicht */
.mixov { margin-top: 10px; border-top: 2px dotted #e2d6ff; padding-top: 8px; }
.mixov .moh { font-weight: 700; font-size: 16px; } .mixov .moh small { color: #7a6b99; font-weight: 600; margin-left: 6px; }
.mixov .mot { font-size: 12px; color: #7a6b99; margin: 2px 0 6px; }
.mixov .mog { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; }
.mixov .mo { background: #f1ecfa; border-radius: 12px; padding: 4px; text-align: center; font-size: 11px; line-height: 1.15; opacity: .75; }
.mixov .mo.ok { background: #e3fbe9; opacity: 1; }
.mixov .mo img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #fbf6ec; }
.mixov .mo .q { display: block; font-size: 30px; line-height: 64px; }
.mixov .mo small { display: block; color: #6b5a8e; font-weight: 600; } .mixov .mo b { display: block; font-size: 11px; }
.lbl-hint.wieder { background: linear-gradient(90deg, #12a63e, #14c94a); animation: none; }
/* Shop: Basis verschönern */
#dekoList h4.dk { margin: 12px 0 4px; font-size: 15px; color: #6b5a8e; } #dekoList h4.dk small { font-weight: 500; }
#dekoList .item.on { background: #e3fbe9; }
#dekoList .item.teaser { background: #ecebf0; filter: grayscale(1); opacity: .8; }
#dekoList .item.teaser .ic { filter: blur(.5px); }
#dekoList .prog { height: 6px; background: #d6d3de; border-radius: 4px; margin-top: 5px; overflow: hidden; } #dekoList .prog i { display: block; height: 100%; background: #8a8496; border-radius: 4px; }
/* Startbildschirm: drei Spielstände */
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.slots.one { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.slots .play { font-family: var(--title); font-size: 30px; padding: 14px 44px; border-radius: 22px; background: var(--blue); box-shadow: 0 6px 0 #1d4fa8; min-width: 260px; }
.slots .sinfo { color: #6b5a8e; font-size: 13px; }
.slots .slinks .link { font-size: 13px; }
.slot { background: #f3f0ff; border: 3px solid transparent; border-radius: 16px; padding: 8px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.slot.sel { border-color: var(--purple); background: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.08); }
.slot.leer { opacity: .85; }
.slot .sh { font-size: 12px; font-weight: 700; color: #6b5a8e; }
.slot .sn { font-family: var(--title); font-size: 20px; color: var(--purple); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot small { color: #6b5a8e; font-size: 11px; line-height: 1.2; }
.slot .sb { display: flex; gap: 4px; margin-top: auto; padding-top: 4px; }
.slot .sb .go { flex: 1; font-family: var(--title); font-size: 14px; padding: 6px 4px; border-radius: 12px; border: none; background: var(--pink); color: #fff; box-shadow: 0 3px 0 #b51d5a; }
.slot.sel .sb .go { background: var(--blue); box-shadow: 0 3px 0 #1d4fa8; }
.slot .sb .del { border: none; background: #e9e4f5; border-radius: 10px; padding: 0 8px; }
@media (max-width: 420px) { .slots { grid-template-columns: 1fr; } }
/* Handy hochkant: Spiel-Code nur als kleines Schild (Code und Mitspielerinnen), ohne Erklärtext */
@media (orientation: portrait) and (max-width: 600px) {
  #room { padding: 3px 8px; width: auto; max-width: 120px; } #room small { display: none; } #room br:last-of-type { display: none; }
}
@media (max-width: 600px), (max-height: 520px) { .lbl-hint { font-size: 12px; padding: 2px 8px; border-width: 1.5px; } }
/* Handy: Steuerkreuz etwas weiter nach rechts (besser mit dem Daumen erreichbar, weg vom Rand und der Kamera-Aussparung) */
@media (pointer: coarse) { #joy { left: calc(56px + env(safe-area-inset-left)); } }
@media (pointer: coarse) and (max-height: 520px) { #joy { left: calc(48px + env(safe-area-inset-left)); } }

/* 👑 Weg zur Legende (Info-Karte und Lexikon) */
.legpath { margin-top: 10px; background: linear-gradient(135deg, #fff8dc, #fff1b8); border: 2px solid #ffd23f; border-radius: 14px; padding: 8px 10px; }
.legpath .lgh { font-weight: 800; font-size: 15px; color: #8a6400; }
.legpath .lgs { margin: 4px 0; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.legpath .lgs span { padding: 2px 7px; border-radius: 10px; background: #fff; opacity: .45; }
.legpath .lgs span.done { opacity: .8; } .legpath .lgs span.cur { opacity: 1; box-shadow: 0 0 0 2px #ffb703; font-weight: 700; }
.legpath .lgs i { font-style: normal; color: #b08900; }
.legpath .lgn { font-size: 13px; line-height: 1.3; color: #5c4600; }
.lgok { color: #0fa83c; font-weight: 700; }
.legov { background: #fff8dc; border: 2px solid #ffd23f; border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; }
.legov p { font-size: 14px; margin: 0 0 8px; color: #5c4600; }
.legov .lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.legov .lgrid div { background: #fff; border-radius: 10px; padding: 5px 8px; font-size: 13px; opacity: .7; }
.legov .lgrid div.go { opacity: 1; } .legov .lgrid div.ok { opacity: 1; background: #e3fbe9; }
.legov .lgrid small { display: block; color: #7a6b99; font-weight: 600; }

/* Lexikon: kommende Weihnachts-Zutat */
.card.soon .soonic { font-size: 54px; line-height: 110px; filter: grayscale(.2); }

/* Gen-Buch: Merkmale je Grundtier mit Stufen */
.gbook { display: flex; flex-wrap: wrap; gap: 6px; }
.gchip { background: #ece6f7; color: #8b80a3; border-radius: 12px; padding: 5px 9px; font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.gchip b { letter-spacing: 1px; color: #b9b0cc; }
.gchip.ok { background: #e3f8e8; color: #22663a; } .gchip.ok b { color: #1f9d55; }
