/* Local interactions are scoped so the captured reference layout stays intact. */
.replica-message { margin-top: 14px; padding: 11px 14px; border-radius: 8px; color: #f7c886; background: #302115; border: 1px solid #654323; font-size: 13px; line-height: 1.6; }
.replica-message[data-kind="error"] { color: #ffb0b5; background: #311b21; border-color: #63303b; }
.replica-message[data-kind="success"] { color: #a1e3be; background: #142c23; border-color: #2c5f46; }
.replica-toast { position: fixed; right: 20px; bottom: 22px; max-width: min(390px, calc(100vw - 40px)); padding: 15px 18px; background: #17212e; border: 1px solid #344456; border-left: 3px solid #f7a23c; color: #f3f5f9; box-shadow: 0 8px 30px #0006; border-radius: 10px; z-index: 15000; font-size: 13px; line-height: 1.6; }
.replica-account-wrap { position: relative; list-style: none; }
.replica-account-button { white-space: nowrap; display: flex !important; align-items: center; gap: 7px; }
.replica-account-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 238px; background: #101923; color: #e7edf4; border: 1px solid #2a3543; padding: 8px; border-radius: 11px; box-shadow: 0 12px 35px #0006; z-index: 1100; }
.replica-account-menu[hidden], .replica-message[hidden], .replica-filter-empty[hidden] { display: none !important; }
.replica-account-menu a, .replica-account-menu button, .replica-account-balance { display: block; width: 100%; padding: 10px 12px; text-align: left; border: 0; background: transparent; color: #c7d1df; text-decoration: none; font-size: 13px; border-radius: 6px; }
.replica-account-menu a:hover, .replica-account-menu button:hover { color: #ffb65d; background: #1d2938; }
.replica-account-balance { color: #ffb65d; font-weight: 700; }
.replica-dialog { width: min(440px, calc(100% - 32px)); color: #e9edf4; background: #101923; border: 1px solid #334152; border-radius: 15px; padding: 25px; box-shadow: 0 15px 70px #0009; }
.replica-dialog::backdrop { background: #000a; }
.replica-dialog h3 { font-size: 19px; margin: 0 0 13px; font-weight: 700; color: #fff; }
.replica-dialog p { margin: 0 0 22px; color: #aab7c9; font-size: 14px; line-height: 1.8; }
.replica-dialog .replica-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
.replica-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 9px 17px; background: #f7a23c; color: #161b23 !important; border: 1px solid #f7a23c; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; }
.replica-button:hover { background: #ffb55a; }
.replica-button-secondary { background: #1b2736; border-color: #344256; color: #dce4ef !important; }
.replica-button-secondary:hover { background: #243346; }
.replica-button:disabled, [data-replica-busy] { opacity: .65; cursor: progress; }
.replica-page { max-width: 1120px; margin: 28px auto 52px; padding: 0 24px; min-height: 52vh; }
.replica-page h1 { font-size: 25px; color: #f5f7fa; margin: 0 0 9px; font-weight: 700; }
.replica-page-lead { color: #95a4b7; margin: 0 0 25px; font-size: 13px; line-height: 1.8; }
.replica-panel { background: #101923; border: 1px solid #243142; padding: 24px; border-radius: 12px; margin-bottom: 18px; }
.replica-panel h2 { font-size: 17px; margin: 0 0 18px; color: #e7edf4; }
.replica-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 23px; }
.replica-tabs a { color: #a9b7c9; padding: 9px 14px; background: #131e2a; border: 1px solid #243142; border-radius: 8px; text-decoration: none; font-size: 13px; }
.replica-tabs a[aria-current="page"] { color: #ffb75e; background: #30251c; border-color: #815429; }
.replica-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.replica-field { display: block; margin-bottom: 17px; color: #bac6d5; font-size: 13px; }
.replica-field input, .replica-field textarea, .replica-field select { display: block; width: 100%; background: #0a111a; color: #e6edf5; border: 1px solid #2b3a4d; padding: 12px 14px; margin-top: 8px; border-radius: 8px; font: inherit; }
.replica-field input:focus, .replica-field textarea:focus { border-color: #d38b3d; outline: 2px solid #f7a23c26; }
.replica-stat { font-size: 28px; color: #ffb252; font-weight: 700; margin: 8px 0; }
.replica-empty { padding: 38px 18px; text-align: center; color: #94a4b9; font-size: 13px; }
.replica-empty i { font-size: 29px; display: block; margin-bottom: 15px; color: #61748c; }
.replica-filter-empty { color: #a8b6c8; background: #111b27; text-align: center; padding: 30px 18px; border-radius: 10px; margin: 16px 0; font-size: 13px; }
.replica-auth { max-width: 440px; margin: 45px auto; }
.replica-auth h1 { font-size: 23px; }
.replica-auth-links { display: flex; justify-content: center; gap: 7px; margin-top: 18px; font-size: 13px; color: #97a7bb; }
.replica-auth-links a { color: #f7af53; }
.replica-password-wrap { position: relative; }
.replica-password-toggle { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #97a7ba; padding: 7px; font-size: 13px; cursor: pointer; }
.replica-password-wrap input { padding-right: 62px; }
.ta-account-col[hidden], .ta-catalog-grid[hidden], .ta-filter-account [hidden], .replica-gallery-slide[hidden] { display: none !important; }
.replica-gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 33px; height: 42px; border: 1px solid #ffffff29; border-radius: 6px; background: #08101bc2; color: #fff; font-size: 26px; line-height: 1; z-index: 4; }
.replica-gallery-prev { left: 8px; }
.replica-gallery-next { right: 8px; }
#ta-account-grid { scroll-margin-top: 120px; }
@media (max-width: 575px) {
  .replica-page { padding: 0 14px; margin-top: 22px; }
  .replica-page h1 { font-size: 21px; }
  .replica-panel { padding: 19px 16px; }
  .replica-fields { grid-template-columns: 1fr; gap: 0; }
  .replica-account-menu { min-width: 218px; }
  .replica-account-button { max-width: 150px; overflow: hidden; }
  .replica-account-button .replica-username { overflow: hidden; text-overflow: ellipsis; }
}
