/* TigoMeNote · pages/tigo.css (app/tigo.html) — si Tigo: 3D na stage (lakad, joystick, full screen) + alaga + closet + laro + journey + kaibigang malapit */
.tg-layout { display: grid; gap: 16px; }
@media (min-width: 1000px) { .tg-layout { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; } .tg-side { position: sticky; top: 24px; } }

/* ---------- stage ---------- */
.tg-stage {
  position: relative; border-radius: 28px; overflow: hidden; height: min(62vh, 620px); min-height: 360px;
  background: radial-gradient(120% 90% at 50% 0%, #d7f0ff 0%, #b9e1ff 45%, #fde6d2 100%);
  box-shadow: var(--shadow-md); isolation: isolate; transition: background .6s;
}
.tg-stage.night { background: radial-gradient(120% 90% at 50% 0%, #2a2f5a 0%, #1a1d3a 55%, #0f1024 100%); }
.tg-stage.night::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(1.5px 1.5px at 20% 20%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 70% 12%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 40% 35%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 85% 30%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 10% 45%, #fff 50%, transparent 51%); opacity: .8; }
.tg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }
.tg-fallback { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.tg-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.tg-top-r { display: inline-flex; gap: 8px; align-items: center; }
.tg-name, .tg-mood, .tg-pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.82); color: #1b1b1f; font: inherit; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.tg-name, .tg-pill { cursor: pointer; }
.tg-name, .tg-mood, .tg-pill { white-space: nowrap; }
@media (max-width: 480px) { .tg-mood-t { display: none; } .tg-name, .tg-mood, .tg-pill { padding: 7px 11px; } }
.tg-pill b { font-variant-numeric: tabular-nums; }
.tg-name b { font-family: var(--font-display); font-size: 17px; }
.tg-lvl { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #ff5a36; color: #fff; }
.tg-xp { position: absolute; top: 62px; left: 18px; width: 150px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.55); overflow: hidden; }
.tg-xp span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffc04d, #ff5a36); transition: width .6s var(--ease); }
.tg-toast { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 12px); padding: 10px 16px; border-radius: 999px; background: rgba(20,20,24,.82);
  color: #fff; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; }
.tg-toast.show { animation: tg-toast 2.8s ease forwards; }
@keyframes tg-toast { 0% { opacity: 0; transform: translate(-50%, 12px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }

/* ---------- stats + actions ---------- */
.tg-side { display: grid; gap: 14px; }
.tg-side > [hidden] { display: none !important; }
.tg-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.tg-stat { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; }
.tg-bar { height: 10px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.tg-bar i { display: block; height: 100%; border-radius: 10px; transition: width .6s var(--ease); background: linear-gradient(90deg, #3dd6c0, #2bb3a3); }
.tg-stat[data-s="joy"] .tg-bar i { background: linear-gradient(90deg, #ff9ec7, #f06aa7); }
.tg-stat[data-s="energy"] .tg-bar i { background: linear-gradient(90deg, #ffd166, #f4a91f); }
.tg-stat[data-s="clean"] .tg-bar i { background: linear-gradient(90deg, #7cc4ff, #4a9fe8); }
.tg-stat.low .tg-bar i { background: linear-gradient(90deg, #ff7a59, #e8264f); animation: tg-low 1.2s ease-in-out infinite; }
@keyframes tg-low { 50% { opacity: .55; } }
.tg-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tg-more { grid-template-columns: repeat(4, 1fr); }
.tg-more .tg-act { grid-auto-flow: column; justify-content: center; align-items: center; gap: 6px; padding: 10px 4px; font-size: 13px; }
@media (max-width: 420px) { .tg-more .tg-act { grid-auto-flow: row; gap: 2px; } }
.tg-more .tg-act span { font-size: 22px; }
.tg-act { display: grid; justify-items: center; gap: 4px; padding: 12px 4px 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.tg-act span { font-size: 26px; line-height: 1; }
.tg-act:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tg-act:active:not(:disabled) { transform: scale(.95); }
.tg-act:disabled { opacity: .45; cursor: default; }
html.has-bg .tg-act { background: color-mix(in srgb, var(--surface) var(--look-panel, 88%), transparent); backdrop-filter: blur(10px); }

/* ---------- kaibigan ---------- */
.tg-near { display: grid; gap: 10px; }
.tg-near-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.tg-near-head h3, .tg-visits h3 { margin: 0 0 2px; font-size: 16px; }
.tg-near-head p { margin: 0; }
.tg-near-note { margin: 0; }
.tg-near-list, #visits { display: grid; gap: 8px; }
.tg-friend { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); background: var(--surface-2); }
.tg-friend-main { flex: 1; min-width: 0; display: grid; }
.tg-friend-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-dot { width: 14px; height: 14px; border-radius: 5px; flex: none; }
.tg-visits { display: grid; gap: 8px; }

/* ---------- sheets ---------- */
.tg-snacks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tg-snacks button { display: grid; justify-items: center; gap: 4px; padding: 14px 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.tg-snacks button span { font-size: 32px; }
.tg-style { display: grid; gap: 12px; }
.tg-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.tg-color { width: 38px; height: 38px; border-radius: 12px; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.tg-color.on { border-color: var(--ink); }
.tg-gear { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-gear .chip:disabled { opacity: .5; }

/* ---------- game HUD: menu (dock), mini stats, joystick, game buttons, sheet ----------
   .ui-game = phone/tablet (lahat ng function ay nasa loob ng laro). .game = landscape sa phone o Full screen (buong screen na laro).
   Ayos (walang patong): itaas-kaliwa = pangalan + XP + mini stats; itaas-kanan = coins + mood; ilalim ng mga ito = menu (dock);
   kaliwa-ibaba = joystick; kanan-ibaba = Jump, Run, Stop, Camera; gitna-itaas = sabay na galaw / gamit na napili; gitna = toast. */
.tg-mini { display: none; position: absolute; top: 70px; left: 18px; gap: 8px; z-index: 2; pointer-events: none; }
.tg-mini span { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; padding: 3px 7px 3px 5px; border-radius: 999px; background: rgba(255,255,255,.78); }
.tg-mini i { display: block; width: 34px; height: 6px; border-radius: 6px; background: rgba(0,0,0,.12); overflow: hidden; }
.tg-mini b { display: block; height: 100%; width: 0; border-radius: 6px; background: #2bb3a3; transition: width .6s; }
.tg-mini [data-s="joy"] b { background: #f06aa7; } .tg-mini [data-s="energy"] b { background: #f4a91f; } .tg-mini [data-s="clean"] b { background: #4a9fe8; }
.tg-mini span.low b { background: #e8264f; }
.tg-stage.ui-game .tg-mini { display: flex; }

.tg-dock { position: absolute; top: 70px; right: 14px; z-index: 3; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 28px); }
.tg-stage.ui-game .tg-dock { top: 104px; left: 14px; right: auto; }
.tg-dock-acts, .tg-dock-ctx { display: flex; gap: 6px; }
.tg-dock-acts { overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tg-dock-acts::-webkit-scrollbar { display: none; }
.tg-dock-ctx:empty { display: none; }
.tg-dbtn { flex: none; display: grid; justify-items: center; align-content: center; width: 46px; height: 46px; padding: 0; border-radius: 14px; border: 0; background: rgba(255,255,255,.86); color: #1b1b1f;
  font: inherit; font-size: 19px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.tg-dbtn small { font-size: 9px; font-weight: 700; margin-top: 2px; }
.tg-dbtn:active { transform: scale(.92); }
.tg-dbtn:disabled { opacity: .45; }
.tg-dbtn.go { background: #ff5a36; color: #fff; }
.tg-dbtn.wide, .tg-stage.game .tg-dbtn.wide { width: auto; padding: 0 12px; grid-auto-flow: column; gap: 6px; font-size: 14px; font-weight: 700; white-space: nowrap; }
/* Desktop: may side panel na; ang menu sa loob ng laro ay mga pang-laro lang */
.tg-stage:not(.ui-game) .tg-dbtn[data-a] { display: none; }
.tg-stage:not(.ui-game) .tg-dock-min { display: none; }
.tg-dock-min { flex: none; width: 30px; height: 46px; border-radius: 12px; border: 0; background: rgba(20,20,24,.55); color: #fff; font-size: 18px; cursor: pointer; }
.tg-stage.dock-min .tg-dock-acts { display: none; }
.tg-stage.dock-min .tg-dock-min { transform: scaleX(-1); }
.tg-stage:not(.live) .tg-dock { display: none; }

/* joystick (parang D-pad) */
.tg-pad { position: absolute; left: 18px; bottom: 18px; display: none; z-index: 2; touch-action: none; user-select: none; -webkit-user-select: none;
  width: 116px; height: 116px; border-radius: 50%; background: rgba(255,255,255,.3); border: 2px solid rgba(255,255,255,.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); place-items: center; }
.tg-pad .knob { width: 50px; height: 50px; border-radius: 16px; background: rgba(255,255,255,.95); box-shadow: 0 4px 12px rgba(0,0,0,.2); transition: transform .06s; }
.tg-pad .ar { position: absolute; width: 0; height: 0; border: 7px solid transparent; opacity: .85; pointer-events: none; }
.tg-pad .ar.u { top: 7px; left: 50%; margin-left: -7px; border-bottom-color: #fff; border-top: 0; }
.tg-pad .ar.d { bottom: 7px; left: 50%; margin-left: -7px; border-top-color: #fff; border-bottom: 0; }
.tg-pad .ar.l { left: 7px; top: 50%; margin-top: -7px; border-right-color: #fff; border-left: 0; }
.tg-pad .ar.r { right: 7px; top: 50%; margin-top: -7px; border-left-color: #fff; border-right: 0; }

/* game buttons (kanan-ibaba) */
.tg-btns { position: absolute; right: 18px; bottom: 18px; z-index: 2; display: none; gap: 8px; align-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.tg-stage.live .tg-btns { display: flex; }
.tg-gbtn, .tg-jump { border: 0; border-radius: 50%; display: grid; place-items: center; align-content: center; cursor: pointer; font: inherit; line-height: 1; }
.tg-gbtn { width: 46px; height: 46px; background: rgba(255,255,255,.88); color: #1b1b1f; font-size: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.tg-gbtn small { font-size: 9px; font-weight: 800; margin-top: 1px; }
.tg-run.on { background: #3dd6c0; color: #fff; box-shadow: 0 0 0 4px rgba(61,214,192,.35); }
.tg-jump { width: 56px; height: 56px; background: #ff5a36; color: #fff; font-size: 26px; font-weight: 800; box-shadow: 0 6px 16px rgba(255,90,54,.45); }
.tg-gbtn:active, .tg-jump:active { transform: scale(.92); }
/* Desktop: Space = talon, Shift = takbo; camera button lang ang kailangan */
.tg-stage:not(.ui-game) .tg-run, .tg-stage:not(.ui-game) .tg-stop, .tg-stage:not(.ui-game) .tg-jump { display: none; }
.tg-stage.ui-game.live .tg-pad { display: grid; }
.tg-stage.ui-game .tg-btns { display: block; width: 158px; height: 150px; right: 14px; bottom: 14px; }
.tg-stage.ui-game .tg-btns > * { position: absolute; }
.tg-stage.ui-game .tg-jump { right: 4px; bottom: 4px; width: 68px; height: 68px; font-size: 30px; }
.tg-stage.ui-game .tg-run { right: 84px; bottom: 6px; width: 54px; height: 54px; }
.tg-stage.ui-game .tg-stop { right: 10px; bottom: 84px; width: 54px; height: 54px; }
.tg-stage.ui-game .tg-cam { right: 84px; bottom: 82px; width: 48px; height: 48px; }

/* sa loob ng bahay: Run/Stop → 🪑 Sit at 🛏️ Sleep; ang Jump ay nagiging ⬆ Tayo kapag nakaupo/nakahiga */
.tg-sit, .tg-bed { display: none !important; }
.tg-stage.in-room .tg-run, .tg-stage.in-room .tg-stop { display: none !important; }
.tg-stage.in-room .tg-sit, .tg-stage.in-room .tg-bed { display: grid !important; }
.tg-stage.ui-game .tg-sit { right: 84px; bottom: 6px; width: 54px; height: 54px; }
.tg-stage.ui-game .tg-bed { right: 10px; bottom: 84px; width: 54px; height: 54px; }
.tg-stage:not(.ui-game).in-room .tg-btns { gap: 8px; }
.tg-stage.pose-sit .tg-sit, .tg-stage.pose-bed .tg-bed { background: #3dd6c0; color: #fff; }
.tg-stage.pose-sit .tg-jump, .tg-stage.pose-bed .tg-jump { font-size: 15px !important; font-weight: 800; background: #2bb3a3; box-shadow: 0 6px 16px rgba(43,179,163,.45); }
.tg-stage:not(.ui-game).pose-sit .tg-jump, .tg-stage:not(.ui-game).pose-bed .tg-jump { display: grid !important; width: auto; padding: 0 16px; border-radius: 999px; }

/* laki ni Tigo: patayong bar na may kulay (parang status bars); hila pataas = mas malaki */
.tg-size { position: absolute; left: 22px; bottom: 156px; z-index: 2; display: grid; justify-items: center; gap: 4px; padding: 6px 5px; border-radius: 999px;
  background: rgba(255,255,255,.78); box-shadow: 0 2px 10px rgba(0,0,0,.1); touch-action: none; user-select: none; -webkit-user-select: none; cursor: ns-resize; }
.tg-size-ic { font-size: 12px; font-weight: 800; line-height: 1; color: #1b1b1f; opacity: .7; }
.tg-size-track { position: relative; width: 10px; height: 110px; border-radius: 10px; background: rgba(0,0,0,.12); overflow: visible; }
.tg-size-fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 10px; background: linear-gradient(0deg, #3dd6c0, #ffc04d 55%, #ff5a36); }
.tg-size-thumb { position: absolute; left: 50%; width: 22px; height: 22px; margin: 0 0 -11px -11px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.28); border: 3px solid #ff5a36; }
.tg-size:focus-visible { outline: 3px solid #ff5a36; }
.tg-stage:not(.live) .tg-size, .tg-stage.playing .tg-size, .tg-stage.sheet-open:not(:has(.tg-sheet.min)) .tg-size { display: none; }
.tg-stage:not(.ui-game) .tg-size { bottom: 18px; }
.tg-stage.game .tg-size { left: max(24px, env(safe-area-inset-left)); bottom: 150px; }
@media (orientation: landscape) and (max-height: 520px) { .tg-stage.game .tg-size { bottom: 146px; } .tg-stage.game .tg-size-track { height: 64px; } .tg-stage.game .tg-size-ic { display: none; } }

/* bahay: Go inside / Go outside / Decorate ay nasa menu (dock); ang napiling gamit ay nasa itaas-gitna */
.tg-room-bar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 14px; border-radius: 20px;
  background: rgba(255,255,255,.92); box-shadow: 0 6px 18px rgba(0,0,0,.16); color: #1b1b1f; max-width: calc(100% - 28px); }
.tg-room-bar b { font-size: 13.5px; margin-right: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-room-bar button { display: grid; justify-items: center; min-width: 50px; padding: 4px 6px; border: 0; border-radius: 12px; background: transparent; color: inherit; font: inherit; font-size: 20px; line-height: 1.1; cursor: pointer; }
.tg-room-bar button small { font-size: 10.5px; font-weight: 700; }
.tg-room-bar button:hover { background: #ffe3d9; }
.tg-decor-tip { margin: -4px 0 0; }
.tg-save { margin-left: auto; white-space: nowrap; font-size: 12px; }
.tg-decor .tg-coins { white-space: nowrap; }
.tg-decor .tg-cl-head h3 { flex: none; }
.tg-item.tg-swatch .tg-ic { width: 40px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--sw); font-size: 20px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.1); }

/* sabay na galaw (kasama ang kaibigan) */
.tg-together { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; border-radius: 20px; z-index: 2;
  background: rgba(255,255,255,.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.tg-together button { display: grid; justify-items: center; gap: 1px; min-width: 52px; padding: 6px 4px; border: 0; border-radius: 14px; background: transparent; color: #1b1b1f; font: inherit; font-size: 22px; line-height: 1.1; cursor: pointer; }
.tg-together button small { font-size: 10.5px; font-weight: 700; }
.tg-together button:hover, .tg-together button.on { background: #ffe3d9; }
.tg-together button:disabled { opacity: .45; }
.tg-stage.playing .tg-together, .tg-stage.playing .tg-dock, .tg-stage.playing .tg-mini, .tg-stage.playing .tg-cam, .tg-stage.playing .tg-run, .tg-stage.playing .tg-stop { display: none !important; }
.tg-stage:has(.tg-together:not(.hidden)) .tg-toast { bottom: 96px; }

/* phone: lahat nasa loob ng laro */
.tg-stage.ui-game .tg-together, .tg-stage.ui-game .tg-room-bar { top: 160px; bottom: auto; }
.tg-stage.ui-game .tg-together button { min-width: 44px; font-size: 20px; }
.tg-stage.ui-game .tg-toast { top: 216px; bottom: auto !important; }
.tg-stage.ui-game .tg-hud { top: 104px; gap: 5px; } .tg-stage.ui-game .tg-hud span { padding: 6px 10px; font-size: 13.5px; }
.tg-page:has(.tg-stage.ui-game) .tg-side > .tg-stats, .tg-page:has(.tg-stage.ui-game) .tg-side > .tg-actions { display: none !important; }
@media (max-width: 999px), (pointer: coarse) {
  .tg-stage { height: max(520px, calc(100dvh - var(--topbar-h) - var(--tabbar-h) - 28px)); min-height: 0; }
}

/* buong screen na laro: landscape sa phone / APK, o Full screen */
.tg-stage.game, .tg-stage.full { position: fixed; inset: 0; z-index: 70; height: auto; min-height: 0; border-radius: 0; }
body.tg-full, body.tg-game { overflow: hidden; }
.tg-stage.game .tg-top, .tg-stage.full .tg-top { top: max(10px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); }
.tg-stage.game .tg-xp { top: 56px; left: max(18px, env(safe-area-inset-left)); }
.tg-stage.game .tg-mini { top: 66px; left: max(18px, env(safe-area-inset-left)); }
.tg-stage.game .tg-dock { top: 96px; left: max(14px, env(safe-area-inset-left)); }
.tg-stage.game .tg-pad { left: max(22px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); }
.tg-stage.game .tg-btns { right: max(14px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
.tg-stage.game .tg-together, .tg-stage.game .tg-room-bar { top: 150px; }
.tg-stage.game .tg-toast { top: 46%; bottom: auto !important; }
/* landscape: mababa ang screen → maliit nang kaunti */
@media (orientation: landscape) and (max-height: 520px) {
  .tg-stage.game .tg-name, .tg-stage.game .tg-mood, .tg-stage.game .tg-pill { padding: 5px 11px; }
  .tg-stage.game .tg-dbtn { width: 40px; height: 40px; font-size: 17px; }
  .tg-stage.game .tg-dbtn small { display: none; }
  .tg-stage.game .tg-dock-min { height: 40px; }
  .tg-stage.game .tg-dock { top: 84px; }
  .tg-stage.game .tg-together, .tg-stage.game .tg-room-bar { top: 132px; }
  .tg-stage.game .tg-mini { top: 60px; } .tg-stage.game .tg-xp { top: 52px; }
}

/* sheet (Closet, Decorate) sa loob ng laro; ▾ = i-minimize para makapaglaro habang bukas */
.tg-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; height: 58%; display: grid; grid-template-rows: auto 1fr; background: var(--surface, #fff); color: var(--text);
  border-radius: 22px 22px 0 0; box-shadow: 0 -8px 28px rgba(0,0,0,.25); }
.tg-sheet-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px 6px 16px; }
.tg-sheet-head b { flex: 1; font-size: 15px; }
.tg-sheet-head button { width: 36px; height: 36px; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--text); font-size: 16px; cursor: pointer; }
.tg-sheet-body { overflow: auto; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); }
.tg-sheet-body > .card { border: 0; box-shadow: none; padding: 4px; background: transparent; }
.tg-sheet-body .tg-cl-body { max-height: none; }
.tg-sheet-body .tg-cl-head .btn[data-close], .tg-sheet-body .tg-cl-head h3 { display: none; } /* ✕ at title ng sheet ang gamit */
.tg-stage.sheet-open .tg-pad, .tg-stage.sheet-open .tg-btns, .tg-stage.sheet-open .tg-together { display: none !important; }
.tg-stage.sheet-open .tg-room-bar { top: auto; bottom: calc(58% + 10px); }
.tg-sheet.min { height: auto; left: auto; right: 14px; top: 228px; bottom: auto; width: 160px; border-radius: 16px; }
.tg-sheet.min .tg-sheet-head { padding: 4px 4px 4px 12px; } .tg-sheet.min .tg-sheet-head b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-sheet.min .tg-sheet-head button { width: 32px; height: 32px; }
.tg-sheet.min .tg-sheet-body { display: none; }
.tg-sheet.min [data-sheet="min"] { transform: rotate(180deg); }
.tg-stage.sheet-open:has(.tg-sheet.min) .tg-pad { display: grid !important; }
.tg-stage.sheet-open:has(.tg-sheet.min) .tg-btns { display: block !important; }
.tg-stage.sheet-open:has(.tg-sheet.min) .tg-room-bar { top: 160px; bottom: auto; }
.tg-stage.game .tg-sheet.min { top: 132px; }
.tg-stage.game .tg-sheet:not(.min) { left: auto; top: 0; bottom: 0; height: auto; width: min(46%, 430px); border-radius: 22px 0 0 22px; padding-top: env(safe-area-inset-top); }
.tg-stage.game.sheet-open:not(:has(.tg-sheet.min)) .tg-room-bar { bottom: 16px; left: calc((100% - min(46%, 430px)) / 2); }
.tg-stage.game.sheet-open:not(:has(.tg-sheet.min)) .tg-dock { max-width: calc(100% - min(46%, 430px) - 28px); }
.tg-stage.game.sheet-open:not(:has(.tg-sheet.min)) .tg-top-r { visibility: hidden; }

/* ---------- boses: speech bubble + sound settings ---------- */
.tg-bubble { position: absolute; left: 0; top: 0; z-index: 2; max-width: 220px; padding: 8px 14px; border-radius: 18px; background: #fff; color: #1b1b1f;
  font: 700 15px/1.25 var(--font-display, inherit); box-shadow: 0 6px 18px rgba(0,0,0,.14); pointer-events: none; opacity: 0; white-space: nowrap; }
.tg-bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #fff; }
.tg-bubble.show { opacity: 1; animation: tg-bub .25s ease; }
.tg-bubble.flat { left: 50%; top: 22%; transform: translate(-50%, -100%); }
@keyframes tg-bub { from { scale: .6; } to { scale: 1; } }
.tg-sound { display: grid; gap: 14px; }
.tg-sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tg-sw > span { display: grid; gap: 2px; }
.tg-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tg-seg button { padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.tg-seg button[aria-checked="true"] { background: #ff5a36; border-color: #ff5a36; color: #fff; }
.tg-range { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-weight: 600; font-size: 14px; }
.tg-range input { grid-column: 1 / -1; grid-row: 2; width: 100%; accent-color: #ff5a36; }
.tg-range b { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted, #777); }
.tg-quit { position: absolute; right: 14px; top: 14px; z-index: 4; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(20,20,24,.75); color: #fff; font-size: 18px; cursor: pointer; }
.tg-stage.playing .tg-top .tg-top-r, .tg-stage.playing .tg-bubble { visibility: hidden; }
.tg-stage.game-race .tg-pad .knob { border-radius: 12px; }

/* ---------- Coin Rush ---------- */
.tg-hud { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.tg-hud span { white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: rgba(20,20,24,.78); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 16px; }
.tg-count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 3; font: 800 72px/1 var(--font-display); color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,.35); }
.tg-count.pop { animation: tg-pop .6s ease; }
@keyframes tg-pop { 0% { transform: scale(.4); opacity: 0; } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.tg-stage.playing .tg-xp, .tg-stage.playing .tg-mood { visibility: hidden; }
.tg-games { display: grid; gap: 10px; }
.tg-game { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tg-game:disabled { opacity: .55; cursor: default; }
.tg-game > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.tg-game small { color: var(--text-2, var(--muted)); font-size: 12.5px; }
.tg-game .tg-ic { font-size: 30px; }
.tg-go, .tg-soon { padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; background: #ff5a36; color: #fff; }
.tg-soon { background: var(--surface-2); color: var(--text); }

/* ---------- closet ---------- */
.tg-closet { display: grid; gap: 12px; }
.tg-cl-head { display: flex; align-items: center; gap: 10px; }
.tg-cl-head h3 { margin: 0; flex: 1; font-size: 18px; }
.tg-coins { font-weight: 700; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, #ffc83d 25%, transparent); }
.tg-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tg-tabs::-webkit-scrollbar { display: none; }
.tg-tabs button { flex: none; display: grid; justify-items: center; gap: 2px; min-width: 58px; padding: 8px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.tg-tabs button span { font-size: 22px; line-height: 1; }
.tg-tabs button small { font-size: 11px; font-weight: 600; }
.tg-tabs button[aria-selected="true"] { background: #ff5a36; border-color: #ff5a36; color: #fff; }
.tg-cl-body { max-height: min(52vh, 460px); overflow: auto; }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tg-item { position: relative; display: grid; justify-items: center; gap: 3px; padding: 12px 6px 10px; border-radius: 16px; border: 2px solid transparent; background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.tg-item .tg-ic { font-size: 30px; line-height: 1.1; }
.tg-item b { font-size: 12.5px; text-align: center; line-height: 1.2; }
.tg-item small { font-size: 11.5px; font-weight: 700; color: #b7791f; }
.tg-item.have small { color: var(--muted, #888); }
.tg-item.on { border-color: #ff5a36; background: color-mix(in srgb, #ff5a36 12%, var(--surface)); }
.tg-item.on small { color: #ff5a36; }
.tg-item.lock { opacity: .5; }
.tg-cl-name { margin: 0 0 12px; }
.tg-cl-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.tg-cl-buy > span { flex: 1; font-weight: 600; font-size: 14px; }
.tg-cl-buy p { flex-basis: 100%; margin: 0; }

/* ---------- journey ---------- */
.tg-journey { display: grid; gap: 14px; }
.tg-jr-now { display: grid; gap: 4px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #fff1e6, #ffe0f0); color: #1b1b1f; }
.tg-jr-now b { font: 800 20px var(--font-display); }
.tg-xp-line { height: 8px; border-radius: 8px; background: rgba(0,0,0,.08); overflow: hidden; }
.tg-xp-line i { display: block; height: 100%; background: linear-gradient(90deg, #ffc04d, #ff5a36); }
.tg-path { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 6px; }
.tg-path::before { content: ""; position: absolute; left: 50%; top: 20px; bottom: 20px; border-left: 3px dashed color-mix(in srgb, #ff5a36 45%, transparent); transform: translateX(-50%); }
.tg-step { position: relative; display: grid; grid-template-columns: 1fr 46px 1fr; align-items: center; gap: 10px; }
.tg-node { grid-column: 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 800; background: var(--surface-2); border: 3px solid var(--line); z-index: 1; }
.tg-step.done .tg-node { background: #3dd6c0; border-color: #14b8a6; color: #fff; }
.tg-step.now .tg-node { background: #ffc04d; border-color: #ff5a36; box-shadow: 0 0 0 6px color-mix(in srgb, #ff5a36 22%, transparent); }
.tg-step-txt { display: grid; gap: 1px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.tg-step.l .tg-step-txt { grid-column: 1; grid-row: 1; text-align: right; }
.tg-step.r .tg-step-txt { grid-column: 3; grid-row: 1; }
.tg-step-txt small { font-size: 11px; font-weight: 700; color: #ff5a36; }
.tg-step-txt b { font-size: 14px; }
.tg-step-txt span { font-size: 12px; color: var(--muted, #777); }
.tg-step.next .tg-step-txt { opacity: .65; }

@media (max-width: 640px) {
  .tg-page { padding-top: 8px; }
  .tg-stage { border-radius: 22px; }
  .tg-act span { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .tg-stat.low .tg-bar i, .tg-count.pop { animation: none; } }

/* ---------- 📸 litrato (tigo/photo.js) ---------- */
.tg-flash { position: absolute; inset: 0; z-index: 9; background: #fff; pointer-events: none; animation: tg-flash .6s ease-out forwards; border-radius: inherit; }
@keyframes tg-flash { 0% { opacity: .95; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tg-flash { animation-duration: .2s; } }
.tg-photo { display: grid; place-items: center; }
.tg-photo-img { display: block; width: auto; max-width: 100%; height: auto; max-height: max(160px, min(62vh, 560px, calc(100dvh - 210px))); object-fit: contain; border-radius: 14px; background: #0d0f14; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.tg-photo-modal .modal-foot { flex-wrap: wrap; gap: 8px; }
.tg-photo-modal .modal-foot .btn { flex: 1 1 auto; }
.tg-dbtn.lvshare, .tg-act.lvshare { background: linear-gradient(135deg, #ffd23f, #ff8a3d); color: #3b1d00; animation: tg-pulse 1.6s ease-in-out infinite; }
@keyframes tg-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,170,40,.55); } 50% { box-shadow: 0 0 0 6px rgba(255,170,40,0); } }
@media (prefers-reduced-motion: reduce) { .tg-dbtn.lvshare, .tg-act.lvshare { animation: none; } }

/* ---------- 💃 Dance (3 sayaw) ---------- */
.tg-dance.on { background: #b9a2ff; color: #fff; box-shadow: 0 0 0 4px rgba(185,162,255,.35); }
.tg-dance-row { display: flex; gap: 6px; padding: 5px; border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.tg-dance-row.hidden { display: none !important; }
.tg-dance-row button { display: grid; justify-items: center; align-content: center; gap: 1px; width: 50px; height: 48px; padding: 0; border: 0; border-radius: 13px; background: transparent; color: #1b1b1f; font: inherit; font-size: 21px; line-height: 1.05; cursor: pointer; }
.tg-dance-row button small { font-size: 9px; font-weight: 800; }
.tg-dance-row button:hover, .tg-dance-row button:active { background: #efe9ff; }
/* desktop: nasa hanay ng buttons; ang 3 sayaw ay lumalabas sa itaas */
.tg-stage:not(.ui-game) .tg-btns { position: absolute; }
.tg-stage:not(.ui-game) .tg-dance-row { position: absolute; right: 0; bottom: 56px; }
/* phone / landscape: 💃 sa itaas ng ✋ Stop; ang 3 sayaw ay pahalang sa kaliwa nito */
.tg-stage.ui-game .tg-btns { height: 204px; }
.tg-stage.ui-game .tg-dance { right: 12px; bottom: 144px; width: 50px; height: 50px; }
.tg-stage.ui-game .tg-dance-row { right: 70px; bottom: 140px; }
.tg-stage.playing .tg-dance, .tg-stage.playing .tg-dance-row { display: none !important; }
/* walang patong: habang bukas ang 3 sayaw, nakatago ang Play together bar; nakatago ang 💃 habang may sheet o nag-aayos ng gamit */
.tg-stage:has(.tg-dance-row:not(.hidden)) .tg-together { display: none !important; }
.tg-stage.sheet-open .tg-dance, .tg-stage.sheet-open .tg-dance-row,
.tg-stage:has(.tg-room-bar:not(.hidden)) .tg-dance, .tg-stage:has(.tg-room-bar:not(.hidden)) .tg-dance-row { display: none !important; }
