:root {
  color-scheme: light;
  --ink: #15332e;
  --ink-soft: #51625b;
  --muted: #8a928a;
  --paper: #f5f3ec;
  --card: #fffefa;
  --line: #e9e7de;
  --green: #21775e;
  --green-deep: #0b302a;
  --green-pale: #edf5ef;
  --gold: #c99e4e;
  --gold-soft: #f7f0df;
  --coral: #c97f65;
  --shadow: 0 12px 32px rgb(22 45 38 / 5%);
  font-family: "Tajawal", "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgb(138 130 107 / 12%) .65px, transparent .65px);
  background-size: 14px 14px;
  font-family: inherit;
}
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #dcb95f; outline-offset: 3px; }
.app-shell { width: min(1160px, calc(100% - 56px)); margin: 0 auto; padding: 23px 0 22px; }
.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid rgb(35 57 48 / 12%); padding: 0 0 19px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark, .brand-mark img { display: block; width: 46px; height: 46px; border-radius: 15px; }
.brand-copy { display: grid; gap: 1px; }
.brand-name { font-size: 18px; font-weight: 850; letter-spacing: -.5px; }
.brand-caption { color: var(--muted); font-size: 10px; letter-spacing: .3px; }
.topbar-center { display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--muted); font-size: 12px; }
.open-indicator { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-weight: 750; }
.open-indicator i, .live-dot, .queue-pulse { width: 7px; height: 7px; border-radius: 50%; background: #55a875; box-shadow: 0 0 0 4px rgb(85 168 117 / 13%); }
.topbar-separator { height: 17px; width: 1px; background: #d9d8cf; }
.current-date { min-width: 118px; text-align: center; }
.icon-button { border: 1px solid var(--line); background: rgb(255 254 250 / 74%); color: var(--ink-soft); cursor: pointer; border-radius: 10px; padding: 9px 12px; display: inline-flex; align-items: center; gap: 7px; transition: border-color .18s, background .18s, transform .18s; font-size: 11px; font-weight: 700; }
.icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { border-color: #b7c6bb; background: #fffefa; transform: translateY(-1px); }
main { padding-top: 30px; }
.intro-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 25px; }
.eyebrow { margin: 0; display: flex; align-items: center; gap: 9px; color: #8b8a7e; text-transform: none; font-size: 10px; font-weight: 800; letter-spacing: .5px; }
.eyebrow-line { width: 19px; height: 1px; background: var(--gold); }
h1, h2, p { margin-top: 0; }
h1 { margin: 10px 0 5px; color: var(--ink); font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; line-height: 1.24; letter-spacing: -1.3px; }
h1 em { color: var(--green); font-style: normal; }
.intro-copy { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.level-card { flex: 0 0 296px; background: rgb(255 254 250 / 78%); border: 1px solid var(--line); border-radius: 15px; padding: 13px 15px 11px; box-shadow: 0 5px 17px rgb(30 52 43 / 3%); }
.level-card-top { display: flex; align-items: center; gap: 10px; }
.level-icon { display: grid; place-items: center; width: 33px; height: 33px; color: #a47c32; background: var(--gold-soft); border-radius: 11px; }
.level-icon svg { width: 18px; height: 18px; fill: currentColor; }
.level-copy { display: grid; gap: 1px; }
.level-copy span { color: var(--muted); font-size: 9px; }
.level-copy strong { color: var(--ink); font-size: 12px; }
.level-caption { margin-inline-start: auto; align-self: center; color: #a49b83; font-size: 9px; }
.progress-track { height: 5px; margin-top: 12px; overflow: hidden; border-radius: 9px; background: #ece9df; }
.progress-track span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a98235, #e4be6e); transition: width .5s cubic-bezier(.2,.85,.25,1); }
.progress-labels { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: #a09e91; font-size: 9px; }
.progress-labels b { color: var(--ink-soft); font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { min-width: 0; min-height: 103px; display: flex; align-items: flex-start; position: relative; gap: 11px; padding: 15px 14px 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 5px 15px rgb(30 52 43 / 2%); }
.stat-icon { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; margin-top: 1px; border-radius: 11px; color: var(--green); background: var(--green-pale); }
.stat-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stat-profit .stat-icon { color: #967329; background: var(--gold-soft); }
.stat-done .stat-icon { color: #627e91; background: #eff3f4; }
.stat-waiting .stat-icon { color: #ac705b; background: #fbf0eb; }
.stat-content { min-width: 0; display: grid; gap: 2px; }
.stat-label { color: var(--muted); font-size: 10px; font-weight: 650; }
.stat-content strong { display: block; overflow: hidden; color: var(--ink); font-size: 19px; font-weight: 850; line-height: 1.42; letter-spacing: -.4px; text-overflow: ellipsis; white-space: nowrap; }
.stat-content strong small { color: #758078; font-size: 10px; font-weight: 750; letter-spacing: 0; }
.stat-note { color: #a2a297; font-size: 9px; }
.stat-spark { position: absolute; left: 13px; top: 14px; opacity: .48; font-size: 13px; font-weight: 800; }
.spark-gold { color: #bf9a53; }
.spark-green { color: #5b9a72; }
.spark-ink { color: #71858b; }
.spark-coral { color: #bf806b; }
.desk-layout { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(280px, .9fr); align-items: stretch; gap: 15px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: var(--shadow); }
.transfer-panel { padding: 19px 20px 18px; }
.panel-heading, .queue-heading, .history-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-eyebrow { gap: 8px; }
.live-dot { width: 6px; height: 6px; }
.panel-heading h2, .queue-heading h2, .history-heading h2 { margin: 6px 0 0; font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.panel-heading h2 span, .queue-heading h2 span, .history-heading h2 span { color: var(--green); }
.window-tag { padding: 7px 10px; border: 1px solid #e9e6db; border-radius: 30px; color: #898a7f; background: #fbfaf5; font-size: 9px; white-space: nowrap; }
.tag-divider { padding-inline: 3px; color: var(--gold); }
.active-transfer { margin-top: 17px; }
.customer-ticket { position: relative; overflow: hidden; padding: 16px 17px 15px; border: 1px solid #e8e3d4; border-radius: 14px; background: linear-gradient(130deg, #fbf9f1 0%, #faf8f1 72%, #f7f3e7 100%); }
.customer-ticket::after { content: ""; position: absolute; width: 200px; height: 200px; left: -90px; top: -120px; border-radius: 50%; border: 1px solid rgb(190 158 86 / 12%); box-shadow: 0 0 0 18px rgb(190 158 86 / 3%), 0 0 0 38px rgb(190 158 86 / 3%); pointer-events: none; }
.ticket-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.person-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 15px; color: #17473a; background: #dce8dc; font-size: 18px; font-weight: 850; }
.avatar.avatar-1 { color: #7a5620; background: #eee1c1; }
.avatar.avatar-2 { color: #466677; background: #d9e5e8; }
.avatar.avatar-3 { color: #8a5148; background: #f2ded6; }
.avatar.avatar-4 { color: #625477; background: #e4deee; }
.person-copy { min-width: 0; display: grid; gap: 3px; }
.person-copy strong { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.person-copy span { color: #8e9286; font-size: 10px; }
.ticket-ref { align-self: start; color: #a09c8d; font-size: 9px; letter-spacing: .3px; white-space: nowrap; }
.ticket-rule { height: 1px; margin: 15px 0 13px; position: relative; z-index: 1; background-image: linear-gradient(to left, #d9d4c4 55%, transparent 0%); background-size: 9px 1px; }
.amount-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; position: relative; z-index: 1; }
.amount-label { display: grid; gap: 5px; color: #8a8c80; font-size: 10px; }
.amount-label b { color: #606e64; font-size: 10px; }
.exchange-route i { padding-inline: 3px; color: var(--gold); font-style: normal; }
.exchange-quote { color: #8d9385; font-size: 9px; }
.exchange-quote strong { color: #4c7453; font-weight: 850; }
.amount-value { direction: ltr; display: flex; align-items: baseline; gap: 7px; color: var(--green-deep); white-space: nowrap; }
.amount-value strong { font-size: clamp(24px, 3.8vw, 36px); font-weight: 850; letter-spacing: -1px; line-height: 1; }
.amount-value span { color: #728477; font-size: 12px; font-weight: 800; }
.commission-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; padding: 10px 12px; position: relative; z-index: 1; border: 1px solid #e3eadf; border-radius: 11px; background: #f1f7ee; }
.commission-copy { display: flex; align-items: center; gap: 8px; color: #546b56; font-size: 10px; font-weight: 750; }
.commission-mark { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; color: #fff; background: #6e9870; font-size: 12px; }
.commission-value { direction: ltr; color: #346e46; font-size: 14px; font-weight: 850; white-space: nowrap; }
.execute-button { width: 100%; min-height: 47px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 13px; position: relative; z-index: 1; border: 0; border-radius: 11px; color: #fffdf7; background: linear-gradient(105deg, #12523d, #1d7353); box-shadow: 0 6px 14px rgb(22 91 61 / 17%); cursor: pointer; font-size: 13px; font-weight: 850; transition: transform .18s, box-shadow .18s, filter .18s; }
.execute-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.execute-button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 9px 17px rgb(22 91 61 / 21%); filter: brightness(1.05); }
.execute-button:not(:disabled):active { transform: translateY(0) scale(.995); }
.execute-button:disabled { cursor: not-allowed; color: #aaa99e; background: #eeede7; box-shadow: none; }
.execute-note { margin: 9px 0 0; position: relative; z-index: 1; color: #9b9d90; text-align: center; font-size: 9px; }
.empty-transfer { min-height: 270px; display: grid; place-content: center; justify-items: center; padding: 25px; text-align: center; border: 1px dashed #dedbcf; border-radius: 14px; background: linear-gradient(135deg, #faf9f4, #f7f6f0); }
.empty-transfer-mark { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 12px; border-radius: 20px; color: #8a936f; background: #eaf0e5; font-size: 25px; }
.empty-transfer h3 { margin: 0 0 5px; font-size: 15px; }
.empty-transfer p { margin: 0; color: var(--muted); font-size: 11px; }
.queue-panel { display: flex; flex-direction: column; padding: 19px 17px 14px; }
.queue-counter { padding: 5px 9px; border-radius: 8px; color: #687568; background: #f1f3eb; font-size: 10px; white-space: nowrap; }
.queue-counter b { margin-inline-end: 3px; color: var(--green); }
.queue-list { min-height: 168px; flex: 1; display: grid; align-content: start; gap: 8px; margin-top: 15px; }
.queue-item { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 9px 9px; border: 1px solid #eeece5; border-radius: 12px; background: #fffefa; animation: queue-in .35s ease-out both; }
.queue-item .avatar { width: 35px; height: 35px; flex-basis: 35px; border-radius: 12px; font-size: 14px; }
.queue-item-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.queue-item-copy strong { overflow: hidden; color: #35473f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.queue-item-copy span { overflow: hidden; color: #9a9a8e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.queue-amount { direction: ltr; display: grid; gap: 2px; color: #496755; text-align: left; font-size: 10px; font-weight: 850; white-space: nowrap; }
.queue-amount small { color: #99988c; font-size: 8px; font-weight: 600; }
.queue-position { width: 21px; height: 21px; flex: 0 0 21px; display: grid; place-items: center; border-radius: 7px; color: #9c8756; background: #f6f1e2; font-size: 9px; font-weight: 800; }
.queue-empty { min-height: 110px; display: grid; place-content: center; justify-items: center; gap: 5px; color: #97988d; text-align: center; font-size: 10px; }
.queue-empty span:first-child { font-size: 18px; color: #b4b39f; }
.queue-footer { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #efeee7; color: #96968a; font-size: 9px; }
.queue-footer b { color: #62796a; }
.queue-pulse { width: 6px; height: 6px; box-shadow: none; }
.bottom-layout { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(250px, .9fr); align-items: stretch; gap: 15px; margin-top: 15px; }
.history-panel { overflow: hidden; padding: 16px 19px 12px; }
.history-heading h2 { font-size: 15px; }
.history-count { color: #a09f93; font-size: 9px; white-space: nowrap; }
.history-table-wrap { min-height: 78px; position: relative; margin-top: 12px; }
.history-table { width: 100%; border-collapse: collapse; text-align: right; }
.history-table thead th { padding: 0 5px 9px; color: #9c9d90; font-size: 9px; font-weight: 750; white-space: nowrap; }
.history-table tbody tr { border-top: 1px solid #f0eee8; }
.history-table td { padding: 9px 5px; color: #59665c; font-size: 10px; }
.history-table td:first-child { color: #35473f; font-weight: 750; }
.history-route { display: block; margin-top: 3px; color: #96988b; font-size: 8px; font-weight: 600; }
.history-table td.amount-cell, .history-table td.fee-cell { direction: ltr; text-align: right; white-space: nowrap; }
.history-table td.fee-cell { color: #49805a; font-weight: 800; }
.success-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 20px; color: #4d8058; background: #ecf5e9; font-size: 8px; font-weight: 800; white-space: nowrap; }
.success-pill i { width: 5px; height: 5px; border-radius: 50%; background: #67a16e; }
.history-empty { min-height: 78px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #999a8d; font-size: 10px; }
.empty-ledger { color: #b49958; font-size: 16px; }
.tip-card { min-height: 153px; position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 17px 19px 13px; border-radius: 16px; color: #f4f0df; background: #123c32; box-shadow: var(--shadow); }
.tip-card::before { content: ""; position: absolute; width: 155px; height: 155px; left: -48px; bottom: -104px; border: 1px solid rgb(226 190 112 / 24%); border-radius: 50%; box-shadow: 0 0 0 13px rgb(226 190 112 / 4%), 0 0 0 29px rgb(226 190 112 / 4%); }
.tip-card .eyebrow { position: relative; color: #cdb779; font-size: 9px; }
.tip-ornament { position: absolute; left: 16px; top: -19px; color: rgb(223 192 120 / 20%); font-family: Georgia, serif; font-size: 86px; line-height: 1; }
.tip-quote { max-width: 260px; margin: 11px 0 12px; position: relative; color: #e9e8d8; font-size: 13px; font-weight: 550; line-height: 1.9; }
.tip-quote strong { color: #e8c877; font-weight: 850; }
.tip-bottom { display: flex; align-items: center; gap: 9px; position: relative; color: #aebfb0; font-size: 9px; }
.tip-rule { width: 22px; height: 1px; background: #c9a95f; }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; padding-top: 13px; border-top: 1px solid rgb(35 57 48 / 10%); color: #999a8f; font-size: 9px; }
.app-footer span { display: inline-flex; align-items: center; gap: 7px; }
.app-footer img { width: 18px; height: 18px; border-radius: 6px; }
.app-footer i { width: 3px; height: 3px; border-radius: 50%; background: #c9a95f; }
.toast-region { width: min(330px, calc(100% - 30px)); display: grid; gap: 9px; position: fixed; z-index: 10; left: 22px; bottom: 22px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #dfe8db; border-radius: 13px; color: #35543c; background: #fffefa; box-shadow: 0 12px 28px rgb(22 45 38 / 14%); animation: toast-in .28s ease-out both; font-size: 11px; }
.toast.toast-level { color: #6a5421; border-color: #ebdfc0; }
.toast.toast-missed { color: #925f4e; border-color: #f0dfd7; }
.toast-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border-radius: 9px; color: #fff; background: #6d9b70; font-weight: 900; }
.toast-level .toast-icon { color: #6c5421; background: #f3e8c9; }
.toast-missed .toast-icon { color: #935f4a; background: #f7e9e2; }
.toast strong { margin-inline-start: auto; color: inherit; white-space: nowrap; }
.reset-dialog { width: min(390px, calc(100% - 32px)); padding: 28px; border: 1px solid #e5e2d8; border-radius: 20px; color: var(--ink); background: var(--card); box-shadow: 0 22px 80px rgb(8 25 20 / 26%); text-align: center; }
.reset-dialog::backdrop { background: rgb(11 26 21 / 46%); backdrop-filter: blur(3px); }
.dialog-mark { margin-bottom: 13px; }
.dialog-mark img { border-radius: 15px; }
.reset-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.reset-dialog p { margin: 0 auto; max-width: 270px; color: #888d81; font-size: 12px; line-height: 1.8; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.button-secondary, .button-danger { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 11px; font-weight: 800; }
.button-secondary { color: var(--ink-soft); background: #fffefa; }
.button-danger { color: #fff; border-color: #8c5144; background: #985b4c; }
.button-secondary:hover { background: #f7f5ee; }
.button-danger:hover { background: #874d40; }
@keyframes queue-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes earned { 0% { transform: scale(1); } 42% { transform: scale(1.045); } 100% { transform: scale(1); } }
.just-earned { animation: earned .45s ease-out; }
@media (min-width: 1400px) { .app-shell { width: min(1220px, calc(100% - 84px)); } }
@media (max-width: 900px) {
  .app-shell { width: min(760px, calc(100% - 38px)); padding-top: 18px; }
  .intro-row { align-items: start; flex-direction: column; gap: 17px; }
  .level-card { width: min(100%, 360px); flex-basis: auto; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-layout, .bottom-layout { grid-template-columns: 1fr; }
  .queue-panel { min-height: 220px; }
  .queue-list { min-height: 100px; }
  .tip-card { min-height: 140px; }
}
@media (max-width: 540px) {
  .app-shell { width: calc(100% - 26px); padding-top: 12px; }
  .topbar { min-height: 58px; padding-bottom: 12px; gap: 6px; }
  .brand { gap: 8px; }
  .brand-mark, .brand-mark img { width: 39px; height: 39px; border-radius: 13px; }
  .brand-name { font-size: 15px; }
  .brand-caption { font-size: 9px; }
  .topbar-center { gap: 8px; font-size: 9px; }
  .topbar-separator { height: 13px; }
  .current-date { min-width: 0; max-width: 82px; }
  .icon-button { gap: 4px; padding: 7px 7px; font-size: 9px; }
  .icon-button svg { width: 13px; height: 13px; }
  main { padding-top: 22px; }
  .intro-row { gap: 15px; margin-bottom: 18px; }
  h1 { margin-top: 8px; font-size: 29px; }
  .intro-copy { max-width: 310px; font-size: 11px; line-height: 1.7; }
  .level-card { padding: 11px 12px 10px; }
  .stats-grid { gap: 8px; margin-bottom: 11px; }
  .stat-card { min-height: 91px; gap: 8px; padding: 12px 10px; border-radius: 12px; }
  .stat-icon { flex-basis: 29px; width: 29px; height: 29px; border-radius: 10px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-content strong { font-size: 16px; }
  .stat-label { font-size: 9px; }
  .stat-note { font-size: 8px; }
  .stat-spark { top: 8px; left: 9px; font-size: 10px; }
  .desk-layout, .bottom-layout { gap: 10px; }
  .transfer-panel { padding: 16px 13px 14px; }
  .queue-panel { padding: 16px 13px 12px; }
  .panel-heading h2, .queue-heading h2 { font-size: 15px; }
  .window-tag { padding: 6px 7px; font-size: 8px; }
  .customer-ticket { padding: 13px 11px 12px; }
  .amount-value { gap: 5px; }
  .amount-value strong { font-size: clamp(23px, 8vw, 31px); }
  .amount-value span { font-size: 10px; }
  .amount-label { font-size: 9px; }
  .commission-strip { padding: 9px 9px; }
  .commission-copy { gap: 6px; font-size: 9px; }
  .commission-value { font-size: 12px; }
  .history-panel { padding: 14px 11px 10px; }
  .history-table thead th { font-size: 8px; padding-inline: 3px; }
  .history-table td { font-size: 8px; padding-inline: 3px; }
  .history-table td:last-child { text-align: center; }
  .history-heading h2 { font-size: 14px; }
  .success-pill { padding: 3px 5px; font-size: 7px; }
  .tip-card { min-height: 138px; padding: 14px 14px 12px; }
  .tip-quote { font-size: 12px; }
  .app-footer { align-items: flex-start; font-size: 8px; }
  .app-footer > span:last-child { max-width: 155px; justify-content: end; text-align: left; }
  .toast-region { left: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Expanded exchange-and-investment game interface */
.game-nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 15px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 254 250 / 88%); box-shadow: 0 5px 15px rgb(30 52 43 / 3%); }
.nav-tabs { display: flex; align-items: center; gap: 5px; }
.nav-tab { min-height: 39px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 0; border-radius: 10px; color: #7b8378; background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; transition: background .18s, color .18s, transform .18s; }
.nav-tab svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-tab:hover { color: var(--green); background: #f3f5ee; }
.nav-tab.is-active { color: #f8f5e9; background: var(--green-deep); box-shadow: 0 4px 10px rgb(11 48 42 / 13%); }
.nav-count { min-width: 19px; height: 19px; display: inline-grid; place-items: center; padding: 0 4px; border-radius: 7px; color: #8b6b2e; background: #f3ead2; font-size: 9px; }
.nav-tab.is-active .nav-count { color: #f6efd9; background: rgb(255 255 255 / 17%); }
.nav-hint { color: #9b9d91; font-size: 9px; }
.view-panel { animation: queue-in .22s ease-out both; }
.source-amount { color: #8b9085; font-size: 9px; }
.market-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 14px; padding: 21px 23px; position: relative; overflow: hidden; border: 1px solid #dfe7dc; border-radius: 17px; background: linear-gradient(112deg, #f4f7ef 0%, #fcfaf1 66%, #f7f1df 100%); }
.market-hero::after { content: ""; position: absolute; width: 200px; height: 200px; left: -73px; bottom: -128px; border: 1px solid rgb(179 149 80 / 15%); border-radius: 50%; box-shadow: 0 0 0 16px rgb(179 149 80 / 4%), 0 0 0 34px rgb(179 149 80 / 3%); pointer-events: none; }
.market-hero-copy { position: relative; z-index: 1; }
.market-hero h2 { margin: 7px 0 5px; color: var(--ink); font-size: clamp(24px, 3vw, 32px); font-weight: 850; letter-spacing: -1px; }
.market-hero h2 em { color: var(--green); font-style: normal; }
.market-hero-copy > p:last-child { max-width: 520px; margin: 0; color: #7e897e; font-size: 11px; line-height: 1.8; }
.market-wallet { min-width: 230px; display: grid; gap: 5px; padding: 12px 15px; position: relative; z-index: 1; border: 1px solid #e5e3d6; border-radius: 12px; background: rgb(255 254 250 / 80%); }
.market-wallet > span { color: #8e9387; font-size: 9px; font-weight: 750; }
.market-wallet strong { color: var(--green-deep); font-size: 18px; font-weight: 900; }
.market-wallet small { color: #a09e92; font-size: 8px; }
.market-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-bottom: 15px; }
.market-stats article { min-width: 0; display: grid; gap: 4px; padding: 12px 13px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 4px 12px rgb(30 52 43 / 2%); }
.market-stats article > span { color: #8a9288; font-size: 9px; font-weight: 700; }
.market-stats article strong { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.market-stats article small { color: #a2a296; font-size: 8px; }
.market-stats article:nth-child(3) strong, .market-stats article:nth-child(5) strong { color: #4e8058; }
.market-stats article:nth-child(6) strong { color: #a47c32; }
.market-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.asset-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pill { min-height: 30px; padding: 6px 11px; border: 1px solid #e5e4dc; border-radius: 30px; color: #858c80; background: #fffefa; cursor: pointer; font-size: 9px; font-weight: 750; transition: border .18s, color .18s, background .18s; }
.filter-pill:hover { border-color: #b9c9b7; color: var(--green); }
.filter-pill.is-active { border-color: #174d3d; color: #fffdf6; background: #174d3d; }
.market-hint { color: #9b9d91; font-size: 9px; text-align: left; }
.investment-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(285px, .85fr); align-items: start; gap: 14px; }
.shop-panel, .portfolio-panel { padding: 16px; }
.shop-heading, .portfolio-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.shop-heading h2, .portfolio-heading h2 { margin: 5px 0 0; color: var(--ink); font-size: 16px; font-weight: 850; }
.shop-heading h2 span, .portfolio-heading h2 span { color: var(--green); }
.shop-count, .portfolio-indicator { color: #96988d; font-size: 9px; white-space: nowrap; }
.portfolio-indicator { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; color: #578362; background: #eff5eb; }
.portfolio-indicator i { width: 5px; height: 5px; border-radius: 50%; background: #67a16e; }
.asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.asset-card { min-width: 0; overflow: hidden; border: 1px solid #e9e7df; border-radius: 13px; background: #fffefa; transition: transform .18s, box-shadow .18s, border-color .18s; }
.asset-card:hover { transform: translateY(-2px); border-color: #d7dfd2; box-shadow: 0 8px 18px rgb(22 45 38 / 7%); }
.asset-card.asset-locked { opacity: .78; }
.asset-art { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 13px; position: relative; overflow: hidden; background: linear-gradient(120deg, #eaf1e7, #f5f1df); }
.asset-art::after { content: ""; width: 100px; height: 100px; position: absolute; left: -36px; bottom: -72px; border: 1px solid rgb(30 83 63 / 13%); border-radius: 50%; box-shadow: 0 0 0 12px rgb(30 83 63 / 3%), 0 0 0 26px rgb(30 83 63 / 3%); }
.asset-art-realEstate { background: linear-gradient(125deg, #e7efe4, #f5f0df); }
.asset-art-vehicles { background: linear-gradient(125deg, #e9eef0, #f6f1e7); }
.asset-art-banking { background: linear-gradient(125deg, #e6ece8, #f4eedf); }
.asset-art-other { background: linear-gradient(125deg, #f1ead8, #fbf4e2); }
.asset-emoji { position: relative; z-index: 1; font-size: 36px; filter: drop-shadow(0 5px 4px rgb(41 55 43 / 13%)); }
.asset-tag, .asset-unlock { position: relative; z-index: 1; align-self: flex-start; padding: 5px 7px; border: 1px solid rgb(255 255 255 / 66%); border-radius: 7px; color: #738176; background: rgb(255 254 250 / 76%); font-size: 8px; font-weight: 750; }
.asset-unlock { color: #68836b; }
.asset-locked .asset-unlock { color: #9b8050; }
.asset-card-body { padding: 12px 12px 11px; }
.asset-title-row { display: flex; align-items: start; justify-content: space-between; gap: 7px; }
.asset-category { margin: 0 0 3px; color: #a09678; font-size: 8px; font-weight: 750; }
.asset-title-row h3 { margin: 0; color: #27443a; font-size: 12px; font-weight: 850; }
.asset-level { padding-top: 3px; color: #9d9d90; font-size: 8px; white-space: nowrap; }
.asset-description { min-height: 30px; margin: 7px 0 8px; color: #93968b; font-size: 9px; line-height: 1.65; }
.asset-economics { display: grid; grid-template-columns: 1fr 1.2fr; gap: 7px 5px; padding: 8px 0; border-top: 1px solid #f0eee8; }
.asset-economics > div { min-width: 0; display: grid; gap: 3px; }
.asset-economics > div span { color: #9a9b8f; font-size: 8px; }
.asset-economics strong { overflow: hidden; color: #53675a; font-size: 9px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.asset-economics .asset-income { color: #4f8759; }
.asset-economics .asset-growth { color: #aa813c; }
.asset-buy-button { width: 100%; min-height: 34px; margin-top: 3px; border: 0; border-radius: 9px; color: #fffdf6; background: #176047; cursor: pointer; font-size: 9px; font-weight: 850; transition: background .18s, transform .18s; }
.asset-buy-button:not(:disabled):hover { transform: translateY(-1px); background: #0d4d39; }
.asset-buy-button:disabled { color: #989a8d; background: #eeede7; cursor: not-allowed; }
.portfolio-panel { position: sticky; top: 14px; }
.holdings-list { display: grid; gap: 8px; }
.holding-card { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid #eceae2; border-radius: 11px; background: #fffefa; }
.holding-emoji { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #f3f0e6; font-size: 20px; }
.holding-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.holding-copy strong { overflow: hidden; color: #354c41; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.holding-copy span { overflow: hidden; color: #54805b; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.holding-copy small { overflow: hidden; color: #99998d; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.holding-actions { display: grid; justify-items: end; gap: 5px; }
.holding-gain, .holding-loss { font-size: 8px; font-weight: 850; white-space: nowrap; }
.holding-gain { color: #4c8858; }
.holding-loss { color: #b97561; }
.holding-sell-button { padding: 4px 9px; border: 1px solid #e9e3d5; border-radius: 7px; color: #8c6c36; background: #fbf7eb; cursor: pointer; font-size: 8px; font-weight: 800; }
.holding-sell-button:hover { border-color: #d7c49e; background: #f6efd9; }
.portfolio-empty { min-height: 146px; display: grid; align-content: center; justify-items: center; gap: 7px; padding: 18px; border: 1px dashed #dfddd3; border-radius: 12px; color: #97988c; text-align: center; }
.portfolio-empty > span:first-child { color: #b69852; font-size: 25px; }
.portfolio-empty strong { color: #53675a; font-size: 11px; }
.portfolio-empty > span:last-child { max-width: 200px; font-size: 9px; line-height: 1.7; }
.portfolio-history-heading { display: flex; justify-content: space-between; gap: 8px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #efeee7; color: #667366; font-size: 9px; font-weight: 850; }
.portfolio-history-note { color: #a3a197; font-size: 8px; font-weight: 600; }
.deals-history { display: grid; gap: 0; }
.deal-history-row { display: flex; align-items: center; gap: 8px; padding: 8px 1px; border-bottom: 1px solid #f2f0e9; }
.deal-history-emoji { flex: 0 0 27px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: #f5f1e6; font-size: 15px; }
.deal-history-row > div { min-width: 0; flex: 1; display: grid; gap: 3px; }
.deal-history-row > div strong { overflow: hidden; color: #59685d; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.deal-history-row > div small { color: #a09f94; font-size: 8px; }
.deal-history-row > b { font-size: 8px; white-space: nowrap; }
.deal-positive { color: #4c8457; }
.deal-negative { color: #af7c5d; }
.deals-empty { padding: 13px 0 4px; color: #a09f93; font-size: 9px; text-align: center; }
.market-disclaimer { display: flex; align-items: flex-start; gap: 7px; margin: 13px 0 0; color: #96978b; font-size: 9px; line-height: 1.7; }
.market-disclaimer span { color: #b3944d; }
.toast-investment { border-color: #e9dfc5; color: #715a2c; }
.toast-investment .toast-icon { color: #725a2a; background: #f3e9cb; }
@media (max-width: 900px) {
  .game-nav { align-items: flex-start; flex-direction: column; gap: 6px; padding: 8px; }
  .nav-hint { padding-inline: 10px; }
  .market-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .investment-layout { grid-template-columns: 1fr; }
  .portfolio-panel { position: static; }
}
@media (max-width: 600px) {
  .nav-tabs { width: 100%; }
  .nav-tab { flex: 1; justify-content: center; gap: 6px; padding-inline: 8px; font-size: 9px; }
  .nav-hint { font-size: 8px; }
  .market-hero { align-items: stretch; flex-direction: column; padding: 17px 15px; gap: 13px; }
  .market-wallet { min-width: 0; }
  .market-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .market-stats article { padding: 10px; }
  .market-stats article:last-child { grid-column: auto; }
  .market-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .market-hint { text-align: right; }
  .asset-filters { gap: 5px; }
  .filter-pill { min-height: 28px; padding-inline: 9px; font-size: 8px; }
  .shop-panel, .portfolio-panel { padding: 12px; }
  .asset-grid { grid-template-columns: 1fr; }
  .asset-art { min-height: 72px; }
  .asset-description { min-height: 0; }
  .market-disclaimer { font-size: 8px; }
}
