/* 星原旅誌 — 首頁（大廳） */

.home {
  animation: page-in 0.32s both;
}

.home-body {
  padding: 1px 0 56px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  border-top: 3px solid var(--bar);
}

.block {
  margin-top: 58px;
}

.home-body > .block:first-child {
  margin-top: 40px;
}

[data-countdown] small {
  margin: 0 0.35em 0 0.2em;
  font: 500 0.58em/1 var(--f-sans);
  opacity: 0.8;
}

/* ───── 大廳：實景天空＋角色立繪＋主選單 ───── */

.lobby {
  position: relative;
  isolation: isolate;
  min-height: min(calc(100vh - var(--hud)), 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lobby-figure {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  right: calc(max(0px, (100% - 1240px) / 2) + 90px);
  width: min(58%, 860px);
}

.cast-en {
  position: absolute;
  right: -130px;
  top: 0;
  height: 100%;
  writing-mode: vertical-rl;
  font: 700 clamp(96px, 12vw, 190px) / 0.82 var(--f-num);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.7);
  pointer-events: none;
  user-select: none;
}

.cast-art {
  position: absolute;
  inset: 0;
  display: block;
  -webkit-mask-image: linear-gradient(#000 84%, transparent 99%), linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(#000 84%, transparent 99%), linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-composite: intersect;
}

.cast-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  opacity: 0;
  filter: drop-shadow(0 24px 30px rgba(12, 30, 80, 0.35));
  transform-origin: 50% 100%;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.cast-art img.in {
  opacity: 1;
  animation: cast-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.cast-art:hover img {
  transform: scale(1.025);
}

@keyframes cast-in {
  from {
    opacity: 0;
    transform: translateX(46px);
  }
}

.lobby-in {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 34px 0 20px;
}

.lobby-copy {
  width: min(560px, 100%);
}

.lobby-over {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.lobby-over b {
  padding: 4px 13px 4px 11px;
  color: #fff;
  background: #1c2743;
  border-radius: 4px 14px 14px 4px;
  border-left: 4px solid #ffcc33;
}

.lobby-over span {
  color: #1c2743;
  text-shadow:
    0 0 10px #fff,
    0 0 3px #fff;
}

[data-sky="night"] .lobby-over span {
  color: #fff;
  text-shadow: 0 2px 8px #0b1230;
}

.lobby-title {
  position: relative;
  display: inline-flex;
  gap: 0.06em;
  margin: 0 0 26px -6px;
  font-size: clamp(66px, 8.6vw, 128px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #fff;
  -webkit-text-stroke: 11px #1c2743;
  paint-order: stroke fill;
  filter: drop-shadow(0 7px 0 rgba(28, 39, 67, 0.28));
}

.lobby-title span:nth-child(2) {
  color: #ffcc33;
}

.lobby-title i {
  position: absolute;
  right: -44px;
  top: -6px;
  width: 46px;
  height: 46px;
  background: #ffcc33;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: twinkle 3.2s ease-in-out infinite;
}

@keyframes twinkle {
  50% {
    transform: scale(0.6) rotate(45deg);
    opacity: 0.6;
  }
}

.lobby-find {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 56px;
  padding: 0 14px 0 20px;
  font-size: 15.5px;
  color: #5d6a8c;
  text-align: left;
  background: #fff;
  border: 2.5px solid #1c2743;
  border-radius: 16px;
  box-shadow: 0 5px 0 #1c2743;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}

.lobby-find svg {
  width: 21px;
  height: 21px;
  color: #1c2743;
}

.lobby-find span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-find kbd {
  color: #47557a;
  background: #f3f7fc;
  border-color: #d2ddeb;
}

.lobby-find:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #1c2743;
}

.lobby-find:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 #1c2743;
}

.lobby-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 16px 0 22px;
  font-size: 13px;
}

.lobby-quick span {
  margin-right: 2px;
  padding: 2px 8px;
  font-weight: 700;
  color: #1c2743;
  background: #ffcc33;
  border-radius: 4px;
}

.lobby-quick a {
  padding: 2px 11px;
  font-weight: 500;
  color: #1c2743;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  transition: background 0.15s;
}

.lobby-quick a:hover {
  background: #fff;
  box-shadow: 0 0 0 2px #1c2743;
}

.lobby-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px 12px;
}

.lobby-menu a {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 10px 10px 10px 11px;
  color: #1c2743;
  background: #fff;
  border: 2.5px solid #1c2743;
  border-radius: 14px;
  box-shadow: 0 5px 0 #1c2743;
  transition:
    transform 0.14s,
    box-shadow 0.14s,
    background 0.14s;
}

.lobby-menu i {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font: 900 18px/1 var(--f-sans);
  font-style: normal;
  color: #fff;
  background: color-mix(in srgb, var(--t) 26%, #fff);
  border: 2px solid var(--t);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.3, 1.7, 0.5, 1);
}

.lobby-menu i img {
  width: 100%;
  height: 100%;
  padding: 2px;
  object-fit: contain;
}

.lobby-menu i img.face {
  padding: 0;
  object-fit: cover;
  object-position: 50% 12%;
}

.lobby-menu b {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

.lobby-menu small {
  font: 600 11.5px/1.2 var(--f-num);
  letter-spacing: 0.1em;
  color: #8090ae;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-menu a:hover {
  background: #ffcc33;
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #1c2743;
}

.lobby-menu a:hover i {
  transform: rotate(-10deg) scale(1.1);
}

.lobby-menu a:hover small {
  color: #1c2743;
}

.lobby-menu a:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 #1c2743;
}

.lobby-meter {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.lobby-meter div {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px;
  color: #fff;
  background: rgba(20, 27, 55, 0.84);
  border-radius: 999px;
}

.lobby-meter dt {
  font-size: 12px;
  color: #aab5d3;
}

.lobby-meter dd {
  font: 600 18px/1 var(--f-num);
  letter-spacing: 0.03em;
  color: #ffcc33;
}

/* 角色名牌 */
.lobby-who {
  position: absolute;
  right: 0;
  bottom: 22px;
  width: min(370px, 100%);
  padding: 16px 20px 18px;
  color: #fff;
  background: rgba(18, 25, 54, 0.84);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 6px 20px 6px 20px;
  border-left: 5px solid #ffcc33;
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.7);
}

.cast-kicker {
  min-height: 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #ffcc33;
}

.lobby-who h2 {
  margin: 2px 0 8px;
  font-size: 34px;
  line-height: 1.15;
}

.dz-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.lobby-who .tag {
  color: #dfe6f7;
  background: rgba(255, 255, 255, 0.12);
}

.lobby-who .seal.round {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.lobby-who .stars {
  --rc: #ffcc33;
}

.cast-quote {
  display: -webkit-box;
  margin: 10px 0 14px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #c7d0e8;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cast-go {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cast-keys {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cast-keys button {
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transition:
    background 0.15s,
    color 0.15s;
}

.cast-keys button:hover {
  color: #1c2743;
  background: #ffcc33;
  border-color: #ffcc33;
}

.cast-keys i {
  font: 600 15px/1 var(--f-num);
  font-style: normal;
  letter-spacing: 0.06em;
  color: #aab5d3;
}

/* 角色列 */
.lobby-roster {
  position: relative;
  padding: 10px 0 14px;
  background: linear-gradient(180deg, transparent, rgba(16, 22, 48, 0.42));
}

.cast-roster {
  display: flex;
  gap: 9px;
  padding: 10px 4px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cast-roster::-webkit-scrollbar {
  display: none;
}

.cast-roster button {
  flex: none;
  width: 54px;
  height: 54px;
  padding: 0;
  background: #fff;
  border: 2.5px solid #fff;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px var(--rc, #8f9bb3),
    0 6px 12px -6px rgba(12, 30, 80, 0.6);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.3, 1.7, 0.5, 1);
}

.cast-roster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}

.cast-roster button:hover {
  transform: translateY(-5px);
}

.cast-roster button[aria-pressed="true"] {
  transform: translateY(-6px) scale(1.14);
  border-color: #ffcc33;
  box-shadow:
    0 0 0 2.5px #1c2743,
    0 10px 16px -6px rgba(12, 30, 80, 0.7);
}

/* ───── 圖鑑入口 ───── */

.dex-feature {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.dex-big {
  position: relative;
  isolation: isolate;
  height: 250px;
  color: #fff;
  border-radius: 16px;
  box-shadow: var(--shade);
  overflow: hidden;
}

.dex-big img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.dex-big::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(205deg, transparent 38%, rgba(12, 18, 44, 0.88));
}

.dex-big::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding-bottom: 3px;
  font-size: 24px;
  font-weight: 900;
  color: #1c2743;
  background: #ffcc33;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.3, 1.7, 0.5, 1);
}

.dex-big:hover img {
  transform: scale(1.07);
}

.dex-big:hover::after {
  transform: scale(1);
}

.dex-big-txt {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: grid;
}

.dex-big-txt small {
  font: 600 13px/1.2 var(--f-num);
  letter-spacing: 0.24em;
  color: #ffcc33;
}

.dex-big-txt b {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
}

.dex-big-txt em {
  font-size: 13px;
  font-style: normal;
  color: #d5dcef;
}

.dex-big .bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 0;
}

.dex-big .bar i {
  background: #ffcc33;
  border-radius: 0;
}

.dex-rest {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.dex-tile {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  min-height: 138px;
  padding: 12px 12px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition:
    transform 0.22s cubic-bezier(0.3, 1.5, 0.5, 1),
    border-color 0.15s,
    box-shadow 0.2s;
}

.dex-tile::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -34px;
  top: -34px;
  width: 116px;
  height: 116px;
  background: color-mix(in srgb, var(--tt) 18%, transparent);
  border-radius: 50%;
  transition: transform 0.4s;
}

.dex-pic {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  transform: rotate(8deg);
  transition: transform 0.3s cubic-bezier(0.3, 1.7, 0.5, 1);
}

.dex-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(12, 30, 80, 0.28));
}

.dex-pic .seal.pic {
  width: 100%;
  height: 100%;
  background: none;
  overflow: visible;
}

.dex-pic .seal.pic img {
  padding: 0;
}

.dex-pic .seal {
  font-size: 20px;
}

.dex-tile b {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.dex-tile small {
  font: 600 11px/1.3 var(--f-num);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dex-n {
  margin-top: 5px;
  font: 600 23px/1 var(--f-num);
  color: var(--tt);
}

.dex-n i {
  margin-left: 4px;
  font: 500 12px/1 var(--f-sans);
  font-style: normal;
  color: var(--ink-3);
}

.dex-tile .bar {
  height: 4px;
  margin-top: 8px;
}

.dex-done {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 2px 7px;
  font: 700 10.5px/1.4 var(--f-num);
  letter-spacing: 0.14em;
  color: #1c2743;
  background: var(--sun);
  border-radius: 3px;
}

.dex-tile:hover {
  transform: translateY(-5px);
  border-color: var(--tt);
  box-shadow: var(--shade-up);
}

.dex-tile:hover::before {
  transform: scale(1.5);
}

.dex-tile:hover .dex-pic {
  transform: rotate(-6deg) scale(1.16);
}

/* ───── 今日奇波：敲蛋 ───── */

.kibo-row {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.egg-card {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 20px 20px 22px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0.8px, transparent 1.3px) 0 0 / 26px 26px,
    radial-gradient(circle, rgba(255, 255, 255, 0.28) 0.7px, transparent 1.2px) 13px 9px / 34px 34px,
    radial-gradient(circle at 50% 62%, #3b4f9a, #1a2350 58%, #121836);
  border-radius: 16px;
  box-shadow: var(--shade);
  overflow: hidden;
}

.egg-card header small {
  font: 600 12px/1 var(--f-num);
  letter-spacing: 0.26em;
  color: #ffcc33;
}

.egg-card h3 {
  margin-top: 3px;
  font-size: 20px;
}

.egg {
  --ec: #7b869f;
  width: 150px;
  margin: 12px 0 4px;
  transform-origin: 50% 90%;
  animation: egg-idle 3.4s ease-in-out infinite;
}

.egg[data-el="火"], .egg-photo[data-el="火"] { --ec: #ef5a3c; }
.egg[data-el="水"], .egg-photo[data-el="水"] { --ec: #2f8fe8; }
.egg[data-el="風"], .egg-photo[data-el="風"] { --ec: #23b48a; }
.egg[data-el="雷"], .egg-photo[data-el="雷"] { --ec: #9a5bea; }
.egg[data-el="冰"], .egg-photo[data-el="冰"] { --ec: #3cbfd9; }
.egg[data-el="光"], .egg-photo[data-el="光"] { --ec: #e2a400; }
.egg[data-el="暗"], .egg-photo[data-el="暗"] { --ec: #6957c9; }
.egg[data-el="地"], .egg-photo[data-el="地"],
.egg[data-el="土"], .egg-photo[data-el="土"],
.egg[data-el="岩"], .egg-photo[data-el="岩"] { --ec: #b0793a; }
.egg[data-el="草"], .egg-photo[data-el="草"],
.egg[data-el="木"], .egg-photo[data-el="木"] { --ec: #57a83a; }

.egg svg {
  display: block;
  width: 100%;
  overflow: visible;
  filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.45));
}

.egg-shell {
  fill: #fff7e2;
  stroke: #1c2743;
  stroke-width: 3;
}

.egg-marks {
  fill: var(--ec);
}

.egg-shine {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.85;
}

.egg-cracks path {
  fill: none;
  stroke: #1c2743;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.egg.taps-1 .k1,
.egg.taps-2 .k1,
.egg.taps-2 .k2 {
  opacity: 1;
}

.egg:hover {
  animation-duration: 0.9s;
}

.egg.knock {
  animation: egg-knock 0.45s;
}

.egg.hatch {
  animation: egg-hatch 0.52s forwards;
}

.egg.hatch .egg-cracks path {
  opacity: 1;
}

@keyframes egg-idle {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

@keyframes egg-knock {
  20% {
    transform: rotate(-11deg) scale(1.04);
  }
  45% {
    transform: rotate(9deg);
  }
  70% {
    transform: rotate(-5deg);
  }
}

@keyframes egg-hatch {
  40% {
    transform: scale(1.14) rotate(6deg);
    filter: brightness(1.4);
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
    filter: brightness(3);
  }
}

.egg-hint {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #c7d0e8;
}

.egg-hint span {
  font-size: 13px;
  letter-spacing: 6px;
  color: #ffcc33;
}

.egg-photo {
  --ec: #7b869f;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

.egg-pic {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, color-mix(in srgb, var(--ec) 55%, #fff) 0, color-mix(in srgb, var(--ec) 70%, #1a2350) 70%);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--ec);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.3, 1.7, 0.5, 1);
}

.egg-pic img {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.egg-photo:hover .egg-pic {
  transform: scale(1.06) rotate(-3deg);
}

.born .egg-pic {
  animation: stamp-down 0.5s cubic-bezier(0.2, 1.3, 0.4, 1);
}

.egg-name {
  display: grid;
}

.egg-name i {
  font: 600 13px/1 var(--f-num);
  font-style: normal;
  letter-spacing: 0.12em;
  color: #ffcc33;
}

.egg-name b {
  font-size: 22px;
  font-weight: 900;
}

.egg-name small {
  font-size: 12.5px;
  color: #aab5d3;
}

.egg-photo > .seal {
  position: absolute;
  right: calc(50% - 74px);
  top: 0;
  font-size: 15px;
}

.egg-foot {
  margin-top: 12px;
  font-size: 12.5px;
  color: #aab5d3;
}

.egg-foot b {
  font: 600 16px/1 var(--f-num);
  color: #ffcc33;
}

.herd {
  min-width: 0;
}

.herd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.herd-top b {
  font-size: 15px;
  color: var(--ink-2);
}

.herd-strip.grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

/* ───── 今日看板 ───── */

.board {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.8fr;
  gap: 18px;
  align-items: start;
}

.board h3 {
  font-size: 17px;
}

.board article > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--leaf);
  box-shadow: var(--shade);
  overflow: hidden;
}

.ticket > header {
  position: relative;
  display: grid !important;
  justify-content: start !important;
  gap: 0 !important;
  padding: 14px 110px 14px 18px;
  color: #fff;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1.4px) 0 0 / 9px 9px,
    #1c2743;
}

.ticket > header small {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #ffcc33;
}

.ticket > header b {
  font-size: 20px;
  font-weight: 900;
}

.ticket-rate {
  position: absolute;
  right: 16px;
  top: 50%;
  padding: 5px 14px 6px;
  font: 700 24px/1 var(--f-num);
  color: #1c2743;
  background: #ffcc33;
  border-radius: 8px;
  transform: translateY(-50%) rotate(-4deg);
}

.ticket ul {
  padding: 6px 18px;
}

.ticket li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}

.ticket li:last-child {
  border-bottom: 0;
}

.ticket li img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.ticket li span {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket li b {
  font: 600 20px/1 var(--f-num);
}

.ticket li em {
  min-width: 52px;
  font: 600 15px/1 var(--f-num);
  font-style: normal;
  text-align: right;
  color: var(--meadow);
}

.ticket footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px 12px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--card-2);
  border-top: 1px solid var(--line);
}

.notice,
.timers {
  padding: 16px 18px;
}

.notice ul,
.timers ul {
  margin-top: 8px;
}

.notice li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.notice li:last-child {
  border-bottom: 0;
}

.notice li.none {
  display: block;
  color: var(--ink-3);
}

.ev-dot {
  width: 10px;
  height: 10px;
  background: var(--azure);
  border-radius: 2px;
  transform: rotate(45deg);
}

.notice li:nth-child(2n) .ev-dot {
  background: var(--coral);
}

.notice li:nth-child(3n) .ev-dot {
  background: var(--teal);
}

.notice li b {
  display: block;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice li > span small {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}

.notice li em {
  font: 600 16px/1 var(--f-num);
  font-style: normal;
  color: var(--coral);
  white-space: nowrap;
}

.timers li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.timers li span {
  font-size: 13px;
  color: var(--ink-2);
}

.timers li b {
  font: 600 23px/1 var(--f-num);
  letter-spacing: 0.02em;
}

.timers p {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
}

/* ───── 工具格（仿遊戲商店卡） ───── */

.bag-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 14px;
}

.home-slots {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.slot {
  position: relative;
  display: grid;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shade);
  transition:
    transform 0.22s cubic-bezier(0.3, 1.5, 0.5, 1),
    box-shadow 0.2s;
}

.slot-box {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.8;
  background:
    radial-gradient(circle, var(--dots) 1px, transparent 1.4px) 0 0 / 8px 8px,
    radial-gradient(circle at 50% 56%, color-mix(in srgb, var(--tt) 26%, var(--card)), var(--card) 74%);
  border-radius: 11px 11px 0 0;
}

.slot-box .seal {
  width: 2.7em;
  height: 2.7em;
  font-size: 21px;
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transition: transform 0.35s cubic-bezier(0.3, 1.7, 0.5, 1);
}

/* 工具格：道具圖疊在菱形色塊上 */
.slot-box .seal.pic {
  position: relative;
  width: 74px;
  height: 74px;
  clip-path: none;
  background: none;
  overflow: visible;
}

.slot-box .seal.pic::before {
  content: "";
  position: absolute;
  inset: 13px;
  background: color-mix(in srgb, var(--tt) 78%, #fff);
  border-radius: 10px;
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tt) 22%, transparent);
}

.slot-box .seal.pic img {
  position: relative;
  padding: 0;
  filter: drop-shadow(0 5px 5px rgba(12, 30, 80, 0.32));
}

.slot-box .seal.pic img.face {
  width: 78%;
  height: 78%;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
}

.slot > b {
  display: block;
  padding: 7px 8px 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: #1c2743;
  border-top: 3px solid var(--tt);
  border-radius: 0 0 11px 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-sky="night"] .slot > b {
  background: #0a1028;
}

.slot-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: max(100%, 210px);
  padding: 10px 13px 11px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #e6ebf8;
  background: rgba(16, 22, 48, 0.96);
  border-radius: 10px;
  border-top: 3px solid var(--tt);
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 0.16s,
    transform 0.16s;
}

.slot-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: rgba(16, 22, 48, 0.96);
}

.slot-tip small {
  display: block;
  font: 600 11.5px/1.4 var(--f-num);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffcc33;
}

.slot:hover,
.slot:focus-visible {
  z-index: 3;
  transform: translateY(-6px);
  box-shadow: var(--shade-up);
}

.slot:hover .seal {
  transform: rotate(180deg) scale(1.1);
}

.slot:hover .slot-tip,
.slot:focus-visible .slot-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.home-end {
  margin-top: 56px;
  text-align: center;
}

/* ───── 響應式 ───── */

@media (max-width: 1180px) {
  .dex-rest {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .home-slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .board {
    grid-template-columns: 1fr 1fr;
  }

  .ticket {
    grid-column: 1 / -1;
  }

  .lobby-who {
    width: 330px;
  }
}

@media (max-width: 860px) {
  .block {
    margin-top: 44px;
  }

  .lobby {
    min-height: 0;
  }

  .lobby-figure {
    position: relative;
    right: auto;
    width: 100%;
    height: 54vh;
    min-height: 330px;
  }

  .cast-en {
    font-size: 84px;
  }

  .lobby-in {
    display: block;
    padding: 0 0 6px;
  }

  .lobby-copy {
    margin-top: 18px;
  }

  .lobby-title {
    margin-left: 0;
    font-size: clamp(54px, 17vw, 84px);
    -webkit-text-stroke-width: 8px;
  }

  .lobby-title i {
    right: -30px;
    width: 32px;
    height: 32px;
  }

  .lobby-who {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 18px;
  }

  .lobby-find kbd {
    display: none;
  }

  .lobby-menu {
    grid-template-columns: repeat(2, 1fr);
  }

  .lobby-meter {
    flex-wrap: wrap;
  }

  .dex-feature {
    grid-template-columns: 1fr;
  }

  .dex-big {
    height: 170px;
  }

  .dex-rest {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kibo-row,
  .board {
    grid-template-columns: 1fr;
  }

  .herd-strip.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slot-tip {
    display: none;
  }
}

@media (max-width: 480px) {
  .dex-rest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
