/* *************** DEL 01 - BASE ***************** */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #1b2340; color: #f2f5ff;
  font-family: system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.hidden { display: none !important; }
.screen {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  display: flex; flex-direction: column;
}
button { font: inherit; color: inherit; border: 0; cursor: pointer; }

/* *************** DEL 02 - HOME ***************** */
.topbar { display: flex; align-items: center; gap: 6px; padding: 10px 8px 6px; }
.title { font-size: 21px; font-weight: 800; color: #ffd45e; flex: 0 0 auto; }
.langchips { display: flex; gap: 6px; flex: 1 1 auto; justify-content: center; }
.chip, .langchip {
  background: #2b3766; color: #dfe6ff; border-radius: 999px; white-space: nowrap;
  padding: 8px 14px; font-weight: 700; font-size: 16px; min-width: 44px;
}
.langchips .chip { padding: 8px 10px; font-size: 15px; }
.chip.on, .langchip.on { background: #ffd45e; color: #20263a; }
.iconbtn { background: #2b3766; border-radius: 14px; width: 44px; height: 44px; font-size: 24px; line-height: 1; }
.iconbtn.big { width: 60px; height: 60px; font-size: 32px; }

.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 6px 12px; }
.mode {
  background: #2b3766; border-radius: 16px; padding: 8px 4px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: #dfe6ff; min-height: 76px; justify-content: center;
}
.mode canvas { width: 44px; height: 36px; }
.mode .glyph { font-size: 26px; font-weight: 800; height: 36px; display: flex; align-items: center; }
.mode.on { background: #ffd45e; color: #20263a; }

.themes {
  flex: 1 1 auto; overflow-y: auto; padding: 8px 12px 20px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start;
  -webkit-overflow-scrolling: touch;
}
.theme {
  background: #fdf8ec; color: #20263a; border-radius: 20px; padding: 10px 8px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 3px 0 #c9b48b;
}
.theme canvas { width: 100%; max-width: 150px; height: auto; }
.theme .name { font-weight: 800; font-size: 17px; text-align: center; line-height: 1.15; }
.theme .name2 { font-size: 14px; color: #6b7288; font-weight: 600; text-align: center; }
.theme:active { transform: scale(.97); }

.numberpanel { padding: 8px 14px; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row > span { font-weight: 700; color: #a8b4d8; min-width: 110px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bigbtn { background: #2b3766; border-radius: 18px; padding: 16px 22px; font-size: 22px; font-weight: 800; }
.bigbtn.start { background: #3faa78; color: #fff; }

/* *************** DEL 03 - GAME ***************** */
.gamebar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; gap: 10px; }
.stars { flex: 1; text-align: center; font-size: 28px; color: #ffd45e; letter-spacing: 3px; }
.stars .dim { color: #3b4877; }
.board { flex: 1 1 0; min-height: 0; overflow: hidden; position: relative; margin: 4px 8px 10px; background: #16406b; border-radius: 22px; }
.board svg { display: block; }

.card { position: absolute; perspective: 800px; }
.card .inner {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; transform-style: preserve-3d;
  transition: transform .35s ease;
}
.card.up .inner { transform: rotateY(180deg); }
.face, .back {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 16px; backface-visibility: hidden;
  -webkit-backface-visibility: hidden; overflow: hidden;
}
.back {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2em; color: rgba(255,255,255,.85);
  border: 4px solid rgba(255,255,255,.35);
}
.face {
  transform: rotateY(180deg); background: #fdf8ec; color: #20263a; border: 4px solid #c9b48b;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.face canvas { display: block; }
.face .words { text-align: center; font-weight: 800; line-height: 1.05; width: 100%; padding: 0 4px; }
.face .words .w2 { color: #4a5a9a; }
.face .bigtext { font-weight: 800; text-align: center; line-height: 1.05; width: 100%; padding: 0 4px; }
.card.found .face { background: #dff2d4; border-color: #5aa83f; }
.card.found { animation: pop .5s ease; }
.card.wrong .face { border-color: #e88a7d; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }

.confetti { position: fixed; width: 12px; height: 12px; border-radius: 3px; pointer-events: none; z-index: 50; }

/* *************** DEL 04 - OVERLAYS ***************** */
.overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(10,14,30,.78); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.wincard, .sheet { background: #1b2340; border: 3px solid #3b4877; border-radius: 26px; padding: 22px; width: min(92vw, 460px); text-align: center; }
.winstars { font-size: 56px; color: #ffd45e; letter-spacing: 6px; }
.wintext { font-size: 28px; font-weight: 800; margin: 10px 0 18px; }
.winbtns { display: flex; flex-direction: column; gap: 12px; }
.sheet { text-align: left; max-height: 92vh; overflow-y: auto; }
.sheet h2 { margin: 0 0 12px; color: #ffd45e; }
.sheet .row { margin-bottom: 12px; }
.iconbtn.off { opacity: .35; text-decoration: line-through; }
.iconbtn:disabled { opacity: .3; }
.gamebar .iconbtn.big { width: 54px; height: 54px; font-size: 28px; }

/* replay screen */
#rTitle { font-size: 20px; letter-spacing: 0; font-weight: 800; }
.caption {
  margin: 0 8px; padding: 10px 14px; min-height: 76px; max-height: 120px; overflow-y: auto; flex: 0 0 auto; border-radius: 16px; background: #2b3766;
  font-size: 17px; line-height: 1.3; display: flex; align-items: center;
}
.caption.memory { background: #2f6b3a; }
.caption.lucky { background: #6b5a1f; }
.caption.tip { background: #7a4a1c; }
.controls { display: flex; justify-content: space-around; padding: 10px 12px 12px; }

/* history and packs */
.histlist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; max-height: 60vh; overflow-y: auto; }
.histrow { background: #2b3766; border-radius: 14px; padding: 10px 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.histrow .h1 { font-weight: 800; font-size: 17px; }
.histrow .h2 { color: #a8b4d8; font-size: 13px; }
.installed { margin-bottom: 10px; }
.insth { color: #a8b4d8; font-weight: 700; margin-bottom: 4px; }
.instrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.instbody { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; font-size: 17px; }

.report { margin: 8px 0 14px; color: #a8b4d8; }
.report pre { white-space: pre-wrap; font-size: 11px; max-height: 160px; overflow: auto; background: #131a30; padding: 8px; border-radius: 8px; }

/* *************** hub and Catch Fish *************** */
#replay.screen { position: fixed; z-index: 30; background: #1b2340; }
/* min-height 0 + overflow-y: the hub must scroll when there are more tiles than fit (Games app has ~20); "safe" keeps the top reachable */
.hubtiles { flex: 1 1 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; padding: 12px; }
@supports (align-content: safe center) { .hubtiles { align-content: safe center; } }
.hubtile {
  /* two per row on a phone (360 dp wide): the row is 100vw minus the 2 x 12px padding of .hubtiles, each tile has 2 x 6px margin (was 44vw + 10px margins = wrapped to ONE per row) */
  width: min(calc(50vw - 24px), 260px); margin: 6px; background: #fdf8ec; color: #20263a; border-radius: 22px; padding: 12px 6px 10px;
  display: flex; flex-direction: column; align-items: center; box-shadow: 0 4px 0 #c9b48b;
}
.hubtile:active { transform: scale(.97); }
.hubpic { height: 100px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.hubpic canvas { margin: 0 2px; }
.hubname { font-weight: 800; font-size: 20px; text-align: center; }
#nameFish, #picFish { color: #0b2234; }
#picFish svg { background: #175f8c; border-radius: 16px; }

.cfsetup { padding: 10px 16px; display: flex; flex-direction: column; overflow-y: auto; }
.cfsetup .row, .cfsetup .bigbtn { margin-bottom: 12px; }
.seat { align-items: center; }
.cfwho { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.cfwho span { margin-left: 8px; }
.cfboard { background: #0b2234; }
.cfboard svg { display: block; }
.cfbottom { display: flex; align-items: center; padding: 6px 12px 12px; }
.cfspinner { flex: 0 0 auto; width: 128px; height: 130px; border-radius: 50%; }
.cfspinner.ready { animation: wiggle 1.2s ease-in-out infinite; }
.cftext { flex: 1; padding-left: 12px; min-height: 100px; display: flex; flex-direction: column; justify-content: center; }
.cfhint { font-size: 22px; font-weight: 800; color: #ffd45e; margin-bottom: 4px; }
.cfmsg { font-size: 15px; line-height: 1.3; color: #dfe6ff; }
.pulse { animation: pulse 0.9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes wiggle { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }



/* *************** Maui *************** */
.mtable { flex: 1 1 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 0 4px; background: #10202a; border-radius: 14px; }
.mturn { flex: 1; text-align: center; font-weight: 800; font-size: 17px; padding: 0 6px; }
.mbar { padding: 6px 10px 10px; }
.mstatus { font-size: 14px; line-height: 1.3; color: #dfe6ff; min-height: 38px; max-height: 80px; overflow-y: auto; }
.mactions { display: flex; flex-wrap: wrap; margin-top: 6px; }
.mbtn { background: #2b3766; border-radius: 12px; padding: 10px 14px; font-size: 15px; font-weight: 700; margin: 0 8px 6px 0; }
.mbtn.go { background: #3faa78; }
.mbtn.dol { background: #5f9ea0; }
.mdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid; margin-right: 6px; vertical-align: middle; }
.mdot.big { width: 26px; height: 26px; margin-right: 10px; }
.mtab { border-collapse: collapse; width: 100%; font-size: 14px; }
.mtab th { color: #a6bcc2; font-size: 11px; font-weight: 600; padding: 2px 4px; text-align: center; }
.mtab th:first-child, .mtab td:first-child { text-align: left; }
.mtab td { padding: 5px 4px; text-align: center; }
.mtab td.tot { color: #4fc6d9; font-weight: 800; }
.mwin { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.mnote { color: #a6bcc2; font-size: 12px; margin: 4px 0 12px; line-height: 1.35; }
.mscroll { overflow-x: auto; }
.mscroll.tall { max-height: 60vh; overflow-y: auto; }
#mDlgBody h3 { margin: 10px 0 2px; color: #ffd45e; font-size: 15px; }
#mDlgBody p { margin: 4px 0; font-size: 14px; line-height: 1.4; }

.mres { background: #16303c; border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; }
.mres1 { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; }
.mres1 .tot { color: #4fc6d9; font-size: 20px; }
.mres2 { color: #a6bcc2; font-size: 12px; margin-top: 2px; line-height: 1.5; }
.mres2 b { color: #f1f5f4; }

/* *************** PictureWords *************** */
.pwopts { padding: 4px 12px; }
.pwopts .row { margin-bottom: 8px; }
.pwmore summary { color: #a8b4d8; font-weight: 700; margin: 4px 0 8px; }
.hubabc { font-weight: 800; letter-spacing: 2px; margin-left: 6px; background: #ffca28; color: #3e2723; border-radius: 8px; padding: 6px 8px; font-size: 18px; }
.pwboard { background: #fffdf6; color: #2e3b2f; display: flex; flex-direction: column; align-items: center; justify-content: space-around; padding: 6px 4px; }
.pwpic { background: #fff8e8; border-radius: 22px; padding: 6px; box-shadow: 0 3px 0 #e0d6c0; }
.pwpic canvas { display: block; }
.pwpale { font-size: 22px; font-weight: 800; letter-spacing: 6px; color: #cfd8c9; }
.pwslots { display: flex; justify-content: center; flex-wrap: wrap; }
.pwslot { margin: 3px; background: #fff; border: 3px solid #a1887f; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #3e2723; }
.pwslot.full { background: #c8e6c9; border-color: #2e7d32; }
.pwslot.pop { animation: pwpop .35s ease; }
.pwtray { display: flex; flex-wrap: wrap; justify-content: center; }
.pwtile { margin: 4px; background: #ffca28; border: 3px solid #ef9a00; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #3e2723; box-shadow: 0 3px 0 #ef9a00; }
.pwtile.used { background: #efe6d0; border-color: #efe6d0; box-shadow: none; color: transparent; }
.pwtile.shake { animation: pwshake .45s ease; background: #ffcdd2; border-color: #c62828; }
.pwtile.pulse2 { animation: pwpulse .8s ease-in-out infinite; }
.pwstars { font-size: 38px; color: #fbc02d; letter-spacing: 4px; }
.pwempty { padding: 30px; font-size: 18px; text-align: center; }
.pwbar { display: flex; justify-content: center; padding: 6px 10px 12px; }
@keyframes pwpop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes pwshake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
@keyframes pwpulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76,175,80,.7); } 50% { transform: scale(1.14); box-shadow: 0 0 0 10px rgba(76,175,80,0); } }

/* *************** Yatzy *************** */
.yzbody { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.yzstrip { display: flex; flex-wrap: wrap; gap: 6px; }
.yzp { background: #2b3766; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 14px; }
.yzp.cur { background: #ffd45e; color: #20263a; }
.yzdice { display: flex; justify-content: center; gap: 6px; }
.yzdie { position: relative; background: transparent; padding: 0; border-radius: 12px; }
.yzdie:disabled { opacity: 1; }
.yzdie i { position: absolute; left: 0; right: 0; bottom: -2px; font-style: normal; font-size: 10px; font-weight: 800; color: #8fe0a8; text-align: center; }
.yzctl { display: flex; align-items: center; gap: 8px; }
.yzctl .mbtn { margin: 0; }
.yzroll { padding: 12px 22px; font-size: 20px; border-radius: 16px; }
.yzroll:disabled { background: #3a4366; opacity: .6; }
.yzrolls { font-size: 14px; color: #dfe6ff; }
.yzmsg { font-size: 14px; min-height: 18px; color: #dfe6ff; }
.yzcard { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yzcol { display: flex; flex-direction: column; gap: 3px; }
.yzrow, .yzsum { display: flex; justify-content: space-between; align-items: center; background: #fdf8ec; color: #20263a; border-radius: 10px; padding: 7px 9px; font-size: 14px; min-height: 36px; text-align: left; }
.yzrow.used { background: #d9d3bf; }
.yzrow:disabled { opacity: 1; cursor: default; }
.yzrow:not(:disabled) { box-shadow: 0 2px 0 #c9b48b; }
.yzrow b.pos { color: #1b8a3c; }
.yzrow b.zero { color: #c0392b; }
.yzrow.fresh { outline: 3px solid #ffd45e; }
.yzsum { background: #2b3766; color: #f2f5ff; }
.yzsum.total { background: #2f6b3a; font-size: 16px; }
.yzsum.bonus.got { background: #3faa78; }
.yznames { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.yznames input { font-size: 16px; padding: 8px; border-radius: 10px; border: 0; width: 100%; }
.yzboard { background: #1b2340; overflow-y: auto; align-items: stretch; padding: 8px; display: flex; flex-direction: column; gap: 6px; }

/* *************** Connect Four *************** */
.c4board { background: #0d1b2a; display: flex; align-items: center; justify-content: center; }
.c4board svg { display: block; touch-action: manipulation; }
.c4bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px 10px; }
.c4score { font-weight: 800; font-size: 15px; color: #dfe6ff; }
.cfsetup .c4score { margin: 4px 0 8px; }
.c4bar .mbtn { margin: 0; }

/* *************** The worms (Da ist der Wurm drin) *************** */
.wuboard { background: #1d2a16; }
.wuboard svg { display: block; }
.wupanel { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.wurow { display: flex; align-items: center; gap: 6px; }
.wuroll { flex: 1 1 auto; margin: 0; padding: 12px 8px; font-size: 20px; border-radius: 16px; }
.wuroll:disabled { background: #3a4366; opacity: .6; }
.wutok { margin: 0; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; line-height: 1; min-width: 74px; background: #4f6b2a; }
.wutok:nth-of-type(2) { background: #9a4a46; }
.wutok:disabled { opacity: .4; }
.wutok.armed { background: #ffe066 !important; color: #20300f; }
.wutok.pulse { animation: wuglow 1.6s ease-in-out infinite; }
@keyframes wuglow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,224,102,.0); } 50% { box-shadow: 0 0 0 5px rgba(255,224,102,.75); } }
.wuhint { font-size: 14px; line-height: 1.25; color: #dfe6ff; min-height: 34px; }
.wuseat { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; background: #232d52; border-radius: 14px; padding: 6px 10px; }
.wuseatname { font-weight: 800; flex: 1 1 90px; }
.wucols { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.wucol { min-width: 84px; padding: 14px 12px; border-radius: 16px; border: 4px solid; font-size: 20px; font-weight: 800; color: #10140c; }

/* *************** NumberParty *************** */
.npboard { background: #fdf6e3; color: #2d2a3e; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 8px; gap: 6px; overflow: hidden; }
.npdigits { display: flex; justify-content: center; white-space: nowrap; font-weight: 800; line-height: 1.12; width: 100%; min-height: 1.1em; }
.npd { display: inline-block; padding: 0 .05em; border-radius: 12px; cursor: pointer; }
.npd.lit { background: #ffe27a; box-shadow: 0 0 0 3px #f0a020 inset; }
.npwords { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.npw { font-size: 21px; font-weight: 800; padding: 2px 10px; border-radius: 10px; background: #fff; border: 2px solid #e3d8b8; color: #2d2a3e; }
.npw.lit { background: #ffe27a; border-color: #f0a020; }
.npwritten { font-style: italic; color: #7d7893; font-size: 16px; text-align: center; }
.npblocks { flex: 1 1 0; min-height: 60px; width: 100%; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.npblocks svg { display: block; }
.npnote { color: #a8b4d8; font-size: 15px; padding: 6px 14px; text-align: center; }
.npboard .npnote { color: #7d7893; }
.npchips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; min-height: 30px; }
.npchip { color: #fff; border-radius: 10px; padding: 3px 9px; font-weight: 800; font-size: 16px; }
.npplus { font-weight: 800; color: #7d7893; }
.npmsg { color: #7d7893; font-size: 16px; font-weight: 700; text-align: center; min-height: 22px; }
.npbar { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.npstrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; }
.npstrip::-webkit-scrollbar { display: none; }
.npstrip .chip { flex: 0 0 auto; padding: 8px 12px; font-size: 15px; }
.nptrans { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 2px 8px; }
.nptrans .iconbtn { width: 48px; height: 48px; font-size: 20px; }
.nppos { text-align: center; color: #a8b4d8; font-size: 14px; }
.nprange { display: flex; gap: 8px; padding: 6px 0; }
.nprange label { display: flex; flex-direction: column; flex: 1; font-size: 13px; color: #a8b4d8; }
.nprange input { font-size: 20px; font-weight: 800; text-align: center; border-radius: 10px; border: 0; padding: 6px; width: 100%; }
.nprow { display: flex; align-items: center; gap: 8px; color: #a8b4d8; font-size: 14px; }
.nprow .npstrip { flex: 1 1 auto; }
.npactions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.npactions .mbtn { margin: 0; }
.npscore { color: #ffd45e; font-weight: 800; }
.npkeys { display: grid; gap: 6px; }
.npkey { height: 52px; border-radius: 14px; background: #fff; color: #2d2a3e; font-size: 26px; font-weight: 800; border: 2px solid #e3d8b8; box-shadow: 0 3px 0 #c9b48b; }
.npkey.op { background: #ffe9b8; }
.npkey.go { background: #3faa78; color: #fff; border-color: #2e9e4f; }
.npkey.dim { background: #ece6d4; }
.npkey:active { transform: translateY(2px); box-shadow: 0 1px 0 #c9b48b; }
.npexpr { display: flex; justify-content: center; align-items: baseline; gap: .25em; font-weight: 800; color: #fff; padding: 2px 8px; min-height: 60px; }
.npe { padding: 0 .12em; border-radius: 10px; }
.npe.op { color: #ffd45e; }
.npe.res { color: #8fe0a8; }
.npe.lit { background: #ffe27a; color: #2d2a3e; }
.npwords.light { padding: 0 8px; min-height: 36px; }
.npwords.light .npw { font-size: 17px; padding: 1px 8px; }
.npstage { padding: 0; }
.npstage svg { display: block; }
.npcap { margin: 0 8px; padding: 8px 12px; min-height: 52px; background: #2b3766; border-radius: 14px; font-size: 16px; line-height: 1.25; display: flex; align-items: center; }
.npclockbox { flex: 0 0 auto; height: min(100vw - 16px, 50vh); margin-bottom: 4px; padding: 2px; }
.npclockbig { width: min(100%, 60vh); aspect-ratio: auto; height: 78%; }
.npclockbox svg { display: block; margin: 0 auto; touch-action: none; }
.npscroll { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 8px 14px; display: flex; flex-direction: column; gap: 8px; }
.npdig { display: flex; align-items: center; gap: 4px; background: #1f2937; border-radius: 14px; padding: 6px 14px; font-family: Consolas, "Courier New", monospace; font-weight: 800; font-size: 40px; flex: 0 0 auto; }
.npdh { color: #8fc0ff; border-radius: 8px; padding: 0 4px; }
.npdm { color: #ff9a92; border-radius: 8px; padding: 0 4px; }
.npdc { color: #e8e8e8; }
.npdig.lith .npdh { background: #ffe27a; color: #1f2937; }
.npdig.litm .npdm { background: #ffe27a; color: #1f2937; }
.npeq { font-family: system-ui, sans-serif; font-size: 20px; color: #a8b4d8; margin-left: auto; font-weight: 700; }
.npnotetxt { font-size: 14px; color: #a8b4d8; line-height: 1.3; }
.nplab { font-weight: 800; color: #ffd45e; font-size: 15px; align-self: center; flex: 0 0 auto; }
.npq { background: #2b3766; border-radius: 12px; padding: 8px 12px; font-weight: 700; margin-bottom: 6px; }
.npq.good { background: #2f6b3a; }
.npq.bad { background: #7a4a1c; }
.npchoices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.npchoice { background: #fff; color: #2d2a3e; border-radius: 14px; padding: 12px; font-size: 26px; font-weight: 800; font-family: Consolas, monospace; }
.npways { display: flex; flex-direction: column; gap: 6px; }
.npway { display: flex; flex-wrap: wrap; gap: 4px 8px; background: #f8f5ea; border: 2px solid #e3d8b8; border-radius: 12px; padding: 6px 10px; text-align: left; }
.npway .npw { background: transparent; border: 0; padding: 0 4px; font-size: 20px; }
.npway .npw.lit { background: #ffe27a; border-radius: 8px; }

/* *************** PaperDolls *************** */
.pdboard { background: #fff8ec; }
.pdboard canvas { display: block; touch-action: manipulation; }
.pdstrip { scrollbar-width: none; }
.pdstrip::-webkit-scrollbar { display: none; }
.pdtoast { position: absolute; left: 8px; right: 8px; top: 8px; background: rgba(74,52,38,.92); color: #fff8ec; border-radius: 12px; padding: 6px 10px; font-size: 15px; font-weight: 700; text-align: center; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 3; }
.pdtoast.on { opacity: 1; }
.pdtools { display: flex; align-items: center; gap: 6px; padding: 0 8px 4px; min-height: 46px; }
.pdtools .grow { flex: 1 1 auto; }
.pdtools .chips { flex-wrap: nowrap; }
.pdtools .chip { padding: 8px 10px; font-size: 14px; }
.pdtools .chips.invis { visibility: hidden; }
.pdtools .mbtn { margin: 0; padding: 9px 12px; font-size: 14px; }
.pdstrip { display: flex; flex: 0 0 auto; gap: 6px; overflow-x: auto; padding: 2px 8px 6px; -webkit-overflow-scrolling: touch; }
.pdcat, .pditem { flex: 0 0 auto; background: #fdf8ec; color: #4a3426; border: 2px solid #d9c3a0; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; padding: 2px; }
.pdcat { width: 64px; height: 66px; }
.pditem { width: 82px; height: 92px; }
.pdcat.on { background: #ffe9c9; border: 3px solid #e0803a; }
.pditem.on { border: 4px solid #2f9e57; }
.pdcat canvas, .pditem canvas { pointer-events: none; }
.pdlbl { font-size: 11px; font-weight: 800; line-height: 1.1; text-align: center; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pdcat .dot { position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; border-radius: 50%; background: #2f9e57; border: 2px solid #fff; }
.pditem .ck { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: #2f9e57; color: #fff; font-size: 14px; font-weight: 900; line-height: 20px; text-align: center; }
.pditem .lr { position: absolute; bottom: 18px; width: 22px; height: 18px; background: #2f9e57; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; border-radius: 3px; }
.pditem .lr.l { left: 4px; }
.pditem .lr.r { right: 4px; }

/* *************** ActivityBook *************** */
.abboard { background: #fffdf6; position: relative; }
.abboard canvas { display: block; touch-action: none; }
.abbar { padding: 6px 8px 10px; }
.abtools { display: flex; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.abdpad { --pad: 52px; display: grid; grid-template-columns: repeat(3, var(--pad)); grid-template-rows: repeat(2, var(--pad)); gap: 4px; margin-left: auto; }
.abdpad button { background: #2b6fd6; border-radius: 12px; font-size: 22px; color: #fff; touch-action: none; }
.abdpad button:active { background: #ffd45e; color: #20263a; }
.abpal { display: flex; flex-wrap: wrap; justify-content: center; width: 100%; margin-bottom: 4px; }
.abswatch { width: 7.2%; min-width: 24px; height: 28px; margin: 2px; border-radius: 8px; border: 2px solid rgba(255,255,255,.5); }
.abswatch.on { border: 3px solid #fff; box-shadow: 0 0 0 2px #ffd45e; }
.abrow { display: flex; flex-wrap: wrap; justify-content: center; width: 100%; }
.abrow .chip { margin: 2px; }
.abitem { position: absolute; background: #fff; border: 4px solid #d9c9a3; border-radius: 16px; padding: 2px; z-index: 2; }
.abitem canvas { display: block; }
.abitem.sel { border-color: #1e88e5; box-shadow: 0 0 0 3px rgba(30,136,229,.4); }
.abitem.done { background: #f1f8e9; }
.abitem.bad { border-color: #c62828; animation: pwshake .45s ease; }
.abitem.hintp { animation: pwpulse .8s ease-in-out infinite; }
.ablines { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 1; }
.abspot { margin: 2px auto 6px; border-radius: 10px; border: 2px solid #d9c9a3; }
#abBoard.abboard { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }

/* jigsaw */
#abBoard.abjig { display: block; overflow: hidden; background: #efe2c4; }
.abjigframe { position: absolute; background: #fffdf6; border: 3px solid #d7c49a; border-radius: 6px; box-sizing: border-box; }
.abjigtray { position: absolute; background: #f7efdc; border: 2px dashed #e0cfa8; border-radius: 12px; box-sizing: border-box; }
.abjigghost { position: absolute; pointer-events: none; }
.abpiece { position: absolute; touch-action: none; cursor: grab; }
.abpiece canvas { display: block; pointer-events: none; }
.abpiece.placed { cursor: default; }
.abpiece.rpmark canvas { filter: drop-shadow(0 0 6px #ffd45e); }

/* *************** DEL 20 - MINUTE GAME ***************** */
#winText { white-space: pre-line; }
.mgboard { background: #1f3a24; display: flex; flex-direction: column; padding: 8px; gap: 6px; overflow-y: auto; justify-content: flex-start; }
.mgeqs { display: flex; flex-direction: column; gap: 6px; }
.mgeq { background: #2d4a2d; border-radius: 14px; padding: 4px 8px 7px; border: 2px solid transparent; }
.mgeq.ok { border-color: #44ff44; background: #27492b; }
.mgeq.bad { border-color: #6666cc; }
.mglab { font-size: 12px; font-weight: 800; color: #aaddaa; margin-bottom: 3px; }
.mgcells { display: flex; align-items: center; justify-content: center; gap: 4px; }
.mghole { width: 48px; height: 48px; border-radius: 10px; background: #111; border: 2px solid #777; color: #fff; font-size: 20px; font-weight: 800; padding: 0; }
.mghole.full { background: #1a1a50; border-color: #6666cc; }
.mgeq.ok .mghole.full { background: #003a00; border-color: #44ff44; }
.mghole.act { background: #3a3a00; border: 3px solid #ffff00; }
.mghole.err { background: #660000; border-color: #ff4444; }
.mghole.fresh { outline: 3px solid #ffd45e; }
.mgop { width: 20px; text-align: center; font-size: 22px; font-weight: 800; color: #fff; }
.mgpoolh { font-size: 13px; font-weight: 800; color: #99cc99; margin-top: 4px; }
.mgpool { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; border: 2px dashed #7aaa7a; border-radius: 14px; padding: 8px; min-height: 64px; }
.mgdie { width: 46px; height: 46px; border-radius: 10px; background: #f5eacc; color: #111; font-size: 20px; font-weight: 800; border: 2px solid #888; padding: 0; position: relative; }
.mgdie.u::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 6px; height: 2px; background: #111; }
.mgempty { align-self: center; color: #aaddaa; font-weight: 700; }
.mgcover { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(20,32,22,.97); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; text-align: center; padding: 20px; z-index: 3; }
.mgstatic .mghole, .mgstatic .mgdie { pointer-events: none; }
.mgbar { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.mgbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.mgbtns .mbtn { margin: 0; }
.mgbtns .mbtn:disabled { opacity: .35; }
.mgnote { color: #a8b4d8; font-size: 13px; margin: 6px 0 8px; line-height: 1.35; }
.mgtext { white-space: pre-wrap; font-size: 14px; line-height: 1.4; color: #e6ebff; margin-bottom: 14px; }
.mgsmall { transform-origin: top left; margin-bottom: 8px; border-radius: 14px; }
.mgchips { margin-bottom: 8px; }
#mgDlg .sheet, #mmDlg .sheet { max-height: 94vh; }
#mgDlg .histlist { max-height: 46vh; }

/* *************** DEL 21 - MASTERMIND ***************** */
.mmstats { font-size: 13px; color: #a8b4d8; padding: 0 14px 4px; text-align: center; }
.mmsecret { display: flex; align-items: center; gap: 10px; padding: 4px 14px 6px; }
.mmlab { font-size: 13px; font-weight: 800; color: #a8b4d8; min-width: 84px; }
.mmpegs { display: flex; gap: 6px; }
.mmpeg { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); font-weight: 800; box-sizing: border-box; }
.mmpeg.sm { width: 32px; height: 32px; font-size: 15px; }
.mmpeg.lg { width: 44px; height: 44px; font-size: 19px; }
.mmpeg.empty { background: #2b3766; border-color: #3b4877; }
.mmpeg.hidden-code { background: #546E7A; color: #dfe6ff; border-color: #90A4AE; }
.mmhist { flex: 1 1 0; min-height: 0; overflow-y: auto; margin: 0 8px; border-radius: 16px; background: #16203d; position: relative; }
.mmrow { display: flex; align-items: center; gap: 10px; padding: 5px 10px; }
.mmrow:nth-child(even) { background: #1b2748; }
.mmrow.act { background: #2f4f8c; }
.mmn { width: 28px; color: #7f8bb3; font-size: 13px; text-align: right; font-weight: 700; }
.mmfbs { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; max-width: 120px; }
.mmfb { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.mmfb.k { background: #0b0b0b; border: 2px solid #fff; }
.mmfb.w { background: #fff; border: 2px solid #9aa4c4; }
.mmfb.n { background: #2b3766; }
.mmlegend { font-size: 12px; color: #a8b4d8; text-align: center; padding: 4px 8px; display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.mmbottom { padding: 2px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.mmguess { display: flex; align-items: center; gap: 10px; background: #243056; border-radius: 16px; padding: 6px 10px; }
.mmpalette { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mmcol { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.6); font-size: 17px; font-weight: 800; padding: 0; }
.mmcol.in { border-color: #6dff9a; box-shadow: 0 0 0 2px #2f6b3a; }
.mmcol.out { opacity: .3; }
.mmcol:disabled { opacity: .4; }
.mmhover { min-height: 16px; font-size: 13px; font-style: italic; color: #a8b4d8; text-align: center; }
.mmboard { background: #1b2340; display: flex; flex-direction: column; }
.mmboard .mmhist { margin: 0 6px 6px; }
.mmstatic * { pointer-events: none; }
.sheet.wide { width: min(98vw, 560px); padding: 14px; }
.mmpadrow { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.mmcs { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.mmcs b { font-size: 14px; }
.mmcs b.s0 { color: #90A4AE; }
.mmcs b.s1 { color: #6dff9a; }
.mmcs b.s2 { color: #ff7b7b; }
.mmsw { border-radius: 8px; border: 2px solid rgba(255,255,255,.6); padding: 0; font-weight: 800; color: #c62828; font-size: 14px; }
.mmsw.st1 { border-color: #6dff9a; border-width: 3px; }
.mmsw.st2 { opacity: .3; }
.mmsw.cell.off { border-color: #8d97b5; }
.mmgrid { display: flex; flex-direction: column; gap: 3px; }
.mmgr { display: flex; align-items: center; gap: 3px; }
.mmgl { width: 28px; font-weight: 800; font-size: 13px; color: #a8b4d8; }
.mmgh { display: inline-block; border-radius: 3px; }
/* *************** DEL 30 - PLAYING CARDS ***************** */
.cd { position: relative; display: inline-block; flex: 0 0 auto; width: 2.5em; height: 3.5em; background: #fdfdf8; border: .09em solid #6b6a52; border-radius: .28em; color: #1c1c1c; box-sizing: border-box; font-weight: 800; line-height: 1; user-select: none; vertical-align: top; }
.cd.sm { font-size: 9px; } .cd.md { font-size: 13px; } .cd.lg { font-size: 17px; }
.cd b { position: absolute; left: .22em; top: .2em; font-size: 1em; }
.cd i { position: absolute; left: .22em; top: 1.25em; font-style: normal; font-size: .9em; }
.cd .mid { position: absolute; left: 0; right: 0; top: 1.15em; text-align: center; font-size: 1.7em; }
.cd.red { color: #c02a22; }
.cd.back { background: repeating-linear-gradient(45deg, #2f4f9f 0 .35em, #3a5cb8 .35em .7em); border-color: #dfe6ff; }
.cd.sel { transform: translateY(-.6em); outline: .18em solid #ffcc00; z-index: 2; }
.cd.pick { cursor: pointer; box-shadow: 0 .25em 0 #ffcc00; }
.cd.dim { opacity: .45; }
.cd.hi { outline: .16em solid #2e8b57; }
.cd.secret { border-color: #c77d0a; }
.cd .tag { position: absolute; right: -.3em; top: -.45em; background: #ffcc00; color: #20263a; font-size: .8em; border-radius: 50%; width: 1.5em; height: 1.5em; text-align: center; line-height: 1.5em; text-decoration: none; }

/* *************** DEL 31 - POKER ***************** */
.pkvlist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; max-height: 34vh; overflow-y: auto; }
.pkvbtn { background: #2b3766; color: #dfe6ff; border-radius: 12px; padding: 7px 11px; font-size: 14px; font-weight: 700; }
.pkvbtn.on { background: #ffd45e; color: #20263a; }
.pkdesc { background: #243056; border-radius: 12px; padding: 8px 10px; font-size: 13px; line-height: 1.35; margin-bottom: 10px; white-space: pre-line; }
.pkseatrow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.pkseatrow > span { font-weight: 700; color: #a8b4d8; min-width: 60px; }
.pkseatrow input { font-size: 16px; padding: 6px 8px; border-radius: 10px; border: 0; width: 130px; }
.pkbody { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 8px 6px; display: flex; flex-direction: column; gap: 6px; }
.pkinfo { font-size: 12px; color: #a8b4d8; text-align: center; padding: 0 8px; }
.pkseats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pkseat, .pkme { background: #1d6b45; border: 2px solid #0f3a24; border-radius: 12px; padding: 4px 8px 6px; font-size: 13px; position: relative; }
.pkme { background: #14522f; padding: 6px 10px 8px; }
.pkseat.acting, .pkme.acting { border-color: #ffcc00; }
.pkseat.folded { opacity: .55; }
.pkhead { display: flex; align-items: baseline; gap: 6px; }
.pkname { font-weight: 800; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pkbtn { display: inline-block; background: #fff; color: #000; border-radius: 50%; width: 16px; height: 16px; text-align: center; line-height: 16px; font-size: 10px; font-style: normal; font-weight: 800; margin-right: 4px; }
.pkchipn { color: #e8c64a; }
.pkstat { font-size: 11px; color: #d6ecd9; flex: 0 1 auto; }
.pkbet { position: absolute; right: 8px; bottom: 4px; font-weight: 800; font-size: 12px; color: #fff; }
.pkrow { display: flex; gap: 4px; flex-wrap: wrap; align-items: flex-start; padding-top: 3px; }
.pkrow.sm { gap: 2px; }
.pkrow.lgrow { gap: 6px; padding: 8px 0 4px; }
.pklab { font-size: 11px; color: #d6ecd9; align-self: center; }
.pktable { background: #1d6b45; border-radius: 16px; padding: 8px 10px; text-align: center; }
.pktable .pkrow { justify-content: center; }
.pkpot { font-weight: 800; font-size: 16px; }
.pkmine { display: flex; justify-content: space-between; font-weight: 800; font-size: 15px; }
.pkhid { font-weight: 700; font-size: 12px; color: #ffd45e; }
.pkchances { font-size: 13px; line-height: 1.35; }
.pkchances h4 { margin: 8px 0 2px; color: #ffd45e; font-size: 13px; }
.pkchances .dim, .dim { color: #a8b4d8; } .sm { font-size: 11px; }
.good { color: #6dff9a; } .warn { color: #ffb347; }
.pkbar { height: 12px; background: #3a4366; border-radius: 6px; overflow: hidden; display: flex; margin: 2px 0; }
.pkbar i { background: #2e8b57; display: block; } .pkbar u { background: #c77d0a; display: block; text-decoration: none; }
.pkfeed { font-size: 11px; line-height: 1.3; max-height: 18vh; overflow-y: auto; white-space: pre-wrap; background: #16203d; border-radius: 10px; padding: 6px 8px; color: #cfd8f5; }
.pkbar2 { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 4px; background: #1b2340; }
.pkstatus { font-size: 13px; line-height: 1.3; min-height: 34px; color: #e6ebff; }
.pkraise { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pkraise input[type=range] { flex: 1 1 140px; min-width: 120px; }
.pkraise .chip { padding: 4px 10px; font-size: 13px; }
.pkres { white-space: pre-wrap; font-size: 13px; line-height: 1.4; color: #e6ebff; margin: 8px 0 12px; font-family: inherit; }
.pkshow { background: #243056; border-radius: 12px; padding: 6px 10px 8px; margin-bottom: 8px; }
.pkshowh { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.pkshowh span { color: #ffd45e; text-align: right; font-size: 13px; }
.pkboard { background: #14522f; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.pkboard .pkseat { background: #1d6b45; }
.pkex { display: flex; align-items: center; gap: 10px; margin: 3px 0; }
.mdbody { font-size: 14px; line-height: 1.45; color: #e6ebff; }
.mdbody h2, .mdbody h3, .mdbody h4, .mdbody h5 { color: #ffd45e; margin: 14px 0 4px; }
.mdbody h2 { font-size: 20px; } .mdbody h3 { font-size: 17px; } .mdbody h4 { font-size: 15px; } .mdbody h5 { font-size: 14px; }
.mdbody p { margin: 6px 0; } .mdbody ul { margin: 4px 0 8px; padding-left: 20px; } .mdbody li { margin: 2px 0; }
.mdbody table { border-collapse: collapse; font-size: 12px; margin: 6px 0; } .mdbody th, .mdbody td { border: 1px solid #3b4877; padding: 3px 6px; text-align: left; }
.mdbody code { background: #243056; padding: 0 4px; border-radius: 4px; }
.mdvisual { background: #243056; border-radius: 12px; padding: 8px 10px; margin: 8px 0; }
#pkSetup > * { flex-shrink: 0; }
.pkbody > * { flex-shrink: 0; }

.pkrow.lgrow { padding: 16px 0 4px; }

/* *************** DEL 32 - CARD GAMES ***************** */
.cghub { flex: 1 1 auto; overflow-y: auto; padding: 4px 12px 20px; }
.cgsub { color: #a8b4d8; font-size: 13px; margin: 0 0 8px; }
.cghh { color: #ffd45e; margin: 12px 0 6px; font-size: 16px; }
.cggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cgtile { border-radius: 16px; padding: 10px 8px; color: #f2f2f2; text-align: center; border: 2px solid rgba(255,255,255,.18); display: flex; flex-direction: column; gap: 4px; }
.cgtname { font-weight: 800; font-size: 16px; }
.cgtblurb { font-size: 11px; color: #d6e4f5; line-height: 1.25; max-height: 4.9em; overflow: hidden; }
.cgname { font-size: 16px; padding: 6px 10px; border-radius: 10px; border: 0; width: 170px; }
.cgbody { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.cgbody > * { flex-shrink: 0; }
.cgstatus { font-size: 14px; min-height: 36px; color: #e6ebff; font-weight: 700; }
.cghead { text-align: center; }
.cgh1 { font-weight: 800; color: #ffd45e; font-size: 15px; } .cgh2 { font-size: 12px; color: #a8b4d8; }
.cgopps { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cgopp { background: rgba(0,0,0,.25); border: 2px solid transparent; border-radius: 12px; padding: 4px 8px 5px; min-width: 100px; max-width: 49%; text-align: center; }
.cgopp.turn { border-color: #ffcc00; }
.cgoname { font-weight: 800; font-size: 13px; } .cgoinfo { font-size: 11px; color: #cfe0f3; }
.cgfan { display: flex; flex-wrap: wrap; gap: 1px; justify-content: center; padding: 3px 0; }
.jwrow { display: flex; justify-content: center; gap: .55em; padding: .3em 0 .1em; } .jwst { position: relative; font-size: 13px; margin-top: .3em; } .jwst.sm { font-size: 9px; }
.jwst .jwun { position: absolute; left: .35em; top: -.35em; } .jwst.empty { width: 3.2em; height: 4.4em; border: 1px dashed rgba(255,255,255,.3); border-radius: 4px; }
.jwst .jwtop { position: relative; } .jwmine { padding: 2px 0 6px; } .jwhand { display: flex; justify-content: center; gap: 4px; padding-top: 4px; }
.jwbar { flex-basis: 100%; text-align: center; } .jwhigh { flex-basis: 100%; text-align: center; padding: 2px 0; } .jwh { display: inline-flex; flex-direction: column; align-items: center; margin: 0 6px; font-size: 11px; color: #cfe0f3; } .jwh i { font-style: normal; font-size: 10px; }
.cgbidgrid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 3px; align-items: center; font-size: 12px; color: #cfe0f3; }
.cgbidgrid .bigbtn { padding: 0; height: 26px; line-height: 26px; font-size: 15px; min-height: 0; border-radius: 9px; }
.cgmeldarea { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 2px 4px; }
.cgmeld { display: flex; padding: 3px 4px 5px; border-radius: 6px; background: rgba(0,0,0,.22); }
.cgmeld.tap { outline: 2px solid #ffcc00; cursor: pointer; }
.cgmeld .mc { margin-left: -.8em; border-bottom: 3px solid var(--oc, #999); line-height: 0; } .cgmeld .mc:first-child { margin-left: 0; }
.cgmelds { flex-basis: 100%; text-align: center; font-size: 11px; color: #cfe0f3; padding: 2px 8px; }
.cd.inmeld { position: relative; } .cd.inmeld::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -.3em; height: .2em; background: #3fcf6b; border-radius: .1em; }
.cgfan.row7 { flex-wrap: nowrap; } .cgfan.row7 .cd + .cd { margin-left: -.9em; }
.cgcenter { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 92px; padding: 6px 0; background: rgba(0,0,0,.18); border-radius: 14px; align-items: flex-start; }
.cgplay { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #d6e4f5; gap: 2px; }
.cgbanner { text-align: center; color: #ffd45e; font-size: 13px; min-height: 0; }
.cgme { font-weight: 800; font-size: 14px; text-align: center; } .cgme.turn { color: #ffd45e; }
.cghand { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; padding: 14px 0 4px; }
.cgbtns { justify-content: center; }
.cgtbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.cgtbl th { color: #a8b4d8; font-weight: 700; padding: 2px 6px; text-align: center; } .cgtbl td { text-align: center; padding: 2px 6px; font-weight: 800; }
.cgtbl td.n { text-align: left; font-weight: 600; color: #e6ebff; } .cgtbl tr.foot td { color: #a8b4d8; }
.cgtbl td.good { color: #6dff9a; } .cgtbl td.bad { color: #ff7b7b; } .cgtbl td.warn { color: #ffb347; }
.cglog { }
.cgpick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.cgpick .bigbtn { padding: 10px 6px; font-size: 20px; text-align: center; }
.cgpick .bigbtn:disabled { opacity: .35; }
.cgprompt { font-weight: 800; font-size: 15px; margin: 4px 0 8px; } .cgprompt.sm { font-size: 13px; }
.cgflab { font-weight: 700; color: #a8b4d8; margin: 8px 0 3px; }
.cgsum { font-size: 14px; line-height: 1.35; margin: 3px 0; }
.cgfinal { font-size: 20px; font-weight: 800; margin: 6px 0; text-align: center; }
.cgchart { display: flex; justify-content: space-between; padding: 2px 0; } .cgchart b { color: #ffd45e; }
.cgboard { background: #123a5e; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.mgnote.warn { color: #ffb347; } .mgnote.bad { color: #ff7b7b; }
#cgDlg.top { align-items: flex-start; background: transparent; pointer-events: none; padding-top: 56px; }
#cgDlg.top .sheet { pointer-events: auto; max-height: 50vh; padding: 12px 14px; box-shadow: 0 6px 30px rgba(0,0,0,.65); }
#cgDlg.top .sheet h2 { font-size: 16px; margin-bottom: 6px; }

.cd.recv { outline: .15em solid #7fd3ff; }

.viralist { max-height: 30vh; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.viraitem { background: #2b3766; color: #dfe6ff; border-radius: 10px; padding: 7px 10px; text-align: left; font-size: 13px; font-weight: 700; }
.viraitem.on { background: #ffd45e; color: #20263a; }
.viratable { font-size: 10px; line-height: 1.35; overflow-x: auto; white-space: pre; color: #e6ebff; margin: 0; }
.suitbtn { font-size: 30px; padding: 6px; background: #fbfbf6; color: #1c1c1c; } .suitbtn.red { color: #c02020; } .suitbtn:disabled { opacity: .3; }

/* *************** DEL 90 - PHONE OR TABLET: THE BIG BASKET, THE CLOCK, THE ARROWS ON THE MAZE ***************** */
.npmore { padding: 4px 8px 10px; display: flex; }
.npmore .mbtn { flex: 1 1 auto; margin: 0; padding: 14px 18px; font-size: 20px; border-radius: 16px; }
.abdpad.float { position: absolute; right: 12px; bottom: 8px; margin: 0; z-index: 4; }
.abdpad.float button { opacity: .85; }
body.tablet .abdpad { --pad: 68px; }
body.tablet .npkeys { gap: 10px; padding: 0 10px; }
body.tablet .npkey { height: 76px; font-size: 36px; }
body.tablet .npcap { font-size: 22px; min-height: 64px; }
body.tablet .npwords.light { min-height: 50px; }
body.tablet .npwords.light .npw { font-size: 26px; padding: 2px 12px; }
body.tablet .nptrans .iconbtn { width: 60px; height: 60px; font-size: 26px; }
body.tablet .npmore .mbtn { padding: 18px 24px; font-size: 26px; }
body.tablet .npclockbox { height: min(100vw - 16px, 58vh); }
body.tablet .npdig { font-size: 56px; }
body.tablet .abbar .mstatus { font-size: 20px; min-height: 0; }
body.tablet .abbar .mbtn { font-size: 19px; padding: 12px 18px; }
@media (orientation: landscape) {
  body.tablet #npclock.screen:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  body.tablet #npclock .gamebar { grid-column: 1 / -1; }
  body.tablet #npclock .npclockbox { grid-column: 1; grid-row: 2; height: auto; margin-bottom: 10px; }
  body.tablet #npclock .npscroll { grid-column: 2; grid-row: 2; }
  body.tablet #abgame.abside:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto minmax(0, 1fr); }
  body.tablet #abgame.abside .gamebar { grid-column: 1 / -1; }
  body.tablet #abgame.abside .board { grid-column: 1; grid-row: 2; }
  body.tablet #abgame.abside .abbar { grid-column: 2; grid-row: 2; overflow-y: auto; padding: 8px 12px 12px 4px; display: flex; flex-direction: column; gap: 10px; }
  body.tablet #abgame.abside .abdpad { --pad: 84px; margin: 10px auto 0; }
}
.ybnone { grid-column: 1 / -1; margin: 8px 12px; font-size: 16px; line-height: 1.4; color: #cfe0f3; }
body.tablet .ybnone { font-size: 21px; }
body.yonly #ybBack0 { display: none; }                  /* the YourBook app: the shelf is the first screen, nothing to go back to */
/* the maze in full screen: only the maze, the arrow buttons, zoom and the exit button */
.abfsbar { display: none; position: absolute; z-index: 4; box-sizing: border-box; align-items: center; justify-content: space-between; gap: 12px; left: 0; right: 0; bottom: 0; padding: 6px 10px calc(8px + env(safe-area-inset-bottom)); }
.abfsbtns { display: flex; gap: 8px; }
.abfsb { width: 48px; height: 48px; border-radius: 12px; background: #8d6e63; color: #fff; font-size: 24px; font-weight: 800; touch-action: manipulation; }
.abfsb:active { background: #ffd45e; color: #20263a; }
#abgame.abfull .gamebar, #abgame.abfull .abbar { display: none; }
#abgame.abfull .abfsbar { display: flex; }
#abgame.abfull #abBoard { margin: 0; border-radius: 0; }
#abgame.abfull .abdpad { margin: 0; }
#abgame.abland .abfsbar { left: auto; top: 0; width: 190px; flex-direction: column-reverse; justify-content: center; gap: 22px; padding: 8px 10px; }
#abgame.abland .abdpad { margin: 0 auto; }
body.tablet .abfsb { width: 64px; height: 64px; font-size: 30px; }
body.tablet #abgame.abland .abfsbar { width: 250px; }

/* card games: phone = one column (the two wrappers dissolve); a tablet held sideways = table on the left, buttons / score / log in a side column */
.cgmain, .cgsidecol { display: contents; }
body.tablet #cgwin .cd.sm { font-size: 11px; } body.tablet #cgwin .cd.md { font-size: 16px; } body.tablet #cgwin .cd.lg { font-size: 21px; }
body.tablet #cgwin .cgstatus { font-size: 17px; } body.tablet #cgwin .cgtbl { font-size: 16px; } body.tablet #cgwin .cgoname, body.tablet #cgwin .cgme { font-size: 16px; }
body.tablet #cgwin .cgbtns .mbtn { font-size: 18px; padding: 12px 18px; }
body.tablet #cgwin.cgside .cgbody { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 12px; overflow: hidden; }
body.tablet #cgwin.cgside .cgmain, body.tablet #cgwin.cgside .cgsidecol { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; }
body.tablet #cgwin.cgside .cgmain > *, body.tablet #cgwin.cgside .cgsidecol > * { flex-shrink: 0; }
body.tablet #cgwin.cgside .cgopp { max-width: 32%; }
body.tablet #cgwin.cgside .cgsidecol { padding-top: 6px; }
body.tablet #cgwin.cgside .cgbtns { flex-direction: column; align-items: stretch; }
body.tablet #cgwin.cgside .cgbtns .mbtn { width: 100%; }
body.tablet #cgwin.cgside .pkfeed { max-height: none; }
.pkslot { display: flex; align-items: center; gap: 6px; margin: 6px 0; } .pkslotinfo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: 12px; color: #cfe0f3; } .pkslotinfo b { color: #fff; font-size: 14px; } .pkslot .bigbtn { padding: 8px 10px; font-size: 14px; }

/* components lists */
.compbody { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 4px 12px 14px; }
.compsec h3 { margin: 12px 0 4px; color: #ffd45e; font-size: 16px; }
.comptbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.comptbl td { padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,.1); vertical-align: top; }
.comptbl td.n { width: 44px; text-align: right; font-weight: 800; color: #ffd45e; }
.comptbl .cnote { font-size: 12px; color: #a8b4d8; margin-top: 1px; }
.comptbl tr.grp td { background: rgba(255,255,255,.08); font-weight: 800; color: #cfe0f3; }
.comptotal { margin-top: 12px; font-weight: 800; text-align: right; color: #cfe0f3; }
body.tablet .comptbl { font-size: 17px; } body.tablet .comptbl .cnote { font-size: 14px; } body.tablet .compsec h3 { font-size: 20px; }
@media (orientation: landscape) { body.tablet .compsecs { column-count: 2; column-gap: 28px; } body.tablet .compsec { break-inside: auto; } }
.cgmain > *, .cgsidecol > * { flex-shrink: 0; }

/* poker: phone = one column (the wrappers dissolve); a tablet held sideways = table on the left, chances / log on the right */
.pkmain, .pksidecol { display: contents; }
.pkmain > *, .pksidecol > * { flex-shrink: 0; }
body.tablet #pkgame .pkseat, body.tablet #pkgame .pkme { font-size: 16px; } body.tablet #pkgame .pkchances { font-size: 16px; } body.tablet #pkgame .pkchances h4 { font-size: 16px; }
body.tablet #pkgame .pkbar2 .mbtn, body.tablet #pkgame .pkbar2 button { font-size: 18px; }
body.tablet #pkgame.pkside .pkbody { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 14px; overflow: hidden; }
body.tablet #pkgame.pkside .pkmain, body.tablet #pkgame.pkside .pksidecol { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; }

/* a tablet held sideways: the board / table on the left, the controls and the score in a side column on the right (phone layout unchanged) */
@media (orientation: landscape) {
  body.tablet #c4game:not(.hidden), body.tablet #mggame:not(.hidden), body.tablet #mauigame:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr); column-gap: 8px; }
  body.tablet #c4game .gamebar, body.tablet #mggame .gamebar, body.tablet #mauigame .gamebar { grid-column: 1 / -1; }
  /* Fyra i rad */
  body.tablet #c4game .c4board { grid-column: 1; grid-row: 2; }
  body.tablet #c4game .c4bar { grid-column: 2; grid-row: 2; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 14px; padding: 10px 10px 10px 2px; }
  body.tablet #c4game .c4score { font-size: 22px; line-height: 1.4; } body.tablet #c4game .c4bar .mbtn { font-size: 20px; padding: 14px 18px; }
  /* Minutspelet */
  body.tablet #mggame .mgboard { grid-column: 1; grid-row: 2; }
  body.tablet #mggame .mgbar { grid-column: 2; grid-row: 2; overflow-y: auto; padding: 8px 10px 10px 2px; gap: 10px; }
  body.tablet #mggame .mstatus { font-size: 18px; max-height: none; } body.tablet #mggame .mgbtns { flex-direction: column; align-items: stretch; }
  body.tablet #mggame .mgbtns .mbtn { font-size: 19px; padding: 14px 18px; }
  /* Maui */
  body.tablet #mauigame .mtable { grid-column: 1; grid-row: 2; margin-bottom: 8px; }
  body.tablet #mauigame .mbar { grid-column: 2; grid-row: 2; overflow-y: auto; padding: 4px 10px 10px 2px; }
  body.tablet #mauigame .mstatus { font-size: 18px; max-height: none; } body.tablet #mauigame .mactions { flex-direction: column; align-items: stretch; gap: 8px; }
  body.tablet #mauigame .mactions .mbtn { font-size: 18px; padding: 13px 16px; margin: 0; }
  /* Mastermind: history on the left, the guess row, palette and buttons on the right */
  body.tablet #mmgame:not(.hidden) { display: grid; position: relative; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto; padding-right: 336px; }
  body.tablet #mmgame .gamebar { margin-right: -336px; }
  body.tablet #mmgame .mmstats { grid-column: 1; grid-row: 2; } body.tablet #mmgame .mmsecret { grid-column: 1; grid-row: 3; }
  body.tablet #mmgame .mmhist { grid-column: 1; grid-row: 4; margin: 0 8px 8px; } body.tablet #mmgame .mmlegend { grid-column: 1; grid-row: 5; }
  body.tablet #mmgame .mmbottom { position: absolute; right: 0; top: 78px; bottom: 0; width: 328px; overflow-y: auto; padding: 4px 10px 10px 2px; gap: 12px; }
  body.tablet #mmgame .mmhover { font-size: 15px; } body.tablet #mmgame .mgbtns { flex-direction: column; align-items: stretch; } body.tablet #mmgame .mgbtns .mbtn { font-size: 19px; padding: 14px 18px; }
  /* Yatzy: dice and controls on the left, the scorecard on the right */
  body.tablet #yzgame:not(.hidden) { display: flex; flex-direction: column; }
  body.tablet #yzgame .yzbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-auto-rows: min-content; align-content: start; column-gap: 18px; row-gap: 8px; }
  body.tablet #yzgame .yzbody > * { grid-column: 1; }
  body.tablet #yzgame .yzbody > #yzCard { grid-column: 2; grid-row: 1 / span 6; align-self: start; }
  body.tablet #yzgame .yzmsg { font-size: 18px; } body.tablet #yzgame .yzctl .mbtn { font-size: 20px; padding: 14px 20px; }
}




/* *************** YourBook: the shelf and the reader *************** */
.ybcard { position: relative; }
.ybcover { width: 100%; max-width: 170px; height: 132px; object-fit: contain; border-radius: 8px; background: #ecdfc4; }
.ybrestart { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; border-radius: 12px; background: #2b3766; color: #fff; display: flex; align-items: center; justify-content: center; }
.ybrestart svg { width: 22px; height: 22px; }
.ybbar { gap: 6px; padding: 8px; }
.ybbar .iconbtn { flex: 0 0 auto; }
.ybhead { min-width: 0; text-align: left; padding: 0 4px; }
.ybtt { font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ybpg { font-size: 13px; color: #a8b4d8; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ybbar .chip { padding: 8px 12px; font-size: 15px; min-width: 0; flex: 0 0 auto; }
.ybmain { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.ybstage { flex: 1 1 0; min-height: 0; position: relative; margin: 0 8px; background: #ecdfc4; border-radius: 18px; overflow: hidden; touch-action: manipulation; }
.ybpic { position: absolute; background: #fffdf7; box-shadow: 0 0 0 1px #b49a6c; }
.ybpic img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.ybnopic { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; color: #7d6a58; font-size: 15px; text-align: center; padding: 12px; }
.ybtext { position: absolute; box-sizing: border-box; text-align: center; white-space: pre-wrap; color: #3a2d24; line-height: 1.3; overflow: hidden; word-wrap: break-word; }
.ybw { border-radius: 8px; padding: 0 3px; margin: 0 -3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ybinfant .ybw { cursor: pointer; }
.ybw.lit { background: #ffd84d; box-shadow: 0 0 0 2px #e0a800; }
.ybhot { position: absolute; border-radius: 10px; }
.ybhot.flash { box-shadow: 0 0 0 5px #c4581e; }
.ybmega { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; z-index: 2; }
.ybmega svg { display: block; pointer-events: none; }
.ybmega.lit { z-index: 3; transform: translate(-50%, -50%) scale(1.35); }
.ybmega.lit svg { filter: drop-shadow(0 0 7px #ffe27a) drop-shadow(0 0 12px #f2b400); }
.ybctl { flex: 0 0 auto; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ybstatus { min-height: 20px; max-width: 100%; font-size: 14px; font-weight: 700; color: #ffd45e; text-align: center; }
.ybrow1, .ybrow2 { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ybbtn { background: #2b3766; color: #f2f5ff; border-radius: 14px; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; }
.ybbtn.mid { width: 60px; height: 60px; }
.ybbtn.play { width: 80px; height: 60px; background: #3faa78; color: #fff; border-radius: 18px; }
.ybbtn.on { background: #ffd45e; color: #20263a; }
.ybbtn:disabled { opacity: .3; }
.ybbtn.txt { font-size: 19px; }
.ybspeed { display: flex; background: #2b3766; border-radius: 14px; overflow: hidden; height: 50px; }
.ybspeed.on { background: #4a3f66; }
.ybspeed button { color: #f2f5ff; font-weight: 800; font-size: 20px; min-width: 40px; padding: 0 8px; background: transparent; }
.ybspeed #ybSpeed { font-size: 16px; min-width: 54px; }
.ybfsexit { display: none; position: absolute; top: 8px; left: 8px; z-index: 5; opacity: .8; align-items: center; justify-content: center; }
#ybgame.ybfs .gamebar, #ybgame.ybfs .ybctl { display: none; }
#ybgame.ybfs .ybfsexit { display: flex; }
#ybgame.ybfs .ybstage { margin: 0; border-radius: 0; background: #000; }
.ybvol { align-items: center; }
.ybvol input[type=range] { flex: 1 1 140px; min-width: 120px; }
.ybnote { margin-top: 10px; font-size: 13px; color: #a8b4d8; }
.sheet h3 { margin: 12px 0 4px; color: #ffd45e; font-size: 17px; }
.sheet p { margin: 0 0 6px; line-height: 1.35; }
body.tablet .ybbtn { width: 62px; height: 62px; } body.tablet .ybbtn.mid { width: 72px; height: 72px; } body.tablet .ybbtn.play { width: 100px; height: 72px; }
body.tablet .ybspeed { height: 62px; } body.tablet .ybspeed button { font-size: 24px; min-width: 50px; } body.tablet .ybstatus { font-size: 17px; }
body.tablet .ybtt { font-size: 21px; } body.tablet .ybpg { font-size: 15px; }
@media (orientation: landscape) {
  #ybgame.ybside:not(.hidden):not(.ybfs) { display: grid; grid-template-columns: minmax(0, 1fr) 290px; grid-template-rows: auto minmax(0, 1fr); column-gap: 8px; }
  #ybgame.ybside:not(.ybfs) .gamebar { grid-column: 1 / -1; }
  #ybgame.ybside:not(.ybfs) .ybmain { display: contents; }
  #ybgame.ybside:not(.ybfs) .ybstage { grid-column: 1; grid-row: 2; margin-bottom: 8px; }
  #ybgame.ybside:not(.ybfs) .ybctl { grid-column: 2; grid-row: 2; overflow-y: auto; padding: 4px 8px 8px 0; justify-content: flex-start; gap: 18px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  #ybgame.ybside:not(.hidden):not(.ybfs) { grid-template-columns: minmax(0, 1fr) 236px; }
  #ybgame.ybside .ybctl { gap: 8px; }
  #ybgame.ybside .ybrow1, #ybgame.ybside .ybrow2 { gap: 6px; }
  #ybgame.ybside .ybbtn, body.tablet #ybgame.ybside .ybbtn { width: 44px; height: 44px; } #ybgame.ybside .ybbtn.mid, body.tablet #ybgame.ybside .ybbtn.mid { width: 52px; height: 48px; } #ybgame.ybside .ybbtn.play, body.tablet #ybgame.ybside .ybbtn.play { width: 70px; height: 50px; }
  #ybgame.ybside .ybspeed, body.tablet #ybgame.ybside .ybspeed { height: 44px; } #ybgame.ybside .ybspeed button { font-size: 18px; min-width: 36px; }
  #ybgame.ybside .ybstatus { min-height: 16px; font-size: 13px; }
  #ybgame .gamebar.ybbar { padding: 4px 8px; }
}.ybtools { display: flex; align-items: center; gap: 10px; padding: 2px 12px 4px; }
.ybtools .ybnote { margin: 0; }
.ybdel { position: absolute; top: 6px; left: 6px; width: 34px; height: 34px; border-radius: 12px; background: #7a3a3a; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; }
/* *************** DEL NT - NO THANKS *************** */
#ntgame { gap: 0; }
.ntinfo { text-align: center; font-size: 12px; color: #9a9ab0; padding: 0 10px 4px; }
.ntboard { flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0 8px; background: #1b1b26; border-radius: 18px; padding: 6px; box-sizing: border-box; }
.ntcenter { display: flex; gap: 14px; align-items: center; padding: 6px 8px; flex: 0 0 auto; }
.ntbig { width: 92px; height: 128px; border-radius: 12px; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 46px; font-weight: 800; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.5); flex: 0 0 auto; }
.ntside { flex: 1; min-width: 0; }
.ntpilelab { color: #e0a72e; font-size: 15px; margin-bottom: 4px; }
.ntpile { display: flex; flex-wrap: wrap; gap: 3px; min-height: 18px; }
.ntcoin { display: inline-block; width: 15px; height: 15px; border-radius: 50%; background: #e0a72e; border: 2px solid #7a5200; box-sizing: border-box; }
.nthint { font-size: 12px; color: #cfd6f5; margin-top: 6px; }
.ntplayers { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px 2px 6px; }
.ntp { background: #242435; border-radius: 12px; padding: 6px 9px; flex: 0 0 auto; border: 2px solid transparent; }
.ntp.turn { border-color: #e0a72e; }
.ntp.mark { border-color: #5bc6b0; }
.nthead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.nthead span { font-size: 11px; color: #9a9ab0; }
.ntcards { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 4px; min-height: 30px; align-items: center; }
.ntcards.sm { min-height: 0; margin-top: 2px; }
.ntrun { display: inline-flex; gap: 2px; }
.ntc { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 6px; color: #fff; font-weight: 800; font-size: 14px; }
.ntc.free { filter: grayscale(1); opacity: .45; font-weight: 600; }
.ntnone { color: #6a6a80; }
.ntbtns { display: flex; gap: 10px; padding: 8px 10px 4px; }
.ntbtns .mbtn { flex: 1; margin: 0; font-size: 20px; padding: 16px 8px; }
.mbtn.no { background: #c0392b; }
.ntbtns .mbtn:disabled { opacity: .35; }
.ntlog { white-space: pre-wrap; font-size: 12px; color: #9a9ab0; padding: 2px 12px 8px; min-height: 0; }
.nttbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.nttbl th { text-align: left; color: #a8b4d8; font-weight: 700; padding: 3px 4px; font-size: 12px; }
.nttbl td { padding: 4px; border-top: 1px solid #3a3a50; vertical-align: top; }
.ntsl { display: flex; justify-content: space-between; padding: 2px 0; font-size: 14px; }
.ntsh { color: #ffd45e; font-weight: 800; margin: 10px 0 4px; }
.ntstatic { display: flex; flex-direction: column; background: #1b1b26; padding: 6px; box-sizing: border-box; }
@media (orientation: landscape) {
  body.tablet #ntgame:not(.hidden) { display: grid; grid-template-columns: 400px minmax(0, 1fr); grid-template-rows: auto auto auto auto minmax(0, 1fr); column-gap: 10px; }
  body.tablet #ntgame .gamebar, body.tablet #ntgame .ntinfo { grid-column: 1 / -1; }
  body.tablet #ntBoard { display: contents; }
  body.tablet #ntBoard .ntcenter { grid-column: 1; grid-row: 3; background: #1b1b26; border-radius: 18px; margin: 0 0 0 8px; padding: 14px; }
  body.tablet #ntBoard .ntplayers { grid-column: 2; grid-row: 3 / 6; background: #1b1b26; border-radius: 18px; margin: 0 8px 8px 0; padding: 8px; }
  body.tablet #ntgame .ntbtns { grid-column: 1; grid-row: 4; padding-left: 8px; }
  body.tablet #ntgame .ntlog { grid-column: 1; grid-row: 5; padding-left: 14px; overflow: hidden; }
  body.tablet .ntbig { width: 130px; height: 182px; font-size: 64px; }
  body.tablet .ntpilelab { font-size: 20px; } body.tablet .nthint { font-size: 16px; }
  body.tablet .ntcoin { width: 20px; height: 20px; }
  body.tablet .nthead { font-size: 19px; } body.tablet .nthead span { font-size: 14px; }
  body.tablet .ntc { min-width: 38px; height: 38px; font-size: 17px; }
  body.tablet .ntbtns .mbtn { font-size: 24px; padding: 20px 8px; }
  body.tablet .ntlog { font-size: 15px; }
}
/* *************** DEL RK - RACK-O *************** */
.rkseat { align-items: center; gap: 8px; }
.rkname { flex: 1 1 120px; min-width: 0; background: #2b3766; color: #fff; border: 2px solid #3d4b85; border-radius: 10px; padding: 8px 10px; font-size: 16px; }
.rkstatus { text-align: center; font-size: 12px; color: #a8b4d8; padding: 0 10px 4px; }
.rkbody { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; padding: 0 10px 8px; gap: 6px; }
.rkleft, .rkright { display: flex; flex-direction: column; gap: 6px; }
.rkrack { display: flex; flex-direction: column; gap: 3px; background: #1f3a2d; border-radius: 14px; padding: 6px; }
.rkend { text-align: center; font-size: 11px; font-weight: 800; color: #a8c7b4; letter-spacing: 1px; }
.rkslot { display: flex; align-items: center; gap: 8px; height: 34px; background: #284a3a; border-radius: 8px; padding: 0 8px; border: 2px solid transparent; color: #fff; text-align: left; }
.rkslot.ok { background: #2f6b46; }
.rkslot.can { border-color: #ffd45e; background: #355c80; animation: rkpulse 1.2s infinite; }
.rkslot:disabled { opacity: 1; }
@keyframes rkpulse { 50% { background: #3f6f99; } }
.rkn { width: 18px; font-size: 12px; color: #a8c7b4; text-align: center; flex: 0 0 auto; }
.rkc { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 4px; border-radius: 6px; background: #3a4d6b linear-gradient(90deg, rgba(255,255,255,.16) var(--w, 0%), transparent var(--w, 0%)); color: #fff; font-weight: 800; font-size: 14px; box-sizing: border-box; }
.rkc.ok { background-color: #3d9a5f; }
.rkc.empty { background: #2a3b34; color: #6f8f7e; }
.rkc.big { flex: 1; height: 26px; font-size: 16px; justify-content: flex-start; padding-left: 10px; }
.rkc.mark { outline: 2px solid #ffd45e; }
.rkminirack { display: flex; gap: 2px; }
.rkminirack .rkc { flex: 1 1 0; min-width: 0; padding: 0; font-size: 12px; height: 26px; }
.rkscorenow { text-align: center; font-size: 13px; color: #cfe0d5; }
.rklog { background: #242435; border-radius: 10px; padding: 6px 8px; font-size: 12px; color: #cfd6f5; }
.rklog div { padding: 1px 0; }
.rkpiles { display: flex; gap: 10px; }
.rkpile { flex: 1; border-radius: 14px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; }
.rkpile.draw { background: #34507d; } .rkpile.disc { background: #7a5c2e; }
.rkpile:disabled { opacity: .55; }
.rklab { font-size: 12px; font-weight: 700; } .rkback, .rkface { font-size: 30px; font-weight: 800; line-height: 1.1; } .rksub { font-size: 11px; color: #ffe9a8; min-height: 13px; }
.rkhand { display: flex; align-items: center; gap: 10px; background: #fff3cd; color: #5d4600; border-radius: 12px; padding: 8px 10px; }
.rkhandcard { font-size: 34px; font-weight: 800; background: #fff; border-radius: 8px; padding: 0 10px; border: 3px solid #c8a21a; }
.rkhandtxt { flex: 1; font-size: 13px; font-weight: 700; }
.rkhand .mbtn { margin: 0; color: #fff; }
.rkbtns { display: flex; flex-direction: column; gap: 6px; }
.rkbtns .mbtn { margin: 0; }
.mbtn.big { font-size: 20px; padding: 14px; }
.rkhint { font-size: 12px; color: #9fe3b6; font-style: italic; } .rkhint.warn { color: #ff9a8a; }
.rkcover { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #151a33; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 20px; }
.rkcovbox { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.rkcovic { font-size: 70px; } .rkcovt { font-size: 22px; font-weight: 800; }
.rkrow { margin-top: 3px; } .rkwin { font-size: 18px; font-weight: 800; color: #ffd45e; text-align: center; margin: 8px 0; }
.rkstatic { display: flex; flex-direction: column; gap: 6px; background: #1b2b24; padding: 8px; box-sizing: border-box; overflow-y: auto; }
.rkrpinfo { font-size: 12px; color: #a8c7b4; text-align: center; }
.rkrp { background: #25382e; border-radius: 10px; padding: 5px 7px; border: 2px solid transparent; } .rkrp.mark { border-color: #ffd45e; }
@media (orientation: landscape) {
  body.tablet #rkgame:not(.hidden) .rkbody { flex-direction: row; gap: 14px; overflow: hidden; }
  body.tablet #rkgame .rkleft { flex: 1 1 0; min-width: 0; overflow-y: auto; } body.tablet #rkgame .rkright { flex: 0 0 380px; overflow-y: auto; }
  body.tablet .rkslot { height: 44px; } body.tablet .rkc.big { height: 34px; font-size: 20px; } body.tablet .rkn { font-size: 15px; }
  body.tablet .rkback, body.tablet .rkface { font-size: 44px; } body.tablet .rklab { font-size: 15px; } body.tablet .rklog { font-size: 15px; }
  body.tablet .rkhandcard { font-size: 46px; } body.tablet .rkhandtxt { font-size: 16px; } body.tablet .rkscorenow { font-size: 16px; }
  body.tablet .mbtn.big { font-size: 24px; padding: 18px; }
}
/* *************** DEL LV - LAS VEGAS *************** */
.lvmain { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.lvbody { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 8px 6px; }
.lvbottom { flex: 0 0 auto; max-height: 46%; overflow-y: auto; background: #10151c; border-radius: 16px 16px 0 0; padding: 6px 10px 8px; }
.lvcas { --die: 15px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; background: #166843; border-radius: 14px; padding: 5px; }
.lvc { background: #243040; border: 2px solid #41546e; border-radius: 10px; padding: 4px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 210px; min-width: 0; }
.lvc.live { border-color: #f5c518; box-shadow: 0 0 0 2px rgba(245,197,24,.35); cursor: pointer; }
.lvsign .lvdie { width: 30px; height: 30px; }
.lvslot { display: inline-block; background: #f0f4fa; color: #c8281e; font-weight: 800; font-size: 11px; border-radius: 6px; padding: 5px 3px; border: 2px solid #b08c1e; }
.lvdie { width: var(--die); height: var(--die); display: inline-block; flex: 0 0 auto; }
.lvdie.big { width: 30px; height: 30px; }
.lvnotes { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0 2px; box-sizing: border-box; }
.lvnote { background: #eece5c; color: #5d4a0c; border: 1px solid #b08c1e; border-radius: 4px; font-size: 10px; font-weight: 800; text-align: center; line-height: 14px; }
.lvnote.rainbow { background: linear-gradient(180deg, #e2402f, #f08a24, #f2c31c, #3faa5f, #3a7bd8, #9b5bc8); color: #fff; }
.lvnone { color: #6a7a90; text-align: center; font-size: 11px; }
.lvdice { display: flex; flex-direction: column; gap: 4px; margin-top: auto; width: 100%; }
.lvstack { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; align-items: center; }
.lvmark { width: 100%; text-align: center; font-size: 10px; font-weight: 800; color: #9fb0c4; }
.lvmark.win { color: #5fd08a; } .lvmark.w { color: #8e979f; } .lvmark.tie { color: #e2564a; }
.lvplayers { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.lvp { background: #1e2530; border-radius: 10px; padding: 4px 8px; display: grid; grid-template-columns: 14px 1fr auto; column-gap: 7px; align-items: center; border: 2px solid transparent; font-size: 14px; }
.lvp.turn { border-color: #f5c518; }
.lvp.w { color: #8e979f; }
.lvdot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid rgba(255,255,255,.55); box-sizing: border-box; }
.lvmoney { color: #f5c518; font-weight: 800; }
.lvsub { grid-column: 2 / -1; font-size: 11px; color: #9fb0c4; }
.lvwho { font-size: 12px; color: #9fb0c4; margin: 2px 0; }
.lvtray { display: flex; flex-wrap: wrap; gap: 6px; }
.lvgrp { background: #0d4630; border: 2px solid #1d8354; border-radius: 10px; padding: 4px 6px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; justify-content: center; max-width: 100%; }
.lvgrp.live { border-color: #f5c518; background: #14583d; }
.lvgrp:disabled { opacity: 1; }
.lvgl { width: 100%; text-align: center; font-size: 11px; font-weight: 700; color: #9fb0c4; }
.lvgrp.live .lvgl { color: #f5c518; }
.lvempty { color: #6a7a90; font-size: 12px; padding: 6px 0; }
.lvaction { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.lvtitle { font-weight: 800; font-size: 15px; color: #eef2f8; } .lvtitle.dim { color: #9fb0c4; font-weight: 600; }
.lvbtn { background: steelblue; color: #fff; border-radius: 10px; padding: 11px 12px; font-size: 15px; font-weight: 700; text-align: left; }
.lvbtn.go { background: #3faa78; } .lvbtn.warnbtn { background: chocolate; } .lvbtn.dim { background: #3a4455; } .lvbtn.cardbtn { background: #5b4a9e; }
.lvcardshead { color: #f5c518; font-size: 12px; margin-top: 6px; } .lvcardq { color: #9fb0c4; font-size: 11px; }
.lvlog { white-space: pre-wrap; font-size: 11px; color: #9fb0c4; margin-top: 6px; }
.lvwin { font-size: 17px; font-weight: 800; color: #ffd45e; text-align: center; margin-bottom: 4px; }
.lvres { background: #1e2530; border-radius: 10px; padding: 6px 9px; margin: 6px 0; } .lvres.win { border: 2px solid #f5c518; }
.lvreshead { display: flex; align-items: center; gap: 8px; } .lvreshead span:last-child { margin-left: auto; color: #f5c518; font-weight: 800; }
.lvstatic { display: block; background: #151a22; padding: 6px; box-sizing: border-box; overflow-y: auto; }
@media (orientation: landscape) {
  body.tablet #lvgame:not(.hidden) .lvmain { flex-direction: row; gap: 10px; }
  body.tablet #lvgame .lvbody { flex: 1 1 0; }
  body.tablet #lvgame .lvbottom { flex: 0 0 400px; max-height: none; border-radius: 16px; margin: 0 8px 8px 0; }
  body.tablet .lvcas { --die: 24px; } body.tablet .lvc { min-height: 300px; } body.tablet .lvnote { font-size: 14px; line-height: 20px; } body.tablet .lvdie.big { width: 40px; height: 40px; } body.tablet .lvsign .lvdie { width: 44px; height: 44px; }
  body.tablet .lvmark { font-size: 14px; } body.tablet .lvp { font-size: 17px; } body.tablet .lvsub { font-size: 14px; } body.tablet .lvbtn { font-size: 18px; padding: 14px 14px; } body.tablet .lvtitle { font-size: 18px; } body.tablet .lvlog { font-size: 14px; }
}
.lvaction > *, .lvbottom > * { flex: 0 0 auto; }
.lvbtn { height: auto; min-height: min-content; line-height: 1.25; }
/* *************** DEL AZ - AZUL *************** */
.azmsg { text-align: center; font-size: 14px; font-weight: 700; color: #ffd45e; padding: 2px 10px 4px; min-height: 18px; }
.azbody { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 8px 6px; }
.azbar { display: flex; gap: 8px; padding: 6px 10px 10px; } .azbar .mbtn { flex: 1; margin: 0; font-size: 16px; padding: 12px 6px; } .azbar .mbtn.hidden { display: none; } .azbar .mbtn:disabled { opacity: .35; }
.azt { width: 100%; height: 100%; display: block; }
.azdisplays { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.azdisp { background: #efe6d2; border: 3px solid #b0763a; border-radius: 14px; padding: 3px 4px 5px; color: #3b2b17; min-width: 0; }
.azdisp.gold { background: #e8c65a; border-color: #8a6a14; } .azdisp.side { box-shadow: 0 0 0 3px #4aa8e8; cursor: pointer; }
.azdisp.centre { grid-column: 1 / -1; background: #2c3d50; border-color: #46607a; color: #cfe0f3; }
.azdl { font-size: 10px; font-weight: 800; text-align: center; } .azdt { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; padding: 2px; min-height: 36px; }
.azb { width: 34px; height: 34px; background: transparent; padding: 0; border-radius: 6px; flex: 0 0 auto; } .azb.sel { outline: 3px solid #fff; outline-offset: 1px; }
.azdt .azt.marker { width: 34px; height: 34px; }
.aznone { color: #8a7a62; }
.azboards { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.azboard { --c: 30px; background: #efe4cf; border: 3px solid var(--seat, #2a6f99); border-radius: 14px; padding: 4px 6px 6px; color: #1c2a3a; }
.azboard.active { box-shadow: 0 0 0 3px #e9b949; }
.azbh { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; } .azbh span { font-size: 12px; font-weight: 700; }
.azproj { font-size: 11px; color: #6a5a3a; margin-bottom: 3px; }
.azgrid { display: flex; flex-direction: column; gap: 2px; }
.azrow { display: flex; gap: 10px; align-items: center; justify-content: center; }
.azpl, .azwall, .azfloor { display: flex; gap: 2px; }
.azpl { padding: 1px 2px; border-radius: 8px; } .azpl.legal, .azfloor.legal { outline: 3px solid #2fa85a; background: rgba(47,168,90,.18); cursor: pointer; }
.azc { width: var(--c); height: var(--c); display: inline-block; border-radius: 6px; position: relative; flex: 0 0 auto; box-sizing: border-box; }
.azc.void { visibility: hidden; } .azc.empty, .azc.wcell { background: #ddd0b6; border: 1px solid #b9a784; } .azc.wcell.grey { background: #cfc9bf; } .azc.wcell.pre { border: 2px solid #b0763a; }
.azc.ghost { opacity: .45; } .azc .azt.faint { opacity: .28; } .azc.wcell.choose { outline: 3px solid #2fa85a; background: rgba(47,168,90,.35); cursor: pointer; }
.azc.w.recent { outline: 2px solid #fff; }
.azfloor { margin-top: 4px; align-items: flex-end; padding: 2px 3px; border-radius: 8px; background: #e6d9c0; flex-wrap: nowrap; }
.azfl { font-size: 10px; font-weight: 800; color: #9a5a34; width: 40px; flex: 0 0 auto; align-self: center; }
.azc.f { background: #f3e9d4; border: 1px solid #c9b995; } .azc.f i { position: absolute; top: -11px; left: 0; width: 100%; text-align: center; font-size: 9px; font-style: normal; color: #9a5a34; font-weight: 800; }
.azfloor { padding-top: 12px; } .azc.free { width: auto; padding: 0 4px; font-size: 9px; background: #e8c65a; align-self: center; }
.azstatic { display: block; overflow-y: auto; padding: 6px; background: #22303f; box-sizing: border-box; } .azstatic .azboard { margin-top: 8px; }
@media (orientation: landscape) {
  body.tablet #azgame:not(.hidden) .azbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 12px; align-items: start; }
  body.tablet #azgame .azboards { margin-top: 0; } body.tablet #azgame #azLog { grid-column: 1 / -1; }
  body.tablet .azb { width: 44px; height: 44px; } body.tablet .azdt .azt.marker { width: 44px; height: 44px; } body.tablet .azdl { font-size: 13px; } body.tablet .azdisplays { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.tablet .azboard { --c: 34px; } body.tablet .azmsg { font-size: 18px; } body.tablet .azbar .mbtn { font-size: 20px; padding: 16px 8px; }
}
/* *************** DEL HR - HARE AND TORTOISE *************** */
.hrbody { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 8px 4px; display: flex; flex-direction: column; gap: 6px; }
.hrleft, .hrright { display: flex; flex-direction: column; gap: 6px; }
.hrtrack { width: 100%; height: auto; display: block; background: #1d2a1a; border-radius: 12px; }
.hranimals, .hrplayers { display: flex; flex-direction: column; gap: 3px; }
.hran { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 6px; align-items: center; background: #374f30; border-radius: 10px; padding: 2px 8px; font-size: 14px; }
.hrdot { width: 32px; height: 32px; } .hrstar { color: #f2c14e; } .hrwhere { font-size: 11px; color: #a9b99a; } .hrnote { grid-column: 2 / -1; font-size: 11px; color: #ffe680; font-weight: 700; min-height: 0; }
.hrnote:empty { display: none; }
.hrpl { background: #2a3d25; border: 2px solid transparent; border-radius: 10px; padding: 4px 8px; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; align-items: center; font-size: 14px; }
.hrpl.turn { border-color: #f2c14e; background: #4d6b3a; } .hrpl > span:first-of-type { font-size: 11px; color: #a9b99a; grid-column: 1; } .hrbets { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 3px; }
.hrchip { display: inline-flex; width: 26px; height: 26px; border-radius: 6px; border: 2px solid #f4ecd0; align-items: center; justify-content: center; box-sizing: border-box; color: #fff; font-weight: 800; vertical-align: middle; } .hrchip svg { width: 100%; height: 100%; } .hrchip.hid { background: #5a6a4a; }
.hrbottom { flex: 0 0 auto; background: #10151c; border-radius: 16px 16px 0 0; padding: 6px 8px 4px; }
.hrhand { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.hrcard { position: relative; width: 52px; height: 74px; border-radius: 8px; border: 2px solid #3a3a2a; padding: 2px; display: flex; flex-direction: column; align-items: center; box-sizing: border-box; color: #fff; }
.hrcard svg { width: 100%; flex: 1 1 0; min-height: 0; } .hrcn { font-size: 10px; font-weight: 800; } .hrhowl { position: absolute; bottom: 12px; font-size: 8px; background: #2a1040; color: #ffe680; border-radius: 4px; padding: 0 3px; }
.hrcard.sel { transform: translateY(-10px); border-color: #ffe680; box-shadow: 0 0 0 3px #ffe680; } .hrcard.dim { opacity: .8; } .hrcard.sugg { outline: 3px solid #5fd08a; } .hrhand.sm .hrcard { width: 34px; height: 48px; } .hrhand.sm .hrcn { display: none; }
.hrpod, .hrres { display: flex; align-items: center; gap: 6px; margin: 4px 0; } .hrres { background: #2a3d25; border-radius: 8px; padding: 4px 8px; } .hrres.win { background: #4d6b3a; } .hrres span { margin-left: auto; font-weight: 800; color: #f2c14e; } .hrres i { font-size: 12px; color: #f2c14e; font-style: normal; } .hrsub { font-size: 12px; color: #a9b99a; }
.hrbar { display: flex; align-items: center; gap: 8px; margin: 3px 0; } .hrbar span { width: 40%; } .hrbar i { height: 14px; border-radius: 4px; display: inline-block; } .hrbar b { margin-left: 4px; }
.hrstatic { display: block; overflow-y: auto; background: #1d2a1a; padding: 6px; box-sizing: border-box; } .hrrp { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.hrrp .hrhand { grid-column: 1 / -1; justify-content: flex-start; }
@media (orientation: landscape) {
  body.tablet #hrgame:not(.hidden) .hrbody { flex-direction: row; gap: 12px; } body.tablet #hrgame .hrleft { flex: 1 1 0; min-width: 0; } body.tablet #hrgame .hrright { flex: 0 0 300px; }
  body.tablet .hrcard { width: 80px; height: 114px; } body.tablet .hrcn { font-size: 13px; } body.tablet .hran, body.tablet .hrpl { font-size: 17px; } body.tablet .hrdot { width: 40px; height: 40px; } body.tablet .hrchip { width: 34px; height: 34px; }
}
/* *************** Colour Sudoku (sd) *************** */
.sdstatus { text-align: center; font-size: 15px; font-weight: 700; color: #a8b4d8; padding: 0 8px 2px; }
.sdbody { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.sdwrap { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px; }
.sdboard { display: grid; background: #0d1330; border: 6px solid #0d1330; border-radius: 12px; width: 300px; height: 300px; }
.sdc { position: relative; overflow: hidden; border-style: solid; border-color: #0d1330; border-width: 0; background-color: #2b3766; background-clip: padding-box; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; cursor: pointer; }
.sdc.empty { background-color: #2b3766; }
.sdc.given::after { content: ""; position: absolute; width: 24%; height: 24%; border-radius: 50%; background: rgba(0,0,0,.30); border: 2px solid rgba(255,255,255,.55); }
.sdc.given.empty::after { display: none; }
.sdc .sdm { position: relative; z-index: 1; font-size: 1em; font-weight: 800; }
.sdc.given .sdm { text-decoration: underline; }
.sdc.peer { background-image: linear-gradient(rgba(255,255,255,.20), rgba(255,255,255,.20)); }
.sdc.same { box-shadow: inset 0 0 0 4px #fff; }
.sdc.sel { box-shadow: inset 0 0 0 5px #ffd45e; background-image: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)); }
.sdc.bad { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.62) 0 5px, rgba(0,0,0,0) 5px 12px); }
.sdn { display: grid; width: 86%; height: 86%; gap: 2px; align-content: center; justify-items: center; }
.sdn i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.sdctl { padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.sdpalette { display: flex; gap: 6px; justify-content: center; }
.sdcol { flex: 1 1 0; max-width: 64px; height: 52px; border-radius: 12px; border: 3px solid rgba(255,255,255,.25); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; line-height: 1; padding: 0; }
.sdcol b { font-size: 18px; } .sdcol small { font-size: 12px; opacity: .85; font-weight: 800; }
.sdcol.on { border-color: #fff; box-shadow: 0 0 0 3px #ffd45e; }
.sdcol.done { opacity: .45; }
.sdbtns { justify-content: center; }
.sdmsg { min-height: 40px; font-size: 14px; line-height: 1.3; color: #dfe6ff; text-align: center; }
.sdlvnum { font-size: 22px; font-weight: 800; min-width: 64px; text-align: center; color: #ffd45e; }
body.tablet .sdstatus { font-size: 18px; } body.tablet .sdcol { height: 64px; max-width: 76px; } body.tablet .sdmsg { font-size: 17px; }
@media (orientation: landscape) {
  body.tablet #sdgame.sdside .sdbody { flex-direction: row; }
  body.tablet #sdgame.sdside .sdwrap { flex: 1 1 0; }
  body.tablet #sdgame.sdside .sdctl { flex: 0 0 340px; justify-content: center; overflow-y: auto; }
  body.tablet #sdgame.sdside .sdpalette { flex-wrap: wrap; }
  body.tablet #sdgame.sdside .sdcol { flex: 0 0 60px; }
  body.tablet #sdgame.sdside .sdbtns .mbtn { font-size: 19px; padding: 14px 18px; }
}
.sdbtns { flex-wrap: nowrap; gap: 6px; } .sdbtns .mbtn { padding: 10px 8px; font-size: 14px; white-space: nowrap; flex: 1 1 0; min-width: 0; }
.sdc.given.mk::after { display: none; }
@media (orientation: landscape) { body.tablet #sdgame.sdside .sdbtns { flex-wrap: wrap; } body.tablet #sdgame.sdside .sdbtns .mbtn { flex: 1 1 calc(50% - 6px); font-size: 18px; } body.tablet #sdgame.sdside .sdctl { overflow-x: hidden; } }


/* *************** DEL 99 - YOURBOOK MAKER ON THE PHONE (yb_make.js) ***************** */
.ybedit { position: absolute; top: 50px; right: 6px; width: 38px; height: 38px; border-radius: 12px; background: #2b3766; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ybtools { flex-wrap: wrap; }
.ybmbody { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 4px 14px 24px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.ybmbody > * { flex-shrink: 0; }
.ybmintro { margin: 4px 0; line-height: 1.4; color: #cfe0f3; font-size: 16px; }
.ybmlabel { font-weight: 700; color: #a8b4d8; }
.ybminwrap { position: relative; display: block; }
.ybminput { width: 100%; font-size: 20px; font-weight: 700; padding: 12px 14px; border-radius: 14px; border: 0; background: #fdf8ec; color: #20263a; -webkit-user-select: text; user-select: text; }
.ybminput::placeholder { color: #9a9fb0; font-weight: 600; }
.ybmcaret { position: absolute; width: 2px; background: #20263a; pointer-events: none; display: none; }
.ybmwide { width: 100%; }
.ybmbook { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; background: #2b3766; border-radius: 14px; padding: 12px 14px; font-size: 18px; }
.ybmbook b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ybmbook span { color: #a8b4d8; font-size: 14px; white-space: nowrap; }
.ybmmsg { min-height: 20px; font-weight: 700; color: #ffd45e; font-size: 14px; }
.ybmactions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ybmactions .bigbtn { padding: 14px 8px; font-size: 17px; line-height: 1.2; }
.ybmactions .bigbtn.rec { background: #c8392f; color: #fff; }
.ybmactions .bigbtn:disabled { opacity: .35; }
.ybminfo { color: #cfe0f3; font-size: 15px; }
.ybmgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ybmthumb { position: relative; padding: 0; background: #ecdfc4; border-radius: 10px; overflow: hidden; height: 120px; }
.ybmthumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ybmthumb .n { position: absolute; left: 4px; top: 4px; min-width: 24px; height: 24px; border-radius: 12px; background: rgba(27,35,64,.85); color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.ybmthumb .s { position: absolute; right: 4px; bottom: 4px; font-size: 16px; text-shadow: 0 0 3px #000; }
.ybmhint { margin: 0; color: #a8b4d8; font-size: 13px; line-height: 1.35; }
.ybmdel { align-self: flex-start; background: #7a3a3a; color: #fff; }
.ybmsheetbtn { display: block; width: 100%; margin-bottom: 8px; padding: 12px 14px; font-size: 18px; text-align: left; }
.ybmsheetbtn:disabled { opacity: .35; }
.ybmcount { flex: 1 1 auto; min-width: 0; font-weight: 800; font-size: 17px; color: #ffd45e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ybmtime { font-weight: 800; font-size: 18px; color: #ff8d86; min-width: 48px; text-align: right; padding-right: 6px; }
.ybmtalk { flex: 0 0 auto; padding: 8px 12px; font-size: 15px; }
#ybmcam .topbar .iconbtn { flex: 0 0 auto; }
.ybmcamwrap, .ybmreadwrap { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.ybmcamstage { flex: 1 1 0; min-height: 0; position: relative; margin: 0 8px; background: #000; border-radius: 16px; overflow: hidden; }
.ybmcamstage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.ybmflash { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .12s; }
.ybmflash.on { opacity: .75; }
.ybmcammsg { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); text-align: center; font-weight: 700; font-size: 16px; line-height: 1.4; color: #ffd45e; pointer-events: none; }
.ybmcamctl { flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto; align-items: center; padding: 10px 18px 12px; row-gap: 8px; }
.ybmlast { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; border: 2px solid #fff; justify-self: start; }
.ybmcamctl .ybmlast.hidden { display: block !important; visibility: hidden; }
.ybmshutter { width: 80px; height: 80px; border-radius: 50%; background: #fff; border: 7px solid #ffd45e; }
.ybmshutters { display: flex; gap: 14px; align-items: center; justify-content: center; }
.ybmshutters.two .ybmshutter { width: 68px; height: 68px; border-width: 6px; font-size: 26px; line-height: 1; padding: 0; color: #20263a; }
.ybmshutter.voice { border-color: #e0443c; }
.ybmorder { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ybmorderchips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ybmorder .chip { padding: 7px 11px; font-size: 14px; background: rgba(20, 26, 48, .78); color: #fff; }
.ybmorder .chip.on { background: #ffd45e; color: #20263a; }
.ybmorderhint { max-width: 440px; padding: 6px 10px; border-radius: 10px; background: rgba(20, 26, 48, .78); color: #fff; font-size: 13px; line-height: 1.3; text-align: center; }
.ybmshutter:active { transform: scale(.94); }
.ybmshutter:disabled { opacity: .35; }
.ybmdonecam { justify-self: end; width: 58px; height: 58px; padding: 0; font-size: 28px; border-radius: 16px; }
.ybmmeter { height: 7px; background: #2b3766; border-radius: 4px; overflow: hidden; width: 100%; }
.ybmmeter div { height: 100%; width: 0; background: #3faa78; transition: width .06s linear; }
.ybmcamctl .ybmmeter { grid-column: 1 / -1; visibility: hidden; }
#ybmcam.talking .ybmcamctl .ybmmeter { visibility: visible; }
#ybmcam .ybmtalk.on { background: #c8392f; color: #fff; }
#ybmcam #ybmTorch.on { background: #ffd45e; color: #20263a; }
.ybmreadstage { flex: 1 1 0; min-height: 0; margin: 0 8px; background: #ecdfc4; border-radius: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ybmreadstage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ybmreadstage.recording { outline: 4px solid #e0443c; outline-offset: -4px; }
.ybmreadctl { flex: 0 0 auto; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ybmreadhint { min-height: 38px; text-align: center; font-weight: 700; color: #ffd45e; font-size: 15px; line-height: 1.25; max-width: 460px; }
.ybmreadhint.ybmlive { color: #ff8d86; }
.ybmrow1 { display: flex; gap: 12px; align-items: center; justify-content: center; }
.ybmrow2 { display: flex; gap: 10px; }
.ybmrow2 .chip:disabled { opacity: .35; }
.ybmbtn { background: #2b3766; color: #fff; border-radius: 16px; width: 62px; height: 62px; font-size: 18px; font-weight: 800; }
.ybmbtn:disabled { opacity: .3; }
.ybmbig { border-radius: 22px; min-width: 190px; min-height: 78px; padding: 0 18px; font-size: 21px; font-weight: 800; color: #fff; }
.ybmbig.rec { background: #d93a32; font-size: 40px; }
.ybmbig.done { background: #3faa78; }
body.tablet .ybmbody { max-width: 920px; width: 100%; margin: 0 auto; }
body.tablet .ybmgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
body.tablet .ybmthumb { height: 168px; }
body.tablet .ybmactions .bigbtn { font-size: 21px; padding: 18px 10px; }
body.tablet .ybmbig { min-width: 260px; min-height: 96px; font-size: 26px; }
body.tablet .ybmbtn { width: 78px; height: 78px; font-size: 22px; }
body.tablet .ybmreadhint { font-size: 19px; }
body.tablet .ybmshutter { width: 96px; height: 96px; }
body.tablet .ybmshutters.two .ybmshutter { width: 84px; height: 84px; font-size: 32px; }
body.tablet .ybmorderhint { font-size: 16px; max-width: 560px; }
@media (orientation: landscape) {
  .ybmcamwrap, .ybmreadwrap { flex-direction: row; }
  .ybmcamctl { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; justify-items: center; align-content: center; row-gap: 22px; padding: 6px 14px; width: 184px; }
  .ybmcamctl .ybmlast, .ybmdonecam { justify-self: center; }
  .ybmcamctl .ybmmeter { grid-column: auto; }
  .ybmreadctl { width: 300px; justify-content: center; padding: 6px 12px; }
  .ybmreadhint { min-height: 60px; }
  .ybmbig { min-width: 200px; }
  body.tablet #ybmBody.ybmov { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); grid-auto-rows: min-content; column-gap: 20px; align-content: start; max-width: none; }
  body.tablet #ybmBody.ybmov > * { grid-column: 1; }
  body.tablet #ybmBody.ybmov > .ybmgrid { grid-column: 2; grid-row: 1 / span 8; align-content: start; }
}
.ybmactions .bigbtn.wide { grid-column: 1 / -1; }

/* *************** YourBook Maker: languages, listen, move to place, crop, square photos, tap to focus, video, ChatGPT text *************** */
.ybmai { align-self: flex-start; }
.ybmtracks { gap: 8px; }
.ybmtracks > span { min-width: 0; }
.ybmnumgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ybmnumgrid .chip { padding: 12px 0; font-size: 18px; text-align: center; }
.ybmnumgrid .chip:disabled { opacity: .5; }
.ybmaichips { margin-bottom: 10px; }
.ybmaitext { white-space: pre-wrap; background: #fdf8ec; color: #20263a; border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.4; -webkit-user-select: text; user-select: text; max-height: 34vh; overflow-y: auto; }
.ybmreadlang { flex: 0 0 auto; padding: 8px 12px; font-size: 15px; max-width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ybmreadlang:disabled { opacity: .4; }
.ybmlisten.on { background: #ffd45e; color: #20263a; }
.ybmlisten:disabled { opacity: .35; }
.ybmreadstage img { cursor: pointer; }
.ybmsqmask { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); pointer-events: none; z-index: 1; }
.ybmstageopts { position: absolute; top: 8px; left: 8px; z-index: 3; display: flex; gap: 6px; }
.ybmstageopts .chip { background: rgba(20, 26, 48, .78); color: #fff; padding: 7px 12px; font-size: 14px; }
.ybmfocus { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: 2px solid #fff; border-radius: 12px; pointer-events: none; opacity: 0; z-index: 2; }
.ybmfocus.on { animation: ybmfocus 1.1s ease-out; }
.ybmfocus.ok { border-color: #5be39a; opacity: 1; }
@keyframes ybmfocus { 0% { transform: scale(1.6); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1); opacity: .9; } }
.ybmcropwrap { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.ybmcropstage { flex: 1 1 0; min-height: 0; margin: 0 8px; background: #0d1122; border-radius: 16px; overflow: hidden; position: relative; }
.ybmcropstage canvas { position: absolute; left: 0; top: 0; display: block; touch-action: none; }
.ybmcropctl { flex: 0 0 auto; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ybmcropok { flex: 0 0 auto; background: #3faa78; color: #fff; padding: 8px 14px; font-size: 16px; }
.ybmcroprow { justify-content: center; }
.ybmcroprow > span { min-width: 0; }
body.tablet .ybmlisten, body.tablet .ybmrow2 .chip { font-size: 18px; padding: 12px 16px; }
@media (orientation: landscape) {
  .ybmcropwrap { flex-direction: row; }
  .ybmcropctl { width: 300px; justify-content: center; padding: 6px 12px; }
}

/* *************** DEL 99B - A PACK OF BOOKS (yb_pack.js) ***************** */
.ybpklist { max-height: 46vh; overflow-y: auto; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; }
.ybprow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: rgba(255,255,255,.07); }
.ybprow input { width: 24px; height: 24px; flex: none; }
.ybprow img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; flex: none; }
.ybprow .t { flex: 1 1 0; min-width: 0; }
.ybprow .n1 { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ybprow .n2 { font-size: 13px; color: #a8b4d8; }
.ybprow .st { flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 10px; color: #fff; background: #555; }
.ybprow .st-new { background: #2f7d4f; }
.ybprow .st-newer { background: #2f5f9a; }
.ybprow .st-older { background: #9a6a2f; }
.ybpkchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.ybpkgo { width: 100%; margin: 4px 0; }
.ybpkgo:disabled { opacity: .5; }

/* *************** DEL 99C - BOOKS FROM DRIVE, REPLACING A BOOK (yb_drive.js, yb.js DEL 01E) ***************** */
.ybrep { position: absolute; top: 46px; left: 6px; width: 34px; height: 34px; border-radius: 12px; background: #2b3766; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
button.ybprow { width: 100%; border: 0; color: inherit; font: inherit; text-align: left; }
.ybprow .st-x { background: #555; }

.ybmconsent { display: flex; align-items: flex-start; gap: 6px; margin: 10px 4px 6px; font-size: 14px; line-height: 1.3; }
.ybmconsent input { width: 24px; height: 24px; flex: none; margin-top: 2px; }

.histwrap { display: flex; align-items: stretch; gap: 6px; }
.histwrap .histrow { flex: 1; min-width: 0; }
.histmail { flex: none; width: 52px; font-size: 26px; border-radius: 14px; border: 0; background: #2d3a73; color: #ffd966; }
.sbbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }

/* *************** DEL 99 - DINO WORLD ***************** */
.dwgamebar { gap: 6px; }
.dwgamebar .iconbtn:not(.big) { width: 42px; height: 42px; font-size: 21px; }
.dwtitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.dwbody { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.dwmain { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.dwctl { flex: 0 0 auto; display: flex; flex-direction: column; }
.dwthemes { display: flex; gap: 5px; padding: 0 8px 6px; }
.dwtheme { flex: 1 1 0; min-width: 0; background: #2b3766; color: #dfe6ff; border-radius: 12px; padding: 4px 1px 3px; display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: 700; line-height: 1.15; overflow: hidden; }
.dwtheme .em { font-size: 22px; line-height: 1.15; }
.dwtheme.on { background: #ffd45e; color: #20263a; }
.dwstage { flex: 1 1 0; min-height: 0; position: relative; margin: 0 6px; border-radius: 16px; overflow: hidden; background: #1b2f22; }
#dwCanvas { position: absolute; top: 0; left: 0; touch-action: none; display: block; }
.dwhint { text-align: center; font-size: 14px; font-weight: 700; color: #a8b4d8; padding: 5px 8px 2px; min-height: 26px; }
.dwpal { display: flex; gap: 6px; overflow-x: auto; padding: 4px 8px 6px; -webkit-overflow-scrolling: touch; }
.dwdino { flex: 0 0 auto; width: 74px; background: #2b3766; border-radius: 14px; padding: 4px 2px 3px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; font-weight: 700; color: #dfe6ff; border: 3px solid transparent; }
.dwdino.on { background: #3b4f9a; border-color: #ffd45e; }
.dwdino.dwextra { background: #4a2f55; }
.dwdino.dwextra.on { background: #7a3f78; border-color: #ffd45e; }
.dwdino span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dwbar { display: flex; gap: 8px; padding: 2px 8px 10px; }
.dwbtn { flex: 1 1 0; min-width: 0; background: #2b3766; border-radius: 16px; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 12px; font-weight: 800; color: #dfe6ff; }
.dwbtn .ic { font-size: 26px; line-height: 1.1; }
.dwbtn.run { flex: 1.5 1 0; background: #3faa78; color: #fff; font-size: 15px; }
.dwbtn.on { background: #ffd45e; color: #20263a; }
.dwbtn:disabled { opacity: .35; }
.dwbanner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(27,35,64,.94); border: 3px solid #ffd45e; border-radius: 22px; padding: 16px 20px; min-width: 220px; max-width: 88%; text-align: center; }
.dwbh { font-size: 24px; font-weight: 800; color: #ffd45e; margin-bottom: 8px; }
.dwbl { font-size: 18px; font-weight: 700; line-height: 1.5; margin-bottom: 12px; }
.dwbb { display: flex; gap: 10px; justify-content: center; }
.dwbb .mbtn { margin: 0; font-size: 17px; padding: 12px 16px; }
.dwsaved { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.dwsv { position: relative; background: #2b3766; border-radius: 12px; padding: 6px; font-size: 12px; font-weight: 700; text-align: center; }
.dwsv img { width: 100%; display: block; border-radius: 8px; margin-bottom: 4px; }
.dwsvx { position: absolute; top: 2px; right: 2px; width: 30px; height: 30px; border-radius: 15px; background: rgba(27,35,64,.85); font-size: 14px; }
body.tablet .dwtheme { font-size: 14px; } body.tablet .dwtheme .em { font-size: 30px; }
body.tablet .dwdino { width: 100px; font-size: 13px; } body.tablet .dwbtn { min-height: 74px; font-size: 15px; } body.tablet .dwhint { font-size: 17px; }
@media (orientation: landscape) {
  body.tablet #dwgame.dwside .dwbody { flex-direction: row; }
  body.tablet #dwgame.dwside .dwctl { flex: 0 0 340px; justify-content: center; overflow-y: auto; }
  body.tablet #dwgame.dwside .dwpal { flex-wrap: wrap; overflow-x: hidden; justify-content: center; }
  body.tablet #dwgame.dwside .dwbar { flex-wrap: wrap; }
  body.tablet #dwgame.dwside .dwbtn { flex: 1 1 calc(50% - 8px); }
}
.dwoff { visibility: hidden; pointer-events: none; }
.dwtitle { font-size: 15px; }

/* *************** SCHOOL TRAINING (Skolträning) *************** */
.scsetup .schead { font-size: 20px; font-weight: 800; margin: 6px 0 10px; color: #ffd45e; }
.scgrid { display: grid; gap: 10px; margin-bottom: 14px; }
.scgrid.g3 { grid-template-columns: repeat(3, 1fr); }
.scgrid.g2 { grid-template-columns: repeat(2, 1fr); }
.scgrade, .scsubj { background: #2b3766; border-radius: 18px; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.scgrade b { font-size: 42px; line-height: 1; color: #ffd45e; }
.scgrade small, .scsubj small { font-size: 13px; color: #a8b4d8; }
.scsubj .ic { font-size: 40px; line-height: 1.1; }
.scsubj b { font-size: 18px; }
.scgrade:disabled, .scsubj:disabled { opacity: .35; }
.sclist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.sctopic { display: flex; align-items: center; gap: 12px; background: #2b3766; border-radius: 16px; padding: 12px 14px; text-align: left; }
.sctopic .ic { font-size: 28px; width: 40px; text-align: center; }
.sctopic b { flex: 1 1 auto; font-size: 18px; }
.sctopic .stars { color: #ffd45e; font-size: 14px; white-space: nowrap; margin-left: auto; text-align: right; }
.sctopic { width: 100%; box-sizing: border-box; }
.scbar { height: 10px; background: #2b3766; margin: 2px 14px 0; border-radius: 6px; overflow: hidden; }
.scbar i { display: block; height: 100%; width: 0; background: #3faa78; transition: width .3s; }
.sccount { text-align: center; font-size: 14px; color: #a8b4d8; padding: 4px; }
.scbody { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 14px 14px; width: 100%; max-width: 720px; margin: 0 auto; box-sizing: border-box; }
.scq { font-size: 21px; font-weight: 800; text-align: center; line-height: 1.25; }
.scpic { display: flex; justify-content: center; width: 100%; }
.scsvg { width: min(70vw, 250px); height: auto; max-height: 30vh; }
.scsvg.wide { width: min(90vw, 360px); }
.scbigtxt { font-size: 40px; font-weight: 800; text-align: center; letter-spacing: 1px; line-height: 1.15; background: #2b3766; border-radius: 16px; padding: 10px 16px; max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.scemoji { font-size: 96px; line-height: 1.1; text-align: center; }
body.tablet .scemoji { font-size: 130px; }
.scemoji.mid { font-size: 58px; } .scemoji.many { font-size: 38px; line-height: 1.25; }
body.tablet .scemoji.mid { font-size: 80px; } body.tablet .scemoji.many { font-size: 54px; }
.scbigtxt.mid { font-size: 28px; }
.scbigtxt.long { font-size: 21px; font-weight: 700; }
.scans { width: 100%; }
.scchoices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.scchoices.col1 { grid-template-columns: 1fr; }
.scchoice { background: #2b3766; border-radius: 16px; padding: 14px 8px; font-size: 22px; font-weight: 800; min-height: 58px; overflow-wrap: anywhere; }
.scchoice.right { background: #3faa78; }
.scchoice.wrong { background: #c0392b; }
.scinput { display: flex; align-items: center; justify-content: center; gap: 10px; }
.scval { min-width: 160px; text-align: center; font-size: 38px; font-weight: 800; background: #fff; color: #20263a; border-radius: 14px; padding: 6px 14px; }
.scval.empty { color: #9aa3bf; }
.scval.right { background: #3faa78; color: #fff; }
.scval.wrong { background: #c0392b; color: #fff; }
.scunit { font-size: 24px; font-weight: 800; color: #ffd45e; }
.sckeys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 360px); }
.sckeys.hidden { display: none; }
.sckey { background: #2b3766; border-radius: 14px; font-size: 26px; font-weight: 800; padding: 12px 0; }
.sckey.ok { grid-column: 1 / -1; background: #3faa78; font-size: 22px; }
.sckey.empty { visibility: hidden; }
.scmsg { min-height: 28px; font-size: 18px; font-weight: 800; text-align: center; }
.scmsg.good { color: #7ee0a8; }
.scmsg.bad { color: #ff9a8a; }
.scnext { width: min(100%, 360px); }
.hublinks { padding: 8px 14px 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; align-items: center; font-size: 15px; color: #a8b4d8; }
.hublinks a { color: #ffd45e; font-weight: 700; text-decoration: underline; }
body.tablet .scq { font-size: 28px; } body.tablet .scchoice { font-size: 28px; padding: 20px 8px; } body.tablet .scbigtxt { font-size: 52px; } body.tablet .scval { font-size: 48px; } body.tablet .sckey { font-size: 32px; padding: 16px 0; }

/* ---- video scenes (puppet theatre): yb_video.js ---- */
.ybpic video.ybvid { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; object-fit: cover; background: #000; pointer-events: none; }
.ybmreadstage video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; background: #000; }
.ybvstage video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.ybvstage.recording { outline: 5px solid #e0443c; outline-offset: -5px; }
.ybvbig { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 150px; font-weight: 900; color: #fff; text-shadow: 0 0 18px #000, 0 0 6px #000; pointer-events: none; }
.ybvbig.hidden { display: none; }
.ybvctl { grid-template-columns: 1fr; grid-template-rows: auto auto auto; justify-items: center; row-gap: 10px; }
.ybvhint { min-height: 38px; max-width: 460px; }
.ybvrow { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.ybvrec { width: 84px; height: 84px; border-radius: 50%; background: #d93a32; border: 7px solid #fff; color: #fff; font-size: 34px; font-weight: 900; line-height: 1; padding: 0; }
.ybvrec.on { border-radius: 18px; background: #b3261e; }
.ybvrec:active { transform: scale(.94); }
.ybvrec:disabled { opacity: .35; }
.ybvkeep { min-width: 150px; min-height: 64px; font-size: 20px; }
.ybvredo { font-size: 18px; padding: 14px 18px; }
.ybvdone { min-width: 64px; min-height: 64px; font-size: 26px; }
.ybvwatch { width: 100%; max-height: 60vh; background: #000; border-radius: 12px; display: block; }
.ybmvidstart { margin-top: 8px; background: #b3261e; color: #fff; }
body.tablet .ybvrec { width: 104px; height: 104px; }
@media (orientation: landscape) { .ybvctl { width: 230px; align-content: center; } .ybvbig { font-size: 110px; } }.ybvctl .ybmmeter { visibility: visible; grid-column: auto; }

/* *************** LEARN (Lär dig) *************** */
.ldintro { font-size: 16px; color: #a8b4d8; margin: 4px 0 14px; line-height: 1.35; }
.ldsec { display: flex; align-items: center; gap: 14px; background: #2b3766; border-radius: 20px; padding: 18px 16px; margin-bottom: 12px; width: 100%; box-sizing: border-box; text-align: left; }
.ldsec .ic { font-size: 46px; width: 60px; text-align: center; }
.ldsec .tx { display: flex; flex-direction: column; gap: 4px; }
.ldsec b { font-size: 22px; }
.ldsec small { font-size: 14px; color: #a8b4d8; }
.ldgrp { font-size: 15px; font-weight: 800; color: #a8b4d8; margin: 8px 0; }
.ldbody { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 14px 10px; width: 100%; max-width: 720px; margin: 0 auto; box-sizing: border-box; }
.ldstage { width: 100%; min-height: 190px; display: flex; align-items: center; justify-content: center; background: #232d57; border-radius: 20px; padding: 12px 6px; box-sizing: border-box; flex: 0 0 auto; }
.ldeq { font-size: 34px; font-weight: 800; color: #ffd45e; text-align: center; letter-spacing: 1px; }
.ldeq.long { font-size: 23px; letter-spacing: 0; }
.ldcap { font-size: 20px; font-weight: 700; text-align: center; line-height: 1.3; }
.ldnav { display: flex; gap: 12px; padding: 8px 14px 14px; max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.ldnav .bigbtn { flex: 0 0 72px; padding: 14px 0; }
.ldnav .bigbtn.start { flex: 1 1 auto; }
.ldnav.hidden { display: none; }
.ldend { display: flex; flex-direction: column; gap: 10px; width: min(100%, 420px); padding-bottom: 10px; }
.ldend.hidden { display: none; }
.ldendh { font-size: 30px; font-weight: 800; text-align: center; color: #ffd45e; }
.ldendp { font-size: 17px; text-align: center; color: #e6ebff; line-height: 1.35; }
.ldrowwrap { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ldrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 2px; }
.ldrow.big .ldit { font-size: 56px; } .ldrow.mid .ldit { font-size: 42px; } .ldrow.small .ldit { font-size: 32px; }
.ldcell { display: flex; flex-direction: column; align-items: center; }
.ldcell.gap { margin-right: 24px; }
.ldnum { min-height: 18px; font-size: 16px; font-weight: 800; color: #ffd45e; }
.lddeco { font-size: 64px; line-height: 1.1; }
.ldhint { font-size: 14px; color: #a8b4d8; }
.ldit { display: inline-block; position: relative; line-height: 1.1; transition: opacity .3s, filter .3s; }
.ldit.tap { cursor: pointer; }
.ldit.x { opacity: .3; filter: grayscale(1); }
.ldit.x::after { content: "✖"; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: .6em; color: #ff5a4a; filter: none; }
.ldit.hl { animation: ldpulse 1s ease-in-out infinite; }
.ldit.new { animation: ldpop .5s ease-out; }
@keyframes ldpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes ldpop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.ldframes { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; --s: min(8vw, 46px); }
.ldframe { display: grid; grid-template-columns: repeat(5, var(--s)); gap: 2px; padding: 4px; border: 3px solid #a8b4d8; border-radius: 10px; background: #1b2340; }
.ldslot { width: var(--s); height: var(--s); border: 1px dashed #3d4a7d; border-radius: 6px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.ldslot .ldit { font-size: calc(var(--s) * .72); }
.ldslot.hole { border: 2px dashed #ffd45e; background: rgba(255,212,94,.18); animation: ldpulse 1s ease-in-out infinite; }
.ldshare { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.ldpile { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 330px; min-height: 40px; }
.ldpile .ldit { font-size: 30px; }
.ldplates { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ldplate { width: min(25vw, 112px); min-height: 78px; background: #e8eefc; border: 5px solid #fff; border-radius: 26px; padding: 6px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; box-sizing: border-box; box-shadow: inset 0 0 0 3px #c4cfec; }
.ldplate .ldit { font-size: 24px; }
.ldsvg { width: 100%; display: flex; justify-content: center; }
.ldsvg svg { width: 100%; max-width: 400px; height: auto; }
.ldsvg.size svg { max-width: 240px; }
.ldglobebox { width: 100%; max-width: 620px; margin: 0 auto; display: flex; justify-content: center; flex: 0 0 auto; }
.ldglobebox canvas { touch-action: none; border-radius: 12px; display: block; }
.ldgbtns { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 14px; flex: 0 0 auto; }
.ldgbtns .bigbtn { padding: 10px 22px; font-size: 20px; }
.ldcard { flex: 1 1 0; min-height: 0; overflow-y: auto; width: 100%; max-width: 620px; margin: 0 auto; padding: 4px 14px 16px; box-sizing: border-box; }
.ldcardhint { font-size: 20px; font-weight: 800; text-align: center; margin-top: 6px; }
.ldcardnote { font-size: 14px; color: #a8b4d8; text-align: center; margin: 6px 0; line-height: 1.35; }
.ldcardhead { display: flex; align-items: center; gap: 10px; }
.ldcardname { flex: 1 1 auto; font-size: 28px; font-weight: 800; color: #ffd45e; }
.ldfact { position: relative; background: #2b3766; border-radius: 12px; padding: 8px 12px; margin: 6px 0; font-size: 17px; line-height: 1.3; }
.ldfact small { display: block; font-size: 13px; color: #a8b4d8; font-weight: 700; margin-bottom: 2px; }
.ldfact .ldsay { position: absolute; right: 6px; top: 6px; font-size: 18px; background: none; }
.ldfact:has(.ldsay) { padding-right: 40px; }
.ldmore { width: 100%; margin-top: 4px; padding: 10px; font-size: 18px; }
.ldadv.hidden { display: none; }
body.tablet .ldcap { font-size: 26px; } body.tablet .ldeq { font-size: 44px; } body.tablet .ldfact { font-size: 21px; }
/* LEARN: compare list (bigger countries) */
.ldcmp { background: #1f2850; border-radius: 16px; padding: 10px; margin: 8px 0; }
.ldcmpchips { margin-bottom: 8px; }
.ldcmplist { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.ldcmphead { font-weight: 700; color: #ffd45e; font-size: 15px; padding: 2px 4px; }
.ldcmprow { display: flex; align-items: center; gap: 10px; background: #2b3766; border-radius: 12px; padding: 8px 10px; text-align: left; width: 100%; box-sizing: border-box; }
.ldcmprow i { font-style: normal; font-weight: 800; color: #ffd45e; min-width: 26px; text-align: center; }
.ldcmprow span { display: flex; flex-direction: column; gap: 2px; }
.ldcmprow b { font-size: 16px; }
.ldcmprow small { font-size: 13px; color: #a8b4d8; line-height: 1.25; }

/* LEARN: picture tiles (body, animals, space, science) */
.ldtiles { display: grid; gap: 10px; width: 100%; max-width: 420px; margin: 0 auto; }
.ldtiles.cols1 { grid-template-columns: 1fr; } .ldtiles.cols2 { grid-template-columns: 1fr 1fr; } .ldtiles.cols3 { grid-template-columns: 1fr 1fr 1fr; } .ldtiles.cols4 { grid-template-columns: repeat(4, 1fr); }
.ldtile { background: #2b3766; border-radius: 16px; padding: 10px 4px; text-align: center; cursor: pointer; transition: transform .3s, background .3s, opacity .3s; }
.ldtile .em { font-size: 44px; line-height: 1.1; }
.ldtiles.cols4 .em { font-size: 34px; }
.ldtile .tx { font-size: 14px; margin-top: 4px; color: #dfe6ff; min-height: 18px; }
.ldtile.hl { background: #4a5a9c; transform: scale(1.06); box-shadow: 0 0 0 3px #ffd45e; }
.ldtile.dim { opacity: .35; }
.ldsvg.art svg { max-width: 420px; }
.ldsvg .spin { transform-box: fill-box; transform-origin: center; animation: ldspin 6s linear infinite; }
.ldsvg .spinfast { transform-box: fill-box; transform-origin: center; animation: ldspin 2s linear infinite; }
.ldsvg .bob { animation: ldbob 1.6s ease-in-out infinite; }
.ldsvg .beat { transform-box: fill-box; transform-origin: center; animation: ldbeat 1s ease-in-out infinite; }
.ldsvg .fall { animation: ldfall 1.6s cubic-bezier(.5,0,1,.6) infinite; }
.ldsvg .fall2 { animation: ldfall 1.6s cubic-bezier(.5,0,1,.6) .35s infinite; }
.ldsvg .flow { stroke-dasharray: 8 8; animation: ldflow 1s linear infinite; }
@keyframes ldspin { to { transform: rotate(360deg); } }
@keyframes ldbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ldbeat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes ldfall { 0% { transform: translateY(-40px); } 70%,100% { transform: translateY(70px); } }
@keyframes ldflow { to { stroke-dashoffset: -16; } }
.ldtiles.cols5 { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ldtiles.cols5 .em { font-size: 30px; } .ldtiles.cols5 .tx { font-size: 11px; }
.ldsvg .fly { animation: ldfly 1.6s ease-in infinite; }
@keyframes ldfly { 0% { transform: translateY(0); } 100% { transform: translateY(-100px); } }

/* LEARN: levels, body map, sound tiles */
.ldlevel { margin: 4px 0 12px; }
.ldmap svg { max-width: 440px; }
.ldlab { cursor: pointer; }
.ldlab text { text-decoration: underline; }
.organ { cursor: pointer; }
.ldtile.pop { transform: scale(1.12) rotate(-3deg); background: #6a4a2a; }
