.dp-root {
    --th: clamp(26px, 9.6dvh, 38px);
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: radial-gradient(130% 120% at 50% 0%, #177a54 0%, #0d5238 55%, #093d2a 100%);
    color: #fff;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.dp-root.dp-st { height: 100vh; height: 100dvh; height: var(--vh, 100dvh); }
.dp-root * { box-sizing: border-box; }

.dp-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; }
.dp-logo { font-size: 44px; font-weight: 800; color: #f3c75c; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.dp-logo.dp-sm { font-size: 30px; }
.dp-sub { font-size: 15px; opacity: .9; }
.dp-hi { font-size: 22px; font-weight: 700; }
.dp-note { font-size: 13px; opacity: .85; }
.dp-err { font-size: 14px; color: #ffb3a7; font-weight: 700; }
.dp-or { font-size: 13px; opacity: .7; }

.dp-input {
    width: min(260px, 80%);
    padding: 12px 14px;
    font-size: 17px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,.25);
    background: rgba(0,0,0,.28);
    color: #fff;
    text-align: center;
    outline: none;
    font-family: inherit;
}
.dp-input:focus { border-color: #f3c75c; }
.dp-input.dp-code { letter-spacing: 8px; font-size: 22px; font-weight: 800; width: 170px; text-transform: uppercase; }

.dp-btn {
    padding: 13px 26px;
    font-size: 17px;
    font-weight: 800;
    font-family: inherit;
    border: none;
    border-radius: 14px;
    background: rgba(255,255,255,.14);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.dp-btn:active { transform: translateY(1px); }
.dp-btn:disabled { opacity: .4; }
.dp-btn.dp-gold { background: linear-gradient(180deg, #f6cf6b, #e0a93c); color: #3a2a08; }
.dp-btn.dp-sm2 { padding: 9px 16px; font-size: 14px; border-radius: 11px; }
.dp-btn.dp-danger { background: #a33226; }
.dp-btn.dp-danger.armed { background: #d84f3c; animation: dp-pulse 1s infinite; }
@keyframes dp-pulse { 50% { transform: scale(1.05); } }

.dp-bigcode {
    font-size: 52px; font-weight: 900; letter-spacing: 14px; color: #f3c75c;
    background: rgba(0,0,0,.3); padding: 10px 18px 10px 32px; border-radius: 18px;
    border: 2px dashed rgba(243,199,92,.6);
}
.dp-lobbylist { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dp-lobbyname { background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; }

.dp-room { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.dp-topbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(0,0,0,.28); }
.dp-codebox { font-size: 13px; white-space: nowrap; }
.dp-codebox b { color: #f3c75c; font-size: 16px; letter-spacing: 3px; }
.dp-players { flex: 1; display: flex; gap: 6px; overflow-x: auto; padding: 2px; }
.dp-chip { display: flex; flex-direction: column; align-items: center; min-width: 64px; background: rgba(255,255,255,.1); border-radius: 10px; padding: 4px 8px; font-size: 11px; line-height: 1.35; }
.dp-chip.me { outline: 2px solid #f3c75c; }
.dp-chip.off { opacity: .45; }
.dp-cname { font-weight: 800; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-cscore { color: #f3c75c; font-weight: 900; font-size: 13px; }
.dp-cnum { opacity: .75; }
.dp-topbtns { display: flex; gap: 6px; }
.dp-mini { padding: 7px 10px; font-size: 12px; font-weight: 700; font-family: inherit; border: none; border-radius: 9px; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; }

.dp-game { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dp-arena { flex: 1; display: grid; min-height: 0; grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr; grid-template-areas: "t t t" "l m r"; }
.dp-seatst { grid-area: t; display: flex; justify-content: center; padding: 2px 4px; min-height: 0; }
.dp-seatsl { grid-area: l; display: flex; align-items: center; padding: 0 2px 0 4px; min-height: 0; }
.dp-seatsr { grid-area: r; display: flex; align-items: center; padding: 0 4px 0 2px; min-height: 0; }
.dp-seat { display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(0,0,0,.3); border-radius: 10px; padding: 4px 10px; font-size: 11px; line-height: 1.3; border: 1px solid rgba(255,255,255,.15); }
.dp-seat.off { opacity: .45; }
.dp-seat.t0 { border-color: #f3c75c; }
.dp-seat.t1 { border-color: #6db3f2; }
.dp-seatst .dp-seat { flex-direction: row; align-items: baseline; gap: 8px; padding: 3px 12px; }
.dp-sname { font-weight: 800; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-sscore { color: #f3c75c; font-weight: 900; font-size: 13px; }
.dp-seat.t1 .dp-sscore { color: #9cc8f7; }
.dp-snum { opacity: .75; }
.dp-passed { background: #d84f3c; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 10px; font-weight: 800; }
.dp-seat.turn { border-color: #f3c75c !important; box-shadow: 0 0 12px rgba(243,199,92,.55); }
.dp-seat.turn .dp-sname { color: #f3c75c; }
.dp-turn { font-size: 11px; font-weight: 700; padding: 2px 12px; border-radius: 999px; background: rgba(0,0,0,.35); color: #cfe3d6; white-space: nowrap; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
.dp-turn.me { background: #f3c75c; color: #14352a; }

.dp-table {
    grid-area: m; display: flex; align-items: center; justify-content: center;
    padding: 4px; min-height: 0; min-width: 0;
    background: radial-gradient(100% 140% at 50% 30%, rgba(255,255,255,.09), rgba(0,0,0,.18));
}
.dp-mid { display: flex; align-items: flex-start; justify-content: center; gap: 6px; max-width: 100%; min-width: 0; width: 100%; }
.dp-table { overflow-y: hidden; overflow-x: hidden; }
.dp-snake { --th: var(--ch, 26px); position: relative; margin: 0 auto; }
.dp-slot { position: absolute; }
.dp-slot .dp-tile { border-radius: 5px; padding: 2px; gap: 2px; }
.dp-zone.dp-zslot { position: absolute; min-width: 24px; min-height: 24px; padding: 0; border-radius: 7px; opacity: 1; border-color: rgba(255,255,255,.3); }
.dp-zneed { font-size: 17px; font-weight: 900; color: rgba(255,255,255,.55); pointer-events: none; }
.dp-zone.armed .dp-zneed { color: #f3c75c; }
.dp-zone.ok { opacity: 1; border-color: #57d977; border-style: solid; background: rgba(87,217,119,.18); box-shadow: 0 0 10px rgba(87,217,119,.45); }
.dp-zone.ok .dp-zneed { color: #57d977; }
.dp-zone.no { opacity: 1; border-color: rgba(255,255,255,.18); }
.dp-zone.no .dp-zneed { color: rgba(255,255,255,.3); text-decoration: line-through; }
.dp-zone {
    min-width: 42px; height: calc(var(--th) * 2 + 12px); min-height: 42px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    border: 2px dashed transparent; border-radius: 12px;
    font-size: 20px; font-weight: 900; color: rgba(255,255,255,.6);
    cursor: pointer; text-align: center; padding: 4px;
    opacity: 0; transition: opacity .12s ease;
}
.dp-zone.show, .dp-zone.armed { opacity: 1; border-color: rgba(255,255,255,.35); }
.dp-zone.armed { border-color: #f3c75c; color: #f3c75c; }
.dp-zone.hot { opacity: 1; background: rgba(243,199,92,.25); border-color: #f3c75c; color: #fff; transform: scale(1.06); }

.dp-tile {
    display: flex; flex-direction: row; align-items: stretch;
    width: calc(var(--th) * 2); height: var(--th); flex: 0 0 auto;
    background: linear-gradient(180deg, #fbf6e9, #e9dfc6);
    border-radius: 7px; border: 1px solid #b7a97f;
    box-shadow: 0 2px 5px rgba(0,0,0,.4);
    padding: 3px; gap: 3px;
    cursor: pointer;
    touch-action: none;
}
.dp-tile.dp-v { flex-direction: column; width: var(--th); height: calc(var(--th) * 2); }
.dp-tile.sel { outline: 3px solid #f3c75c; transform: translateY(-9px); }
.dp-tile.away { opacity: .3; }
.dp-face { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 2px; }
.dp-pip { width: 62%; height: 62%; place-self: center; border-radius: 50%; }
.dp-pip.on { background: #2b2317; box-shadow: inset 0 1px 1px rgba(255,255,255,.25); }
.dp-div { background: #b7a97f; flex: 0 0 1px; }
.dp-tile.dp-v .dp-div { flex: 0 0 1px; }

.dp-rotate { display: none; }
@media (orientation: portrait) {
    .dp-rotate { display: block; text-align: center; font-size: 11px; opacity: .75; padding: 3px 6px 0; }
}

.dp-controls { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(0,0,0,.22); }
.dp-myscore { margin-inline-start: auto; font-size: 14px; font-weight: 800; color: #f3c75c; }

.dp-handwrap { padding: 8px 6px 12px; background: rgba(0,0,0,.3); }
.dp-hand { --th: var(--hf, 30px); display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 6px 4px; justify-content: center; }
.dp-tile.qafpick { outline: 3px solid #f3c75c; animation: dp-pulse 1s infinite; }

.dp-blockbar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 4px 10px; background: rgba(168,50,38,.35); font-size: 13px; font-weight: 800; color: #ffd9d2; }
.dp-fool { background: #d84f3c; animation: dp-pulse 1s infinite; }
.dp-fool2 { background: rgba(255,255,255,.1); color: rgba(255,255,255,.55); border: 1px dashed rgba(255,255,255,.3); }
.dp-fool2.on { background: #d84f3c; color: #fff; border: none; animation: dp-pulse 1s infinite; }
.dp-controls { flex-wrap: wrap; justify-content: center; }
.dp-qafbar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 5px 10px; background: rgba(0,0,0,.3); }
.dp-qafask { font-size: 13px; font-weight: 800; color: #ffe9b0; }
.dp-qafchip { padding: 6px 14px; font-size: 13px; font-weight: 800; font-family: inherit; border: 2px solid #f3c75c; border-radius: 999px; background: rgba(243,199,92,.15); color: #ffe9b0; cursor: pointer; }
.dp-qafchip.on { background: #f3c75c; color: #14352a; }
.dp-qafchip.dp-qafcancel { border-color: rgba(255,255,255,.3); background: transparent; color: #fff; }
.dp-qafhint { font-size: 12px; color: #ffe9b0; opacity: .9; }

.dp-ghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; will-change: transform; transform: translate(-200px, -200px); filter: drop-shadow(0 8px 10px rgba(0,0,0,.5)); }

.dp-toasts { position: absolute; top: 46px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 70; pointer-events: none; }
.dp-toast { background: rgba(20,16,8,.92); border: 1px solid rgba(243,199,92,.5); color: #ffe9b0; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; animation: dp-tin .25s ease-out; }
@keyframes dp-tin { from { opacity: 0; transform: translateY(-8px); } }

.dp-result { font-size: 16px; color: #ffe9b0; font-weight: 700; }
.dp-totals { width: min(300px, 86%); display: flex; flex-direction: column; gap: 6px; }
.dp-trow { display: flex; justify-content: space-between; background: rgba(255,255,255,.1); border-radius: 10px; padding: 8px 14px; font-size: 14px; }
.dp-trow.win { background: rgba(243,199,92,.28); outline: 2px solid #f3c75c; font-weight: 900; }

.dp-teambar { flex: 1; display: flex; gap: 8px; justify-content: center; align-items: center; font-size: 11px; min-width: 0; overflow: hidden; padding: 0 4px; }
.dp-tm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.25); }
.dp-tm b { font-size: 13px; }
.dp-tm.t0 { color: #f3c75c; }
.dp-tm.t1 { color: #9cc8f7; }

.dp-over { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0; overflow-y: auto; padding: 8px 12px; text-align: center; }
.dp-over .dp-hi { font-size: 18px; }
.dp-over .dp-result { font-size: 14px; }
.dp-reveal { display: flex; flex-direction: column; gap: 4px; width: min(540px, 98%); }
.dp-rrow { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border-radius: 10px; padding: 4px 10px; font-size: 12px; }
.dp-rrow.win { background: rgba(243,199,92,.25); outline: 1px solid #f3c75c; }
.dp-rrow.t0 { border-inline-start: 3px solid #f3c75c; }
.dp-rrow.t1 { border-inline-start: 3px solid #6db3f2; }
.dp-rname { font-weight: 800; min-width: 52px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.dp-rhand { --th: 15px; flex: 1; display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.dp-rhand .dp-tile { border-radius: 3px; padding: 1px; gap: 1px; box-shadow: none; }
.dp-rempty { opacity: .8; font-size: 11px; }
.dp-rtotal { font-weight: 900; color: #f3c75c; min-width: 24px; text-align: center; }

.dp-room[data-port='1'] .dp-arena { grid-template-columns: 1fr; grid-template-rows: auto 1fr; grid-template-areas: "t" "m"; position: relative; }
.dp-room[data-port='1'] .dp-seatsl { position: absolute; top: 32px; left: 4px; z-index: 6; padding: 0; }
.dp-room[data-port='1'] .dp-seatsr { position: absolute; top: 32px; right: 4px; z-index: 6; padding: 0; }
.dp-room[data-port='1'] .dp-seat { font-size: 10px; padding: 3px 7px; background: rgba(0,0,0,.45); }
.dp-room[data-port='1'] .dp-table { align-items: flex-start; padding-top: 58px; }

@media (max-height: 420px) {
    .dp-logo { font-size: 32px; }
    .dp-center { gap: 9px; padding: 12px; }
    .dp-toasts { top: 40px; }
}

@media (max-height: 345px) {
    .dp-root { --th: clamp(24px, 9.2dvh, 34px); }
    .dp-topbar { padding: 3px 8px; gap: 6px; }
    .dp-chip { font-size: 10px; padding: 2px 6px; min-width: 54px; line-height: 1.25; }
    .dp-cscore { font-size: 11px; }
    .dp-codebox { font-size: 11px; }
    .dp-codebox b { font-size: 13px; }
    .dp-mini { padding: 5px 8px; font-size: 11px; }
    .dp-table { padding: 4px 6px; }
    .dp-zone { min-height: 42px; min-width: 38px; font-size: 16px; }
    .dp-controls { padding: 3px 8px; }
    .dp-btn.dp-sm2 { padding: 6px 12px; font-size: 12px; }
    .dp-myscore { font-size: 12px; }
    .dp-handwrap { padding: 3px 4px 5px; }
    .dp-hand { padding: 7px 4px 2px; gap: 5px; }
    .dp-toasts { top: 34px; }
    .dp-seat { font-size: 10px; padding: 3px 8px; }
    .dp-seatst .dp-seat { padding: 2px 10px; }
    .dp-sscore { font-size: 11px; }
    .dp-sname { max-width: 70px; }
    .dp-passed { font-size: 9px; padding: 0 6px; }
}

.dp-seg { display: flex; gap: 6px; justify-content: center; }
.dp-segb { padding: 8px 18px; font-size: 14px; font-weight: 800; font-family: inherit; border: 2px solid rgba(255,255,255,.25); border-radius: 11px; background: rgba(0,0,0,.25); color: #fff; cursor: pointer; }
.dp-segb.on { border-color: #f3c75c; background: rgba(243,199,92,.22); color: #ffe9b0; }

.dp-linkbox{width:88%;max-width:340px;padding:10px;margin:6px auto;border-radius:10px;border:1px solid #888;background:#fff;color:#111;font-size:15px;text-align:center;user-select:text;-webkit-user-select:text}

.dp-handwrap{position:relative}
.dp-flipbtn{margin-inline-start:auto;padding:7px 12px;border-radius:16px;border:0;background:#f3c75c;color:#2a1c00;font-weight:700;font-size:13px;font-family:inherit}
.dp-tile.sel{z-index:10;position:relative}
.dp-tile.lift{z-index:20;position:relative;transform:translateY(-14px) scale(1.18);box-shadow:0 8px 16px rgba(0,0,0,.55);outline:3px solid #f3c75c}

@media (orientation: landscape) and (max-height: 500px) {
    .dp-center { justify-content: flex-start; overflow-y: auto; gap: 6px; padding: 8px 12px; min-height: 0; }
    .dp-bigcode { font-size: 30px !important; padding: 2px 18px !important; letter-spacing: 6px; }
    .dp-hi { font-size: 16px !important; }
    .dp-center .dp-btn { padding: 7px 16px; font-size: 14px; }
    .dp-linkbox { margin: 2px auto; padding: 6px; font-size: 13px; }
}

@media (orientation: landscape) and (max-height: 500px) {
    .dp-bottom { display: flex; flex-direction: row; direction: ltr; align-items: stretch; background: rgba(0,0,0,.3); }
    .dp-bottom .dp-controls { direction: rtl; flex: 0 0 270px; flex-wrap: wrap; align-content: center; justify-content: center; gap: 5px; padding: 4px 8px; background: transparent; }
    .dp-bottom .dp-btn.dp-sm2 { padding: 7px 10px; font-size: 12px; }
    .dp-bottom .dp-handwrap { flex: 1; display: flex; align-items: center; justify-content: center; background: transparent; padding: 4px 6px; }
    .dp-bottom .dp-hand { padding: 12px 2px 2px; gap: 5px; }
    .dp-bottom .dp-myscore { flex: 1 0 100%; text-align: center; margin: 0; }
    .dp-bottom .dp-flipbtn { margin: 0 auto; }
}

html, body, #root { height: var(--vh, 100dvh) !important; }
.dp-handwrap { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
@media (orientation: landscape) and (max-height: 330px) {
    .dp-topbar { padding: 2px 8px; gap: 5px; }
    .dp-topbar .dp-mini { padding: 3px 8px; font-size: 10px; }
    .dp-chip { padding: 1px 6px; min-width: 46px; font-size: 9px; }
    .dp-turn { font-size: 10px; padding: 1px 8px; }
    .dp-seat { font-size: 9px; padding: 2px 6px; }
    .dp-bottom .dp-controls { flex: 0 0 240px; gap: 4px; padding: 2px 6px; }
    .dp-bottom .dp-btn.dp-sm2 { padding: 5px 8px; font-size: 11px; }
    .dp-bottom .dp-handwrap { padding: 2px 4px calc(4px + env(safe-area-inset-bottom, 0px)); }
    .dp-bottom .dp-hand { padding: 8px 2px 1px; gap: 4px; }
    .dp-center { gap: 4px; padding: 4px 10px; }
    .dp-bigcode { font-size: 24px !important; }
}

.dp-topbar { padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
@media (orientation: landscape) { .dp-room, .dp-center { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); } }

/* friends panel */
.dp-fback { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 14px; }
.dp-fpanel { background: #0e3b2e; border: 1px solid #1e5c49; border-radius: 14px; padding: 14px; width: 100%; max-width: 340px; max-height: 86vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.dp-fhead { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 17px; color: #f3d27a; }
.dp-fsec { font-size: 13px; color: #9fc7b6; margin-top: 6px; }
.dp-frow { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #0a2f25; border-radius: 9px; padding: 7px 10px; font-size: 14px; }
.dp-facts { display: flex; gap: 6px; }
.dp-fsearch { flex: 1; min-width: 0; margin: 0; }
.dp-mini-gold { background: #c9a23f; color: #1c1503; border-color: #c9a23f; }
.dp-friends { position: relative; }
.dp-fbadge { position: absolute; top: -6px; left: -6px; background: #d33; color: #fff; border-radius: 50%; min-width: 18px; height: 18px; font-size: 11px; line-height: 18px; text-align: center; padding: 0 4px; }
.dp-voicen { font-size: 11px; color: #8fd9b6; align-self: center; }

/* stickers */
.dp-stikwrap { position: fixed; left: 0; right: 0; top: 52px; z-index: 91; display: flex; justify-content: center; pointer-events: none; }
.dp-stikpanel { background: #0e3b2e; border: 1px solid #1e5c49; border-radius: 14px; padding: 12px; width: calc(100% - 28px); max-width: 320px; max-height: 58vh; overflow-y: auto; pointer-events: auto; }
.dp-stikgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; direction: rtl; }
.dp-stikbtn { background: #0a2f25; border: 1px solid transparent; border-radius: 10px; padding: 4px; cursor: pointer; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.dp-stikbtn:active { border-color: #c9a23f; }
.dp-stikbtn img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px; aspect-ratio: 1; }
.dp-stickerpop { position: fixed; right: 10px; top: 54px; display: flex; flex-direction: column; align-items: center; pointer-events: none; z-index: 95; animation: dpstik 3s forwards; }
.dp-stickerpop img { width: clamp(96px, 23vw, 170px); height: clamp(96px, 23vw, 170px); object-fit: cover; border-radius: 14px; border: 2px solid rgba(255,255,255,.25); filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.dp-stickerfrom { margin-top: 5px; background: rgba(0,0,0,.65); color: #fff; border-radius: 12px; padding: 2px 8px; font-size: 12px; max-width: clamp(96px, 23vw, 170px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes dpstik { 0% { opacity: 0; transform: scale(.4); } 8% { opacity: 1; transform: scale(1.05); } 14% { transform: scale(1); } 82% { opacity: 1; } 100% { opacity: 0; } }
.dp-offnote { background: rgba(243,199,92,.12); border: 1px solid rgba(243,199,92,.45); color: #f3d27a; border-radius: 10px; padding: 8px 12px; font-size: 14px; max-width: 320px; }

/* ---- games hub ---- */
.dp-backhub { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 5; }
.dp-games { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(430px, 94%); }
.dp-game {
    border: 2px solid rgba(255,255,255,.22);
    background: rgba(0,0,0,.28);
    border-radius: 18px;
    padding: 18px 12px;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    display: flex; flex-direction: column; gap: 6px; align-items: center;
    box-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.dp-game:active { transform: translateY(1px); }
.dp-game:disabled { opacity: .45; cursor: default; }
.dp-game:not(:disabled) { border-color: rgba(243,199,92,.55); }
.dp-gname { font-size: 21px; font-weight: 900; color: #f3c75c; }
.dp-gdesc { font-size: 12px; opacity: .85; line-height: 1.5; }

/* ---- block blast ---- */
.bb-root { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; padding: 6px; gap: 8px; }
.bb-head { display: flex; align-items: center; gap: 10px; width: min(94vw, 480px); }
.bb-title { font-weight: 900; color: #f3c75c; font-size: 18px; }
.bb-scorewrap { margin-inline-start: auto; text-align: center; line-height: 1.2; }
.bb-score { font-size: 22px; font-weight: 900; color: #f3c75c; }
.bb-best { font-size: 11px; opacity: .8; }
.bb-combo { font-size: 14px; font-weight: 900; color: #ffd98a; animation: dp-pulse 1s infinite; }
.bb-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    width: min(94vw, 480px, calc(100dvh - 210px));
    aspect-ratio: 1;
    background: rgba(0,0,0,.35);
    padding: 5px;
    border-radius: 12px;
    touch-action: none;
}
.bb-cell { border-radius: 4px; background: rgba(255,255,255,.07); }
.bb-cell.bb-prev-ok { outline: 2px solid rgba(255,255,255,.75); outline-offset: -2px; filter: brightness(1.35); }
.bb-cell.bb-prev-bad { outline: 2px solid rgba(216,79,60,.9); outline-offset: -2px; }
.bb-cell.bb-flash { animation: bb-flash .45s ease-out; }
@keyframes bb-flash { 0% { background: #fff; } 100% { background: rgba(255,255,255,.07); } }
.bbc1 { background: #e74c3c; }
.bbc2 { background: #f39c12; }
.bbc3 { background: #f1c40f; }
.bbc4 { background: #2ecc71; }
.bbc5 { background: #3498db; }
.bbc6 { background: #9b59b6; }
.bbc7 { background: #17a2b8; }
.bb-tray { display: flex; gap: 10px; justify-content: center; width: min(94vw, 480px); min-height: 74px; }
.bb-slot {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.22);
    border-radius: 12px;
    padding: 8px 4px;
    touch-action: none;
    cursor: grab;
}
.bb-slot.sel { outline: 3px solid #f3c75c; }
.bb-slot.held { opacity: .35; }
.bb-slot.nofit { opacity: .35; filter: grayscale(.7); }
.bb-slot.empty { background: transparent; cursor: default; }
.bb-mini { position: absolute; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.bb-ghost { position: fixed; z-index: 60; pointer-events: none; opacity: .92; }
.bb-ghost .bb-mini { border-radius: 4px; }
.bb-over {
    position: absolute; inset: 0; z-index: 70;
    background: rgba(0,0,0,.6);
    display: flex; align-items: center; justify-content: center;
}
.bb-overcard {
    background: #0d5238;
    border: 2px solid rgba(243,199,92,.55);
    border-radius: 20px;
    padding: 26px 30px;
    display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.bb-final { font-size: 44px; font-weight: 900; color: #f3c75c; }

/* ---- hub theme (name/hub/block blast): deliberately NOT the domino look ---- */
.hub-theme { background: linear-gradient(160deg, #16162e 0%, #241d5c 55%, #5b1b8f 100%); }
.hub-theme .dp-logo { color: #58d5ff; text-shadow: 0 2px 14px rgba(88,213,255,.4); }
.hub-theme .dp-btn.dp-gold { background: linear-gradient(180deg, #58d5ff, #2b8fd6); color: #06283c; }
.hub-theme .dp-input:focus { border-color: #58d5ff; }
.hub-theme .dp-game:not(:disabled) { border-color: rgba(88,213,255,.6); background: rgba(255,255,255,.05); }
.hub-theme .dp-gname { color: #58d5ff; }
.hub-theme .bb-title { color: #58d5ff; }
.hub-theme .bb-score { color: #58d5ff; }
.hub-theme .bb-combo { color: #9be2ff; }
.hub-theme .bb-overcard { background: #241d5c; border-color: rgba(88,213,255,.55); }
.hub-theme .bb-final { color: #58d5ff; }
.hub-theme .dp-bigcode { color: #58d5ff; border-color: rgba(88,213,255,.6); }
.hub-theme .dp-codebox b { color: #58d5ff; }

/* rejected placement flash */
.bb-slot.reject { animation: bb-reject .35s; }
@keyframes bb-reject { 0%, 100% { outline: none; } 50% { outline: 3px solid #d84f3c; } }

/* UNO */
.un-root{display:flex;flex-direction:column;height:100%;gap:6px;padding:8px;color:#fff;overflow:hidden}
.un-head{display:flex;align-items:center;gap:10px}
.un-title{font-size:22px;font-weight:bold;color:#ff6b5e}
.un-scores{display:flex;gap:10px;font-size:13px;opacity:.9;flex-wrap:wrap}
.un-sc.turn{color:#ffd76a}
.un-others{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.un-opp{background:#ffffff14;border-radius:12px;padding:6px 12px;text-align:center;min-width:80px}
.un-opp.turn{outline:2px solid #ffd76a}
.un-opp.uno{outline:2px solid #ff6b5e}
.un-oname{font-size:13px;font-weight:bold}
.un-ocount{font-size:12px;opacity:.8}
.un-table{flex:1;display:flex;align-items:center;justify-content:center;gap:18px;min-height:120px}
.un-deck{font-size:56px;cursor:pointer;position:relative;border-radius:10px;padding:4px 10px;user-select:none}
.un-deck.can{outline:3px solid #ffd76a;animation:unpulse 1s infinite}
@keyframes unpulse{50%{transform:scale(1.05)}}
.un-deckn{position:absolute;bottom:2px;left:50%;transform:translateX(-50%);font-size:12px;background:#0009;border-radius:8px;padding:0 6px}
.un-mid{display:flex;flex-direction:column;align-items:center;gap:6px}
.un-curdot{width:26px;height:26px;border-radius:50%;border:3px solid #fff8}
.un-dir{font-size:26px}
.un-card{width:56px;height:84px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-weight:bold;font-size:22px;color:#fff;background:#333;border:2px solid #ffffff55;box-shadow:0 2px 6px #0008;user-select:none;flex:none}
.un-card.big{width:72px;height:108px;font-size:30px}
.un-cv{text-shadow:0 1px 3px #0009}
.unc-r{background:#d63c2e}.unc-g{background:#2a9d4e}.unc-b{background:#2673c9}.unc-y{background:#e6b800;color:#4a3500}.unc-w{background:linear-gradient(135deg,#d63c2e 25%,#2a9d4e 25%,#2a9d4e 50%,#2673c9 50%,#2673c9 75%,#e6b800 75%);color:#fff}
.un-log{text-align:center;font-size:13px;min-height:18px;opacity:.9}
.un-drawnnote{text-align:center;font-size:13px;color:#ffd76a}
.un-actions{display:flex;gap:8px;justify-content:center;min-height:38px}
.un-uno{background:#d63c2e !important;font-size:18px;font-weight:bold}
.un-uno.said{opacity:.6}
.un-hand{display:flex;gap:4px;overflow-x:auto;padding:8px 4px 12px;direction:ltr;justify-content:flex-start}
.un-mycard{flex:none;transition:transform .12s}
.un-mycard.can .un-card{transform:translateY(-14px);border-color:#ffd76a;cursor:pointer}
.un-mycard.drawn .un-card{outline:3px solid #ffd76a}
.un-colors{display:flex;gap:10px;justify-content:center;margin:10px 0}
.un-colorbtn{width:64px;height:64px;border-radius:14px;border:3px solid #fff8;font-weight:bold;color:#fff;font-size:14px;cursor:pointer}
.un-overcard{text-align:center;min-width:260px}
.un-scores2{margin:10px 0;font-size:15px;line-height:1.7}
