:root {
  --ink: #1d2822;
  --muted: #6d7872;
  --line: #dfe5e1;
  --panel: #ffffff;
  --canvas: #f1f5f2;
  --green: #08b85b;
  --green-deep: #087c40;
  --green-soft: #e9f8ef;
  --amber: #a96f13;
  --danger: #b93832;
  --font-body: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(43, 77, 59, 0.045) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(43, 77, 59, 0.045) 23px 24px),
    var(--canvas);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.account-narrow-main {
  width: min(760px, calc(100% - 36px));
}

.account-home-main {
  width: min(1040px, calc(100% - 36px));
}

.account-home-heading {
  max-width: 680px;
}

.account-home-layout {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
}

.home-identity-card {
  position: relative;
  justify-content: flex-start;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(233, 248, 239, 0.88), rgba(255, 255, 255, 0.96) 45%),
    var(--panel);
}

.home-identity-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), #55c98a);
  content: "";
}

.home-token-link {
  width: 100%;
  margin-top: 16px;
}

.account-menu-card {
  overflow: hidden;
}

.account-menu-list {
  display: grid;
}

.account-menu-item {
  display: grid;
  min-height: 92px;
  align-items: center;
  padding: 17px 22px;
  border-bottom: 1px solid #edf0ee;
  grid-template-columns: 46px minmax(0, 1fr) 20px;
  gap: 15px;
  transition: background 150ms ease;
}

.account-menu-item:last-child {
  border-bottom: 0;
}

.account-menu-item:hover {
  background: #f7fbf8;
}

.account-menu-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #cce5d6;
  border-radius: 10px;
  color: var(--green-deep);
  background: var(--green-soft);
}

.account-menu-icon svg,
.account-menu-arrow {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.7;
}

.account-menu-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.account-menu-copy strong {
  font-size: 15px;
}

.account-menu-copy small {
  color: var(--muted);
  font-size: 12px;
}

.account-menu-arrow {
  width: 18px;
  height: 18px;
  color: #89948e;
  stroke-width: 1.8;
}

body[data-page="settings"] .profile-settings-card {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

.auth-page {
  min-height: 100vh;
  background: #e8eee9;
}

.auth-shell {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  min-height: min(760px, calc(100vh - 48px));
  margin: 24px auto;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  overflow: hidden;
  border: 1px solid #d4ddd7;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(24, 46, 33, 0.14);
}

.auth-story {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(30px, 5vw, 62px);
  color: #f5fff8;
  background:
    radial-gradient(circle at 82% 12%, rgba(120, 255, 176, 0.3), transparent 26%),
    linear-gradient(135deg, #075c35 0%, #0a8f4b 57%, #18b765 100%);
}

.auth-story::after {
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(255, 255, 255, 0.045),
    0 0 0 84px rgba(255, 255, 255, 0.025);
  content: "";
}

.auth-brand,
.account-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.auth-brand img {
  width: 34px;
  height: 32px;
}

.auth-brand-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.auth-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.auth-home-link:hover {
  color: var(--green-deep);
}

.auth-story-copy {
  position: relative;
  z-index: 1;
}

.auth-kicker,
.account-eyebrow,
.auth-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-kicker {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.auth-story h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.auth-story p {
  max-width: 470px;
  margin: 0;
  color: rgba(245, 255, 248, 0.76);
  font-size: 15px;
}

.auth-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-metrics span {
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: rgba(245, 255, 248, 0.76);
  background: rgba(0, 35, 18, 0.16);
  font-size: 12px;
}

.auth-metrics strong {
  display: block;
  margin-bottom: 2px;
  color: #ffffff;
  font-size: 17px;
}

.auth-panel {
  display: grid;
  padding: 48px clamp(28px, 5vw, 68px);
  place-items: center;
}

.auth-panel-inner {
  width: min(400px, 100%);
}

.auth-panel h2,
.account-heading h1,
.token-hero h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.auth-subtitle,
.account-heading p {
  margin: 9px 0 26px;
  color: var(--muted);
}

.auth-form,
.account-form {
  display: grid;
  gap: 15px;
}

.auth-form label,
.account-form label,
.invite-link-field {
  display: grid;
  gap: 6px;
}

.auth-form label > span,
.account-form label > span,
.invite-link-field > span {
  color: #4e5b54;
  font-size: 12px;
  font-weight: 700;
}

.auth-form input,
.account-form input,
.account-form textarea,
.invite-link-field input {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #cfd8d2;
  border-radius: 7px;
  outline: 0;
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.account-form textarea {
  min-height: 100px;
  resize: vertical;
}

.auth-form input:focus,
.account-form input:focus,
.account-form textarea:focus,
.invite-link-field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 184, 91, 0.12);
}

.auth-form input:disabled,
.account-form input:disabled {
  color: #78837d;
  background: #f1f4f2;
}

.account-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.account-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.account-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.account-button-primary {
  color: #ffffff;
  background: var(--green);
}

.account-button-primary:hover:not(:disabled) {
  background: #06a852;
}

.account-button-secondary {
  border-color: #cdd8d1;
  color: #405148;
  background: #ffffff;
}

.account-button-danger {
  border-color: #ecc7c2;
  color: var(--danger);
  background: #fff4f2;
}

.account-button-logout {
  min-width: 128px;
  border-color: #e4cbc7;
  color: #9c3d36;
  background: #ffffff;
}

.account-button.is-busy {
  cursor: wait;
  opacity: 0.62;
}

.auth-form .account-button {
  min-height: 45px;
  margin-top: 5px;
}

.auth-error,
.account-notice {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #efc2bd;
  border-radius: 7px;
  color: var(--danger);
  background: #fff3f1;
}

.account-notice {
  border-color: #b9dfc7;
  color: var(--green-deep);
  background: var(--green-soft);
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.auth-switch a {
  color: var(--green-deep);
  font-weight: 700;
}

.account-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  min-height: 62px;
  align-items: center;
  padding: 8px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  grid-template-columns: auto minmax(0, 1fr) auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.account-back {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: #56635c;
  background: #ffffff;
}

.account-back.is-labeled {
  width: auto;
  justify-content: flex-start;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.account-back svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-wordmark {
  justify-self: center;
}

.account-wordmark img {
  width: 28px;
  height: 26px;
}

.account-top-action {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 700;
}

.account-main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 70px;
}

.account-heading {
  margin-bottom: 22px;
}

.account-heading p {
  margin-bottom: 0;
}

.account-grid,
.token-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.account-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 9px 30px rgba(29, 48, 36, 0.055);
}

.profile-form-card,
.account-card > .account-form {
  padding: 22px;
}

.account-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.account-card-header h2,
.invite-card h2 {
  margin: 0;
  font-size: 18px;
}

.account-card-header p,
.invite-card > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.account-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-top: 4px;
}

.account-form-actions > span {
  color: var(--muted);
  font-size: 12px;
}

.password-card {
  padding-bottom: 16px;
}

.compact-account-form {
  padding: 16px;
}

.password-error {
  margin: 14px 16px 0;
  padding: 9px 10px;
  border: 1px solid #efc2bd;
  border-radius: 7px;
  color: var(--danger);
  background: #fff3f1;
  font-size: 12px;
}

.account-side {
  display: grid;
  gap: 14px;
}

.identity-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 28px 22px 20px;
  text-align: center;
}

.identity-avatar,
.plan-mark {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(145deg, #3fce7d, #0b904b);
  font-weight: 800;
}

.identity-avatar {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  font-size: 24px;
}

.identity-card > span {
  color: var(--muted);
  font-size: 12px;
}

.identity-card dl {
  display: grid;
  width: 100%;
  margin: 20px 0 0;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.identity-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.identity-card dt {
  color: var(--muted);
  font-size: 12px;
}

.identity-card dd {
  margin: 0;
  font-weight: 700;
}

.account-side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid #bfdbc8;
  border-radius: 9px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-weight: 700;
}

.profile-settings-card {
  margin-top: 18px;
}

.profile-settings-list {
  display: grid;
}

.profile-setting-row {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 15px 22px;
  border-bottom: 1px solid #edf0ee;
}

.profile-setting-row:last-child {
  border-bottom: 0;
}

.profile-setting-row strong {
  display: block;
  margin-bottom: 3px;
}

.profile-setting-row p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-setting-row.is-danger {
  background: #fffafa;
}

.profile-style-copy {
  min-width: 0;
  flex: 1;
}

.profile-style-copy p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.profile-settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}

.profile-settings-footer .save-state {
  color: var(--muted);
  font-size: 12px;
}

.account-switch {
  position: relative;
  width: 48px;
  height: 27px;
  flex: 0 0 auto;
}

.account-switch input {
  position: absolute;
  opacity: 0;
}

.account-switch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #c7cfca;
  cursor: pointer;
  transition: background 160ms ease;
}

.account-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(24, 40, 31, 0.22);
  content: "";
  transition: transform 160ms ease;
}

.account-switch input:checked + span {
  background: var(--green);
}

.account-switch input:checked + span::after {
  transform: translateX(21px);
}

.profile-logout-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid #ead8d5;
  border-radius: 10px;
  background: #fffdfd;
}

.profile-logout-zone strong {
  display: block;
  margin-bottom: 3px;
}

.profile-logout-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.token-hero {
  display: grid;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: 12px;
  color: #ffffff;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  background:
    radial-gradient(circle at 86% 6%, rgba(151, 255, 194, 0.26), transparent 25%),
    linear-gradient(125deg, #075b35, #0b8c4b 65%, #14ae60);
  box-shadow: 0 18px 48px rgba(13, 102, 57, 0.18);
}

.token-hero .account-eyebrow {
  color: #baf5d1;
}

.token-hero h1 {
  margin-bottom: 7px;
  font-size: clamp(40px, 7vw, 66px);
  font-variant-numeric: tabular-nums;
}

.token-hero p {
  max-width: 520px;
  margin: 0;
  color: rgba(245, 255, 249, 0.76);
}

.token-hero-stats {
  display: grid;
  min-width: 250px;
  align-content: center;
  margin: 0;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.13);
}

.token-hero-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 13px;
  background: rgba(0, 43, 23, 0.17);
}

.token-hero-stats dt {
  color: rgba(245, 255, 249, 0.7);
  font-size: 12px;
}

.token-hero-stats dd {
  margin: 0;
  font-weight: 800;
}

.token-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  margin-bottom: 18px;
}

.token-main-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.daily-login-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 15px;
  border-color: #c5e2d0;
  background:
    linear-gradient(135deg, rgba(238, 250, 242, 0.98), #ffffff 68%);
}

.daily-login-copy {
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
}

.daily-login-copy strong {
  color: var(--green-deep);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.daily-login-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #e2c879;
  border-radius: 999px;
  color: #85621b;
  background: #fff9e8;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.daily-login-status.is-claimed {
  border-color: #b9dcc6;
  color: var(--green-deep);
  background: #edf8f1;
}

.plan-list {
  display: grid;
  padding: 10px;
  gap: 9px;
}

.plan-item {
  display: grid;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 14px;
}

.plan-mark {
  width: 68px;
  height: 68px;
  border-radius: 9px;
  font-size: 12px;
  text-align: center;
}

.plan-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.plan-copy span,
.plan-copy small {
  color: var(--muted);
  font-size: 12px;
}

.plan-action {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.plan-action > strong {
  color: #9d6818;
  font-size: 18px;
}

.invite-card {
  padding: 22px;
}

.invite-card h2 {
  margin-top: 2px;
}

.invite-code {
  margin: 18px 0 10px;
  padding: 14px;
  border: 1px dashed #9ccbad;
  border-radius: 8px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
}

.invite-summary {
  display: grid;
  margin-bottom: 15px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.invite-summary span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.invite-summary strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.invite-link-field {
  margin-bottom: 10px;
}

.invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.invite-card .account-button {
  width: 100%;
}

.ledger-table-wrap {
  overflow-x: auto;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
}

.ledger-table th,
.ledger-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #edf0ee;
  text-align: left;
  white-space: nowrap;
}

.ledger-table th {
  color: var(--muted);
  background: #fafcfb;
  font-size: 11px;
  font-weight: 700;
}

.ledger-table td {
  font-size: 12px;
}

.ledger-table .is-positive {
  color: var(--green-deep);
  font-weight: 800;
}

.ledger-table .is-negative {
  color: #b36f1a;
  font-weight: 800;
}

.account-empty {
  color: var(--muted);
  text-align: center;
}

.account-toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 11px 14px;
  border: 1px solid #b9dfc7;
  border-radius: 8px;
  color: var(--green-deep);
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(24, 44, 32, 0.18);
}

.account-toast.is-error {
  border-color: #efc2bd;
  color: var(--danger);
}

body[data-page="profile"] .account-topbar {
  min-height: 56px;
  padding-block: 6px;
}

body[data-page="profile"] .account-main {
  padding: 24px 0 44px;
}

body[data-page="profile"] .account-heading {
  margin-bottom: 14px;
}

body[data-page="profile"] .account-heading h1 {
  font-size: 27px;
}

body[data-page="profile"] .account-heading p {
  margin-top: 6px;
  margin-bottom: 0;
}

body[data-page="profile"] .account-notice {
  margin-bottom: 12px;
  padding: 8px 11px;
}

body[data-page="profile"] .account-grid {
  gap: 14px;
}

body[data-page="profile"] .account-card-header {
  padding: 15px 18px 12px;
}

body[data-page="profile"] .account-card-header h2 {
  font-size: 16px;
}

body[data-page="profile"] .account-card-header p {
  margin-top: 3px;
  font-size: 11px;
}

body[data-page="profile"] .profile-form-card {
  padding: 16px 18px;
}

body[data-page="profile"] .account-form {
  gap: 11px;
}

body[data-page="profile"] .account-form-row {
  gap: 11px;
}

body[data-page="profile"] .account-form input {
  min-height: 38px;
}

body[data-page="profile"] .profile-bio-textarea {
  min-height: 68px;
  height: 68px;
  resize: vertical;
}

body[data-page="profile"] .account-form-actions {
  padding-top: 0;
}

body[data-page="profile"] .account-form-actions .account-button {
  min-height: 37px;
}

body[data-page="profile"] .account-side {
  gap: 12px;
}

body[data-page="profile"] .identity-card {
  padding: 18px 18px 16px;
}

body[data-page="profile"] .identity-avatar {
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  font-size: 20px;
}

body[data-page="profile"] .identity-card dl {
  margin-top: 13px;
}

body[data-page="profile"] .identity-card dl div {
  padding: 7px 10px;
}

body[data-page="profile"] .account-side-link {
  padding: 11px 14px;
}

body[data-page="profile"] .password-card {
  padding-bottom: 0;
}

body[data-page="profile"] .password-card .compact-account-form {
  align-items: end;
  padding: 13px 16px 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 9px;
}

body[data-page="profile"] .password-card .account-button {
  min-height: 38px;
  padding-inline: 13px;
}

body[data-page="profile"] .profile-settings-card {
  margin-top: 14px;
}

body[data-page="profile"] .profile-settings-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

body[data-page="profile"] .profile-setting-row {
  min-height: 112px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 0;
  background: #ffffff;
}

body[data-page="profile"] .profile-setting-row.is-danger {
  background: #fffafa;
}

body[data-page="profile"] .profile-setting-row p {
  font-size: 11px;
}

body[data-page="profile"] .profile-style-copy p {
  -webkit-line-clamp: 2;
}

body[data-page="profile"] .profile-setting-row .account-button {
  min-height: 34px;
  align-self: flex-end;
  margin-top: auto;
  padding-inline: 12px;
  font-size: 12px;
}

body[data-page="profile"] .account-switch {
  align-self: flex-end;
  width: 44px;
  height: 25px;
  margin-top: auto;
}

body[data-page="profile"] .account-switch span::after {
  width: 19px;
  height: 19px;
}

body[data-page="profile"] .account-switch input:checked + span::after {
  transform: translateX(19px);
}

body[data-page="profile"] .profile-settings-footer {
  padding: 11px 18px;
}

body[data-page="profile"] .profile-settings-footer .account-button {
  min-height: 36px;
}

body[data-page="profile"] .profile-logout-zone {
  margin-top: 14px;
  padding: 13px 17px;
}

body[data-page="profile"] .profile-logout-zone .account-button {
  min-height: 36px;
}

@media (max-width: 860px) {
  .auth-shell {
    width: min(680px, calc(100% - 24px));
    margin: 12px auto;
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 290px;
  }

  .auth-story h1 {
    font-size: clamp(34px, 9vw, 52px);
  }

  .auth-panel {
    padding: 34px 24px 42px;
  }

  .account-grid,
  .token-layout,
  .token-hero,
  .account-home-layout {
    grid-template-columns: 1fr;
  }

  .invite-actions {
    grid-template-columns: 1fr;
  }

  .token-hero-stats {
    min-width: 0;
  }

  body[data-page="profile"] .password-card .compact-account-form,
  body[data-page="profile"] .profile-settings-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .auth-story {
    min-height: 210px;
    padding: 26px 22px;
  }

  .auth-metrics {
    display: none;
  }

  .account-main {
    width: calc(100% - 24px);
    padding-top: 28px;
  }

  .account-home-main,
  .account-narrow-main {
    width: calc(100% - 24px);
  }

  .account-form-row {
    grid-template-columns: 1fr;
  }

  .account-menu-item {
    min-height: 86px;
    padding: 15px 16px;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    gap: 12px;
  }

  .account-menu-icon {
    width: 40px;
    height: 40px;
  }

  .account-form-actions,
  .plan-item,
  .profile-setting-row,
  .profile-settings-footer,
  .profile-logout-zone {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .account-form-actions,
  .profile-setting-row,
  .profile-settings-footer,
  .profile-logout-zone {
    flex-direction: column;
  }

  .account-switch {
    align-self: flex-end;
  }

  .plan-item {
    justify-items: stretch;
  }

  .plan-action {
    justify-items: stretch;
  }

  .account-topbar {
    padding-inline: 12px;
  }
}
