body { max-width: 980px; margin: 0 auto; padding-bottom: 80px; --banner-h: 56px; }
#view { overflow-x: clip; min-height: 50vh; }
.wallet { display: flex; gap: 6px; align-items: center; }
.site-foot { text-align: center; font-size: 13px; color: var(--muted); padding: 18px 16px 8px; }
.site-foot a { color: var(--muted); }
.pid { font-size: 11px; color: var(--muted); word-break: break-all; margin: 4px 0 16px; text-align: center; }
.pid a { color: var(--muted); }
.fb-btn { display: block; width: 100%; margin: 14px 0 6px; font-size: 15px; }
.iab {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 12px 0; padding: 8px 12px;
  border-radius: 14px; background: #e7f1fb; color: #24527a; font-size: 13px;
}
.iab span { flex: 1 1 180px; }
.iab a { background: var(--sky); color: #fff; border-radius: 999px; padding: 5px 12px; text-decoration: none; font-weight: 700; }
.iab button { border: 0; background: none; color: #24527a; font-size: 16px; cursor: pointer; }
.wallet .me {
  order: 3; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: var(--card);
  display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 18px;
  transition: transform .15s;
}
.wallet .me:active { transform: scale(.9); }

/* Route changes: children move, #view clips them so nothing scrolls sideways. */
@keyframes v-fwd { from { opacity: 0; transform: translate3d(28px, 0, 0); } }
@keyframes v-back { from { opacity: 0; transform: translate3d(-28px, 0, 0); } }
@keyframes v-fade { from { opacity: 0; transform: translate3d(0, 8px, 0); } }
.v-fwd > * { animation: v-fwd .28s cubic-bezier(.2, .8, .2, 1) backwards; }
.v-back > * { animation: v-back .28s cubic-bezier(.2, .8, .2, 1) backwards; }
.v-fade > * { animation: v-fade .22s ease-out backwards; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.97); } }

/* Profile */
.profile { padding: 8px 16px; }
.profile .head {
  display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; padding: 14px 16px; border-radius: 22px;
  background: linear-gradient(135deg, #ffe3cf, #fff3c4); border: 2px solid #f8d9b8; position: relative; overflow: hidden;
}
.profile .head::after {
  content: ''; position: absolute; right: -30px; top: -40px; width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 255, 255, .45); pointer-events: none;
}
.profile .head .face { width: 72px; height: 72px; flex: none; animation: bob 3.2s ease-in-out infinite; }
.profile .head > div { min-width: 0; position: relative; z-index: 1; }
.profile .head h1 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.profile .head p { margin: 2px 0 0; color: #7a6558; font-size: 14px; overflow-wrap: anywhere; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
.acct { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.acct .lab-btn { width: 100%; font-size: 16px; }
.acct .lab-btn b { display: inline-block; width: 22px; }
.acct .google { background: #fff; color: #3b2f2a; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.acct .facebook { background: #1877f2; box-shadow: 0 4px 0 #0f5cc4; }
.acct .facebook:disabled { opacity: .5; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.tiles div {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 6px; text-align: center;
  box-shadow: 0 3px 0 var(--line); animation: rise .35s backwards;
}
.tiles div:nth-child(2) { animation-delay: .05s; } .tiles div:nth-child(3) { animation-delay: .1s; } .tiles div:nth-child(4) { animation-delay: .15s; }
.tiles i { display: block; font-style: normal; font-size: 18px; line-height: 22px; height: 22px; }
.tiles .t-star i { color: #f0b429; }
.tiles b { display: block; font-size: 20px; }
.tiles span { font-size: 12px; color: var(--muted); }
.tiles .t-coin { background: #fffbea; border-color: #f5e3a3; }
.tiles .t-energy { background: #f2f8fd; border-color: #cfe3f5; }
.ph { font-size: 18px; margin: 10px 0 10px; display: flex; align-items: center; gap: 8px; }
.prog { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.prog button {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; text-align: left; width: 100%;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer;
  transition: transform .15s, border-color .15s; animation: rise .35s calc(var(--i, 0) * 35ms) backwards;
}
.prog button > span { min-width: 0; }
.prog button:active { transform: scale(.98); }
.prog .mini { width: 48px; height: 36px; border-radius: 8px; overflow: hidden; }
.prog .mini svg { width: 100%; height: 100%; display: block; }
.prog small { color: var(--muted); display: block; }
.prog .bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 4px; overflow: hidden; display: block; }
.prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffc94a, #f0a020); border-radius: 3px; }
.prog .st { color: #c99317; font-weight: 700; white-space: nowrap; }
.bag { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 18px; }
.bag div {
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 8px 4px; text-align: center;
  box-shadow: 0 3px 0 var(--line); animation: rise .35s backwards;
}
.bag .ic { font-size: 24px; display: inline-block; }
.bag small { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
@media (hover: hover) {
  .prog button:hover { border-color: #f8c9a8; transform: translateX(3px); }
  .bag div:hover .ic { transform: scale(1.15) rotate(-6deg); transition: transform .2s; }
}
@media (max-width: 420px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .top { padding: 10px 12px 4px; gap: 8px; }
  .brand { gap: 6px; min-width: 0; }
  .brand .brand-face { width: 38px; height: 38px; }
  .brand-text { min-width: 0; overflow: hidden; }
  .brand .brand-name { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand .brand-th { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wallet { gap: 4px; flex: none; }
  .wallet .lab-energy, .wallet .lab-coins { padding: 5px 8px; font-size: 14px; }
  .wallet .me { width: 34px; height: 34px; font-size: 16px; }
}
/* Very narrow phones: a smaller brand so "Dr. Game Lab" fits next to the wallet instead of being cut. */
@media (max-width: 380px) {
  .brand .brand-face { width: 32px; height: 32px; }
  .brand .brand-name { font-size: 15px; letter-spacing: -.2px; }
  .brand .brand-th { font-size: 10.5px; }
  .wallet .lab-energy, .wallet .lab-coins { padding: 4px 6px; font-size: 13px; }
}

.gift {
  margin: 10px 16px 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: calc(100% - 32px);
  border-radius: var(--radius); border: 2px dashed #f5d77a; background: #fff8dc; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  transition: transform .12s; animation: v-fade .3s backwards;
}
.gift:not(:disabled):active { transform: scale(.98); }
.gift:disabled { opacity: .6; cursor: default; }
.gift.rank { margin-top: 8px; border-color: #f3c08a; background: #fff1e0; }
.rank-btn { display: block; margin: 0 0 12px; }
.gift.chat { margin-top: 8px; border-color: #b8e2d2; background: #e9f8f1; }
.gift.chat small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.gift.install { margin-top: 8px; border-color: #b9d6f2; background: #e7f1fb; }
.gift.invite { margin-top: 8px; border-color: #f5b3c8; background: #fff0f5; }
.ref-stats { display: flex; gap: 6px; margin-bottom: 10px; }
.ref-stats span { flex: 1; background: var(--bg); border-radius: 12px; padding: 8px 4px; font-size: 12px; color: var(--muted); text-align: center; }
.ref-stats b { display: block; font-size: 20px; color: var(--ink); }
.ref-url { font-size: 13px !important; }
.gift .ic { font-size: 30px; flex: none; display: inline-block; }
.gift:not(:disabled):not(.install) .ic { animation: wiggle 3s ease-in-out infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-12deg) scale(1.1); } 90% { transform: rotate(10deg) scale(1.1); } 95% { transform: rotate(-6deg); } }
.gift b { display: block; font-size: 16px; }
.gift small { color: var(--muted); }

.banner {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(728px, 100%); height: 56px; z-index: 10;
  display: flex; align-items: center; justify-content: center; background: #ece6df; color: var(--muted); font-size: 13px;
  border-top: 2px solid var(--line);
}
/* Android app: the real AdMob banner sits in the same spot, so the placeholder goes away.
   Web: no placeholder either until AdSense is approved and real units go in (paid visitors and the AdSense review see no fake ad). */
.lab-native .banner, html:not(.lab-native) .banner { display: none; }
html:not(.lab-native) body { --banner-h: 0px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 4px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-face { width: 48px; height: 48px; display: block; flex: none; }
.brand-face svg { width: 100%; height: 100%; }
.brand:active .brand-face { transform: scale(.9) rotate(-8deg); transition: transform .12s; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: .2px; }
.brand-th { font-size: 13px; font-weight: 700; color: var(--brand); }

.search { padding: 8px 16px; position: relative; }
.search::before { content: '🔍'; position: absolute; left: 30px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .55; pointer-events: none; }
.search input {
  width: 100%; padding: 12px 16px 12px 42px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--card); font: inherit; font-size: 16px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 138, 91, .15); }

.deep .search, .deep .tags { display: none; }
.tags { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px 10px; scrollbar-width: none; scroll-behavior: smooth; }
.tags::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 2px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 8px 14px; font-size: 15px; cursor: pointer; white-space: nowrap; transition: transform .12s, background-color .15s, border-color .15s;
}
.chip:active { transform: scale(.94); }
.chip-ic { font-size: 14px; line-height: 1; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 3px 0 #d9663c; }
@media (hover: hover) { .chip:not(.on):hover { border-color: #f8c9a8; } }

/* Spotlight carousel */
.spot { padding: 6px 16px 0; }
.spot-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px;
  overscroll-behavior-x: contain;
}
.spot-track::-webkit-scrollbar { display: none; }
.spot-card {
  flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); align-items: center;
  gap: 12px; padding: 12px; border: 0; border-radius: 22px; cursor: pointer; text-align: left; font: inherit; color: var(--ink);
  background: linear-gradient(135deg, var(--c), #fff 140%); position: relative; overflow: hidden; min-height: 150px;
}
.spot-card::before {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 170px; height: 170px; border-radius: 50%;
  background: rgba(255, 255, 255, .35); pointer-events: none;
}
.spot-art {
  display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 6px 0 rgba(0, 0, 0, .08);
  border: 3px solid rgba(255, 255, 255, .8); animation: float 4s ease-in-out infinite;
}
.spot-art svg { width: 100%; height: 100%; display: block; }
@keyframes float { 50% { transform: translateY(-4px) rotate(-1deg); } }
.spot-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.spot-tag {
  align-self: flex-start; font-size: 11px; font-weight: 800; background: #fff; color: var(--brand); border-radius: 999px; padding: 2px 9px;
  position: relative; overflow: hidden;
}
.spot-txt b { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.spot-txt small {
  font-size: 13px; color: #5d4c43; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.spot-go {
  align-self: flex-start; margin-top: 4px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px;
  padding: 5px 14px; border-radius: 999px; box-shadow: 0 3px 0 #d9663c;
}
.spot-card:active .spot-go { transform: translateY(2px); box-shadow: 0 1px 0 #d9663c; }
.spot-dots { display: flex; justify-content: center; gap: 4px; padding: 6px 0 0; }
.spot-dots button { width: 22px; height: 22px; border: 0; padding: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.spot-dots button::after { content: ''; width: 7px; height: 7px; border-radius: 4px; background: #e6d3c1; transition: width .25s, background-color .25s; }
.spot-dots button.on::after { width: 20px; background: var(--brand); }

/* Section headers */
.sec { padding: 4px 16px 8px; }
.sec h2 { font-size: 19px; margin: 14px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hd { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.hd-ic {
  width: 32px; height: 32px; flex: none; border-radius: 10px; background: #ffe9dc; display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.sec h2 small { font-size: 13px; color: var(--muted); font-weight: 400; background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 1px 10px; white-space: nowrap; flex: none; }
.row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.row::-webkit-scrollbar { display: none; }
.row .gcard { width: 168px; flex: none; scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 380px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Game cards */
.gcard {
  background: var(--card); border-radius: var(--radius); overflow: hidden; cursor: pointer; font: inherit;
  border: 2px solid var(--line); text-align: left; padding: 0; color: var(--ink); box-shadow: 0 3px 0 var(--line);
  transition: transform .15s, box-shadow .15s, border-color .15s; animation: rise .4s calc(var(--i, 0) * 45ms) backwards;
}
.gcard:active { transform: scale(.96); box-shadow: 0 1px 0 var(--line); }
.gcard .thumb { aspect-ratio: 4 / 3; display: block; position: relative; overflow: hidden; }
.gcard .thumb svg { width: 100%; height: 100%; display: block; transition: transform .3s; }
.gcard .info { padding: 8px 10px 10px; display: block; }
.gcard .name { font-weight: 700; font-size: 15px; line-height: 1.3; display: block; overflow-wrap: anywhere; }
.gcard .meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
@media (hover: hover) {
  .gcard:hover { transform: translateY(-4px); border-color: #f8c9a8; box-shadow: 0 7px 0 #f8dcc6; }
  .gcard:hover .thumb svg { transform: scale(1.06); }
  .spot-card:hover .spot-art { animation-duration: 1.6s; }
}
.badge { border-radius: 999px; padding: 1px 8px; font-size: 11px; background: #e5f4e4; color: #2f6b3a; white-space: nowrap; }
.badge.web { background: #e7f1fb; color: #24527a; }
.badge.adult { background: #fbebeb; color: #9b2c2c; }

/* Ribbons with a light sweep (transform only) */
.rib {
  position: absolute; top: 8px; left: 8px; z-index: 1; overflow: hidden; border-radius: 999px; padding: 2px 9px;
  font-size: 11px; font-weight: 800; color: #fff; background: var(--brand); box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}
.rib.hot { background: #e2574c; }
.rib.new { background: #2fb37f; }
.rib::after, .spot-tag::after, .play::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: translateX(-120%); animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(300%); } }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty-ic { display: block; font-size: 38px; margin-bottom: 6px; opacity: .7; }

/* Game page */
.detail { padding: 8px 16px; }
.detail .hero {
  border-radius: 24px; overflow: hidden; border: 3px solid #fff; position: relative; background: var(--c);
  box-shadow: 0 8px 0 rgba(0, 0, 0, .06), 0 0 0 2px var(--line);
}
.hero-px { transform: scale(1.06); will-change: transform; }
.hero-float { animation: float 5s ease-in-out infinite; }
.detail .hero svg { width: 100%; display: block; max-height: 340px; }
.hero-pills { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.hero-pills span {
  background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; color: var(--ink);
}
.hero-pills .adult { background: #fbebeb; color: #9b2c2c; }
.detail h1 { font-size: 26px; margin: 14px 0 4px; line-height: 1.25; overflow-wrap: anywhere; }
.detail .sub { color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.detail .play {
  width: 100%; font-size: 21px; padding: 15px; margin: 6px 0 0; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, #ff9b6c, var(--brand)); animation: pulse 2.4s ease-in-out infinite;
}
.play-ic {
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .28); display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
.detail .play:active { animation: none; }
.cost { margin: 8px 0 14px; text-align: center; font-size: 13px; color: var(--muted); }
.cost b { color: #24527a; }
.detail .box { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
.detail .box h3 { margin: 0 0 8px; font-size: 16px; }
.detail .guide-link { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 700; color: #d9663c; }
.detail .howto { margin-top: 12px; background: linear-gradient(180deg, #fffaf3, var(--card)); }
.detail ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.detail ol li {
  counter-increment: step; position: relative; padding: 6px 0 6px 40px; line-height: 1.55; min-height: 34px;
}
.detail ol li + li { border-top: 1px dashed var(--line); }
.detail ol li::before {
  content: counter(step); position: absolute; left: 0; top: 6px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 0 #d9663c;
}
.detail .tagrow { display: flex; gap: 6px; flex-wrap: wrap; }
.detail .tagrow .chip { padding: 5px 12px; font-size: 13px; white-space: normal; text-align: left; }
.stats { display: flex; gap: 8px; }
.stats div { flex: 1; min-width: 0; text-align: center; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 8px 4px; }
.st-ic { display: block; font-size: 16px; }
.stats b { display: block; font-size: 19px; overflow-wrap: anywhere; line-height: 1.25; }
.stats span { font-size: 12px; color: var(--muted); }
.back { background: none; border: 0; color: var(--muted); font-size: 15px; padding: 6px 10px 6px 0; cursor: pointer; transition: transform .15s, color .15s; }
.back:active { transform: translateX(-4px); color: var(--ink); }

/* Player: grows out of the tapped art (app.js), with a loader behind the frame. */
.player { position: fixed; inset: 0; z-index: 40; background: var(--bg); transform-origin: 0 0; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; position: relative; }
/* Party games: the game shrinks to sit above the banner, so the ad never covers a button. */
.player.with-banner iframe { height: calc(100% - var(--banner-h)); }
body:has(.player.with-banner:not([hidden])) .banner { z-index: 45; }
.player-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 8px; }
.player-load span { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--brand)); animation: dot 0.9s ease-in-out infinite; }
.player-load span:nth-child(2) { animation-delay: .15s; } .player-load span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-10px); opacity: .5; } }

@media (min-width: 700px) {
  .row .gcard { width: 200px; }
  .detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
  .detail .back { grid-column: 1 / -1; justify-self: start; }
  .detail .hero { position: sticky; top: 12px; }
  .spot-card { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; padding: 16px 22px; min-height: 0; }
  .spot-txt b { font-size: 26px; }
  .spot-txt small { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  #view, #view *, #view *::before, #view *::after, .tags, .chip, .player-load span, .brand-face {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
  .hero-px { transform: none !important; }
}
.lab-opt .ic svg { width: 34px; height: 34px; display: block; border-radius: 9px; }

/* World chat panel (shared/chat.js). */
.ch-panel { align-items: stretch; }
.ch-card { display: flex; flex-direction: column; width: 100%; max-width: 520px; height: min(640px, calc(100dvh - 32px)); padding: 0; overflow: hidden; text-align: left; }
.ch-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 2px solid var(--line); }
.ch-head b { font-size: 18px; display: block; }
.ch-head small { color: var(--muted); font-size: 12.5px; }
.ch-x { border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; font: inherit; font-size: 16px; cursor: pointer; color: var(--ink); }
.ch-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.ch-empty { color: var(--muted); text-align: center; margin: auto; }
.ch-m { align-self: flex-start; max-width: 85%; background: var(--card); border-radius: 4px 14px 14px 14px; padding: 6px 10px; box-shadow: 0 1px 0 var(--line); }
.ch-m.me { align-self: flex-end; background: #fff3c4; border-radius: 14px 4px 14px 14px; }
.ch-who { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
.ch-who b { color: var(--brand); cursor: pointer; }
.ch-m.me .ch-who b { color: #b07a00; cursor: default; }
.ch-who time { color: var(--muted); font-size: 11px; }
.ch-bd { font-size: 15px; word-break: break-word; }
.ch-join { margin-top: 6px; padding: 6px 12px; font-size: 13.5px; }
.ch-foot { display: flex; gap: 6px; padding: 8px 10px 4px; border-top: 2px solid var(--line); }
.ch-foot .lab-input { flex: 1; min-width: 0; margin: 0; }
.ch-foot .ch-send { padding: 8px 16px; }
.ch-inv { border: 2px solid var(--line); background: var(--card); border-radius: 12px; font-size: 20px; width: 44px; flex: none; cursor: pointer; }
.ch-rule { margin: 0; padding: 0 12px 10px; font-size: 11.5px; color: var(--muted); text-align: center; }
.site-intro { max-width: 760px; margin: 28px auto 0; padding: 0 18px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.site-intro h2 { font-size: 16px; color: var(--ink); margin: 0 0 6px; }
.site-intro a { color: #d9663c; font-weight: 700; }
