/* RPGK member surface: deep teal, quiet jade accents, readable data surfaces. */
:root {
  --bg: #071b1b;
  --panel: #0b2928;
  --panel2: #103633;
  --line: #205c50;
  --cyan: #49c9ad;
  --green: #64d99b;
  --text: #edf7f1;
  --muted: #a2bdb1;
  --gold: #d2ad70;
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(ellipse at 48% -18%, rgba(38, 111, 89, .36), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
.app {
  max-width: 560px;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 13px 26px;
}
.top {
  position: fixed !important;
  top: env(safe-area-inset-top, 0px) !important;
  left: 50% !important;
  z-index: 40 !important;
  width: min(100%, 560px) !important;
  height: 55px !important;
  margin: 0 !important;
  padding: 0 13px !important;
  transform: translateX(-50%) !important;
  background: rgba(7, 27, 27, .94) !important;
  border-bottom: 1px solid rgba(117, 193, 161, .16);
  backdrop-filter: blur(14px);
}
.brand { gap: 9px; }
.brand-logo { max-height: 35px; max-width: 132px; object-fit: contain; }
.icon-btn, .pill {
  color: var(--text);
  background: #0c302d;
  border: 1px solid #286458;
  border-radius: 13px;
}
.hero,
.home-welcome {
  color: var(--text);
  border: 1px solid rgba(75, 177, 133, .28);
  border-radius: 19px;
  background:
    radial-gradient(ellipse at 90% 5%, rgba(76, 190, 139, .18), transparent 40%),
    linear-gradient(135deg, #103a34, #0a292a 75%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
}
.hero h1, .home-welcome h1 { color: #f1faf4; }
.hero p, .home-welcome p { color: #b9d3c7; }
.eyebrow { color: #83d4b3; }
.accent, .stat { color: var(--green); }
.card, .authcard, .item {
  color: var(--text);
  background: linear-gradient(150deg, #0d302e, #0a2425);
  border: 1px solid rgba(79, 147, 119, .22);
  border-radius: 16px;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .12);
}
.card h2, .card h3, .section-head h2 { color: #e8f5ed; }
.muted, .small { color: var(--muted); }
.balance {
  color: var(--text);
  background: linear-gradient(115deg, #0c503c, #0d3c3b);
  border-color: #267757;
}
.balance .muted, .balance small { color: #c1dfd0; }
.balance .stat, .balance b { color: #83e1a7; }
.action, .action.blue, .action.purple {
  border-radius: 14px;
  box-shadow: none;
}
.btn { border-radius: 12px; }
.btn:focus-visible,
.action:focus-visible,
.nav a:focus-visible,
.history-links a:focus-visible,
.device-tabs a:focus-visible {
  outline: 2px solid #78dbb2;
  outline-offset: 2px;
}
.badge {
  border-radius: 999px;
  border-color: rgba(105, 190, 150, .4);
  color: #bfe4cf;
  background: rgba(40, 112, 81, .18);
}

/* Catalog and plan detail: real selectors in Website.php. */
.plans-grid { gap: 12px; }
.plan-card {
  --tone: #4bc891;
  display: grid;
  grid-template-columns: minmax(108px, 36%) minmax(0, 1fr);
  gap: 11px;
  padding: 11px;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--tone) 48%, #1b4e43);
  border-radius: 17px;
  background: linear-gradient(145deg, #103632, #0a2425 72%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
}
.plan-card .plan-photo { border-radius: 11px; }
.plan-title-row h2 { color: #eef8f1; }
.plan-desc { color: #aec6ba; line-height: 1.4; }
.plan-price { color: var(--tone); }
.plan-price small, .plan-income small { color: #a9c2b5; }
.plan-income { color: #e0eee5; }
.plan-hourly, .plan-total, .plan-limit { color: #adc7b9 !important; }
.plan-total b, .plan-limit b { color: #83dba3; }
.plan-benefits { color: #c0d4c8; }
.plan-join { border-radius: 11px; }
.detail-photo { border-radius: 15px; }
.home-products { border-radius: 15px; }
.home-product {
  border-color: color-mix(in srgb, var(--tone, #4bc891) 45%, #1d4b40);
  border-radius: 11px;
  background: #0c2a29;
  color: #edf7f1;
}
.home-product strong { color: #6cdaa0; }

/* Live task milestone count, requirement and claimed/locked state. */
.task-salary {
  border: 1px solid rgba(92, 194, 143, .38);
  border-radius: 16px;
  background: linear-gradient(120deg, #104337, #0d302f);
}
.salary-task {
  border: 1px solid rgba(82, 151, 120, .28);
  border-radius: 13px;
  background: #0c2a29;
}
.salary-task > div:first-child { min-width: 0; }
.task-claim-area { flex: 0 0 auto; }

/* Owned products/devices, hourly and earned figures, and claim availability. */
.device-list { gap: 11px; }
.device-card {
  --tone: #52ca91;
  border: 1px solid color-mix(in srgb, var(--tone) 45%, #1b4e43);
  border-radius: 15px;
  background: linear-gradient(140deg, #103431, #0a2425);
  box-shadow: 0 7px 19px rgba(0, 0, 0, .13);
}
.device-photo img { border-radius: 10px; }
.device-stats span { color: #a8c2b5; }
.device-stats b { color: #76dba1; }
.device-tabs a, .history-links a, .history-categories a {
  border-color: #285e51;
  border-radius: 10px;
  background: #0b2928;
  color: #c7ded1;
}
.device-tabs a.selected, .history-categories a.active {
  border-color: #51c68f;
  color: #8ce2ad;
  background: #103d32;
}

/* Transactions, income history and country-local finance summaries. */
.history-record-list { gap: 8px; }
.history-record, .record-heading {
  border-color: rgba(79, 147, 119, .26);
}
.history-record {
  border-radius: 12px;
  background: linear-gradient(120deg, #0e302e, #0a2425);
}
.history-record small { color: #a2b9ad; }
.history-time { color: #bbd0c4; }
.history-type-icon { color: #64c99a; }
.history-record-list .empty { border-radius: 14px; }
.history-tools input { border-color: #285e51; }
.wallet-balance, .home-balance {
  border-color: rgba(81, 180, 133, .28);
  border-radius: 15px;
}
.balance-links a { border-radius: 9px; }

/* Shared RPGK components used by the remaining member routes. */
.auth,
.app > .list,
.profile-grid,
.team-member-list {
  min-width: 0;
}
.auth { width: min(100%, 460px); margin: 0 auto; }
.authcard { padding: 18px; }
.backrow { gap: 9px; }
.field { margin: 11px 0; }
.field label {
  display: block;
  margin: 0 0 5px;
  color: #9ec9b2;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
}
.field input,
.field select,
.field textarea,
.history-tools input,
.withdraw-account select {
  min-width: 0;
  color: #edf7f1;
  background: #081f20;
  border: 1px solid #285e51;
  border-radius: 11px;
}
.field input,
.field select,
.field textarea { width: 100%; padding: 11px 12px; }
.field input::placeholder,
.field textarea::placeholder { color: #88a99b; opacity: 1; }
.field input:focus,
.field select:focus,
.field textarea:focus,
.history-tools input:focus {
  border-color: #68d9a1;
  outline: 2px solid rgba(104, 217, 161, .16);
}
.btn,
.action,
.profile-link,
.balance-links a,
.home-quick-links a {
  border-radius: 12px;
}
.btn { min-height: 42px; }
.btn.full { width: 100%; }
.btn.outline {
  color: #c5e4d3;
  border-color: #326e5d;
  background: #0b2928;
}
.divider { color: #a5c2b4; }
.notice {
  border-radius: 12px;
  border-color: rgba(91, 182, 139, .3);
}
.notice.error {
  border-color: rgba(231, 85, 112, .45);
}
.empty {
  color: #b5cbbf;
  border-color: rgba(87, 153, 123, .25);
  border-radius: 15px;
  background: #0a2525;
}
.list { display: grid; gap: 9px; }
.row { gap: 10px; }
.subhead { color: #e4f1e9; }

/* Home overview, shortcuts and local-currency balances. */
.home-welcome { padding: 16px; }
.home-welcome-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(116, 219, 164, .48);
  border-radius: 50%;
  color: #d8f5e3;
  background: #14513b;
  font-size: 20px;
  font-weight: 800;
}
.home-banner {
  margin-top: 13px;
  padding: 14px;
  border: 1px solid rgba(112, 202, 156, .25);
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(24, 86, 63, .75), rgba(10, 39, 39, .88));
}
.home-banner span { color: #9bd3b4; font-size: 10px; letter-spacing: .08em; }
.home-banner b { display: block; margin-top: 5px; color: #eff9f2; font-size: 18px; line-height: 1.25; }
.home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.home-metrics > a {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(79, 147, 119, .25);
  border-radius: 13px;
  color: #eaf5ee;
  background: #0a2928;
}
.home-metrics small { display: block; color: #a2bdb1; font-size: 10px; }
.home-metrics b { display: block; min-width: 0; overflow-wrap: anywhere; color: #83dfa9; font-size: 13px; }
.metric-icon { flex: 0 0 auto; color: #84d9ae; }
.home-wallet-actions { gap: 9px; }
.home-balance {
  padding: 12px;
  color: #edf7f1;
  background: linear-gradient(140deg, #0e3b31, #0a2928);
}
.home-balance .section-head { align-items: center; }
.home-balance h2 { color: #eaf5ee; }
.balance-main { gap: 8px; padding: 5px 0; }
.balance-main span { color: #c0d9cb; }
.balance-main b { color: #87e0a9; font-variant-numeric: tabular-nums; }
.balance-links { gap: 7px; }
.balance-links a {
  padding: 8px 5px;
  color: #c5e4d3;
  background: #0b302b;
}
.home-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}
.home-quick-links a {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(79, 147, 119, .22);
  color: #d7e9de;
  background: #0a2827;
}
.home-quick-links a span { color: #eff8f2; font-weight: 700; }
.home-team-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(97, 194, 141, .35);
  border-radius: 14px;
  color: #eaf5ee;
  background: linear-gradient(120deg, #104333, #0b2928);
}
.home-team-banner span { flex: 1; color: #b5cbbf; font-size: 11px; }
.home-team-banner i { color: #85dfa8; font-style: normal; }
.home-points-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 9px 0;
  padding: 11px 13px;
  border: 1px solid rgba(116, 219, 164, .34);
  border-radius: 14px;
  color: #c6dfd0;
  background: linear-gradient(120deg, #104333, #0b2928);
}
.home-points-card small { display: block; color: #add0ba; font-size: 10px; }
.home-points-card b { display: block; color: #8be4aa; font-size: 22px; }
.home-points-card > span:last-child { color: #b7d3c3; font-size: 10px; text-align: right; }
.point-task-card { padding: 14px; }
.point-task-card h2 { margin: 0 0 5px; color: #edf7f1; font-size: 15px; }
.point-task-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(116, 219, 164, .32);
  border-radius: 12px;
  color: #8be4aa;
  background: #104032;
  font-size: 18px;
}
.point-task-reward { color: #85dfa8; font-variant-numeric: tabular-nums; }
.plan-points-reward {
  margin-top: 6px;
  color: #9de4b7;
  font-size: 11px;
  font-weight: 800;
}
.plan-points-success {
  display: inline-flex;
  margin: 8px auto;
  padding: 8px 12px;
  border: 1px solid rgba(116, 219, 164, .36);
  border-radius: 12px;
  background: rgba(9, 81, 54, .45);
}
.plan-points-detail { color: #9de4b7; }
.home-proof-link {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 10px 0;
  padding: 13px 14px;
  border: 1px solid rgba(34, 210, 255, .32);
  border-radius: 15px;
  background: linear-gradient(120deg, rgba(8, 53, 76, .94), rgba(7, 35, 52, .96));
  color: #e8f8ff;
}
.home-proof-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  background: rgba(34, 210, 255, .14);
  color: #69e6ff;
  font-size: 19px;
}
.home-proof-link span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.home-proof-link small { color: #a8c4d2; font-size: 11px; }
.home-proof-link i { color: #69e6ff; font-size: 22px; font-style: normal; }
.home-salary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 13px 15px;
  border: 1px solid rgba(69, 242, 140, .3);
  border-radius: 15px;
  background: linear-gradient(120deg, rgba(8, 62, 49, .82), rgba(7, 37, 51, .96));
}
.home-salary-card span { display: grid; gap: 3px; }
.home-salary-card span small,
.home-salary-card > small { color: #acd0c2; font-size: 10px; }
.home-salary-card b { color: #a0ffca; font-size: 21px; font-variant-numeric: tabular-nums; }
.point-task-form { display: grid; gap: 8px; margin: 12px 0 6px; }
.point-task-form label { color: #b7d3c3; font-size: 11px; font-weight: 700; }
.point-task-form textarea {
  width: 100%;
  min-width: 0;
  padding: 11px;
  resize: vertical;
  color: #edf7f1;
  background: #081f20;
  border: 1px solid #285e51;
  border-radius: 11px;
  font: inherit;
}
.point-history-item { display: grid; gap: 9px; }
.point-history-proof {
  overflow-wrap: anywhere;
  padding: 9px;
  border-radius: 9px;
  background: rgba(4, 19, 22, .55);
}
.status-pill.approved { color: #8be4aa; }
.status-pill.pending { color: #f1cf77; }
.status-pill.rejected { color: #ff9aa8; }

/* Team, invite, profile and account settings. */
.invite-card,
.team-level,
.profile-section,
.profile-info-cta,
.profile-link,
.summary-grid > div,
.device-summary > div {
  border: 1px solid rgba(79, 147, 119, .25);
  border-radius: 14px;
  background: linear-gradient(145deg, #0d302e, #0a2425);
}
.invite-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 13px;
}
.invite-card > div { display: grid; min-width: 0; flex: 1; gap: 3px; }
.invite-card small { color: #a2bdb1; }
.invite-card b { color: #86dfa9; font-size: 19px; letter-spacing: .08em; }
.team-level-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.team-level {
  display: grid;
  gap: 4px;
  padding: 11px 8px;
  color: #d6e8dd;
}
.team-level small { color: #a2bdb1; font-size: 10px; }
.team-level b { color: #8adea9; font-size: 18px; }
.team-level span { color: #bacfc3; font-size: 10px; }
.team-level.active {
  border-color: #55bd89;
  background: linear-gradient(145deg, #124437, #0b2928);
}
.team-level-list { margin: 10px 0; }
.team-member-list .item { padding: 11px; }
.name { color: #e8f4ec; }
.profile-section { margin: 10px 0; padding: 14px; }
.profile-section h1,
.profile-section h2,
.profile-section h3 { color: #edf7f1; }
.profile-head { align-items: center; }
.avatar,
.profile-info-icon {
  border-color: rgba(116, 219, 164, .45);
  color: #99e1b3;
  background: #104032;
}
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-link {
  display: block;
  padding: 11px;
  color: #d7e9de;
}
.profile-info-cta {
  color: #e7f4eb;
  background: linear-gradient(120deg, #0d3830, #0a2928);
}
.summary-grid > div,
.device-summary > div { padding: 11px; }
.summary-grid b,
.device-summary b { color: #85dfa8; }

/* Preserve status meaning, including pending/failed and destructive actions. */
.status-pill { border-radius: 999px; }
.status-pill.pending { color: #f1cf77; }
.status-pill.rejected,
.status-pill.failed,
.status-pill.cancelled { color: #ff9aa8; }
.withdraw-method-grid label,
.withdraw-account,
.confirm-row { border-radius: 13px; }
.withdraw-summary { color: #edf7f1; }
.community-media {
  border-color: rgba(79, 147, 119, .3);
  border-radius: 16px;
}
.media-credits { color: #a2bdb1; }

/* Fixed member navigation remains usable above device safe areas. */
.nav {
  position: fixed;
  z-index: 50;
  bottom: 0;
  left: 50%;
  width: min(100%, 560px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateX(-50%);
  background: rgba(5, 24, 24, .96);
  border-top-color: rgba(83, 157, 125, .32);
  backdrop-filter: blur(15px);
}
.navin { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
.nav a { min-height: 42px; color: #a2b9ad; }
.nav a.active { color: #78dfa2; }
.foot { color: #789589; }

@media (max-width: 620px) {
  .app {
    padding-top: calc(63px + env(safe-area-inset-top, 0px));
  }
  .plan-card {
    grid-template-columns: minmax(94px, 34%) minmax(0, 1fr);
  }
  .home-metrics > a { padding: 8px 6px; }
}
@media (max-width: 370px) {
  .home-metrics { grid-template-columns: 1fr 1fr; }
  .home-metrics > a:last-child { grid-column: 1 / -1; }
  .home-quick-links { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .team-level-summary { gap: 5px; }
  .plan-card { grid-template-columns: 94px minmax(0, 1fr); }
  .device-card { grid-template-columns: 84px minmax(0, 1fr); }
  .device-photo img { height: 88px; }
  .salary-task { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .app *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

.plan-catalog-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0 0 12px;
  padding: 5px;
  border: 1px solid rgba(112, 204, 156, .24);
  border-radius: 14px;
  background: rgba(3, 20, 18, .72);
}
.plan-catalog-tabs a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #b5d2c3;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.plan-catalog-tabs a.active {
  color: #e7fff0;
  background: linear-gradient(135deg, #12603f, #0b3d3e);
  border-color: rgba(111, 237, 159, .55);
}
.home-financial-plan-link { color: #e9fff0 !important; }
.home-financial-plan-link > span { color: #78dfa2 !important; }

@media (max-width: 620px) {
  body .app .plans-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 13px;
  }
  body .app .plan-card {
    grid-template-columns: 84px minmax(0, 1fr) !important;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
  }
  body .app .plan-photo-wrap {
    width: 84px;
    height: 84px;
    min-height: 84px;
    align-self: start;
  }
  body .app .plan-card .plan-photo {
    width: 84px;
    height: 84px;
    min-height: 84px;
    border-radius: 12px;
    object-fit: cover;
  }
  body .app .plan-info {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 10px;
  }
  body .app .plan-title-row,
  body .app .plan-desc,
  body .app .plan-price,
  body .app .plan-total,
  body .app .plan-limit,
  body .app .plan-benefits { grid-column: 1 / -1; }
  body .app .plan-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
  }
  body .app .plan-title-row { align-items: flex-start; }
  body .app .plan-join { grid-column: 1 / -1; width: 100%; min-height: 46px; }
}

body .app .financial-plans-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  align-items: stretch;
}
body .app .financial-plan-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(93, 211, 177, .48);
  border-radius: 22px;
  background: linear-gradient(150deg, #123c38 0%, #092c30 58%, #091c29 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  color: #eefcf7;
}
body .app .financial-plan-head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
body .app .financial-plan-head img {
  width: 78px;
  height: 78px;
  border: 1px solid rgba(125, 233, 193, .72);
  border-radius: 15px;
  object-fit: cover;
}
body .app .financial-plan-image-placeholder {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 1px solid rgba(125, 233, 193, .72);
  border-radius: 15px;
  background: linear-gradient(145deg, #184b47, #0d2832);
  color: #85e5c2;
  font-size: 30px;
}
body .app .financial-plan-kicker {
  color: #91dfc6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
body .app .financial-plan-head h2 {
  margin: 5px 0 4px;
  font-size: 18px;
  line-height: 1.18;
}
body .app .financial-plan-price {
  color: #68ddb0;
  font-size: 21px;
}
body .app .financial-plan-description {
  min-height: 22px;
  margin: 12px 0;
  color: #c3d5d4;
  font-size: 13px;
}
body .app .financial-plan-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(178, 217, 238, .45);
  border-radius: 14px;
  background: rgba(212, 233, 249, .18);
}
body .app .financial-plan-metrics > div {
  display: flex;
  min-height: 60px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 9px;
  background: #eef6ff;
  color: #152638;
}
body .app .financial-plan-metrics span {
  color: #526478;
  font-size: 11px;
  line-height: 1.2;
}
body .app .financial-plan-metrics b {
  color: #b54450;
  font-size: 15px;
  line-height: 1.2;
}
body .app .financial-plan-note,
body .app .financial-plan-limit {
  display: block;
  margin-top: 9px;
  color: #b8cece;
  font-size: 11px;
  line-height: 1.4;
}
body .app .financial-plan-actions {
  display: grid;
  grid-template-columns: minmax(92px, .75fr) minmax(0, 1.25fr);
  gap: 9px;
  margin-top: 13px;
}
body .app .financial-plan-actions .btn {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 24px;
  text-align: center;
}
body .app .financial-plan-actions .btn:not(.outline) {
  background: #ff843d;
  color: #fff;
}
body .app .finance-back-link {
  display: inline-block;
  margin: 0 0 12px;
  color: #8edfc5;
  font-weight: 700;
}
body .app .finance-plan-detail-placeholder {
  display: grid;
  min-height: 150px;
  margin: 8px 0 14px;
  place-items: center;
  border: 1px solid rgba(125, 233, 193, .4);
  border-radius: 18px;
  background: linear-gradient(145deg, #123c38, #091c29);
  color: #85e5c2;
  font-size: 46px;
}
body .app .finance-detail-row b { color: #cf6472; }
body .app .finance-detail-note {
  margin-top: 10px;
  color: #849ba7;
  font-size: 12px;
  line-height: 1.45;
}
body .app .finance-device-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 12px;
}
body .app .finance-device-stats b {
  overflow-wrap: anywhere;
  text-align: right;
}
@media (max-width: 600px) {
  body .app .financial-plans-grid { grid-template-columns: minmax(0, 1fr); }
  body .app .financial-plan-card { padding: 12px; border-radius: 18px; }
  body .app .financial-plan-head { grid-template-columns: 68px minmax(0, 1fr); gap: 10px; }
  body .app .financial-plan-head img { width: 68px; height: 68px; }
  body .app .financial-plan-image-placeholder { width: 68px; height: 68px; }
}

/* RPGK catalog cards: clear, scanable metrics and mobile-first action hierarchy. */
body .app .product-catalog-hero { margin-bottom: 12px; }
body .app .plan-catalog-tabs { margin: 10px 0 12px; }
body .app .rpgk-product-card {
  --tone: #56d39a;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(91, 211, 159, .38);
  border-radius: 19px;
  color: #edf7f1;
  background:
    radial-gradient(ellipse at 100% 0, rgba(79, 199, 145, .12), transparent 42%),
    linear-gradient(145deg, #103632, #0a2425 76%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .035);
}
body .app .rpgk-product-top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
body .app .rpgk-product-image,
body .app .rpgk-product-image-placeholder {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 1px solid rgba(113, 220, 175, .46);
  border-radius: 15px;
  object-fit: cover;
  background: linear-gradient(145deg, #16483b, #0b2428);
  color: #8be2b5;
  font-size: 35px;
}
body .app .rpgk-product-heading { min-width: 0; }
body .app .rpgk-product-kicker { color: #8dd9b4; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
body .app .rpgk-product-heading h2 { margin: 5px 0 6px; color: #f2fbf5; font-size: 17px; line-height: 1.22; overflow-wrap: anywhere; }
body .app .rpgk-product-price { display: block; color: #76e0a5; font-size: 22px; font-variant-numeric: tabular-nums; }
body .app .rpgk-product-description { margin: 0; color: #b5cec0; font-size: 12px; line-height: 1.5; }
body .app .rpgk-product-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(102, 174, 139, .24);
  border-radius: 14px;
  background: rgba(7, 26, 27, .72);
}
body .app .rpgk-product-metrics > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 10px; background: rgba(13, 46, 42, .74); }
body .app .rpgk-product-metrics span { color: #a9c3b5; font-size: 10px; line-height: 1.25; }
body .app .rpgk-product-metrics b { color: #eff9f2; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
body .app .rpgk-product-metrics > div:nth-child(4) b { color: #87e5ae; }
body .app .rpgk-product-actions { display: grid; grid-template-columns: .85fr 1.15fr; gap: 9px; }
body .app .rpgk-product-actions .btn { display: grid; min-height: 45px; place-items: center; font-weight: 800; text-decoration: none; }
body .app .rpgk-product-actions .btn:not(.outline) { color: #08251e; background: linear-gradient(115deg, #71e2a7, #46c88e); }
body .app .rpgk-product-detail-card { padding: 15px; border-color: rgba(91, 211, 159, .32); }
body .app .rpgk-product-detail-card > .row { display: flex; align-items: center; justify-content: space-between; padding: 11px 1px; border-bottom: 1px solid rgba(102, 174, 139, .18); }
body .app .rpgk-product-detail-card > .row span { color: #aec8b8; font-size: 12px; }
body .app .rpgk-product-detail-card > .row b { color: #e9f6ed; text-align: right; font-variant-numeric: tabular-nums; }
body .app .rpgk-product-detail-card > .row b.stat,
body .app .rpgk-product-detail-card > .row.plan-points-detail b { color: #80e1a8; }
body .app .rpgk-product-detail-card form { margin-top: 14px; }
body .app .rpgk-product-detail-card form .btn { color: #08251e; background: linear-gradient(115deg, #71e2a7, #46c88e); font-weight: 850; }
body .app .rpgk-product-detail-placeholder {
  display: grid;
  min-height: 170px;
  margin: 8px 0 14px;
  place-items: center;
  border: 1px solid rgba(113, 220, 175, .4);
  border-radius: 16px;
  background: linear-gradient(145deg, #16483b, #0b2428);
  color: #8be2b5;
  font-size: 42px;
}
body .app .point-task-card { display: grid; gap: 12px; padding: 14px; }
body .app .point-task-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
body .app .point-task-title { min-width: 0; }
body .app .point-task-type { display: block; margin-bottom: 4px; color: #83d4b3; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
body .app .point-task-reward-box { display: flex; flex-direction: column; align-items: flex-end; padding: 7px 9px; border: 1px solid rgba(106, 217, 159, .34); border-radius: 12px; background: rgba(24, 102, 66, .18); }
body .app .point-task-reward-box small { color: #a8c9b7; font-size: 9px; }
body .app .point-task-reward-box b { color: #8ce3ad; font-size: 18px; line-height: 1.1; }
body .app .point-task-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; border: 1px solid rgba(79, 147, 119, .2); border-radius: 12px; background: rgba(5, 23, 24, .55); }
body .app .point-task-progress span { display: flex; align-items: center; justify-content: center; gap: 5px; color: #789387; font-size: 10px; }
body .app .point-task-progress i { display: grid; width: 19px; height: 19px; place-items: center; border: 1px solid #35564a; border-radius: 50%; color: #9bb5a7; font-size: 9px; font-style: normal; }
body .app .point-task-progress span.active { color: #a9e6c0; }
body .app .point-task-progress span.active i { border-color: #5fcf91; color: #09271e; background: #69d99a; }
body .app .point-task-open { display: block; margin: 0; text-align: center; text-decoration: none; }
body .app .point-task-availability { color: #8da99a; font-size: 10px; text-align: center; }
body .app .point-task-form { display: grid; gap: 8px; }
body .app .point-task-form label { color: #b6d0c0; font-size: 11px; font-weight: 700; }
body .app .point-task-form textarea { width: 100%; padding: 10px; color: #edf7f1; background: #081f20; border: 1px solid #285e51; border-radius: 11px; resize: vertical; }
@media (max-width: 390px) {
  body .app .rpgk-product-top { grid-template-columns: 78px minmax(0, 1fr); }
  body .app .rpgk-product-image,
  body .app .rpgk-product-image-placeholder { width: 78px; height: 78px; }
  body .app .point-task-head { grid-template-columns: 38px minmax(0, 1fr); }
  body .app .point-task-reward-box { grid-column: 2; align-items: flex-start; width: fit-content; }
}

/* Tactile RPGK plan surfaces with lightweight, motion-safe feedback. */
body .app .financial-plan-card,
body .app .rpgk-product-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(108, 226, 174, .44);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .075), inset 0 -1px rgba(0, 0, 0, .24);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
body .app .financial-plan-card.is-closed {
  border-color: rgba(157, 176, 185, .38);
  background: linear-gradient(150deg, #263a3a 0%, #172a31 58%, #111f29 100%);
}
body .app .financial-plan-actions .btn:disabled,
body .app .financial-plan-actions .btn[aria-disabled="true"] {
  border-color: rgba(196, 207, 211, .22);
  color: #d1dadd;
  background: linear-gradient(110deg, #647078, #4d5a61);
  box-shadow: none;
  cursor: not-allowed;
  opacity: .82;
}
body .app .financial-plan-card::before,
body .app .rpgk-product-card::before {
  position: absolute;
  z-index: 0;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 255, 240, .5), transparent);
  content: "";
  pointer-events: none;
}
body .app .financial-plan-card > *,
body .app .rpgk-product-card > * { position: relative; z-index: 1; }
body .app .financial-plan-card:active,
body .app .rpgk-product-card:active {
  transform: translateY(1px) scale(.992);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .22), inset 0 2px 8px rgba(0, 0, 0, .18);
}
body .app .financial-plan-metrics > div,
body .app .rpgk-product-metrics > div {
  transition: background-color .18s ease, box-shadow .18s ease;
}
body .app .financial-plan-actions .btn,
body .app .rpgk-product-actions .btn,
body .app .rpgk-product-detail-card form .btn {
  min-height: 46px;
  border: 1px solid rgba(197, 255, 224, .2);
  border-radius: 14px;
  box-shadow: 0 5px 13px rgba(4, 14, 12, .24), inset 0 1px rgba(255, 255, 255, .19);
  transition: transform .14s ease, filter .14s ease, box-shadow .14s ease;
  touch-action: manipulation;
}
body .app .financial-plan-actions .btn:active,
body .app .rpgk-product-actions .btn:active,
body .app .rpgk-product-detail-card form .btn:active {
  transform: translateY(1px) scale(.985);
  filter: brightness(.94);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .22);
}
body .app .rpgk-sound-toggle {
  display: inline-grid;
  min-width: 42px;
  min-height: 38px;
  margin: 0 5px;
  place-items: center;
  border: 1px solid rgba(105, 224, 171, .38);
  border-radius: 13px;
  color: #a9f0c8;
  background: linear-gradient(145deg, #10463a, #092821);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .12);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
body .app .rpgk-sound-toggle:focus-visible,
body .app .financial-plan-actions .btn:focus-visible,
body .app .rpgk-product-actions .btn:focus-visible {
  outline: 2px solid #a7f3c9;
  outline-offset: 3px;
}
body .app .finance-purchase-form {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(103, 220, 168, .34);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(18, 60, 50, .8), rgba(7, 29, 31, .92));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 10px 24px rgba(0, 0, 0, .18);
}
body .app .finance-purchase-form label {
  color: #d5eee0;
  font-size: 13px;
  font-weight: 800;
}
body .app .finance-purchase-form input {
  width: 100%;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid rgba(131, 225, 180, .5);
  border-radius: 12px;
  outline: none;
  color: #f2fff6;
  background: #071c21;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
body .app .finance-purchase-form input:focus {
  border-color: #8ce8b4;
  box-shadow: 0 0 0 3px rgba(89, 210, 145, .15);
}
body .app .finance-range-hint { color: #a7c6b5; font-size: 11px; line-height: 1.45; }
body .app .finance-return-preview {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(98, 184, 139, .24);
  border-radius: 11px;
  color: #aecbb9;
  background: rgba(4, 21, 23, .55);
  font-size: 12px;
}
body .app .finance-return-preview b { color: #8be6ae; font-variant-numeric: tabular-nums; }
body .app .finance-purchase-form .btn { color: #08251e; background: linear-gradient(115deg, #71e2a7, #46c88e); font-weight: 900; }
@media (hover: hover) {
  body .app .financial-plan-card:hover,
  body .app .rpgk-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(130, 241, 190, .7);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .09);
  }
}
@media (prefers-reduced-motion: reduce) {
  body .app .financial-plan-card,
  body .app .rpgk-product-card,
  body .app .financial-plan-metrics > div,
  body .app .rpgk-product-metrics > div,
  body .app .financial-plan-actions .btn,
  body .app .rpgk-product-actions .btn,
  body .app .rpgk-product-detail-card form .btn { transition: none; }
}

.finance-modal[hidden] { display: none !important; }
.finance-modal {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.finance-modal.is-open { opacity: 1; visibility: visible; }
.finance-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 10, 13, .68);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.finance-modal-sheet {
  position: relative;
  width: min(620px, 100%);
  max-height: min(88dvh, 760px);
  overflow: auto;
  margin: 0 auto;
  padding: 28px 22px calc(22px + env(safe-area-inset-bottom));
  border: 1px solid rgba(137, 235, 190, .28);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  color: #edfff4;
  background: linear-gradient(150deg, #123d35, #08252d 62%, #071b26);
  box-shadow: 0 -24px 80px rgba(0, 0, 0, .4), inset 0 1px rgba(255, 255, 255, .09);
  transform: translateY(24px);
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
}
.finance-modal.is-open .finance-modal-sheet { transform: translateY(0); }
.finance-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(220, 255, 238, .24);
  border-radius: 50%;
  color: #eafff3;
  background: rgba(4, 19, 24, .72);
  font-size: 24px;
  line-height: 1;
}
.finance-modal-sheet > .financial-plan-kicker { display: block; margin-right: 46px; }
.finance-modal-sheet h2 {
  margin: 7px 40px 22px 0;
  color: #f2fff7;
  font-size: clamp(22px, 6vw, 29px);
  line-height: 1.2;
}
.finance-modal-form { display: grid; gap: 12px; }
.finance-modal-form > label { color: #b9d9c9; font-size: 14px; font-weight: 750; }
.finance-modal-input-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 0 15px;
  border: 1px solid rgba(133, 230, 184, .42);
  border-radius: 16px;
  background: rgba(4, 19, 24, .66);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}
.finance-modal-input-wrap:focus-within { border-color: #91edbd; box-shadow: 0 0 0 3px rgba(111, 224, 165, .15); }
.finance-modal-input-wrap > span { color: #91edbd; font-size: 20px; font-weight: 800; }
.finance-modal-input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #f4fff7;
  background: transparent;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.finance-modal-form > small { color: #a8c8b7; font-size: 12px; line-height: 1.5; }
.finance-modal-estimate {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(133, 230, 184, .22);
  border-radius: 15px;
  color: #bed8c8;
  background: rgba(14, 57, 45, .55);
}
.finance-modal-estimate b { color: #89e8ae; font-size: 20px; font-variant-numeric: tabular-nums; }
.finance-modal-submit {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  color: #06271d;
  background: linear-gradient(110deg, #8af0b8, #43cb91);
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(42, 193, 128, .22);
}
body.finance-modal-open { overflow: hidden; }
@media (min-width: 700px) {
  .finance-modal { align-items: center; padding: 24px; }
  .finance-modal-sheet { border-bottom: 1px solid rgba(137, 235, 190, .28); border-radius: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .finance-modal, .finance-modal-sheet { transition: none; }
}
