/* =========================================================
   Lobby modals, game intro, in-game shell
   ========================================================= */
.hx-modal-content { color: var(--cream); }
.hx-modal-content h4 { font-weight: 600; }
.modal-note.demo-note { margin-top: 14px; padding-top: 11px; border-top: 1px solid rgba(226, 193, 124, .09); }
.modal.open .modal-body::-webkit-scrollbar { width: 6px; }
body.modal-open { overflow: hidden; }

/* in-game shell */
body.in-game { overflow: hidden; }
body.in-game .topbar,
body.in-game .lobby,
body.in-game .lobby-footer { display: none !important; }
body.in-game .ambient-bg { opacity: 0; transition: opacity .5s; }
.game-stage {
  position: fixed;
  inset: 0;
  height: 100dvh;
  z-index: 300;
  background: #041b16;
  overflow: hidden;
  animation: gameStageIn .45s var(--ease-out) both;
}
@keyframes gameStageIn { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: scale(1); } }
.notice-scroll { display: flex; gap: 46px; animation: none; }
.notice-run { display: flex; gap: 46px; flex: 0 0 auto; }
.notice-run span { display: inline-flex; align-items: center; gap: 34px; font-size: 9.5px; color: rgba(205, 197, 169, .55); white-space: nowrap; }
.notice-run span::after { content: "◆"; font-size: 5px; color: rgba(225, 188, 108, .4); }

/* =========================================================
   Check-in
   ========================================================= */
.modal.checkin-modal { width: min(680px, calc(100vw - 32px)); }
.checkin-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 4px 18px;
  position: relative;
}
.checkin-moon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 34px;
  color: #5e3a0c;
  background:
    radial-gradient(circle at 35% 28%, #fff6cf, #f4d688 45%, #d6a441 72%, #9f6a20);
  box-shadow: 0 0 0 5px rgba(235, 199, 122, .06), 0 10px 22px rgba(0, 0, 0, .3), inset 0 2px 5px rgba(255, 255, 255, .6);
  position: relative;
}
.checkin-moon::before, .checkin-moon::after {
  content: "✦";
  position: absolute;
  color: #f7d991;
  font-size: 11px;
  opacity: .8;
}
.checkin-moon::before { top: -8px; right: -12px; }
.checkin-moon::after { bottom: -5px; left: -14px; font-size: 8px; }
.checkin-hero h4 { font-size: 20px; color: #faf0d6; margin-top: 6px; letter-spacing: .4px; }
.checkin-hero p { font-size: 11px; line-height: 1.8; color: #a99f8b; margin-top: 4px; }
.checkin-hero p b { color: #f3d186; font-weight: 600; }
.checkin-days-label {
  margin-left: auto;
  font-family: var(--font-kai);
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(239, 207, 142, .5);
  writing-mode: vertical-rl;
  padding: 5px 0;
  border-right: 1px solid rgba(234, 201, 133, .15);
  padding-right: 10px;
  align-self: stretch;
}
.sign-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sign-day {
  min-height: 108px;
  border-radius: 8px;
  border: 1px solid rgba(225, 190, 120, .13);
  background: rgba(255, 255, 255, .025);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  overflow: hidden;
  transition: .2s;
}
.sign-day.current { border-color: rgba(245, 210, 138, .6); background: linear-gradient(180deg, rgba(219, 176, 89, .15), rgba(255, 255, 255, .025)); box-shadow: 0 0 24px rgba(223, 181, 94, .09); }
.sign-day.claimed { opacity: .48; }
.sign-day.big { border-color: rgba(225, 180, 90, .24); background: linear-gradient(180deg, rgba(125, 39, 27, .34), rgba(255, 255, 255, .02)); }
.sign-day .day-label { font-size: 9px; color: rgba(206, 196, 172, .6); }
.sign-day .sign-coin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-kai);
  font-size: 13px;
  color: #57370d;
  background: radial-gradient(circle at 34% 27%, #fff4c1, #f5d98d 42%, #d5a143 75%, #9b651b);
  border: 1px solid rgba(255, 241, 190, .55);
  box-shadow: 0 3px 7px rgba(0, 0, 0, .22);
}
.sign-day.big .sign-coin { color: #fff0bc; background: radial-gradient(circle at 35% 28%, #e4574b, #a52622 62%, #6e1314); border-color: rgba(246, 208, 133, .55); font-size: 11px; }
.sign-day .day-reward { font-family: "Georgia", serif; font-size: 10px; color: #d8bd85; letter-spacing: .1px; white-space: nowrap; }
.sign-day .day-stamp {
  position: absolute;
  right: -14px;
  top: 7px;
  width: 52px;
  height: 16px;
  background: rgba(168, 67, 41, .8);
  color: #ffe2ad;
  font-style: normal;
  font-size: 8px;
  text-align: center;
  line-height: 16px;
  transform: rotate(38deg);
}
.sign-day .day-stamp.today { background: #c1903b; color: #442906; font-weight: 700; }
.sign-day .day-gem { font-size: 7px; color: #68d8ca; white-space: nowrap; }
.checkin-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }
.checkin-tip { font-size: 10px; color: #a99d85; display: flex; align-items: center; gap: 5px; }
.checkin-tip b { color: #efce84; font-weight: 600; }
.checkin-bottom .gold-btn { min-height: 38px; font-size: 12px; padding: 0 24px; }
.gold-btn.is-done { background: linear-gradient(#8e8a7b, #615e54); color: #d7d0bd; box-shadow: 0 3px 0 #3c3a33; border-color: rgba(255,255,255,.08); }

/* =========================================================
   Tasks
   ========================================================= */
.daily-progress-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 15px; }
.daily-progress-head h4 { font-size: 18px; color: #f1e2c1; margin-top: 4px; }
.daily-progress-ring { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(236, 200, 129, .3); display: flex; align-items: baseline; justify-content: center; gap: 2px; position: relative; }
.daily-progress-ring::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; border-top-color: #e3bc69; transform: rotate(25deg); }
.daily-progress-ring b { font-family: "Georgia", serif; font-size: 18px; color: #f6d894; }
.daily-progress-ring small { font-size: 8px; color: #968a75; }
.modal-task-list { display: flex; flex-direction: column; gap: 7px; }
.modal-task-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid rgba(225, 191, 122, .09);
  background: rgba(255, 255, 255, .02);
}
.modal-task-row .task-ico { width: 28px; height: 28px; font-size: 11px; }
.modal-task-info { min-width: 0; }
.modal-task-info b { display: block; font-size: 11px; color: #e8ddc7; font-weight: 500; }
.modal-task-info > span { display: block; font-size: 8px; color: #8e8877; margin-top: 2px; }
.task-progress.wide { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.task-progress.wide i { display: block; height: 3px; width: 100%; max-width: 130px; background: linear-gradient(90deg, #7e5d28, #d8b56a); border-radius: 2px; }
.task-progress.wide em { font-style: normal; font-size: 7px; color: #8e836e; }
.modal-task-reward { display: flex; align-items: center; gap: 4px; font-size: 9px; color: #d7bd84; font-family: "Georgia", serif; white-space: nowrap; }
.modal-task-row .task-claim { grid-column: auto; grid-row: auto; width: 54px; height: 26px; font-size: 9px; }
.modal-task-row .task-claim.ready { color: #4c2e0b; font-weight: 700; }
.task-extra { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; border-top: 1px dashed rgba(227, 194, 125, .1); padding-top: 12px; }
.task-extra > div { display: flex; align-items: center; gap: 8px; }
.task-extra p { display: flex; flex-direction: column; gap: 2px; }
.task-extra p b { font-size: 10px; color: #dfd2b9; font-weight: 500; }
.task-extra p small { font-size: 8px; color: #8c8675; }

/* =========================================================
   Record
   ========================================================= */
.record-hero { display: flex; align-items: center; gap: 22px; padding-bottom: 16px; }
.record-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: conic-gradient(#e6c574 var(--p, 180deg), rgba(255,255,255,.08) 0);
}
.record-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #0b3128; border: 1px solid rgba(230, 196, 126, .16); }
.record-ring b { position: relative; z-index: 1; font-family: "Georgia", serif; font-size: 25px; color: #f8e4b8; }
.record-ring b small { font-size: 10px; }
.record-ring span { position: relative; z-index: 1; font-size: 8px; color: #a29479; letter-spacing: 1px; }
.record-headline h4 { font-size: 20px; color: #f4e5c5; }
.record-headline p { font-size: 10px; color: #9f9683; margin-top: 5px; }
.record-headline p b { color: #edd090; font-weight: 500; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 17px; }
.stat-card { border-radius: 9px; border: 1px solid rgba(225, 192, 122, .12); background: rgba(255, 255, 255, .025); padding: 10px 12px; position: relative; overflow: hidden; min-height: 78px; }
.stat-card > span { display: block; font-size: 9px; color: #9f9581; }
.stat-card > b { display: inline-block; font-family: "Georgia", serif; font-size: 23px; color: #f0d9a3; margin-top: 3px; }
.stat-card > small { font-size: 8px; color: #807a6b; margin-left: 4px; }
.stat-card > i { position: absolute; right: 0; bottom: 0; width: 34%; background: linear-gradient(to top, rgba(224, 183, 96, .17), transparent); }
.stat-card.doudizhu > b { color: #f0d9a3; }
.stat-card.wushi > b { color: #f2c0a4; }
.stat-card.mahjong > b { color: #a8e2c7; }
.record-list-head { display: flex; justify-content: space-between; align-items: center; height: 27px; border-top: 1px solid rgba(225, 193, 124, .1); padding-top: 10px; }
.record-list-head span { font-size: 11px; color: #e0d2b8; }
.record-list-head small { font-size: 8px; color: #817b6c; }
.record-list { display: flex; flex-direction: column; gap: 3px; }
.record-row { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; background: rgba(255, 255, 255, .02); }
.record-game { width: 27px; height: 27px; border-radius: 6px; display: grid; place-items: center; font-family: var(--font-kai); font-size: 12px; color: #f2dda8; background: rgba(95, 77, 38, .55); border: 1px solid rgba(228, 193, 120, .18); }
.record-game.wushi { background: rgba(111, 50, 39, .5); }
.record-game.mahjong { background: rgba(34, 91, 72, .6); }
.record-row > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.record-row b { font-size: 9.5px; font-weight: 500; color: #d9ceb7; }
.record-row small { font-size: 8px; color: #777264; }
.record-row em { margin-left: auto; font-style: normal; font-family: "Georgia", serif; font-size: 10px; }
.record-row em.gain { color: #7bdbaf; }
.record-row em.loss { color: #d8897e; }
.record-result { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 8px; }
.record-result.win { color: #8ee0bb; background: rgba(69, 155, 118, .14); border: 1px solid rgba(108, 213, 167, .2); }
.record-result.lose { color: #df9a8d; background: rgba(161, 73, 57, .14); border: 1px solid rgba(219, 133, 113, .18); }
.empty-state { text-align: center; padding: 26px; font-size: 10px; color: #827d6e; }

/* =========================================================
   Rules
   ========================================================= */
.rules-wrap { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; }
.rules-tabs { display: flex; flex-direction: column; gap: 6px; border-right: 1px solid rgba(226, 193, 126, .1); padding-right: 14px; }
.rules-tab { display: flex; align-items: center; gap: 9px; min-height: 46px; border-radius: 8px; padding: 7px 9px; color: #a89f8d; font-size: 12px; text-align: left; border: 1px solid transparent; transition: .2s; }
.rules-tab span { width: 27px; height: 27px; display: grid; place-items: center; font-family: var(--font-kai); font-size: 12px; color: #d6bc87; background: rgba(255, 255, 255, .04); border: 1px solid rgba(225, 190, 122, .14); border-radius: 6px; }
.rules-tab:hover { color: #e9dcc1; background: rgba(255, 255, 255, .025); }
.rules-tab.active { color: #f5e6c7; background: linear-gradient(100deg, rgba(205, 165, 83, .13), transparent); border-color: rgba(225, 190, 122, .19); }
.rules-tab.active span { color: #472c0a; background: linear-gradient(145deg, #f4da9d, #c99b49); }
.rules-content { min-width: 0; max-height: 62vh; overflow: auto; padding-right: 4px; }
.rules-intro { display: flex; align-items: center; gap: 13px; padding-bottom: 14px; border-bottom: 1px solid rgba(225, 190, 122, .1); }
.rules-mark { width: 44px; height: 44px; display: grid; place-items: center; font-family: var(--font-display); font-size: 24px; color: #f2d795; background: linear-gradient(145deg, rgba(135, 70, 38, .55), rgba(45, 32, 19, .7)); border: 1px solid rgba(230, 194, 123, .25); border-radius: 50%; }
.rules-intro h4 { font-family: var(--font-kai); font-size: 20px; color: #f2e2bf; letter-spacing: 1px; }
.rules-intro p { font-size: 9px; color: #928a7a; margin-top: 3px; }
.rules-sections { display: flex; flex-direction: column; gap: 0; padding-top: 4px; }
.rule-item { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px dashed rgba(225, 190, 122, .08); }
.rule-item > span { font-family: var(--font-kai); font-size: 12px; color: #e5c781; }
.rule-item > p { font-size: 12px; line-height: 1.9; color: #bdb19b; }
.rules-content .modal-note { padding-top: 12px; }
@media (max-width: 700px) {
  .rules-wrap { grid-template-columns: 1fr; }
  .rules-tabs { flex-direction: row; border-right: 0; border-bottom: 1px solid rgba(226, 193, 126, .1); padding-right: 0; padding-bottom: 9px; overflow-x: auto; }
  .rules-tab { flex: 0 0 auto; min-height: 36px; }
  .rules-tab span { width: 23px; height: 23px; }
  .rules-content { max-height: none; }
}

/* =========================================================
   Settings
   ========================================================= */
.settings-group { margin-bottom: 16px; }
.settings-title { font-size: 8px; letter-spacing: 1.7px; color: rgba(225, 195, 132, .4); margin-bottom: 7px; }
.setting-switch-row, .setting-link-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 7px 10px; border-radius: 8px; border: 1px solid transparent; border-bottom-color: rgba(225, 192, 123, .08); text-align: left; transition: .2s; }
.setting-switch-row:hover, .setting-link-row:hover { background: rgba(255, 255, 255, .025); border-color: rgba(225, 192, 123, .1); }
.setting-switch-row > div { display: flex; flex-direction: column; gap: 3px; }
.setting-switch-row b, .setting-link-row span { font-size: 11px; color: #e0d4bc; font-weight: 500; }
.setting-switch-row small { font-size: 8px; color: #8b8474; }
.setting-link-row b { color: #887f6d; font-weight: 400; }
.switch { width: 38px; height: 21px; border-radius: 12px; background: #2b3730; border: 1px solid rgba(255, 255, 255, .1); position: relative; transition: .2s; flex: 0 0 auto; }
.switch i { position: absolute; width: 15px; height: 15px; top: 2px; left: 2px; border-radius: 50%; background: #9d9a8c; transition: transform .22s var(--ease-out), background .2s; }
.switch.on { background: linear-gradient(90deg, #9d6e28, #d3ad62); border-color: rgba(240, 212, 152, .4); }
.switch.on i { transform: translateX(17px); background: #fff4d5; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.settings-brand { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(225, 192, 123, .09); }
.brand-coin.mini { width: 28px; height: 28px; box-shadow: 0 0 0 1px #54300c, 0 0 0 2px rgba(240, 207, 129, .55); }
.brand-coin.mini::before { inset: 8px; }
.brand-coin.mini span { font-size: 10px; }
.settings-brand p { font-family: var(--font-kai); font-size: 12px; color: #d6c8a8; display: flex; flex-direction: column; gap: 2px; }
.settings-brand p small { font-family: var(--font-body); font-size: 7px; color: #756f61; }

/* =========================================================
   Shop
   ========================================================= */
.shop-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 14px; border-radius: 10px; background: linear-gradient(105deg, rgba(131, 63, 36, .45), rgba(51, 49, 30, .2) 56%, rgba(22, 58, 46, .4)); border: 1px solid rgba(230, 195, 123, .16); position: relative; overflow: hidden; }
.shop-banner::after { content: ""; position: absolute; right: 80px; top: -70px; width: 160px; height: 160px; border: 1px solid rgba(235, 199, 128, .1); border-radius: 50%; box-shadow: 0 0 0 16px rgba(235, 199, 128, .025); }
.shop-banner h4 { font-size: 18px; color: #f3e2be; margin-top: 4px; }
.shop-banner p { font-size: 9px; color: #988e7c; margin-top: 3px; }
.shop-seal { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-kai); color: #f4da9f; font-size: 17px; border: 1px solid rgba(240, 209, 140, .3); background: radial-gradient(circle at 35% 30%, rgba(184, 67, 44, .85), rgba(91, 30, 22, .9)); transform: rotate(6deg); }
.shop-tabs { display: flex; gap: 20px; border-bottom: 1px solid rgba(225, 190, 120, .1); margin: 15px 0 12px; height: 32px; }
.shop-tabs button { font-size: 11px; color: #8e8777; position: relative; padding: 0 0 8px; }
.shop-tabs button.active { color: #f2dfb5; }
.shop-tabs button.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 22px; height: 2px; border-radius: 2px; background: var(--gold-200); }
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shop-item { position: relative; min-height: 152px; border-radius: 9px; border: 1px solid rgba(226, 192, 122, .12); background: rgba(255, 255, 255, .02); display: flex; flex-direction: column; align-items: center; padding: 10px 8px 9px; text-align: center; }
.shop-item.hot { border-color: rgba(233, 195, 120, .32); background: linear-gradient(180deg, rgba(125, 86, 35, .13), rgba(255, 255, 255, .02)); }
.shop-hot { position: absolute; top: 7px; right: 7px; font-size: 7px; color: #ffe1a4; background: rgba(168, 67, 43, .7); border-radius: 3px; padding: 2px 4px; }
.shop-art { height: 56px; width: 100%; display: grid; place-items: center; position: relative; }
.shop-art .coin-icon.big { width: 42px; height: 42px; box-shadow: inset 0 0 0 2px rgba(255,239,172,.6), 0 5px 12px rgba(0, 0, 0, .32); }
.shop-art .coin-icon.big::before { inset: 13px; }
.shop-art .shop-stack { position: absolute; width: 39px; height: 27px; bottom: 5px; border-radius: 50%; border: 2px solid #a67529; opacity: .35; }
.shop-art .diamond-icon.big { width: 37px; height: 37px; border-radius: 6px; }
.shop-item > b { font-size: 10px; font-weight: 500; color: #e3d5ba; margin-top: 4px; }
.shop-item > p { font-size: 8px; color: #8d8473; margin-top: 3px; }
.shop-buy { margin-top: auto; width: 80%; min-height: 25px; border-radius: 13px; background: linear-gradient(180deg, #f8e3a7, #d8ae58); color: #51320b; font-size: 9px; font-weight: 700; border: 1px solid rgba(255, 244, 206, .55); box-shadow: 0 2px 0 #7c551d; transition: .2s; }
.shop-buy:hover { filter: brightness(1.07); transform: translateY(-1px); }
.shop-buy small { font-weight: 400; font-size: 7px; opacity: .6; margin-left: 2px; }
.exchange-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(0, 0, 0, .13); border: 1px solid rgba(226, 191, 122, .08); }
.exchange-row > div { display: flex; flex-direction: column; gap: 3px; }
.exchange-row b { font-size: 10px; color: #ded0b5; font-weight: 500; }
.exchange-row small { font-size: 8px; color: #847d6e; }
@media (max-width: 720px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Mail
   ========================================================= */
.mail-list { display: flex; flex-direction: column; gap: 4px; }
.mail-item { display: flex; align-items: flex-start; gap: 9px; padding: 11px 8px; border-radius: 8px; border-bottom: 1px solid rgba(224, 190, 120, .08); }
.mail-item.unread { background: rgba(226, 187, 104, .035); }
.mail-icon { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-kai); font-size: 13px; color: #e8cf9c; background: linear-gradient(145deg, rgba(121, 60, 41, .55), rgba(31, 44, 31, .62)); border: 1px solid rgba(227, 192, 121, .16); }
.mail-icon.notice { background: rgba(60, 76, 55, .45); }
.mail-icon.event { background: rgba(98, 52, 53, .5); }
.mail-info { min-width: 0; flex: 1; }
.mail-info b { font-size: 10.5px; color: #e2d6be; font-weight: 500; }
.mail-info p { font-size: 9px; line-height: 1.7; color: #928b7c; margin-top: 3px; }
.mail-info small { font-size: 7.5px; color: #6d685c; display: block; margin-top: 4px; }
.mail-claim { flex: 0 0 auto; min-width: 46px; height: 24px; border-radius: 12px; font-size: 8px; color: #4b2d0c; background: linear-gradient(180deg, #f4dc9f, #d4a94e); border: 1px solid rgba(255, 240, 191, .55); font-weight: 700; }
.mail-claim.claimed { background: rgba(255, 255, 255, .05); color: #777264; border-color: rgba(255, 255, 255, .1); font-weight: 400; }

/* =========================================================
   Arena / activity / support / friend room
   ========================================================= */
.arena-banner { display: flex; align-items: center; gap: 16px; border-radius: 10px; background: linear-gradient(110deg, rgba(91, 55, 30, .55), rgba(32, 61, 46, .35)); border: 1px solid rgba(231, 195, 123, .2); padding: 15px; position: relative; overflow: hidden; }
.arena-banner::after { content: ""; position: absolute; right: 20px; top: -70px; width: 180px; height: 180px; border: 1px solid rgba(234, 200, 131, .1); border-radius: 50%; box-shadow: 0 0 0 20px rgba(234, 200, 131, .025); }
.arena-cup { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 27px; background: radial-gradient(circle, rgba(214, 175, 92, .25), rgba(77, 59, 26, .18)); border: 1px solid rgba(235, 198, 127, .28); filter: sepia(.25); }
.arena-banner h4 { font-family: var(--font-kai); font-size: 24px; color: #f2dfb8; letter-spacing: 1px; }
.arena-banner p { font-size: 9px; color: #9f957f; margin-top: 5px; }
.arena-steps { display: flex; align-items: center; justify-content: center; gap: 13px; margin: 20px 0 17px; }
.arena-steps > div { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 100px; }
.arena-steps b { font-family: "Georgia", serif; font-size: 25px; font-style: italic; color: rgba(235, 202, 137, .45); }
.arena-steps span { font-size: 10px; color: #e1d3b7; }
.arena-steps small { font-size: 7.5px; color: #817b6c; }
.arena-steps > i { width: 30px; height: 1px; background: linear-gradient(90deg, rgba(230, 192, 121, .12), rgba(230, 192, 121, .35), rgba(230, 192, 121, .12)); }
.arena-prize { display: flex; align-items: baseline; justify-content: center; gap: 8px; border-radius: 8px; background: rgba(0, 0, 0, .15); border: 1px solid rgba(226, 191, 122, .08); padding: 12px; }
.arena-prize span { font-size: 9px; color: #9b907b; }
.arena-prize b { font-family: "Georgia", serif; font-size: 21px; color: #f0ce85; }
.arena-prize small { font-size: 8px; color: #8a8272; }
.arena-actions { display: flex; justify-content: center; gap: 10px; margin-top: 15px; }
.arena-actions .gold-btn { min-height: 36px; padding: 0 30px; }
.event-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.event-card { border-radius: 9px; border: 1px solid rgba(225, 190, 122, .13); padding: 11px; position: relative; min-height: 175px; display: flex; flex-direction: column; overflow: hidden; }
.event-card.red { background: linear-gradient(165deg, rgba(114, 44, 38, .38), rgba(28, 49, 40, .26)); }
.event-card.gold { background: linear-gradient(165deg, rgba(103, 77, 33, .32), rgba(28, 49, 40, .26)); }
.event-card.green { background: linear-gradient(165deg, rgba(32, 89, 70, .38), rgba(28, 49, 40, .26)); }
.event-tag { font-size: 7px; color: #dbc492; border: 1px solid rgba(229, 194, 124, .2); border-radius: 3px; padding: 2px 4px; align-self: flex-start; }
.event-art { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 23px; color: #f2d89d; border: 1px solid rgba(233, 198, 127, .25); background: rgba(255, 255, 255, .04); margin: 11px 0 8px; }
.event-card h4 { font-size: 11px; color: #eaddc3; }
.event-card p { font-size: 8.5px; line-height: 1.7; color: #8e8878; margin-top: 5px; }
.event-btn { margin-top: auto; align-self: flex-start; min-height: 24px; border-radius: 12px; padding: 0 11px; font-size: 8px; color: #e5c98d; border: 1px solid rgba(229, 195, 126, .22); background: rgba(255, 255, 255, .035); }
.event-btn:hover { background: rgba(229, 195, 126, .09); }
.friend-room-intro { display: flex; align-items: center; gap: 13px; }
.friend-room-seal { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-kai); color: #efd79f; font-size: 20px; background: radial-gradient(circle at 35% 30%, rgba(63, 117, 91, .8), rgba(15, 45, 35, .9)); border: 1px solid rgba(229, 196, 128, .25); }
.friend-room-intro h4 { font-size: 17px; color: #f0e1c1; margin-top: 4px; }
.friend-room-intro p { font-size: 9px; color: #8e8778; margin-top: 4px; line-height: 1.7; }
.friend-game-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 16px 0 12px; }
.friend-game { display: flex; flex-direction: column; align-items: center; gap: 3px; border-radius: 8px; border: 1px solid rgba(225, 190, 122, .12); background: rgba(255, 255, 255, .02); padding: 10px 5px; transition: .2s; }
.friend-game:hover { border-color: rgba(229, 195, 126, .28); }
.friend-game.active { border-color: rgba(238, 201, 130, .5); background: rgba(218, 176, 91, .08); }
.friend-game-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-kai); font-size: 14px; color: #f1d79f; border: 1px solid rgba(228, 193, 124, .2); background: rgba(255, 255, 255, .04); }
.friend-game b { font-size: 10px; color: #e2d4ba; font-weight: 500; }
.friend-game small { font-size: 7.5px; color: #7f796a; }
.friend-code-box { text-align: center; border-radius: 9px; border: 1px dashed rgba(228, 193, 124, .22); background: rgba(0, 0, 0, .12); padding: 12px; }
.friend-code-box span { font-size: 8px; color: #8e8572; display: block; }
.friend-code-box b { display: block; font-family: "Georgia", serif; font-size: 26px; color: #f3dca5; letter-spacing: 3px; margin: 3px 0; }
.friend-code-box small { font-size: 7.5px; color: #6e695c; }
.friend-room-actions { display: flex; justify-content: center; gap: 10px; margin-top: 13px; }
.friend-room-actions .ghost-btn, .friend-room-actions .gold-btn { min-height: 36px; font-size: 10px; padding: 0 20px; }
.support-intro { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid rgba(225, 191, 122, .1); }
.support-mark { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-kai); font-size: 19px; color: #efd69d; background: radial-gradient(circle at 35% 30%, rgba(64, 114, 89, .8), rgba(14, 45, 35, .9)); border: 1px solid rgba(229, 196, 128, .24); }
.support-intro h4 { font-size: 15px; color: #eaddc2; }
.support-intro p { font-size: 9px; line-height: 1.7; color: #8d8677; margin-top: 4px; }
.support-list { display: flex; flex-direction: column; gap: 0; }
.faq-item { padding: 11px 0; border-bottom: 1px dashed rgba(225, 191, 122, .09); }
.faq-item b { font-size: 10px; color: #dbcdb3; font-weight: 500; }
.faq-item p { font-size: 9px; line-height: 1.8; color: #8e8879; margin-top: 4px; }
.support-contact { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.support-contact span { font-size: 8px; color: #8a8272; }
.support-contact b { font-size: 10px; color: #e1c98f; font-weight: 500; }
.support-contact em { font-style: normal; font-size: 7px; color: #6e685b; margin-left: auto; }

/* =========================================================
   Game intro
   ========================================================= */
.modal.game-intro-modal { width: min(880px, calc(100vw - 32px)); }
.game-intro-modal .modal-head { padding-top: 18px; padding-bottom: 13px; }
.game-intro-modal .modal-head h3 { font-size: 23px; }
.game-intro-modal .modal-body { padding: 0; overflow: hidden; }
.game-intro { display: grid; grid-template-columns: 37% minmax(0, 1fr); max-height: calc(100vh - 190px); }
.intro-hero { position: relative; min-height: 480px; padding: 27px 24px; overflow: hidden; background: radial-gradient(ellipse at 65% 40%, rgba(234, 190, 97, .18), transparent 55%), linear-gradient(155deg, #1c6048, #0b3227 52%, #071f1a); }
.game-intro.theme-wushi .intro-hero { background: radial-gradient(ellipse at 65% 40%, rgba(228, 150, 76, .2), transparent 55%), linear-gradient(155deg, #682c2b, #3b181b 52%, #1d0f12); }
.game-intro.theme-mahjong .intro-hero { background: radial-gradient(ellipse at 65% 40%, rgba(91, 198, 160, .16), transparent 55%), linear-gradient(155deg, #1d5c4a, #0c3129 52%, #061e1a); }
.intro-hero-bg { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(45deg, rgba(240, 202, 128, .15) 1px, transparent 1px), linear-gradient(-45deg, rgba(240, 202, 128, .12) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(ellipse at 40% 45%, #000 10%, transparent 78%); }
.intro-hero::before { content: ""; position: absolute; width: 380px; height: 380px; border: 1px solid rgba(239, 202, 130, .12); border-radius: 50%; left: -130px; top: 70px; box-shadow: 0 0 0 22px rgba(239, 202, 130, .025), 0 0 0 55px rgba(239, 202, 130, .018); }
.intro-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3, 20, 16, .72), transparent 40%); pointer-events: none; }
.intro-seal { position: absolute; z-index: 3; top: 18px; right: 21px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-kai); font-size: 10px; color: #f5dab1; background: rgba(139, 36, 29, .8); border: 1px solid rgba(245, 212, 147, .42); transform: rotate(8deg); }
.theme-wushi .intro-seal { background: rgba(91, 28, 26, .85); }
.theme-mahjong .intro-seal { background: rgba(26, 91, 71, .86); }
.intro-en { position: absolute; z-index: 3; top: 21px; left: 25px; font-size: 7px; letter-spacing: 2px; color: rgba(246, 225, 179, .48); }
.intro-title { position: relative; z-index: 3; margin-top: 30px; display: flex; align-items: center; gap: 9px; }
.intro-title > span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 21px; color: #f7dfa9; background: rgba(255, 255, 255, .05); border: 1px solid rgba(243, 210, 141, .25); }
.intro-title h4 { font-family: var(--font-display); font-size: 39px; font-weight: 400; letter-spacing: 2px; color: #fbecbf; text-shadow: 0 3px 12px rgba(0, 0, 0, .35); }
.intro-hero > p { position: relative; z-index: 3; font-size: 9px; color: rgba(240, 221, 181, .57); letter-spacing: 1px; margin-top: 6px; }
.intro-cards-host { position: absolute; z-index: 3; left: 50%; bottom: 60px; transform: translateX(-50%); }
.intro-card-row { display: flex; align-items: flex-end; justify-content: center; height: 100px; }
.intro-card-row .pcard { box-shadow: 0 12px 22px rgba(0, 0, 0, .4); }
.intro-online { position: absolute; z-index: 3; bottom: 24px; left: 25px; font-size: 8px; color: rgba(240, 221, 181, .48); display: flex; align-items: center; gap: 5px; }
.intro-online i { width: 4px; height: 4px; background: #74dbaf; border-radius: 50%; }
.intro-mj-tile { width: 50px; height: 68px; border-radius: 5px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: linear-gradient(150deg, #fffdf6, #efe5cf 75%, #cfc0a2); border: 1px solid #cdbb96; box-shadow: 0 10px 18px rgba(0, 0, 0, .4); margin-left: -8px; transform: rotate(var(--r, 0deg)); }
.intro-mj-tile:first-child { margin-left: 0; transform: rotate(-8deg); }
.intro-mj-tile:nth-child(2) { transform: rotate(-3deg) translateY(4px); }
.intro-mj-tile:nth-child(3) { transform: rotate(3deg) translateY(-3px); }
.intro-mj-tile:nth-child(4) { transform: rotate(9deg); }
.intro-mj-tile b { font-family: var(--font-kai); font-size: 23px; color: #9d2d26; line-height: 1; }
.intro-mj-tile span { font-family: var(--font-kai); font-size: 10px; color: #9d2d26; }
.intro-mj-tile.dragon { width: 56px; height: 76px; z-index: 2; border-color: #d2a75c; box-shadow: 0 0 30px rgba(194, 55, 40, .3), 0 12px 22px rgba(0, 0, 0, .4); }
.intro-mj-tile.dragon b { font-size: 34px; color: #b72b25; }
.intro-mj-tile.dragon i { position: absolute; bottom: 6px; font-style: normal; font-size: 6px; color: #b84a3d; letter-spacing: 2px; }
.intro-main { padding: 20px 25px 18px; overflow: auto; background: linear-gradient(180deg, rgba(6, 33, 27, .3), rgba(4, 26, 21, .55)); }
.intro-desc { font-size: 10px; line-height: 1.9; color: #a9a08d; }
.intro-stats { display: flex; gap: 4px; margin-top: 12px; }
.intro-stats > div { flex: 1; border-radius: 6px; background: rgba(255, 255, 255, .025); border: 1px solid rgba(226, 193, 124, .09); padding: 7px 8px; display: flex; flex-direction: column; gap: 2px; }
.intro-stats span { font-size: 7.5px; color: #7f796b; }
.intro-stats b { font-size: 10px; color: #e6d4ad; font-weight: 500; }
.intro-section-label { display: flex; align-items: baseline; gap: 8px; margin: 15px 0 7px; }
.intro-section-label span { font-size: 11px; color: #e1d3b7; }
.intro-section-label small { font-size: 7.5px; color: #756f62; }
.room-list { display: flex; flex-direction: column; gap: 5px; }
.room-card { position: relative; display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 4px 8px; padding: 8px 10px; min-height: 43px; border-radius: 7px; text-align: left; background: rgba(255, 255, 255, .02); border: 1px solid rgba(225, 191, 122, .09); transition: .2s; }
.room-card:hover { border-color: rgba(230, 197, 128, .28); }
.room-card.active { border-color: rgba(240, 203, 129, .48); background: linear-gradient(90deg, rgba(204, 164, 84, .1), rgba(255, 255, 255, .02)); }
.room-card-check { position: absolute; right: 8px; top: 8px; width: 12px; height: 12px; border-radius: 50%; display: none; place-items: center; font-size: 7px; color: #4e300b; background: #e7c472; }
.room-card.active .room-card-check { display: grid; }
.room-card > b { font-size: 10.5px; color: #e8dac0; font-weight: 500; }
.room-card .room-base { font-size: 8px; color: #8c8370; grid-column: 2; grid-row: 1; }
.room-card .room-base strong { color: #e1bf7d; font-weight: 600; font-family: "Georgia", serif; }
.room-card small { grid-column: 1 / span 2; grid-row: 2; font-size: 7.5px; color: #756f62; }
.room-card em { grid-column: 3; grid-row: 1; font-style: normal; font-size: 7px; color: #b8a273; border: 1px solid rgba(224, 188, 115, .16); padding: 2px 5px; border-radius: 3px; align-self: start; }
.intro-start-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(225, 191, 122, .1); }
.intro-selected { display: flex; flex-direction: column; gap: 3px; }
.intro-selected span { font-size: 7.5px; color: #7e786b; }
.intro-selected b { font-size: 10px; color: #e5c98e; font-weight: 500; }
.intro-start-btn { min-height: 36px; padding: 0 22px; font-size: 11px; }
.intro-start-btn svg { width: 12px; height: 12px; }
.intro-links { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.intro-links .chip-btn { flex: 0 0 auto; min-height: 25px; font-size: 8px; }
.intro-tip { font-size: 7.5px; line-height: 1.6; color: #797465; }
@media (max-width: 760px) {
  .game-intro { grid-template-columns: 1fr; max-height: calc(100vh - 155px); overflow: auto; }
  .intro-hero { min-height: 210px; padding: 20px; }
  .intro-hero::before { left: auto; right: -100px; top: -100px; }
  .intro-title { margin-top: 20px; }
  .intro-title h4 { font-size: 35px; }
  .intro-cards-host { left: auto; right: 18px; bottom: 35px; transform: scale(.8); transform-origin: right bottom; }
  .intro-online { bottom: 14px; left: 20px; }
  .intro-main { max-height: none; padding: 16px 18px; }
  .intro-stats > div:nth-child(3) { display: none; }
  .intro-start-row { position: sticky; bottom: 0; background: #082c23; padding: 10px 0; margin-bottom: -18px; }
}
@media (max-width: 560px) {
  .checkin-hero { align-items: flex-start; }
  .checkin-moon { width: 46px; height: 46px; font-size: 25px; }
  .checkin-hero h4 { font-size: 16px; }
  .checkin-hero p { font-size: 9px; }
  .checkin-days-label { display: none; }
  .sign-days { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .sign-day { min-height: 82px; }
  .sign-day:nth-child(7) { grid-column: span 2; }
  .checkin-bottom { flex-direction: column; align-items: stretch; }
  .checkin-bottom .gold-btn { width: 100%; }
  .modal-task-row {
    position: relative;
    grid-template-columns: 27px minmax(0, 1fr);
    padding-right: 64px;
  }
  .modal-task-reward {
    display: flex;
    position: absolute;
    top: 8px;
    right: 7px;
    font-size: 8px;
    line-height: 1.2;
  }
  .modal-task-row .task-claim {
    position: absolute;
    right: 6px;
    bottom: 8px;
  }
  .stat-cards { grid-template-columns: 1fr; }
  .event-cards { grid-template-columns: 1fr; }
  .arena-steps { gap: 4px; }
  .arena-steps > div { min-width: 0; flex: 1; }
  .arena-steps > i { width: 10px; }
  .arena-steps small { text-align: center; }
  .friend-game-row { gap: 4px; }
  .modal.game-intro-modal { width: calc(100vw - 16px); }
  .game-intro-modal .modal-head h3 { font-size: 19px; }
  .game-intro-modal .modal-head { padding-left: 16px; padding-right: 16px; }
  .intro-desc { font-size: 9.5px; }
  .intro-tip { display: none; }
  .intro-start-btn { min-height: 34px; }
}

/* =========================================================
   Short landscape phones · dialogs
   ========================================================= */
@media (max-height: 560px) and (orientation: landscape) {
  .modal-root { align-items: center; padding: 6px 0; overflow-y: auto; }
  .modal {
    max-height: calc(100dvh - 12px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .modal-body { flex: 0 0 auto; overflow: visible; overscroll-behavior: contain; }
  .modal-head {
    position: sticky;
    top: 0;
    z-index: 6;
    background: linear-gradient(180deg, #0d3529, #0a2c22);
  }
  .modal-actions { position: sticky; bottom: 0; z-index: 6; background: #0a2c22; }
  .game-intro-modal { overflow: hidden; }
  .game-intro-modal .modal-head {
    position: relative;
    padding: 8px 16px 7px;
  }
  .game-intro-modal .modal-head h3 { font-size: 20px; }
  .game-intro-modal .modal-kicker { font-size: 6px; margin-bottom: 3px; }
  .game-intro-modal .modal-close { width: 33px; height: 33px; }
  .game-intro-modal .modal-close svg { width: 14px; height: 14px; }
  .game-intro-modal .modal-body { overflow: hidden; }
  .game-intro { grid-template-columns: 230px minmax(0, 1fr); max-height: none; }
  .intro-hero { min-height: 0; padding: 12px 15px; }
  .intro-hero::before { width: 260px; height: 260px; left: -120px; top: 35px; }
  .intro-seal { top: 10px; right: 12px; width: 28px; height: 28px; font-size: 8px; }
  .intro-en { top: 12px; left: 16px; font-size: 5.5px; }
  .intro-title { margin-top: 14px; gap: 6px; }
  .intro-title h4 { font-size: 29px; }
  .intro-title > span { width: 30px; height: 30px; font-size: 15px; }
  .intro-hero > p { font-size: 6.5px; margin-top: 3px; }
  .intro-cards-host { display: none; }
  .intro-online { bottom: 10px; left: 16px; font-size: 6px; }
  .intro-main { padding: 9px 14px 10px; }
  .intro-desc { display: none; }
  .intro-stats { margin-top: 0; gap: 4px; }
  .intro-stats > div { padding: 4px 7px; }
  .intro-stats span { font-size: 6.5px; }
  .intro-stats b { font-size: 9px; }
  .intro-section-label { margin-top: 6px; margin-bottom: 5px; }
  .intro-section-label span { font-size: 8px; }
  .intro-section-label small { display: none; }
  .room-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .room-card { min-height: 53px; padding: 5px 7px; }
  .room-card b { font-size: 10px; }
  .room-card .room-base { font-size: 7px; margin-top: 2px; }
  .room-card small { display: none; }
  .room-card > em { top: 4px; right: 4px; font-size: 5.5px; padding: 1px 3px; }
  .intro-start-row { margin-top: 7px; padding-top: 7px; }
  .intro-selected span { font-size: 6px; }
  .intro-selected b { font-size: 8px; }
  .intro-start-btn { min-height: 32px; padding: 0 18px; font-size: 10px; }
  .intro-links { display: none; }
  .checkin-body { overscroll-behavior: contain; }
}
