:root{
  --tq-bg:#071427;
  --tq-border:rgba(201,154,82,0.45);
  --tq-text:#f6f2e6;
  --tq-muted:#b7c7d7;
  --tq-gold:#ddb26d;
  --tq-gold-deep:#9a6d2e;
  --tq-emerald:#1b5b4b;
  --tq-emerald-dark:#0d2f28;
  --tq-emerald-deep:#0f332c;
  --tq-ivory:#f3e8cf;
  --tq-ivory-deep:#e2d2ae;
  --tq-ink:#2a2012;
  --tq-danger:#c94b63;
  --tq-shadow:0 16px 34px rgba(2, 8, 20, 0.42);
  --tq-shadow-panel:0 22px 42px rgba(3, 8, 20, 0.5), inset 0 1px 0 rgba(255,246,229,0.25);
  --tq-shadow-gold:0 0 20px rgba(217, 173, 98, 0.28);
  --tq-inset-bevel:inset 0 1px 0 rgba(255,247,228,0.58), inset 0 -2px 0 rgba(122,84,33,0.22);
  --tq-border-double:1px solid rgba(217,173,98,0.74);
  --tq-font-display:"Noto Serif TC","Songti TC","Noto Sans TC",serif;
  --tq-font-body:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif;
  --tq-ui-top-hud-frame:none;
  --tq-ui-objective-frame:none;
  --tq-ui-dock-frame:none;
  --tq-ui-drawer-frame:none;
  --tq-ui-cta-frame:none;
  --tq-ui-close-frame:none;
  --tq-kit-panel-corner-gold:none;
  --tq-kit-header-plaque-emerald:none;
  --tq-kit-badge-emerald:none;
  --tq-kit-item-slot-frame:none;
  --tq-kit-close-medallion:none;
  --tq-kit-dock-divider-gold:none;
  --tq-ui-dialogue-panel-frame:none;
  --tq-ui-dialogue-speaker-plaque:none;
  --tq-ui-dialogue-action-button:none;
  --tq-ui-proof-panel-frame:none;
  --tq-ui-proof-stamp-seal:none;
  --tq-ui-proof-upload-slot:none;
  --tq-ui-move-path-gold:url("/img/temple-quest/temples/ganesha/ui/movement/tq-gane-move-path-gold-v1.png");
  --tq-ui-move-path-short:url("/img/temple-quest/temples/ganesha/ui/movement/tq-gane-move-short-trail-v2.png");
  --tq-ui-move-target-rune:url("/img/temple-quest/temples/ganesha/ui/movement/tq-gane-move-target-rune-v3.png");
  --tq-ui-move-foot-glow:url("/img/temple-quest/temples/ganesha/ui/movement/tq-gane-move-foot-aura-v3.png");
  --tq-ui-move-arrow-sigil:url("/img/temple-quest/temples/ganesha/ui/movement/tq-gane-move-direction-arrow-v3.png");
  --tq-ui-move-step-sigil:url("/img/temple-quest/temples/ganesha/ui/movement/tq-gane-move-step-sigil-v3.png");
  --tq-login-bg-image:url('/img/temple-quest/ganesha/ui/tq-login-wat-suthat-bg-v1.png?v=20260521tqloginbg1');
  --tq-desktop-shell-width:100vw;
}

body[data-tq-slug="erawan"]{
  --tq-login-bg-image:url('/img/temple-quest/temples/erawan/shrine/erawan-shrine-focal-v1.webp?v=20260521erawanshrinefocal2');
}

body[data-tq-slug="ganesha"]{
  --tq-login-bg-image:url('/img/temple-quest/ganesha/ui/tq-login-wat-suthat-bg-v1.png?v=20260521tqloginbg1');
}

*{ box-sizing:border-box; }

html, body{
  margin:0;
  padding:0;
  width:100%;
  min-height:100%;
  height:100%;
  overflow:hidden;
  background:radial-gradient(120% 90% at 50% -20%, #1e3766 0%, #0f1b37 46%, #060d1c 100%);
  color:var(--tq-text);
  font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif;
}

body.temple-quest-app{ overscroll-behavior:none; }
body.tq-sheet-opened .tq-scene-bg::after{
  background:
    radial-gradient(68% 36% at 50% 13%, rgba(255, 213, 130, 0.16), transparent 72%),
    linear-gradient(180deg, rgba(7, 13, 26, 0.42), rgba(7, 13, 26, 0.78));
}

.tq-app{
  width:100vw;
  height:100dvh;
  min-height:100dvh;
}

.tq-phone-shell{
  width:100%;
  height:100dvh;
  min-height:100dvh;
}

.tq-desktop-companion{
  display:none;
}

.tq-game-viewport{
  position:relative;
  width:100%;
  height:100dvh;
  min-height:100dvh;
  overflow:hidden;
  background:#0a1730;
}

.tq-scene-bg{
  position:absolute;
  inset:0;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  z-index:0;
}

.tq-scene-bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(68% 36% at 50% 13%, rgba(255, 213, 130, 0.28), transparent 72%),
    linear-gradient(180deg, rgba(7, 13, 26, 0.22), rgba(7, 13, 26, 0.64));
}

.tq-scene{
  position:absolute;
  inset:0;
  z-index:1;
}

.tq-login-gate{
  position:absolute;
  inset:0;
  z-index:24;
  display:none;
  align-items:stretch;
  justify-content:center;
  padding:0;
  overflow:hidden;
}

.tq-login-bg{
  position:absolute;
  inset:0;
  background-image:var(--tq-login-bg-image);
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  transform:scale(1.02);
  transform-origin:center;
}

.tq-login-overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(54% 36% at 50% 25%, rgba(246, 206, 124, 0.24), transparent 78%),
    linear-gradient(180deg, rgba(4, 12, 20, 0.26) 0%, rgba(4, 14, 24, 0.52) 62%, rgba(3, 10, 16, 0.84) 100%);
  pointer-events:none;
}

.tq-login-stage{
  position:relative;
  z-index:1;
  width:100%;
  min-height:100%;
  padding:calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
}

.tq-login-brand-top{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
  padding-top:2px;
}

.tq-login-logo{
  width:64px;
  height:auto;
  opacity:.96;
  filter:drop-shadow(0 4px 10px rgba(2, 10, 16, 0.44));
}

.tq-login-brand-sub{
  margin:0;
  font-size:10px;
  color:#f0d8aa;
  letter-spacing:.12em;
  text-transform:uppercase;
  opacity:.8;
}

.tq-login-title-wrap{
  width:100%;
  margin-top:auto;
  margin-bottom:auto;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:0;
  padding:34px 16px 32px;
  z-index:2;
  --tq-login-frame-width:min(100%, 470px);
}

.tq-login-title-frame{
  position:absolute;
  left:50%;
  top:50%;
  width:var(--tq-login-frame-width);
  height:auto;
  object-fit:contain;
  transform:translate(-50%, -26%);
  opacity:.8;
  pointer-events:none;
  mix-blend-mode:normal;
  z-index:1;
}

.tq-login-sacred-seal{
  width:86px;
  height:86px;
  object-fit:contain;
  opacity:.84;
  margin-bottom:6px;
  transform:translateY(-12px);
  filter:drop-shadow(0 0 18px rgba(239, 193, 108, 0.34));
  animation:tqLoginSealPulse 4.2s ease-in-out infinite;
  pointer-events:none;
  z-index:2;
}

.tq-login-kicker{
  position:relative;
  z-index:3;
  margin-top:4px;
  font-size:12px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  font-weight:900;
  color:#f1d4a0;
  text-shadow:0 2px 8px rgba(4, 10, 18, 0.6);
}

.tq-login-title{
  position:relative;
  z-index:3;
  margin:4px 0 0;
  font-size:38px;
  line-height:1.02;
  letter-spacing:0.08em;
  text-align:center;
  transform:translateY(-4px);
  color:#fdf0d1;
  text-shadow:
    0 2px 0 rgba(103, 67, 22, 0.72),
    0 8px 18px rgba(4, 13, 21, 0.58);
}

@media (min-width:721px){
  .tq-login-title{
    font-size:34px;
  }
}

.tq-login-subtitle{
  position:relative;
  z-index:3;
  margin:12px 0 0;
  font-size:15px;
  line-height:1.34;
  font-weight:900;
  text-align:center;
  color:#f6e4be;
}

.tq-login-subcopy{
  position:relative;
  z-index:3;
  margin:3px 0 0;
  font-size:12px;
  text-align:center;
  color:#e7cf9d;
  line-height:1.46;
}

@media (max-width:720px){
  .tq-login-kicker{
    margin-top:0;
    transform:translateY(-8px);
  }
  .tq-login-title{
    font-size:35px;
    transform:translateY(11px);
  }
  .tq-login-subtitle{
    margin-top:27px;
  }
  .tq-login-subcopy{
    margin-top:6px;
  }
}

.tq-login-actions{
  width:100%;
  max-width:320px;
  margin-top:auto;
  display:grid;
  gap:9px;
}

.tq-login-btn{
  min-height:52px;
  border-radius:999px;
  border:1px solid rgba(244, 203, 125, 0.76);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
  font-weight:900;
  letter-spacing:0.08em;
  text-decoration:none;
  text-transform:uppercase;
  box-shadow:0 10px 18px rgba(3, 12, 20, 0.36), inset 0 1px 0 rgba(255, 245, 222, 0.24);
}

.tq-login-btn.is-google{
  background-image:
    linear-gradient(170deg, rgba(251, 231, 190, 0.96) 0%, rgba(231, 192, 114, 0.97) 42%, rgba(194, 135, 61, 0.97) 100%),
    url('/img/temple-quest/ganesha/ui/tq-login-start-button-alpha-v2.png');
  background-size:cover;
  background-position:center;
  color:#34220c;
  border-color:rgba(248, 206, 128, 0.88);
  text-shadow:0 1px 0 rgba(255, 240, 205, 0.62);
  animation:tqLoginStartPulse 2.6s ease-in-out infinite;
}

.tq-login-btn.is-line{
  background:linear-gradient(165deg, rgba(34, 123, 104, 0.9), rgba(17, 71, 59, 0.92));
  color:#f3e9d2;
  border-color:rgba(134, 219, 188, 0.52);
}

.tq-login-note{
  margin:10px 0 0;
  font-size:11px;
  color:#ebd4a8;
  text-align:center;
  opacity:.9;
  letter-spacing:.04em;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(231, 188, 109, 0.42);
  background:linear-gradient(170deg, rgba(15, 58, 49, 0.52), rgba(10, 40, 34, 0.56));
}

@media (max-width:390px){
  .tq-login-stage{
    padding:calc(env(safe-area-inset-top, 0px) + 10px) 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
  }
  .tq-login-logo{
    width:58px;
  }
  .tq-login-title-wrap{
    padding:30px 12px 28px;
  }
  .tq-login-sacred-seal{
    width:78px;
    height:78px;
    margin-bottom:6px;
    transform:translateY(-10px);
  }
  .tq-login-title{
    font-size:33px;
    transform:translateY(-3px);
  }
  .tq-login-subtitle{
    font-size:14px;
  }
  .tq-login-actions{
    max-width:100%;
  }
  .tq-login-btn{
    min-height:50px;
    font-size:14px;
  }
  .tq-login-note{
    font-size:10px;
  }
}

@keyframes tqLoginStartPulse{
  0%, 100%{
    box-shadow:0 10px 18px rgba(3, 12, 20, 0.36), 0 0 0 rgba(238, 194, 113, 0);
  }
  50%{
    box-shadow:0 14px 24px rgba(3, 12, 20, 0.46), 0 0 22px rgba(238, 194, 113, 0.38);
  }
}

@keyframes tqLoginSealPulse{
  0%, 100%{ opacity:.72; transform:scale(1); }
  50%{ opacity:.9; transform:scale(1.04); }
}

/* ===== Temple Quest RPG Skin System ===== */
.tq-rpg-panel{
  position:relative;
  border:var(--tq-border-double);
  border-radius:18px;
  background:linear-gradient(160deg, rgba(26,88,72,0.96), rgba(12,44,37,0.96));
  box-shadow:var(--tq-shadow-panel);
}

.tq-rpg-panel::before{
  content:"";
  position:absolute;
  inset:4px;
  border-radius:14px;
  border:1px solid rgba(247,223,175,0.48);
  pointer-events:none;
}

.tq-rpg-panel__inner{
  border-radius:13px;
  border:1px solid rgba(192,144,75,0.6);
  background:
    linear-gradient(160deg, rgba(246,236,214,0.98), rgba(234,219,186,0.98)),
    radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,0.2), transparent 64%);
  color:var(--tq-ink);
}

.tq-rpg-panel__header{
  position:relative;
  background:linear-gradient(160deg, rgba(24,82,68,0.98), rgba(15,55,46,0.98));
  color:#f9ebcd;
}

.tq-rpg-button{
  border:var(--tq-border-double);
  border-radius:14px;
  font-family:var(--tq-font-body);
  font-weight:900;
  letter-spacing:.02em;
  box-shadow:0 10px 20px rgba(7,14,30,0.3), var(--tq-inset-bevel);
}

.tq-rpg-button--gold{
  background:linear-gradient(180deg, #f3dcae 0%, #dcaf63 48%, #ad752f 100%);
  color:#2b1d09;
}

.tq-rpg-button--emerald{
  background:linear-gradient(180deg, #2f8b73 0%, #1f644f 55%, #174638 100%);
  color:#f4e7ca;
}

.tq-rpg-chip{
  border-radius:999px;
  border:1px solid rgba(188,144,72,0.7);
  background:linear-gradient(150deg, rgba(247,236,210,0.98), rgba(230,213,178,0.98));
  color:#3a2d1d;
  font-weight:800;
  letter-spacing:.02em;
}

.tq-rpg-badge{
  border-radius:999px;
  border:1px solid rgba(205,157,83,0.78);
  background:linear-gradient(160deg, rgba(25,85,71,0.98), rgba(12,52,43,0.98));
  color:#faebcb;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,241,210,0.2);
}

.tq-rpg-close{
  border:1px solid rgba(209,163,88,0.78);
  border-radius:999px;
  background:linear-gradient(170deg, rgba(248,239,220,0.98), rgba(229,211,172,0.98));
  color:#2e2416;
  box-shadow:0 6px 12px rgba(9,20,38,0.28), inset 0 1px 0 rgba(255,255,255,0.6);
}

.tq-rpg-slot{
  position:relative;
}

.tq-rpg-slot::before,
.tq-rpg-slot::after{
  content:"";
  position:absolute;
  width:11px;
  height:11px;
  border:1px solid rgba(188,143,70,0.8);
  pointer-events:none;
}

.tq-rpg-slot::before{
  left:5px;
  top:5px;
  border-right:0;
  border-bottom:0;
  border-radius:4px 0 0 0;
}

.tq-rpg-slot::after{
  right:5px;
  bottom:5px;
  border-left:0;
  border-top:0;
  border-radius:0 0 4px 0;
}

.tq-rpg-dock{
  position:relative;
}

.tq-rpg-dock-item{
  border-radius:0;
  border:none;
  background:transparent;
  box-shadow:none;
}

.tq-world-layer{
  position:absolute;
  inset:0;
  z-index:3;
}

.tq-topbar{
  position:absolute;
  left:10px;
  right:10px;
  top:calc(env(safe-area-inset-top, 0px) + 4px);
  min-height:64px;
  border:1px solid rgba(210,163,88,0.75);
  border-radius:18px;
  background:
    linear-gradient(142deg, rgba(245,235,214,0.98), rgba(232,220,193,0.96)),
    radial-gradient(120% 80% at 50% -24%, rgba(231,195,122,0.14), rgba(231,195,122,0));
  backdrop-filter:blur(5px);
  box-shadow:0 14px 30px rgba(2, 8, 20, 0.36), inset 0 0 0 2px rgba(26,86,71,0.18);
  padding:8px 10px;
  display:grid;
  gap:5px;
  align-content:center;
  z-index:10;
}
.tq-topbar::before{
  content:"";
  position:absolute;
  inset:3px;
  border-radius:14px;
  border:1px solid rgba(151,114,54,0.34);
  pointer-events:none;
}

.tq-head-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
}

.tq-head-emblem{
  width:32px;
  height:32px;
  border-radius:999px;
  display:grid;
  place-items:center;
  color:#f8efdc;
  font-size:14px;
  border:1px solid rgba(221,181,111,0.82);
  background:linear-gradient(160deg, #1f6958, #123f35);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.24), 0 4px 10px rgba(11,37,31,0.28);
  font-family:"Noto Serif TC","Songti TC","Noto Sans TC",serif;
}

.tq-head-main{
  min-width:0;
  flex:1;
  display:grid;
  gap:1px;
}

.tq-title{
  margin:0;
  font-size:13px;
  line-height:1.2;
  letter-spacing:0.02em;
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:none;
  color:var(--tq-ink);
  font-family:"Noto Serif TC","Songti TC","Noto Sans TC",serif;
  letter-spacing:0.01em;
}

.tq-subtitle{
  margin:0;
  font-size:10px;
  line-height:1.25;
  color:#4b4030;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(216,171,99,0.62);
  color:#f8efd7;
  background:linear-gradient(145deg, rgba(26,86,71,0.96), rgba(15,58,48,0.94));
  font-size:10px;
  font-weight:800;
  box-shadow:inset 0 1px 0 rgba(255,245,219,0.18), 0 4px 10px rgba(8,18,18,0.18);
}

.tq-badge::before{
  content:"◈";
  font-size:9px;
  line-height:1;
}

.tq-progress-inline{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:6px;
}

.tq-progress-label{
  font-size:10px;
  color:#473b2a;
  min-width:46px;
  letter-spacing:.02em;
  font-weight:800;
}

.tq-progress-track{
  width:100%;
  height:6px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(26,86,71,0.18);
  border:1px solid rgba(26,86,71,0.28);
}

.tq-progress-fill{
  height:100%;
  border-radius:999px;
  width:0%;
  background:
    linear-gradient(90deg, #1e7f68 0%, #c99853 62%, #f0d6a9 100%);
  box-shadow:0 0 12px rgba(180,131,58,0.3);
  transition:width .25s ease;
}

.tq-hud-icon{
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid rgba(200,154,82,0.6);
  background:radial-gradient(70% 70% at 40% 32%, #1f7d68 0%, #124a3d 100%);
  display:grid;
  place-items:center;
  flex:0 0 auto;
}

.tq-hud-gear,
.tq-hud-gear::before,
.tq-hud-gear::after{
  display:block;
  position:relative;
  content:"";
}

.tq-hud-gear{
  width:12px;
  height:12px;
  border:2px solid #f3dfb6;
  border-radius:999px;
}

.tq-hud-gear::before{
  position:absolute;
  left:50%;
  top:50%;
  width:18px;
  height:2px;
  background:#f3dfb6;
  transform:translate(-50%, -50%);
}

.tq-hud-gear::after{
  position:absolute;
  left:50%;
  top:50%;
  width:2px;
  height:18px;
  background:#f3dfb6;
  transform:translate(-50%, -50%);
}

.tq-scene-marker{
  position:absolute;
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  transform:translate(-50%, -50%);
  border:0;
  border-radius:999px;
  background:transparent;
  padding:0;
  display:grid;
  place-items:center;
  box-shadow:none;
  transition:transform .18s ease, filter .2s ease, opacity .2s ease;
  -webkit-tap-highlight-color:transparent;
  z-index:7;
}

.tq-scene-marker-core{
  position:relative;
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid rgba(214,168,92,0.66);
  background:
    radial-gradient(circle at 50% 32%, rgba(70,149,124,0.95), rgba(21,80,66,0.96) 62%, rgba(14,54,45,0.98) 100%),
    linear-gradient(160deg, rgba(16, 27, 50, 0.9), rgba(10, 17, 32, 0.88));
  box-shadow:
    0 8px 16px rgba(2, 8, 24, 0.45),
    inset 0 1px 0 rgba(255,241,211,0.34),
    inset 0 -2px 0 rgba(34,20,8,0.26);
  display:grid;
  place-items:center;
}

.tq-scene-marker-icon{
  width:14px;
  height:14px;
  display:block;
  filter:drop-shadow(0 1px 1px rgba(7, 12, 22, 0.38));
  opacity:.94;
}

.tq-scene-marker-ring{
  position:absolute;
  left:50%;
  top:50%;
  width:42px;
  height:42px;
  transform:translate(-50%, -50%);
  border-radius:999px;
  border:1px solid rgba(211,166,90,0.52);
  background:radial-gradient(circle, rgba(211,166,90,0.12), rgba(211,166,90,0.01) 72%);
  box-shadow:0 0 14px rgba(211,166,90,0.2);
  pointer-events:none;
  opacity:.65;
}

.tq-scene-marker-ring::after{
  content:"";
  position:absolute;
  inset:5px;
  border-radius:inherit;
  border:1px solid rgba(244,226,188,0.22);
  opacity:.75;
}

.tq-scene-marker-callout{
  position:absolute;
  left:50%;
  top:40px;
  transform:translateX(-50%);
  min-width:74px;
  max-width:120px;
  border-radius:10px;
  border:1px solid rgba(214,168,92,0.4);
  background:
    linear-gradient(145deg, rgba(12, 25, 46, 0.88), rgba(8, 17, 33, 0.84)),
    radial-gradient(120% 80% at 50% 0%, rgba(248,226,185,0.16), rgba(248,226,185,0));
  padding:4px 7px 5px;
  text-align:center;
  backdrop-filter:blur(4px);
  opacity:.22;
  pointer-events:none;
  transition:opacity .16s ease, transform .16s ease;
}

.tq-scene-marker-title{
  display:block;
  font-size:9px;
  line-height:1.15;
  color:#f3e8cb;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-scene-marker-sub{
  display:block;
  margin-top:1px;
  font-size:8px;
  line-height:1.1;
  color:#c9dcc8;
}

.tq-scene-marker.is-target{
  transform:translate(-50%, -50%) scale(1.03);
  filter:drop-shadow(0 0 12px rgba(231, 195, 122, 0.32));
  z-index:8;
}

.tq-scene-marker.is-current-step{
  z-index:9;
}

.tq-scene-marker.is-current-step .tq-scene-marker-core{
  border-color:rgba(228,183,104,0.88);
  box-shadow:
    0 10px 22px rgba(2, 8, 24, 0.52),
    0 0 14px rgba(228,183,104,0.24),
    inset 0 1px 0 rgba(255,240,205,0.42);
}

.tq-scene-marker.is-current-step .tq-scene-marker-callout{
  border-color:rgba(231,195,122,0.64);
  background:rgba(8, 14, 28, 0.9);
}

.tq-scene-marker.is-current-step .tq-scene-marker-ring{
  opacity:.9;
}

.tq-scene-marker.is-selected{
  transform:translate(-50%, -50%) scale(1.11);
  z-index:8;
}

.tq-scene-marker.is-arrived{
  z-index:8;
}

.tq-scene-marker.is-target .tq-scene-marker-ring{
  border-color:rgba(228,183,104,0.82);
  background:radial-gradient(circle, rgba(228,183,104,0.2), rgba(228,183,104,0.01));
  box-shadow:0 0 16px rgba(228, 183, 104, 0.24);
}

.tq-scene-marker.is-arrived .tq-scene-marker-ring{
  border-color:rgba(118, 198, 163, 0.8);
  background:radial-gradient(circle, rgba(118,198,163,0.22), rgba(118,198,163,0.01));
  box-shadow:0 0 14px rgba(118, 198, 163, 0.22);
}

.tq-scene-marker.is-arrived .tq-scene-marker-sub{
  color:#bff1db;
}

.tq-scene-marker.is-focus-label .tq-scene-marker-callout{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

.tq-scene-marker.is-compact-label .tq-scene-marker-callout{
  opacity:0;
}

.tq-scene-marker.is-completed-label .tq-scene-marker-callout{
  opacity:0;
}

.tq-scene-marker.is-completed-label .tq-scene-marker-core{
  width:22px;
  height:22px;
  border-color:rgba(89, 173, 141, 0.62);
}

.tq-scene-marker.is-completed-label .tq-scene-marker-ring{
  opacity:0;
}

.tq-scene-marker.is-lower-front .tq-scene-marker-callout{
  top:auto;
  bottom:34px;
}

.tq-scene-marker.is-lower-front.is-focus-label .tq-scene-marker-callout{
  transform:translateX(-50%) translateY(-2px);
}

.tq-scene-marker.is-completed .tq-scene-marker-core{
  border-color:rgba(121, 211, 174, 0.5);
  background:
    radial-gradient(circle at 50% 30%, rgba(113,191,158,0.9), rgba(26,96,79,0.95) 64%, rgba(16,61,50,0.98) 100%),
    linear-gradient(155deg, rgba(10, 27, 23, 0.82), rgba(9, 20, 18, 0.78));
}

.tq-scene-marker.is-completed .tq-scene-marker-callout{
  border-color:rgba(121,211,174,0.42);
}

.tq-scene-marker.is-completed .tq-scene-marker-title{
  color:#c6f4df;
}

.tq-scene-marker.is-muted{
  opacity:.38;
}

.tq-scene-marker.is-muted .tq-scene-marker-core{
  border-color:rgba(171, 164, 146, 0.34);
  background:linear-gradient(160deg, rgba(52,57,67,0.74), rgba(35,39,48,0.76));
  filter:saturate(.35);
}

.tq-scene-marker.is-muted .tq-scene-marker-ring{
  opacity:.26;
  border-color:rgba(160,152,132,0.28);
  box-shadow:none;
}

.tq-scene-marker.is-active-hotspot{
  z-index:9;
}

.tq-scene-marker.is-active-hotspot .tq-scene-marker-callout{
  opacity:1;
  border-color:rgba(226,182,103,0.58);
}

.tq-scene-marker.is-active-hotspot .tq-scene-marker-ring{
  animation:tqHotspotPulse 1.55s ease-in-out infinite;
}

.tq-scene-marker.is-completed-hotspot .tq-scene-marker-sub{
  color:#c7efdb;
}

.tq-scene-marker.is-completed-hotspot .tq-scene-marker-core::after{
  content:"";
  position:absolute;
  width:9px;
  height:5px;
  border-left:2px solid rgba(247,238,214,0.96);
  border-bottom:2px solid rgba(247,238,214,0.96);
  transform:translate(-50%, -56%) rotate(-45deg);
  left:50%;
  top:50%;
}

.tq-scene-marker.is-locked-hotspot{
  opacity:.52;
}

.tq-scene-marker.is-locked-hotspot .tq-scene-marker-core{
  border-color:rgba(154,146,126,0.42);
  background:linear-gradient(160deg, rgba(60,62,68,0.76), rgba(45,47,53,0.78));
  filter:saturate(.2);
}

.tq-scene-marker.is-locked-hotspot .tq-scene-marker-callout{
  opacity:.12;
}

.tq-scene-marker.is-locked-hotspot .tq-scene-marker-ring{
  animation:none;
  opacity:.2;
}

.tq-scene-marker.is-completed-hotspot:not(.is-focus-label):not(.is-selected):not(.is-target):not(.is-arrived) .tq-scene-marker-callout{
  display:none;
}

.tq-scene-marker[data-hotspot-id="hs_complete"]:not(.is-focus-label):not(.is-selected):not(.is-target):not(.is-arrived){
  transform:translate(-50%, -50%) scale(.92);
}

.tq-scene-marker[data-hotspot-id="hs_complete"] .tq-scene-marker-ring{
  opacity:.38;
}

.tq-scene-marker[data-hotspot-id="hs_complete"] .tq-scene-marker-callout{
  top:auto;
  bottom:36px;
}

@keyframes tqHotspotPulse{
  0%, 100%{
    transform:translate(-50%, -50%) scale(1);
    opacity:.74;
  }
  50%{
    transform:translate(-50%, -50%) scale(1.08);
    opacity:.98;
  }
}

.tq-scene-marker.is-hidden-marker{
  opacity:0 !important;
  pointer-events:none;
  transform:translate(-50%, -50%) scale(.8);
}

.tq-character{
  position:absolute;
  width:52px;
  height:78px;
  transform:translate(-50%, -86%);
  transition:filter .2s ease, left .09s linear, top .09s linear;
  pointer-events:none;
  z-index:5;
}

.tq-character::after{
  content:"";
  position:absolute;
  left:50%;
  top:46%;
  width:20px;
  height:20px;
  transform:translate(-50%, -50%);
  border-radius:999px;
  background:radial-gradient(circle, rgba(231,195,122,0.18), rgba(231,195,122,0));
  pointer-events:none;
}

.tq-character img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  animation:tqSeekerBreath 2.4s ease-in-out infinite;
}
.tq-character.is-moving{ filter:drop-shadow(0 0 12px rgba(231, 195, 122, 0.35)); }
.tq-character.is-moving img{ animation:tqWalkBob .28s ease-in-out infinite alternate; }

.tq-character-shadow{
  position:absolute;
  width:42px;
  height:12px;
  border-radius:999px;
  background:rgba(0,0,0,0.24);
  filter:blur(1px);
  transform:translate(-50%, -50%);
  pointer-events:none;
  z-index:4;
}

.tq-path-line{
  position:absolute;
  height:42px;
  min-width:84px;
  transform-origin:left center;
  background:none;
  pointer-events:none;
  z-index:7;
  display:none !important;
}
.tq-path-line-trail,
.tq-path-line-short,
.tq-path-line-arrow{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:fill;
  object-position:left center;
  pointer-events:none;
}
.tq-path-line-trail{
  opacity:.82;
  object-fit:contain;
  top:50%;
  height:100%;
  transform:translateY(-50%) scaleY(1);
  filter:
    drop-shadow(0 0 8px rgba(233, 196, 118, 0.52))
    drop-shadow(0 0 16px rgba(44, 132, 106, 0.34));
  mix-blend-mode:screen;
  animation:tqMovePathPulse 1.8s ease-in-out infinite;
}
.tq-path-line-short{
  width:62%;
  min-width:72px;
  max-width:168px;
  height:42px;
  top:50%;
  left:3px;
  transform:translate(0, -50%);
  object-fit:contain;
  opacity:1;
  filter:drop-shadow(0 0 10px rgba(230, 191, 111, 0.56));
}
.tq-path-line-arrow{
  width:38px;
  height:38px;
  top:50%;
  right:-9px;
  left:auto;
  transform:translate(0, -50%);
  object-fit:contain;
  opacity:1;
  filter:
    drop-shadow(0 0 8px rgba(233, 191, 110, 0.52))
    drop-shadow(0 0 14px rgba(42, 130, 103, 0.32));
  animation:tqMoveArrowPulse 1.4s ease-in-out infinite;
}
.tq-path-target-rune{
  display:none !important;
}
.tq-path-target-rune-art{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  opacity:.9;
  filter:
    drop-shadow(0 0 4px rgba(232, 193, 114, 0.34))
    drop-shadow(0 0 7px rgba(33, 124, 99, 0.22));
  mix-blend-mode:screen;
  animation:tqMoveRunePulse 2.1s ease-in-out infinite;
}
.tq-path-target-rune-label{
  display:none !important;
}
.tq-path-step-sigil{
  position:absolute;
  width:16px;
  height:16px;
  transform:translate(-50%, -50%);
  pointer-events:none;
  z-index:8;
}
.tq-path-step-sigil-art{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  opacity:.64;
  filter:
    drop-shadow(0 0 1px rgba(236, 195, 114, 0.2))
    drop-shadow(0 0 2px rgba(34, 123, 99, 0.1));
  animation:tqMoveStepPulse 3.2s ease-in-out infinite;
}
.tq-move-player-marker{
  position:absolute;
  width:20px;
  height:20px;
  transform:translate(-50%, -50%);
  pointer-events:none;
  z-index:8;
}
.tq-move-player-marker-art{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  opacity:.58;
  filter:
    drop-shadow(0 0 1px rgba(235, 196, 117, 0.16))
    drop-shadow(0 0 2px rgba(35, 122, 98, 0.08));
  mix-blend-mode:screen;
  animation:tqMovePlayerMarkerPulse 3.4s ease-in-out infinite;
}
@keyframes tqMovePathPulse{
  0%{ opacity:.76; }
  50%{ opacity:.98; }
  100%{ opacity:.76; }
}
@keyframes tqMoveArrowPulse{
  0%{ opacity:.74; transform:translate(0, -50%) scale(.98); }
  50%{ opacity:.94; transform:translate(0, -50%) scale(1.02); }
  100%{ opacity:.74; transform:translate(0, -50%) scale(.98); }
}
@keyframes tqMoveRunePulse{
  0%{ opacity:.86; transform:scale(.99); }
  50%{ opacity:1; transform:scale(1.04); }
  100%{ opacity:.86; transform:scale(.99); }
}
@keyframes tqMoveStepPulse{
  0%{ opacity:.8; transform:scale(.96); }
  50%{ opacity:1; transform:scale(1.04); }
  100%{ opacity:.8; transform:scale(.96); }
}
@keyframes tqMovePlayerMarkerPulse{
  0%{ opacity:.86; transform:scale(.97); }
  50%{ opacity:1; transform:scale(1.03); }
  100%{ opacity:.86; transform:scale(.97); }
}

@media (prefers-reduced-motion: reduce){
  .tq-scene-marker,
  .tq-scene-marker-ring,
  .tq-scene-marker-callout,
  .tq-character{
    transition:none !important;
    animation:none !important;
  }
}

/* ===== Phase 5C-1 Hotspot Marker Visual Cleanup ===== */
.tq-scene-marker{
  width:40px;
  height:40px;
  min-width:40px;
  min-height:40px;
}

.tq-scene-marker-core{
  width:25px;
  height:25px;
  box-shadow:
    0 5px 10px rgba(2, 8, 24, 0.34),
    inset 0 1px 0 rgba(255,241,211,0.26),
    inset 0 -1px 0 rgba(34,20,8,0.2);
}

.tq-scene-marker-icon{
  display:none;
}

.tq-scene-marker-core::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:2px;
  background:linear-gradient(145deg, rgba(246,230,194,0.95), rgba(218,180,108,0.95));
  border:1px solid rgba(119,86,38,0.52);
  transform:rotate(45deg);
  box-shadow:0 0 0 1px rgba(10, 43, 36, 0.12);
}

.tq-scene-marker-ring{
  width:34px;
  height:34px;
  opacity:.5;
  box-shadow:0 0 10px rgba(211,166,90,0.16);
}

.tq-scene-marker-ring::after{
  inset:4px;
  border-style:solid;
  border-color:rgba(244,226,188,0.32);
}

.tq-scene-marker.is-active-hotspot{
  transform:translate(-50%, -50%) scale(1.03);
}

.tq-scene-marker.is-active-hotspot .tq-scene-marker-core{
  width:28px;
  height:28px;
  box-shadow:
    0 7px 14px rgba(2, 8, 24, 0.4),
    0 0 10px rgba(228,183,104,0.18),
    inset 0 1px 0 rgba(255,240,205,0.36);
}

.tq-scene-marker.is-active-hotspot .tq-scene-marker-ring{
  width:40px;
  height:40px;
  opacity:.72;
}

.tq-scene-marker.is-completed-hotspot .tq-scene-marker-core{
  width:23px;
  height:23px;
}

.tq-scene-marker.is-completed-hotspot .tq-scene-marker-core::before{
  display:none;
}

.tq-scene-marker.is-completed-hotspot .tq-scene-marker-ring{
  opacity:.34;
}

.tq-scene-marker.is-locked-hotspot{
  transform:translate(-50%, -50%) scale(.92);
  opacity:.46;
}

.tq-scene-marker.is-locked-hotspot .tq-scene-marker-core{
  width:22px;
  height:22px;
}

.tq-scene-marker.is-locked-hotspot .tq-scene-marker-ring{
  width:30px;
  height:30px;
  opacity:.14;
}

.tq-scene-marker.is-locked-hotspot .tq-scene-marker-core::before{
  background:linear-gradient(145deg, rgba(177,171,156,0.72), rgba(135,128,110,0.72));
  border-color:rgba(95,87,71,0.46);
}

.tq-scene-marker-callout{
  top:35px;
  min-width:68px;
  max-width:106px;
  padding:3px 6px 4px;
}

.tq-scene-marker-title{
  font-size:8px;
}

.tq-scene-marker-sub{
  font-size:7px;
}

.tq-scene-fabgroup{
  position:absolute;
  right:12px;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 170px);
  display:grid;
  gap:6px;
  z-index:11;
}

.tq-fab-btn{
  position:relative;
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.32);
  background:rgba(7, 13, 26, 0.72);
  color:#f2f7ff;
  font-size:11px;
  font-weight:800;
  display:grid;
  place-items:center;
  box-shadow:0 8px 18px rgba(2,8,22,0.36);
  transition:transform .14s ease, filter .2s ease, border-color .2s ease;
}

.tq-fab-ico{
  line-height:1;
  font-size:0;
}

.tq-fab-ico::before{
  content:"◈";
  font-size:15px;
  line-height:1;
  color:#f3e8cb;
  text-shadow:0 0 6px rgba(235,196,121,0.24);
}

.tq-fab-btn:active{
  transform:translateY(1px) scale(.98);
}

.tq-fab-btn::before{
  content:"";
  position:absolute;
  inset:-4px;
}

.tq-fab-btn.is-locked,
.tq-dock-btn.is-locked,
.tq-objective-reward-btn.is-locked{
  border-color:rgba(231, 195, 122, 0.4);
}

.tq-fab-btn.is-unlocked,
.tq-dock-btn.is-unlocked,
.tq-objective-reward-btn.is-unlocked{
  border-color:rgba(121, 211, 174, 0.55);
  color:#1e5a4a;
}

.tq-fab-btn.has-badge::after,
.tq-dock-btn.has-badge::after{
  content:attr(data-badge);
  position:absolute;
  right:-4px;
  top:-4px;
  min-width:16px;
  height:16px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.28);
  background:linear-gradient(135deg, #e7c37a, #f2dfb1);
  color:#241805;
  font-size:10px;
  font-weight:800;
  line-height:14px;
  text-align:center;
  padding:0 4px;
  box-shadow:0 6px 12px rgba(2, 8, 22, 0.35);
}

.tq-dock-btn.is-unlocked::after{
  content:attr(data-badge);
  position:absolute;
  right:4px;
  top:4px;
  min-width:22px;
  height:14px;
  border-radius:10px;
  border:1px solid rgba(160,118,53,0.82);
  background:linear-gradient(145deg, rgba(247,236,210,0.98), rgba(233,216,180,0.98));
  color:#2f2314;
  font-size:9px;
  line-height:12px;
  padding:0 4px;
  font-weight:900;
  text-align:center;
}

#openBagBtnBottom.has-badge::after{
  right:4px;
  top:4px;
  min-width:18px;
  height:14px;
  border-radius:8px;
  border-color:rgba(231,195,122,0.42);
  background:linear-gradient(135deg, rgba(24,36,66,0.95), rgba(14,22,43,0.95));
  color:#f7e6bf;
  font-size:9px;
  line-height:12px;
  padding:0 3px;
}

.tq-corner-tools{
  position:absolute;
  top:calc(env(safe-area-inset-top, 0px) + 52px);
  right:10px;
  z-index:12;
  display:flex;
  align-items:center;
  gap:4px;
}

.tq-refresh-fab{
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.32);
  background:linear-gradient(155deg, rgba(12, 21, 40, 0.82), rgba(8, 14, 28, 0.84));
  color:#f9e9be;
  font-size:12px;
  font-weight:800;
  box-shadow:0 6px 12px rgba(3, 8, 20, 0.3);
}

.tq-debug-seed{
  min-height:24px;
  border-radius:999px;
  border:1px solid rgba(231, 195, 122, 0.42);
  background:rgba(7, 12, 26, 0.74);
  color:#ffe7b6;
  font-size:9px;
  font-weight:700;
  padding:0 7px;
}

.tq-command-panel{
  position:absolute;
  left:10px;
  right:10px;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 8px);
  display:grid;
  gap:8px;
  z-index:10;
}

.tq-objective-card{
  border:1px solid rgba(211,161,84,0.84);
  border-radius:16px;
  background:
    linear-gradient(160deg, rgba(19,74,62,0.96), rgba(13,51,42,0.96));
  backdrop-filter:blur(6px);
  box-shadow:0 14px 26px rgba(2, 8, 22, 0.34);
  padding:9px 10px;
  display:grid;
  gap:6px;
  position:relative;
}

.tq-objective-card::before,
.tq-objective-card::after{
  content:"";
  position:absolute;
  width:16px;
  height:16px;
  border:1px solid rgba(227,184,109,0.82);
  pointer-events:none;
}

.tq-objective-card::before{
  left:6px;
  top:6px;
  border-right:0;
  border-bottom:0;
  border-radius:5px 0 0 0;
}

.tq-objective-card::after{
  right:6px;
  bottom:6px;
  border-left:0;
  border-top:0;
  border-radius:0 0 5px 0;
}

.tq-objective-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.tq-objective-head-actions{
  display:flex;
  align-items:center;
  gap:4px;
}

.tq-objective-kicker{
  font-size:10px;
  color:#f2dfb3;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:800;
}

.tq-objective-collapse-btn{
  min-height:30px;
  border-radius:999px;
  border:1px solid rgba(223,177,96,0.72);
  background:linear-gradient(135deg, rgba(245,236,216,0.98), rgba(233,220,190,0.98));
  color:#1e5a4a;
  font-size:10px;
  font-weight:800;
  line-height:1;
  padding:0 8px;
  display:flex;
  align-items:center;
  gap:4px;
}

.tq-objective-collapse-ico{
  width:10px;
  height:10px;
  display:block;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-1px);
  transition:transform .2s ease;
}

.tq-objective-collapse-label{
  white-space:nowrap;
}

.tq-objective-body{
  border-radius:12px;
  border:1px solid rgba(222,184,115,0.66);
  background:linear-gradient(160deg, rgba(244,235,216,0.98), rgba(235,223,196,0.96));
  padding:8px;
  display:grid;
  grid-template-columns:58px minmax(0,1fr);
  gap:8px;
  align-items:center;
}

.tq-action-thumb{
  width:58px;
  height:86px;
  border-radius:9px;
  overflow:hidden;
  border:1px solid rgba(197,150,79,0.72);
  background:linear-gradient(160deg, rgba(22,71,60,0.7), rgba(16,50,42,0.7));
  transform:rotate(-4deg);
  box-shadow:0 8px 14px rgba(18,48,40,0.24);
}

.tq-action-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.tq-action-copy{
  min-width:0;
  display:grid;
  gap:4px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  padding:7px 9px;
  gap:4px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-body{
  grid-template-columns:1fr;
  gap:4px;
  padding:6px 8px;
}

.tq-command-panel.is-objective-collapsed #actionThumb,
.tq-command-panel.is-objective-collapsed .tq-action-sub,
.tq-command-panel.is-objective-collapsed #globalMessage{
  display:none;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  font-size:13px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  font-size:9px;
  padding:2px 7px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-ico{
  transform:rotate(-135deg) translateY(0);
}

.tq-action-title{
  font-size:14px;
  color:#2d2517;
  letter-spacing:.01em;
  font-weight:800;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-action-primary{
  width:100%;
  border:1px solid rgba(231, 195, 122, 0.58);
  border-radius:14px;
  min-height:44px;
  background:linear-gradient(125deg, #cb9233 0%, #e5ba68 46%, #f2daaa 100%);
  color:#241605;
  font-size:14px;
  font-weight:800;
  box-shadow:0 12px 24px rgba(180, 127, 26, 0.34), inset 0 1px 0 rgba(255,248,227,0.42), inset 0 -2px 0 rgba(118,73,13,0.28);
  transition:transform .14s ease, box-shadow .2s ease, filter .2s ease;
}

.tq-action-primary:active{
  transform:translateY(1px) scale(.996);
  box-shadow:0 6px 12px rgba(180, 127, 26, 0.28), inset 0 1px 0 rgba(255,248,227,0.24);
}

.tq-action-primary[disabled]{
  background:rgba(255,255,255,0.12);
  color:#c2cce3;
  border-color:rgba(255,255,255,0.2);
}

.tq-action-sub{
  font-size:11px;
  color:#5a4a33;
  line-height:1.35;
  min-height:28px;
}

.tq-action-pill{
  width:fit-content;
  border-radius:999px;
  border:1px solid rgba(160,118,53,0.76);
  background:linear-gradient(135deg, rgba(24,78,65,0.95), rgba(15,58,48,0.95));
  color:#fff4dc;
  font-size:10px;
  font-weight:800;
  padding:3px 8px;
}

.tq-dock{
  display:grid;
  gap:6px;
}

.tq-dock-secondary{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:6px;
  position:relative;
}

.tq-dock-secondary::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  bottom:0;
  border-radius:14px;
  border:1px solid rgba(199,153,82,0.55);
  pointer-events:none;
}

.tq-dock-btn{
  position:relative;
  min-height:44px;
  border-radius:12px;
  border:1px solid rgba(201,154,82,0.56);
  background:linear-gradient(160deg, rgba(243,233,210,0.98), rgba(233,218,187,0.96));
  color:#2f2518;
  font-size:11px;
  font-weight:700;
  display:grid;
  grid-template-rows:auto auto;
  align-content:center;
  justify-items:center;
  gap:3px;
  padding:3px 0 2px;
  transition:transform .14s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.tq-dock-btn::before{
  content:"";
  position:absolute;
  inset:-5px;
}

.tq-dock-btn:active{ transform:translateY(1px); }
.tq-dock-btn.is-active{
  border-color:rgba(205,156,81,0.92);
  box-shadow:0 0 0 2px rgba(29,101,84,0.2), 0 10px 18px rgba(16,54,46,0.28);
  background:linear-gradient(160deg, rgba(248,239,220,0.99), rgba(238,224,193,0.98));
}

.tq-dock-btn + .tq-dock-btn{
  border-left-color:rgba(187,144,75,0.5);
}

.tq-dock-ico{
  width:17px;
  height:17px;
  position:relative;
  display:block;
  background-repeat:no-repeat;
  background-position:center;
  background-size:16px 16px;
}

.tq-dock-ico--move{
  background-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232f2518' d='m4 12 5-5v3h10v4H9v3z'/%3E%3C/svg%3E");
}
.tq-dock-ico--quest{
  background-image:url(%22data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='3' width='16' height='18' rx='3' fill='%232f2518'/%3E%3Crect x='7' y='7' width='10' height='1.8' fill='%23f4e6c5'/%3E%3Crect x='7' y='11' width='10' height='1.8' fill='%23f4e6c5'/%3E%3Crect x='7' y='15' width='7' height='1.8' fill='%23f4e6c5'/%3E%3C/svg%3E%22);
}
.tq-dock-ico--bag{
  background-image:url(%22data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232f2518' d='M7 8V7a5 5 0 0 1 10 0v1h2v12H5V8zm2 0h6V7a3 3 0 1 0-6 0z'/%3E%3Ccircle cx='12' cy='14' r='2.2' fill='%23f4e6c5'/%3E%3C/svg%3E%22);
}
.tq-dock-ico--reward{
  background-image:url(%22data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232f2518' d='m12 2 2.8 5.2L20 8l-3.9 4.1.8 5.9L12 15.7 7.1 18l.8-5.9L4 8l5.2-.8z'/%3E%3Ccircle cx='12' cy='11.2' r='2.2' fill='%23f4e6c5'/%3E%3C/svg%3E%22);
}

.tq-dock-label{
  font-size:10px;
  line-height:1;
  letter-spacing:0.01em;
}

.tq-sheet{
  position:fixed;
  left:50%;
  bottom:-100%;
  transform:translateX(-50%);
  width:min(420px, calc(100vw - 14px));
  max-height:70dvh;
  border-radius:22px 22px 0 0;
  border:1px solid rgba(204,158,85,0.72);
  border-bottom:none;
  background:
    linear-gradient(180deg, #185343, #10362d),
    radial-gradient(90% 45% at 50% 0%, rgba(231,195,122,0.16), rgba(231,195,122,0));
  box-shadow:var(--tq-shadow);
  z-index:40;
  transition:bottom .25s ease;
  display:grid;
  grid-template-rows:auto 1fr;
  pointer-events:none;
}
.tq-sheet::before{
  content:"";
  position:absolute;
  inset:6px 6px 0 6px;
  border-radius:16px 16px 0 0;
  border:1px solid rgba(219,176,104,0.44);
  pointer-events:none;
}

.tq-sheet.is-open{
  bottom:0;
  pointer-events:auto;
}

.tq-sheet-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:13px 14px;
  border-bottom:1px solid rgba(208,166,93,0.58);
  color:#f3e4c1;
}

.tq-sheet-head h3{
  margin:0;
  font-size:18px;
  letter-spacing:.01em;
  font-weight:900;
  text-shadow:0 1px 0 rgba(0,0,0,0.16);
}

.tq-sheet-head-actions{
  display:flex;
  align-items:center;
  gap:7px;
}

.tq-sheet-collapse{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid rgba(204,158,85,0.68);
  background:linear-gradient(140deg, rgba(244,235,214,0.96), rgba(232,218,186,0.96));
  color:#2f2518;
  font-size:15px;
  font-weight:900;
  line-height:1;
  transition:transform .2s ease;
}

.tq-sheet-close{
  border:1px solid rgba(204,158,85,0.68);
  background:linear-gradient(140deg, rgba(244,235,214,0.96), rgba(232,218,186,0.96));
  color:#2f2518;
  width:34px;
  height:34px;
  border-radius:10px;
}

.tq-sheet-body{
  overflow:auto;
  padding:12px;
  background:linear-gradient(165deg, rgba(244,236,216,0.98), rgba(236,224,196,0.96));
  color:var(--tq-ink);
}

#questSheet.is-collapsed{
  max-height:92px;
}

#questSheet.is-collapsed .tq-sheet-body{
  display:none;
}

#questSheet.is-collapsed .tq-sheet-collapse{
  transform:rotate(180deg);
}

.tq-quest-steps{ display:grid; gap:10px; }

.tq-step{
  border:1px solid rgba(203,158,83,0.62);
  border-radius:14px;
  padding:11px;
  background:linear-gradient(162deg, rgba(246,238,220,0.98), rgba(235,224,197,0.96));
  box-shadow:0 8px 14px rgba(2, 8, 22, 0.14);
}

.tq-step.is-done{
  border-color:rgba(40,124,102,0.55);
  box-shadow:0 0 0 1px rgba(40,124,102,0.16), 0 8px 14px rgba(2, 8, 22, 0.14);
}

.tq-step.is-current{
  border-color:rgba(208,162,85,0.88);
  background:linear-gradient(160deg, rgba(250,243,229,0.99), rgba(242,231,205,0.98));
  box-shadow:0 0 0 2px rgba(208,162,85,0.24), 0 10px 20px rgba(2, 8, 22, 0.2);
}

.tq-step.is-locked{
  opacity:0.68;
  border-color:rgba(173,153,119,0.46);
  background:linear-gradient(160deg, rgba(237,227,202,0.95), rgba(229,218,189,0.92));
}

.tq-step-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tq-step-title{
  font-size:14px;
  font-weight:900;
  color:#2d2517;
}
.tq-step small{
  display:-webkit-box;
  margin-top:5px;
  color:#4f3f2c;
  font-size:12px;
  line-height:1.45;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.tq-step-proof-note{
  margin-top:6px;
  border:1px solid rgba(231,195,122,0.5);
  border-radius:10px;
  background:rgba(56, 42, 18, 0.45);
  color:#ffe3ad;
  font-size:11px;
  line-height:1.35;
  padding:6px 8px;
}

.tq-step-meta{
  display:grid;
  gap:4px;
  margin-top:6px;
}

.tq-step-meta-item{
  font-size:11px;
  color:#4d3f2c;
  line-height:1.3;
}

.tq-step.is-locked .tq-step-meta-item{
  color:#7f715d;
}

.tq-pill{
  border-radius:999px;
  border:1px solid rgba(187,146,76,0.55);
  background:rgba(241,231,209,0.9);
  font-size:10px;
  font-weight:800;
  color:#3f3220;
  padding:2px 8px;
}

.tq-step.is-current .tq-pill{
  border-color:rgba(208,162,85,0.88);
  color:#2f2518;
  background:rgba(239,217,172,0.68);
}

.tq-step.is-done .tq-pill{
  border-color:rgba(30,102,84,0.66);
  color:#f1ecd8;
  background:rgba(29,102,84,0.92);
}

.tq-step.is-locked .tq-pill{
  border-color:rgba(170,150,118,0.45);
  color:#6d5f4d;
  background:rgba(232,221,197,0.9);
}

.tq-inv-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}

.tq-inv-slot{
  border:1px solid rgba(203,158,83,0.65);
  border-radius:14px;
  background:linear-gradient(165deg, rgba(245,236,217,0.98), rgba(235,223,195,0.96));
  padding:8px;
  display:grid;
  gap:7px;
}

.tq-inv-slot-frame{
  position:relative;
  border-radius:11px;
  border:1px solid rgba(196,151,78,0.62);
  min-height:82px;
  background:linear-gradient(160deg, rgba(251,244,230,0.96), rgba(241,228,198,0.94));
  display:grid;
  place-items:center;
  overflow:hidden;
}

.tq-inv-icon{
  width:60px;
  height:60px;
  border-radius:12px;
  overflow:hidden;
  border:1px solid rgba(189,147,76,0.66);
  background:linear-gradient(155deg, rgba(251,243,227,0.96), rgba(238,223,190,0.95));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.2), 0 6px 10px rgba(72,46,14,0.16);
}

.tq-inv-icon img{ width:100%; height:100%; display:block; }

.tq-inv-count{
  position:absolute;
  right:6px;
  top:6px;
  border-radius:999px;
  border:1px solid rgba(181,140,71,0.62);
  background:rgba(245,237,220,0.95);
  color:#3b2f1f;
  padding:1px 6px;
  font-size:10px;
  font-weight:800;
  line-height:1.2;
}

.tq-inv-state{
  position:absolute;
  left:6px;
  bottom:6px;
  border-radius:999px;
  border:1px solid rgba(183,144,76,0.56);
  background:rgba(241,232,211,0.95);
  color:#4c3f2c;
  padding:1px 6px;
  font-size:9px;
  line-height:1.2;
  font-weight:700;
}

.tq-inv-name{
  font-size:13px;
  font-weight:900;
  color:#2d2517;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-inv-slot.is-owned{
  border-color:rgba(30,102,84,0.64);
  box-shadow:0 0 0 1px rgba(30,102,84,0.16), 0 10px 16px rgba(2,8,22,0.18);
}

.tq-inv-slot.is-owned .tq-inv-slot-frame{
  border-color:rgba(121,211,174,0.52);
}

.tq-inv-slot.is-owned .tq-inv-icon{
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.1), 0 0 18px rgba(121,211,174,0.2);
}

.tq-inv-slot.is-owned .tq-inv-state{
  border-color:rgba(30,102,84,0.66);
  color:#f0ebd7;
  background:rgba(30,102,84,0.92);
}

.tq-inv-slot.is-locked{
  opacity:.72;
}

.tq-inv-slot.is-locked .tq-inv-slot-frame{
  border-color:rgba(168,148,115,0.48);
}

.tq-inv-slot.is-locked .tq-inv-icon{
  filter:saturate(.65) brightness(.85);
}

.tq-inv-slot--empty{
  grid-column:1 / -1;
  border-style:dashed;
  border-color:rgba(255,255,255,0.28);
  min-height:88px;
  place-content:center;
}

.tq-bag-hint{
  margin-top:10px;
  border:1px solid rgba(121,211,174,0.44);
  border-radius:12px;
  background:rgba(15, 35, 31, 0.55);
  padding:10px;
  display:grid;
  gap:4px;
}

.tq-bag-hint.is-missing{
  border-color:rgba(231,195,122,0.55);
  background:rgba(44, 35, 18, 0.55);
}

.tq-bag-hint-title{
  font-size:11px;
  font-weight:800;
  color:#dff7ec;
}

.tq-bag-hint.is-missing .tq-bag-hint-title{
  color:#ffe8bc;
}

.tq-bag-hint-text{
  font-size:11px;
  color:#c4d8ff;
  line-height:1.4;
}

.tq-reward-card{
  border:1px solid rgba(231, 195, 122, 0.44);
  border-radius:16px;
  padding:12px;
  background:linear-gradient(170deg, rgba(244,236,215,0.98), rgba(234,220,191,0.96));
  display:grid;
  gap:10px;
  text-align:center;
  color:#2d2517;
  position:relative;
}

.tq-reward-card::before{
  content:"";
  position:absolute;
  inset:6px;
  border:1px solid rgba(199,153,82,0.44);
  border-radius:12px;
  pointer-events:none;
}

.tq-reward-card.is-unlocked{
  border-color:rgba(94, 208, 160, 0.65);
  box-shadow:0 0 0 2px rgba(94, 208, 160, 0.2), 0 18px 34px rgba(2, 8, 24, 0.42);
}

.tq-reward-card.is-reveal{ animation:tqRewardReveal .55s ease; }

@keyframes tqRewardReveal{
  0%{ transform:scale(0.985); filter:brightness(0.9); }
  60%{ transform:scale(1.01); filter:brightness(1.08); }
  100%{ transform:scale(1); filter:brightness(1); }
}

.tq-reward-reveal{
  border:1px solid rgba(94, 208, 160, 0.45);
  background:rgba(94, 208, 160, 0.14);
  color:#ccffe8;
  border-radius:999px;
  padding:4px 10px;
  font-size:11px;
  font-weight:700;
  width:fit-content;
  justify-self:center;
}

.tq-reward-tile{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.2);
  aspect-ratio:2 / 3;
  width:min(100%, 320px);
  max-height:min(62dvh, 540px);
  margin:0 auto;
  background:linear-gradient(160deg, rgba(35, 48, 88, 0.92), rgba(15, 21, 42, 0.92));
}

.tq-reward-art{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:8px;
}

.tq-reward-art-img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
}

.tq-reward-art--fallback{
  padding:0;
}

.tq-reward-art--fallback .tq-reward-art-img{
  object-fit:cover;
}

.tq-reward-overlay{
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg, rgba(7, 12, 22, 0.08) 0%, rgba(7, 12, 22, 0.68) 72%, rgba(7, 12, 22, 0.86) 100%),
    radial-gradient(65% 45% at 50% 7%, rgba(231, 195, 122, 0.32), transparent 70%);
}

.tq-reward-rarity{
  position:absolute;
  left:10px;
  bottom:10px;
  z-index:2;
  border:1px solid rgba(231, 195, 122, 0.55);
  background:rgba(7, 12, 22, 0.72);
  color:#ffe6b2;
  border-radius:999px;
  padding:4px 9px;
  font-size:10px;
  font-weight:800;
  letter-spacing:0.06em;
}

.tq-reward-head{ display:flex; justify-content:center; align-items:center; gap:8px; flex-wrap:wrap; }
.tq-reward-title{ font-size:13px; font-weight:700; color:#3c3121; }
.tq-reward-name{
  font-size:19px;
  font-weight:900;
  line-height:1.3;
  color:#2d2517;
  font-family:"Noto Serif TC","Songti TC","Noto Sans TC",serif;
}
.tq-reward-meta{ color:#4f402d; font-size:12px; }
.tq-reward-meta--center{ margin-inline:auto; max-width:280px; }
.tq-reward-state{ font-size:12px; color:#1c5d4f; font-weight:800; }
.tq-reward-requirement{
  font-size:11px;
  color:#5f4f37;
  border-top:1px solid rgba(139,108,57,0.25);
  margin-top:2px;
  padding-top:8px;
}

.tq-reward-cta{
  min-height:46px;
  border-radius:12px;
  border:1px solid rgba(231,195,122,0.6);
  background:linear-gradient(125deg, #cb9233 0%, #e5ba68 46%, #f2daaa 100%);
  color:#2d2213;
  font-size:14px;
  font-weight:800;
  box-shadow:0 10px 20px rgba(174,122,26,0.28), inset 0 1px 0 rgba(255,248,227,0.3);
}

.tq-reward-cta:active{
  transform:translateY(1px);
}

.tq-reward-cta.is-claim{
  border-color:rgba(121,211,174,0.6);
  box-shadow:0 10px 22px rgba(121,211,174,0.2), inset 0 1px 0 rgba(255,255,255,0.24);
}

/* ===== Phase 3D RPG Skin Overrides ===== */
.tq-topbar{
  border-width:2px;
  border-color:rgba(212,166,89,0.86);
  border-radius:20px;
  padding:10px 12px 9px;
  background:
    linear-gradient(165deg, rgba(246,237,216,0.98), rgba(230,213,176,0.98)),
    radial-gradient(120% 60% at 50% -20%, rgba(255,248,224,0.26), transparent 70%);
  box-shadow:0 14px 30px rgba(3,9,20,0.38), inset 0 0 0 2px rgba(29,97,80,0.22);
}

.tq-topbar .tq-title{
  font-family:var(--tq-font-display);
  font-size:15px;
  font-weight:900;
}

.tq-topbar .tq-subtitle{
  font-size:10px;
  color:#4a3c27;
}

.tq-head-emblem{
  width:36px;
  height:36px;
  border:2px solid rgba(227,186,112,0.92);
  box-shadow:0 6px 14px rgba(8,26,22,0.32), inset 0 1px 0 rgba(255,245,214,0.28);
}

.tq-badge{
  border-width:2px;
  font-size:10px;
}

.tq-progress-track{
  height:8px;
  border:1px solid rgba(149,113,55,0.4);
  background:linear-gradient(180deg, rgba(20,68,57,0.28), rgba(16,52,43,0.2));
}

.tq-command-panel{
  gap:10px;
}

.tq-objective-card{
  border-width:2px;
  border-color:rgba(211,161,84,0.88);
  border-radius:18px;
  padding:10px 11px;
  background:linear-gradient(160deg, rgba(26,88,72,0.98), rgba(13,49,40,0.98));
  box-shadow:var(--tq-shadow-panel);
}

.tq-objective-head{
  padding-bottom:2px;
}

.tq-objective-kicker{
  color:#f6e5c1;
  letter-spacing:.12em;
}

.tq-objective-collapse-btn{
  min-height:31px;
  border-width:1px;
  box-shadow:0 6px 10px rgba(12,24,39,0.24), inset 0 1px 0 rgba(255,255,255,0.52);
}

.tq-objective-body{
  border-width:2px;
  border-radius:14px;
  padding:9px;
  background:
    linear-gradient(162deg, rgba(247,238,218,0.99), rgba(232,214,177,0.99)),
    radial-gradient(140% 80% at 0 0, rgba(255,255,255,0.22), transparent 70%);
}

.tq-action-thumb{
  width:64px;
  height:95px;
  border-width:2px;
  box-shadow:0 10px 18px rgba(17,48,40,0.28);
}

.tq-action-title{
  font-family:var(--tq-font-display);
  font-size:17px;
  font-weight:900;
  color:#2a2012;
}

.tq-action-sub{
  font-size:12px;
  color:#4a3a24;
  line-height:1.34;
}

.tq-action-pill{
  padding:4px 9px;
  font-size:10px;
  border-width:1px;
  background:linear-gradient(150deg, rgba(28,92,76,0.98), rgba(16,60,50,0.98));
  color:#fff4dc;
}

.tq-dock{
  gap:7px;
}

.tq-action-primary{
  min-height:48px;
  border-width:2px;
  border-radius:15px;
  font-size:16px;
  letter-spacing:.03em;
  background:linear-gradient(180deg, #f3ddae 0%, #dfb366 46%, #ab742f 100%);
}

.tq-dock-secondary{
  border:2px solid rgba(208,163,88,0.8);
  border-radius:16px;
  overflow:hidden;
  gap:0;
  background:
    linear-gradient(165deg, rgba(247,238,218,0.99), rgba(230,211,173,0.99)),
    radial-gradient(130% 100% at 50% -20%, rgba(255,255,255,0.25), transparent 70%);
  box-shadow:0 10px 20px rgba(5,12,28,0.25), inset 0 1px 0 rgba(255,255,255,0.6);
}

.tq-dock-secondary::before{
  display:none;
}

.tq-dock-btn{
  min-height:50px;
  border:none;
  border-left:1px solid rgba(188,145,74,0.52);
  border-radius:0;
  background:transparent;
  padding:5px 0 3px;
}

.tq-dock-btn:first-child{
  border-left:none;
}

.tq-dock-btn.is-active{
  background:linear-gradient(180deg, rgba(28,92,76,0.22), rgba(24,78,64,0.12));
  box-shadow:inset 0 -3px 0 rgba(31,102,84,0.48);
}

.tq-dock-btn.is-active .tq-dock-label{
  color:#18453b;
}

.tq-dock-btn.is-unlocked,
.tq-dock-btn.is-unlocked .tq-dock-label{
  color:#18453b;
}

.tq-dock-ico{
  width:20px;
  height:20px;
  background-size:19px 19px;
}

.tq-dock-label{
  font-size:10px;
  font-weight:800;
  color:#322515;
}

.tq-sheet{
  width:min(430px, calc(100vw - 12px));
  max-height:74dvh;
  border-radius:24px 24px 0 0;
  border-width:2px;
  border-bottom:none;
  background:linear-gradient(170deg, rgba(26,88,72,0.98), rgba(13,49,40,0.98));
  box-shadow:0 26px 44px rgba(2,8,18,0.56);
}

.tq-sheet::before{
  inset:5px 5px 0 5px;
  border-width:1px;
  border-color:rgba(239,211,153,0.5);
}

.tq-sheet-head{
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:62px;
  max-height:72px;
  padding:10px 14px;
  border-bottom:1px solid rgba(210,164,89,0.62);
  overflow:hidden;
}

.tq-sheet-head h3{
  margin:0;
  min-width:0;
  flex:1 1 auto;
  font-family:var(--tq-font-display);
  font-size:20px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:.02em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-sheet-head-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
}

.tq-sheet-close,
.tq-sheet-collapse{
  box-sizing:border-box;
  width:36px;
  min-width:36px;
  height:36px;
  min-height:36px;
  max-height:36px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  font-size:18px;
  border-radius:999px;
}

.tq-sheet-collapse{
  font-size:16px;
}

.tq-sheet-body{
  border-radius:14px 14px 0 0;
  border:1px solid rgba(191,143,73,0.58);
  background:linear-gradient(165deg, rgba(246,237,216,0.99), rgba(232,216,183,0.98));
  margin-top:0;
  padding-top:12px;
}

.tq-sheet--quest .tq-sheet-head,
.tq-sheet--bag .tq-sheet-head,
.tq-sheet--reward .tq-sheet-head{
  min-height:62px;
  max-height:72px;
}

.tq-step{
  border-width:2px;
  border-radius:14px;
  padding:12px;
  box-shadow:0 9px 18px rgba(8,17,33,0.14);
}

.tq-step-title{
  font-size:15px;
  font-family:var(--tq-font-display);
}

.tq-step small{
  color:#473a25;
}

.tq-pill{
  border-width:1px;
  font-size:10px;
}

.tq-step.is-done .tq-pill{
  background:linear-gradient(150deg, rgba(31,101,83,0.98), rgba(20,74,61,0.98));
}

.tq-step.is-current{
  border-color:rgba(210,163,88,0.92);
  box-shadow:0 0 0 2px rgba(210,163,88,0.24), 0 12px 18px rgba(5,12,26,0.2);
}

.tq-inv-grid{
  gap:11px;
}

.tq-inv-slot{
  border-width:2px;
  border-radius:14px;
  padding:9px;
}

.tq-inv-slot-frame{
  min-height:110px;
  border-width:2px;
}

.tq-inv-icon{
  width:76px;
  height:76px;
  border-width:2px;
}

.tq-inv-count{
  top:7px;
  right:7px;
  font-size:10px;
}

.tq-inv-state{
  left:7px;
  bottom:7px;
}

.tq-inv-name{
  font-family:var(--tq-font-display);
  font-size:14px;
}

.tq-reward-card{
  border-width:2px;
  border-radius:18px;
  padding:13px;
}

.tq-reward-title{
  font-size:14px;
  font-family:var(--tq-font-display);
}

.tq-reward-name{
  font-size:22px;
}

.tq-reward-rarity{
  font-size:10px;
}

.tq-reward-cta{
  min-height:48px;
  border-width:2px;
  border-radius:14px;
  font-size:16px;
}

.tq-message{
  color:#493720;
  background:rgba(246,236,214,0.95);
  border-color:rgba(194,148,78,0.6);
}

/* ===== Phase 3G Mini UI Kit Safe Integration ===== */
.tq-sheet{
  overflow:visible;
}

.tq-sheet::after,
.tq-step::before{
  content:"";
  position:absolute;
  left:6px;
  top:6px;
  width:24px;
  height:24px;
  background-image:var(--tq-kit-panel-corner-gold);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
  opacity:.18;
  pointer-events:none;
  z-index:1;
}

.tq-step::after{
  content:"";
  position:absolute;
  right:6px;
  bottom:6px;
  width:24px;
  height:24px;
  background-image:var(--tq-kit-panel-corner-gold);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
  transform:rotate(180deg);
  opacity:.16;
  pointer-events:none;
  z-index:1;
}

.tq-step::before,
.tq-step::after{
  display:none;
}

.tq-sheet-head h3{
  position:relative;
  z-index:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:4px 18px;
}

.tq-sheet-head h3::before{
  content:"";
  position:absolute;
  inset:-2px -12px;
  background-image:var(--tq-kit-header-plaque-emerald);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
  opacity:.5;
  pointer-events:none;
  z-index:-1;
}

.tq-pill,
.tq-action-pill,
.tq-reward-rarity{
  background-image:none;
  color:#fff2d4;
  border-color:rgba(173,127,58,0.82);
  background-color:rgba(22,78,64,0.96);
  text-shadow:none;
}

.tq-step.is-current .tq-pill,
.tq-step.is-done .tq-pill,
.tq-step.is-locked .tq-pill{
  background-image:none;
}

.tq-step.is-locked .tq-pill{
  color:#efe4c8;
  background-color:rgba(90,84,69,0.94);
  border-color:rgba(146,126,93,0.8);
}

.tq-inv-slot-frame{
  background-image:var(--tq-kit-item-slot-frame), linear-gradient(160deg, rgba(251,244,230,0.96), rgba(241,228,198,0.94));
  background-repeat:no-repeat,no-repeat;
  background-size:contain,auto;
  background-position:center,center;
}

.tq-inv-slot-frame > *{
  position:relative;
  z-index:1;
}

.tq-sheet-close,
.tq-sheet-collapse{
  background-image:var(--tq-kit-close-medallion), linear-gradient(170deg, rgba(248,239,220,0.98), rgba(229,211,172,0.98));
  background-repeat:no-repeat,no-repeat;
  background-size:contain,auto;
  background-position:center,center;
  border-color:rgba(0,0,0,0);
  color:#2f2414;
}

.tq-dock-btn + .tq-dock-btn{
  position:relative;
}

.tq-dock-btn + .tq-dock-btn::before{
  content:"";
  position:absolute;
  left:-1px;
  top:8px;
  bottom:8px;
  width:1px;
  background:linear-gradient(180deg, rgba(219,178,106,0.08), rgba(219,178,106,0.68) 50%, rgba(219,178,106,0.08));
  pointer-events:none;
}

.tq-message{
  font-size:12px;
  color:#3f3323;
  border-radius:9px;
  padding:3px 6px;
  background:rgba(247,239,223,0.88);
  border:1px solid rgba(196,151,79,0.42);
}

#questSheet .tq-sheet-body,
#bagSheet .tq-sheet-body,
#rewardSheet .tq-sheet-body{
  padding-bottom:calc(env(safe-area-inset-bottom, 0px) + 16px);
}
.tq-message.is-error{
  color:#ffd1dc;
  background:rgba(95, 21, 40, 0.34);
  border:1px solid rgba(255, 132, 163, 0.38);
}
.tq-message.is-ok{
  color:#d5f7e8;
  background:rgba(12, 56, 44, 0.34);
  border:1px solid rgba(121,211,174,0.38);
}

/* ===== Phase 4B HUD-only Redesign ===== */
.tq-topbar{
  top:calc(env(safe-area-inset-top, 0px) + 4px);
  min-height:72px;
  max-height:92px;
  padding:8px 12px 8px;
  gap:6px;
  border:2px solid rgba(212,166,89,0.88);
  border-radius:20px;
  background:
    linear-gradient(160deg, rgba(247,239,222,0.98), rgba(233,218,188,0.98)),
    radial-gradient(90% 66% at 50% 8%, rgba(255,247,227,0.28), rgba(255,247,227,0));
  box-shadow:
    0 14px 28px rgba(4,9,20,0.34),
    inset 0 1px 0 rgba(255,250,236,0.72),
    inset 0 -2px 0 rgba(145,103,46,0.18);
}

.tq-topbar::before{
  inset:3px;
  border-radius:16px;
  border:1px solid rgba(164,122,61,0.44);
}

.tq-head-row{
  display:grid;
  grid-template-columns:auto 1fr auto auto;
  align-items:center;
  gap:8px;
}

.tq-head-emblem{
  width:38px;
  height:38px;
  border-radius:999px;
  border:2px solid rgba(223,181,103,0.95);
  color:#fff0d0;
  background:
    radial-gradient(circle at 35% 30%, #2f9b80 0%, #1d6e5c 48%, #12473b 100%);
  box-shadow:
    0 7px 14px rgba(8,27,22,0.32),
    inset 0 1px 0 rgba(255,241,211,0.34),
    inset 0 -2px 0 rgba(8,43,35,0.24);
}

.tq-topbar .tq-title{
  font-family:var(--tq-font-display);
  font-size:16px;
  line-height:1.14;
  letter-spacing:.01em;
  color:#2a2012;
}

.tq-topbar .tq-subtitle{
  font-size:10px;
  line-height:1.2;
  color:#4d3c24;
}

.tq-badge{
  min-height:28px;
  padding:4px 10px 3px;
  border:1px solid rgba(203,158,82,0.74);
  border-radius:999px;
  color:#fff2d8;
  font-size:10px;
  font-weight:900;
  background:
    linear-gradient(160deg, rgba(29,99,82,0.98), rgba(14,57,47,0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,241,210,0.2),
    0 4px 10px rgba(9,23,19,0.2);
}

.tq-hud-icon{
  width:32px;
  height:32px;
  border-radius:999px;
  border:1px solid rgba(210,163,88,0.84);
  background:
    radial-gradient(circle at 35% 28%, #2b957a 0%, #1a6a57 46%, #0f483b 100%);
  box-shadow:
    0 5px 12px rgba(6,20,18,0.28),
    inset 0 1px 0 rgba(250,240,214,0.28);
}

.tq-progress-inline{
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:8px;
}

.tq-progress-label{
  min-width:40px;
  font-size:11px;
  font-weight:900;
  color:#3d301b;
}

.tq-progress-track{
  height:8px;
  border-radius:999px;
  border:1px solid rgba(150,112,54,0.5);
  background:
    linear-gradient(180deg, rgba(17,62,51,0.3), rgba(15,52,43,0.22));
  box-shadow:inset 0 1px 1px rgba(8,26,21,0.25);
}

.tq-progress-fill{
  background:
    linear-gradient(90deg, #1a6a57 0%, #2f8f74 38%, #d0a45d 86%, #f1d6a5 100%);
  box-shadow:
    0 0 10px rgba(196,146,68,0.26),
    inset 0 1px 0 rgba(251,241,216,0.22);
}

/* ===== Phase 4C Objective + CTA Only ===== */
.tq-objective-card{
  border:2px solid rgba(213,168,92,0.9);
  border-radius:20px;
  background:
    linear-gradient(162deg, rgba(27,92,76,0.98), rgba(14,53,44,0.98));
  box-shadow:
    0 16px 28px rgba(4,11,24,0.34),
    inset 0 1px 0 rgba(248,236,207,0.22),
    inset 0 -2px 0 rgba(10,39,32,0.36);
  padding:10px 11px 11px;
  gap:7px;
}

.tq-objective-card::before{
  content:"";
  position:absolute;
  inset:4px;
  border-radius:15px;
  border:1px solid rgba(245,218,163,0.36);
  pointer-events:none;
}

.tq-objective-card::after{
  display:none;
}

.tq-objective-head{
  min-height:30px;
  align-items:center;
  padding-bottom:1px;
}

.tq-objective-kicker{
  color:#f8e5b8;
  letter-spacing:.14em;
  font-size:10px;
  font-weight:900;
}

.tq-objective-collapse-btn{
  min-height:30px;
  border-radius:999px;
  border:1px solid rgba(220,176,103,0.74);
  background:linear-gradient(150deg, rgba(245,236,216,0.98), rgba(233,219,188,0.98));
  color:#1f5d4c;
  font-size:10px;
  font-weight:900;
  padding:0 9px;
}

.tq-objective-body{
  border:1px solid rgba(205,159,86,0.78);
  border-radius:15px;
  padding:10px 10px;
  grid-template-columns:68px minmax(0,1fr);
  gap:10px;
  align-items:center;
  background:
    linear-gradient(164deg, rgba(248,240,223,0.99), rgba(233,217,184,0.98)),
    radial-gradient(130% 90% at 4% 0%, rgba(255,255,255,0.24), rgba(255,255,255,0));
  box-shadow:
    inset 0 1px 0 rgba(255,250,236,0.6),
    inset 0 -1px 0 rgba(163,121,59,0.2);
}

.tq-action-thumb{
  width:68px;
  height:100px;
  border-radius:11px;
  border:2px solid rgba(199,152,81,0.78);
  background:linear-gradient(154deg, rgba(20,72,60,0.75), rgba(14,50,42,0.72));
  transform:rotate(-5deg);
  box-shadow:0 12px 18px rgba(14,42,35,0.28);
}

.tq-action-copy{
  gap:5px;
}

.tq-action-title{
  font-family:var(--tq-font-display);
  font-size:19px;
  line-height:1.18;
  letter-spacing:.01em;
  color:#2a2012;
  font-weight:900;
}

.tq-action-sub{
  font-size:12px;
  line-height:1.35;
  color:#4a3a24;
  min-height:30px;
}

.tq-action-pill{
  border-radius:999px;
  border:1px solid rgba(178,133,61,0.86);
  background:linear-gradient(148deg, rgba(23,88,72,0.98), rgba(15,61,50,0.98));
  color:#fff2d4;
  font-size:11px;
  font-weight:900;
  padding:4px 10px;
  letter-spacing:.02em;
  box-shadow:inset 0 1px 0 rgba(255,244,218,0.18);
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  padding:8px 10px;
  gap:5px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-body{
  grid-template-columns:1fr;
  padding:7px 9px;
  min-height:42px;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  font-size:15px;
  line-height:1.18;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  font-size:10px;
  padding:3px 8px;
}

.tq-action-primary{
  width:100%;
  min-height:52px;
  border-radius:16px;
  border:2px solid rgba(190,142,67,0.86);
  background:
    linear-gradient(180deg, #f7e1b4 0%, #e1b568 45%, #ae772f 100%);
  color:#2b1d08;
  font-size:17px;
  font-weight:900;
  letter-spacing:.02em;
  box-shadow:
    0 14px 24px rgba(151,103,27,0.32),
    inset 0 1px 0 rgba(255,250,235,0.75),
    inset 0 -3px 0 rgba(128,82,25,0.3);
  transition:transform .12s ease, box-shadow .18s ease, filter .18s ease;
}

.tq-action-primary:active{
  transform:translateY(1px) scale(.996);
  box-shadow:
    0 8px 14px rgba(151,103,27,0.25),
    inset 0 1px 0 rgba(255,250,235,0.55),
    inset 0 -2px 0 rgba(128,82,25,0.24);
  filter:brightness(.98);
}

/* ===== Phase 4C-1 State Cleanup ===== */
.tq-sheet{
  max-height:74dvh;
}

.tq-sheet-head{
  min-height:58px;
  max-height:66px;
  padding:9px 12px;
}

.tq-sheet-head h3{
  font-size:18px;
}

.tq-sheet-head-actions{
  gap:6px;
}

.tq-sheet-close,
.tq-sheet-collapse{
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
  max-height:34px;
}

.tq-sheet-collapse{
  background-image:none;
  border:1px solid rgba(191,145,75,0.74);
  background-color:rgba(245,236,216,0.96);
  color:#2c2112;
  font-size:14px;
  font-weight:900;
}

.tq-sheet--reward{
  max-height:74dvh;
}

.tq-sheet--reward .tq-sheet-body{
  overflow:auto;
}

.tq-sheet--reward .tq-reward-tile{
  width:min(100%, 260px);
  max-height:48dvh;
}

.tq-sheet--reward .tq-reward-card{
  gap:8px;
}

.tq-sheet--reward .tq-reward-name{
  font-size:20px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  padding:6px 9px;
  gap:4px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-head{
  min-height:24px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-body{
  padding:5px 8px;
  min-height:34px;
  gap:3px;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  font-size:14px;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  font-size:9px;
  padding:2px 7px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  min-height:24px;
  font-size:9px;
  padding:0 7px;
  border-color:rgba(186,144,77,0.62);
  background:linear-gradient(150deg, rgba(243,234,212,0.9), rgba(229,214,181,0.9));
}

.tq-dock-btn{
  align-content:center;
}

.tq-dock-label{
  margin-top:1px;
}

.tq-dock-btn.is-unlocked::after{
  content:"✓";
  right:6px;
  top:4px;
  min-width:14px;
  width:14px;
  height:14px;
  border-radius:999px;
  padding:0;
  line-height:12px;
  font-size:10px;
  border:1px solid rgba(157,119,58,0.82);
  background:linear-gradient(145deg, rgba(249,239,218,0.98), rgba(234,216,180,0.98));
  color:#2f2314;
}

.tq-step{
  padding:11px 11px 11px 12px;
}

.tq-step-top{
  align-items:flex-start;
}

.tq-step-title{
  font-size:15px;
  line-height:1.24;
  color:#2a1f12;
  font-weight:900;
}

.tq-step small{
  color:#4a3923;
  line-height:1.4;
}

.tq-step-meta-item{
  color:#5a4a35;
}

.tq-step.is-done{
  border-color:rgba(30,104,86,0.72);
  background:linear-gradient(162deg, rgba(241,234,217,0.98), rgba(228,218,193,0.96));
}

.tq-step.is-current{
  border-color:rgba(209,162,86,0.94);
  background:linear-gradient(160deg, rgba(250,244,231,0.99), rgba(242,232,206,0.98));
}

.tq-step.is-locked{
  opacity:0.78;
}

.tq-step.is-done .tq-pill{
  border-color:rgba(28,101,83,0.82);
  background:linear-gradient(150deg, rgba(26,96,79,0.98), rgba(18,73,61,0.98));
  color:#fff2d4;
}

.tq-step.is-current .tq-pill{
  border-color:rgba(184,138,66,0.88);
  background:linear-gradient(150deg, rgba(25,88,73,0.96), rgba(17,65,54,0.96));
  color:#fff2d4;
}

/* ===== Phase 4C-2 Drawer/Header/Bag/Dock Cleanup ===== */
.tq-sheet{
  max-height:74dvh;
}

.tq-sheet-head{
  min-height:56px;
  max-height:64px;
  padding:8px 12px;
  background:linear-gradient(170deg, rgba(23,84,69,0.98), rgba(15,58,48,0.98));
  border-bottom:1px solid rgba(210,164,89,0.62);
}

.tq-sheet-head h3{
  font-size:17px;
  line-height:1.1;
  color:#f7e8c5;
}

.tq-sheet-head h3::before{
  display:none;
}

.tq-sheet-head-actions{
  gap:6px;
}

.tq-sheet-close,
.tq-sheet-collapse{
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
  max-height:34px;
  background-image:none;
  background-color:rgba(246,236,214,0.98);
  border:1px solid rgba(197,151,81,0.82);
  color:#2e2314;
  box-shadow:0 4px 8px rgba(10,22,20,0.2), inset 0 1px 0 rgba(255,250,236,0.62);
}

.tq-sheet-body{
  padding-top:10px;
}

.tq-objective-card::before,
.tq-objective-card::after{
  display:none !important;
}

.tq-objective-kicker{
  position:relative;
}

.tq-objective-kicker::before,
.tq-objective-kicker::after{
  content:none !important;
}

.tq-inv-grid{
  gap:10px;
}

.tq-inv-slot{
  border:1px solid rgba(26,95,78,0.32);
  background:linear-gradient(165deg, rgba(246,237,217,0.98), rgba(235,223,194,0.96));
  box-shadow:0 8px 14px rgba(7,16,32,0.12), inset 0 1px 0 rgba(255,250,238,0.65);
}

.tq-inv-slot-frame{
  min-height:96px;
  border:1px solid rgba(189,148,79,0.52);
  background-image:none;
  background-color:rgba(247,239,223,0.96);
  box-shadow:inset 0 1px 0 rgba(255,252,243,0.62);
}

.tq-inv-icon{
  width:64px;
  height:64px;
  border:1px solid rgba(26,95,78,0.28);
  background:linear-gradient(160deg, rgba(250,244,232,0.97), rgba(238,227,199,0.95));
  box-shadow:none;
}

.tq-inv-count{
  right:7px;
  top:7px;
  z-index:2;
}

.tq-inv-state{
  left:7px;
  bottom:7px;
  z-index:2;
}

.tq-inv-name{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-dock-ico{
  width:18px;
  height:18px;
  background-size:18px 18px;
}

.tq-dock-ico--move{
  background-image:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231c5f4f' d='m12 2 3.6 3.6-2.2 2.2 2.1 2.1 2.2-2.2L21 11l-3.3 3.3-2.2-2.2-2.1 2.1 2.2 2.2L12 20l-3.6-3.6 2.2-2.2-2.1-2.1-2.2 2.2L3 11l3.3-3.3 2.2 2.2 2.1-2.1-2.2-2.2z'/%3E%3C/svg%3E\");
}

.tq-dock-ico--quest{
  background-image:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='3.5' width='14' height='17' rx='2.5' fill='%231c5f4f'/%3E%3Crect x='8' y='7' width='8' height='1.8' fill='%23f6e9c8'/%3E%3Crect x='8' y='10.8' width='8' height='1.8' fill='%23f6e9c8'/%3E%3Cpath d='m8.4 15.3 1.5 1.5 3.5-3.5' fill='none' stroke='%23f6e9c8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");
}

.tq-dock-ico--bag{
  background-image:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231c5f4f' d='M7 8V7a5 5 0 0 1 10 0v1h1.8c.7 0 1.2.5 1.2 1.2v10.1c0 .7-.5 1.2-1.2 1.2H5.2c-.7 0-1.2-.5-1.2-1.2V9.2C4 8.5 4.5 8 5.2 8zm2 0h6V7a3 3 0 1 0-6 0z'/%3E%3C/svg%3E\");
}

.tq-dock-ico--reward{
  background-image:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4.5' y='5.5' width='15' height='13' rx='2.3' fill='%231c5f4f'/%3E%3Cpath d='M9 5.5c0-1.2.9-2 2-2 1.2 0 2 .9 2 2' fill='none' stroke='%23f6e9c8' stroke-width='1.4'/%3E%3Cpath d='M7.2 9.4h9.6M12 9.4v8.8' stroke='%23f6e9c8' stroke-width='1.4'/%3E%3C/svg%3E\");
}

.tq-dock-btn.is-unlocked::after{
  right:5px;
  top:3px;
  width:13px;
  min-width:13px;
  height:13px;
  line-height:11px;
  font-size:9px;
}

/* ===== Phase 4C-3 Integrated Drawer + Bag Slot Rebuild ===== */
.tq-sheet{
  max-height:76dvh;
  border:2px solid rgba(207,162,88,0.82);
  border-bottom:none;
  border-radius:24px 24px 0 0;
  background:linear-gradient(168deg, rgba(25,88,72,0.98), rgba(14,54,45,0.98));
  box-shadow:0 24px 42px rgba(2,8,20,0.56), inset 0 1px 0 rgba(250,238,210,0.2);
}

.tq-sheet::before{
  display:block;
  inset:6px 6px 0 6px;
  border-radius:16px 16px 0 0;
  border:1px solid rgba(237,204,143,0.42);
}

.tq-sheet-head{
  position:relative;
  min-height:0;
  max-height:none;
  padding:10px 14px 6px;
  background:transparent;
  border-bottom:none;
  justify-content:center;
}

.tq-sheet-head h3{
  width:100%;
  text-align:center;
  font-family:var(--tq-font-display);
  font-size:22px;
  line-height:1.15;
  letter-spacing:.02em;
  color:#f5e5bf;
  text-shadow:0 1px 0 rgba(0,0,0,0.16);
  padding:0 92px 0 12px;
}

.tq-sheet-head h3::before{
  display:none;
}

.tq-sheet-head-actions{
  position:absolute;
  right:10px;
  top:8px;
  display:flex;
  align-items:center;
  gap:7px;
}

.tq-sheet-close,
.tq-sheet-collapse{
  width:39px;
  min-width:39px;
  height:39px;
  min-height:39px;
  max-height:39px;
  border-radius:999px;
  border:1px solid rgba(199,154,83,0.82);
  background:linear-gradient(160deg, rgba(246,236,214,0.98), rgba(232,218,186,0.98));
  color:#2f2415;
  font-size:18px;
  line-height:1;
  box-shadow:0 6px 12px rgba(7,17,31,0.24), inset 0 1px 0 rgba(255,251,240,0.62);
}

.tq-sheet-collapse{
  font-size:15px;
}

.tq-sheet-body{
  margin-top:0;
  border-radius:16px 16px 0 0;
  border:1px solid rgba(195,149,78,0.58);
  background:linear-gradient(166deg, rgba(246,237,216,0.99), rgba(233,218,185,0.98));
  padding:12px 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
  overflow:auto;
}

#questSheet.is-collapsed{
  max-height:78px;
}

#questSheet.is-collapsed .tq-sheet-head{
  padding:12px 14px 10px;
}

.tq-inv-grid{
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  align-items:stretch;
}

.tq-inv-slot{
  position:relative;
  min-height:156px;
  border-radius:18px;
  border:1px solid rgba(27,94,77,0.34);
  background:linear-gradient(166deg, rgba(247,239,220,0.99), rgba(233,220,190,0.98));
  box-shadow:0 9px 16px rgba(7,16,34,0.14), inset 0 1px 0 rgba(255,252,242,0.64);
  padding:10px 10px 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  overflow:hidden;
}

.tq-inv-slot::before,
.tq-inv-slot::after{
  content:none !important;
}

.tq-inv-slot-frame{
  width:100%;
  min-height:0;
  border:none;
  background:none;
  box-shadow:none;
  border-radius:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  padding-top:2px;
  overflow:visible;
}

.tq-inv-icon{
  width:76px;
  height:76px;
  border-radius:16px;
  border:1px solid rgba(189,148,79,0.62);
  background:linear-gradient(164deg, rgba(250,245,234,0.98), rgba(238,227,199,0.96));
  box-shadow:inset 0 1px 0 rgba(255,253,246,0.66);
  display:grid;
  place-items:center;
  overflow:hidden;
}

.tq-inv-icon img{
  width:82%;
  height:82%;
  object-fit:contain;
  object-position:center;
}

.tq-inv-count{
  position:absolute;
  top:10px;
  right:10px;
  z-index:3;
  min-width:26px;
  height:18px;
  border-radius:999px;
  border:1px solid rgba(184,141,71,0.72);
  background:linear-gradient(155deg, rgba(249,241,223,0.99), rgba(233,219,187,0.98));
  color:#342814;
  font-size:10px;
  font-weight:900;
  line-height:16px;
  text-align:center;
  padding:0 6px;
}

.tq-inv-state{
  position:static;
  align-self:center;
  min-height:20px;
  border-radius:999px;
  padding:2px 8px;
  font-size:10px;
  font-weight:800;
  line-height:1.3;
  border:1px solid rgba(185,142,74,0.56);
  background:rgba(241,232,211,0.92);
  color:#4d3e29;
}

.tq-inv-slot.is-owned .tq-inv-state{
  border-color:rgba(28,101,83,0.74);
  background:linear-gradient(150deg, rgba(27,95,79,0.98), rgba(18,72,60,0.98));
  color:#fff2d4;
}

.tq-inv-slot.is-locked{
  opacity:1;
  border-color:rgba(166,146,113,0.5);
  background:linear-gradient(166deg, rgba(238,229,208,0.96), rgba(224,211,181,0.94));
}

.tq-inv-slot.is-locked .tq-inv-icon img{
  filter:saturate(.68) brightness(.86);
}

.tq-inv-name{
  margin-top:auto;
  width:100%;
  text-align:center;
  color:#2c2113;
  font-size:13px;
  font-weight:900;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  word-break:break-word;
  min-height:32px;
}

/* ===== Phase 4D Bottom Dock Only ===== */
.tq-dock{
  gap:8px;
}

.tq-dock-secondary{
  border:2px solid rgba(206,160,86,0.84);
  border-radius:18px;
  overflow:hidden;
  background:
    linear-gradient(165deg, rgba(247,238,218,0.99), rgba(230,211,173,0.99)),
    radial-gradient(130% 100% at 50% -20%, rgba(255,255,255,0.26), rgba(255,255,255,0));
  box-shadow:
    0 10px 20px rgba(5,12,28,0.24),
    inset 0 1px 0 rgba(255,252,240,0.7),
    inset 0 -2px 0 rgba(151,111,54,0.18);
}

.tq-dock-btn{
  min-height:54px;
  padding:6px 0 4px;
  border-left:1px solid rgba(188,145,74,0.46);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:4px;
}

.tq-dock-btn:first-child{
  border-left:none;
}

.tq-dock-ico{
  display:none !important;
}

.tq-dock-svg{
  width:24px;
  height:24px;
  color:#1c5f4f;
  stroke:currentColor;
  fill:none;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex:0 0 auto;
  filter:drop-shadow(0 1px 0 rgba(255,238,200,0.25));
  pointer-events:none;
}

.tq-dock-svg--move path:first-of-type{
  fill:#c79a53;
  stroke:none;
}

.tq-dock-label{
  font-size:10px;
  line-height:1.05;
  font-weight:900;
  color:#2f2414;
  letter-spacing:.01em;
  text-align:center;
  white-space:nowrap;
}

.tq-dock-btn.is-active{
  background:linear-gradient(180deg, rgba(25,90,75,0.2), rgba(22,78,65,0.1));
  box-shadow:
    inset 0 2px 0 rgba(212,165,89,0.58),
    inset 0 -3px 0 rgba(29,102,84,0.42);
}

.tq-dock-btn.is-active .tq-dock-ico{
  filter:drop-shadow(0 0 4px rgba(31,107,88,0.36));
}

.tq-dock-btn.is-active .tq-dock-svg{
  color:#145142;
  filter:drop-shadow(0 0 4px rgba(31,107,88,0.36));
}

.tq-dock-btn:active{
  transform:translateY(1px);
  filter:brightness(.98);
}

.tq-dock-btn.is-unlocked::after{
  content:\"✓\";
  position:absolute;
  right:8px;
  top:6px;
  width:13px;
  min-width:13px;
  height:13px;
  border-radius:999px;
  border:1px solid rgba(171,128,61,0.84);
  background:linear-gradient(145deg, rgba(249,239,217,0.98), rgba(234,216,180,0.98));
  color:#2f2314;
  font-size:8px;
  line-height:11px;
  font-weight:900;
  text-align:center;
  padding:0;
  z-index:2;
}

/* ===== Phase 4E Reward Drawer Only ===== */
#rewardSheet{
  max-height:75dvh;
}

#rewardSheet .tq-sheet-body{
  padding:10px 12px calc(14px + env(safe-area-inset-bottom));
  overflow:auto;
}

#rewardSheet .tq-reward-card{
  width:100%;
  border-radius:20px;
  border:1px solid rgba(203,158,84,0.76);
  background:
    linear-gradient(175deg, rgba(247,238,220,0.98), rgba(236,221,191,0.98)),
    radial-gradient(120% 92% at 50% -20%, rgba(255,255,255,0.22), rgba(255,255,255,0));
  box-shadow:
    0 16px 34px rgba(2,8,20,.36),
    inset 0 1px 0 rgba(255,246,228,.7),
    inset 0 -2px 0 rgba(124,89,41,.2);
  padding:10px 10px 12px;
  display:grid;
  gap:7px;
}

#rewardSheet .tq-reward-status-wrap{
  display:flex;
  justify-content:center;
}

#rewardSheet .tq-reward-status-pill{
  min-height:24px;
  padding:3px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  letter-spacing:.02em;
  border:1px solid rgba(187,140,68,0.84);
  color:#f6ead2;
  background:linear-gradient(160deg, rgba(30,111,91,0.98), rgba(20,79,65,0.98));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.16);
}

#rewardSheet .tq-reward-status-pill.is-claimable{
  color:#2f2314;
  background:linear-gradient(160deg, rgba(243,206,140,0.98), rgba(217,170,92,0.98));
}

#rewardSheet .tq-reward-status-pill.is-locked{
  color:#e9dcc3;
  border-color:rgba(132,111,81,0.65);
  background:linear-gradient(160deg, rgba(103,95,80,0.92), rgba(84,74,63,0.92));
}

#rewardSheet .tq-reward-tile{
  border-radius:16px;
  width:min(74vw, 300px);
  height:auto;
  min-height:0;
  max-height:none;
  aspect-ratio:auto;
  margin-inline:auto;
  padding:8px 9px 8px;
  display:grid;
  place-items:center;
  background:
    radial-gradient(90% 70% at 50% 20%, rgba(214,168,86,0.16), rgba(214,168,86,0)),
    linear-gradient(180deg, rgba(23,85,71,0.92), rgba(15,56,47,0.95));
  border:1px solid rgba(196,151,80,0.75);
}

#rewardSheet .tq-reward-stage{
  position:relative;
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:clamp(184px, 33dvh, 270px);
  padding-bottom:8px;
  overflow:hidden;
}

#rewardSheet .tq-reward-stage-halo{
  position:absolute;
  left:50%;
  top:42%;
  width:clamp(180px, 50vw, 290px);
  transform:translate(-50%, -50%);
  opacity:.58;
  pointer-events:none;
  z-index:0;
}

#rewardSheet .tq-reward-art{
  width:min(100%, 320px);
  height:auto;
  min-height:0;
  max-height:none;
  aspect-ratio:auto;
  position:relative;
  inset:auto;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  overflow:hidden;
  padding:0;
  background:radial-gradient(120% 100% at 50% 18%, rgba(255,255,255,0.14), rgba(255,255,255,0));
  box-shadow:0 0 0 1px rgba(214,170,93,0.42), 0 12px 22px rgba(3,9,20,0.34);
  z-index:2;
}

#rewardSheet .tq-reward-art-img{
  width:auto;
  height:auto;
  max-width:100%;
  max-height:42dvh;
  object-fit:contain;
  object-position:center;
  display:block;
}

#rewardSheet .tq-reward-stage-pedestal{
  position:absolute;
  left:50%;
  bottom:-26px;
  width:clamp(172px, 54vw, 300px);
  transform:translateX(-50%);
  opacity:.72;
  pointer-events:none;
  z-index:1;
}

#rewardSheet .tq-reward-overlay{
  background:radial-gradient(100% 70% at 50% 14%, rgba(255,225,163,0.16), rgba(255,225,163,0));
  pointer-events:none;
}

#rewardSheet .tq-reward-name{
  font-family:"Noto Serif TC","Songti TC","Noto Sans TC",serif;
  font-size:clamp(18px, 4.6vw, 21px);
  font-weight:900;
  line-height:1.2;
  text-align:center;
  letter-spacing:.02em;
  color:#2a1f11;
  margin-top:0;
}

#rewardSheet .tq-reward-meta-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex-wrap:wrap;
}

#rewardSheet .tq-reward-rarity{
  position:static;
  margin:0;
  font-size:10px;
  letter-spacing:.06em;
}

#rewardSheet .tq-reward-meta{
  color:#4a3a26;
  font-size:11px;
}

#rewardSheet .tq-reward-meta--type{
  font-weight:800;
  color:#2c2316;
}

#rewardSheet .tq-reward-meta--center{
  text-align:center;
  max-width:300px;
  margin-inline:auto;
}

#rewardSheet .tq-reward-state{
  text-align:center;
  color:#165242;
  font-size:11px;
  font-weight:800;
}

#rewardSheet .tq-reward-requirement{
  text-align:center;
  color:#5f503c;
  font-size:10px;
}

#rewardSheet .tq-reward-cta{
  width:100%;
  min-height:46px;
  border-radius:14px;
  font-size:16px;
  font-weight:900;
  letter-spacing:.02em;
}

/* ===== CARD-COLLECTION-1: temple card collection sheet ===== */
#collectionSheet .tq-sheet-head{
  background:linear-gradient(170deg, rgba(13,63,53,0.98), rgba(8,45,38,0.96));
}

#collectionSheet.is-open{
  z-index:70 !important;
}

#collectionSheet .tq-sheet-body{
  padding:10px 12px calc(14px + env(safe-area-inset-bottom));
  overflow:auto;
}

.tq-collection-card{
  border:1px solid rgba(198,154,82,0.74);
  border-radius:16px;
  padding:10px;
  background:
    linear-gradient(168deg, rgba(247,239,221,0.985), rgba(233,219,188,0.975)),
    radial-gradient(120% 80% at 50% -18%, rgba(255,255,255,0.2), rgba(255,255,255,0));
  box-shadow:0 12px 24px rgba(2,8,20,0.24), inset 0 1px 0 rgba(255,248,229,0.58);
  display:grid;
  gap:8px;
}

.tq-collection-thumb{
  width:min(100%, 220px);
  margin:0 auto;
  border-radius:12px;
  overflow:hidden;
  border:1px solid rgba(188,143,72,0.62);
  background:linear-gradient(160deg, rgba(18,70,58,0.94), rgba(11,47,40,0.96));
  box-shadow:0 10px 18px rgba(3,9,20,0.28);
}

.tq-collection-thumb img{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
}

.tq-collection-name{
  margin:0;
  font-size:20px;
  text-align:center;
  color:#2a1f11;
  font-family:var(--tq-font-display);
  font-weight:900;
}

.tq-collection-meta{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px;
}

.tq-collection-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:2px 10px;
  border-radius:999px;
  border:1px solid rgba(192,148,77,0.72);
  background:linear-gradient(160deg, rgba(25,87,73,0.96), rgba(12,52,43,0.96));
  color:#f4e8cb;
  font-size:11px;
  font-weight:900;
  line-height:1;
}

.tq-collection-desc{
  margin:0;
  font-size:12px;
  line-height:1.45;
  color:#4a3b27;
  text-align:center;
}

.tq-collection-card--collectible{
  padding:12px 12px 14px;
  gap:10px;
}

.tq-collection-card-hero{
  position:relative;
  width:min(224px, 76vw);
  margin:2px auto 0;
  aspect-ratio:2 / 3;
  display:grid;
  place-items:center;
}

.tq-collection-card-glow{
  position:absolute;
  inset:-8%;
  width:116%;
  height:116%;
  object-fit:contain;
  pointer-events:none;
  z-index:1;
  opacity:.9;
}

.tq-collection-card-frame{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
  z-index:3;
}

.tq-collection-card-art{
  position:relative;
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:14px;
  box-shadow:0 14px 28px rgba(0, 0, 0, .35);
  z-index:2;
  background:linear-gradient(180deg, rgba(18,38,33,.95), rgba(8,24,20,.95));
}

.tq-collection-card-seal{
  position:absolute;
  top:-5%;
  right:-7%;
  width:min(86px, 28vw);
  height:auto;
  object-fit:contain;
  pointer-events:none;
  z-index:4;
  filter:drop-shadow(0 6px 10px rgba(3,8,16,.32));
}

.tq-collection-card-state{
  position:absolute;
  left:50%;
  bottom:8px;
  transform:translateX(-50%);
  z-index:5;
  min-width:108px;
  padding:5px 12px 6px;
  border-radius:999px;
  border:1px solid rgba(232,194,119,.8);
  background:linear-gradient(170deg, rgba(16,86,72,.96), rgba(10,52,44,.96));
  color:#fff0ce;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  text-align:center;
  box-shadow:0 6px 12px rgba(3,8,16,.3);
}

#rewardSheet .tq-reward-unlock-title-wrap{
  position:relative;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:40px;
}

#rewardSheet .tq-reward-unlock-title-wrap.has-plaque::before{
  content:"";
  position:absolute;
  inset:0 auto auto 50%;
  width:min(86%, 320px);
  height:40px;
  transform:translateX(-50%);
  background-image:var(--tq-reward-title-plaque);
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  opacity:.98;
}

#rewardSheet .tq-reward-unlock-seal{
  position:relative;
  z-index:1;
  width:16px;
  height:16px;
  filter:drop-shadow(0 2px 4px rgba(4,12,20,.22));
}

#rewardSheet .tq-reward-unlock-title{
  position:relative;
  z-index:1;
}

@media (max-width:390px){
  #rewardSheet .tq-sheet-body{
    padding:9px 11px calc(12px + env(safe-area-inset-bottom));
  }
  #rewardSheet .tq-reward-card{
    padding:9px 9px 11px;
    gap:6px;
  }
  #rewardSheet .tq-reward-tile{
    width:min(76vw, 290px);
    padding:7px 8px;
  }
  #rewardSheet .tq-reward-art{
    min-height:0;
    max-height:none;
  }
  #rewardSheet .tq-reward-art-img{
    max-height:40dvh;
  }
}

/* ===== Phase 4F Quest Drawer Timeline ===== */
#questSheet .tq-sheet-body{
  padding:10px 12px calc(14px + env(safe-area-inset-bottom));
  overflow:auto;
}

#questSheet .tq-quest-summary{
  width:100%;
  box-sizing:border-box;
  margin-inline:0;
  border:1px solid rgba(194,148,78,0.72);
  border-radius:16px;
  background:
    linear-gradient(168deg, rgba(248,240,222,0.99), rgba(236,221,190,0.98)),
    radial-gradient(120% 80% at 50% -20%, rgba(255,255,255,0.24), rgba(255,255,255,0));
  box-shadow:0 10px 22px rgba(5,12,26,0.2), inset 0 1px 0 rgba(255,247,227,0.66);
  padding:10px 11px 11px;
  color:#2b2114;
}

#questSheet .tq-quest-summary-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

#questSheet .tq-quest-summary-title{
  font-family:var(--tq-font-display);
  font-size:15px;
  font-weight:900;
  line-height:1.25;
  color:#2a2013;
}

#questSheet .tq-quest-summary-count{
  font-size:11px;
  font-weight:900;
  padding:3px 9px;
  color:#f9edcf;
  border-color:rgba(187,143,70,0.86);
  background:linear-gradient(155deg, rgba(26,92,76,0.98), rgba(16,64,53,0.98));
}

#questSheet .tq-quest-summary-sub{
  margin-top:5px;
  font-size:11px;
  line-height:1.4;
  color:#574632;
}

#questSheet .tq-quest-progress-track{
  margin-top:8px;
  height:8px;
  border-radius:999px;
  border:1px solid rgba(173,128,59,0.62);
  background:linear-gradient(180deg, rgba(70,58,41,0.34), rgba(47,37,24,0.34));
  overflow:hidden;
}

#questSheet .tq-quest-progress-fill{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, rgba(42,124,103,0.98), rgba(212,167,88,0.98));
  box-shadow:0 0 10px rgba(213,170,92,0.24);
}

#questSheet .tq-quest-timeline{
  margin-top:10px;
  width:100%;
  box-sizing:border-box;
}

#questSheet .tq-quest-steps{
  position:relative;
  display:grid;
  gap:9px;
  width:100%;
  box-sizing:border-box;
}

#questSheet .tq-quest-steps::before{
  content:"";
  position:absolute;
  left:14px;
  top:20px;
  bottom:20px;
  width:2px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(25,101,84,0.84), rgba(166,127,66,0.75), rgba(98,86,66,0.5));
  opacity:.72;
  pointer-events:none;
}

#questSheet .tq-quest-timeline-item{
  display:grid;
  grid-template-columns:28px minmax(0, 1fr);
  column-gap:10px;
  width:100%;
  box-sizing:border-box;
  align-items:start;
}

#questSheet .tq-quest-node-col{
  position:relative;
  width:28px;
  min-width:28px;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding-top:18px;
}

#questSheet .tq-quest-node{
  width:14px;
  height:14px;
  border-radius:999px;
  border:2px solid rgba(167,127,67,0.8);
  background:linear-gradient(150deg, rgba(244,230,200,0.98), rgba(220,189,132,0.98));
  box-shadow:0 0 0 2px rgba(10,43,36,0.2), 0 0 0 4px rgba(244,230,200,0.28);
}

#questSheet .tq-quest-timeline-item.is-done .tq-quest-node{
  position:relative;
  border-color:rgba(20,91,75,0.84);
  background:linear-gradient(145deg, rgba(33,114,94,0.98), rgba(20,79,65,0.98));
  box-shadow:0 0 0 2px rgba(10,43,36,0.26), 0 0 0 4px rgba(230,198,138,0.22);
}

#questSheet .tq-quest-timeline-item.is-done .tq-quest-node::before{
  content:"✓";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#f9edcf;
  font-size:9px;
  font-weight:900;
}

#questSheet .tq-quest-timeline-item.is-current .tq-quest-node{
  border-color:rgba(196,146,72,0.95);
  background:linear-gradient(150deg, rgba(241,206,143,1), rgba(222,174,92,0.99));
  box-shadow:0 0 0 2px rgba(10,43,36,0.24), 0 0 0 4px rgba(241,206,143,0.26);
}

#questSheet .tq-quest-timeline-item.is-locked .tq-quest-node{
  border-color:rgba(147,129,97,0.7);
  background:linear-gradient(150deg, rgba(214,202,176,0.96), rgba(188,173,142,0.95));
  box-shadow:0 0 0 2px rgba(93,81,60,0.14);
}

#questSheet .tq-step{
  position:relative;
  width:100%;
  min-width:0;
  box-sizing:border-box;
  padding:10px 12px 10px 12px;
  border:1px solid rgba(193,147,77,0.66);
  border-radius:13px;
  background:linear-gradient(166deg, rgba(247,240,224,0.99), rgba(235,221,191,0.98));
  box-shadow:0 7px 15px rgba(7,15,30,0.14);
}

#questSheet .tq-step::before{
  content:none;
}

#questSheet .tq-step.is-done{
  border-color:rgba(33,112,92,0.7);
  background:linear-gradient(166deg, rgba(243,238,223,0.99), rgba(229,220,194,0.98));
}

#questSheet .tq-step.is-current{
  border-color:rgba(212,164,86,0.94);
  background:linear-gradient(165deg, rgba(251,245,232,1), rgba(242,232,206,0.99));
  box-shadow:0 0 0 2px rgba(212,164,86,0.24), 0 10px 18px rgba(6,14,28,0.2);
}

#questSheet .tq-step.is-locked{
  opacity:.92;
  border-color:rgba(165,145,114,0.56);
  background:linear-gradient(165deg, rgba(236,227,205,0.95), rgba(228,218,192,0.94));
}

#questSheet .tq-step-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}

#questSheet .tq-step-title{
  min-width:0;
  flex:1 1 auto;
  font-family:var(--tq-font-display);
  font-size:14px;
  line-height:1.28;
  color:#2a1f12;
  font-weight:900;
}

#questSheet .tq-step small{
  margin-top:4px;
  font-size:12px;
  color:#4e3d28;
  line-height:1.42;
  -webkit-line-clamp:3;
}

#questSheet .tq-pill{
  flex-shrink:0;
  margin-right:2px;
  font-size:10px;
  font-weight:900;
  padding:3px 8px;
  line-height:1.05;
  white-space:nowrap;
  border-color:rgba(182,138,68,0.76);
  color:#f8eccf;
  background:linear-gradient(150deg, rgba(25,88,73,0.96), rgba(17,65,54,0.96));
}

#questSheet .tq-step.is-done .tq-pill{
  border-color:rgba(25,95,78,0.84);
  background:linear-gradient(150deg, rgba(31,104,86,0.98), rgba(20,79,66,0.98));
}

#questSheet .tq-step.is-current .tq-pill{
  border-color:rgba(183,137,65,0.9);
  background:linear-gradient(150deg, rgba(211,168,92,0.98), rgba(176,130,62,0.98));
  color:#2f2314;
}

#questSheet .tq-step.is-locked .tq-pill{
  border-color:rgba(146,126,93,0.76);
  color:#ede1c4;
  background:linear-gradient(150deg, rgba(102,94,79,0.94), rgba(86,78,66,0.94));
}

#questSheet .tq-step-proof-note{
  margin-top:6px;
  border:1px solid rgba(198,151,80,0.56);
  border-radius:9px;
  background:rgba(30,92,77,0.12);
  color:#3f3322;
  font-size:11px;
  line-height:1.36;
  padding:6px 7px;
}

#questSheet .tq-step-meta{
  margin-top:6px;
  gap:4px;
}

#questSheet .tq-step-meta-item{
  font-size:11px;
  line-height:1.34;
  color:#5a4a35;
}

#questSheet .tq-step.is-locked .tq-step-meta-item{
  color:#7f725f;
}

@media (max-width:390px){
  #questSheet .tq-sheet-body{
    padding:9px 10px calc(12px + env(safe-area-inset-bottom));
  }
  #questSheet .tq-quest-summary{
    padding:9px 10px 10px;
  }
  #questSheet .tq-quest-steps{
    gap:8px;
  }
  #questSheet .tq-quest-steps::before{
    left:13px;
  }
  #questSheet .tq-quest-timeline-item{
    grid-template-columns:26px minmax(0, 1fr);
    column-gap:9px;
  }
  #questSheet .tq-quest-node-col{
    width:26px;
    min-width:26px;
    padding-top:13px;
  }
  #questSheet .tq-quest-node{
    width:18px;
    height:18px;
  }
  #questSheet .tq-step{
    padding:9px 10px;
  }
  #questSheet .tq-pill{
    margin-right:1px;
  }
}

/* ===== Phase 5C-0 Objective Compact Tracker Default ===== */
.tq-command-panel{
  gap:6px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  padding:6px 8px;
  border-radius:13px;
  gap:3px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-card::before,
.tq-command-panel.is-objective-collapsed .tq-objective-card::after{
  display:none;
}

.tq-command-panel.is-objective-collapsed .tq-objective-head{
  min-height:22px;
  gap:6px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-kicker{
  font-size:9px;
  letter-spacing:.06em;
}

.tq-command-panel.is-objective-collapsed .tq-objective-body{
  border-radius:0;
  border:0;
  background:transparent;
  box-shadow:none;
  padding:0;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  font-size:13px;
  line-height:1.15;
  flex:1 1 auto;
  min-width:0;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  font-size:9px;
  padding:2px 6px;
  flex-shrink:0;
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  min-height:22px;
  font-size:9px;
  padding:0 6px;
}

.tq-command-panel.is-objective-collapsed .tq-action-primary{
  display:none;
}

@media (max-width:390px){
  .tq-command-panel{
    left:9px;
    right:9px;
    gap:5px;
  }
  .tq-command-panel.is-objective-collapsed .tq-objective-card{
    padding:5px 7px;
  }
  .tq-command-panel.is-objective-collapsed .tq-objective-body{
    gap:6px;
  }
}

.is-hidden{ display:none !important; }

body.tq-login-gated #questScene,
body.tq-login-gated .tq-topbar,
body.tq-login-gated .tq-command-panel,
body.tq-login-gated .tq-corner-tools{
  display:none !important;
}

body.tq-login-gated .tq-sheet{
  display:none !important;
}

body.tq-login-gated .tq-login-gate{
  display:flex;
}

@keyframes tqTargetPulse{
  0%{ filter:drop-shadow(0 0 6px rgba(231, 195, 122, 0.2)); }
  50%{ filter:drop-shadow(0 0 16px rgba(231, 195, 122, 0.52)); }
  100%{ filter:drop-shadow(0 0 6px rgba(231, 195, 122, 0.2)); }
}

@keyframes tqWalkBob{
  from{ transform:translateY(0); }
  to{ transform:translateY(-2px); }
}

/* ===== Phase 6A: Visual System Lock + Layout Recomposition (Main Shell Only) ===== */
:root{
  --tq-shell-emerald-deep:rgba(8,43,38,0.9);
  --tq-shell-emerald:rgba(14,74,64,0.9);
  --tq-shell-ivory:#f3e7cd;
  --tq-shell-ivory-ink:#2c2112;
  --tq-shell-gold:#dcb26a;
  --tq-shell-gold-strong:#f1d69a;
  --tq-shell-gold-line:rgba(214,168,92,0.78);
  --tq-shell-overlay:rgba(3,16,25,0.42);
  --tq-shell-shadow-lg:0 18px 34px rgba(2,10,18,0.42);
  --tq-shell-shadow-md:0 10px 22px rgba(3,11,20,0.34);
  --tq-shell-radius-lg:22px;
  --tq-shell-radius-md:16px;
  --tq-shell-radius-pill:999px;
}

.tq-topbar{
  top:calc(env(safe-area-inset-top, 0px) + 5px);
  min-height:70px;
  max-height:88px;
  padding:7px 12px 8px;
  border:1px solid var(--tq-shell-gold-line);
  border-radius:var(--tq-shell-radius-lg);
  background:
    linear-gradient(154deg, rgba(246,238,220,0.95), rgba(232,216,181,0.92)),
    linear-gradient(180deg, rgba(255,249,237,0.18), rgba(255,249,237,0));
  box-shadow:var(--tq-shell-shadow-lg), inset 0 1px 0 rgba(255,248,231,0.58);
}

.tq-topbar::before{
  inset:3px;
  border-radius:18px;
  border:1px solid rgba(143,103,43,0.33);
}

.tq-topbar .tq-title{
  font-size:17px;
  line-height:1.08;
  letter-spacing:.01em;
}

.tq-topbar .tq-subtitle{
  font-size:10px;
  line-height:1.15;
  color:#54422a;
}

.tq-badge{
  min-height:29px;
  padding:4px 11px 3px;
  border:1px solid rgba(215,170,95,0.8);
  background:linear-gradient(160deg, rgba(24,99,81,0.98), rgba(12,56,47,0.98));
  box-shadow:0 5px 12px rgba(6,21,17,0.28), inset 0 1px 0 rgba(250,240,215,0.24);
}

.tq-progress-inline{
  gap:9px;
}

.tq-progress-label{
  min-width:42px;
  font-size:11px;
  font-weight:900;
  color:#41331d;
}

.tq-progress-track{
  height:9px;
  border-radius:var(--tq-shell-radius-pill);
  border:1px solid rgba(135,100,47,0.46);
  background:
    linear-gradient(180deg, rgba(11,52,44,0.34), rgba(8,36,30,0.24)),
    linear-gradient(90deg, rgba(240,208,145,0.08), rgba(240,208,145,0));
  box-shadow:inset 0 1px 2px rgba(6,22,18,0.28);
}

.tq-progress-fill{
  background:linear-gradient(90deg, #1f6d59 0%, #2f8f74 44%, #cfa25a 84%, #efd29f 100%);
  box-shadow:0 0 11px rgba(198,152,75,0.28), inset 0 1px 0 rgba(252,240,215,0.24);
}

.tq-command-panel{
  left:10px;
  right:10px;
  gap:7px;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 8px);
}

.tq-objective-card{
  border:1px solid var(--tq-shell-gold-line);
  border-radius:var(--tq-shell-radius-lg);
  background:
    linear-gradient(160deg, var(--tq-shell-emerald) 0%, var(--tq-shell-emerald-deep) 100%),
    linear-gradient(180deg, rgba(255,245,222,0.12), rgba(255,245,222,0));
  box-shadow:var(--tq-shell-shadow-md), inset 0 1px 0 rgba(250,238,209,0.22);
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  min-height:52px;
  padding:6px 10px;
  gap:4px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-head{
  min-height:20px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-kicker{
  font-size:9px;
  letter-spacing:.09em;
  color:#f7e5ba;
}

.tq-command-panel.is-objective-collapsed .tq-objective-body{
  gap:8px;
  align-items:center;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  color:var(--tq-shell-ivory);
  font-size:14px;
  line-height:1.12;
  font-weight:900;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  border:1px solid rgba(215,170,95,0.72);
  background:linear-gradient(150deg, rgba(245,233,203,0.95), rgba(228,207,162,0.95));
  color:var(--tq-shell-ivory-ink);
  font-size:9px;
  padding:2px 7px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  min-height:22px;
  border:1px solid rgba(214,168,93,0.74);
  background:linear-gradient(160deg, rgba(247,239,221,0.96), rgba(229,211,173,0.94));
  color:#1d5a4b;
}

.tq-objective-quick-action{
  min-height:24px;
  padding:0 9px;
  font-size:10px;
  border:1px solid rgba(214,167,93,0.8);
  background:linear-gradient(165deg, rgba(245,228,191,0.96), rgba(223,185,115,0.96));
  color:#2b1c09;
  box-shadow:0 4px 10px rgba(7,14,30,0.25);
}

/* PERF-UX-1: immediate pending feedback for step actions */
.tq-action-primary.is-pending,
.tq-objective-quick-action.is-pending{
  opacity: .92;
  cursor: wait;
}

.tq-dock{
  gap:6px;
}

.tq-dock-secondary{
  border:1px solid var(--tq-shell-gold-line);
  border-radius:20px;
  background:
    linear-gradient(160deg, rgba(247,238,220,0.96), rgba(232,216,182,0.96)),
    linear-gradient(180deg, rgba(255,248,234,0.16), rgba(255,248,234,0));
  box-shadow:var(--tq-shell-shadow-md), inset 0 1px 0 rgba(255,248,232,0.62);
}

.tq-dock-btn{
  min-height:66px;
  padding:7px 6px 8px;
  color:#372a17;
}

.tq-dock-btn.is-active{
  background:linear-gradient(180deg, rgba(24,96,79,0.22), rgba(24,96,79,0.08));
}

.tq-dock-btn.is-active .tq-dock-label{
  color:#1f6552;
}

.tq-dock-ico{
  width:44px;
  height:44px;
}

.tq-dock-label{
  font-size:13px;
  font-weight:900;
  letter-spacing:.01em;
}

@media (max-width:390px){
  .tq-topbar{
    left:9px;
    right:9px;
    padding:7px 10px 7px;
  }
  .tq-topbar .tq-title{
    font-size:16px;
  }
  .tq-command-panel{
    left:9px;
    right:9px;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 6px);
  }
  .tq-command-panel.is-objective-collapsed .tq-objective-card{
    min-height:50px;
    padding:5px 8px;
  }
  .tq-command-panel.is-objective-collapsed .tq-action-title{
    font-size:13px;
  }
  .tq-dock-btn{
    min-height:62px;
  }
  .tq-dock-label{
    font-size:12px;
  }
}

@keyframes tqSeekerBreath{
  0%{ transform:translateY(0); filter:brightness(1); }
  50%{ transform:translateY(-1px); filter:brightness(1.04); }
  100%{ transform:translateY(0); filter:brightness(1); }
}

.tq-dialogue{
  position:fixed;
  left:10px;
  right:10px;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 108px);
  z-index:30;
  pointer-events:none;
}

.tq-dialogue.is-hidden{
  display:none !important;
}

.tq-dialogue-card{
  pointer-events:auto;
  border:1px solid rgba(217,173,98,0.74);
  border-radius:14px;
  background:
    var(--tq-ui-dialogue-panel-frame, none) center/100% 100% no-repeat,
    linear-gradient(160deg, rgba(244,234,210,0.98), rgba(226,209,171,0.98)),
    radial-gradient(90% 120% at 0% 0%, rgba(255,255,255,0.18), transparent 70%);
  box-shadow:0 16px 34px rgba(2, 8, 20, 0.45);
  color:#2f2618;
  padding:14px 14px 12px;
}

.tq-dialogue-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.tq-dialogue-speaker{
  position:relative;
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 14px;
  border:1px solid rgba(191,144,72,0.78);
  border-radius:11px;
  background:
    var(--tq-ui-dialogue-speaker-plaque, none) center/100% 100% no-repeat,
    linear-gradient(160deg, rgba(25,85,71,0.98), rgba(12,52,43,0.98));
  color:#f6e8c8;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  text-shadow:0 1px 1px rgba(3,12,9,0.45);
}

.tq-dialogue-close{
  border:1px solid rgba(193,146,75,0.7);
  border-radius:999px;
  background:rgba(255,246,228,0.78);
  color:#4c3a25;
  font-size:11px;
  font-weight:800;
  line-height:1;
  min-height:24px;
  padding:0 10px;
}

.tq-dialogue-body{
  margin-top:8px;
  font-size:13px;
  line-height:1.45;
  font-weight:700;
  color:#2f2618;
}

.tq-dialogue-foot{
  margin-top:9px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.tq-dialogue-progress{
  font-size:10px;
  color:#635037;
  font-weight:800;
  letter-spacing:.03em;
}

.tq-dialogue-primary{
  border:1px solid rgba(174,120,43,0.86);
  border-radius:10px;
  background:
    var(--tq-ui-dialogue-action-button, none) center/100% 100% no-repeat,
    linear-gradient(180deg, #f3dcae 0%, #dcaf63 48%, #ad752f 100%);
  color:#2b1d09;
  font-size:12px;
  font-weight:900;
  min-height:32px;
  padding:0 14px;
  letter-spacing:.03em;
  text-shadow:0 1px 0 rgba(255,246,230,0.45);
  box-shadow:0 8px 14px rgba(11,18,30,0.32), inset 0 1px 0 rgba(255,252,244,0.36);
}

.tq-dev-reset-btn{
  position:fixed;
  right:10px;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 66px);
  z-index:32;
  border:1px solid rgba(255,255,255,0.4);
  border-radius:8px;
  background:rgba(20,24,34,0.86);
  color:#ffd78f;
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
  line-height:1;
  min-height:28px;
  padding:0 9px;
  box-shadow:0 8px 16px rgba(0,0,0,0.35);
}

.tq-dev-sim-badge{
  position:fixed;
  left:10px;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 66px);
  z-index:32;
  border:1px solid rgba(255,255,255,0.35);
  border-radius:8px;
  background:rgba(18,22,34,0.86);
  color:#aee0ff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.03em;
  line-height:1.2;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  padding:0 9px;
  max-width:min(68vw, 280px);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  box-shadow:0 8px 16px rgba(0,0,0,0.35);
}

.tq-objective-quick-action{
  border:1px solid rgba(190,142,67,0.86);
  border-radius:999px;
  background:linear-gradient(180deg, #f3dcae 0%, #dfb86f 52%, #b17c37 100%);
  color:#2d1d08;
  font-size:11px;
  font-weight:900;
  letter-spacing:.03em;
  min-height:28px;
  padding:0 10px;
  flex:0 0 auto;
  box-shadow:0 5px 12px rgba(7,14,30,0.28);
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-quick-action{
  display:none !important;
}

.tq-command-panel.is-objective-collapsed .tq-objective-quick-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.tq-inv-meta{
  margin-top:4px;
  display:flex;
  align-items:center;
  gap:6px;
  min-height:18px;
}

.tq-inv-rarity,
.tq-inv-type{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:1px 7px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
}

.tq-inv-rarity{
  border:1px solid rgba(172,128,56,0.68);
  color:#3b2a13;
  background:linear-gradient(140deg, rgba(246,232,196,0.96), rgba(231,208,153,0.96));
}

.tq-inv-rarity.is-rare{
  border-color:rgba(49,122,112,0.72);
  color:#15443e;
  background:linear-gradient(140deg, rgba(205,243,233,0.95), rgba(162,225,206,0.95));
}

.tq-inv-rarity.is-epic{
  border-color:rgba(112,87,154,0.72);
  color:#3d2c66;
  background:linear-gradient(140deg, rgba(232,221,255,0.95), rgba(206,186,244,0.95));
}

.tq-inv-type{
  border:1px solid rgba(116,98,68,0.35);
  color:#5a4932;
  background:rgba(255,247,232,0.72);
}

.tq-inv-desc{
  margin:6px 0 0;
  font-size:11px;
  line-height:1.38;
  color:#5a4a34;
  min-height:30px;
}

.tq-proof-sheet{
  position:fixed;
  left:10px;
  right:10px;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 104px);
  z-index:34;
}

.tq-proof-card{
  position:relative;
  border:1px solid rgba(208,158,82,0.78);
  border-radius:14px;
  background:
    var(--tq-ui-proof-panel-frame, none) center/100% 100% no-repeat,
    linear-gradient(160deg, rgba(245,235,213,0.98), rgba(231,214,179,0.98));
  color:#2f2618;
  box-shadow:0 16px 34px rgba(2,8,20,0.45);
  padding:14px 14px 12px;
}

.tq-proof-card::after{
  content:none;
  display:none;
}

.tq-proof-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.tq-proof-head strong{
  font-size:14px;
  letter-spacing:.01em;
}

.tq-proof-close{
  border:1px solid rgba(174,136,76,0.62);
  border-radius:999px;
  background:rgba(255,247,233,0.78);
  color:#4b3922;
  font-size:11px;
  font-weight:800;
  min-height:24px;
  padding:0 10px;
}

.tq-proof-text{
  margin:8px 0 0;
  font-size:12px;
  line-height:1.42;
  font-weight:700;
}

.tq-proof-note{
  margin:6px 0 0;
  font-size:11px;
  line-height:1.4;
  color:#5c4931;
}

.tq-proof-file{
  position:relative;
  margin-top:8px;
  border:1px solid rgba(183,139,65,0.34);
  border-radius:10px;
  background:
    var(--tq-ui-proof-upload-slot, none) center/100% 100% no-repeat,
    rgba(255,247,231,0.72);
  padding:11px 11px;
  font-size:11px;
  font-weight:700;
  color:#4b3b27;
  box-shadow:inset 0 1px 0 rgba(255,251,239,0.58), 0 6px 12px rgba(8,17,30,0.12);
}

.tq-proof-actions{
  margin-top:8px;
  display:flex;
  gap:8px;
}

.tq-proof-btn{
  border-radius:10px;
  min-height:34px;
  padding:0 12px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
}

.tq-proof-btn.is-secondary{
  border:1px solid rgba(175,130,57,0.55);
  background:rgba(255,245,224,0.84);
  color:#45331d;
}

.tq-proof-btn.is-primary{
  border:1px solid rgba(176,124,43,0.85);
  background:linear-gradient(180deg, #f3dcae 0%, #ddb268 48%, #ad752f 100%);
  color:#2b1d09;
}

.tq-proof-btn[disabled]{
  opacity:.52;
}

.tq-proof-status{
  margin-top:7px;
  font-size:11px;
  font-weight:800;
  color:#18483f;
}

.tq-reward-unlock-title{
  margin:2px auto 6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(205,156,82,0.78);
  border-radius:999px;
  background:linear-gradient(155deg, rgba(243,223,176,0.95), rgba(224,186,111,0.95));
  color:#2b1d09;
  font-size:11px;
  font-weight:900;
  letter-spacing:.03em;
  min-height:24px;
  padding:0 11px;
}

@media (prefers-reduced-motion: reduce){
  .tq-dialogue,
  .tq-dialogue *{
    transition:none !important;
    animation:none !important;
  }
}

@media (max-width: 420px){
  .tq-title{ font-size:12px; }
  .tq-subtitle{ font-size:9px; }
  .tq-character{ width:46px; height:68px; }
  .tq-character-shadow{ width:36px; height:10px; }
  .tq-scene-marker-core{ width:24px; height:24px; }
  .tq-scene-marker-icon{ width:15px; height:15px; }
  .tq-scene-marker-ring{ width:34px; height:34px; }
  .tq-scene-marker-callout{ min-width:70px; max-width:104px; }
  .tq-scene-fabgroup{ right:10px; bottom:calc(env(safe-area-inset-bottom, 0px) + 166px); }
  .tq-action-title{ font-size:13px; }
  .tq-action-sub{ font-size:10px; }
}

@media (min-width: 721px){
  body.temple-quest-app{
    display:block;
    min-height:100svh;
    padding:0;
    --tq-desktop-shell-width:min(430px, calc((100svh - 40px) * (430 / 860)));
  }

  .tq-app{
    width:100%;
    height:100svh;
    min-height:100svh;
    display:block;
    padding:20px;
  }

  .tq-phone-shell{
    position:relative;
    z-index:1;
    width:var(--tq-desktop-shell-width);
    height:min(844px, calc(100svh - 40px));
    margin:0 auto;
    border:1px solid rgba(255,255,255,0.18);
    border-radius:28px;
    overflow:hidden;
    background:rgba(6, 12, 24, 0.86);
    box-shadow:0 26px 60px rgba(1, 4, 12, 0.5);
  }

  .tq-game-viewport{
    width:100%;
    height:100%;
    min-height:0;
    max-height:none;
  }

  .tq-desktop-companion{
    position:fixed;
    z-index:0;
    top:20px;
    bottom:20px;
    left:calc(50% + (var(--tq-desktop-shell-width) / 2) + 24px);
    width:min(430px, calc(100vw - (50% + (var(--tq-desktop-shell-width) / 2) + 42px)));
    min-width:300px;
    max-width:430px;
    display:flex;
    overflow:hidden;
    border-radius:24px;
  }

  .tq-desktop-companion__inner{
    width:100%;
    height:100%;
    padding:18px 18px 16px;
    overflow:auto;
    display:grid;
    grid-template-rows:auto auto auto auto auto auto 1fr;
    gap:10px;
    background:
      linear-gradient(165deg, rgba(244,235,212,0.98), rgba(229,214,180,0.96)),
      radial-gradient(120% 80% at 10% -20%, rgba(255,255,255,0.2), rgba(255,255,255,0));
  }

  .tq-desktop-companion__brand{
    display:flex;
    align-items:center;
    gap:10px;
  }

  .tq-desktop-companion__logo{
    width:36px;
    height:36px;
    border-radius:999px;
    background:linear-gradient(160deg, rgba(24,83,70,0.98), rgba(12,44,37,0.98));
    padding:6px;
    box-shadow:0 8px 18px rgba(4,12,24,0.26);
  }

  .tq-desktop-companion__brand-text{
    font-size:11px;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#625137;
    font-weight:800;
  }

  .tq-desktop-companion__title{
    margin:0;
    font-size:24px;
    line-height:1.2;
    color:#2c2113;
    font-family:var(--tq-font-display);
  }

  .tq-desktop-companion__subtitle{
    margin:0;
    font-size:13px;
    color:#1d6655;
    font-weight:700;
  }

  .tq-desktop-companion__desc{
    margin:0;
    font-size:13px;
    line-height:1.5;
    color:#4f3f2c;
  }

  .tq-desktop-companion__stats{
    display:grid;
    gap:8px;
  }

  .tq-desktop-companion__stat{
    border:1px solid rgba(191,147,76,0.54);
    border-radius:12px;
    background:linear-gradient(160deg, rgba(248,241,226,0.98), rgba(233,220,190,0.96));
    padding:8px 10px;
  }

  .tq-desktop-companion__label{
    font-size:10px;
    color:#66553b;
    letter-spacing:.06em;
    text-transform:uppercase;
    font-weight:800;
  }

  .tq-desktop-companion__value{
    margin-top:3px;
    font-size:14px;
    color:#2f2416;
    font-weight:800;
    line-height:1.4;
  }

  .tq-desktop-companion__reward{
    border:1px solid rgba(187,141,68,0.56);
    border-radius:14px;
    background:linear-gradient(160deg, rgba(25,88,73,0.96), rgba(13,49,41,0.96));
    padding:10px;
    display:grid;
    gap:8px;
    justify-items:center;
  }

  .tq-desktop-companion__reward-img{
    width:min(100%, 160px);
    height:auto;
    max-height:220px;
    object-fit:contain;
    border-radius:10px;
    box-shadow:0 10px 18px rgba(2,8,20,0.4);
  }

  .tq-desktop-companion__reward-text{
    font-size:12px;
    color:#f1e3c4;
    text-align:center;
    line-height:1.45;
  }

  .tq-desktop-companion__mobile-open{
    align-self:end;
    border:1px solid rgba(189,145,73,0.54);
    border-radius:14px;
    padding:9px 10px;
    background:linear-gradient(164deg, rgba(246,238,221,0.98), rgba(234,220,189,0.96));
    display:grid;
    gap:6px;
  }

  .tq-desktop-companion__mobile-title{
    font-size:12px;
    font-weight:900;
    color:#2e2416;
  }

  .tq-desktop-companion__mobile-desc{
    font-size:11px;
    line-height:1.4;
    color:#5e4d37;
  }

  .tq-desktop-companion__link{
    border:1px solid rgba(182,139,69,0.5);
    border-radius:10px;
    padding:6px 8px;
    font-size:10px;
    color:#52422e;
    background:rgba(255,252,244,0.56);
    word-break:break-all;
    line-height:1.3;
  }

  .tq-desktop-companion__btn{
    min-height:34px;
    width:fit-content;
    border-radius:10px;
    font-size:12px;
    font-weight:900;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:none;
    cursor:pointer;
    padding:0 12px;
  }

  .tq-desktop-companion__btn--copy{
    justify-self:start;
    min-width:128px;
  }

  .tq-desktop-companion__note{
    font-size:10px;
    color:#6a5b45;
    line-height:1.35;
  }

  .tq-desktop-companion.is-login-required .tq-desktop-companion__value{
    color:#165243;
  }

  .tq-sheet,
  .tq-dialogue,
  .tq-proof-sheet{
    left:calc(50% - (var(--tq-desktop-shell-width) / 2) + 10px);
    right:calc(50% - (var(--tq-desktop-shell-width) / 2) + 10px);
    width:auto;
    max-width:none;
  }

  .tq-sheet{
    transform:none;
  }

  .tq-dev-reset-btn{
    right:calc(50% - (var(--tq-desktop-shell-width) / 2) + 10px);
  }

  .tq-dev-sim-badge{
    left:calc(50% - (var(--tq-desktop-shell-width) / 2) + 10px);
    max-width:calc(var(--tq-desktop-shell-width) - 20px);
  }
}

@media (min-width: 721px) and (max-width: 1100px){
  .tq-desktop-companion{
    display:none;
  }
}

/* ===== Phase 6A-1: Main Shell Visual Correction ===== */
.tq-topbar{
  border:1px solid rgba(205,160,88,0.62);
  background:
    linear-gradient(160deg, rgba(7,40,35,0.9), rgba(5,28,25,0.86)),
    linear-gradient(180deg, rgba(255,239,201,0.08), rgba(255,239,201,0));
  box-shadow:0 12px 24px rgba(1,8,14,0.36), inset 0 1px 0 rgba(247,230,186,0.14);
}

.tq-topbar::before{
  border-color:rgba(218,173,98,0.3);
}

.tq-topbar .tq-title{
  color:#f4e8cb;
}

.tq-topbar .tq-subtitle{
  color:rgba(233,217,179,0.86);
}

.tq-progress-label{
  color:#f0ddb2;
}

.tq-progress-track{
  border-color:rgba(204,158,82,0.38);
  background:linear-gradient(180deg, rgba(9,34,30,0.84), rgba(6,27,24,0.78));
}

.tq-command-panel{
  gap:5px;
}

.tq-objective-card{
  border-color:rgba(205,160,88,0.62);
  background:linear-gradient(162deg, rgba(9,52,44,0.9), rgba(6,36,32,0.86));
  box-shadow:0 10px 20px rgba(1,8,16,0.34), inset 0 1px 0 rgba(248,231,189,0.12);
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  min-height:50px;
  max-height:58px;
  padding:5px 9px;
  border-radius:15px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-head{
  min-height:18px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-kicker{
  color:rgba(242,223,179,0.9);
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  font-size:13px;
  line-height:1.08;
  color:#f7ecd2;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  border-color:rgba(202,158,85,0.6);
  background:rgba(11,47,40,0.74);
  color:#ecd7a8;
}

.tq-objective-quick-action{
  min-height:20px;
  padding:0 7px;
  font-size:9px;
  font-weight:800;
  border-color:rgba(190,148,79,0.55);
  background:rgba(14,62,52,0.82);
  color:#efdcb0;
  box-shadow:none;
}

.tq-command-panel.is-objective-collapsed .tq-objective-quick-action[data-action="view-reward"]{
  display:none !important;
}

.tq-dock{
  gap:5px;
}

.tq-dock-secondary{
  border-color:rgba(204,158,83,0.64);
  border-radius:18px;
  background:
    linear-gradient(165deg, rgba(8,43,37,0.94), rgba(6,31,27,0.92)),
    linear-gradient(180deg, rgba(250,233,193,0.08), rgba(250,233,193,0));
  box-shadow:0 12px 22px rgba(1,8,15,0.34), inset 0 1px 0 rgba(245,226,182,0.12);
}

.tq-dock-btn{
  min-height:63px;
  padding:6px 5px 7px;
  color:#dbc79a;
}

.tq-dock-btn + .tq-dock-btn::before{
  background:linear-gradient(180deg, rgba(206,163,88,0.02), rgba(206,163,88,0.36) 50%, rgba(206,163,88,0.02));
}

.tq-dock-ico{
  width:38px;
  height:38px;
}

.tq-dock-svg{
  stroke:#d8c18f;
  fill:rgba(216,193,143,0.08);
}

.tq-dock-label{
  font-size:12px;
  font-weight:800;
  color:#ddc892;
}

.tq-dock-btn.is-active{
  background:
    linear-gradient(180deg, rgba(195,152,79,0.18), rgba(195,152,79,0.05)),
    linear-gradient(165deg, rgba(22,83,69,0.62), rgba(14,56,47,0.58));
  box-shadow:inset 0 0 0 1px rgba(226,184,104,0.48);
}

.tq-dock-btn.is-active .tq-dock-label{
  color:#f0ddb2;
}

.tq-dock-btn.is-active .tq-dock-svg{
  stroke:#efd9a8;
}

/* ===== Phase 6B: Scene Presence Pass ===== */
.tq-world-layer{
  isolation:isolate;
}

.tq-scene-quest-rail{
  position:absolute;
  left:6px;
  top:50%;
  transform:translateY(-50%);
  height:50%;
  width:52px;
  z-index:7;
  pointer-events:none;
  display:flex;
  align-items:center;
}

.tq-rail-shell{
  position:relative;
  width:100%;
  height:100%;
  border:1px solid rgba(190,149,78,0.24);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(6,34,30,0.34), rgba(4,24,22,0.18));
  box-shadow:0 4px 10px rgba(1,7,14,0.14), inset 0 1px 0 rgba(243,226,186,0.06);
  padding:4px 4px;
}

.tq-rail-progress{
  display:none;
}

.tq-rail-spine{
  position:absolute;
  left:50%;
  top:8px;
  bottom:8px;
  width:1px;
  transform:translateX(-50%);
  background:linear-gradient(180deg, rgba(199,157,86,0.34), rgba(199,157,86,0.04));
  border-radius:999px;
}

.tq-rail-steps{
  position:relative;
  z-index:1;
  margin-top:0;
  display:grid;
  grid-auto-rows:min-content;
  justify-items:center;
  row-gap:5px;
}

.tq-rail-step{
  width:100%;
  display:grid;
  justify-items:center;
  row-gap:2px;
}

.tq-rail-node{
  width:23px;
  height:23px;
  border-radius:999px;
  border:1px solid rgba(197,155,84,0.44);
  background:linear-gradient(160deg, rgba(15,67,56,0.86), rgba(8,39,33,0.82));
  color:#e3cd9b;
  font-size:10px;
  font-weight:900;
  display:grid;
  place-items:center;
  box-shadow:0 3px 7px rgba(1,8,15,0.2), inset 0 1px 0 rgba(247,230,189,0.12);
}

.tq-rail-step.is-completed .tq-rail-node,
.tq-rail-step.is-rewarded .tq-rail-node{
  width:19px;
  height:19px;
  border-color:rgba(138,186,165,0.42);
  background:linear-gradient(160deg, rgba(18,77,64,0.66), rgba(10,49,41,0.62));
  color:rgba(214,238,227,0.84);
  font-size:8px;
}

.tq-rail-step.is-current .tq-rail-node,
.tq-rail-step.is-active .tq-rail-node{
  width:29px;
  height:29px;
  border-color:rgba(230,189,108,0.84);
  color:#fff2cf;
  font-size:11px;
  box-shadow:0 0 0 1px rgba(226,184,104,0.24), 0 6px 12px rgba(1,8,15,0.28);
}

.tq-rail-step.is-locked .tq-rail-node{
  width:17px;
  height:17px;
  border-color:rgba(155,143,118,0.34);
  background:linear-gradient(160deg, rgba(52,56,63,0.56), rgba(39,43,49,0.58));
  color:#988d74;
  font-size:8px;
}

.tq-rail-label{
  max-width:48px;
  min-height:12px;
  border-radius:999px;
  border:1px solid rgba(210,168,92,0.4);
  background:rgba(8,40,34,0.72);
  color:#f1dfb4;
  font-size:8px;
  line-height:1.1;
  font-weight:800;
  padding:1px 5px;
  text-align:center;
  opacity:0;
}

.tq-rail-step.is-current .tq-rail-label,
.tq-rail-step.is-active .tq-rail-label{
  opacity:1;
}

.tq-scene-quest-rail.is-quest-complete .tq-rail-shell{
  background:linear-gradient(180deg, rgba(6,34,30,0.26), rgba(4,24,22,0.14));
  border-color:rgba(176,140,76,0.2);
  box-shadow:0 3px 8px rgba(1,7,14,0.12);
}

.tq-scene-quest-rail.is-quest-complete .tq-rail-step.is-completed .tq-rail-node,
.tq-scene-quest-rail.is-quest-complete .tq-rail-step.is-rewarded .tq-rail-node{
  width:16px;
  height:16px;
  font-size:7px;
  border-color:rgba(126,170,152,0.34);
  color:rgba(199,226,214,0.72);
}

.tq-scene-quest-rail.is-quest-complete .tq-rail-step.is-terminal .tq-rail-node{
  width:21px;
  height:21px;
  border-color:rgba(216,178,102,0.56);
  color:#efddb4;
}

.tq-character{
  width:56px;
  height:82px;
  transform:translate(-50%, -88%);
}

.tq-character::before{
  content:"";
  position:absolute;
  left:50%;
  top:88%;
  width:30px;
  height:10px;
  transform:translate(-50%, -50%);
  border-radius:999px;
  border:1px solid rgba(230,188,107,0.34);
  background:radial-gradient(circle, rgba(233,195,120,0.18), rgba(233,195,120,0));
}

.tq-character-shadow{
  width:42px;
  height:12px;
  background:rgba(0,0,0,0.22);
  filter:blur(1.4px);
}

.tq-scene-marker.is-focus-label .tq-scene-marker-callout{
  opacity:.96;
}

.tq-scene-marker.is-completed-hotspot .tq-scene-marker-callout{
  opacity:.26;
}

.tq-scene-marker.is-locked-hotspot .tq-scene-marker-callout{
  display:none;
}

.tq-scene-marker.is-available-hotspot:not(.is-focus-label) .tq-scene-marker-callout{
  opacity:.3;
}

@media (max-width:390px){
  .tq-scene-quest-rail{
    left:4px;
    width:46px;
    height:52%;
  }
  .tq-rail-node{
    width:21px;
    height:21px;
    font-size:9px;
  }
  .tq-rail-step.is-current .tq-rail-node,
  .tq-rail-step.is-active .tq-rail-node{
    width:27px;
    height:27px;
  }
}

/* ===== Phase ART-1: Sacred Hotspot Marker Art Kit ===== */
.tq-scene-marker{
  width:46px;
  height:46px;
  min-width:46px;
  min-height:46px;
  z-index:7;
}

.tq-scene-marker-core{
  width:34px;
  height:34px;
  border:0;
  background:transparent;
  box-shadow:0 9px 16px rgba(3,10,19,.38);
}

.tq-scene-marker-core::before,
.tq-scene-marker.is-completed-hotspot .tq-scene-marker-core::before,
.tq-scene-marker.is-completed-hotspot .tq-scene-marker-core::after{
  content:none !important;
  display:none !important;
}

.tq-scene-marker-icon{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:1;
  filter:drop-shadow(0 4px 10px rgba(6,15,27,.46));
}

.tq-scene-marker-ring{
  width:42px;
  height:42px;
  border:0;
  background:radial-gradient(circle, rgba(233,188,102,.2) 0%, rgba(233,188,102,.06) 42%, rgba(233,188,102,0) 72%);
  opacity:.48;
  box-shadow:none;
}

.tq-scene-marker-ring::after{
  content:none;
}

.tq-scene-marker.is-active-hotspot{
  transform:translate(-50%, -50%) scale(1.06);
  z-index:10;
}

.tq-scene-marker.is-active-hotspot .tq-scene-marker-ring{
  opacity:.82;
  animation:tqHotspotPulse 1.8s ease-in-out infinite;
}

.tq-scene-marker.is-completed-hotspot{
  transform:translate(-50%, -50%) scale(.9);
  opacity:.72;
  z-index:6;
}

.tq-scene-marker.is-completed-hotspot .tq-scene-marker-ring{
  opacity:.2;
  animation:none !important;
}

.tq-scene-marker.is-available-hotspot{
  transform:translate(-50%, -50%) scale(.95);
  opacity:.86;
}

.tq-scene-marker.is-locked-hotspot{
  transform:translate(-50%, -50%) scale(.84);
  opacity:.34;
}

.tq-scene-marker-callout{
  top:38px;
  min-width:78px;
  max-width:120px;
  border:1px solid rgba(212,164,84,.42);
  background-image:url('/img/temple-quest/ganesha/ui/tq-gane-hotspot-label-plaque-v2.png');
  background-size:100% 100%;
  background-repeat:no-repeat;
  background-color:rgba(10,25,22,.78);
  padding:6px 10px 7px;
  opacity:.08;
}

.tq-scene-marker-title{
  font-size:8px;
  color:#f5e7c4;
}

.tq-scene-marker-sub{
  font-size:7px;
  color:#cfe3d5;
}

.tq-scene-marker.is-active-hotspot .tq-scene-marker-callout,
.tq-scene-marker.is-focus-label .tq-scene-marker-callout{
  opacity:.96;
}

.tq-scene-marker.is-completed-hotspot .tq-scene-marker-callout{
  display:none;
}

.tq-scene-marker.is-locked-hotspot .tq-scene-marker-callout,
.tq-scene-marker.is-available-hotspot:not(.is-focus-label):not(.is-selected):not(.is-target):not(.is-arrived) .tq-scene-marker-callout{
  display:none;
}

/* ===== Phase 6C: Navigation & Mission Board Polish ===== */
.tq-command-panel{
  gap:4px;
}

.tq-objective-card{
  border-color:rgba(199,157,88,0.58);
  background:
    linear-gradient(162deg, rgba(8,48,41,0.86), rgba(5,30,26,0.82)),
    linear-gradient(180deg, rgba(247,231,191,0.08), rgba(247,231,191,0));
  box-shadow:
    0 8px 16px rgba(1,7,14,0.28),
    inset 0 1px 0 rgba(244,227,186,0.12);
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  min-height:48px;
  max-height:56px;
  padding:4px 8px;
  border-radius:14px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-head{
  min-height:16px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-kicker{
  font-size:8px;
  letter-spacing:.08em;
  color:rgba(240,220,178,0.86);
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  font-size:12px;
  line-height:1.06;
  color:#f3e7ca;
  font-weight:900;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  border-color:rgba(191,150,82,0.52);
  background:rgba(9,42,36,0.66);
  color:#e7d2a2;
  font-size:8px;
  padding:1px 6px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  min-height:20px;
  padding:0 6px;
  border-color:rgba(198,156,86,0.54);
  background:linear-gradient(165deg, rgba(242,230,203,0.9), rgba(222,205,167,0.86));
  color:#225d4e;
}

.tq-objective-quick-action{
  min-height:19px;
  border-color:rgba(188,147,79,0.48);
  background:rgba(11,53,45,0.72);
  color:#e8d5a7;
  font-size:8px;
  padding:0 6px;
}

.tq-dock{
  gap:4px;
}

.tq-dock-secondary{
  border:1px solid rgba(198,157,86,0.62);
  border-radius:17px;
  background:
    linear-gradient(170deg, rgba(6,38,33,0.95), rgba(4,25,22,0.93)),
    linear-gradient(180deg, rgba(247,230,188,0.1), rgba(247,230,188,0));
  box-shadow:
    0 10px 18px rgba(1,8,14,0.32),
    inset 0 1px 0 rgba(245,227,184,0.14),
    inset 0 -1px 0 rgba(6,22,18,0.42);
  padding:1px;
  gap:2px;
}

.tq-dock-secondary::before{
  border-color:rgba(206,166,95,0.34);
  border-radius:16px;
}

.tq-dock-btn{
  min-height:60px;
  border-color:transparent;
  border-radius:12px;
  background:transparent;
  color:#cfbb8f;
  padding:5px 4px 6px;
}

.tq-dock-btn + .tq-dock-btn::before{
  width:0;
  background:none;
}

.tq-dock-ico{
  width:34px;
  height:34px;
}

.tq-dock-svg{
  stroke:#ccb689;
  fill:rgba(204,182,137,0.05);
  opacity:.95;
}

.tq-dock-label{
  font-size:11px;
  font-weight:800;
  color:#cfbb8f;
  letter-spacing:.01em;
}

.tq-dock-btn.is-active{
  border:1px solid rgba(216,176,101,0.66);
  background:
    linear-gradient(180deg, rgba(214,169,91,0.16), rgba(214,169,91,0.04)),
    linear-gradient(165deg, rgba(18,76,64,0.74), rgba(11,49,42,0.7));
  box-shadow:
    inset 0 1px 0 rgba(247,229,187,0.16),
    0 5px 10px rgba(1,8,14,0.24);
}

.tq-dock-btn.is-active .tq-dock-label{
  color:#ecd9ad;
}

.tq-dock-btn.is-active .tq-dock-svg{
  stroke:#ecd8aa;
  fill:rgba(236,216,170,0.08);
}

@media (max-width:390px){
.tq-command-panel.is-objective-collapsed .tq-objective-card{
  min-height:46px;
  max-height:54px;
  padding:4px 7px;
}
  .tq-command-panel.is-objective-collapsed .tq-action-title{
    font-size:11px;
  }
  .tq-dock-btn{
    min-height:58px;
  }
  .tq-dock-ico{
    width:32px;
    height:32px;
  }
.tq-dock-label{
  font-size:10px;
}
}

/* ===== GANESHA-DOCK-REWIRE-1: dock asset-first visual wiring ===== */
.tq-dock{
  gap:5px;
}

.tq-dock-secondary{
  position:relative;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:
    var(--tq-ui-dock-frame, none) center / 100% 100% no-repeat !important;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  gap:6px;
  min-height:78px;
}

.tq-dock-secondary::before{
  content:none !important;
}

.tq-dock-secondary .tq-dock-btn{
  position:relative;
  min-height:62px;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:
    url('/img/temple-quest/temples/ganesha/ui/dock/tq-gane-dock-button-frame-v1.png')
    center / 100% 100% no-repeat !important;
  color:#d8c18f;
  padding:6px 4px 7px;
  transform:none;
}

.tq-dock-secondary .tq-dock-btn:active{
  transform:translateY(1px);
}

.tq-dock-secondary .tq-dock-btn + .tq-dock-btn::before{
  content:none !important;
}

.tq-dock-secondary .tq-dock-btn.is-active{
  border:0 !important;
  box-shadow:none !important;
  background:
    var(--tq-ui-dock-active-tile, none) center / 100% 100% no-repeat !important;
}

.tq-dock-secondary .tq-dock-ico{
  width:30px !important;
  height:30px !important;
  min-width:30px;
  min-height:30px;
  display:grid;
  place-items:center;
  position:relative;
}

.tq-dock-icon-img{
  width:100%;
  height:100%;
  display:block !important;
  object-fit:contain;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.22));
}

.tq-dock-secondary .tq-dock-btn .tq-dock-svg,
.tq-dock-btn .tq-dock-svg{
  display:none !important;
}

.tq-dock-secondary .tq-dock-btn:not(.is-active) .tq-dock-icon-img{
  opacity:.9;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.2));
}

.tq-dock-secondary .tq-dock-btn.is-active .tq-dock-icon-img{
  opacity:1;
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.24));
}

.tq-dock-label{
  font-size:11px;
  font-weight:800;
  line-height:1.1;
  letter-spacing:.01em;
  color:#dcc491;
  text-shadow:0 1px 2px rgba(5,12,22,.42);
}

.tq-dock-secondary .tq-dock-btn.is-active .tq-dock-label{
  color:#f0dbad;
}

.tq-dock-btn.has-badge::after,
#openBagBtnBottom.has-badge::after{
  content:attr(data-badge);
  position:absolute;
  right:5px;
  top:4px;
  min-width:22px;
  height:18px;
  padding:0 5px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:0;
  background:
    url('/img/temple-quest/temples/ganesha/ui/dock/tq-gane-dock-badge-count-frame-v1.png')
    center / 100% 100% no-repeat;
  color:#f2e5c8;
  font-size:10px;
  font-weight:800;
  line-height:1;
  text-shadow:0 1px 1px rgba(0,0,0,.4);
  box-shadow:none;
  transform:none;
}

.tq-dock-btn.is-locked .tq-dock-ico::after,
.tq-dock-btn[disabled] .tq-dock-ico::after{
  content:"";
  position:absolute;
  inset:-1px;
  background:
    url('/img/temple-quest/temples/ganesha/ui/dock/tq-gane-dock-disabled-overlay-v1.png')
    center / 100% 100% no-repeat;
  pointer-events:none;
}

@media (max-width:390px){
  .tq-dock-secondary{
    padding:7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
    min-height:74px;
  }
  .tq-dock-secondary .tq-dock-btn{
    min-height:58px;
    padding:5px 3px 6px;
  }
  .tq-dock-secondary .tq-dock-ico{
    width:28px !important;
    height:28px !important;
    min-width:28px;
    min-height:28px;
  }
  .tq-dock-label{
    font-size:10px;
  }
  .tq-dock-btn.has-badge::after,
  #openBagBtnBottom.has-badge::after{
    min-width:20px;
    height:16px;
    font-size:9px;
    right:4px;
    top:4px;
  }
}

/* ===== Phase 6D: Drawer / Sheet Role Differentiation ===== */
.tq-sheet{
  border-color:rgba(202,160,88,0.72);
  background:linear-gradient(170deg, rgba(11,56,48,0.97), rgba(7,36,32,0.95));
  box-shadow:0 22px 38px rgba(2,8,20,0.54), inset 0 1px 0 rgba(245,226,183,0.14);
}

.tq-sheet-head{
  border-bottom-color:rgba(206,163,91,0.5);
}

.tq-sheet-body{
  background:linear-gradient(166deg, rgba(245,236,216,0.985), rgba(233,218,185,0.975));
}

/* Quest Drawer: mission log timeline identity */
#questSheet .tq-sheet-head{
  background:linear-gradient(170deg, rgba(10,62,52,0.98), rgba(7,43,36,0.96));
}

#questSheet .tq-quest-summary{
  border-color:rgba(185,141,70,0.66);
  background:
    linear-gradient(168deg, rgba(247,239,222,0.99), rgba(234,220,188,0.985)),
    radial-gradient(120% 84% at 50% -24%, rgba(255,255,255,0.2), rgba(255,255,255,0));
  box-shadow:0 9px 18px rgba(6,13,28,0.16), inset 0 1px 0 rgba(255,247,228,0.72);
}

#questSheet .tq-quest-steps::before{
  width:1px;
  opacity:.6;
  background:linear-gradient(180deg, rgba(32,112,92,0.82), rgba(188,145,73,0.6), rgba(114,97,71,0.4));
}

#questSheet .tq-step{
  border-color:rgba(183,139,70,0.62);
  border-radius:12px;
  box-shadow:0 6px 12px rgba(7,14,29,0.12);
}

#questSheet .tq-step.is-current{
  box-shadow:0 0 0 1px rgba(208,162,86,0.24), 0 9px 15px rgba(6,14,28,0.16);
}

#questSheet .tq-step.is-done{
  border-color:rgba(33,103,86,0.62);
  background:linear-gradient(166deg, rgba(241,235,218,0.985), rgba(229,219,193,0.975));
}

#questSheet .tq-step.is-locked{
  opacity:.88;
}

/* Bag Drawer: inventory storage emphasis */
#bagSheet .tq-sheet-head{
  background:linear-gradient(170deg, rgba(10,58,49,0.98), rgba(7,41,34,0.96));
}

#bagSheet .tq-sheet-body{
  background:linear-gradient(166deg, rgba(244,235,215,0.985), rgba(232,217,184,0.975));
}

#bagSheet .tq-inv-slot{
  border-color:rgba(24,93,76,0.34);
  background:linear-gradient(166deg, rgba(247,239,221,0.99), rgba(234,221,189,0.985));
  box-shadow:0 8px 14px rgba(7,16,32,0.12), inset 0 1px 0 rgba(255,252,242,0.66);
}

#bagSheet .tq-inv-slot-frame{
  border:1px solid rgba(184,142,73,0.5);
  background:
    linear-gradient(160deg, rgba(249,243,230,0.98), rgba(236,225,198,0.96)),
    radial-gradient(80% 60% at 50% 15%, rgba(255,255,255,0.22), rgba(255,255,255,0));
  box-shadow:inset 0 1px 0 rgba(255,253,246,0.62);
}

#bagSheet .tq-inv-icon{
  border-color:rgba(26,93,76,0.36);
  background:linear-gradient(160deg, rgba(251,245,233,0.98), rgba(238,227,199,0.96));
}

/* Reward Drawer: sacred card reveal/pedestal */
#rewardSheet .tq-sheet-head{
  background:linear-gradient(170deg, rgba(14,64,54,0.98), rgba(9,46,39,0.96));
}

#rewardSheet .tq-sheet-body{
  background:
    linear-gradient(166deg, rgba(244,234,213,0.99), rgba(231,214,178,0.985)),
    radial-gradient(120% 85% at 50% -20%, rgba(255,255,255,0.2), rgba(255,255,255,0));
}

#rewardSheet .tq-reward-card{
  border-color:rgba(198,154,82,0.78);
  background:
    linear-gradient(174deg, rgba(246,237,218,0.99), rgba(233,218,187,0.985)),
    radial-gradient(120% 90% at 50% -16%, rgba(255,249,237,0.26), rgba(255,249,237,0));
  box-shadow:
    0 14px 28px rgba(2,8,20,.34),
    inset 0 1px 0 rgba(255,248,232,.74),
    inset 0 -1px 0 rgba(126,92,46,.2);
}

#rewardSheet .tq-reward-tile{
  border-color:rgba(195,150,79,0.82);
  background:
    radial-gradient(90% 72% at 50% 22%, rgba(213,167,84,0.2), rgba(213,167,84,0)),
    linear-gradient(180deg, rgba(19,76,64,0.94), rgba(12,50,42,0.96));
  box-shadow:inset 0 1px 0 rgba(245,228,186,0.2), 0 10px 18px rgba(3,9,20,0.28);
}

#rewardSheet .tq-reward-stage-halo{
  opacity:.5;
}

#rewardSheet .tq-reward-art{
  border-radius:13px;
  box-shadow:0 0 0 1px rgba(209,166,91,0.48), 0 11px 20px rgba(3,9,20,0.3);
}

#rewardSheet .tq-reward-cta{
  border-color:rgba(188,141,67,0.86);
  background:linear-gradient(180deg, #f3dcad 0%, #dcae61 50%, #ab752f 100%);
}

/* Dialogue: guide/NPC tone */
.tq-dialogue-card{
  border-color:rgba(204,158,84,0.72);
  border-radius:13px;
  background:
    linear-gradient(160deg, rgba(245,236,216,0.985), rgba(231,214,178,0.975)),
    radial-gradient(115% 80% at 0% 0%, rgba(255,255,255,0.2), rgba(255,255,255,0));
  box-shadow:0 14px 28px rgba(2,8,20,0.38);
}

.tq-dialogue-speaker{
  border-color:rgba(184,141,72,0.74);
  background:linear-gradient(160deg, rgba(24,87,72,0.98), rgba(13,55,46,0.98));
  letter-spacing:.05em;
}

.tq-dialogue-body{
  border-left:2px solid rgba(191,146,74,0.46);
  padding-left:8px;
}

.tq-dialogue-primary{
  border-color:rgba(178,126,47,0.84);
  background:linear-gradient(180deg, #f2dba9 0%, #d8aa5e 48%, #a7702c 100%);
}

/* Proof: ritual action sheet (not generic form) */
.tq-proof-card{
  border-color:rgba(197,151,80,0.76);
  border-radius:13px;
  background:
    linear-gradient(162deg, rgba(245,236,215,0.985), rgba(232,216,181,0.975)),
    radial-gradient(120% 84% at 50% -10%, rgba(255,255,255,0.2), rgba(255,255,255,0));
  box-shadow:0 16px 30px rgba(2,8,20,0.38);
}

.tq-proof-file{
  border-color:rgba(176,132,62,0.44);
  background:
    linear-gradient(160deg, rgba(251,244,230,0.96), rgba(237,225,198,0.94));
  box-shadow:inset 0 1px 0 rgba(255,252,245,0.62);
}

.tq-proof-file::before{
  content:"證明印記";
  display:inline-block;
  margin-right:6px;
  border-radius:999px;
  border:1px solid rgba(183,139,69,0.54);
  background:rgba(21,82,68,0.12);
  color:#4a3a24;
  font-size:10px;
  font-weight:800;
  line-height:1.1;
  padding:2px 6px;
}

/* ===== Phase ART-2: Drawer Header / Sheet Frame Art Redesign ===== */
.tq-sheet{
  overflow:hidden;
  border:1px solid rgba(206,163,89,.78);
  border-radius:18px 18px 0 0;
  background:
    linear-gradient(170deg, rgba(9,48,41,.98), rgba(6,32,28,.96));
  box-shadow:
    0 22px 40px rgba(1,7,18,.56),
    inset 0 1px 0 rgba(247,230,189,.18),
    inset 0 -1px 0 rgba(34,95,80,.32);
}

.tq-sheet::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(180deg, rgba(239,198,112,.16), rgba(239,198,112,0) 18%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 22%);
  z-index:0;
}

.tq-sheet-head{
  position:relative;
  z-index:2;
  min-height:52px;
  padding:9px 12px 10px;
  border-bottom:1px solid rgba(210,168,92,.58);
  background:
    linear-gradient(180deg, rgba(14,69,58,.94), rgba(8,45,39,.92)),
    var(--tq-kit-header-plaque-emerald, none);
  background-size:100% 100%, 92% 86%;
  background-repeat:no-repeat, no-repeat;
  background-position:center, center;
  box-shadow:
    inset 0 1px 0 rgba(248,232,194,.22),
    inset 0 -1px 0 rgba(25,90,75,.36);
}

.tq-sheet-head::before,
.tq-sheet-head::after{
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  height:1px;
  pointer-events:none;
}

.tq-sheet-head::before{
  top:6px;
  background:linear-gradient(90deg, rgba(208,164,86,0), rgba(240,201,121,.78), rgba(208,164,86,0));
}

.tq-sheet-head::after{
  bottom:6px;
  background:linear-gradient(90deg, rgba(178,131,62,0), rgba(222,178,100,.56), rgba(178,131,62,0));
}

.tq-sheet-head h3{
  margin:0;
  color:#f4e3bb;
  font-weight:900;
  letter-spacing:.06em;
  text-shadow:0 1px 1px rgba(2,8,18,.56);
}

.tq-sheet-head-actions{
  gap:8px;
}

.tq-sheet-close,
.tq-sheet-collapse,
.tq-dialogue-close,
.tq-proof-close{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(214,172,99,.76);
  border-radius:999px;
  color:#2c2112;
  background:
    radial-gradient(circle at 32% 30%, rgba(255,245,222,.96), rgba(245,217,156,.88) 46%, rgba(200,147,72,.9) 100%);
  box-shadow:
    0 5px 10px rgba(1,7,16,.34),
    inset 0 1px 0 rgba(255,250,239,.92);
}

.tq-sheet-close{
  width:34px;
  height:34px;
  min-width:34px;
  min-height:34px;
}

.tq-sheet-collapse{
  min-height:34px;
  padding:0 12px;
}

.tq-sheet-close::before,
.tq-dialogue-close::before,
.tq-proof-close::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:var(--tq-kit-close-medallion, none) center/88% 88% no-repeat;
  opacity:.92;
  pointer-events:none;
}

/* ART-5B: prevent decorative medallion from stretching on pill-shaped close buttons */
.tq-dialogue-close::before,
.tq-proof-close::before{
  inset:auto;
  left:50%;
  top:50%;
  width:20px;
  height:20px;
  aspect-ratio:1 / 1;
  transform:translate(-50%, -50%);
  background-position:center;
  background-repeat:no-repeat;
  background-size:contain;
}

/* ART-5E: proof header right control cleanup (remove decorative overlap) */
.tq-proof-close::before{
  content:none;
  display:none;
}

.tq-sheet-close:hover,
.tq-sheet-close:focus-visible,
.tq-sheet-collapse:hover,
.tq-sheet-collapse:focus-visible,
.tq-dialogue-close:hover,
.tq-dialogue-close:focus-visible,
.tq-proof-close:hover,
.tq-proof-close:focus-visible{
  transform:translateY(-1px);
  box-shadow:
    0 7px 12px rgba(1,7,16,.38),
    inset 0 1px 0 rgba(255,252,243,.94);
}

.tq-sheet-body{
  position:relative;
  z-index:1;
  background:
    linear-gradient(165deg, rgba(245,236,216,.99), rgba(231,215,182,.985));
  border-top:1px solid rgba(253,240,207,.34);
}

#questSheet .tq-sheet-head,
#bagSheet .tq-sheet-head,
#rewardSheet .tq-sheet-head{
  background-size:100% 100%, 94% 84%;
}

/* role accents on top of shared crafted frame */
#questSheet .tq-sheet-head{
  background-image:
    linear-gradient(180deg, rgba(13,67,56,.95), rgba(8,43,37,.92)),
    var(--tq-kit-header-plaque-emerald, none);
}

#bagSheet .tq-sheet-head{
  background-image:
    linear-gradient(180deg, rgba(12,61,52,.95), rgba(8,40,35,.92)),
    var(--tq-kit-header-plaque-emerald, none);
}

#rewardSheet .tq-sheet-head{
  background-image:
    linear-gradient(180deg, rgba(15,70,58,.95), rgba(9,47,40,.92)),
    var(--tq-kit-header-plaque-emerald, none);
}

.tq-dialogue-card,
.tq-proof-card{
  overflow:hidden;
  border-radius:14px;
  border:1px solid rgba(203,159,86,.74);
  box-shadow:
    0 16px 30px rgba(2,8,20,.4),
    inset 0 1px 0 rgba(248,234,196,.2);
}

.tq-dialogue-head,
.tq-proof-head{
  position:relative;
  padding:10px 12px;
  border-bottom:1px solid rgba(209,167,90,.5);
  background:
    linear-gradient(180deg, rgba(14,67,56,.94), rgba(8,43,37,.92)),
    var(--tq-kit-header-plaque-emerald, none);
  background-size:100% 100%, 90% 82%;
  background-repeat:no-repeat, no-repeat;
  background-position:center, center;
}

.tq-dialogue-head::after,
.tq-proof-head::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:5px;
  height:1px;
  background:linear-gradient(90deg, rgba(188,141,67,0), rgba(234,192,111,.66), rgba(188,141,67,0));
}

.tq-dialogue-head strong,
.tq-proof-head strong{
  color:#f4e5bd;
  text-shadow:0 1px 1px rgba(2,8,16,.56);
}

/* ART-5F: proof header right-side duplicate visual hard cleanup */
#tqProofSheet .tq-proof-head{
  background-image:linear-gradient(180deg, rgba(14,67,56,.94), rgba(8,43,37,.92)) !important;
  background-size:100% 100% !important;
  background-repeat:no-repeat !important;
  background-position:center !important;
}

#tqProofSheet .tq-proof-head::before,
#tqProofSheet .tq-proof-head::after,
#tqProofSheet .tq-proof-close::before,
#tqProofSheet .tq-proof-close::after{
  content:none !important;
  display:none !important;
  background-image:none !important;
}

#tqProofSheet .tq-proof-close{
  background-image:none !important;
  background-color:#f6e4bd !important;
  border-color:rgba(196,141,61,0.96) !important;
  color:#2f210f !important;
  font-weight:900 !important;
  text-shadow:0 1px 0 rgba(255,247,230,0.68) !important;
  box-shadow:0 3px 8px rgba(5,12,22,0.26), inset 0 1px 0 rgba(255,250,238,0.85) !important;
}

/* ART-5G: dialogue header right control cleanup */
.tq-dialogue .tq-dialogue-close::before,
.tq-dialogue .tq-dialogue-close::after{
  content:none !important;
  display:none !important;
  background-image:none !important;
}

.tq-dialogue .tq-dialogue-close{
  background-image:none !important;
  background-color:#f6e4bd !important;
  border-color:rgba(196,141,61,0.96) !important;
  color:#2f210f !important;
  font-weight:900 !important;
  text-shadow:0 1px 0 rgba(255,247,230,0.68) !important;
  box-shadow:0 3px 8px rgba(5,12,22,0.26), inset 0 1px 0 rgba(255,250,238,0.85) !important;
}

/* ===== Phase ART-6: HUD / Dock Icon AI Asset Integration ===== */
.tq-hud-emblem-img{
  width:74%;
  height:74%;
  display:block;
  object-fit:contain;
  margin:auto;
}

.tq-head-emblem-fallback{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
}

.tq-badge{
  gap:6px;
}

.tq-badge::before{
  content:none !important;
}

.tq-badge-glyph{
  width:12px;
  height:12px;
  flex:0 0 12px;
  display:inline-grid;
  place-items:center;
  color:#f1dbaa;
  font-size:10px;
  line-height:1;
  filter:drop-shadow(0 1px 1px rgba(2,8,18,.45));
}

.tq-hud-icon-img{
  width:16px;
  height:16px;
  display:block;
  object-fit:contain;
}

.tq-dock-icon-img{
  width:100%;
  height:100%;
  display:none !important;
  object-fit:contain;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.28));
}

.tq-dock-btn .tq-dock-svg{
  width:26px;
  height:26px;
  display:block !important;
  margin:auto;
  stroke:#e4c789;
  stroke-width:1.9;
  fill:rgba(228,199,137,0.08);
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.26));
}

.tq-dock-btn:not(.is-active) .tq-dock-icon-img{
  opacity:.76;
  filter:grayscale(.14) brightness(.94) drop-shadow(0 2px 4px rgba(0,0,0,.2));
}

.tq-dock-btn.is-active{
  background-image:
    var(--tq-ui-dock-active-tile, none),
    linear-gradient(180deg, rgba(195,152,79,0.18), rgba(195,152,79,0.05)),
    linear-gradient(165deg, rgba(22,83,69,0.62), rgba(14,56,47,0.58));
  background-size:100% 100%, auto, auto;
  background-repeat:no-repeat, no-repeat, no-repeat;
}

.tq-dock-btn.is-active .tq-dock-icon-img{
  opacity:1;
  filter:brightness(1.08) saturate(1.04) drop-shadow(0 2px 5px rgba(180,130,62,.3));
}

.tq-dock-btn.is-active .tq-dock-svg{
  stroke:#f4dca8;
  fill:rgba(244,220,168,0.14);
  filter:drop-shadow(0 1px 3px rgba(189,142,69,.34));
}

#openBagBtnBottom.has-badge::after{
  right:2px;
  top:2px;
}

.tq-refresh-fab{
  display:grid;
  place-items:center;
}

.tq-refresh-fab .tq-hud-icon-img{
  width:18px;
  height:18px;
}

/* ART-6E: dock icon render-path hard fix */
.tq-dock-secondary .tq-dock-btn{
  position:relative;
}

.tq-dock-secondary .tq-dock-ico{
  display:grid !important;
  place-items:center;
  width:28px !important;
  height:28px !important;
  min-width:28px;
  min-height:28px;
  position:relative;
  z-index:2;
}

.tq-dock-secondary .tq-dock-btn .tq-dock-svg{
  width:25px !important;
  height:25px !important;
  display:block !important;
  opacity:.96;
}

.tq-dock-secondary .tq-dock-btn:not(.is-active) .tq-dock-svg{
  stroke:#e8cd96;
  fill:rgba(232,205,150,0.1);
}

.tq-dock-secondary .tq-dock-btn.is-active .tq-dock-svg{
  stroke:#f6e1b3;
  fill:rgba(246,225,179,0.18);
}

#openBagBtnBottom.has-badge::after{
  right:1px;
  top:1px;
}

/* ===== Phase ART-3: Inventory Item Card / Bag Content Polish ===== */
#bagSheet .tq-sheet-body{
  background:
    linear-gradient(166deg, rgba(244,235,214,0.985), rgba(232,217,184,0.975)),
    radial-gradient(120% 90% at 50% -24%, rgba(255,255,255,0.14), rgba(255,255,255,0));
}

#bagSheet .tq-inv-grid{
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:11px;
  padding-top:2px;
}

#bagSheet .tq-inv-slot{
  position:relative;
  min-height:168px;
  border:1px solid rgba(194,151,80,0.62);
  border-radius:16px;
  background:
    linear-gradient(162deg, rgba(247,240,224,0.995), rgba(234,222,192,0.985)),
    radial-gradient(110% 80% at 50% -18%, rgba(255,255,255,0.28), rgba(255,255,255,0));
  box-shadow:
    0 8px 16px rgba(6,14,30,0.14),
    inset 0 1px 0 rgba(255,251,239,0.8);
  padding:8px 8px 9px;
  gap:7px;
}

#bagSheet .tq-inv-slot::before{
  content:"";
  position:absolute;
  inset:5px;
  border:1px solid rgba(184,141,71,0.38);
  border-radius:12px;
  background:
    linear-gradient(180deg, rgba(25,88,73,0.07), rgba(25,88,73,0)),
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.18), rgba(255,255,255,0));
  pointer-events:none;
}

#bagSheet .tq-inv-slot-frame{
  position:relative;
  z-index:1;
  width:100%;
  padding-top:2px;
  gap:7px;
}

#bagSheet .tq-inv-icon{
  width:72px;
  height:72px;
  border-radius:15px;
  border:1px solid rgba(191,149,79,0.7);
  background:
    linear-gradient(162deg, rgba(252,246,234,0.99), rgba(238,227,199,0.96)),
    var(--tq-kit-item-slot-frame, none);
  background-size:100% 100%, 100% 100%;
  background-repeat:no-repeat, no-repeat;
  background-position:center, center;
  box-shadow:
    0 4px 8px rgba(5,12,26,0.12),
    inset 0 1px 0 rgba(255,253,246,0.76);
}

#bagSheet .tq-inv-icon img{
  width:84%;
  height:84%;
  object-fit:contain;
  filter:drop-shadow(0 2px 3px rgba(4,11,22,0.2));
}

#bagSheet .tq-inv-count{
  top:9px;
  right:9px;
  min-width:24px;
  height:18px;
  line-height:16px;
  border:1px solid rgba(203,160,88,0.76);
  background:
    linear-gradient(150deg, rgba(31,101,84,0.98), rgba(18,74,62,0.98));
  color:#f7e9c6;
  box-shadow:
    0 3px 7px rgba(2,8,16,0.3),
    inset 0 1px 0 rgba(242,226,184,0.28);
}

#bagSheet .tq-inv-state{
  min-height:19px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(173,132,64,0.64);
  background:linear-gradient(160deg, rgba(245,233,206,0.96), rgba(228,209,167,0.94));
  color:#48361c;
  font-size:10px;
  letter-spacing:.02em;
}

#bagSheet .tq-inv-slot.is-owned{
  border-color:rgba(165,124,58,0.7);
  box-shadow:
    0 10px 18px rgba(4,10,22,0.16),
    inset 0 1px 0 rgba(255,249,232,0.82);
}

#bagSheet .tq-inv-slot.is-owned .tq-inv-icon{
  border-color:rgba(172,128,58,0.76);
  box-shadow:
    0 5px 10px rgba(4,10,21,0.16),
    inset 0 1px 0 rgba(255,253,247,0.8),
    0 0 0 1px rgba(24,91,75,0.22);
}

#bagSheet .tq-inv-slot.is-owned .tq-inv-state{
  border-color:rgba(30,102,84,0.8);
  background:linear-gradient(150deg, rgba(27,97,80,0.98), rgba(17,73,61,0.98));
  color:#f6e8c5;
}

#bagSheet .tq-inv-slot.is-locked{
  border-color:rgba(154,137,106,0.52);
  background:
    linear-gradient(164deg, rgba(235,227,208,0.96), rgba(221,208,178,0.94));
  box-shadow:
    0 7px 13px rgba(6,12,26,0.1),
    inset 0 1px 0 rgba(252,247,236,0.64);
}

#bagSheet .tq-inv-slot.is-locked .tq-inv-icon{
  border-color:rgba(150,136,108,0.56);
  background:linear-gradient(162deg, rgba(238,232,218,0.94), rgba(223,213,188,0.92));
}

#bagSheet .tq-inv-slot.is-locked .tq-inv-icon img{
  filter:grayscale(.22) saturate(.6) brightness(.9);
}

#bagSheet .tq-inv-slot.is-locked .tq-inv-state{
  border-color:rgba(149,133,103,0.58);
  background:linear-gradient(160deg, rgba(233,224,204,0.92), rgba(216,201,170,0.9));
  color:#6b5a3f;
}

#bagSheet .tq-inv-name{
  margin-top:auto;
  min-height:30px;
  font-size:12px;
  letter-spacing:.01em;
  color:#2e2314;
}

#bagSheet .tq-inv-meta{
  margin-top:2px;
  gap:5px;
  min-height:17px;
  flex-wrap:wrap;
  justify-content:center;
}

#bagSheet .tq-inv-rarity,
#bagSheet .tq-inv-type{
  padding:1px 6px;
  font-size:9px;
  border-radius:999px;
}

#bagSheet .tq-inv-rarity{
  border-color:rgba(168,124,56,0.72);
  background:linear-gradient(145deg, rgba(245,229,192,0.96), rgba(228,203,147,0.94));
  color:#3e2e17;
}

#bagSheet .tq-inv-rarity.is-rare{
  border-color:rgba(41,112,102,0.74);
  background:linear-gradient(145deg, rgba(203,240,229,0.95), rgba(157,220,201,0.94));
  color:#13473f;
}

#bagSheet .tq-inv-rarity.is-epic{
  border-color:rgba(108,81,151,0.74);
  background:linear-gradient(145deg, rgba(230,220,255,0.95), rgba(198,178,241,0.94));
  color:#3b2b63;
}

#bagSheet .tq-inv-type{
  border-color:rgba(105,88,63,0.34);
  background:rgba(255,247,230,0.72);
  color:#5d4d36;
}

#bagSheet .tq-inv-desc{
  margin:5px 0 0;
  min-height:30px;
  font-size:10px;
  line-height:1.34;
  color:#64533a;
  text-align:center;
}

/* ===== Phase ART-4: Quest Drawer / Mission Log Full Art Upgrade ===== */
#questSheet .tq-sheet-body{
  background:
    linear-gradient(166deg, rgba(243,232,208,0.99), rgba(229,212,175,0.985));
}

#questSheet .tq-quest-summary{
  position:relative;
  border:0;
  border-radius:16px;
  padding:14px 14px 13px;
  background:
    linear-gradient(165deg, rgba(246,237,219,0.96), rgba(234,219,188,0.94)),
    url('/img/temple-quest/ganesha/ui/tq-gane-quest-summary-frame-v1.png') center/100% 100% no-repeat;
  box-shadow:
    0 9px 16px rgba(5,13,29,0.16),
    inset 0 1px 0 rgba(255,249,235,0.66);
}

#questSheet .tq-quest-summary-title{
  color:#2b2012;
  font-weight:900;
  letter-spacing:.03em;
}

#questSheet .tq-quest-summary-sub{
  color:#5a4831;
}

#questSheet .tq-quest-summary-count{
  border:0;
  background:
    linear-gradient(160deg, rgba(19,82,69,0.96), rgba(10,57,47,0.94)),
    url('/img/temple-quest/ganesha/ui/tq-gane-quest-status-plaque-v1.png') center/100% 100% no-repeat;
  color:#f3e2ba;
  padding:2px 9px;
  min-height:20px;
  box-shadow:0 4px 8px rgba(2,8,18,0.24);
}

#questSheet .tq-quest-progress-track{
  border-color:rgba(177,133,63,0.58);
  background:
    linear-gradient(180deg, rgba(255,246,224,0.78), rgba(240,225,188,0.72));
}

#questSheet .tq-quest-progress-fill{
  background:
    linear-gradient(90deg, rgba(19,90,74,0.95), rgba(205,165,90,0.92));
}

#questSheet .tq-quest-steps{
  position:relative;
  padding-left:4px;
}

#questSheet .tq-quest-steps::before{
  content:"";
  position:absolute;
  left:11px;
  top:8px;
  bottom:8px;
  width:16px;
  background:url('/img/temple-quest/ganesha/ui/tq-gane-quest-rail-spine-v3.png') center/8px 100% no-repeat;
  opacity:.82;
  pointer-events:none;
}

#questSheet .tq-quest-timeline-item{
  display:grid;
  grid-template-columns:28px 1fr;
  column-gap:9px;
  align-items:start;
}

#questSheet .tq-quest-node-col{
  position:relative;
  z-index:2;
  padding-top:10px;
}

#questSheet .tq-quest-node{
  width:24px;
  height:24px;
  border:0;
  border-radius:50%;
  background:url('/img/temple-quest/ganesha/ui/tq-gane-quest-rail-node-available-v3.png') center/100% 100% no-repeat;
  box-shadow:0 3px 7px rgba(3,9,18,0.26);
}

#questSheet .tq-quest-node::before,
#questSheet .tq-quest-node::after,
#questSheet .tq-quest-timeline-item.is-done .tq-quest-node::before,
#questSheet .tq-quest-timeline-item.is-completed .tq-quest-node::before,
#questSheet .tq-quest-timeline-item.is-rewarded .tq-quest-node::before{
  content:none !important;
  display:none !important;
}

#questSheet .tq-quest-timeline-item.is-active .tq-quest-node,
#questSheet .tq-quest-timeline-item.is-current .tq-quest-node{
  background:url('/img/temple-quest/ganesha/ui/tq-gane-quest-rail-node-active-v3.png') center/100% 100% no-repeat;
  box-shadow:0 4px 10px rgba(3,9,18,0.3);
}

#questSheet .tq-quest-timeline-item.is-completed .tq-quest-node,
#questSheet .tq-quest-timeline-item.is-done .tq-quest-node,
#questSheet .tq-quest-timeline-item.is-rewarded .tq-quest-node{
  background:url('/img/temple-quest/ganesha/ui/tq-gane-quest-rail-node-completed-v3.png') center/100% 100% no-repeat;
}

#questSheet .tq-quest-timeline-item.is-locked .tq-quest-node{
  background:url('/img/temple-quest/ganesha/ui/tq-gane-quest-rail-node-locked-v3.png') center/100% 100% no-repeat;
  opacity:.92;
}

#questSheet .tq-step{
  position:relative;
  border:0;
  border-radius:14px;
  padding:11px 12px 10px;
  background:
    linear-gradient(164deg, rgba(245,236,216,0.95), rgba(232,217,186,0.93)),
    url('/img/temple-quest/ganesha/ui/tq-gane-quest-step-frame-v2.png') center/100% 100% no-repeat;
  box-shadow:0 7px 12px rgba(6,13,27,0.13);
}

#questSheet .tq-step.is-current,
#questSheet .tq-quest-timeline-item.is-active .tq-step{
  background:
    linear-gradient(164deg, rgba(246,238,221,0.96), rgba(234,220,188,0.94)),
    url('/img/temple-quest/ganesha/ui/tq-gane-quest-step-active-frame-v2.png') center/100% 100% no-repeat;
  box-shadow:
    0 10px 18px rgba(5,13,27,0.17),
    0 0 0 1px rgba(205,163,88,0.28);
}

#questSheet .tq-step.is-done{
  background:
    linear-gradient(164deg, rgba(238,234,218,0.94), rgba(226,216,189,0.92)),
    url('/img/temple-quest/ganesha/ui/tq-gane-quest-step-frame-v2.png') center/100% 100% no-repeat;
}

#questSheet .tq-step.is-locked{
  opacity:.88;
  background:
    linear-gradient(164deg, rgba(231,224,204,0.9), rgba(216,204,174,0.88)),
    url('/img/temple-quest/ganesha/ui/tq-gane-quest-step-frame-v2.png') center/100% 100% no-repeat;
}

#questSheet .tq-step-title{
  color:#2c2113;
}

#questSheet .tq-step small{
  color:#5f4c35;
}

#questSheet .tq-pill{
  border:0;
  min-height:21px;
  padding:2px 10px;
  color:#f3e3bc;
  background:
    linear-gradient(160deg, rgba(19,82,69,0.95), rgba(10,58,47,0.94)),
    url('/img/temple-quest/ganesha/ui/tq-gane-quest-status-plaque-v1.png') center/100% 100% no-repeat;
  box-shadow:0 3px 7px rgba(3,9,18,0.22);
}

#questSheet .tq-step.is-done .tq-pill{
  background:
    linear-gradient(160deg, rgba(20,88,74,0.95), rgba(11,62,51,0.94)),
    url('/img/temple-quest/ganesha/ui/tq-gane-quest-status-plaque-v1.png') center/100% 100% no-repeat;
}

#questSheet .tq-step.is-locked .tq-pill{
  color:#6d5a40;
  background:
    linear-gradient(160deg, rgba(233,223,201,0.92), rgba(217,202,171,0.9)),
    url('/img/temple-quest/ganesha/ui/tq-gane-quest-status-plaque-v1.png') center/100% 100% no-repeat;
  box-shadow:none;
}

/* ===== Phase ART-7: Final Visual Consistency Pass ===== */
.tq-topbar{
  box-shadow:0 14px 26px rgba(2,10,18,0.4), inset 0 1px 0 rgba(255,248,231,0.54);
}

.tq-head-emblem{
  box-shadow:inset 0 1px 0 rgba(255,252,241,0.24), 0 4px 9px rgba(8,24,20,0.24);
}

.tq-progress-label{
  color:#4b3a24;
}

.tq-scene-marker.is-active-hotspot{
  z-index:11;
}

.tq-scene-marker.is-completed-hotspot{
  opacity:.64;
}

.tq-scene-marker.is-completed-hotspot .tq-scene-marker-ring{
  opacity:.12;
}

.tq-scene-quest-rail{
  opacity:.9;
}

.tq-command-panel{
  bottom:calc(env(safe-area-inset-bottom, 0px) + 10px);
}

.tq-objective-card{
  box-shadow:0 9px 18px rgba(1,8,14,0.31), inset 0 1px 0 rgba(244,227,186,0.14);
}

.tq-objective-quick-action{
  min-height:21px;
}

.tq-dock-btn{
  min-height:59px;
}

.tq-dock-label{
  line-height:1.1;
}

.tq-sheet-head{
  min-height:50px;
}

.tq-sheet-close,
.tq-sheet-collapse,
.tq-dialogue-close,
.tq-proof-close{
  min-height:32px;
}

#bagSheet .tq-inv-icon{
  border-color:rgba(189,146,76,0.64);
}

#rewardSheet .tq-reward-art-img{
  object-fit:contain;
}

#rewardSheet .tq-reward-stage-pedestal{
  opacity:.88;
}

@media (max-width:390px){
  .tq-command-panel{
    bottom:calc(env(safe-area-inset-bottom, 0px) + 8px);
  }
  .tq-dock-btn{
    min-height:56px;
  }
}

/* ===== RESPONSIVE-REWARD-2: desktop reward sheet compact density ===== */
@media (min-width: 721px){
  #rewardSheet{
    display:grid;
    grid-template-rows:auto minmax(0, 1fr);
    max-height:min(70dvh, calc(100svh - 56px));
  }

  #rewardSheet .tq-sheet-body{
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    padding:10px 10px calc(env(safe-area-inset-bottom, 0px) + 12px);
  }

  #rewardSheet .tq-reward-card{
    min-height:0;
    gap:6px;
    padding:9px 9px 11px;
    border-radius:16px;
  }

  #rewardSheet .tq-reward-unlock-title-wrap{
    min-height:34px;
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    justify-items:center;
    gap:0;
    text-align:center;
  }

  #rewardSheet .tq-reward-unlock-title-wrap.has-plaque::before{
    height:34px;
    width:min(82%, 280px);
  }

  #rewardSheet .tq-reward-unlock-title{
    grid-column:2;
    font-size:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    line-height:1;
    min-height:22px;
    margin:0;
    padding:0;
    box-sizing:border-box;
    color:#2a1a09;
    text-shadow:0 1px 0 rgba(255,240,206,0.32);
  }

  #rewardSheet .tq-reward-unlock-seal{
    grid-column:1;
    justify-self:end;
    margin-right:6px;
  }

  #rewardSheet .tq-reward-status-pill{
    min-height:21px;
    font-size:11px;
    padding:3px 10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    line-height:1;
    white-space:nowrap;
  }

  #rewardSheet .tq-reward-tile{
    width:min(100%, 202px);
    padding:6px 8px 4px;
    border-radius:13px;
    margin-inline:auto;
    background:linear-gradient(180deg, rgba(19,76,64,0.95), rgba(12,50,42,0.97));
  }

#rewardSheet .tq-reward-stage{
    min-height:clamp(126px, 19dvh, 170px);
    max-height:clamp(146px, 22dvh, 196px);
    padding:2px 0 0;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:visible;
  }

  #rewardSheet .tq-reward-stage-halo{
    display:none;
  }

  #rewardSheet .tq-reward-art{
    width:min(100%, 196px);
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:visible;
    box-shadow:0 0 0 1px rgba(209,166,91,0.4), 0 8px 16px rgba(3,9,20,0.26);
  }

  #rewardSheet .tq-reward-art-img{
    width:auto;
    max-width:100%;
    max-height:min(25dvh, 182px);
    height:auto;
    object-fit:contain;
    object-position:center top;
    margin:0 auto;
    transform:none;
  }

  #rewardSheet .tq-reward-stage-pedestal{
    width:clamp(108px, 27vw, 160px);
    bottom:-14px;
    left:50%;
    transform:translateX(-50%);
    opacity:.36;
  }

  #rewardSheet .tq-reward-overlay{
    display:none;
  }

  #rewardSheet .tq-reward-name{
    font-size:18px;
    line-height:1.16;
    margin-top:1px;
  }

  #rewardSheet .tq-reward-meta-row{
    gap:4px;
  }

  #rewardSheet .tq-reward-rarity{
    font-size:9px;
    padding:3px 8px;
  }

  #rewardSheet .tq-reward-meta{
    font-size:10px;
    line-height:1.28;
  }

  #rewardSheet .tq-reward-meta--center{
    max-width:260px;
  }

  #rewardSheet .tq-reward-state{
    font-size:10px;
    line-height:1.32;
  }

  #rewardSheet .tq-reward-requirement{
    font-size:9px;
    line-height:1.3;
  }

  #rewardSheet .tq-reward-cta{
    position:sticky;
    bottom:0;
    z-index:2;
    min-height:42px;
    font-size:14px;
    margin-top:2px;
    box-shadow:0 8px 16px rgba(3,9,20,0.28), inset 0 1px 0 rgba(255,245,220,0.32);
  }
}

/* ===== GANESHA-OBJECTIVE-REWIRE-1 (Objective-only asset wiring) ===== */
.tq-command-panel .tq-objective-card{
  position:relative;
  isolation:isolate;
  border:0;
  border-radius:18px;
  background-color:transparent;
  background-image:url('/img/temple-quest/temples/ganesha/ui/objective/tq-gane-objective-compact-frame-v1.png');
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  box-shadow:none;
  min-height:92px;
  max-height:106px;
  padding:10px 82px 9px 18px;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:3px;
  overflow:hidden;
}

.tq-command-panel .tq-objective-card::before,
.tq-command-panel .tq-objective-card::after{
  display:none !important;
}

.tq-command-panel .tq-objective-head{
  position:relative;
  z-index:2;
  min-height:34px;
  align-items:flex-start;
  justify-content:flex-start;
  padding-right:0;
}

.tq-command-panel .tq-objective-kicker{
  position:relative;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  min-width:156px;
  max-width:68%;
  padding:4px 16px 5px;
  color:#f3e8cb;
  letter-spacing:.04em;
  font-weight:900;
  font-size:11px;
  line-height:1;
  text-shadow:0 1px 5px rgba(3,12,19,.55);
  background-image:url('/img/temple-quest/temples/ganesha/ui/objective/tq-gane-objective-title-plaque-v1.png');
  background-repeat:no-repeat;
  background-position:left center;
  background-size:100% 100%;
}

.tq-command-panel .tq-objective-kicker::before,
.tq-command-panel .tq-objective-kicker::after{
  display:none !important;
}

.tq-command-panel .tq-objective-collapse-btn{
  position:absolute;
  z-index:2;
  right:13px;
  top:8px;
  width:40px;
  min-width:40px;
  height:40px;
  min-height:40px;
  border:0;
  border-radius:50%;
  background-color:transparent;
  background-image:url('/img/temple-quest/temples/ganesha/ui/objective/tq-gane-objective-collapse-button-v1.png');
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  box-shadow:none;
  padding:0;
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  background-image:url('/img/temple-quest/temples/ganesha/ui/objective/tq-gane-objective-expand-button-v1.png');
}

.tq-command-panel .tq-objective-collapse-ico{
  display:none;
}

.tq-command-panel .tq-objective-collapse-label{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  margin:0;
  font-size:9px;
  line-height:1;
  font-weight:800;
  letter-spacing:.02em;
  color:#ecdfbf;
  text-shadow:0 1px 2px rgba(2,10,18,.65);
  pointer-events:none;
}

.tq-command-panel .tq-objective-body{
  position:relative;
  z-index:2;
  border:0;
  background:none;
  padding:0;
  min-height:0;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px;
  align-items:end;
}

.tq-command-panel .tq-action-title{
  position:relative;
  z-index:2;
  font-size:15px;
  line-height:1.28;
  color:#f4ead5;
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

.tq-command-panel .tq-action-title::before{
  content:"";
  position:absolute;
  left:-10px;
  top:50%;
  transform:translateY(-50%);
  width:142px;
  height:62px;
  background-image:url('/img/temple-quest/temples/ganesha/ui/objective/tq-gane-objective-current-step-glow-v1.png');
  background-repeat:no-repeat;
  background-position:left center;
  background-size:contain;
  opacity:.15;
  z-index:-1;
  pointer-events:none;
}

.tq-command-panel .tq-action-sub{
  font-size:11px;
  line-height:1.36;
  color:rgba(244, 231, 202, 0.92);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-command-panel .tq-action-pill{
  border:0;
  border-radius:999px;
  min-height:22px;
  max-width:140px;
  padding:3px 11px 4px;
  color:#f2e6c7;
  font-size:9px;
  line-height:1;
  text-shadow:0 1px 3px rgba(2,10,18,.55);
  background-color:transparent;
  background-image:url('/img/temple-quest/temples/ganesha/ui/objective/tq-gane-objective-step-chip-v1.png');
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  box-shadow:none;
  justify-self:start;
}

.tq-command-panel .tq-objective-quick-action{
  align-self:end;
  min-height:24px;
  width:auto;
  max-width:138px;
  padding:0 11px;
  border-radius:10px;
  border:1px solid rgba(188, 155, 99, 0.58);
  background:linear-gradient(180deg, rgba(44, 73, 63, 0.96), rgba(31, 56, 48, 0.96));
  color:#f2e4c4;
  font-size:10px;
  font-weight:800;
  letter-spacing:.01em;
  box-shadow:0 4px 10px rgba(4, 10, 18, 0.24);
}

/* Expanded state: conservative usage to avoid covering scene */
.tq-command-panel:not(.is-objective-collapsed) .tq-objective-card{
  background-image:url('/img/temple-quest/temples/ganesha/ui/objective/tq-gane-objective-expanded-frame-v1.png');
  background-size:100% 100%;
  min-height:166px;
  max-height:clamp(196px, 25.2vh, 236px);
  padding:12px 82px 13px 18px;
  gap:7px;
  margin-bottom:10px;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-body{
  max-height:clamp(112px, 14.6vh, 138px);
  overflow:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  padding:5px 8px 3px 4px;
  border-radius:12px;
  border:1px solid rgba(184, 153, 102, 0.26);
  background:linear-gradient(180deg, rgba(20, 32, 30, 0.9), rgba(15, 25, 25, 0.92));
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-title{
  font-size:16px;
  line-height:1.36;
  color:#f7edd7;
  text-shadow:0 1px 2px rgba(4, 10, 16, 0.34);
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-sub{
  font-size:12px;
  line-height:1.45;
  color:rgba(246, 233, 205, 0.95);
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  min-height:92px;
  max-height:104px;
  padding:8px 78px 9px 16px;
  gap:4px;
  margin-bottom:4px;
  background-size:104% 100%;
  background-position:left center;
}

.tq-command-panel.is-objective-collapsed .tq-objective-head{
  min-height:32px;
  align-items:center;
}

.tq-command-panel.is-objective-collapsed .tq-objective-kicker{
  min-height:27px;
  min-width:144px;
  padding:4px 14px 5px;
  font-size:10px;
  line-height:1;
  align-self:center;
}

.tq-command-panel.is-objective-collapsed .tq-objective-body{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  max-height:56px;
  overflow:hidden;
  column-gap:8px;
  row-gap:3px;
}

.tq-command-panel.is-objective-collapsed #actionThumb,
.tq-command-panel.is-objective-collapsed .tq-action-sub,
.tq-command-panel.is-objective-collapsed #globalMessage{
  display:none;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  display:flex;
  align-items:center;
  min-height:22px;
  font-size:14px;
  line-height:1.32;
  transform:translateY(-1px);
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  min-height:23px;
  font-size:9px;
  max-width:130px;
  padding:3px 12px 4px;
  line-height:1;
  align-self:center;
  transform:translateY(0);
}

.tq-command-panel.is-objective-collapsed .tq-objective-quick-action{
  min-height:26px;
  max-width:132px;
  padding:0 12px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:center;
  text-align:center;
  transform:translateY(0);
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  right:12px;
  top:50%;
  transform:translateY(-50%);
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-label{
  top:50%;
  transform:translate(-50%, -50%);
}

/* GANESHA-EXPANDED-OBJECTIVE-CLEANUP-1
   Expanded card: simplify hierarchy and remove duplicated CTA noise. */
.tq-command-panel:not(.is-objective-collapsed) .tq-objective-card{
  min-height:182px;
  max-height:clamp(206px, 26.4vh, 246px);
  padding:12px 76px 12px 16px;
  gap:8px;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-head{
  min-height:30px;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-collapse-btn{
  top:12px;
  right:12px;
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-collapse-label{
  font-size:8px;
  letter-spacing:.01em;
  transform:translate(-50%, -48%);
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-body{
  display:block;
  max-height:clamp(124px, 16.8vh, 154px);
  overflow:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  padding:10px 12px 10px;
  border-radius:12px;
  border:1px solid rgba(187, 155, 103, 0.22);
  background:linear-gradient(180deg, rgba(15, 28, 27, 0.56), rgba(10, 21, 21, 0.58));
  box-shadow:inset 0 1px 0 rgba(243, 226, 189, 0.08);
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-title{
  display:block;
  margin:0 0 8px;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.3;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-sub{
  display:block;
  margin:0 0 10px;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.45;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-pill{
  display:none !important;
}

/* Expanded mode keeps only one primary CTA below card. */
.tq-command-panel:not(.is-objective-collapsed) .tq-objective-quick-action{
  display:none !important;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-primary{
  margin-top:6px;
}

/* Dev button should not collide with objective/right controls */
.tq-dev-reset-btn{
  right:10px;
  top:calc(env(safe-area-inset-top, 0px) + 74px);
  bottom:auto;
  opacity:.34;
  transform:scale(.8);
  transform-origin:top right;
  z-index:24;
}

.tq-dev-reset-diag-btn{
  position:fixed;
  right:78px;
  top:calc(env(safe-area-inset-top, 0px) + 74px);
  bottom:auto;
  z-index:24;
  border:1px solid rgba(255,255,255,0.4);
  border-radius:8px;
  background:rgba(20,24,34,0.86);
  color:#9fe7ff;
  font-size:9px;
  font-weight:800;
  letter-spacing:.03em;
  min-height:24px;
  padding:0 7px;
  line-height:1;
  opacity:.46;
  transform:scale(.8);
  transform-origin:top right;
}

@media (max-width:420px){
  .tq-command-panel .tq-objective-card{
    min-height:86px;
    max-height:98px;
    padding:9px 74px 7px 14px;
  }
  .tq-command-panel .tq-objective-kicker{
    min-width:142px;
    min-height:26px;
    font-size:10px;
  }
  .tq-command-panel .tq-objective-collapse-btn{
    right:10px;
    top:7px;
    width:36px;
    min-width:36px;
    height:36px;
    min-height:36px;
  }
  .tq-command-panel:not(.is-objective-collapsed) .tq-objective-card{
    min-height:172px;
    max-height:clamp(196px, 25.2vh, 232px);
    padding:10px 72px 10px 14px;
    margin-bottom:9px;
  }
  .tq-command-panel:not(.is-objective-collapsed) .tq-objective-body{
    max-height:clamp(114px, 15.2vh, 138px);
    padding:9px 10px;
  }
  .tq-command-panel:not(.is-objective-collapsed) .tq-action-title{
    font-size:15px;
    line-height:1.36;
  }
  .tq-command-panel:not(.is-objective-collapsed) .tq-action-sub{
    font-size:11.5px;
    line-height:1.44;
  }
  .tq-command-panel.is-objective-collapsed .tq-objective-card{
    min-height:86px;
    max-height:98px;
    padding:8px 70px 8px 12px;
    margin-bottom:4px;
  }
  .tq-dev-reset-btn{
    top:calc(env(safe-area-inset-top, 0px) + 70px);
    bottom:auto;
    min-height:24px;
    font-size:8px;
    padding:0 7px;
  }
  .tq-dev-reset-diag-btn{
    right:72px;
    top:calc(env(safe-area-inset-top, 0px) + 70px);
    min-height:22px;
    font-size:7.5px;
    padding:0 6px;
  }
}

/* ===== Phase ART-8: Player / Motion Polish ===== */
.tq-character{
  width:50px;
  height:76px;
  transition:
    filter .18s ease,
    left .11s cubic-bezier(.2,.72,.24,1),
    top .11s cubic-bezier(.2,.72,.24,1);
  z-index:6;
}

.tq-character::after{
  top:57%;
  width:78px;
  height:78px;
  background-image:var(--tq-ui-move-foot-glow);
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  opacity:.92;
  filter:
    drop-shadow(0 0 8px rgba(235, 195, 116, 0.5))
    drop-shadow(0 0 14px rgba(37, 122, 98, 0.35));
  mix-blend-mode:screen;
}

.tq-character-shadow{
  width:44px;
  height:14px;
  border-radius:999px;
  background:radial-gradient(ellipse at center, rgba(28,22,15,0.34) 0%, rgba(20,15,10,0.24) 56%, rgba(20,15,10,0.02) 100%);
  filter:blur(1.2px);
  opacity:.92;
  z-index:5;
}

.tq-character.is-moving{
  filter:drop-shadow(0 0 9px rgba(228,188,108,0.3));
}

.tq-character.is-arrived-fx::after{
  animation:tqPlayerArrivePulse .42s ease-out;
}

.tq-scene-marker.is-focus-label .tq-scene-marker-callout{
  transform:translateX(-50%) translateY(-5px);
}

@keyframes tqPlayerArrivePulse{
  0%{ transform:translate(-50%, -50%) scale(.76); opacity:.12; }
  55%{ transform:translate(-50%, -50%) scale(1.08); opacity:.34; }
  100%{ transform:translate(-50%, -50%) scale(1.22); opacity:0; }
}

@media (prefers-reduced-motion: reduce){
  .tq-character{
    transition:none !important;
  }
  .tq-character::after{
    animation:none !important;
  }
  .tq-path-line-trail,
  .tq-path-line-arrow,
  .tq-path-target-rune-art,
  .tq-path-step-sigil-art{
    animation:none !important;
  }
}

/* hotfix: center status text like "已完成" in quest status plaque */
#questSheet .tq-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  text-align:center;
  padding-top:0;
  padding-bottom:0;
}

/* ===== Phase ART-9: Outdoor Readability / Scene Brightness Pass ===== */
.tq-scene-bg{
  filter:brightness(1.12) contrast(1.04) saturate(1.05);
}

.tq-scene-bg::after{
  background:
    radial-gradient(68% 36% at 50% 13%, rgba(255, 213, 130, 0.34), transparent 72%),
    linear-gradient(180deg, rgba(7, 13, 26, 0.12), rgba(7, 13, 26, 0.44));
}

body.tq-sheet-opened .tq-scene-bg::after{
  background:
    radial-gradient(68% 36% at 50% 13%, rgba(255, 213, 130, 0.2), transparent 72%),
    linear-gradient(180deg, rgba(7, 13, 26, 0.3), rgba(7, 13, 26, 0.56));
}

/* ===== GANESHA-DOCK-LIVE-FIX-1: enforce PNG dock path over legacy SVG rules ===== */
.tq-dock-secondary{
  background:var(--tq-ui-dock-frame, none) center / 100% 100% no-repeat !important;
}

.tq-dock-secondary .tq-dock-btn{
  background:url('/img/temple-quest/temples/ganesha/ui/dock/tq-gane-dock-button-frame-v1.png') center / 100% 100% no-repeat !important;
}

.tq-dock-secondary .tq-dock-btn.is-active{
  background:var(--tq-ui-dock-active-tile, none) center / 100% 100% no-repeat !important;
}

.tq-dock-secondary .tq-dock-icon-img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  opacity:1 !important;
  object-fit:contain;
}

.tq-dock-secondary .tq-dock-svg{
  display:none !important;
}

.tq-dock-secondary .tq-dock-btn.has-badge::after,
#openBagBtnBottom.has-badge::after{
  background:url('/img/temple-quest/temples/ganesha/ui/dock/tq-gane-dock-badge-count-frame-v1.png') center / 100% 100% no-repeat !important;
  font-size:10px !important;
  font-weight:800 !important;
  color:#f2e5c8 !important;
}

.tq-dock-secondary .tq-dock-btn.is-locked .tq-dock-ico::after,
.tq-dock-secondary .tq-dock-btn[disabled] .tq-dock-ico::after{
  content:"";
  position:absolute;
  inset:-1px;
  background:url('/img/temple-quest/temples/ganesha/ui/dock/tq-gane-dock-disabled-overlay-v1.png') center / 100% 100% no-repeat;
  pointer-events:none;
}

/* ===== GANESHA-PROOF-REWIRE-1: proof asset-first visual wiring ===== */
#tqProofSheet.tq-proof-sheet{
  position:fixed;
  inset:0;
  left:0;
  right:0;
  top:0;
  bottom:0;
  z-index:88;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:calc(env(safe-area-inset-top, 0px) + 8px) 10px calc(env(safe-area-inset-bottom, 0px) + 90px);
  background:rgba(5, 16, 20, 0.62);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}

#tqProofSheet .tq-proof-card{
  position:relative;
  width:min(94vw, 430px);
  max-height:min(76dvh, 700px);
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  color:#2e2417;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

#tqProofSheet .tq-proof-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:var(--tq-ui-proof-panel-frame, none) center / 100% 100% no-repeat;
  pointer-events:none;
  z-index:0;
}

#tqProofSheet .tq-proof-head,
#tqProofSheet .tq-proof-text,
#tqProofSheet .tq-proof-note,
#tqProofSheet .tq-proof-file,
#tqProofSheet .tq-proof-actions,
#tqProofSheet .tq-proof-status{
  position:relative;
  z-index:1;
}

#tqProofSheet .tq-proof-head{
  min-height:52px;
  padding:20px 22px 10px;
  border:0 !important;
  background:none !important;
}

#tqProofSheet .tq-proof-head strong{
  color:#3a2c19;
  font-size:15px;
  font-weight:900;
  text-shadow:none;
}

#tqProofSheet .tq-proof-close{
  width:48px;
  height:48px;
  min-width:48px;
  min-height:48px;
  border:0 !important;
  background:var(--tq-ui-proof-close-button, none) center / 100% 100% no-repeat !important;
  color:transparent !important;
  box-shadow:none !important;
  text-shadow:none !important;
  border-radius:0 !important;
  padding:0 !important;
}

#tqProofSheet .tq-proof-text{
  margin:4px 20px 0;
  font-size:12px;
  line-height:1.42;
  color:#4e3f2a;
}

#tqProofSheet .tq-proof-note{
  margin:6px 20px 0;
  font-size:10px;
  line-height:1.4;
  color:#66553d;
}

#tqProofSheet .tq-proof-file{
  position:relative;
  margin:8px 20px 0;
  min-height:96px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  text-align:center;
  padding:10px 16px 12px;
  border:0 !important;
  border-radius:0 !important;
  background:var(--tq-ui-proof-upload-panel, none) center / 100% 100% no-repeat !important;
  box-shadow:none !important;
  color:#4c3b25;
  font-size:11px;
}

#tqProofSheet .tq-proof-file::before{
  content:none !important;
}

#tqProofSheet .tq-proof-actions{
  margin:8px 20px 0;
  gap:10px;
}

#tqProofSheet .tq-proof-btn{
  flex:1 1 0;
  min-height:48px;
  border:0 !important;
  border-radius:0 !important;
  padding:0 10px;
  box-shadow:none !important;
  font-size:12px;
  font-weight:900;
  letter-spacing:.01em;
  color:#3b2d18;
  text-shadow:none;
}

#tqProofSheet .tq-proof-btn.is-secondary{
  background:var(--tq-ui-proof-upload-button, none) center / 100% 100% no-repeat !important;
}

#tqProofSheet .tq-proof-btn.is-primary{
  background:var(--tq-ui-proof-submit-button, none) center / 100% 100% no-repeat !important;
  color:#2e2110;
}

#tqProofSheet .tq-proof-btn[disabled]{
  opacity:.58;
}

#tqProofSheet .tq-proof-status{
  margin:7px 20px 14px;
  min-height:24px;
  font-size:11px;
  font-weight:800;
  color:#1e564a;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  position:relative;
}

#tqProofSheet.is-proof-selected .tq-proof-file{
  background:var(--tq-ui-proof-upload-slot, none) center / 100% 100% no-repeat !important;
}

#tqProofSheet.is-proof-uploading .tq-proof-file{
  background:var(--tq-ui-proof-photo-slot-active, none) center / 100% 100% no-repeat !important;
}

#tqProofSheet.is-proof-uploading .tq-proof-file::after{
  content:"";
  position:absolute;
  width:64px;
  height:64px;
  right:8px;
  top:8px;
  background:var(--tq-ui-proof-loading-aura, none) center / 100% 100% no-repeat;
  pointer-events:none;
  opacity:.8;
  animation:tqProofAuraSpin 5s linear infinite;
}

#tqProofSheet.is-proof-success .tq-proof-file{
  background:var(--tq-ui-proof-photo-slot-success, none) center / 100% 100% no-repeat !important;
}

#tqProofSheet.is-proof-success .tq-proof-file::after{
  content:"";
  position:absolute;
  width:68px;
  height:68px;
  right:8px;
  top:6px;
  background:var(--tq-ui-proof-stamp-seal, none) center / 100% 100% no-repeat;
  pointer-events:none;
  opacity:.9;
}

#tqProofSheet.is-proof-error .tq-proof-status{
  color:#5f241f;
}

#tqProofSheet.is-proof-error .tq-proof-status::before{
  content:"";
  position:absolute;
  inset:0;
  background:var(--tq-ui-proof-error-ribbon, none) center / 100% 100% no-repeat;
  z-index:-1;
  opacity:.92;
}

@keyframes tqProofAuraSpin{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

@media (max-width:430px){
  #tqProofSheet.tq-proof-sheet{
    padding:calc(env(safe-area-inset-top, 0px) + 6px) 8px calc(env(safe-area-inset-bottom, 0px) + 86px);
  }

  #tqProofSheet .tq-proof-head{
    padding:18px 18px 9px;
    min-height:50px;
  }

  #tqProofSheet .tq-proof-file{
    margin:8px 18px 0;
    min-height:88px;
  }

  #tqProofSheet .tq-proof-actions{
    margin:8px 18px 0;
    gap:8px;
  }

  #tqProofSheet .tq-proof-btn{
    min-height:44px;
    font-size:11px;
  }

  #tqProofSheet .tq-proof-close{
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px;
  }
}

body.tq-proof-sheet-open .tq-command-panel,
body.tq-proof-sheet-open .tq-dock,
body.tq-proof-sheet-open .tq-scene-hotspots,
body.tq-proof-sheet-open .tq-scene-player-wrap,
body.tq-proof-sheet-open #devControlHost{
  opacity:0 !important;
  pointer-events:none !important;
}

@media (max-width:390px){
  #tqProofSheet.tq-proof-sheet{
    bottom:calc(env(safe-area-inset-bottom, 0px) + 90px);
  }

  #tqProofSheet .tq-proof-text{
    margin:3px 16px 0;
    font-size:11px;
  }

  #tqProofSheet .tq-proof-note{
    margin:6px 16px 0;
    font-size:10px;
  }

  #tqProofSheet .tq-proof-file{
    margin:7px 16px 0;
    min-height:82px;
    font-size:10px;
    padding:9px 12px 10px;
  }

  #tqProofSheet .tq-proof-actions{
    margin:7px 16px 0;
  }

  #tqProofSheet .tq-proof-status{
    margin:7px 16px 12px;
    font-size:10px;
  }
}

/* ===== GANESHA-DIALOGUE-REDESIGN-REWIRE-1 (bottom readable panel, no transparent poster) ===== */
.tq-app{
  position:relative;
}

.tq-app::after{
  content:"";
  position:fixed;
  inset:0;
  background:linear-gradient(180deg, rgba(8, 12, 16, 0.52), rgba(7, 10, 12, 0.62));
  opacity:0;
  pointer-events:none;
  z-index:47;
  transition:opacity .18s ease;
}

body:has(.tq-dialogue:not(.is-hidden)) .tq-app::after{
  opacity:0;
}

.tq-dialogue{
  left:10px !important;
  right:10px !important;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 102px) !important;
  z-index:58 !important;
  pointer-events:none;
}

.tq-dialogue-card{
  pointer-events:auto;
  max-width:640px;
  margin:0 auto;
  border:1px solid rgba(186, 156, 103, 0.64) !important;
  border-radius:16px !important;
  background:
    linear-gradient(180deg, rgba(22, 37, 34, 0.97), rgba(17, 28, 27, 0.98)) !important;
  box-shadow:0 16px 30px rgba(2, 8, 16, 0.5), 0 0 0 1px rgba(120, 96, 58, 0.24) inset !important;
  color:#f4e8d2 !important;
  padding:10px 11px 11px !important;
  min-height:28vh;
  max-height:42vh;
  display:grid;
  grid-template-rows:auto 1fr auto;
  gap:9px;
}

.tq-dialogue-head{
  position:relative;
  z-index:1;
  padding:2px 2px 0 !important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  background:none !important;
  border:0 !important;
}

.tq-dialogue-head::after{
  pointer-events:none !important;
  z-index:0 !important;
}

.tq-dialogue-speaker{
  position:relative;
  z-index:2;
  min-height:20px;
  max-width:min(66vw, 220px);
  padding:3px 10px 4px !important;
  border-radius:10px !important;
  border:1px solid rgba(194, 161, 104, 0.62) !important;
  background:
    var(--tq-ui-dialogue-speaker-plaque, none) center/100% 100% no-repeat,
    linear-gradient(165deg, rgba(27, 76, 65, 0.96), rgba(15, 53, 45, 0.96)) !important;
  color:#f6e9ca !important;
  font-size:10.5px !important;
  font-weight:900;
  letter-spacing:.04em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-dialogue-close{
  position:relative;
  z-index:3;
  pointer-events:auto !important;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  min-width:44px !important;
  min-height:38px !important;
  padding:0 10px !important;
  border-radius:999px !important;
  border:1px solid rgba(176, 146, 96, 0.45) !important;
  background:rgba(31, 49, 45, 0.82) !important;
  color:#ddcb9d !important;
  font-size:10px !important;
  font-weight:700 !important;
  box-shadow:0 1px 4px rgba(5, 12, 18, 0.22) !important;
  letter-spacing:.02em;
  line-height:1;
}

.tq-dialogue-body{
  margin-top:3px !important;
  padding:11px 12px !important;
  border:1px solid rgba(188, 156, 102, 0.28);
  border-radius:12px;
  background:rgba(15, 22, 22, 0.94);
  color:#f2e5cc !important;
  font-size:13px !important;
  line-height:1.68 !important;
  letter-spacing:.01em;
  overflow:auto;
  min-height:0;
}

.tq-dialogue-foot{
  margin-top:6px !important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.tq-dialogue-progress{
  color:#d9c7a1 !important;
  font-size:10px !important;
  letter-spacing:.03em;
}

.tq-dialogue-primary{
  min-height:29px !important;
  padding:0 12px !important;
  border-radius:10px !important;
  border:1px solid rgba(178, 143, 90, 0.78) !important;
  background:
    var(--tq-ui-dialogue-action-button, none) center/100% 100% no-repeat,
    linear-gradient(180deg, rgba(220, 193, 136, 0.95), rgba(190, 150, 84, 0.94)) !important;
  color:#2f210f !important;
  font-size:11.5px !important;
  font-weight:900 !important;
  box-shadow:0 6px 12px rgba(3, 8, 16, 0.3) !important;
}

body:has(.tq-dialogue:not(.is-hidden)) .tq-command-panel,
body:has(.tq-dialogue:not(.is-hidden)) .tq-topbar,
body:has(.tq-dialogue:not(.is-hidden)) .tq-dock,
body:has(.tq-dialogue:not(.is-hidden)) .tq-dock-secondary,
body:has(.tq-dialogue:not(.is-hidden)) #tqDevResetBtn,
body:has(.tq-dialogue:not(.is-hidden)) #tqDevSimBadge,
body:has(.tq-dialogue:not(.is-hidden)) .tq-scene-marker,
body:has(.tq-dialogue:not(.is-hidden)) #sceneCharacter,
body:has(.tq-dialogue:not(.is-hidden)) #sceneCharacterShadow{
  opacity:1 !important;
}

body:has(.tq-dialogue:not(.is-hidden)) #tqDevResetBtn,
body:has(.tq-dialogue:not(.is-hidden)) #tqDevSimBadge{
  opacity:1 !important;
  transform:scale(.9);
  transform-origin:top right;
}

body:has(.tq-dialogue:not(.is-hidden)) .tq-command-panel,
body:has(.tq-dialogue:not(.is-hidden)) .tq-dock,
body:has(.tq-dialogue:not(.is-hidden)) .tq-dock-secondary{
  pointer-events:none;
}

body:has(.tq-dialogue:not(.is-hidden)) .tq-dock,
body:has(.tq-dialogue:not(.is-hidden)) .tq-dock-secondary{
  opacity:1 !important;
}

@media (max-width: 430px){
  .tq-dialogue{
    bottom:calc(env(safe-area-inset-bottom, 0px) + 96px) !important;
  }
  .tq-dialogue-card{
    min-height:30vh;
    max-height:42vh;
    padding:10px 10px 10px !important;
  }
  .tq-dialogue-body{
    font-size:13px !important;
    line-height:1.7 !important;
  }
}

/* ===== GANESHA-QUEST-REDESIGN-REWIRE-1 (readability-first quest sheet) ===== */
#questSheet{
  max-height:min(78vh, 680px);
  background:
    linear-gradient(170deg, rgba(11,41,36,0.97), rgba(8,28,25,0.965)),
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-sheet-frame-v1.png') center/100% 100% no-repeat;
  border-color:rgba(216,177,104,0.52);
  box-shadow:0 20px 44px rgba(0,0,0,0.58);
}

#questSheet::before{
  border-color:rgba(221,183,111,0.4);
  inset:8px 8px 0;
}

#questSheet .tq-sheet-head{
  padding:13px 14px 11px;
  border-bottom:1px solid rgba(219,180,108,0.34);
  background:linear-gradient(180deg, rgba(15,58,50,0.58), rgba(10,34,30,0.2));
}

#questSheet .tq-sheet-head h3{
  font-size:17px;
  color:#f3e8cb;
  letter-spacing:.03em;
  text-shadow:0 1px 0 rgba(0,0,0,0.32);
}

#questSheet .tq-sheet-head-actions{
  gap:6px;
}

#questSheet .tq-sheet-collapse,
#questSheet .tq-sheet-close{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid rgba(214,173,100,0.5);
  background:linear-gradient(155deg, rgba(21,74,64,0.92), rgba(12,44,39,0.9));
  color:#f1dfb6;
  box-shadow:0 3px 8px rgba(2,11,9,0.38);
}

#questSheet .tq-sheet-body{
  padding:12px 11px 14px;
  background:
    linear-gradient(170deg, rgba(20,56,49,0.9), rgba(13,39,34,0.89)),
    linear-gradient(180deg, rgba(8,27,24,0.24), rgba(7,21,18,0.42));
  color:#f0e3c4;
  scrollbar-width:thin;
}

#questSheet .tq-quest-summary{
  border:1px solid rgba(223,186,114,0.36);
  border-radius:15px;
  padding:12px 12px 11px;
  background:
    linear-gradient(165deg, rgba(20,69,59,0.9), rgba(13,44,38,0.88)),
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-sheet-frame-v1.png') center/cover no-repeat;
  box-shadow:0 8px 16px rgba(2,11,9,0.26);
}

#questSheet .tq-quest-summary-title{
  color:#f4e8c9;
  font-size:15px;
  font-weight:900;
}

#questSheet .tq-quest-summary-sub{
  margin-top:4px;
  color:rgba(243,231,203,0.84);
  font-size:12px;
  line-height:1.45;
}

#questSheet .tq-quest-summary-count{
  border:1px solid rgba(222,184,111,0.44);
  background:linear-gradient(160deg, rgba(13,61,53,0.94), rgba(9,40,35,0.9));
  color:#f6e4b7;
  min-height:22px;
  font-size:11px;
  padding:2px 9px;
}

#questSheet .tq-quest-progress-track{
  margin-top:9px;
  height:12px;
  border-radius:999px;
  border:1px solid rgba(220,181,108,0.42);
  background:
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-progress-bar-frame-v1.png') center/100% 100% no-repeat,
    linear-gradient(180deg, rgba(8,30,27,0.7), rgba(6,20,18,0.75));
  overflow:hidden;
}

#questSheet .tq-quest-progress-fill{
  height:100%;
  border-radius:999px;
  background:
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-progress-fill-v1.png') left center/100% 100% no-repeat,
    linear-gradient(90deg, rgba(24,133,112,0.9), rgba(199,164,94,0.84));
}

#questSheet .tq-quest-timeline{
  margin-top:10px;
}

#questSheet .tq-quest-steps{
  display:grid;
  gap:9px;
  padding-left:0;
}

#questSheet .tq-quest-steps::before{
  content:none;
}

#questSheet .tq-quest-timeline-item{
  grid-template-columns:26px 1fr;
  column-gap:8px;
  align-items:start;
}

#questSheet .tq-quest-node-col{
  padding-top:8px;
}

#questSheet .tq-quest-node{
  width:20px;
  height:20px;
  border-radius:50%;
  border:1px solid rgba(221,181,107,0.42);
  background:linear-gradient(160deg, rgba(18,73,63,0.94), rgba(10,40,35,0.93));
  box-shadow:0 0 0 1px rgba(0,0,0,0.18) inset;
}

#questSheet .tq-quest-timeline-item.is-active .tq-quest-node,
#questSheet .tq-quest-timeline-item.is-current .tq-quest-node{
  background:url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-check-seal-v1.png') center/100% 100% no-repeat;
  border-color:rgba(220,180,106,0.62);
}

#questSheet .tq-quest-timeline-item.is-completed .tq-quest-node,
#questSheet .tq-quest-timeline-item.is-done .tq-quest-node,
#questSheet .tq-quest-timeline-item.is-rewarded .tq-quest-node{
  background:url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-check-seal-v1.png') center/100% 100% no-repeat;
  opacity:.9;
}

#questSheet .tq-quest-timeline-item.is-locked .tq-quest-node{
  background:url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-lock-seal-v1.png') center/100% 100% no-repeat;
  opacity:.8;
}

#questSheet .tq-step{
  border:1px solid rgba(219,181,109,0.34);
  border-radius:13px;
  padding:10px 11px;
  background:
    linear-gradient(165deg, rgba(14,56,48,0.92), rgba(10,35,31,0.9)),
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-step-row-frame-v1.png') center/100% 100% no-repeat;
  box-shadow:0 6px 12px rgba(2,10,9,0.25);
}

#questSheet .tq-step.is-current,
#questSheet .tq-quest-timeline-item.is-active .tq-step{
  border-color:rgba(226,187,114,0.54);
  background:
    linear-gradient(165deg, rgba(18,65,56,0.94), rgba(12,41,36,0.93)),
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-step-row-active-v1.png') center/100% 100% no-repeat;
  box-shadow:0 8px 16px rgba(2,11,9,0.32);
}

#questSheet .tq-step.is-done,
#questSheet .tq-quest-timeline-item.is-completed .tq-step,
#questSheet .tq-quest-timeline-item.is-rewarded .tq-step{
  opacity:.72;
  background:
    linear-gradient(165deg, rgba(18,60,52,0.9), rgba(12,37,33,0.88)),
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-step-row-complete-v1.png') center/100% 100% no-repeat;
}

#questSheet .tq-step.is-locked,
#questSheet .tq-quest-timeline-item.is-locked .tq-step{
  opacity:.56;
  background:
    linear-gradient(165deg, rgba(20,45,41,0.84), rgba(14,31,28,0.82)),
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-quest-step-row-locked-v1.png') center/100% 100% no-repeat;
}

#questSheet .tq-step-top{
  gap:7px;
}

#questSheet .tq-step-title{
  font-size:14px;
  line-height:1.38;
  color:#f4e8c8;
}

#questSheet .tq-step small{
  margin-top:4px;
  color:rgba(245,233,204,0.86);
  font-size:12px;
  line-height:1.45;
  -webkit-line-clamp:2;
}

#questSheet .tq-step-proof-note{
  margin-top:6px;
  border-color:rgba(227,190,117,0.36);
  background:rgba(5,20,17,0.46);
  color:#f1ddb2;
}

#questSheet .tq-step-meta{
  margin-top:7px;
  gap:3px;
}

#questSheet .tq-step-meta-item{
  color:rgba(235,224,196,0.78);
  font-size:11px;
  line-height:1.34;
}

#questSheet .tq-step.is-locked .tq-step-meta-item{
  color:rgba(194,182,159,0.76);
}

#questSheet .tq-pill{
  min-height:20px;
  border:1px solid rgba(219,179,106,0.4);
  background:linear-gradient(160deg, rgba(15,66,57,0.92), rgba(10,40,35,0.9));
  color:#ecdab3;
  font-size:10px;
  padding:2px 8px;
}

#questSheet .tq-step.is-current .tq-pill{
  border-color:rgba(232,192,120,0.54);
  color:#f6e7c2;
}

#questSheet .tq-step.is-done .tq-pill{
  border-color:rgba(103,189,164,0.4);
  color:#d6efe8;
}

#questSheet .tq-step.is-locked .tq-pill{
  border-color:rgba(170,156,132,0.4);
  background:rgba(42,57,53,0.84);
  color:#c4b9a1;
}

body.tq-sheet-opened:has(#questSheet.is-open) .tq-command-panel{
  opacity:.5;
  filter:saturate(.86) brightness(.9);
}

body.tq-sheet-opened:has(#questSheet.is-open) .tq-dock{
  opacity:.32;
  transform:translateY(8px);
}

body.tq-sheet-opened:has(#questSheet.is-open) .tq-scene-hotspots,
body.tq-sheet-opened:has(#questSheet.is-open) .tq-scene-player-wrap{
  opacity:.5;
}

body.tq-sheet-opened:has(#questSheet.is-open) #devControlHost{
  opacity:.34;
}

@media (max-width:420px){
  #questSheet{
    max-height:min(76vh, 640px);
  }
  #questSheet .tq-sheet-head{
    padding:12px 12px 10px;
  }
  #questSheet .tq-sheet-head h3{
    font-size:16px;
  }
  #questSheet .tq-sheet-body{
    padding:10px 10px 12px;
  }
  #questSheet .tq-quest-summary{
    padding:11px 10px 10px;
  }
  #questSheet .tq-quest-summary-sub{
    font-size:11.5px;
  }
  #questSheet .tq-step{
    padding:9px 10px;
  }
  #questSheet .tq-step-title{
    font-size:13.5px;
  }
  #questSheet .tq-step small{
    font-size:11.5px;
  }
}

/* ===== GANESHA-BAG-REDESIGN-REWIRE-1 (ritual inventory readability-first) ===== */
#bagSheet{
  max-height:min(78vh, 680px);
  background:
    linear-gradient(170deg, rgba(10,38,34,0.97), rgba(7,26,23,0.965)),
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-bag-sheet-frame-v1.png') center/100% 100% no-repeat;
  border-color:rgba(214,176,104,0.5);
  box-shadow:0 22px 46px rgba(0,0,0,0.58);
}

#bagSheet::before{
  inset:8px 8px 0;
  border-color:rgba(222,184,112,0.38);
}

#bagSheet .tq-sheet-head{
  padding:13px 14px 11px;
  border-bottom:1px solid rgba(221,184,111,0.32);
  background:linear-gradient(180deg, rgba(15,57,49,0.58), rgba(9,33,29,0.2));
}

#bagSheet .tq-sheet-head h3{
  color:#f3e6c7;
  font-size:17px;
  letter-spacing:.03em;
  text-shadow:0 1px 0 rgba(0,0,0,0.32);
}

#bagSheet .tq-sheet-close{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid rgba(213,174,102,0.52);
  background:
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-bag-close-button-v1.png') center/100% 100% no-repeat,
    linear-gradient(155deg, rgba(21,74,64,0.92), rgba(12,44,39,0.9));
  color:#f0ddb4;
  box-shadow:0 3px 8px rgba(2,11,9,0.38);
}

#bagSheet .tq-sheet-body{
  padding:12px 11px 14px;
  background:
    linear-gradient(170deg, rgba(20,56,49,0.9), rgba(13,39,34,0.89)),
    linear-gradient(180deg, rgba(8,27,24,0.24), rgba(7,21,18,0.42));
  color:#efe3c4;
}

#bagSheet .tq-inv-grid{
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}

#bagSheet .tq-inv-slot{
  border:1px solid rgba(219,180,109,0.34);
  border-radius:13px;
  padding:9px 9px 10px;
  background:
    linear-gradient(165deg, rgba(14,55,48,0.92), rgba(10,35,31,0.9));
  box-shadow:0 6px 12px rgba(2,10,9,0.25);
}

#bagSheet .tq-inv-slot::before,
#bagSheet .tq-inv-slot::after{
  display:none;
}

#bagSheet .tq-inv-slot-frame{
  min-height:92px;
  border-radius:12px;
  border:1px solid rgba(216,177,104,0.34);
  background:
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-bag-item-slot-v1.png') center/100% 100% no-repeat,
    radial-gradient(130% 100% at 50% 12%, rgba(63,103,91,0.42), rgba(17,38,33,0.92));
  overflow:hidden;
}

#bagSheet .tq-inv-slot.is-owned .tq-inv-slot-frame{
  border-color:rgba(229,190,118,0.46);
  background:
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-bag-item-slot-active-v1.png') center/100% 100% no-repeat,
    radial-gradient(130% 100% at 50% 12%, rgba(74,120,104,0.44), rgba(18,42,36,0.93));
}

#bagSheet .tq-inv-slot.is-locked .tq-inv-slot-frame{
  border-color:rgba(164,152,128,0.4);
  background:
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-bag-item-slot-empty-v1.png') center/100% 100% no-repeat,
    radial-gradient(130% 100% at 50% 12%, rgba(66,70,67,0.34), rgba(20,29,27,0.9));
}

/* white-box mitigation */
#bagSheet .tq-inv-icon{
  width:72px;
  height:72px;
  border-radius:14px;
  border:1px solid rgba(207,169,97,0.58);
  background:
    radial-gradient(135% 100% at 50% 15%, rgba(70,106,95,0.44), rgba(16,34,30,0.94)),
    linear-gradient(160deg, rgba(27,58,50,0.92), rgba(13,27,24,0.94));
  box-shadow:
    inset 0 1px 0 rgba(255,252,238,0.08),
    0 4px 10px rgba(2,8,15,0.36);
}

#bagSheet .tq-inv-icon img{
  width:84%;
  height:84%;
  object-fit:contain;
  object-position:center;
  border-radius:10px;
  background:rgba(15,30,27,0.5);
  padding:2px;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,0.38));
}

#bagSheet .tq-inv-count{
  top:8px;
  right:8px;
  min-width:24px;
  height:18px;
  line-height:16px;
  border:1px solid rgba(217,178,106,0.58);
  background:
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-bag-quantity-badge-v1.png') center/100% 100% no-repeat,
    linear-gradient(150deg, rgba(25,96,80,0.98), rgba(15,70,59,0.98));
  color:#f7e9c7;
  font-size:10px;
  font-weight:800;
}

#bagSheet .tq-inv-state{
  left:7px;
  bottom:7px;
  min-height:19px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(173,132,64,0.56);
  background:linear-gradient(160deg, rgba(31,80,69,0.92), rgba(17,53,46,0.9));
  color:#efe2c3;
  font-size:10px;
}

#bagSheet .tq-inv-slot.is-locked .tq-inv-state{
  border-color:rgba(154,140,116,0.5);
  background:linear-gradient(160deg, rgba(61,68,64,0.86), rgba(40,47,43,0.84));
  color:#c6bda9;
}

#bagSheet .tq-inv-name{
  margin-top:2px;
  min-height:30px;
  color:#f2e5c5;
  font-size:12px;
  line-height:1.3;
  letter-spacing:.01em;
}

#bagSheet .tq-inv-meta{
  margin-top:2px;
  gap:5px;
}

#bagSheet .tq-inv-rarity,
#bagSheet .tq-inv-type{
  font-size:9px;
  padding:1px 6px;
  border-radius:999px;
}

#bagSheet .tq-inv-rarity{
  border-color:rgba(208,169,97,0.5);
  background:rgba(78,97,89,0.62);
  color:#f2dfb5;
}

#bagSheet .tq-inv-rarity.is-rare{
  border-color:rgba(82,167,143,0.52);
  background:rgba(23,84,72,0.64);
  color:#d9f0ea;
}

#bagSheet .tq-inv-rarity.is-epic{
  border-color:rgba(125,103,178,0.58);
  background:rgba(62,46,98,0.58);
  color:#e6ddff;
}

#bagSheet .tq-inv-type{
  border-color:rgba(151,135,110,0.44);
  background:rgba(33,52,46,0.58);
  color:#d8ceb8;
}

#bagSheet .tq-inv-desc{
  margin:4px 0 0;
  min-height:34px;
  color:rgba(236,225,197,0.84);
  font-size:10.5px;
  line-height:1.4;
  text-align:left;
}

#bagSheet .tq-bag-hint{
  margin-top:11px;
  border:1px solid rgba(221,183,111,0.34);
  border-radius:12px;
  background:
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-bag-item-detail-panel-v1.png') center/100% 100% no-repeat,
    linear-gradient(165deg, rgba(18,60,52,0.9), rgba(11,38,34,0.88));
  padding:11px 11px;
  gap:5px;
}

#bagSheet .tq-bag-hint-title{
  font-size:11px;
  font-weight:800;
  color:#f3e5c6;
}

#bagSheet .tq-bag-hint-text{
  font-size:11px;
  color:rgba(242,231,202,0.86);
  line-height:1.42;
}

#bagSheet .tq-inv-slot--empty{
  border-style:solid;
  border-color:rgba(180,162,129,0.38);
  min-height:90px;
  background:
    url('/img/temple-quest/temples/ganesha/ui/sheets/tq-gane-bag-item-slot-empty-v1.png') center/100% 100% no-repeat,
    linear-gradient(160deg, rgba(28,43,39,0.88), rgba(18,29,27,0.86));
}

body.tq-sheet-opened:has(#bagSheet.is-open) .tq-command-panel{
  opacity:.48;
  filter:saturate(.84) brightness(.9);
}

body.tq-sheet-opened:has(#bagSheet.is-open) .tq-dock{
  opacity:.3;
  transform:translateY(8px);
}

body.tq-sheet-opened:has(#bagSheet.is-open) .tq-scene-hotspots,
body.tq-sheet-opened:has(#bagSheet.is-open) .tq-scene-player-wrap{
  opacity:.5;
}

body.tq-sheet-opened:has(#bagSheet.is-open) #devControlHost{
  opacity:.34;
}

@media (max-width:420px){
  #bagSheet{
    max-height:min(76vh, 640px);
  }
  #bagSheet .tq-sheet-head{
    padding:12px 12px 10px;
  }
  #bagSheet .tq-sheet-head h3{
    font-size:16px;
  }
  #bagSheet .tq-sheet-body{
    padding:10px 10px 12px;
  }
  #bagSheet .tq-inv-grid{
    gap:8px;
  }
  #bagSheet .tq-inv-slot{
    padding:8px 8px 9px;
  }
  #bagSheet .tq-inv-icon{
    width:68px;
    height:68px;
  }
}

/* GANESHA-HOME-GAMEPLAY-CALIBRATION-TOKENS */
:root{
  /* Objective tokens */
  --tq-objective-card-x: 0px;
  --tq-objective-card-y: 0px;
  --tq-objective-card-h: auto;
  --tq-objective-title-x: 0px;
  --tq-objective-title-y: 0px;
  --tq-objective-title-w: auto;
  --tq-objective-tag-x: 0px;
  --tq-objective-tag-y: 0px;
  --tq-objective-content-left: 18px;
  --tq-objective-content-right: 86px;
  --tq-objective-action-x: 0px;
  --tq-objective-action-y: 0px;
  --tq-objective-expand-x: 0px;
  --tq-objective-expand-y: 0px;
  --tq-objective-ornament-opacity: 1;
  --tq-objective-ornament-scale: 1;
  --tq-objective-scrim-opacity: 0;

  /* Dock tokens */
  --tq-dock-y: 0px;
  --tq-dock-button-w: auto;
  --tq-dock-button-h: auto;
  --tq-dock-icon-y: 0px;
  --tq-dock-move-icon-y: var(--tq-dock-icon-y);
  --tq-dock-quest-icon-y: var(--tq-dock-icon-y);
  --tq-dock-bag-icon-y: var(--tq-dock-icon-y);
  --tq-dock-reward-icon-y: var(--tq-dock-icon-y);
  --tq-dock-icon-size: auto;
  --tq-dock-label-y: 0px;
  --tq-dock-label-line-height: normal;
  --tq-dock-badge-x: 0px;
  --tq-dock-badge-y: 0px;
}

/* GANESHA-HOME-GAMEPLAY-CALIBRATION-OVERLAY (dev-only, calibrate=1) */
.tq-calibration-overlay{
  position:fixed;
  inset:auto;
  z-index:2147482000;
  pointer-events:none;
  display:block;
  overflow:hidden;
  border:2px solid rgba(160,228,213,0.92);
  box-shadow:
    inset 0 0 0 1px rgba(14,22,28,0.8),
    0 0 0 1px rgba(160,228,213,0.52);
  mix-blend-mode:normal;
}

.tq-calibration-grid{
  position:absolute;
  inset:0;
  pointer-events:none;
}

.tq-calibration-grid--8{
  background-image:
    linear-gradient(to right, rgba(113,176,165,0.44) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(113,176,165,0.44) 1px, transparent 1px);
  background-size:8px 8px;
}

.tq-calibration-grid--4{
  background-image:
    linear-gradient(to right, rgba(113,176,165,0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(113,176,165,0.2) 1px, transparent 1px);
  background-size:4px 4px;
}

.tq-calibration-box,
.tq-calibration-safe-area,
.tq-calibration-ref{
  position:absolute;
  border:2px dashed rgba(185,237,227,0.98);
  box-sizing:border-box;
  pointer-events:none;
  background:rgba(255,255,255,0.02);
}

.tq-calibration-box[data-role="objectiveCard"]{ border-color:#49d7ff; background:rgba(73,215,255,0.06); }
.tq-calibration-box[data-role="objectiveContent"]{ border-color:#75f4ff; background:rgba(117,244,255,0.06); }
.tq-calibration-box[data-role="objectiveTitle"]{ border-color:#ffe26d; background:rgba(255,226,109,0.08); }
.tq-calibration-box[data-role="objectiveTag"]{ border-color:#ffb95d; background:rgba(255,185,93,0.08); }
.tq-calibration-box[data-role="objectiveAction"]{ border-color:#ffd24a; background:rgba(255,210,74,0.09); }
.tq-calibration-box[data-role="objectiveExpand"]{ border-color:#ff8bc4; background:rgba(255,139,196,0.08); }
.tq-calibration-box[data-role="objectiveOrnament"]{ border-color:#ff8a4a; background:rgba(255,138,74,0.08); }
.tq-calibration-box[data-role="dock"]{ border-color:#cb74ff; background:rgba(203,116,255,0.07); }
.tq-calibration-box[data-role^="dock"]{ border-style:solid; border-width:2px; }

.tq-calibration-line{
  position:absolute;
  border-top:2px dashed #9dff5d;
  pointer-events:none;
}

.tq-calibration-line--baseline{ border-top-color:#ff678c; }

.tq-calibration-label{
  position:absolute;
  left:2px;
  top:2px;
  padding:2px 6px;
  font-size:10px;
  font-weight:700;
  line-height:1.2;
  letter-spacing:.01em;
  color:#fff6de;
  background:rgba(8,16,22,0.95);
  border:1px solid rgba(211,248,236,0.95);
  border-radius:6px;
  text-shadow:none;
  white-space:nowrap;
  pointer-events:none;
  box-shadow:0 0 0 1px rgba(0,0,0,0.38);
}

.tq-calibration-viewport-label{
  position:absolute;
  left:8px;
  top:8px;
  z-index:2;
}

.tq-calibration-line .tq-calibration-label{
  left:8px;
  top:-16px;
}

.tq-calibration-safe-area{
  border-style:dashed;
  border-color:#ffffff;
}

.tq-calibration-ref{
  border-color:#90ffb5;
  border-style:dotted;
}

.tq-calibration-box.is-missing,
.tq-calibration-line.is-missing{
  opacity:.3;
}

/* GANESHA-OBJECTIVE-DOCK-POSITION-FIX-1 */
:root{
  --tq-objective-card-x: 0px;
  --tq-objective-card-y: 18px;
  --tq-objective-card-h: auto;
  --tq-objective-title-x: 48px;
  --tq-objective-title-y: -2px;
  --tq-objective-title-w: auto;
  --tq-objective-tag-x: 27px;
  --tq-objective-tag-y: -8px;
  --tq-objective-action-x: 10px;
  --tq-objective-action-y: -8px;
  --tq-objective-expand-x: 9px;
  --tq-objective-expand-y: -22px;
  --tq-objective-ornament-opacity: .64;
  --tq-objective-ornament-scale: .9;
  --tq-dock-y: 1px;
  --tq-dock-button-w: auto;
  --tq-dock-button-h: 64px;
  --tq-dock-icon-y: 2px;
  --tq-dock-move-icon-y: var(--tq-dock-icon-y);
  --tq-dock-quest-icon-y: var(--tq-dock-icon-y);
  --tq-dock-bag-icon-y: var(--tq-dock-icon-y);
  --tq-dock-reward-icon-y: var(--tq-dock-icon-y);
  --tq-dock-icon-size: 30px;
  --tq-dock-label-y: 0px;
  --tq-dock-label-line-height: 1.06;
  --tq-dock-badge-x: 0px;
  --tq-dock-badge-y: 0px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  min-height:54px;
  max-height:60px;
  height:var(--tq-objective-card-h);
  transform:translate(var(--tq-objective-card-x), var(--tq-objective-card-y));
  padding:6px 10px 7px;
  gap:3px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-head{
  min-height:18px;
  align-items:center;
  padding-right:2px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-kicker{
  align-self:center;
  margin:0;
  transform:translate(var(--tq-objective-tag-x), var(--tq-objective-tag-y));
}

.tq-command-panel.is-objective-collapsed .tq-objective-body{
  align-items:center;
  min-height:28px;
  gap:8px;
}

.tq-command-panel.is-objective-collapsed .tq-action-copy{
  min-width:0;
  justify-content:center;
  gap:3px;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  width:var(--tq-objective-title-w);
  margin:0;
  transform:translate(var(--tq-objective-title-x), var(--tq-objective-title-y));
  line-height:1.1;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  margin-top:0;
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  align-self:center;
  min-height:22px;
  padding:0 9px;
  transform:translate(var(--tq-objective-expand-x), var(--tq-objective-expand-y));
}

.tq-command-panel.is-objective-collapsed .tq-objective-quick-action{
  align-self:center;
  justify-self:end;
  min-width:88px;
  min-height:24px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transform:translate(var(--tq-objective-action-x), var(--tq-objective-action-y));
}

.tq-command-panel.is-objective-collapsed .tq-objective-card::after{
  opacity:var(--tq-objective-ornament-opacity);
  transform:scale(var(--tq-objective-ornament-scale));
  transform-origin:right center;
}

.tq-dock{
  transform:translateY(var(--tq-dock-y));
}

.tq-dock-btn{
  min-height:var(--tq-dock-button-h);
  width:var(--tq-dock-button-w);
}

.tq-dock-ico{
  width:var(--tq-dock-icon-size);
  height:var(--tq-dock-icon-size);
  margin-top:var(--tq-dock-icon-y);
}

#dockMoveBtn .tq-dock-ico{
  margin-top:var(--tq-dock-move-icon-y);
}

#openQuestBtnBottom .tq-dock-ico{
  margin-top:var(--tq-dock-quest-icon-y);
}

#openBagBtnBottom .tq-dock-ico{
  margin-top:var(--tq-dock-bag-icon-y);
}

#openRewardBtnBottom .tq-dock-ico{
  margin-top:var(--tq-dock-reward-icon-y);
}

.tq-dock-label{
  line-height:var(--tq-dock-label-line-height);
  transform:translateY(var(--tq-dock-label-y));
}

.tq-dock-btn.has-badge::after,
.tq-dock-btn.is-unlocked::after{
  transform:translate(var(--tq-dock-badge-x), var(--tq-dock-badge-y));
}

@media (max-width:390px){
  :root{
    --tq-objective-title-y: 0px;
    --tq-objective-tag-y: 0px;
    --tq-objective-ornament-opacity: .6;
    --tq-objective-ornament-scale: .88;
    --tq-dock-button-h: 62px;
    --tq-dock-icon-size: 40px;
    --tq-dock-icon-y: 0px;
    --tq-dock-move-icon-y: var(--tq-dock-icon-y);
    --tq-dock-quest-icon-y: calc(var(--tq-dock-icon-y) + 2px);
    --tq-dock-bag-icon-y: calc(var(--tq-dock-icon-y) + 2px);
    --tq-dock-reward-icon-y: var(--tq-dock-icon-y);
    --tq-dock-label-y: 0px;
  }
}

/* GANESHA-OBJECTIVE-SAFARI-REALDEVICE-FIX-1 */
:root{
  --tq-objective-card-h: auto;
  --tq-objective-title-y: 0px;
  --tq-objective-tag-y: 0px;
  --tq-objective-action-y: 0px;
  --tq-objective-expand-y: 0px;
  --tq-objective-ornament-opacity: .46;
  --tq-objective-ornament-scale: .82;
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  min-height:76px;
  max-height:none;
  height:var(--tq-objective-card-h);
  padding:7px 74px 8px 13px;
  gap:3px;
  overflow:visible;
  background-size:100% 100%;
  background-position:center;
}

.tq-command-panel.is-objective-collapsed .tq-objective-head{
  min-height:24px;
  align-items:center;
  overflow:visible;
}

.tq-command-panel.is-objective-collapsed .tq-objective-kicker{
  min-height:20px;
  max-width:calc(100% - 8px);
  padding:2px 11px 3px;
  transform:translate(var(--tq-objective-tag-x), var(--tq-objective-tag-y));
}

.tq-command-panel.is-objective-collapsed .tq-objective-body{
  align-items:center;
  min-height:34px;
  max-height:none;
  overflow:visible;
  column-gap:8px;
}

.tq-command-panel.is-objective-collapsed .tq-action-copy{
  min-width:0;
  display:grid;
  gap:3px;
  align-content:center;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  transform:translate(var(--tq-objective-title-x), var(--tq-objective-title-y));
  min-height:17px;
  line-height:1.16;
  padding-right:2px;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  min-height:18px;
  max-width:112px;
  padding:2px 10px;
  line-height:1;
}

.tq-command-panel.is-objective-collapsed .tq-objective-quick-action{
  min-width:92px;
  max-width:116px;
  min-height:24px;
  align-self:center;
  justify-self:end;
  transform:translate(var(--tq-objective-action-x), var(--tq-objective-action-y));
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  right:9px;
  top:50%;
  width:38px;
  min-width:38px;
  height:38px;
  min-height:38px;
  transform:translate(var(--tq-objective-expand-x), calc(-50% + var(--tq-objective-expand-y)));
}

.tq-command-panel.is-objective-collapsed .tq-objective-card::after{
  opacity:var(--tq-objective-ornament-opacity);
  transform:scale(var(--tq-objective-ornament-scale));
  transform-origin:right center;
  right:-10px;
  filter:saturate(.84) brightness(.9);
}

@supports (height: 100svh){
  .tq-command-panel{
    bottom:calc(env(safe-area-inset-bottom, 0px) + max(8px, 1svh));
  }
}

@media (max-width:390px){
  .tq-command-panel.is-objective-collapsed .tq-objective-card{
    min-height:74px;
    padding:7px 72px 8px 12px;
  }
  .tq-command-panel.is-objective-collapsed .tq-action-title{
    font-size:13px;
  }
  .tq-command-panel.is-objective-collapsed .tq-action-pill{
    max-width:108px;
  }
  .tq-command-panel.is-objective-collapsed .tq-objective-quick-action{
    min-width:88px;
    max-width:108px;
    font-size:9px;
  }
}

/* GANESHA-OBJECTIVE-COLLAPSED-LAYOUT-REFINE-1 */
.tq-command-panel.is-objective-collapsed .tq-objective-card{
  min-height:78px;
  max-height:none;
  height:var(--tq-objective-card-h);
  padding:8px var(--tq-objective-content-right) 8px var(--tq-objective-content-left);
  gap:4px;
  background-size:100% 100%;
  background-position:center;
  overflow:visible;
  transform:translate(var(--tq-objective-card-x), var(--tq-objective-card-y));
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  box-shadow:0 7px 13px rgba(2, 8, 18, 0.24), inset 0 1px 0 rgba(245, 229, 190, 0.18);
}

.tq-command-panel.is-objective-collapsed .tq-objective-card::before{
  opacity:var(--tq-objective-scrim-opacity);
}

.tq-command-panel.is-objective-collapsed .tq-objective-head{
  min-height:22px;
  align-items:center;
}

.tq-command-panel.is-objective-collapsed .tq-objective-kicker{
  min-height:20px;
  min-width:120px;
  max-width:calc(100% - 62px);
  padding:2px 11px 3px;
  letter-spacing:.03em;
  transform:translate(var(--tq-objective-tag-x), var(--tq-objective-tag-y));
}

.tq-command-panel.is-objective-collapsed .tq-objective-body{
  min-height:38px;
  max-height:none;
  overflow:visible;
  column-gap:8px;
  row-gap:2px;
  align-items:center;
}

.tq-command-panel.is-objective-collapsed .tq-action-copy{
  min-width:0;
  display:grid;
  gap:3px;
  align-content:center;
  padding-left:1px;
  overflow:visible;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  min-height:17px;
  line-height:1.16;
  transform:translate(var(--tq-objective-title-x), var(--tq-objective-title-y));
  max-width:calc(100% + 56px);
  overflow:visible;
}

.tq-command-panel.is-objective-collapsed .tq-action-title::before{
  display:none;
}

.tq-command-panel.is-objective-collapsed .tq-action-pill{
  min-height:18px;
  max-width:108px;
  padding:2px 9px;
  line-height:1;
  align-self:start;
  transform:translate(var(--tq-objective-tag-x), var(--tq-objective-tag-y));
}

.tq-command-panel.is-objective-collapsed #actionSub{
  display:inline-flex;
  align-items:center;
  transform:translate(var(--tq-objective-tag-x), var(--tq-objective-tag-y));
}

.tq-command-panel.is-objective-collapsed .tq-objective-quick-action{
  min-width:94px;
  max-width:112px;
  min-height:24px;
  padding:0 10px;
  align-self:center;
  justify-self:end;
  transform:translate(var(--tq-objective-action-x), var(--tq-objective-action-y));
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  right:11px;
  top:8px;
  transform:translate(var(--tq-objective-expand-x), var(--tq-objective-expand-y));
  width:auto;
  min-width:44px;
  height:24px;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(191, 156, 98, 0.6);
  background:linear-gradient(180deg, rgba(39, 70, 60, 0.9), rgba(28, 56, 47, 0.9));
  box-shadow:0 3px 8px rgba(5, 12, 20, 0.2), inset 0 1px 0 rgba(247, 229, 189, 0.2);
}

/* GANESHA-LAYOUT-TUNER-DEVTOOL-1 (dev-only, calibrate=1&tune=1) */
.tq-layout-tuner{
  position:fixed;
  right:8px;
  top:78px;
  z-index:2147483200;
  pointer-events:auto;
  width:min(312px, calc(100vw - 14px));
  font-family:"Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.tq-layout-tuner[data-dock="bottom"]{
  top:auto;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 80px);
}

.tq-layout-tuner-mini{
  width:68px;
  min-height:36px;
  border:1px solid rgba(168, 205, 192, 0.74);
  background:linear-gradient(180deg, rgba(9, 31, 38, 0.96), rgba(8, 22, 31, 0.95));
  color:#d8f3e7;
  border-radius:999px;
  padding:0 10px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  box-shadow:0 8px 16px rgba(0,0,0,0.32);
}

.tq-layout-tuner-panel{
  margin-top:6px;
  border:1px solid rgba(130, 170, 162, 0.75);
  border-radius:10px;
  background:rgba(5, 18, 18, 0.88);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
  box-shadow:0 10px 20px rgba(0, 0, 0, 0.36);
  overflow:hidden;
  max-height:150px;
  display:flex;
  flex-direction:column;
}

.tq-layout-tuner[data-mode="mini"] .tq-layout-tuner-panel{
  display:none;
}

.tq-layout-tuner[data-mode="full"] .tq-layout-tuner-panel{
  max-height:45vh;
}

.tq-layout-tuner[data-mode="full"][data-dock="top"]{
  top:66px;
}

.tq-layout-tuner[data-mode="full"][data-dock="bottom"]{
  bottom:calc(env(safe-area-inset-bottom, 0px) + 70px);
}

.tq-layout-tuner[data-mode="mini"] .tq-layout-tuner-mini{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.tq-layout-tuner:not([data-mode="mini"]) .tq-layout-tuner-mini{
  display:none;
}

/* GANESHA-VISUAL-EDIT-MODE-DEVTOOL-1 (dev-only, tune=1&visual=1) */
.tq-layout-drag-editor{
  position:fixed;
  inset:0;
  z-index:2147483400;
  pointer-events:none;
}

.tq-layout-drag-layer{
  position:fixed;
  inset:auto;
  pointer-events:none;
}

.tq-layout-drag-editor.is-grid-on .tq-layout-drag-layer{
  background-image:
    linear-gradient(to right, rgba(120, 235, 220, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 235, 220, 0.12) 1px, transparent 1px);
  background-size:8px 8px;
}

.tq-layout-drag-handle{
  position:absolute;
  border:1px dashed transparent;
  background:transparent;
  border-radius:6px;
  box-sizing:border-box;
  pointer-events:auto;
  touch-action:none;
  padding:0;
}

.tq-layout-drag-handle.is-selected{
  border-color:rgba(255, 217, 128, 0.96);
  background:rgba(8, 18, 22, 0.14);
  box-shadow:0 0 0 1px rgba(255, 217, 128, 0.48), inset 0 0 0 1px rgba(255, 217, 128, 0.32);
}

.tq-layout-drag-editor.is-zones-on .tq-layout-drag-handle{
  border-color:rgba(117, 245, 226, 0.76);
  background:rgba(8, 18, 22, 0.12);
}

.tq-layout-drag-handle.is-missing{
  opacity:.3;
}

.tq-layout-drag-handle-label{
  position:absolute;
  left:2px;
  top:2px;
  padding:1px 5px;
  font-size:9px;
  line-height:1.2;
  color:#f0f8f2;
  background:rgba(5, 15, 18, 0.86);
  border:1px solid rgba(176, 221, 206, 0.6);
  border-radius:5px;
  white-space:nowrap;
  pointer-events:none;
  display:none;
}

.tq-layout-drag-dot{
  position:absolute;
  right:2px;
  bottom:2px;
  width:8px;
  height:8px;
  border-radius:999px;
  background:#76f6d7;
  box-shadow:0 0 0 1px rgba(0,0,0,0.4);
  pointer-events:none;
  opacity:0;
}

.tq-layout-drag-handle.is-selected .tq-layout-drag-dot{
  opacity:1;
}

.tq-layout-drag-editor.is-zones-on .tq-layout-drag-handle .tq-layout-drag-dot{
  opacity:1;
}

.tq-layout-drag-handle.is-selected .tq-layout-drag-handle-label{
  display:block;
}

.tq-layout-drag-editor.is-label-hidden .tq-layout-drag-handle.is-selected .tq-layout-drag-handle-label{
  display:none;
}

.tq-layout-drag-toolbar{
  position:fixed;
  left:8px;
  right:8px;
  top:64px;
  max-height:92px;
  border:1px solid rgba(143, 188, 176, 0.65);
  border-radius:10px;
  background:rgba(7, 20, 24, 0.86);
  box-shadow:0 8px 16px rgba(0,0,0,0.32);
  pointer-events:auto;
  display:grid;
  gap:4px;
  padding:5px 6px;
  overflow:hidden;
}

.tq-layout-drag-row{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}

.tq-layout-drag-row strong{
  font-size:9px;
  color:#f3e8c2;
  margin-right:4px;
}

.tq-layout-drag-row span,
.tq-layout-drag-row em{
  font-size:9px;
  color:#d9efe7;
  font-style:normal;
}

.tq-layout-drag-row button{
  height:20px;
  border:1px solid rgba(165, 203, 192, 0.6);
  border-radius:6px;
  background:rgba(17, 52, 60, 0.86);
  color:#e4f6ee;
  font-size:8px;
  line-height:1;
  padding:0 6px;
}

.tq-layout-drag-row button.is-active{
  border-color:rgba(240, 208, 146, 0.74);
  color:#ffefc8;
}

.tq-layout-drag-output{
  width:100%;
  min-height:0;
  height:0;
  opacity:0;
  border:0;
  border-radius:6px;
  background:rgba(4, 12, 16, 0.9);
  color:#e2f3eb;
  font-size:9px;
  line-height:1.25;
  padding:0;
  resize:none;
  transition:height .18s ease, opacity .18s ease, padding .18s ease;
}

.tq-layout-drag-output.is-visible{
  height:30px;
  opacity:1;
  padding:3px 5px;
  border:1px solid rgba(135, 174, 164, 0.52);
}

@media (max-width:420px){
  .tq-layout-drag-toolbar{
    top:56px;
    left:6px;
    right:6px;
    max-height:88px;
    padding:4px 5px;
  }
}

.tq-layout-tuner-panel-head{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:6px;
  padding:6px 8px;
  background:rgba(255, 255, 255, 0.03);
  border-bottom:1px solid rgba(144, 173, 166, 0.26);
}

.tq-layout-tuner-panel-head h3{
  margin:0;
  font-size:10px;
  font-weight:700;
  letter-spacing:.05em;
  color:#d8ece5;
  min-width:62px;
}

.tq-layout-tuner-actions{
  display:flex;
  gap:4px;
  flex-wrap:wrap;
}

.tq-layout-tuner-actions button{
  border:1px solid rgba(190, 224, 211, 0.52);
  border-radius:7px;
  background:rgba(18, 53, 62, 0.82);
  color:#ddf3ea;
  padding:3px 6px;
  font-size:9px;
  line-height:1;
}

.tq-layout-tuner-compact{
  padding:6px 8px;
  display:grid;
  gap:6px;
}

.tq-layout-tuner-topline{
  display:grid;
  grid-template-columns:auto 1fr auto 1fr;
  gap:4px;
  align-items:center;
}

.tq-layout-tuner-topline label{
  font-size:9px;
  color:#c7ddd5;
}

.tq-layout-tuner-topline select{
  height:23px;
  border-radius:6px;
  border:1px solid rgba(150, 188, 178, 0.52);
  background:rgba(8, 24, 29, 0.88);
  color:#ecf7f2;
  font-size:10px;
  padding:0 5px;
}

.tq-layout-tuner-active-name{
  font-size:10px;
  color:#fff0c7;
  font-weight:700;
}

.tq-layout-tuner-active-control{
  display:grid;
  grid-template-columns:24px 24px 1fr 24px 24px;
  gap:4px;
  align-items:center;
}

.tq-layout-tuner-active-control button{
  height:22px;
  border:1px solid rgba(167, 203, 192, 0.55);
  border-radius:6px;
  background:rgba(18, 53, 62, 0.82);
  color:#ddf3ea;
  font-size:12px;
}

.tq-layout-tuner-active-control span{
  text-align:center;
  font-size:10px;
  font-weight:700;
  color:#f8e9bf;
}

.tq-layout-tuner-range-row{
  display:grid;
  grid-template-columns:1fr 62px auto;
  gap:5px;
  align-items:center;
}

.tq-layout-tuner-range-row input[type="range"]{
  width:100%;
}

.tq-layout-tuner-range-row input[type="number"]{
  width:100%;
  height:22px;
  border-radius:6px;
  border:1px solid rgba(146, 188, 177, 0.52);
  background:rgba(6, 20, 27, 0.84);
  color:#f1f8f4;
  font-size:10px;
  padding:0 5px;
}

.tq-layout-tuner-dock-row{
  display:flex;
  align-items:center;
  gap:6px;
}

.tq-layout-tuner-dock-row span{
  font-size:9px;
  color:#d0e8df;
}

.tq-layout-tuner-dock-row [data-role="dockSwitch"]{
  height:22px;
  border:1px solid rgba(166, 199, 190, 0.45);
  border-radius:999px;
  background:rgba(14, 35, 42, 0.84);
  color:#d8eee6;
  font-size:9px;
  padding:0 8px;
}

.tq-layout-tuner-dock-row [data-role="dockSwitch"].is-active{
  border-color:rgba(233, 203, 142, 0.66);
  color:#ffefc8;
}

.tq-layout-tuner-body{
  overflow:auto;
  padding:6px;
  display:grid;
  gap:6px;
}

.tq-layout-tuner:not([data-mode="full"]) .tq-layout-tuner-body{
  display:none;
}

.tq-layout-tuner-row{
  border:1px solid rgba(117, 154, 148, 0.44);
  border-radius:7px;
  padding:6px;
  background:rgba(255, 255, 255, 0.02);
}

.tq-layout-tuner-row-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}

.tq-layout-tuner-name{
  font-size:9px;
  color:#cae6dd;
  letter-spacing:.02em;
}

.tq-layout-tuner-value{
  font-size:9px;
  color:#fff2cb;
  font-weight:700;
}

.tq-layout-tuner-control{
  display:grid;
  grid-template-columns:26px 1fr 26px 56px;
  align-items:center;
  gap:6px;
}

.tq-layout-tuner-control button{
  height:22px;
  border:1px solid rgba(170, 209, 197, 0.6);
  border-radius:6px;
  background:rgba(19, 58, 67, 0.86);
  color:#e8f9f2;
  font-size:14px;
}

.tq-layout-tuner-control input[type="range"]{
  width:100%;
}

.tq-layout-tuner-control input[type="number"]{
  width:100%;
  height:22px;
  border-radius:6px;
  border:1px solid rgba(146, 188, 177, 0.56);
  background:rgba(6, 20, 27, 0.84);
  color:#f1f8f4;
  font-size:10px;
  padding:0 5px;
}

.tq-layout-tuner-auto{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:5px;
  font-size:9px;
  color:#d7f0e8;
}

.tq-layout-tuner-output{
  width:100%;
  min-height:72px;
  max-height:120px;
  border:0;
  border-top:1px solid rgba(144, 173, 166, 0.26);
  background:rgba(7, 17, 23, 0.9);
  color:#def1e9;
  font-size:9px;
  line-height:1.35;
  padding:6px;
  resize:vertical;
  display:none;
}

.tq-layout-tuner-output.is-visible{
  display:block;
}

.tq-layout-tuner-toast{
  position:absolute;
  right:8px;
  top:6px;
  background:rgba(16, 42, 44, 0.9);
  border:1px solid rgba(203, 233, 223, 0.45);
  color:#e6f7ef;
  border-radius:999px;
  font-size:9px;
  padding:3px 8px;
  opacity:0;
  transform:translateY(-4px);
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:none;
}

.tq-layout-tuner-toast.is-show{
  opacity:1;
  transform:translateY(0);
}

@media (max-width:420px){
  .tq-layout-tuner{
    right:6px;
    width:min(306px, calc(100vw - 10px));
    top:68px;
  }
  .tq-layout-tuner[data-dock="bottom"]{
    top:auto;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 72px);
  }
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-label{
  position:static;
  transform:none;
  font-size:10px;
  line-height:1;
  color:#f2e1ba;
}

.tq-command-panel.is-objective-collapsed .tq-objective-card::after{
  opacity:.34;
  right:-18px;
  transform:scale(.72);
  transform-origin:right center;
  filter:saturate(.78) brightness(.84);
}

@media (max-width:390px){
  .tq-command-panel.is-objective-collapsed .tq-objective-card{
    min-height:76px;
    padding:8px 82px 8px 14px;
  }
  .tq-command-panel.is-objective-collapsed .tq-action-title{
    font-size:13px;
  }
  .tq-command-panel.is-objective-collapsed .tq-objective-quick-action{
    min-width:90px;
    max-width:106px;
    font-size:9px;
  }
}

/* GANESHA-OBJECTIVE-DOCK-SIMPLIFY-ALIGN-FIX-1 */
:root{
  --tq-objective-card-y: 30px;
  --tq-objective-title-x: 52px;
  --tq-objective-title-y: -8px;
  --tq-objective-tag-x: 27px;
  --tq-objective-tag-y: -8px;
  --tq-objective-action-x: 29px;
  --tq-objective-action-y: -7px;
  --tq-objective-expand-x: 17px;
  --tq-objective-expand-y: -26px;
  --tq-dock-y: 1px;
  --tq-dock-icon-size: 30px;
  --tq-dock-icon-y: 2px;
  --tq-dock-move-icon-y: var(--tq-dock-icon-y);
  --tq-dock-quest-icon-y: var(--tq-dock-icon-y);
  --tq-dock-bag-icon-y: var(--tq-dock-icon-y);
  --tq-dock-reward-icon-y: var(--tq-dock-icon-y);
  --tq-dock-label-y: 0px;
  --tq-dock-label-line-height: 1.06;
  --tq-dock-badge-x: 0px;
  --tq-dock-badge-y: 0px;
}

.tq-command-panel.is-objective-collapsed .tq-objective-card{
  min-height:76px;
  padding:8px 86px 8px 14px;
}

.tq-command-panel.is-objective-collapsed .tq-action-copy{
  overflow:visible;
}

.tq-command-panel.is-objective-collapsed .tq-action-title{
  max-width:calc(100% + 52px);
  overflow:visible;
  transform:translate(var(--tq-objective-title-x), var(--tq-objective-title-y));
}

/* collapsed 主畫面隱藏「前往地點」tag，避免誤認為按鈕 */
.tq-command-panel.is-objective-collapsed .tq-action-sub,
.tq-command-panel.is-objective-collapsed .tq-action-pill{
  display:none !important;
}

.tq-command-panel.is-objective-collapsed .tq-objective-quick-action{
  min-width:96px;
  max-width:116px;
  min-height:24px;
  transform:translate(var(--tq-objective-action-x), var(--tq-objective-action-y));
}

.tq-command-panel.is-objective-collapsed .tq-objective-collapse-btn{
  right:10px;
  top:8px;
  transform:translate(var(--tq-objective-expand-x), var(--tq-objective-expand-y));
}

/* Dock 統一 icon/label 框格 */
.tq-dock{
  transform:translateY(var(--tq-dock-y));
}

.tq-dock-secondary{
  align-items:stretch;
  padding-bottom:18px;
}

.tq-dock-btn{
  position:relative;
  display:grid;
  grid-template-rows:44px;
  place-items:center;
  min-height:64px;
  padding:5px 4px 5px;
  overflow:visible;
}

.tq-dock-ico{
  width:40px;
  height:40px;
  margin-top:0;
  display:grid;
  place-items:center;
  overflow:visible;
  border-radius:0;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.22));
}

.tq-dock-icon-img{
  display:block !important;
  width:var(--tq-dock-icon-size);
  height:var(--tq-dock-icon-size);
  max-width:var(--tq-dock-icon-size);
  max-height:var(--tq-dock-icon-size);
  object-fit:contain;
  object-position:center;
  image-rendering:auto;
}

.tq-dock-label{
  position:absolute;
  left:50%;
  bottom:-15px;
  display:block;
  min-height:0;
  width:max-content;
  max-width:98%;
  max-width:100%;
  font-size:11px;
  font-weight:900;
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:var(--tq-dock-label-line-height);
  transform:translate(-50%, var(--tq-dock-label-y));
  text-align:center;
  pointer-events:none;
  color:#ead9ad;
  text-shadow:0 1px 2px rgba(3,10,18,.55);
}

.tq-dock-btn.has-badge::after,
#openBagBtnBottom.has-badge::after{
  top:3px;
  right:8px;
  transform:translate(var(--tq-dock-badge-x), var(--tq-dock-badge-y));
}

@media (max-width:390px){
  :root{
    --tq-dock-icon-size: 28px;
  }
  .tq-dock-secondary{
    padding-bottom:16px;
  }
  .tq-dock-btn{
    grid-template-rows:40px;
    min-height:64px;
    row-gap:2px;
  }
  .tq-dock-ico{
    width:38px;
    height:38px;
  }
  .tq-dock-label{
    font-size:10px;
    bottom:-14px;
  }
}

/* GANESHA-EXPANDED-OBJECTIVE-ALIGN-FIX-1
   Real-device refinement: center content to frame, move collapse to frame top-right,
   and place primary CTA inside frame lower-right footprint. */
.tq-command-panel:not(.is-objective-collapsed) .tq-objective-card{
  position:relative;
  min-height:160px;
  max-height:clamp(178px, 23.2vh, 210px);
  padding:12px 16px 60px;
  gap:6px;
  margin-bottom:0;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-head{
  min-height:28px;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-kicker{
  margin-inline:auto;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-collapse-btn{
  top:10px;
  right:12px;
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
  transform:none;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-collapse-label{
  font-size:8px;
  transform:translate(-50%, -50%);
}

.tq-command-panel:not(.is-objective-collapsed) .tq-objective-body{
  max-height:clamp(90px, 12vh, 108px);
  padding:10px 12px 8px;
  border-radius:12px;
  border:0;
  background:transparent;
  box-shadow:none;
  text-align:center;
}

.tq-command-panel:not(.is-objective-collapsed){
  bottom:calc(env(safe-area-inset-bottom, 0px) + 2px);
}

.tq-command-panel:not(.is-objective-collapsed) .tq-dock{
  margin-top:-10px;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-title{
  margin:0 0 8px;
  text-align:center;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-sub{
  margin:0;
  text-align:center;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-pill,
.tq-command-panel:not(.is-objective-collapsed) .tq-objective-quick-action{
  display:none !important;
}

.tq-command-panel:not(.is-objective-collapsed) #globalMessage{
  position:absolute;
  left:24px;
  right:146px;
  bottom:12px;
  z-index:4;
  min-height:0;
  padding:4px 9px;
  text-align:left;
  font-size:9.5px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  border-radius:9px;
  background:rgba(16, 32, 30, 0.82);
  border:1px solid rgba(194, 160, 106, 0.36);
  color:#e9dfc5;
  backdrop-filter:blur(1.5px);
  pointer-events:none;
}

.tq-command-panel:not(.is-objective-collapsed) .tq-action-primary{
  position:relative;
  z-index:4;
  justify-self:end;
  align-self:end;
  width:72px;
  max-width:72px;
  min-height:22px;
  margin:-70px 30px 14px auto;
  border-radius:10px;
  font-size:10px;
  letter-spacing:.01em;
  padding:0 5px;
  box-shadow:0 8px 16px rgba(3,9,18,.26), inset 0 1px 0 rgba(255,241,205,.3);
}

@media (max-width:390px){
  .tq-command-panel:not(.is-objective-collapsed) .tq-objective-card{
    min-height:154px;
    max-height:clamp(170px, 22.4vh, 198px);
    padding:10px 14px 56px;
  }
  .tq-command-panel:not(.is-objective-collapsed) .tq-objective-body{
    max-height:clamp(84px, 11.2vh, 100px);
    padding:9px 10px 6px;
  }
  .tq-command-panel:not(.is-objective-collapsed) .tq-action-title{
    font-size:14px;
  }
  .tq-command-panel:not(.is-objective-collapsed) .tq-action-sub{
    font-size:11px;
  }
  .tq-command-panel:not(.is-objective-collapsed) .tq-action-primary{
    width:68px;
    max-width:68px;
    min-height:21px;
    margin:-66px 24px 12px auto;
    font-size:9px;
    padding:0 4px;
  }
  .tq-command-panel:not(.is-objective-collapsed) #globalMessage{
    left:20px;
    right:134px;
    bottom:10px;
    font-size:9px;
    padding:3px 7px;
  }
}

/* ===== GANESHA-BAG-RPG-INVENTORY-REWIRE-1 ===== */
#bagSheet.tq-bag-rpg-wired{
  width:min(96vw, 430px);
  max-height:min(82dvh, 760px);
  background:
    linear-gradient(170deg, rgba(8,34,30,0.96), rgba(6,24,21,0.96)),
    url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-panel-v3-alpha.png') center/100% 100% no-repeat;
  border-color:rgba(214,176,104,0.54);
}

#bagSheet.tq-bag-rpg-wired::before{
  inset:8px 8px 0;
  border-color:rgba(222,184,112,0.28);
}

#bagSheet.tq-bag-rpg-wired .tq-sheet-head{
  position:relative;
  align-items:center;
  min-height:64px;
  padding:14px 16px 12px;
  border-bottom:1px solid rgba(220,180,108,0.3);
  background:linear-gradient(180deg, rgba(14,50,43,0.52), rgba(9,30,27,0.2));
}

#bagSheet.tq-bag-rpg-wired .tq-sheet-head h3{
  color:#f2e6c8;
  font-size:19px;
  letter-spacing:.03em;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-capacity{
  margin-left:auto;
  margin-right:10px;
  color:#f0dfb5;
  font-size:13px;
  font-weight:800;
}

#bagSheet.tq-bag-rpg-wired .tq-sheet-close{
  border:0;
  border-radius:12px;
  background:
    url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-close-button-v1-alpha.png') center/100% 100% no-repeat,
    linear-gradient(160deg, rgba(18,67,57,0.92), rgba(10,40,35,0.9));
  color:transparent;
}

#bagSheet.tq-bag-rpg-wired .tq-sheet-body{
  --tq-bag-item-scale-default: 0.82;
  --tq-bag-item-scale-offering_tray: 0.82;
  --tq-bag-item-scale-incense: 0.82;
  --tq-bag-item-scale-flower_garland: 0.82;
  --tq-bag-item-scale-candle: 0.82;
  --tq-bag-item-scale-blessing_card: 0.82;
  --tq-bag-item-scale-proof_stamp: 0.82;
  padding:10px 12px 12px;
  background:
    linear-gradient(170deg, rgba(17,50,44,0.92), rgba(10,31,28,0.9)),
    url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-bg-texture-v1.png') center/cover no-repeat;
  background-blend-mode:normal, soft-light;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

#bagSheet.tq-bag-rpg-wired .tq-sheet-body::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(8,30,26,0.34), rgba(8,30,26,0.2));
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-frame{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-rows:auto 8px minmax(240px, 1fr) auto auto;
  gap:6px;
  min-height:auto;
  max-height:none;
  overflow:visible;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail{
  min-height:96px;
  display:grid;
  grid-template-columns:minmax(84px, 32%) minmax(0, 64%);
  gap:8px;
  padding:8px 10px;
  align-items:center;
  border-radius:12px;
  border:1px solid rgba(221,183,111,0.34);
  background:linear-gradient(165deg, rgba(13,51,44,0.94), rgba(9,34,30,0.92));
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-slot{
  width:74px;
  height:74px;
  border-radius:12px;
  border:1px solid rgba(212,174,101,0.46);
  background:
    url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-slot-selected-v2-alpha.png') center/100% 100% no-repeat;
  display:grid;
  place-items:center;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-slot.is-locked{
  background:url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-slot-locked-v1-alpha.png') center/100% 100% no-repeat;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-slot.is-empty{
  background:url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-slot-empty-v2-alpha.png') center/100% 100% no-repeat;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-slot img{
  width:82%;
  height:82%;
  object-fit:contain;
  object-position:center center;
  filter:saturate(1.04) contrast(1.02) drop-shadow(0 1px 1px rgba(0,0,0,0.22));
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-slot[data-item-id="item_offering_tray"] img,
#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-slot[data-item-id="item_offering_set"] img,
#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-slot[data-icon-key="offering_tray"] img,
#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-slot[data-icon-key="offering_set"] img{
  object-position:center center;
  transform:translateX(4%);
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-copy{
  min-width:0;
  display:grid;
  grid-template-rows:auto auto auto auto;
  gap:3px;
  align-content:center;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-name{
  margin:0;
  font-size:15px;
  line-height:1.2;
  color:#f4e8ca;
  font-weight:800;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-meta,
#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-desc,
#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-qty{
  margin:0;
  font-size:11.5px;
  line-height:1.25;
  color:rgba(240,228,200,0.9);
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-desc{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-divider{
  height:12px;
  background:url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-divider-v1-alpha.png') center/auto 100% no-repeat;
  opacity:.66;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-grid-wrap{
  border-radius:12px;
  background:
    linear-gradient(180deg, rgba(14,44,38,0.42), rgba(9,31,27,0.34)),
    radial-gradient(100% 85% at 50% 0%, rgba(61,103,89,0.12), rgba(20,48,42,0));
  border:1px solid rgba(186,150,87,0.22);
  box-shadow:inset 0 1px 0 rgba(241,226,191,0.08);
  padding:8px;
  overflow:auto;
  min-height:0;
}

#bagSheet.tq-bag-rpg-wired .tq-inv-grid{
  display:grid;
  gap:10px;
}

#bagSheet.tq-bag-rpg-wired[data-layout-mode="readable-12"] .tq-inv-grid{
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:8px;
}

#bagSheet.tq-bag-rpg-wired[data-layout-mode="compact-16"] .tq-inv-grid{
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:8px;
}

#bagSheet.tq-bag-rpg-wired .tq-inv-slot{
  min-height:0;
  padding:0;
  border:0;
  border-radius:12px;
  background:none;
  box-shadow:none;
}

#bagSheet.tq-bag-rpg-wired .tq-inv-slot.is-rpg-hidden{ display:none !important; }

#bagSheet.tq-bag-rpg-wired .tq-inv-slot-frame{
  min-height:0;
  aspect-ratio:1 / 1;
  border:0;
  border-radius:12px;
  background:url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-slot-selected-v2-alpha.png') center/100% 100% no-repeat;
}

#bagSheet.tq-bag-rpg-wired[data-layout-mode="readable-12"] .tq-inv-slot-frame{
  min-height:72px;
}

#bagSheet.tq-bag-rpg-wired .tq-inv-slot.is-locked .tq-inv-slot-frame{
  background:url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-slot-selected-v2-alpha.png') center/100% 100% no-repeat;
}

#bagSheet.tq-bag-rpg-wired .tq-inv-slot.is-rpg-selected .tq-inv-slot-frame{
  background:url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-slot-selected-v2-alpha.png') center/100% 100% no-repeat;
  box-shadow:0 0 0 2px rgba(232,199,127,0.86), 0 0 0 4px rgba(25,118,94,0.84) inset, 0 0 10px rgba(232,199,127,0.35);
}

#bagSheet.tq-bag-rpg-wired .tq-inv-icon{
  width:100%;
  height:100%;
  border:0;
  border-radius:12px;
  background:none;
}

#bagSheet.tq-bag-rpg-wired .tq-inv-icon img{
  width:88%;
  height:88%;
  object-fit:contain;
  object-position:center center;
  background:transparent;
  padding:0;
  filter:saturate(1.04) contrast(1.02) drop-shadow(0 1px 1px rgba(0,0,0,0.24));
}

#bagSheet.tq-bag-rpg-wired .tq-inv-slot[data-icon-key="candle"] .tq-inv-icon img,
#bagSheet.tq-bag-rpg-wired .tq-inv-slot[data-icon-key="flower_garland"] .tq-inv-icon img,
#bagSheet.tq-bag-rpg-wired .tq-inv-slot[data-icon-key="blessing_card"] .tq-inv-icon img,
#bagSheet.tq-bag-rpg-wired .tq-inv-slot[data-icon-key="proof_stamp"] .tq-inv-icon img{
  width:94%;
  height:94%;
}

#bagSheet.tq-bag-rpg-wired .tq-inv-slot[data-item-id="item_offering_tray"] .tq-inv-icon img,
#bagSheet.tq-bag-rpg-wired .tq-inv-slot[data-item-id="item_offering_set"] .tq-inv-icon img,
#bagSheet.tq-bag-rpg-wired .tq-inv-slot[data-icon-key="offering_tray"] .tq-inv-icon img,
#bagSheet.tq-bag-rpg-wired .tq-inv-slot[data-icon-key="offering_set"] .tq-inv-icon img{
  object-position:center center;
  transform:translateX(4%);
}

#bagSheet.tq-bag-rpg-wired .tq-inv-slot.is-locked .tq-inv-icon img{
  opacity:.38;
  filter:grayscale(1) saturate(.15) contrast(.95);
}

#bagSheet.tq-bag-rpg-wired .tq-inv-slot.is-locked .tq-inv-icon{
  position:relative;
  background:linear-gradient(165deg, rgba(38,46,47,0.54), rgba(26,31,33,0.58));
}

#bagSheet.tq-bag-rpg-wired .tq-inv-slot.is-locked .tq-inv-icon::after{
  content:"未取得";
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  min-width:48px;
  height:20px;
  padding:0 8px;
  border-radius:999px;
  border:1px solid rgba(188,177,148,0.5);
  background:rgba(27,31,34,0.62);
  color:#e3dbc9;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:800;
}

#bagSheet.tq-bag-rpg-wired .tq-inv-count{
  top:5px;
  right:5px;
  min-width:28px;
  min-height:20px;
  background:
    url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-quantity-badge-v1-alpha.png') center/100% 100% no-repeat;
  border:0;
  font-size:11px;
}

#bagSheet.tq-bag-rpg-wired .tq-inv-state,
#bagSheet.tq-bag-rpg-wired .tq-inv-name,
#bagSheet.tq-bag-rpg-wired .tq-inv-meta,
#bagSheet.tq-bag-rpg-wired .tq-inv-desc{
  display:none !important;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-action-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  padding:0;
  min-height:52px;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-use-btn{
  min-width:158px;
  min-height:52px;
  border:0;
  border-radius:12px;
  background:
    url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-use-button-v1-alpha.png') center/100% 100% no-repeat;
  color:#3f2d14;
  font-size:16px;
  font-weight:900;
  letter-spacing:.02em;
  text-shadow:0 1px 0 rgba(255,248,224,0.3);
  padding:0 16px;
}

/* Reward runtime wiring */
#rewardSheet .tq-sheet-body{
  background:
    linear-gradient(180deg, rgba(10,37,31,.9), rgba(7,26,22,.94)),
    var(--tq-reward-sheet-bg, none) center/cover no-repeat;
  padding:10px 12px calc(14px + env(safe-area-inset-bottom));
}

.tq-reward-sheet.is-open{
  position:fixed !important;
  inset:0 !important;
  left:0 !important;
  right:0 !important;
  width:100vw !important;
  max-width:none !important;
  transform:none !important;
  z-index:66 !important;
  background:rgba(4, 12, 14, 0.58);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
  overflow:hidden !important;
  overscroll-behavior:none;
  touch-action:none;
}

.tq-reward-sheet.is-open .tq-sheet-head{
  display:none !important;
}

.tq-reward-sheet.is-open .tq-sheet-body{
  position:absolute;
  inset:0;
  padding:0 !important;
  overflow:hidden !important;
  background:transparent !important;
  display:flex;
  justify-content:center;
  align-items:flex-end;
}

.tq-reward-runtime{
  position:relative;
  width:100%;
  box-sizing:border-box;
  min-height:56dvh;
  max-height:min(82dvh, calc(100dvh - 20px));
  border-radius:22px;
  padding:14px 13px calc(20px + env(safe-area-inset-bottom));
  background:
    var(--tq-reward-sheet-frame, none) center/100% 100% no-repeat,
    linear-gradient(180deg, rgba(11,45,37,.64), rgba(7,26,22,.84));
  box-shadow:
    0 16px 34px rgba(2, 10, 18, 0.4),
    inset 0 1px 0 rgba(250, 235, 199, 0.22);
  display:grid;
  grid-template-rows:auto auto auto auto;
  gap:8px;
  isolation:isolate;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  justify-items:center;
}

.tq-reward-panel{
  display:contents;
}

.tq-reward-dedicated-drawer{
  position:relative;
  left:auto;
  right:auto;
  bottom:auto;
  transform:none;
  margin:0 auto;
  width:min(94vw, 420px);
  max-width:420px;
  min-height:68dvh;
  max-height:72dvh;
  border-radius:22px 22px 0 0;
  border:1px solid rgba(219, 183, 112, 0.68);
  border-bottom:0;
  box-shadow:0 -24px 44px rgba(3,10,16,0.56);
}

.tq-reward-drawer-close{
  display:none !important;
}

.tq-reward-drawer-close:active{
  transform:scale(.97);
}

.tq-reward-runtime__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  width:100%;
}

.tq-reward-runtime__header-main{
  min-width:0;
  display:grid;
  gap:3px;
}

.tq-reward-runtime__kicker{
  margin:0;
  color:#f2ddad;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.tq-reward-runtime__seal{
  width:58px;
  height:58px;
  object-fit:contain;
  filter:drop-shadow(0 6px 12px rgba(3, 8, 16, .36));
}

.tq-reward-seal-close{
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  width:58px;
  height:58px;
  flex:0 0 58px;
  cursor:pointer;
  z-index:8;
}

.tq-reward-runtime__badge{
  margin:0;
  color:#f6e2a8;
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.tq-reward-runtime__title{
  margin:0;
  color:#fff2d8;
  font-size:19px;
  font-weight:900;
  line-height:1.18;
  text-shadow:0 2px 10px rgba(0,0,0,.35);
}

.tq-reward-runtime__desc{
  margin:0;
  color:#e3d5b7;
  font-size:12.75px;
  line-height:1.42;
}

.tq-reward-runtime__card-wrap{
  position:relative;
  width:min(194px, 52vw);
  max-width:194px;
  aspect-ratio: 2 / 3;
  margin:4px auto 2px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:18px;
  overflow:visible;
}

.tq-reward-card-hero{
  min-height:228px !important;
  height:min(34vh, 258px) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:visible !important;
}

.tq-reward-runtime__status-chip{
  position:absolute;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  z-index:7;
  min-width:104px;
  padding:5px 12px 6px;
  border-radius:999px;
  border:1px solid rgba(232, 194, 119, 0.78);
  background:linear-gradient(170deg, rgba(13,53,45,.95), rgba(10,37,31,.95));
  color:#f6e7bf;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  text-align:center;
  box-shadow:0 6px 12px rgba(3,8,16,.3);
}

.tq-reward-runtime__glow{
  position:absolute;
  inset:-7% -8% auto;
  width:116%;
  height:116%;
  object-fit:contain;
  pointer-events:none;
  z-index:1;
  opacity:.92;
}

.tq-reward-runtime__frame{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
  z-index:3;
  max-height:none !important;
}

.tq-reward-runtime__card{
  width:100%;
  max-width:194px;
  height:auto;
  min-height:210px !important;
  max-height:246px !important;
  aspect-ratio: 2 / 3;
  object-fit:contain;
  border-radius:15px;
  box-shadow:0 16px 30px rgba(0,0,0,.4);
  z-index:2;
  background:linear-gradient(180deg, rgba(18,38,33,.95), rgba(8,24,20,.95));
}

.tq-reward-card-back{
  object-fit:contain;
}

.tq-reward-card-front{
  object-fit:contain;
}

.tq-reward-runtime__rarity{
  margin:0;
  text-align:center;
  color:#f9e29a;
  font-size:11px;
  letter-spacing:.08em;
  font-weight:800;
}

.tq-reward-runtime__message-panel{
  border:1px solid rgba(228,194,130,0.58);
  border-radius:14px;
  padding:9px 10px 10px;
  background:linear-gradient(170deg, rgba(18,53,45,.88), rgba(10,34,29,.92));
  box-shadow:inset 0 1px 0 rgba(247,228,183,0.2);
  display:grid;
  gap:6px;
  width:100%;
  max-width:min(360px, 86vw);
}

.tq-reward-message{
  margin-top:2px;
}

.tq-reward-runtime__cta{
  position:relative;
  border:0;
  background:transparent;
  width:min(304px, 84vw);
  min-height:56px;
  margin:2px auto 0;
  padding:0;
  cursor:pointer;
  display:block;
  pointer-events:auto !important;
  filter:drop-shadow(0 8px 12px rgba(3, 8, 16, 0.34));
}

.tq-reward-cta{
  min-width:min(304px, 92vw);
}

.tq-reward-runtime__cta[disabled]{
  cursor:not-allowed;
  opacity:.72;
  filter:saturate(.68) drop-shadow(0 6px 10px rgba(3, 8, 16, 0.28));
}

.tq-reward-runtime__cta.is-enabled:active{
  transform:translateY(1px) scale(.995);
}

.tq-reward-runtime__cta-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:fill;
}

.tq-reward-runtime__cta-label{
  position:relative;
  z-index:2;
  display:inline-block;
  width:100%;
  text-align:center;
  padding:18px 12px 14px;
  color:#fff5d7;
  font-size:18px;
  font-weight:900;
  letter-spacing:.04em;
  text-shadow:0 2px 7px rgba(0,0,0,.45);
}

.tq-reward-runtime--eligible .tq-reward-runtime__status-chip{
  border-color:rgba(227,198,119,0.96);
  background:linear-gradient(170deg, rgba(23,88,74,.96), rgba(14,57,48,.96));
}

.tq-reward-runtime--unlocked .tq-reward-runtime__status-chip,
.tq-reward-runtime--already_unlocked .tq-reward-runtime__status-chip{
  border-color:rgba(240,213,140,0.96);
  background:linear-gradient(170deg, rgba(26,110,92,.95), rgba(16,70,58,.95));
}

.tq-reward-runtime--proof_pending .tq-reward-runtime__status-chip{
  border-color:rgba(192,181,143,0.88);
  background:linear-gradient(170deg, rgba(63,77,69,.92), rgba(45,59,52,.92));
}

.tq-reward-runtime--locked .tq-reward-runtime__status-chip,
.tq-reward-runtime--blocked .tq-reward-runtime__status-chip,
.tq-reward-runtime--rejected .tq-reward-runtime__status-chip{
  border-color:rgba(168,153,118,0.84);
  background:linear-gradient(170deg, rgba(61,62,57,.92), rgba(45,47,42,.92));
}

@media (min-width:390px){
  .tq-reward-runtime{
    min-height:58dvh;
    max-height:min(84dvh, calc(100dvh - 18px));
    padding:16px 15px calc(22px + env(safe-area-inset-bottom));
    gap:9px;
  }
  .tq-reward-runtime__card-wrap{ width:min(206px, 50vw); max-width:206px; }
  .tq-reward-runtime__title{ font-size:20px; }
  .tq-reward-card-hero{ min-height:240px !important; height:min(34vh, 270px) !important; }
  .tq-reward-runtime__card{ max-width:206px; max-height:258px !important; }
}

@media (min-width:430px){
  .tq-reward-runtime{
    min-height:60dvh;
    max-height:min(86dvh, calc(100dvh - 16px));
  }
  .tq-reward-runtime__card-wrap{ width:min(226px, 48vw); max-width:226px; }
  .tq-reward-runtime__cta{
    width:min(320px, 80vw);
  }
  .tq-reward-card-hero{ min-height:260px !important; height:min(36vh, 292px) !important; }
  .tq-reward-runtime__card{ max-width:226px; max-height:282px !important; }
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-use-btn[disabled]{
  opacity:.66;
  filter:saturate(.7);
}

#bagSheet.tq-bag-rpg-wired .tq-bag-hint{
  margin:0;
  border:1px solid rgba(215,180,115,0.44);
  border-radius:12px;
  background:linear-gradient(168deg, rgba(34,51,45,0.9), rgba(21,33,29,0.9));
  box-shadow:inset 0 1px 0 rgba(255,239,206,0.08);
  padding:8px 10px;
  display:grid;
  gap:4px;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-hint-title{
  color:#f4e2b8;
  font-size:13px;
  font-weight:900;
  letter-spacing:.01em;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-hint-text{
  color:#f6ecd2;
  font-size:11.5px;
  line-height:1.35;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-tabs{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:7px;
  align-items:stretch;
  min-height:46px;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-tab{
  min-height:46px;
  border:0;
  border-radius:10px;
  background:
    url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-tab-inactive-v1-alpha.png') center/100% 100% no-repeat;
  color:#efe2c1;
  font-size:13px;
  font-weight:800;
  line-height:1.15;
  padding:0 6px;
}

#bagSheet.tq-bag-rpg-wired .tq-bag-rpg-tab.is-active{
  background:url('/img/temple-quest/temples/ganesha/ui/bag-rpg/tq-gane-bag-rpg-tab-active-v2-alpha.png') center/100% 100% no-repeat;
}

@media (max-width:390px){
  #bagSheet.tq-bag-rpg-wired{
    width:min(96vw, 398px);
    max-height:min(79dvh, 700px);
  }
  #bagSheet.tq-bag-rpg-wired .tq-sheet-head h3{ font-size:18px; }
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-frame{
    grid-template-rows:auto 8px minmax(208px, 1fr) auto auto;
    min-height:auto;
    max-height:none;
    gap:6px;
  }
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail{ grid-template-columns:minmax(72px, 30%) minmax(0, 66%); min-height:92px; padding:7px 8px; }
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-slot{ width:68px; height:68px; }
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-name{ font-size:14px; }
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-meta,
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-desc,
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-detail-qty{ font-size:11px; }
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-grid-wrap{ padding:7px; }
  #bagSheet.tq-bag-rpg-wired[data-layout-mode="readable-12"] .tq-inv-slot-frame{ min-height:68px; }
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-tab{ min-height:44px; font-size:12.5px; }
  #bagSheet.tq-bag-rpg-wired .tq-bag-rpg-use-btn{ min-width:146px; min-height:50px; font-size:15px; }
}

@media (min-width:391px) and (max-width:844px){
  #bagSheet.tq-bag-rpg-wired{
    width:min(95vw, 422px);
    max-height:min(81dvh, 740px);
  }
}

@media (min-width:430px) and (min-height:900px){
  #bagSheet.tq-bag-rpg-wired{
    width:min(94vw, 440px);
    max-height:min(82dvh, 780px);
  }
}

/* ===== GANESHA-DIALOGUE-GUIDE-ART-REWORK-2 ===== */
.tq-dialogue{
  left:2vw !important;
  right:2vw !important;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 196px) !important;
  z-index:68 !important;
}

.tq-dialogue .tq-dialogue-card{
  width:min(96vw, 468px);
  margin:0 auto;
  border:0 !important;
  border-radius:20px !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#f6ead1 !important;
  padding:24px 10px 56px !important;
  min-height:auto;
  max-height:none;
  display:block;
  overflow:visible;
  position:relative;
}

.tq-dialogue .tq-dialogue-head{
  position:absolute;
  left:10px;
  right:10px;
  top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 !important;
  min-height:0;
  margin-bottom:0 !important;
  z-index:3;
}

.tq-dialogue .tq-dialogue-head::after{
  display:none !important;
}

.tq-dialogue .tq-dialogue-speaker{
  width:min(52vw, 210px);
  min-width:152px;
  max-width:min(52vw, 210px);
  min-height:34px;
  padding:7px 12px 6px !important;
  border:0 !important;
  border-radius:14px !important;
  background:var(--tq-ui-dialogue-speaker-plaque, none) center/100% 100% no-repeat !important;
  color:#f8f0d7 !important;
  font-size:11.5px !important;
  font-weight:820 !important;
  line-height:1.1 !important;
  letter-spacing:.04em !important;
  text-shadow:
    0 1px 0 rgba(58, 35, 12, .62),
    0 0 4px rgba(240, 219, 163, .2) !important;
  font-family:"Cinzel","Noto Serif TC","Songti TC","Noto Sans TC",serif !important;
  position:absolute;
  left:0;
  top:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.tq-dialogue .tq-dialogue-close{
  position:absolute;
  right:10px;
  top:10px;
  margin-left:0;
  width:50px;
  height:50px;
  min-width:50px !important;
  min-height:50px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:999px !important;
  background-image:url('/img/temple-quest/temples/ganesha/ui/dialogue/tq-gane-dialogue-skip-button-v1.png') !important;
  background-position:center !important;
  background-size:78% 78% !important;
  background-repeat:no-repeat !important;
  background-color:transparent !important;
  color:transparent !important;
  -webkit-text-fill-color:transparent !important;
  font-size:0 !important;
  line-height:0 !important;
  font-weight:900 !important;
  letter-spacing:0 !important;
  text-shadow:none !important;
  text-indent:-9999px;
  overflow:hidden;
  display:grid;
  place-items:center;
}

.tq-dialogue .tq-dialogue-close::before,
.tq-dialogue .tq-dialogue-close::after{
  content:none !important;
  display:none !important;
}

.tq-dialogue .tq-dialogue-body{
  margin:0 !important;
  padding:28px 18px 14px !important;
  border:1px solid rgba(214, 186, 120, .36) !important;
  border-radius:16px !important;
  background:linear-gradient(180deg, rgba(9, 52, 56, .84), rgba(4, 29, 36, .86)) !important;
  color:rgba(255,246,218,.96) !important;
  font-size:18px !important;
  line-height:1.68 !important;
  font-weight:700 !important;
  letter-spacing:.01em !important;
  text-shadow:0 1px 1px rgba(0,0,0,.22);
  overflow:auto;
  min-height:140px;
}

.tq-dialogue .tq-dialogue-foot{
  position:absolute;
  left:10px;
  right:10px;
  bottom:12px;
  margin-top:0 !important;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:10px;
  padding:0;
  border-radius:0;
  background:transparent !important;
  box-shadow:none !important;
  z-index:3;
}

.tq-dialogue .tq-dialogue-progress{
  min-height:0;
  padding:0;
  color:#eadcb9 !important;
  font-size:11px !important;
  font-weight:760 !important;
  letter-spacing:.03em !important;
  background:none !important;
  position:absolute;
  left:0;
  bottom:6px;
  align-self:flex-end;
}

.tq-dialogue .tq-dialogue-primary{
  width:clamp(208px, 56vw, 236px);
  min-width:208px;
  max-width:236px;
  min-height:46px !important;
  max-height:48px;
  height:46px !important;
  padding:0 18px !important;
  border:0 !important;
  border-radius:16px !important;
  -webkit-appearance:none !important;
  appearance:none !important;
  -webkit-tap-highlight-color:transparent;
  background-image:url('/img/temple-quest/temples/ganesha/ui/dialogue/tq-gane-dialogue-speaker-label-v1.png') !important;
  background-position:center !important;
  background-size:100% 100% !important;
  background-repeat:no-repeat !important;
  background-color:transparent !important;
  background-clip:border-box !important;
  color:#fffdf4 !important;
  font-size:11.5px !important;
  font-weight:860 !important;
  letter-spacing:.05em !important;
  text-shadow:
    0 1px 0 rgba(63, 37, 13, .66),
    0 0 4px rgba(235, 214, 156, .24) !important;
  font-family:"Cinzel","Noto Serif TC","Songti TC","Noto Sans TC",serif !important;
  box-shadow:none !important;
  filter:none !important;
  backdrop-filter:none !important;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  line-height:1 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:clip !important;
  box-sizing:border-box !important;
  isolation:isolate;
  margin-bottom:0;
  align-self:flex-end;
  justify-self:end;
  flex:0 0 auto !important;
  flex-shrink:0 !important;
}

.tq-dialogue .tq-dialogue-primary,
.tq-dialogue .tq-dialogue-primary::before,
.tq-dialogue .tq-dialogue-primary::after,
.tq-dialogue .tq-dialogue-foot::before,
.tq-dialogue .tq-dialogue-foot::after,
.tq-dialogue #tqDialoguePrimary,
.tq-dialogue #tqDialoguePrimary::before,
.tq-dialogue #tqDialoguePrimary::after,
.tq-dialogue .tq-dialogue-primary > span,
.tq-dialogue .tq-dialogue-primary > strong{
  background-color:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  border:0 !important;
  filter:none !important;
  line-height:1 !important;
  white-space:nowrap !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.tq-dialogue .tq-dialogue-primary,
.tq-dialogue #tqDialoguePrimary{
  background-image:url('/img/temple-quest/temples/ganesha/ui/dialogue/tq-gane-dialogue-speaker-label-v1.png') !important;
  background-position:center !important;
  background-size:100% 100% !important;
  background-repeat:no-repeat !important;
  background-color:transparent !important;
  box-shadow:none !important;
  position:relative;
}

.tq-dialogue .tq-dialogue-primary::before,
.tq-dialogue #tqDialoguePrimary::before{
  content:none !important;
  display:none !important;
}

.tq-dialogue .tq-dialogue-primary,
.tq-dialogue #tqDialoguePrimary,
.tq-dialogue .tq-dialogue-speaker,
.tq-dialogue .tq-dialogue-speaker *{
  color:#fffdf4 !important;
  -webkit-text-fill-color:#fffdf4 !important;
}

.tq-dialogue .tq-dialogue-primary > *{
  position:relative;
  z-index:1;
}

body:has(.tq-dialogue:not(.is-hidden)) .tq-command-panel{
  opacity:0 !important;
  pointer-events:none !important;
}

.tq-dialogue .tq-dialogue-progress{
  background:transparent !important;
}

@media (min-width:391px) and (max-width:844px){
  .tq-dialogue{
    bottom:calc(env(safe-area-inset-bottom, 0px) + 204px) !important;
  }
  .tq-dialogue .tq-dialogue-card{
    width:min(95vw, 478px);
    min-height:auto;
    max-height:none;
    padding:44px 10px 62px !important;
  }
}

@media (min-width:430px) and (min-height:900px){
  .tq-dialogue{
    bottom:calc(env(safe-area-inset-bottom, 0px) + 210px) !important;
  }
  .tq-dialogue .tq-dialogue-card{
    width:min(94vw, 492px);
    min-height:auto;
    max-height:none;
    padding:44px 10px 62px !important;
  }
}

.tq-head-emblem-btn{
  appearance:none;
  -webkit-appearance:none;
  border:0 !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  padding:0 !important;
  cursor:pointer;
}

.tq-lobby-extra-actions{
  margin:10px 12px 8px;
  position:relative;
  z-index:3;
}
.tq-login-stage .tq-lobby-extra-actions{
  margin:8px 0 6px;
  z-index:1;
}

.tq-sacred-room-dev-entry{
  position:relative;
  border-radius:14px;
  padding:11px;
  background:linear-gradient(160deg, rgba(20,45,39,0.9), rgba(16,35,31,0.9));
  box-shadow:0 10px 20px rgba(2, 8, 20, 0.28);
  display:grid;
  gap:7px;
}

.tq-sacred-room-dev-entry__head{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
}

.tq-sacred-room-dev-entry__title{
  margin:0;
  font-size:14px;
  line-height:1.25;
  color:#f5e9cc;
}

.tq-sacred-room-dev-entry__subtitle{
  margin:0;
  font-size:11px;
  color:#d7c6a0;
  line-height:1.35;
}

.tq-sacred-room-dev-entry__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:3px 9px;
  border-radius:999px;
  font-size:10px;
  color:#f5efdf;
  background:#3d2f4f;
  letter-spacing:.03em;
}

.tq-sacred-room-dev-entry__cta{
  min-height:44px;
  border:0;
  border-radius:10px;
  background:#2f5449;
  color:#f3e9cf;
  font-size:12px;
  font-weight:700;
  padding:10px 12px;
}

.tq-sacred-room-dev-entry__note{
  margin:0;
  font-size:10px;
  line-height:1.35;
  color:#b9c7bb;
}

.tq-sacred-room-dev-entry[data-sacred-room-entry-mode="preview"] .tq-sacred-room-dev-entry__badge{
  background:#1f5d4f;
}

.tq-sacred-room-dev-entry[data-sacred-room-entry-mode="preview"] .tq-sacred-room-dev-entry__cta{
  background:#3f6a31;
}

@media (min-width:390px){
  .tq-sacred-room-dev-entry{ padding:12px; gap:8px; }
  .tq-sacred-room-dev-entry__title{ font-size:15px; }
  .tq-sacred-room-dev-entry__subtitle{ font-size:12px; }
  .tq-sacred-room-dev-entry__note{ font-size:11px; }
}

/* prototype-debug-only: dev preview entry style, not final AI-generated lobby asset */

/* ===== GANESHA-DIALOGUE-ANCHOR-CLEANUP-1 ===== */
body:has(.tq-dialogue:not(.is-hidden)) .tq-command-panel{
  opacity:0 !important;
  pointer-events:none !important;
}

.tq-dialogue{
  left:8vw !important;
  right:8vw !important;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 184px) !important;
  z-index:70 !important;
}

.tq-dialogue .tq-dialogue-card{
  width:min(74vw, 344px) !important;
  margin:0 auto !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  position:relative !important;
  overflow:visible !important;
}

.tq-dialogue .tq-dialogue-head{
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  top:0 !important;
  min-height:0 !important;
  padding:0 !important;
  pointer-events:none !important;
}

.tq-dialogue .tq-dialogue-speaker{
  position:absolute !important;
  left:-4px !important;
  top:-16px !important;
  width:min(46vw, 192px) !important;
  min-width:144px !important;
  max-width:min(46vw, 192px) !important;
  min-height:32px !important;
  padding:6px 10px !important;
  font-size:10.5px !important;
  font-weight:820 !important;
  line-height:1.02 !important;
  letter-spacing:.01em !important;
  color:#fffdf4 !important;
  -webkit-text-fill-color:#fffdf4 !important;
  text-shadow:0 1px 0 rgba(63, 37, 13, .58) !important;
  pointer-events:none !important;
}

.tq-dialogue .tq-dialogue-close{
  pointer-events:auto !important;
  right:8px !important;
  top:2px !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  min-height:42px !important;
  background-size:76% 76% !important;
}

.tq-dialogue .tq-dialogue-body{
  margin:0 !important;
  padding:42px 15px 72px !important;
  min-height:164px !important;
  border:1px solid rgba(214, 186, 120, .32) !important;
  border-radius:18px !important;
  background:linear-gradient(180deg, rgba(9, 52, 56, .84), rgba(4, 29, 36, .86)) !important;
}

.tq-dialogue .tq-dialogue-foot{
  position:absolute !important;
  left:14px !important;
  right:-4px !important;
  bottom:14px !important;
  justify-content:flex-end !important;
  align-items:flex-end !important;
  background:transparent !important;
  box-shadow:none !important;
  pointer-events:none !important;
}

.tq-dialogue .tq-dialogue-progress{
  left:0 !important;
  bottom:2px !important;
  font-size:10px !important;
}

.tq-dialogue .tq-dialogue-primary,
.tq-dialogue #tqDialoguePrimary{
  pointer-events:auto !important;
  width:clamp(164px, 41vw, 196px) !important;
  min-width:164px !important;
  max-width:196px !important;
  height:44px !important;
  min-height:44px !important;
  padding:0 12px !important;
  font-size:10.8px !important;
  font-weight:860 !important;
  letter-spacing:.02em !important;
  line-height:1 !important;
  white-space:nowrap !important;
  color:#fffdf4 !important;
  -webkit-text-fill-color:#fffdf4 !important;
  background-image:url('/img/temple-quest/temples/ganesha/ui/dialogue/tq-gane-dialogue-speaker-label-v1.png') !important;
  background-size:100% 100% !important;
  background-repeat:no-repeat !important;
  background-position:center !important;
}

#questLobbyBtn.tq-head-emblem-btn{
  pointer-events:auto !important;
  background:transparent !important;
  background-image:none !important;
}

/* Minimal movement cue: keep original target icon + tiny breadcrumbs only */
.tq-path-line,
.tq-path-line-trail,
.tq-path-line-short,
.tq-path-line-arrow,
.tq-path-target-rune{
  display:none !important;
}

.tq-move-player-marker{
  width:14px !important;
  height:14px !important;
  z-index:7 !important;
}

.tq-move-player-marker-art{
  opacity:.5 !important;
  filter:
    drop-shadow(0 0 1px rgba(236, 200, 128, 0.2))
    drop-shadow(0 0 2px rgba(32, 112, 91, 0.12)) !important;
}

.tq-path-step-sigil{
  width:12px !important;
  height:12px !important;
  z-index:7 !important;
}

.tq-path-step-sigil-art{
  opacity:.58 !important;
  filter:
    drop-shadow(0 0 1px rgba(236, 200, 128, 0.22))
    drop-shadow(0 0 2px rgba(32, 112, 91, 0.12)) !important;
}

@media (max-width:390px){
  .tq-dialogue{
    bottom:calc(env(safe-area-inset-bottom, 0px) + 178px) !important;
  }
  .tq-dialogue .tq-dialogue-body{
    min-height:160px !important;
    padding:40px 14px 70px !important;
  }
}

/* Ganesha diagnostics panel (debug-only) */
.tq-ganesha-diagnostics{
  position:fixed;
  right:12px;
  bottom:12px;
  z-index:2147483600;
  width:min(92vw, 340px);
  max-height:62vh;
  overflow:auto;
  background:rgba(6,10,20,.92);
  color:#d9f5ff;
  border:1px solid rgba(98,193,255,.45);
  border-radius:12px;
  padding:10px;
  box-shadow:0 12px 28px rgba(0,0,0,.48);
  font:12px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tq-ganesha-diagnostics__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.tq-ganesha-diagnostics__body{
  margin-top:8px;
  display:block;
}

.tq-ganesha-diagnostics.is-collapsed .tq-ganesha-diagnostics__body{
  display:none;
}

.tq-ganesha-diagnostics__row{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:6px;
}

.tq-ganesha-diagnostics__badge{
  flex:0 0 auto;
  padding:2px 6px;
  border-radius:999px;
  border:1px solid rgba(120,220,255,.45);
  background:rgba(13,32,58,.55);
  color:#caecff;
  font-weight:700;
}

.tq-ganesha-diagnostics__code{
  flex:1 1 auto;
  word-break:break-word;
}

.tq-ganesha-diagnostics__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.tq-ganesha-diagnostics__button{
  border:1px solid rgba(120,220,255,.6);
  background:#0a1a2f;
  color:#d9f5ff;
  border-radius:8px;
  padding:4px 8px;
  cursor:pointer;
}

.tq-ganesha-diagnostics__button--ghost{
  background:transparent;
}

.tq-ganesha-diagnostics__copy-state{
  margin-top:6px;
  opacity:.9;
}

.tq-ganesha-diagnostics__copy-proxy{
  position:fixed;
  inset:auto auto -9999px -9999px;
  opacity:0;
}

/* Ganesha scene engine debug overlay (dev-only) */
.tq-ganesha-engine-overlay{
  position:absolute;
  inset:0;
  z-index:66;
  pointer-events:none;
}

.tq-ganesha-engine-overlay__svg{
  width:100%;
  height:100%;
  display:block;
  pointer-events:none;
}

.tq-ganesha-engine-overlay__object{
  pointer-events:none;
}

.tq-ganesha-engine-overlay__object--hotspot .tq-ganesha-engine-overlay__rect{
  fill:rgba(42, 156, 255, .12);
  stroke:rgba(96, 194, 255, .95);
  stroke-width:2;
  vector-effect:non-scaling-stroke;
}

.tq-ganesha-engine-overlay__object--marker .tq-ganesha-engine-overlay__rect{
  fill:rgba(64, 218, 139, .12);
  stroke:rgba(88, 238, 166, .95);
  stroke-width:2;
  vector-effect:non-scaling-stroke;
}

.tq-ganesha-engine-overlay__object--overlay-anchor .tq-ganesha-engine-overlay__rect{
  fill:rgba(246, 181, 58, .10);
  stroke:rgba(255, 212, 112, .95);
  stroke-width:2;
  stroke-dasharray:6 4;
  vector-effect:non-scaling-stroke;
}

.tq-ganesha-engine-overlay__label{
  fill:#f2fbff;
  font-size:10px;
  font-weight:700;
  text-shadow:0 1px 2px rgba(0,0,0,.55);
}

.tq-ganesha-engine-overlay__toolbar{
  position:absolute;
  right:10px;
  bottom:10px;
  width:min(92vw, 320px);
  max-height:56vh;
  overflow:auto;
  pointer-events:auto;
  border:1px solid rgba(126, 216, 255, .5);
  border-radius:12px;
  background:rgba(8, 12, 26, .94);
  color:#d9f5ff;
  box-shadow:0 12px 24px rgba(0,0,0,.42);
  padding:10px;
  font:12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tq-ganesha-engine-overlay__toolbar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.tq-ganesha-engine-overlay__toolbar-body{
  display:block;
  margin-top:8px;
}

.tq-ganesha-engine-overlay__toolbar.is-collapsed .tq-ganesha-engine-overlay__toolbar-body{
  display:none;
}

.tq-ganesha-engine-overlay__meta{
  margin-top:6px;
  opacity:.95;
}

.tq-ganesha-engine-overlay__toggles{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:6px 10px;
  margin-top:10px;
}

.tq-ganesha-engine-overlay__toggle{
  display:flex;
  align-items:center;
  gap:6px;
}

.tq-ganesha-engine-overlay__actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
}

.tq-ganesha-engine-overlay__status{
  opacity:.9;
}

.tq-ganesha-engine-overlay__button{
  border:1px solid rgba(120, 220, 255, .6);
  border-radius:8px;
  background:#0a1a2f;
  color:#d9f5ff;
  padding:4px 8px;
  cursor:pointer;
}

.tq-ganesha-engine-overlay__button--ghost{
  background:transparent;
}

.tq-ganesha-world-engine-layer{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
  overflow:hidden;
}

.tq-ganesha-world-engine-aura{
  position:absolute;
  inset:-14% -10%;
  background:
    radial-gradient(56% 44% at 50% 34%, rgba(246,206,132,0.18), rgba(246,206,132,0) 70%),
    radial-gradient(52% 42% at 50% 56%, rgba(233,181,92,0.10), rgba(233,181,92,0) 74%),
    radial-gradient(62% 56% at 50% 76%, rgba(60,138,113,0.13), rgba(60,138,113,0) 80%);
  mix-blend-mode:screen;
  opacity:.66;
  pointer-events:none;
}

.tq-ganesha-world-engine-haze{
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg, rgba(4,11,24,0.06) 0%, rgba(8,21,42,0.12) 54%, rgba(3,10,24,0.22) 100%),
    linear-gradient(130deg, rgba(15,37,66,0.08) 0%, rgba(15,37,66,0) 58%),
    radial-gradient(92% 62% at 50% 120%, rgba(8,17,34,0.44), rgba(8,17,34,0));
  pointer-events:none;
}

.tq-ganesha-world-engine-vignette{
  position:absolute;
  inset:0;
  background:
    radial-gradient(120% 88% at 50% 42%, rgba(0,0,0,0) 50%, rgba(3,8,18,0.18) 84%, rgba(2,6,14,0.28) 100%),
    linear-gradient(0deg, rgba(4,10,20,0.12), rgba(4,10,20,0));
  pointer-events:none;
}

.tq-ganesha-world-engine-layer[data-mode="production"] .tq-ganesha-world-engine-aura{
  opacity:.58;
}

.tq-ganesha-world-engine-layer[data-mode="production"] .tq-ganesha-world-engine-haze{
  background:
    linear-gradient(180deg, rgba(4,11,24,0.04) 0%, rgba(8,21,42,0.1) 54%, rgba(3,10,24,0.2) 100%),
    linear-gradient(130deg, rgba(15,37,66,0.06) 0%, rgba(15,37,66,0) 58%),
    radial-gradient(92% 62% at 50% 120%, rgba(8,17,34,0.36), rgba(8,17,34,0));
}

.tq-ganesha-world-engine-debug{
  position:absolute;
  left:10px;
  bottom:210px;
  width:min(320px, calc(100% - 20px));
  border-radius:12px;
  border:1px solid rgba(214,168,92,0.58);
  background:linear-gradient(150deg, rgba(12,24,46,0.94), rgba(8,16,31,0.92));
  color:#f4ead3;
  font-size:11px;
  line-height:1.45;
  padding:10px 12px;
  z-index:68;
  box-shadow:0 10px 24px rgba(2,8,20,0.42);
  pointer-events:none;
}

.tq-ganesha-world-engine-debug strong{
  display:block;
  margin-bottom:5px;
  color:#f8efdc;
  font-size:12px;
}

.tq-ganesha-engine-markers{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:66;
  --tq-marker-active:#89f6b3;
  --tq-marker-completed:#8dc8ff;
  --tq-marker-locked:#b8b8b8;
  --tq-marker-available:#ffd98a;
  --tq-marker-unknown:#d7b892;
}

.tq-ganesha-engine-marker{
  position:absolute;
  display:grid;
  place-items:center;
  pointer-events:none;
  transform:translate(-50%, -50%);
  opacity:.92;
}

.tq-ganesha-engine-marker::before{
  content:"";
  width:100%;
  height:100%;
  border-radius:999px;
  border:2px solid rgba(255,222,150,.82);
  box-shadow:0 0 0 1px rgba(65,40,12,.58) inset, 0 0 14px rgba(255,190,88,.3);
  background:radial-gradient(circle at 50% 42%, rgba(255,246,209,.92) 0%, rgba(255,211,110,.74) 44%, rgba(130,84,30,.14) 100%);
}

.tq-ganesha-engine-marker::after{
  content:"";
  position:absolute;
  width:34%;
  height:34%;
  border-radius:999px;
  background:rgba(255,255,255,.88);
  box-shadow:0 0 8px rgba(255,255,255,.4);
}

.tq-ganesha-engine-marker-label{
  position:absolute;
  left:50%;
  top:100%;
  transform:translate(-50%, 6px);
  padding:2px 6px;
  border-radius:999px;
  white-space:nowrap;
  font-size:9px;
  font-weight:650;
  letter-spacing:.01em;
  line-height:1.1;
  color:#ffefc4;
  background:rgba(8,13,20,.72);
  border:1px solid rgba(255,211,138,.34);
  text-shadow:0 1px 0 rgba(0,0,0,.34);
  backdrop-filter:saturate(110%) blur(1px);
  max-width:88px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tq-ganesha-engine-marker.is-active::before{
  border-color:var(--tq-marker-active);
  box-shadow:0 0 0 1px rgba(31,122,70,.7) inset, 0 0 22px rgba(85,226,142,.55);
  background:radial-gradient(circle at 50% 42%, rgba(242,255,248,.96) 0%, rgba(130,240,180,.88) 44%, rgba(41,105,76,.18) 100%);
}

.tq-ganesha-engine-marker.is-completed::before{
  border-color:var(--tq-marker-completed);
  box-shadow:0 0 0 1px rgba(36,88,134,.52) inset, 0 0 12px rgba(90,182,255,.26);
  background:radial-gradient(circle at 50% 42%, rgba(247,253,255,.94) 0%, rgba(144,203,255,.78) 46%, rgba(35,78,120,.14) 100%);
  opacity:.68;
}

.tq-ganesha-engine-marker.is-locked::before{
  border-color:var(--tq-marker-locked);
  border-style:dashed;
  box-shadow:0 0 0 1px rgba(70,70,70,.78) inset, 0 0 14px rgba(75,75,75,.36);
  background:radial-gradient(circle at 50% 42%, rgba(235,235,235,.93) 0%, rgba(154,154,154,.68) 46%, rgba(60,60,60,.35) 100%);
  filter:saturate(.3) contrast(.93);
  opacity:.72;
}

.tq-ganesha-engine-marker.is-current-target{
  outline:2px solid rgba(255,246,183,.96);
  outline-offset:2px;
  border-radius:999px;
  z-index:3;
}

.tq-ganesha-engine-marker.is-current-target::after{
  width:44%;
  height:44%;
  box-shadow:0 0 18px rgba(255,250,212,.78);
}

.tq-ganesha-engine-marker.is-next-target{
  z-index:2;
}

.tq-ganesha-engine-marker.is-next-target::before{
  border-color:var(--tq-marker-available);
  box-shadow:0 0 0 1px rgba(123,90,27,.46) inset, 0 0 14px rgba(243,206,120,.28);
  background:radial-gradient(circle at 50% 42%, rgba(255,247,220,.94) 0%, rgba(242,208,134,.76) 44%, rgba(109,84,43,.16) 100%);
}

.tq-ganesha-engine-marker.is-state-unknown::before{
  border-color:var(--tq-marker-unknown);
  border-style:dashed;
  border-width:2px;
  background:radial-gradient(circle at 50% 42%, rgba(255,246,223,.88) 0%, rgba(230,191,125,.42) 48%, rgba(93,67,36,.12) 100%);
  opacity:.8;
}

.tq-ganesha-engine-marker.is-state-unknown .tq-ganesha-engine-marker-label{
  border-color:rgba(215,184,143,.42);
  color:#fbe7bf;
}

.tq-ganesha-engine-markers[data-mode="production"] .tq-ganesha-engine-marker:not(.is-current-target):not(.is-active) .tq-ganesha-engine-marker-label{
  opacity:.82;
}

.tq-ganesha-engine-markers[data-mode="production"][data-marker-density="production"] .tq-ganesha-engine-marker{
  transition:opacity .18s ease, transform .18s ease;
}

.tq-ganesha-engine-markers[data-mode="production"][data-marker-density="production"] .tq-ganesha-engine-marker.is-active,
.tq-ganesha-engine-markers[data-mode="production"][data-marker-density="production"] .tq-ganesha-engine-marker.is-current-target{
  transform:translate(-50%, -50%) scale(1.1);
  opacity:1;
  z-index:4;
}

.tq-ganesha-engine-markers[data-mode="production"][data-marker-density="production"] .tq-ganesha-engine-marker.is-next-target{
  transform:translate(-50%, -50%) scale(1.03);
  opacity:.86;
}

.tq-ganesha-engine-markers[data-mode="production"][data-marker-density="production"] .tq-ganesha-engine-marker.is-completed{
  transform:translate(-50%, -50%) scale(.82);
  opacity:.36;
}

.tq-ganesha-engine-markers[data-mode="production"][data-marker-density="production"] .tq-ganesha-engine-marker.is-completed .tq-ganesha-engine-marker-label{
  opacity:.52;
}

.tq-ganesha-engine-markers[data-mode="production"][data-marker-density="production"] .tq-ganesha-engine-marker.is-locked:not(.is-next-target),
.tq-ganesha-engine-markers[data-mode="production"][data-marker-density="production"] .tq-ganesha-engine-marker.is-state-unknown{
  display:none;
}

.tq-ganesha-engine-marker.is-arrived .tq-ganesha-engine-marker-label{
  color:#daffe6;
  border-color:rgba(141,236,175,.65);
}

.tq-ganesha-engine-marker-legend{
  position:absolute;
  left:12px;
  top:12px;
  min-width:154px;
  max-width:min(64vw, 228px);
  padding:8px 10px 9px;
  border-radius:12px;
  border:1px solid rgba(255,222,170,.42);
  background:rgba(8,12,17,.8);
  color:#ffefc9;
  box-shadow:0 8px 24px rgba(0,0,0,.34);
  font-size:11px;
  line-height:1.35;
}

.tq-ganesha-engine-marker-legend__head{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-bottom:6px;
}

.tq-ganesha-engine-marker-legend__head strong{
  font-size:11px;
  letter-spacing:.03em;
  text-transform:uppercase;
}

.tq-ganesha-engine-marker-legend__source{
  color:#dce6f5;
}

.tq-ganesha-engine-marker-legend__list{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:4px;
}

.tq-ganesha-engine-marker-legend__list li{
  display:grid;
  grid-template-columns:10px 1fr auto;
  align-items:center;
  gap:6px;
}

.tq-ganesha-engine-marker-legend__list li i{
  width:10px;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.52);
  display:block;
}

.tq-ganesha-engine-marker-legend__list li[data-state="active"] i{ background:var(--tq-marker-active); }
.tq-ganesha-engine-marker-legend__list li[data-state="completed"] i{ background:var(--tq-marker-completed); }
.tq-ganesha-engine-marker-legend__list li[data-state="locked"] i{ background:var(--tq-marker-locked); }
.tq-ganesha-engine-marker-legend__list li[data-state="available"] i{ background:var(--tq-marker-available); }
.tq-ganesha-engine-marker-legend__list li[data-state="unknown"] i{
  background:var(--tq-marker-unknown);
  border-style:dashed;
}

.tq-ganesha-engine-marker-legend__list li b{
  font-variant-numeric:tabular-nums;
  color:#f7fafc;
}

.tq-ganesha-engine-marker-legend__target{
  margin:7px 0 0;
  color:#d0def0;
}

/* Ganesha player/path visual renderer (Scene Engine visual-only layer) */
.tq-ganesha-player-path-layer{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:67;
}

.tq-ganesha-player-path-node{
  position:absolute;
  transform:translate(-50%, -50%);
  pointer-events:none;
  border-radius:999px;
}

.tq-ganesha-player-path-node.is-player{
  width:22px;
  height:22px;
  opacity:.58;
  background:radial-gradient(circle at 50% 50%, rgba(253, 244, 216, .98) 0%, rgba(239, 205, 128, .72) 50%, rgba(64, 126, 102, .2) 100%);
  box-shadow:
    0 0 0 1px rgba(246, 229, 181, .56),
    0 0 7px rgba(236, 198, 116, .22),
    0 0 12px rgba(236, 198, 116, .1);
  animation:tqGaneshaPlayerPathPulse 3.2s ease-in-out infinite;
}

.tq-ganesha-player-path-node.is-target-rune{
  width:22px;
  height:22px;
  opacity:.84;
  background:radial-gradient(circle at 50% 50%, rgba(253, 244, 213, .92) 0%, rgba(231, 191, 108, .6) 48%, rgba(34, 121, 100, .18) 100%);
  box-shadow:
    0 0 0 1px rgba(244, 226, 173, .42),
    0 0 11px rgba(236, 198, 116, .38),
    0 0 20px rgba(236, 198, 116, .24);
  animation:tqGaneshaRunePulse 2s ease-in-out infinite;
}

.tq-ganesha-player-path-node.is-step-sigil{
  width:11px;
  height:11px;
  opacity:.34;
  background:radial-gradient(circle at 50% 50%, rgba(244, 230, 188, .9) 0%, rgba(231, 193, 115, .54) 52%, rgba(35, 121, 99, .18) 100%);
  box-shadow:
    0 0 0 1px rgba(236, 209, 148, .2),
    0 0 3px rgba(235, 196, 114, .14);
}

.tq-ganesha-player-path-node.is-step-sigil.is-b{
  width:10px;
  height:10px;
  opacity:.28;
}

.tq-ganesha-player-path-node.is-hidden{
  display:none;
}

.tq-ganesha-player-path-debug{
  position:absolute;
  left:10px;
  bottom:10px;
  min-width:164px;
  max-width:min(68vw, 252px);
  padding:8px 9px;
  border-radius:10px;
  border:1px solid rgba(255, 216, 148, .4);
  background:rgba(8, 12, 19, .82);
  box-shadow:0 8px 18px rgba(0,0,0,.34);
  color:#f4e9cb;
  font:10px/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  pointer-events:none;
}

.tq-ganesha-player-path-debug strong{
  display:block;
  margin-bottom:4px;
  font-size:10px;
  color:#fff3d3;
}

body.tq-ganesha-player-path-engine-on .tq-move-player-marker,
body.tq-ganesha-player-path-engine-on .tq-path-target-rune,
body.tq-ganesha-player-path-engine-on .tq-path-step-sigil{
  display:none !important;
}

/* Engine marker active: keep legacy hotspot click buttons, hide only legacy visual skins. */
body.tq-ganesha-engine-markers-active #sceneHotspots .tq-scene-marker-ring,
body.tq-ganesha-engine-markers-active #sceneHotspots .tq-scene-marker-core,
body.tq-ganesha-engine-markers-active #sceneHotspots .tq-scene-marker-callout{
  opacity:0 !important;
  border-color:transparent !important;
  background:none !important;
  box-shadow:none !important;
}

body.tq-ganesha-engine-markers-active #sceneHotspots .tq-scene-marker-icon{
  opacity:0 !important;
}

/* Avoid legacy target-rune ring competing with engine marker in marker-engine modes. */
body.tq-ganesha-engine-markers-active .tq-path-target-rune{
  display:none !important;
}

@keyframes tqGaneshaPlayerPathPulse{
  0%{ opacity:.72; transform:translate(-50%, -50%) scale(.97); }
  50%{ opacity:.9; transform:translate(-50%, -50%) scale(1.06); }
  100%{ opacity:.72; transform:translate(-50%, -50%) scale(.97); }
}

@keyframes tqGaneshaRunePulse{
  0%{ opacity:.62; transform:translate(-50%, -50%) scale(.95); }
  50%{ opacity:.84; transform:translate(-50%, -50%) scale(1.07); }
  100%{ opacity:.62; transform:translate(-50%, -50%) scale(.95); }
}

@media (max-width:420px){
  .tq-ganesha-engine-marker-label{
    max-width:74px;
    font-size:8px;
  }
  .tq-ganesha-engine-marker-legend{
    left:8px;
    top:8px;
    min-width:140px;
    padding:7px 8px 8px;
    font-size:10px;
  }
  .tq-ganesha-player-path-debug{
    left:8px;
    bottom:8px;
    max-width:min(70vw, 220px);
    font-size:9px;
  }
  .tq-ganesha-player-path-node.is-player{
    width:20px;
    height:20px;
  }
  .tq-ganesha-player-path-node.is-target-rune{
    width:18px;
    height:18px;
  }
  .tq-ganesha-player-path-node.is-step-sigil{
    width:10px;
    height:10px;
  }
}
