/* Only page-specific styles; the original shell stylesheet remains enabled. */
/* Intrinsic badge width keeps localized statuses on the source's single line. */
[data-replica-page="ranking"] .live-badge {
  white-space: nowrap;
}
[data-replica-page="ranking"] .live-bars,
[data-replica-page="ranking"] .live-text {
  flex-shrink: 0;
}
@media (min-width: 769px) {
  [data-replica-page="ranking"] .live-badge {
    width: max-content;
    max-width: none;
  }
}
.replica-faq-page{padding:24px 32px 80px;box-sizing:border-box;color:#eee}.replica-faq-page .board-title{font-size:28px;line-height:1.4;margin:0 0 34px}.replica-faq-page .board-tab{list-style:none;margin:0 0 38px;padding:0}.replica-faq-page .board-tab a{color:#eee;text-decoration:none;font-size:17px}.replica-faq-content{width:100%}.replica-faq-categories{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #444;border-radius:8px;overflow:hidden}.replica-faq-categories button{min-height:48px;border:0;border-right:1px solid #444;background:#292929;color:#888;font:inherit;font-size:15px;cursor:pointer}.replica-faq-categories button:last-child{border-right:0}.replica-faq-categories button.on{background:#181818;color:#eee}.replica-faq-search{display:flex;width:214px;height:43px;margin:30px 0 15px;border:1px solid #444;border-radius:5px;background:#292929}.replica-faq-search input{min-width:0;flex:1;border:0;background:transparent;color:#eee;padding:0 15px;font:inherit}.replica-faq-search button{width:44px;border:0;background:transparent;color:#aaa;display:grid;place-items:center;cursor:pointer}.replica-faq-search svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7}.replica-faq-list{list-style:none;margin:0;padding:0;border-top:2px solid #444}.replica-faq-list>li{border-bottom:1px solid #3b3b3b}.replica-faq-question{display:flex;align-items:center;gap:10px;width:100%;min-height:75px;padding:14px 4px;border:0;background:transparent;color:#eee;text-align:left;font:inherit;cursor:pointer}.replica-faq-question span,.replica-faq-answer>span{flex:0 0 auto;border-radius:12px;background:#00c972;color:#fff;padding:3px 8px;font-size:12px;font-weight:700}.replica-faq-question strong{font-size:17px;font-weight:500}.replica-faq-question i{position:relative;width:10px;height:10px;margin-left:auto;margin-right:5px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg);transition:transform .18s}.replica-faq-question[aria-expanded=true] i{transform:rotate(225deg)}.replica-faq-answer{display:flex;align-items:flex-start;gap:13px;padding:20px 14px 24px;background:#191919;color:#ccc;line-height:1.8}.replica-faq-answer[hidden]{display:none}.replica-faq-answer>span{background:#f2507e}.replica-faq-answer p{margin:0;white-space:pre-wrap}.replica-faq-empty{padding:34px;text-align:center;color:#888}

/* The target template uses a clean white surface.  Keep every replica page
   readable when the shared black/white switch is set to white. */
body.light-mode [data-replica-page],
body.light-mode [data-replica-page] #contents,
body.light-mode [data-replica-page] .content-body,
body.light-mode [data-replica-page] .section-wrap,
body.light-mode [data-replica-page] .section-inner,
body.light-mode [data-replica-page] .ui.segment {
  background: #fff !important;
  color: #222 !important;
}
body.light-mode [data-replica-page] h1,
body.light-mode [data-replica-page] h2,
body.light-mode [data-replica-page] h3,
body.light-mode [data-replica-page] .title a,
body.light-mode [data-replica-page] .chat-card-title,
body.light-mode [data-replica-page] .chat-card-user-name,
body.light-mode [data-replica-page] .chat-card-user-meta,
body.light-mode [data-replica-page] .popular-item-card,
body.light-mode [data-replica-page] .data-card-value,
body.light-mode [data-replica-page] .board-search,
body.light-mode [data-replica-page] .con,
body.light-mode [data-replica-page] .board-view-con {
  color: #222 !important;
}
body.light-mode [data-replica-page] .chat-card,
body.light-mode [data-replica-page] .popular-item,
body.light-mode [data-replica-page] .data-card,
body.light-mode [data-replica-page] .flex-con > ul > li,
body.light-mode [data-replica-page] .board-view,
body.light-mode [data-replica-page] .board-view-con {
  background: #fff !important;
  border-color: #e5e5e5 !important;
  box-shadow: 0 4px 18px rgba(30, 35, 45, .08);
}
body.light-mode [data-replica-page] input,
body.light-mode [data-replica-page] textarea,
body.light-mode [data-replica-page] select {
  background: #fff !important;
  color: #222 !important;
  border-color: #e5e5e5 !important;
}
body.light-mode [data-replica-page] .flex-pay,
body.light-mode [data-replica-page] .flex-pay-con,
body.light-mode [data-replica-page] .flex-pay-input-wrapper,
body.light-mode [data-replica-page] .flex-pay-input-row { color: #222 !important; }
body.light-mode [data-replica-page] .flex-pay { background: linear-gradient(135deg,#fff 0%,#fff5f8 52%,#f2f4ff 100%) !important; border-color:#e5e5e5 !important; }
body.light-mode [data-replica-page] .flex-pay-title,
body.light-mode [data-replica-page] .flex-pay-subtitle,
body.light-mode [data-replica-page] .flex-pay-label { color:#222 !important; }
body.light-mode [data-replica-page] .flex-pay-label svg { fill:#444 !important; }
body.light-mode [data-replica-page] .flex-pay-input { background:#fff !important; color:#222 !important; border-color:#d9dce3 !important; }
body.light-mode [data-replica-page] .flex-con > ul > li { background:#fff !important; color:#222 !important; border-color:#e5e5e5 !important; }

.chat-card-full {
    opacity: 0.7;
    position: relative;
}

/* The ranking theme still defines a legacy remote background for this link.
   The header already contains the local search icon image. */
body.replica-mobile .header1-right .btn-search {
  background-image: none !important;
}

.chat-card-full::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.02);
    pointer-events: none;
}

.chat-card-full-badge {
    color: #ff4757;
    font-weight: bold;
}

.full-indicator {
    color: #ff4757;
    font-size: 12px;
    margin-left: 4px;
}

.chat-card-button-disabled {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.chat-card-button-disabled:hover {
    background: #95a5a6 !important;
    transform: none !important;
}

/* Keep room avatars compact on phones.  The legacy template lets a fallback
   logo stretch to the full card width when a room has no custom image. */
[data-replica-page="chatlist"] .chat-card-avatar {
    width: 84px !important;
    height: 84px !important;
    flex: 0 0 84px !important;
    overflow: hidden;
    border-radius: 12px;
}

[data-replica-page="chatlist"] .chat-card-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.vip-room-icon {
    animation: vipPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(245, 87, 108, 0.4));
}

@keyframes vipPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.08);
    }
}


.current-chat-room {
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.current-chat-room-header {
    margin-bottom: 10px;
}

.current-chat-room-label {
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.current-chat-room-label::before {
    content: '💬';
    font-size: 16px;
}

.current-room-card {
    background: white;
    border: 1px solid #dee2e6;
}

.current-room-badge {
    display: inline-block;
    background: #e7f3ff;
    color: #0066cc;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    border: 1px solid #b3d9ff;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Dark Mode Styles */
body.dark-mode .current-chat-room {
    background: #2c3035;
    border-color: #41474e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-mode .current-chat-room-label {
    color: #e0e0e0;
}

body.dark-mode .current-room-card {
    background: #1a1a1a !important;
    border-color: #41474e !important;
}

body.dark-mode .current-room-badge {
    background: #1a3d5c;
    color: #4da3ff;
    border-color: #2a5a7a;
}

body.dark-mode .chat-card {
    background: #2c3035;
    border-color: #41474e;
}

body.dark-mode .chat-card-content {
    color: #e0e0e0;
}

body.dark-mode .chat-card-title {
    color: #e0e0e0;
}

body.dark-mode .chat-card-user-name {
    color: #c0c0c0;
}

body.dark-mode .chat-card-user-meta {
    color: #a0a0a0;
}
/* Expanded notice text and local empty states follow the source list geometry. */
[data-replica-page] .replica-page-empty { padding: 40px 20px; text-align: center; color: #999; }
[data-replica-page] .replica-notice-body { display: block; width: 100%; padding: 24px; white-space: pre-wrap; line-height: 1.8; background: #1a1a1a; border-bottom: 1px solid #333; }
[data-replica-page] .replica-notice-body[hidden], [data-replica-page] [hidden] { display: none !important; }
[data-replica-page] .flex-popup .close[role="button"] { cursor: pointer; }
[data-replica-page] .flex-popup button:disabled { opacity: .6; cursor: wait; }
[data-replica-page] .replica-product-symbol { display: flex; align-items: center; justify-content: center; height: 100px; font-size: 64px; line-height: 1; }

/* The desktop shop template is reused inside the customer's mobile shell.
   Keep its controls fluid at phone widths instead of inheriting the source
   desktop icon sizing (which can create a 1,000px horizontal scroll). */
@media (max-width: 768px) {
  .replica-faq-page{padding:36px 16px 90px!important}.replica-faq-page .board-title{font-size:27px;margin-bottom:30px}.replica-faq-page .board-tab{margin-bottom:28px}.replica-faq-categories{grid-template-columns:repeat(2,1fr)}.replica-faq-categories button{min-height:44px;border-bottom:1px solid #444}.replica-faq-categories button:nth-child(2){border-right:0}.replica-faq-categories button:nth-child(n+3){border-bottom:0}.replica-faq-search{width:100%;height:46px;margin-top:24px}.replica-faq-question{min-height:68px;padding:13px 0}.replica-faq-question strong{font-size:15px;line-height:1.5}.replica-faq-question i{margin-right:7px}.replica-faq-answer{padding:18px 10px;line-height:1.7}
  [data-replica-page] { min-width: 0; overflow-x: clip; }

  /* Ranking: the source desktop markup has fixed 20% columns and 150px
     portraits. Present the same cards as a touch-scroll rail on phones. */
  [data-replica-page="ranking"] .top-rank-section,
  [data-replica-page="ranking"] .rank-table-section { padding-left: 0; padding-right: 0; }
  [data-replica-page="ranking"] .section-inner { min-width: 0; padding-left: 12px; padding-right: 12px; }
  [data-replica-page="ranking"] .video-section-root { overflow-x: auto !important; overflow-y: hidden !important; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: thin; }
  [data-replica-page="ranking"] .grid-container { display: flex !important; width: max-content; min-width: 100%; gap: 10px; padding: 2px 2px 12px; }
  [data-replica-page="ranking"] .popular-list-item { flex: 0 0 148px !important; width: 148px !important; max-width: 148px !important; scroll-snap-align: start; }
  [data-replica-page="ranking"] .popular-list-item .popular-item { min-width: 0 !important; margin: 0 !important; padding: 16px 12px !important; }
  [data-replica-page="ranking"] .popular-list-item img.ui.image { width: 104px !important; height: 104px !important; margin-bottom: 10px; }
  [data-replica-page="ranking"] .popular-item-card { min-height: 38px; font-size: 13px; line-height: 1.45; }
  [data-replica-page="ranking"] .popular-item-info { font-size: 12px; }
  [data-replica-page="ranking"] .rank-table-wrapper { width: 100%; overflow: hidden; }
  [data-replica-page="ranking"] .flx-table { width: 100% !important; min-width: 0 !important; table-layout: fixed; }
  [data-replica-page="ranking"] .flx-table col:nth-child(1) { width: 34px !important; }
  [data-replica-page="ranking"] .flx-table col:nth-child(2) { width: auto !important; }
  [data-replica-page="ranking"] .flx-table col:nth-child(3),
  [data-replica-page="ranking"] .flx-table col:nth-child(4) { width: 48px !important; }
  [data-replica-page="ranking"] .flx-table th { padding: 12px 3px !important; font-size: 11px; word-break: keep-all; }
  [data-replica-page="ranking"] .flx-table td { padding: 10px 3px !important; min-width: 0; }
  [data-replica-page="ranking"] .ranking-number { font-size: 18px; }
  [data-replica-page="ranking"] .rank-avatar-wrapper { display: flex; align-items: center; gap: 8px; min-width: 0; }
  [data-replica-page="ranking"] .rank-avatar-wrapper .live-avatar-wrapper { width: 50px; min-width: 50px; }
  [data-replica-page="ranking"] .rank-avatar-wrapper img.ui.image { width: 50px !important; height: 50px !important; }
  [data-replica-page="ranking"] .rank-avatar-info { min-width: 0; text-align: left; }
  [data-replica-page="ranking"] .rank-avatar-title,
  [data-replica-page="ranking"] .rank-avatar-subtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
  [data-replica-page="ranking"] .data-card { width: 42px !important; min-width: 42px !important; padding: 7px 2px !important; box-sizing: border-box; }
  [data-replica-page="ranking"] .data-card-icon img { width: 16px !important; height: 16px !important; }
  [data-replica-page="ranking"] .data-card-value { font-size: 11px; }

  [data-replica-page="shop"] { padding: 0 10px 20px !important; }
  [data-replica-page="shop"] .my-tab1-con { margin-top: 30px !important; }
  [data-replica-page="shop"] .flex-pay { width: 100%; height: auto; box-sizing: border-box; padding: 25px 20px; margin: 0 0 30px; border: 0 !important; border-radius: 15px; background: linear-gradient(135deg,#667eea 0%,#764ba2 100%) !important; box-shadow: 0 8px 25px rgba(102,126,234,.3); color: #fff; }
  [data-replica-page="shop"] .flex-pay-header { width: 100%; height: auto; margin: 0 0 10px; text-align: center; }
  [data-replica-page="shop"] .flex-pay-avatar { width: 60px; height: 60px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: rgba(255,255,255,.15); box-shadow: 0 4px 15px rgba(0,0,0,.2); }
  [data-replica-page="shop"] .flex-pay-avatar img { width: 72px !important; height: 72px !important; max-width: none; object-fit: cover; }
  [data-replica-page="shop"] .flex-pay-title { margin: 0 0 5px !important; color: #fff !important; font-size: 18px !important; font-weight: 600; }
  [data-replica-page="shop"] .flex-pay-subtitle { margin: 0 !important; color: rgba(255,255,255,.85) !important; }
  [data-replica-page="shop"] .flex-pay-form-group,
  [data-replica-page="shop"] .flex-pay-input-row { width: 100%; height: auto; }
  [data-replica-page="shop"] .flex-pay-input-row { display: block; }
  [data-replica-page="shop"] .flex-pay-input-wrapper { width: 100%; height: auto; margin: 0 0 15px; }
  [data-replica-page="shop"] .flex-pay-input-wrapper:first-child { margin-bottom: 5px; }
  [data-replica-page="shop"] .flex-pay-label { display: flex; align-items: center; gap: 5px; margin: 0 0 7px; color: #fff !important; white-space: nowrap; }
  [data-replica-page="shop"] .flex-pay-label svg { width: 18px !important; height: 18px !important; fill: #fff !important; }
  [data-replica-page="shop"] .flex-pay-input { width: 100% !important; height: 45px !important; min-height: 45px; box-sizing: border-box; padding: 10px 12px; border: 2px solid rgba(255,255,255,.3) !important; border-radius: 8px; background: rgba(255,255,255,.95) !important; color: #333 !important; font-size: 15px; }
  [data-replica-page="shop"] .flex-pay-input[readonly] { background: rgba(255,255,255,.7) !important; color: #666 !important; }
  [data-replica-page="shop"] .flex-pay-button { width: 100% !important; height: 50px !important; margin: 0 !important; padding: 13px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0 !important; border-radius: 10px; background: #fff !important; color: #667eea !important; font-size: 16px; font-weight: 700; }
  [data-replica-page="shop"] .flex-pay-button svg { width: 18px !important; height: 18px !important; vertical-align: middle; fill: #667eea !important; }
  [data-replica-page] .flex-con,
  [data-replica-page] .flex-con > ul { width: 100%; max-width: 100%; box-sizing: border-box; }
  [data-replica-page] .flex-con > ul { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-left: 0 !important; }
  [data-replica-page] .flex-con > ul > li { float: none !important; width: auto !important; min-width: 0; box-sizing: border-box; }
  [data-replica-page] .flex-con > ul > li img { max-width: 100%; height: auto; }

  /* Keep source dialogs inside the visual viewport and make their actions
     comfortable to tap, including devices with a home indicator. */
  [data-replica-page] .flex-popup { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); box-sizing: border-box; }
  [data-replica-page] .flex-popup-con { width: min(100%, 420px) !important; max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
  [data-replica-page] .flex-popup button,
  [data-replica-page] .flex-popup a,
  [data-replica-page] .flex-con > ul > li > a { min-height: 44px; display: flex; align-items: center; justify-content: center; }

  [data-replica-page="notice"] .ul-table > ul > li { min-height: 88px; }
  [data-replica-page="notice"] .title a { display: inline-block; min-height: 36px; padding: 7px 0; line-height: 1.5; }
  [data-replica-page="notice"] .board-search { display: flex; align-items: center; gap: 10px; }
  [data-replica-page="notice"] .board-search > span { flex: none; white-space: nowrap; }
  [data-replica-page="notice"] .board-search > div { flex: 1; min-width: 0; }
  [data-replica-page="notice"] .board-search form { display: flex; width: 100%; min-width: 0; }
  [data-replica-page="notice"] .board-search input { min-width: 0; width: 100%; min-height: 44px; box-sizing: border-box; }
  [data-replica-page="notice"] .board-search .b-search { width: 44px; height: 44px; flex: none; display: grid; place-items: center; }
  [data-replica-page="notice"] .board-tab5-con .b5-b-title { color: #ddd !important; line-height: 1.6; }
  [data-replica-page="notice"] .board-tab5-con .txt { display: block !important; color: #ccc; }
  [data-replica-page="notice"] .board-tab5-con .txt > div:first-child { width: auto !important; margin: 16px 0 8px; color: #fff; font-weight: 700; }
  [data-replica-page="notice"] .board-tab5-con .txt > div:last-child { width: auto !important; }
  [data-replica-page="notice"] .board-tab5-con .txt ol { margin: 0; padding-left: 22px; }
  [data-replica-page="notice"] .board-tab5-con .txt li { margin: 5px 0; line-height: 1.55; }
  [data-replica-page="chatlist"] .chat-card-button { min-height: 44px; }
}
