:root {
  --ink: #223d37;
  --muted: #647a72;
  --green: #226e59;
  --green-dark: #164e40;
  --mint: #e6f3ec;
  --line: #e0e9e4;
  --bg: #f5f8f6;
  --white: #fff;
  --amber: #a16a15;
  --red: #b0473c;
  --shadow: 0 6px 28px #183d2f05;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.65 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
a {
  color: var(--green);
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #c78b26;
  outline-offset: 4px;
}
input:focus,
select:focus {
  outline: 2px solid #73ad97;
  outline-offset: 1px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  line-height: 1.4;
  font-weight: 750;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}
h2 {
  font-size: 1.15rem;
  line-height: 1.5;
  margin-bottom: 10px;
}
p {
  margin-bottom: 12px;
}
small {
  font-size: 0.875rem;
}
strong {
  font-weight: 650;
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 0.875rem;
  margin: 9px 0;
}
.grow {
  flex: 1;
  min-width: 0;
}
.positive {
  color: var(--green);
}
.negative,
.danger {
  color: var(--red) !important;
}
.eyebrow,
.tiny-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 12px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  padding: 32px 22px 20px;
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: 0.03em;
}
.brand-icon {
  width: 44px;
  height: 44px;
  background: var(--green);
  border-radius: 14px;
  color: #ffdf91;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 3px;
}
.family-label {
  padding: 30px 12px 20px;
  overflow-wrap: anywhere;
}
.family-label .tiny-label {
  margin: 0 0 5px;
}
.family-label strong {
  font-size: 1rem;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  color: #60776e;
  border-radius: 11px;
  font-size: 0.95rem;
}
nav a:hover {
  background: #f4f8f5;
}
nav a.active {
  background: var(--mint);
  color: var(--green);
  font-weight: 650;
}
.nav-icon {
  font-size: 1.35rem;
  width: 22px;
  text-align: center;
}
.sidebar-note {
  margin-top: auto;
  padding: 24px 12px;
  color: var(--muted);
  font-size: 0.875rem;
}
.sidebar-note > span {
  font-size: 2rem;
  color: #bd9b45;
}
.sidebar-note p {
  margin: 5px 0;
}
.account-link {
  border-top: 1px solid var(--line);
  padding: 20px 3px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.account-link span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-link small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.avatar {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #eff0df;
  color: #68733a;
  display: inline-grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 650;
}
.avatar.small {
  width: 38px;
  height: 38px;
}
.avatar.tiny {
  width: 30px;
  height: 30px;
  font-size: 0.875rem;
}
.main-wrap {
  margin-left: 246px;
}
.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 42px;
  border-bottom: 1px solid var(--line);
  background: #ffffffa8;
  font-size: 0.875rem;
}
.topbar form {
  margin: 0;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 8px 4px;
  font-size: 0.875rem;
}
.text-button:hover {
  text-decoration: underline;
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 36px 42px 16px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading p {
  color: var(--muted);
  margin: 0;
}
.heading-star {
  color: #c99835;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--green);
  color: white;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  min-height: 44px;
}
.button:hover {
  background: var(--green-dark);
}
.button.secondary {
  background: white;
  border-color: #cddfd4;
  color: var(--green);
}
.button.secondary:hover {
  background: #f0f7f2;
}
.button.white {
  background: white;
  color: var(--green-dark);
}
.button.compact {
  padding: 7px 12px;
  font-size: 0.875rem;
  min-height: 38px;
}
.full {
  width: 100%;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  min-width: 0;
}
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-heading h2 {
  margin-bottom: 4px;
}
.section-heading p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}
.subtle-link {
  font-size: 0.875rem;
  font-weight: 550;
  white-space: nowrap;
}
.child-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.child-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 7px 14px 7px 7px;
  background: white;
  color: var(--muted);
}
.child-tab.selected {
  border-color: #7eaa96;
  background: #edf6ee;
  color: var(--green);
}
.tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-left: 8px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 24px;
}
.balance-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--green);
  border-radius: 17px;
  color: white;
  padding: 30px 32px;
  margin-bottom: 24px;
  min-height: 290px;
}
.balance-card:after {
  content: "";
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid #ffffff17;
  position: absolute;
  right: -125px;
  top: -130px;
  z-index: -1;
}
.balance-label {
  margin: 18px 0 0;
  color: #d7e8df;
  font-size: 0.875rem;
}
.balance {
  font-size: 4rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.balance > span {
  font-size: 0.95rem;
  letter-spacing: 0;
  margin-left: 12px;
  font-weight: 400;
  color: #d9e9e0;
}
.balance-card p:last-of-type {
  margin: 12px 0 23px;
  color: #d9e9e0;
  font-size: 0.875rem;
}
.balance-star {
  position: absolute;
  right: 26px;
  top: 50px;
  color: #ffdf91;
  font-size: 10rem;
  line-height: 1;
  transform: rotate(10deg);
  z-index: -1;
  text-shadow: 17px 12px #ffffff0b;
}
.pill {
  display: inline-block;
  background: #f0f4f1;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.pill.light {
  background: #ffffff16;
  color: #e9f2ed;
}
.pill.amber {
  background: #fff2da;
  color: #926119;
}
.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.rule-grid form {
  min-width: 0;
}
.rule-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 14px 12px;
  background: #fafcfb;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--ink);
}
.rule-button:hover {
  border-color: #90bda6;
  background: #f0f8f2;
}
.rule-button > span:nth-child(2) {
  flex: 1;
}
.rule-symbol {
  background: var(--mint);
  color: var(--green);
  border-radius: 9px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex-shrink: 0;
}
.rule-button strong {
  font-size: 1rem;
}
.custom-points {
  margin-top: 20px;
  border-top: 1px dashed var(--line);
  padding-top: 15px;
}
summary {
  color: var(--green);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 6px 0;
}
.activity {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid #edf1ed;
}
.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mint {
  background: #e8f4eb;
  color: var(--green);
}
.peach {
  background: #fbefe5;
  color: #a27246;
}
.activity strong {
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}
.activity small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.8rem;
}
.activity .points {
  font-size: 1.1rem;
}
.rank-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #edf1ed;
  font-size: 0.9rem;
}
.rank-mini:last-of-type {
  margin-bottom: 20px;
}
.rank-number {
  color: #9a8150;
  font-size: 1rem;
  min-width: 17px;
}
.rank-mini strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.rank-mini strong small {
  color: #b69b5e;
}
.pending-count {
  font-size: 2.6rem;
  font-weight: 650;
  margin: 12px 0;
  color: var(--green);
}
.pending-count span {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 10px;
}
.quote-card {
  background: #f0f1e7;
  padding: 22px 25px;
  border-radius: 16px;
  color: #6c765e;
}
.quote-card > span {
  font-family: Georgia, serif;
  font-size: 3.5rem;
  line-height: 1;
  color: #a3ad89;
}
.quote-card p {
  line-height: 1.9;
  font-size: 0.95rem;
}
.quote-card small {
  font-size: 0.75rem;
  color: #7f896d;
}
.notice {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.notice.success {
  background: #e2f2e6;
  color: #245b3d;
  border: 1px solid #bedfc8;
}
.notice.info {
  background: #eaf0f7;
  color: #53687e;
  border: 1px solid #dce6f0;
}
label {
  display: block;
  font-size: 0.9rem;
  font-weight: 550;
  color: #455e54;
}
input,
select {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d8e3dc;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 1rem;
  min-height: 46px;
  margin-top: 6px;
}
input::placeholder {
  color: #84958c;
  font-size: 0.9rem;
}
input[readonly] {
  background: #f5f8f5;
  font-family: monospace;
  font-size: 0.875rem;
}
select {
  padding-right: 30px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
}
.inline-form {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 18px;
}
.inline-form label:not(.grow) {
  flex: 0 1 165px;
}
.inline-form .grow {
  flex: 1 1 220px;
}
.separated {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 18px;
}
.member-card {
  padding: 20px;
  background: #fafcfb;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.member-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.member-title small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.member-title strong {
  overflow-wrap: anywhere;
}
.member-card .stack {
  margin-top: 12px;
}
.rule-row {
  display: flex;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 0.9rem;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
}
th {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  padding: 12px 14px;
  background: #f7faf7;
  white-space: nowrap;
}
td {
  padding: 17px 14px;
  border-bottom: 1px solid var(--line);
  min-width: 100px;
}
td:nth-child(2) {
  min-width: 200px;
  overflow-wrap: anywhere;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.8rem;
}
.points {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pagination {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 25px;
  font-size: 0.875rem;
  color: var(--muted);
}
.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.reward-card {
  padding: 0;
  overflow: hidden;
}
.reward-art {
  height: 120px;
  display: grid;
  place-items: center;
  font-size: 4.5rem;
}
.color-0 {
  background: #e3f0e7;
  color: #74a18a;
}
.color-1 {
  background: #fcf0d6;
  color: #c49a43;
}
.color-2 {
  background: #e9eaf6;
  color: #9290bd;
}
.color-3 {
  background: #f9e8df;
  color: #c48e70;
}
.reward-content {
  padding: 22px;
}
.reward-content h2 {
  overflow-wrap: anywhere;
}
.reward-cost {
  font-size: 1.6rem;
  color: var(--green);
  font-weight: 650;
}
.reward-cost span {
  font-size: 0.8rem;
  font-weight: 400;
  margin-left: 7px;
  color: var(--muted);
}
.reward-card .stack {
  gap: 10px;
  margin-top: 12px;
}
.redemption {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.redemption .grow {
  flex: 1 1 180px;
  overflow-wrap: anywhere;
}
.redemption small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.actions.centered {
  justify-content: center;
}
.rank-filter {
  margin: 0 0 28px;
}
.rank-filter label:first-child {
  flex: 1 1 200px;
}
.rank-banner {
  display: flex;
  gap: 20px;
  align-items: center;
  background: #edf5ed;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.rank-banner > span {
  font-size: 3rem;
  color: #a18442;
}
.rank-banner h2 {
  margin: 0 0 5px;
}
.rank-banner p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--muted);
}
.ranking-row {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 22px 12px;
  border-bottom: 1px solid var(--line);
}
.rank-medal {
  width: 34px;
  height: 38px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--muted);
  border-radius: 8px;
  flex-shrink: 0;
}
.top-1 {
  background: #fff0c9;
  color: #9c7621;
}
.top-2 {
  background: #e7eef2;
  color: #647c8e;
}
.top-3 {
  background: #f5e8dd;
  color: #a1724d;
}
.ranking-row strong {
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.ranking-row small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}
.rank-score {
  font-size: 1.8rem;
  font-weight: 650;
  color: var(--green);
  white-space: nowrap;
}
.rank-score small {
  display: inline;
  font-size: 1rem;
  color: #bba15b;
  margin-left: 7px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.checkboxes {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: var(--green);
}
.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
}
.empty h2,
.empty h1 {
  color: var(--ink);
}
.empty p {
  max-width: 500px;
  margin: 10px auto 22px;
}
.empty.big {
  padding: 70px 25px;
}
.empty-icon {
  font-size: 4rem;
  color: #bba361;
  display: block;
  margin-bottom: 15px;
}
.error-card {
  max-width: 650px;
  margin: 30px auto;
}
.narrow {
  max-width: 580px;
}
.page-footer {
  color: #84928b;
  font-size: 0.75rem;
  text-align: center;
  padding: 30px 0 16px;
}
.page-footer span {
  padding: 0 10px;
  color: #b69b60;
}
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 6vw;
  background: white;
  border-bottom: 1px solid var(--line);
}
.auth-header > .muted {
  font-size: 0.875rem;
}
.auth-main {
  max-width: 1200px;
  padding: 54px 30px 15px;
}
.auth-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 70px;
  align-items: center;
}
.auth-story h1 {
  font-size: 2.8rem;
  line-height: 1.55;
  letter-spacing: -0.05em;
  margin: 18px 0 23px;
}
.auth-story > p {
  color: var(--muted);
  line-height: 1.9;
}
.auth-card {
  padding: 36px;
  margin-bottom: 0;
}
.auth-card h2 {
  font-size: 1.7rem;
}
.auth-card > .muted {
  font-size: 0.9rem;
}
.auth-switch {
  text-align: center;
  margin: 24px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.auth-switch a {
  font-weight: 600;
}
.auth-card > .hint {
  text-align: center;
  margin-top: 18px;
}
.auth-features {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.8rem;
}
.auth-features span:before {
  content: "✓";
  color: var(--green);
  margin-right: 5px;
}
.star-art {
  height: 250px;
  position: relative;
  display: grid;
  place-items: center;
  max-width: 400px;
  margin: 20px 0 30px;
}
.orbit {
  position: absolute;
  border: 1px solid #c7dbca;
  border-radius: 50%;
  width: 220px;
  height: 220px;
}
.orbit-two {
  width: 320px;
  height: 170px;
  transform: rotate(-25deg);
  border-style: dashed;
}
.big-star {
  font-size: 10rem;
  line-height: 1;
  color: #e4bb62;
  transform: rotate(12deg);
  text-shadow: 12px 12px #e7eedf;
}
.mini-star {
  position: absolute;
  color: var(--green);
}
.mini-star.one {
  left: 25px;
  top: 50px;
  font-size: 2rem;
}
.mini-star.two {
  right: 30px;
  top: 15px;
  font-size: 1.5rem;
}
.floating-note {
  position: absolute;
  bottom: 10px;
  right: 5px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 8px 25px #234b3610;
  padding: 12px 20px;
  border-radius: 12px;
  color: var(--green);
  font-size: 0.9rem;
  transform: rotate(-4deg);
}
@media (min-width: 1550px) {
  main {
    padding-top: 45px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .balance-card {
    min-height: 310px;
  }
  .balance-star {
    right: 50px;
    top: 55px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 215px;
    padding: 28px 15px;
  }
  .main-wrap {
    margin-left: 215px;
  }
  main {
    padding: 28px 25px 15px;
  }
  .topbar {
    padding: 15px 25px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 18px;
  }
  .panel {
    padding: 20px;
  }
  .rule-grid {
    grid-template-columns: 1fr;
  }
  .reward-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .balance-star {
    font-size: 8rem;
    right: 12px;
    top: 70px;
  }
  .balance-card {
    padding: 25px;
  }
  .page-heading > .button {
    display: none;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
    display: block;
    padding: 18px 22px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    font-size: 1.15rem;
  }
  .sidebar .brand small {
    display: none;
  }
  .sidebar .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
    border-radius: 11px;
  }
  .family-label,
  .sidebar-note {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 5px;
    margin-top: 16px;
    padding-bottom: 4px;
  }
  .sidebar nav a {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.875rem;
    padding: 8px 12px;
  }
  .nav-icon {
    font-size: 1.1rem;
    width: 16px;
  }
  .account-link {
    position: absolute;
    top: 19px;
    right: 22px;
    border: 0;
    padding: 0;
    font-size: 0.875rem;
  }
  .account-link small,
  .account-link > span:last-child {
    display: none;
  }
  .account-link .avatar {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  .main-wrap {
    margin-left: 0;
  }
  .topbar {
    min-height: 53px;
    font-size: 0.8rem;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .auth-grid {
    gap: 35px;
  }
  .auth-story h1 {
    font-size: 2.2rem;
  }
  .auth-main {
    padding-top: 35px;
  }
  .auth-card {
    padding: 25px;
  }
}
@media (max-width: 650px) {
  body {
    font-size: 16px;
  }
  main {
    padding: 24px 16px 10px;
  }
  .sidebar {
    padding: 15px 16px 8px;
  }
  .sidebar nav {
    margin-top: 15px;
  }
  .account-link {
    right: 16px;
    top: 17px;
  }
  .account-link > span:nth-child(2) {
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar {
    padding: 10px 16px;
  }
  .topbar .muted {
    display: none;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  .page-heading p {
    font-size: 0.9rem;
  }
  .eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
  }
  .dashboard-grid {
    display: block;
  }
  .dashboard-side {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .dashboard-side .quote-card {
    display: none;
  }
  .panel {
    padding: 20px 17px;
    margin-bottom: 18px;
    border-radius: 13px;
  }
  .balance-card {
    padding: 25px;
    min-height: 280px;
    border-radius: 14px;
  }
  .balance-star {
    font-size: 9rem;
    right: 18px;
    top: 57px;
  }
  .balance {
    font-size: 3.8rem;
  }
  .rule-grid {
    grid-template-columns: 1fr;
  }
  .activity {
    gap: 10px;
  }
  .two-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .reward-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .reward-content {
    padding: 15px 12px;
  }
  .reward-content h2 {
    font-size: 1rem;
  }
  .reward-art {
    height: 95px;
    font-size: 3.5rem;
  }
  .reward-cost {
    font-size: 1.4rem;
  }
  .reward-card .button {
    padding: 10px;
    font-size: 0.875rem;
  }
  .reward-card label {
    font-size: 0.8rem;
  }
  .reward-card select {
    font-size: 0.875rem;
  }
  .reward-card {
    padding: 0;
  }
  .inline-form {
    align-items: stretch;
  }
  .inline-form label:not(.grow) {
    flex: 1 1 120px;
  }
  .inline-form .grow {
    flex: 1 1 100%;
  }
  .inline-form > .button {
    align-self: flex-end;
  }
  .member-grid {
    grid-template-columns: 1fr;
  }
  .rank-filter {
    gap: 12px;
  }
  .rank-filter label:first-child {
    flex: 1 1 100%;
  }
  .ranking-row {
    gap: 10px;
    padding: 18px 0;
  }
  .ranking-row .avatar {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  .rank-score {
    font-size: 1.5rem;
  }
  .rank-banner {
    padding: 18px;
    gap: 12px;
  }
  .rank-banner > span {
    font-size: 2.5rem;
  }
  .rank-banner h2 {
    font-size: 1rem;
  }
  .ranking-row small {
    font-size: 0.75rem;
  }
  .auth-header {
    padding: 18px 22px;
  }
  .auth-header > .muted {
    display: none;
  }
  .auth-grid {
    display: block;
  }
  .auth-story {
    padding: 0 8px 10px;
  }
  .auth-story h1 {
    font-size: 1.8rem;
    margin: 12px 0;
  }
  .auth-story > p {
    font-size: 0.9rem;
  }
  .star-art,
  .auth-features {
    display: none;
  }
  .auth-main {
    padding: 28px 18px 15px;
  }
  .auth-card {
    padding: 25px 22px;
  }
  .auth-card h2 {
    font-size: 1.5rem;
  }
  .table-wrap {
    margin: 0 -8px;
  }
  .section-heading {
    gap: 10px;
  }
  .subtle-link {
    font-size: 0.8rem;
  }
  .redemption {
    gap: 12px;
  }
  .page-footer {
    padding-top: 23px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button,
  .rule-button,
  nav a {
    transition:
      background 0.15s,
      border-color 0.15s;
  }
}
