@charset "UTF-8";

:root {
  --ink: #14242b;
  --ink-soft: #496068;
  --ink-faint: #7d8c8e;
  --paper: #f7f1e8;
  --paper-deep: #ece4d9;
  --paper-line: rgba(20, 36, 43, 0.12);
  --rail: #14242b;
  --rail-soft: #1c343b;
  --coral: #ef6a54;
  --coral-deep: #d94f42;
  --coral-wash: #ffe0d5;
  --gold: #edb84e;
  --gold-soft: #fff0c8;
  --mint: #a8d8c3;
  --sky: #b8d9df;
  --shadow: 0 18px 60px rgba(33, 43, 43, 0.12);
  --shadow-small: 0 7px 22px rgba(33, 43, 43, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 11px;
  --display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #d9d3c8;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(239, 106, 84, 0.12), transparent 30rem),
    radial-gradient(circle at 90% 88%, rgba(168, 216, 195, 0.2), transparent 32rem),
    #d9d3c8;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background-image: radial-gradient(rgba(20, 36, 43, 0.45) 0.6px, transparent 0.6px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}

.auth-gate {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 44px 8vw;
  overflow: hidden;
  place-items: center;
  color: #f7f1e8;
  background:
    radial-gradient(circle at 14% 12%, rgba(168, 216, 195, 0.16), transparent 24rem),
    radial-gradient(circle at 84% 78%, rgba(239, 106, 84, 0.2), transparent 28rem),
    #14242b;
}

.auth-gate::before {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  content: "";
  background-image: radial-gradient(rgba(247, 241, 232, 0.7) 0.6px, transparent 0.6px);
  background-size: 6px 6px;
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(455px, 100%);
  padding: 36px 38px 30px;
  border: 1px solid rgba(237, 184, 78, 0.27);
  border-radius: 25px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.auth-brand .brand-mark {
  width: 38px;
  height: 38px;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  color: #fff8df;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.08em;
}

.auth-brand small {
  margin-top: 3px;
  color: rgba(247, 241, 232, 0.48);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.auth-eyebrow {
  margin-top: 44px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.auth-card h1 {
  margin: 13px 0 0;
  color: #fffaf1;
  font-family: var(--display);
  font-size: clamp(29px, 4vw, 41px);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1.15;
}

.auth-card > p {
  margin: 12px 0 0;
  color: rgba(247, 241, 232, 0.57);
  font-size: 11px;
  line-height: 1.8;
}

.auth-form {
  display: grid;
  margin-top: 25px;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field > span {
  color: rgba(247, 241, 232, 0.65);
  font-size: 10px;
  font-weight: 800;
}

.auth-field input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid rgba(247, 241, 232, 0.15);
  border-radius: 9px;
  outline: 0;
  color: #fffaf1;
  background: rgba(0, 0, 0, 0.15);
  font-size: 12px;
}

.auth-field input::placeholder {
  color: rgba(247, 241, 232, 0.34);
}

.auth-field input:focus {
  border-color: rgba(237, 184, 78, 0.85);
  background: rgba(0, 0, 0, 0.22);
}

.auth-submit {
  min-height: 44px;
  margin-top: 5px;
  border-radius: 9px;
  color: var(--ink);
  background: var(--gold);
  font-size: 11px;
  font-weight: 900;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.auth-submit:hover {
  background: #f5ca67;
  box-shadow: 0 10px 20px rgba(237, 184, 78, 0.18);
  transform: translateY(-1px);
}

.auth-submit:disabled,
.auth-mode-toggle:disabled,
.auth-local-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.auth-mode-toggle,
.auth-local-button {
  display: block;
  width: 100%;
  color: rgba(247, 241, 232, 0.72);
  background: transparent;
  font-size: 10px;
}

.auth-mode-toggle {
  margin-top: 15px;
}

.auth-mode-toggle:hover {
  color: var(--gold);
}

.auth-local-button {
  margin-top: 13px;
  color: rgba(247, 241, 232, 0.38);
  font-size: 9px;
}

.auth-local-button:hover {
  color: rgba(247, 241, 232, 0.72);
}

.auth-status {
  min-height: 17px;
  margin: 13px 0 0 !important;
  color: var(--mint) !important;
  font-size: 10px !important;
  line-height: 1.6 !important;
  text-align: center;
}

.auth-status.is-error {
  color: #ffad9c !important;
}

.auth-footnote {
  display: flex;
  margin-top: 18px;
  padding-top: 13px;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(247, 241, 232, 0.1);
  color: rgba(247, 241, 232, 0.4);
  font-size: 8px;
  line-height: 1.5;
}

.auth-footnote .local-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
}

.auth-side-note {
  position: absolute;
  right: 8vw;
  bottom: 9vh;
  z-index: 1;
  max-width: 190px;
}

.auth-side-note span,
.auth-side-note strong,
.auth-side-note small {
  display: block;
}

.auth-side-note span {
  color: var(--coral);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.auth-side-note strong {
  margin-top: 13px;
  color: rgba(247, 241, 232, 0.88);
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: -0.06em;
  line-height: 1.45;
}

.auth-side-note small {
  margin-top: 12px;
  color: rgba(247, 241, 232, 0.42);
  font-size: 9px;
  line-height: 1.7;
}

.auth-orbit {
  position: absolute;
  border: 1px solid rgba(247, 241, 232, 0.11);
  border-radius: 50%;
  pointer-events: none;
}

.auth-orbit-one {
  right: -12vw;
  bottom: -20vw;
  width: 55vw;
  height: 55vw;
}

.auth-orbit-two {
  top: -25vw;
  left: -20vw;
  width: 52vw;
  height: 52vw;
  border-color: rgba(237, 184, 78, 0.14);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(239, 106, 84, 0.38);
  outline-offset: 3px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  flex: 0 0 auto;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  width: min(1440px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.desktop-rail {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 38px 25px 27px;
  overflow: hidden;
  color: #edf0e9;
  background:
    radial-gradient(circle at 20% 0%, rgba(168, 216, 195, 0.14), transparent 18rem),
    linear-gradient(180deg, #14242b 0%, #102027 100%);
  flex-direction: column;
}

.desktop-rail::before,
.desktop-rail::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(237, 240, 233, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.desktop-rail::before {
  width: 300px;
  height: 300px;
  right: -180px;
  top: 300px;
}

.desktop-rail::after {
  width: 190px;
  height: 190px;
  right: -90px;
  top: 355px;
}

.brand-lockup,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--rail);
  background: var(--gold);
  clip-path: polygon(50% 0, 91% 22%, 100% 67%, 72% 100%, 28% 100%, 0 67%, 9% 22%);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.brand-mark::after {
  position: absolute;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(20, 36, 43, 0.38);
  content: "";
  clip-path: inherit;
}

.brand-mark i {
  position: absolute;
  right: -3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--rail);
  border-radius: 50%;
  background: var(--coral);
}

.brand-name {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-caption {
  margin-top: 3px;
  color: rgba(237, 240, 233, 0.55);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.rail-label,
.section-eyebrow,
.hero-eyebrow,
.topbar-kicker,
.rank-stage-label,
.promotion-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.rail-label {
  margin: 60px 8px 14px;
  color: rgba(237, 240, 233, 0.39);
}

.rail-nav {
  display: grid;
  gap: 7px;
}

.rail-nav-item {
  position: relative;
  display: flex;
  min-height: 48px;
  padding: 0 12px;
  align-items: center;
  gap: 13px;
  border-radius: 12px;
  color: rgba(237, 240, 233, 0.61);
  background: transparent;
  text-align: left;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.rail-nav-item:hover {
  color: #fffdf6;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.rail-nav-item.is-active {
  color: #fffdf6;
  background: rgba(239, 106, 84, 0.17);
}

.rail-nav-item.is-active::before {
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--coral);
  content: "";
}

.rail-nav-item .icon {
  width: 19px;
  height: 19px;
}

.rail-nav-item span:not(.nav-count) {
  font-size: 13px;
  font-weight: 650;
}

.nav-count {
  display: grid;
  width: 21px;
  height: 21px;
  margin-left: auto;
  place-items: center;
  border-radius: 50%;
  color: #fffaf1;
  background: rgba(239, 106, 84, 0.75);
  font-size: 10px;
  font-weight: 800;
}

.nav-count-gold {
  color: var(--rail);
  background: var(--gold);
}

.rail-season-card {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 18px 17px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
}

.rail-season-card::after {
  position: absolute;
  right: -37px;
  bottom: -45px;
  width: 115px;
  height: 115px;
  border: 1px solid rgba(237, 184, 78, 0.35);
  border-radius: 50%;
  content: "";
}

.season-topline,
.season-meta {
  display: flex;
  justify-content: space-between;
  color: rgba(237, 240, 233, 0.51);
  font-size: 10px;
}

.live-dot {
  color: var(--mint);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.season-title {
  margin: 19px 0 22px;
  color: #f8f2e7;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
}

.season-title em {
  color: var(--gold);
  font-style: normal;
}

.season-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.season-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.season-meta {
  margin-top: 9px;
}

.season-meta strong {
  color: #f8f2e7;
  font-weight: 700;
}

.rail-footer {
  display: grid;
  gap: 16px;
  margin-top: 23px;
}

.local-only {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(237, 240, 233, 0.47);
  font-size: 10px;
}

.local-dot,
.status-dot,
.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(168, 216, 195, 0.12);
}

.rail-settings {
  display: inline-flex;
  padding: 0;
  align-items: center;
  gap: 10px;
  color: rgba(237, 240, 233, 0.63);
  background: transparent;
  font-size: 11px;
  text-align: left;
}

.rail-settings .icon {
  width: 15px;
  height: 15px;
}

.app-main {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--paper);
}

.topbar {
  display: flex;
  min-height: 82px;
  padding: 0 52px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(20, 36, 43, 0.08);
}

.mobile-brand {
  display: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
}

.brand-mark-small {
  width: 29px;
  height: 29px;
  font-size: 16px;
}

.brand-mark-small::after {
  width: 21px;
  height: 21px;
}

.brand-mark-small i {
  width: 6px;
  height: 6px;
  border-width: 1px;
}

.topbar-date {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--ink);
}

.topbar-kicker {
  color: var(--coral);
  font-size: 9px;
}

.topbar-date > span:last-child {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-button {
  display: grid;
  width: 35px;
  height: 35px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(237, 184, 78, 0.74);
  border-radius: 50%;
  color: var(--ink);
  background-color: var(--gold-soft);
  background-position: center;
  background-size: cover;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease;
}

.profile-button:hover {
  border-color: var(--coral);
  transform: translateY(-1px);
}

.profile-button > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.topbar-pill {
  display: inline-flex;
  padding: 8px 11px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 20px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.38);
  font-size: 10px;
  font-weight: 700;
}

.topbar-pill .local-dot {
  width: 6px;
  height: 6px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
  transition: background 180ms ease, color 180ms ease;
}

.icon-button:hover {
  color: var(--coral-deep);
  background: var(--coral-wash);
}

.scroll-area {
  height: calc(100vh - 82px);
  padding: 34px 52px 120px;
  overflow: auto;
  scroll-behavior: smooth;
}

.scroll-area::-webkit-scrollbar {
  width: 8px;
}

.scroll-area::-webkit-scrollbar-thumb {
  border: 3px solid var(--paper);
  border-radius: 10px;
  background: rgba(20, 36, 43, 0.17);
}

.page-heading {
  display: flex;
  max-width: 1050px;
  margin: 0 auto 30px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.page-heading h1 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.06em;
}

.page-heading-note {
  max-width: 260px;
  padding-bottom: 4px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.is-hidden,
[hidden] {
  display: none !important;
}

[data-route] {
  animation: page-in 480ms both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-card,
.metrics-grid,
.section-block {
  width: min(1050px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.hero-card {
  position: relative;
  display: grid;
  min-height: 348px;
  padding: 32px 43px 29px;
  overflow: hidden;
  place-items: center;
  grid-template-columns: minmax(0, 1fr);
  border-radius: var(--radius-lg);
  color: #f7f1e8;
  background:
    radial-gradient(circle at 80% 15%, rgba(184, 217, 223, 0.13), transparent 14rem),
    radial-gradient(circle at 12% 110%, rgba(239, 106, 84, 0.25), transparent 20rem),
    #16272d;
  box-shadow: 0 20px 35px rgba(20, 36, 43, 0.19);
}

.hero-card::before {
  position: absolute;
  right: 220px;
  bottom: -185px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(247, 241, 232, 0.14);
  border-radius: 50%;
  content: "";
}

.hero-card::after {
  position: absolute;
  right: 85px;
  top: 48px;
  width: 1px;
  height: 185px;
  background: linear-gradient(transparent, rgba(247, 241, 232, 0.24), transparent);
  content: "";
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image: repeating-linear-gradient(120deg, transparent 0 22px, rgba(255, 255, 255, 0.045) 23px, transparent 24px 45px);
}

.hero-copy,
.rank-stage {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(247, 241, 232, 0.52);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.hero-eyebrow .status-dot {
  width: 6px;
  height: 6px;
}

.hero-copy h1 {
  max-width: 600px;
  margin: 24px 0 11px;
  font-family: var(--display);
  font-size: clamp(37px, 5.2vw, 67px);
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 1.08;
}

.hero-copy h1 span {
  color: var(--coral);
}

.hero-copy p {
  max-width: 400px;
  margin: 0;
  color: rgba(247, 241, 232, 0.57);
  font-size: 13px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  margin-top: auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.hero-cta {
  display: inline-flex;
  padding: 13px 15px 13px 17px;
  align-items: center;
  gap: 17px;
  border-radius: 10px;
  color: #fffaf1;
  background: var(--coral);
  box-shadow: 0 8px 18px rgba(239, 106, 84, 0.2);
  font-size: 12px;
  font-weight: 800;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.hero-cta:hover {
  background: var(--coral-deep);
  box-shadow: 0 12px 22px rgba(239, 106, 84, 0.28);
  transform: translateY(-2px);
}

.hero-cta .icon {
  width: 15px;
  height: 15px;
}

.hero-microcopy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(247, 241, 232, 0.5);
  font-size: 10px;
}

.hero-microcopy .icon {
  width: 13px;
  height: 13px;
  color: var(--gold);
}

.rank-stage {
  display: flex;
  width: 100%;
  padding: 5px 0 0;
  align-items: center;
  flex-direction: column;
}

.rank-stage-label {
  color: rgba(247, 241, 232, 0.46);
  font-size: 9px;
}

.rank-emblem,
.promotion-emblem {
  position: relative;
  display: grid;
  margin: 13px 0 9px;
  place-items: center;
  clip-path: polygon(50% 0, 89% 17%, 100% 64%, 73% 100%, 27% 100%, 0 64%, 11% 17%);
  isolation: isolate;
}

.rank-emblem {
  width: 143px;
  height: 157px;
  color: #fff8df;
  background: linear-gradient(145deg, #efd48b, #b7832d 48%, #78511f);
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.23));
  transition: background 500ms ease, transform 500ms ease;
}

.rank-emblem::before,
.promotion-emblem::before {
  position: absolute;
  inset: 7px;
  z-index: -1;
  border: 1px solid rgba(255, 248, 223, 0.56);
  content: "";
  clip-path: inherit;
}

.rank-emblem::after,
.promotion-emblem::after {
  position: absolute;
  inset: 15px;
  z-index: -1;
  border: 1px solid rgba(20, 36, 43, 0.25);
  content: "";
  clip-path: inherit;
}

.tier-0 { background: linear-gradient(145deg, #ba9475, #73503c 55%, #4d3429); }
.tier-1 { background: linear-gradient(145deg, #e4edf0, #7b9da4 47%, #3f6871); }
.tier-2 { background: linear-gradient(145deg, #ffe19a, #d79530 52%, #93621e); }
.tier-3 { background: linear-gradient(145deg, #b8e0e7, #518fa2 48%, #2e5669); }
.tier-4 { background: linear-gradient(145deg, #e5c1e6, #9961ab 48%, #5e3c76); }
.tier-5 { background: linear-gradient(145deg, #fff3bf, #e99f42 42%, #b94f42); }

.emblem-shine {
  position: absolute;
  top: 11px;
  left: 14px;
  width: 40px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.63), transparent 70%);
  opacity: 0.6;
  transform: rotate(22deg);
}

.emblem-glyph {
  font-family: var(--display);
  font-size: 51px;
  font-weight: 900;
  text-shadow: 2px 3px 0 rgba(20, 36, 43, 0.22);
}

.emblem-ribbon {
  position: absolute;
  bottom: 16px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 248, 223, 0.4);
  color: rgba(255, 248, 223, 0.75);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.rank-stage-name {
  color: #fff8df;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.rank-stage-next {
  display: inline-flex;
  margin-top: 5px;
  align-items: center;
  gap: 5px;
  color: rgba(247, 241, 232, 0.48);
  font-size: 10px;
}

.rank-stage-next .icon {
  width: 12px;
  height: 12px;
  color: var(--mint);
}

.rank-stars {
  display: flex;
  margin-top: 14px;
  gap: 8px;
}

.rank-star {
  position: relative;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 94%, 50% 72%, 21% 94%, 32% 57%, 2% 35%, 39% 35%);
  color: rgba(255, 248, 223, 0.26);
  background: rgba(255, 248, 223, 0.17);
}

.rank-star.is-filled {
  color: var(--gold);
  background: var(--gold);
  filter: drop-shadow(0 2px 5px rgba(237, 184, 78, 0.45));
}

.metrics-grid {
  display: grid;
  margin-top: 15px;
  gap: 15px;
  grid-template-columns: repeat(3, 1fr);
}

.metric-card {
  position: relative;
  min-height: 140px;
  padding: 19px 20px 16px;
  overflow: hidden;
  border: 1px solid rgba(20, 36, 43, 0.09);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: var(--shadow-small);
}

.metric-card::after {
  position: absolute;
  right: -32px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(20, 36, 43, 0.07);
  border-radius: 50%;
  content: "";
}

.metric-icon {
  position: absolute;
  top: 18px;
  right: 19px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: var(--coral);
  background: var(--coral-wash);
}

.metric-icon .icon {
  width: 15px;
  height: 15px;
}

.metric-rate .metric-icon {
  color: #4d7e89;
  background: #d9eef0;
}

.metric-badge .metric-icon {
  color: #ad7a23;
  background: var(--gold-soft);
}

.metric-label {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
}

.metric-value {
  margin-top: 13px;
  font-family: var(--display);
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.metric-value small {
  margin-left: 4px;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.metric-foot {
  position: absolute;
  bottom: 16px;
  color: var(--ink-faint);
  font-size: 10px;
}

.up-mark,
.gold-mark {
  color: var(--coral);
  font-weight: 800;
}

.gold-mark {
  color: #b78020;
}

.section-block {
  margin-top: 44px;
}

.section-heading {
  display: flex;
  margin-bottom: 18px;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
}

.section-eyebrow {
  color: var(--coral-deep);
  font-size: 9px;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1.15;
}

.heading-number {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  margin-left: 5px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--coral-deep);
  background: var(--coral-wash);
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0;
  vertical-align: 4px;
}

.text-action {
  display: inline-flex;
  padding: 0 0 5px;
  align-items: center;
  gap: 6px;
  color: var(--coral-deep);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.text-action:hover {
  color: var(--ink);
}

.text-action .icon {
  width: 14px;
  height: 14px;
}

.goal-heading-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.goal-add-button {
  color: var(--coral-deep);
}

.section-side-note {
  display: flex;
  padding-bottom: 5px;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 10px;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(239, 106, 84, 0.11);
}

.promise-composer {
  position: relative;
  margin-bottom: 23px;
  border: 1px solid rgba(20, 36, 43, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 28px rgba(33, 43, 43, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.promise-composer:focus-within {
  border-color: rgba(239, 106, 84, 0.56);
  box-shadow: 0 13px 32px rgba(239, 106, 84, 0.1);
}

.composer-main {
  position: relative;
  display: flex;
  min-height: 84px;
  padding: 18px 22px 13px;
  gap: 13px;
  align-items: flex-start;
}

.composer-leading {
  display: grid;
  width: 23px;
  height: 23px;
  margin-top: 2px;
  place-items: center;
  border: 1px solid rgba(239, 106, 84, 0.5);
  border-radius: 50%;
  color: var(--coral);
  flex: 0 0 auto;
}

.composer-crosshair {
  margin-top: -2px;
  font-size: 17px;
  font-weight: 300;
}

.composer-main textarea {
  width: 100%;
  min-height: 26px;
  padding: 0;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
}

.composer-main textarea::placeholder {
  color: #a7adaa;
  font-weight: 600;
}

.ai-detection {
  position: absolute;
  right: 23px;
  bottom: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--coral-deep);
  font-size: 9px;
  opacity: 0;
  transition: opacity 180ms ease;
}

.ai-detection.is-visible {
  opacity: 1;
}

.ai-detection .icon {
  width: 12px;
  height: 12px;
}

.composer-tools {
  display: flex;
  min-height: 49px;
  padding: 0 15px 0 22px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(20, 36, 43, 0.08);
}

.composer-tool-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.composer-tool,
.reminder-toggle {
  display: inline-flex;
  padding: 0;
  align-items: center;
  gap: 6px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.composer-tool:hover,
.reminder-toggle:hover {
  color: var(--ink);
}

.composer-tool .icon,
.reminder-toggle .icon {
  width: 14px;
  height: 14px;
}

.tool-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border-radius: 10px;
  color: #fffaf1;
  background: var(--coral);
  font-size: 9px;
}

.reminder-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 15px;
  border-radius: 10px;
  background: #c5cecb;
  transition: background 180ms ease;
}

.toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fffdf7;
  content: "";
  box-shadow: 0 1px 3px rgba(20, 36, 43, 0.2);
  transition: transform 180ms ease;
}

.reminder-toggle input:checked + .toggle-track {
  background: var(--coral);
}

.reminder-toggle input:checked + .toggle-track::after {
  transform: translateX(10px);
}

.submit-promise {
  display: inline-flex;
  min-height: 35px;
  padding: 0 11px 0 14px;
  align-items: center;
  gap: 10px;
  border-radius: 9px;
  color: #fffaf1;
  background: var(--ink);
  font-size: 10px;
  font-weight: 800;
  transition: background 180ms ease, transform 180ms ease;
}

.submit-promise:hover {
  background: var(--coral-deep);
  transform: translateY(-1px);
}

.submit-promise .icon {
  width: 14px;
  height: 14px;
}

.link-editor {
  padding: 0 22px 16px 58px;
  border-top: 1px dashed rgba(20, 36, 43, 0.12);
}

.link-editor-title {
  display: flex;
  padding: 14px 0 9px;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.link-editor-title .icon {
  width: 13px;
  height: 13px;
  color: var(--coral);
}

.link-input-row {
  display: flex;
  gap: 8px;
}

.link-input-row input {
  min-width: 0;
  flex: 1;
  padding: 9px 11px;
  border: 1px solid rgba(20, 36, 43, 0.12);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.link-input-row button {
  padding: 0 13px;
  border-radius: 8px;
  color: var(--coral-deep);
  background: var(--coral-wash);
  font-size: 10px;
  font-weight: 800;
}

.draft-links {
  display: flex;
  margin-top: 9px;
  flex-wrap: wrap;
  gap: 7px;
}

.draft-link-chip {
  display: inline-flex;
  padding: 5px 7px 5px 9px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 7px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
  font-size: 9px;
}

.draft-link-chip button {
  display: grid;
  width: 15px;
  height: 15px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-faint);
  background: transparent;
}

.draft-link-chip .icon {
  width: 11px;
  height: 11px;
}

.dayline {
  position: relative;
  display: grid;
  gap: 12px;
}

.dayline::before {
  position: absolute;
  top: 12px;
  bottom: 15px;
  left: 68px;
  width: 1px;
  background: linear-gradient(var(--paper-line), rgba(20, 36, 43, 0));
  content: "";
}

.promise-card {
  position: relative;
  display: grid;
  min-height: 96px;
  padding: 15px 17px 15px 0;
  align-items: start;
  gap: 17px;
  grid-template-columns: 67px minmax(0, 1fr) auto;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.53);
  box-shadow: 0 5px 16px rgba(33, 43, 43, 0.045);
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease, opacity 200ms ease;
}

.promise-card:hover {
  border-color: rgba(239, 106, 84, 0.36);
  transform: translateX(3px);
}

.promise-card.is-done {
  border-color: rgba(168, 216, 195, 0.65);
  background: rgba(232, 246, 237, 0.62);
}

.promise-time {
  position: relative;
  display: flex;
  min-height: 64px;
  padding-left: 20px;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
}

.promise-time::after {
  position: absolute;
  right: -9px;
  top: 25px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: rgba(20, 36, 43, 0.16);
  content: "";
  box-shadow: 0 0 0 1px rgba(20, 36, 43, 0.12);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.promise-time.is-current::after,
.promise-card.is-current .promise-time::after {
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral), 0 0 0 5px rgba(239, 106, 84, 0.12);
}

.promise-card.is-current {
  border-color: rgba(239, 106, 84, 0.42);
  box-shadow: 0 8px 22px rgba(239, 106, 84, 0.1);
}

.promise-card.is-done .promise-time::after {
  background: var(--mint);
  box-shadow: 0 0 0 1px #76b79b;
}

.promise-time strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1;
}

.promise-time small {
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 9px;
}

.promise-main {
  min-width: 0;
}

.promise-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.check-button {
  display: grid;
  width: 21px;
  height: 21px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(20, 36, 43, 0.27);
  border-radius: 50%;
  color: transparent;
  background: transparent;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
  flex: 0 0 auto;
}

.check-button:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: scale(1.08);
}

.check-button .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.check-button.is-checked {
  border-color: #77b998;
  color: var(--ink);
  background: var(--mint);
}

.promise-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-done .promise-title {
  color: #6e8a7e;
  text-decoration: line-through;
  text-decoration-color: rgba(110, 138, 126, 0.55);
}

.promise-meta {
  display: flex;
  margin: 7px 0 0 30px;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-chip {
  display: inline-flex;
  padding: 4px 7px;
  align-items: center;
  gap: 4px;
  border-radius: 5px;
  color: var(--ink-faint);
  background: var(--paper-deep);
  font-size: 9px;
  line-height: 1;
}

.meta-chip.habit-chip {
  color: #387a65;
  background: #dcf0e4;
}

.meta-chip.reminder-chip {
  color: #9d6c21;
  background: var(--gold-soft);
}

.meta-chip .icon {
  width: 11px;
  height: 11px;
}

.promise-links {
  display: flex;
  margin: 13px 0 0 30px;
  flex-wrap: wrap;
  gap: 7px;
}

.link-tile {
  display: flex;
  width: 178px;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.link-thumb {
  position: relative;
  display: grid;
  width: 43px;
  height: 31px;
  overflow: hidden;
  place-items: center;
  border-radius: 5px;
  color: #fff9eb;
  background:
    linear-gradient(135deg, rgba(20, 36, 43, 0.1), transparent),
    linear-gradient(135deg, #5f91a0, #203f4d);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
}

.link-thumb::after {
  position: absolute;
  right: -8px;
  bottom: -11px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  content: "";
}

.link-thumb.douyin { background: linear-gradient(135deg, #ef6a54, #6e3043 60%, #182a33); }
.link-thumb.bilibili { background: linear-gradient(135deg, #8ecedb, #477f94); }
.link-thumb.book { background: linear-gradient(135deg, #d79d60, #6b4937); }

.link-thumb .icon {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.92);
}

.link-label {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-label small {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 500;
}

.promise-side {
  display: flex;
  min-height: 65px;
  align-items: flex-end;
  flex-direction: column;
  justify-content: space-between;
}

.more-button {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-faint);
  background: transparent;
}

.more-button:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.more-button .icon {
  width: 15px;
  height: 15px;
}

.habit-action {
  padding: 0;
  color: var(--coral-deep);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.habit-action:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 28px;
  border: 1px dashed rgba(20, 36, 43, 0.18);
  border-radius: 14px;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  text-align: center;
}

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

.goal-card {
  padding: 19px 20px 17px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 5px 16px rgba(33, 43, 43, 0.045);
}

.goal-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.goal-card-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.goal-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.goal-index b {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 7px;
  color: #fff8ef;
  background: var(--coral);
  font-size: 10px;
  letter-spacing: 0;
}

.goal-progress-value {
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
}

.goal-edit-button {
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--coral-deep);
  background: var(--coral-wash);
  font-size: 9px;
  font-weight: 900;
}

.goal-edit-button:hover {
  color: #fffaf1;
  background: var(--coral);
}

.goal-title {
  min-height: 43px;
  margin: 14px 0 14px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.goal-bar {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 8px;
  background: #e5e4dc;
}

.goal-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), #f1a054);
  transition: width 280ms ease;
}

.goal-card:nth-child(2) .goal-bar span {
  background: linear-gradient(90deg, #5b99a1, #a8d8c3);
}

.goal-slider {
  width: 100%;
  height: 4px;
  margin: 14px 0 3px;
  accent-color: var(--coral);
  cursor: ew-resize;
}

.goal-card:nth-child(2) .goal-slider {
  accent-color: #5b99a1;
}

.goal-phases {
  display: grid;
  margin-top: 9px;
  gap: 7px;
  grid-template-columns: repeat(3, 1fr);
}

.phase-button {
  display: grid;
  min-height: 40px;
  padding: 6px 4px;
  place-items: center;
  gap: 3px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 8px;
  color: var(--ink-faint);
  background: rgba(247, 241, 232, 0.6);
  font-size: 8px;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.phase-button .icon {
  width: 13px;
  height: 13px;
}

.phase-button.is-done {
  border-color: rgba(168, 216, 195, 0.85);
  color: #33715f;
  background: #ddf0e3;
}

.phase-button:not(.is-done):hover {
  border-color: var(--coral);
  color: var(--coral-deep);
}

.goal-logs {
  display: grid;
  margin-top: 13px;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.goal-log {
  display: grid;
  gap: 5px;
}

.goal-log > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 900;
}

.goal-log small {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 500;
}

.goal-log textarea {
  width: 100%;
  min-height: 58px;
  padding: 8px 9px;
  border: 1px solid rgba(20, 36, 43, 0.12);
  border-radius: 8px;
  outline: 0;
  resize: vertical;
  color: var(--ink);
  background: rgba(247, 241, 232, 0.58);
  font-size: 10px;
  line-height: 1.55;
}

.goal-log textarea::placeholder {
  color: var(--ink-faint);
}

.goal-log textarea:focus {
  border-color: rgba(239, 106, 84, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 106, 84, 0.1);
}

.habit-strip,
.badge-strip {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(3, 1fr);
}

.habit-card {
  position: relative;
  min-height: 151px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.48);
}

.habit-card::before {
  position: absolute;
  right: -26px;
  top: -27px;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(239, 106, 84, 0.15);
  border-radius: 50%;
  content: "";
}

.habit-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.habit-symbol {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  color: var(--coral-deep);
  background: var(--coral-wash);
}

.habit-card:nth-child(2) .habit-symbol {
  color: #4a8190;
  background: #d9eef0;
}

.habit-card:nth-child(3) .habit-symbol {
  color: #9b7023;
  background: var(--gold-soft);
}

.habit-symbol .icon {
  width: 15px;
  height: 15px;
}

.habit-total {
  color: var(--ink-faint);
  font-size: 9px;
}

.habit-name {
  margin-top: 15px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
}

.habit-streak {
  display: flex;
  margin-top: 4px;
  align-items: baseline;
  gap: 5px;
}

.habit-streak strong {
  color: var(--coral-deep);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
}

.habit-streak span {
  color: var(--ink-faint);
  font-size: 9px;
}

.habit-dots {
  display: flex;
  margin-top: 13px;
  gap: 4px;
}

.habit-dot {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: #e1e1da;
}

.habit-dot.is-done {
  background: var(--mint);
}

.habit-dot.is-today {
  border: 1px solid var(--coral);
  background: var(--paper);
}

.habit-dot.is-today.is-done {
  background: var(--coral);
}

.habit-today-label {
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 8px;
}

.badge-card {
  display: flex;
  min-height: 103px;
  padding: 15px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.48);
  transition: transform 180ms ease, border-color 180ms ease;
}

.badge-card:hover {
  border-color: rgba(237, 184, 78, 0.63);
  transform: translateY(-2px);
}

.badge-seal {
  position: relative;
  display: grid;
  width: 48px;
  height: 54px;
  place-items: center;
  clip-path: polygon(50% 0, 89% 19%, 100% 66%, 72% 100%, 28% 100%, 0 66%, 11% 19%);
  color: #fff5d2;
  background: linear-gradient(145deg, #f6d77c, #bd8128);
  flex: 0 0 auto;
}

.badge-seal .icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}

.badge-card.is-locked .badge-seal {
  color: #a9b1ad;
  background: #dfe1dc;
  filter: grayscale(1);
}

.badge-card.is-locked {
  opacity: 0.72;
}

.badge-title {
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
}

.badge-meta {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.45;
}

.badge-status {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 6px;
  border-radius: 4px;
  color: #956a20;
  background: var(--gold-soft);
  font-size: 8px;
  font-weight: 800;
}

.is-locked .badge-status {
  color: var(--ink-faint);
  background: var(--paper-deep);
}

.badge-wall {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.badge-card {
  position: relative;
  display: grid;
  min-height: 145px;
  padding: 15px;
  overflow: hidden;
  grid-column: span 4;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 5px 16px rgba(33, 43, 43, 0.045);
  text-align: left;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease, opacity 220ms ease, filter 220ms ease;
}

.badge-card:nth-child(1) { grid-column: span 5; }
.badge-card:nth-child(2) { grid-column: span 4; }
.badge-card:nth-child(3) { grid-column: span 3; }
.badge-card:nth-child(4) { grid-column: span 4; }
.badge-card:nth-child(5) { grid-column: span 4; }
.badge-card:nth-child(6) { grid-column: span 4; }

.badge-card::after {
  position: absolute;
  right: -24px;
  bottom: -39px;
  width: 108px;
  height: 108px;
  border: 1px solid rgba(20, 36, 43, 0.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.badge-card:hover {
  border-color: rgba(237, 184, 78, 0.75);
  box-shadow: 0 13px 26px rgba(33, 43, 43, 0.1);
  transform: translateY(-3px);
}

.badge-card.is-locked {
  filter: grayscale(0.96);
  opacity: 0.74;
}

.badge-card.is-locked:hover {
  filter: grayscale(0.58);
  opacity: 0.9;
}

.badge-art,
.showcase-art,
.showcase-mini-badge {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
}

.badge-art {
  width: 79px;
  height: 94px;
  clip-path: polygon(50% 0, 90% 18%, 100% 65%, 72% 100%, 28% 100%, 0 65%, 10% 18%);
  color: #fff9e7;
  background: #d29c4e;
  filter: drop-shadow(0 8px 8px rgba(20, 36, 43, 0.12));
}

.badge-art::before,
.showcase-art::before,
.showcase-mini-badge::before {
  position: absolute;
  inset: 6px;
  z-index: -1;
  border: 1px solid rgba(255, 253, 239, 0.58);
  content: "";
  clip-path: inherit;
}

.badge-art::after,
.showcase-art::after,
.showcase-mini-badge::after {
  position: absolute;
  inset: 13px;
  z-index: -1;
  border: 1px solid rgba(20, 36, 43, 0.25);
  content: "";
  clip-path: inherit;
}

.badge-art-glow {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(1px);
}

.badge-art strong,
.showcase-art strong,
.showcase-mini-badge strong {
  position: relative;
  z-index: 1;
  margin-top: -7px;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 1px 2px 0 rgba(20, 36, 43, 0.2);
}

.badge-art small,
.showcase-art small,
.showcase-mini-badge small {
  position: absolute;
  bottom: 15px;
  z-index: 1;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.badge-art i,
.showcase-art i,
.showcase-mini-badge i {
  position: absolute;
  right: 12px;
  top: 13px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-style: normal;
}

.badge-style-flame,
.showcase-art.badge-style-flame,
.showcase-mini-badge.badge-style-flame {
  background: linear-gradient(145deg, #ff9b72, #e4574d 53%, #793a45);
}

.badge-style-flame .badge-art-glow,
.showcase-art.badge-style-flame .badge-art-glow,
.showcase-mini-badge.badge-style-flame .badge-art-glow {
  background: radial-gradient(circle, rgba(255, 242, 185, 0.64), rgba(255, 255, 255, 0.05) 65%);
}

.badge-style-target,
.showcase-art.badge-style-target,
.showcase-mini-badge.badge-style-target {
  clip-path: circle(48% at 50% 50%);
  border: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, #caeff0 0 9px, #6babb0 10px 12px, #285a69 13px 19px);
}

.badge-style-target::before,
.showcase-art.badge-style-target::before,
.showcase-mini-badge.badge-style-target::before {
  inset: 13px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  clip-path: none;
}

.badge-style-target::after,
.showcase-art.badge-style-target::after,
.showcase-mini-badge.badge-style-target::after {
  inset: 30px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  clip-path: none;
}

.badge-style-target .badge-art-glow,
.showcase-art.badge-style-target .badge-art-glow,
.showcase-mini-badge.badge-style-target .badge-art-glow {
  background: rgba(255, 255, 255, 0.15);
}

.badge-style-sunrise,
.showcase-art.badge-style-sunrise,
.showcase-mini-badge.badge-style-sunrise {
  clip-path: polygon(50% 0, 61% 14%, 77% 5%, 79% 22%, 97% 23%, 87% 38%, 100% 50%, 84% 59%, 91% 77%, 73% 76%, 66% 100%, 51% 85%, 35% 100%, 28% 78%, 9% 83%, 15% 63%, 0 51%, 14% 39%, 3% 23%, 22% 21%, 22% 4%, 39% 14%);
  background: linear-gradient(145deg, #ffe58b, #edaa45 49%, #a95632);
}

.badge-style-sunrise .badge-art-glow,
.showcase-art.badge-style-sunrise .badge-art-glow,
.showcase-mini-badge.badge-style-sunrise .badge-art-glow {
  background: radial-gradient(circle, rgba(255, 251, 193, 0.8), transparent 69%);
}

.badge-style-crown,
.showcase-art.badge-style-crown,
.showcase-mini-badge.badge-style-crown {
  clip-path: polygon(4% 17%, 26% 34%, 39% 8%, 50% 34%, 64% 7%, 76% 34%, 97% 16%, 89% 82%, 11% 82%);
  background: linear-gradient(160deg, #f9e49a, #ce8b2a 55%, #825028);
}

.badge-style-crown::before,
.showcase-art.badge-style-crown::before,
.showcase-mini-badge.badge-style-crown::before {
  inset: 8px 8px 18px;
}

.badge-style-crown .badge-art-glow,
.showcase-art.badge-style-crown .badge-art-glow,
.showcase-mini-badge.badge-style-crown .badge-art-glow {
  width: 90px;
  height: 55px;
  background: radial-gradient(ellipse, rgba(255, 255, 232, 0.6), transparent 70%);
}

.badge-style-constellation,
.showcase-art.badge-style-constellation,
.showcase-mini-badge.badge-style-constellation {
  clip-path: polygon(50% 0, 62% 18%, 82% 11%, 87% 32%, 100% 50%, 83% 63%, 89% 86%, 66% 82%, 50% 100%, 35% 82%, 12% 89%, 17% 65%, 0 50%, 17% 35%, 11% 12%, 36% 18%);
  background: radial-gradient(circle at 65% 30%, #e7d2ff, transparent 28%), linear-gradient(145deg, #826bb7, #413d77 60%, #202a4e);
}

.badge-style-constellation::after,
.showcase-art.badge-style-constellation::after,
.showcase-mini-badge.badge-style-constellation::after {
  border-style: dashed;
  border-color: rgba(236, 228, 255, 0.68);
}

.badge-style-season,
.showcase-art.badge-style-season,
.showcase-mini-badge.badge-style-season {
  clip-path: polygon(50% 0, 92% 24%, 83% 75%, 50% 100%, 17% 75%, 8% 24%);
  background: linear-gradient(145deg, #f5c96e, #d76b43 52%, #6c3544);
}

.badge-style-season .badge-art-glow,
.showcase-art.badge-style-season .badge-art-glow,
.showcase-mini-badge.badge-style-season .badge-art-glow {
  background: radial-gradient(circle, rgba(255, 248, 189, 0.75), transparent 68%);
}

.badge-card-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.badge-card-copy .badge-title {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-card-copy .badge-meta {
  display: block;
  max-width: 135px;
  margin-top: 6px;
  overflow: hidden;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-card-copy .badge-status {
  display: inline-flex;
  margin-top: 10px;
  padding: 4px 6px;
  font-size: 8px;
}

.badge-card-corner {
  position: absolute;
  right: 11px;
  top: 10px;
  z-index: 1;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-faint);
  background: rgba(247, 241, 232, 0.72);
}

.badge-card-corner .icon {
  width: 12px;
  height: 12px;
}

.badge-wall-more {
  display: inline-flex;
  min-height: 46px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  grid-column: 1 / -1;
  border: 1px dashed rgba(20, 36, 43, 0.18);
  border-radius: 10px;
  color: var(--coral-deep);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.badge-wall-more:hover {
  border-color: var(--coral);
  background: var(--coral-wash);
}

.badge-wall-more .icon {
  width: 14px;
  height: 14px;
}

.my-profile-card {
  position: relative;
  padding: 25px 26px 0;
  overflow: hidden;
  border-radius: 20px;
  color: #f7f1e8;
  background:
    radial-gradient(circle at 91% -15%, rgba(237, 184, 78, 0.29), transparent 16rem),
    linear-gradient(130deg, #16272d, #1b353b 70%, #213f43);
  box-shadow: 0 17px 33px rgba(20, 36, 43, 0.15);
}

.my-profile-card::before,
.my-profile-card::after {
  position: absolute;
  right: -90px;
  top: 20px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(247, 241, 232, 0.11);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.my-profile-card::after {
  right: -35px;
  top: 74px;
  width: 200px;
  height: 200px;
  border-color: rgba(237, 184, 78, 0.26);
}

.my-profile-line {
  position: absolute;
  right: 24px;
  left: 24px;
  top: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237, 184, 78, 0.45), transparent);
}

.my-identity-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.my-avatar-upload {
  position: relative;
  display: block;
  width: 86px;
  height: 86px;
  cursor: pointer;
  flex: 0 0 auto;
}

.my-avatar-frame {
  position: relative;
  display: block;
  width: 86px;
  height: 86px;
}

.my-avatar {
  display: grid;
  width: 78px;
  height: 78px;
  overflow: hidden;
  place-items: center;
  border: 3px solid var(--gold);
  border-radius: 50%;
  color: var(--ink);
  background-color: var(--gold-soft);
  background-position: center;
  background-size: cover;
  font-family: var(--display);
  font-size: 31px;
  font-weight: 900;
  box-shadow: 0 0 0 5px rgba(237, 184, 78, 0.13);
}

.my-avatar-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.my-avatar-plus {
  position: absolute;
  right: 2px;
  bottom: 0;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 2px solid #1a3036;
  border-radius: 50%;
  color: #fffaf1;
  background: var(--coral);
  font-size: 17px;
  line-height: 1;
}

.my-avatar-upload:hover .my-avatar {
  border-color: var(--coral);
}

.avatar-bubble {
  position: absolute;
  top: -10px;
  right: -13px;
  display: inline-flex;
  min-height: 22px;
  padding: 0 7px;
  align-items: center;
  border: 1px solid rgba(255, 248, 218, 0.72);
  border-radius: 8px 8px 8px 2px;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
  transform: rotate(5deg);
  animation: bubble-float 3.8s ease-in-out infinite;
}

.avatar-bubble::after {
  position: absolute;
  left: 6px;
  bottom: -5px;
  width: 7px;
  height: 7px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  content: "";
}

.bubble-flame { background: linear-gradient(135deg, #ff9b72, #ef6a54); }
.bubble-target { background: linear-gradient(135deg, #c8ebeb, #7fb6bb); }
.bubble-sunrise { background: linear-gradient(135deg, #ffe6a1, #edb84e); }
.bubble-crown { background: linear-gradient(135deg, #f5d788, #c98329); }
.bubble-constellation { color: #fff; background: linear-gradient(135deg, #8471b5, #49477e); }
.bubble-season { background: linear-gradient(135deg, #f5cb73, #d86646); }

@keyframes bubble-float {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  50% { transform: translateY(-4px) rotate(5deg); }
}

.my-identity-copy {
  min-width: 0;
}

.my-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.my-name-line h3 {
  margin: 0;
  color: #fff9ed;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.07em;
}

.my-rank-pill {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid rgba(237, 184, 78, 0.42);
  border-radius: 5px;
  color: var(--gold);
  background: rgba(237, 184, 78, 0.11);
  font-size: 9px;
  font-weight: 900;
}

.earned-inline {
  display: flex;
  margin-top: 10px;
  align-items: center;
  gap: 8px;
}

.earned-inline-name {
  margin-top: 0;
  margin-left: 2px;
}

.earned-inline > span {
  color: rgba(247, 241, 232, 0.45);
  font-size: 9px;
}

.mini-badge-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mini-badge {
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  clip-path: polygon(50% 0, 90% 20%, 100% 65%, 72% 100%, 28% 100%, 0 65%, 10% 20%);
  color: #fff7da;
  background: #d69c46;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 900;
  transition: transform 180ms ease;
}

.mini-badge:hover {
  transform: scale(1.16) rotate(7deg);
}

.mini-badge.mini-badge-flame { background: var(--coral); }
.mini-badge.mini-badge-target { background: #609aa2; }
.mini-badge.mini-badge-sunrise { background: #d99d36; }

.my-identity-copy > p {
  margin: 9px 0 0;
  color: rgba(247, 241, 232, 0.51);
  font-size: 10px;
}

.profile-edit-button {
  display: inline-flex;
  margin-left: auto;
  padding: 9px 10px 9px 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(247, 241, 232, 0.17);
  border-radius: 8px;
  color: rgba(247, 241, 232, 0.78);
  background: rgba(255, 255, 255, 0.06);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.profile-edit-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.profile-edit-button .icon {
  width: 13px;
  height: 13px;
}

.my-stat-line {
  position: relative;
  z-index: 1;
  display: grid;
  margin: 23px -26px 0;
  padding: 14px 26px 15px;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(247, 241, 232, 0.12);
  background: rgba(0, 0, 0, 0.13);
}

.my-stat-line > div {
  display: grid;
  gap: 5px;
  border-right: 1px solid rgba(247, 241, 232, 0.1);
}

.my-stat-line > div:not(:first-child) {
  padding-left: 18px;
}

.my-stat-line > div:last-child {
  border-right: 0;
}

.my-stat-line strong {
  color: var(--gold);
  font-family: var(--display);
  font-size: 20px;
  line-height: 1;
}

.my-stat-line span {
  color: rgba(247, 241, 232, 0.46);
  font-size: 9px;
}

.my-grid {
  display: grid;
  margin-top: 14px;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.my-panel,
.bubble-panel,
.settings-panel {
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 5px 16px rgba(33, 43, 43, 0.045);
}

.my-panel {
  min-height: 161px;
  padding: 17px;
}

.my-panel-kicker {
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.season-panel-body,
.showcase-panel-body {
  display: flex;
  min-height: 91px;
  padding-top: 15px;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
}

.season-panel-body h3,
.showcase-panel-body h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.07em;
}

.season-panel-body h3 em {
  color: var(--coral-deep);
  font-style: normal;
}

.season-panel-body p,
.showcase-panel-body p {
  max-width: 160px;
  margin: 7px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.5;
}

.season-ring {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 7px solid rgba(20, 36, 43, 0.09);
  border-top-color: var(--coral);
  border-right-color: var(--gold);
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
}

.my-panel-foot {
  display: flex;
  padding-top: 9px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(20, 36, 43, 0.08);
  color: var(--ink-faint);
  font-size: 9px;
}

.my-panel-foot strong {
  color: var(--ink-soft);
  font-size: 9px;
}

.showcase-mini-badge {
  width: 61px;
  height: 69px;
  color: #fff7da;
  flex: 0 0 auto;
}

.showcase-mini-badge strong {
  font-size: 21px;
}

.showcase-mini-badge small {
  bottom: 11px;
  font-size: 6px;
}

.showcase-mini-badge i {
  right: 8px;
  top: 8px;
  font-size: 8px;
}

.showcase-link {
  display: inline-flex;
  padding: 0;
  align-items: center;
  gap: 6px;
  color: var(--coral-deep);
  background: transparent;
  font-size: 9px;
  font-weight: 900;
}

.showcase-link:hover { color: var(--ink); }
.showcase-link .icon { width: 13px; height: 13px; }

.bubble-panel {
  margin-top: 14px;
  padding: 18px;
}

.bubble-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
}

.bubble-panel-heading h3 {
  margin: 6px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.bubble-panel-heading > span {
  padding-bottom: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

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

.bubble-choice {
  display: flex;
  min-width: 0;
  padding: 8px 9px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(247, 241, 232, 0.6);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, filter 180ms ease;
}

.bubble-choice:hover:not(.is-locked) {
  border-color: rgba(239, 106, 84, 0.5);
  transform: translateY(-2px);
}

.bubble-choice.is-equipped {
  border-color: var(--coral);
  background: var(--coral-wash);
}

.bubble-choice.is-locked {
  filter: grayscale(1);
  opacity: 0.56;
}

.bubble-choice-art {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  clip-path: polygon(50% 0, 90% 20%, 100% 65%, 72% 100%, 28% 100%, 0 65%, 10% 20%);
  color: #fff6d3;
  background: var(--coral);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 900;
  flex: 0 0 auto;
}

.bubble-choice-art.bubble-target { background: #5b98a1; }
.bubble-choice-art.bubble-sunrise { background: #d59734; }
.bubble-choice-art.bubble-crown { background: #be7c28; }
.bubble-choice-art.bubble-constellation { background: #6d5e9d; }
.bubble-choice-art.bubble-season { background: #c65e43; }

.bubble-choice > span:last-child {
  min-width: 0;
}

.bubble-choice strong,
.bubble-choice small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bubble-choice strong {
  font-size: 10px;
}

.bubble-choice small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.settings-panel {
  margin-top: 14px;
  padding: 18px 18px 7px;
}

.setting-row {
  display: flex;
  width: 100%;
  min-height: 58px;
  padding: 10px 0;
  align-items: center;
  gap: 11px;
  border-top: 1px solid rgba(20, 36, 43, 0.08);
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.settings-panel > .my-panel-kicker + .setting-row {
  margin-top: 9px;
}

.setting-row:hover:not(.setting-row-static) {
  color: var(--coral-deep);
}

.setting-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  color: var(--coral-deep);
  background: var(--coral-wash);
  flex: 0 0 auto;
}

.setting-icon .icon {
  width: 14px;
  height: 14px;
}

.setting-row > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.setting-row strong,
.setting-row small {
  display: block;
}

.setting-row strong {
  font-size: 11px;
}

.setting-row small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.setting-row > .icon:last-child {
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
}

.setting-row .reminder-toggle {
  margin-left: auto;
}

.setting-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #43856f;
  font-size: 9px;
  font-weight: 800;
}

.setting-status .local-dot {
  width: 5px;
  height: 5px;
}

.badge-progress-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: min(90svh, 760px);
  padding: 29px 30px 24px;
  overflow-y: auto;
  border: 1px solid rgba(237, 184, 78, 0.42);
  border-radius: 24px;
  color: #f7f1e8;
  background:
    radial-gradient(circle at 84% 4%, rgba(237, 184, 78, 0.2), transparent 16rem),
    radial-gradient(circle at 5% 88%, rgba(239, 106, 84, 0.13), transparent 18rem),
    linear-gradient(145deg, #182c32, #102127 72%);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
  animation: modal-rise 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.badge-progress-modal::-webkit-scrollbar {
  width: 6px;
}

.badge-progress-modal::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: rgba(237, 184, 78, 0.38);
}

.badge-progress-modal .modal-close {
  color: rgba(247, 241, 232, 0.56);
  background: rgba(255, 255, 255, 0.08);
}

.badge-progress-kicker {
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.badge-progress-heading {
  display: flex;
  margin-top: 12px;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.badge-progress-heading h2 {
  margin: 0;
  color: #fff8df;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1.18;
}

.badge-progress-heading p {
  max-width: 390px;
  margin: 8px 0 0;
  color: rgba(247, 241, 232, 0.53);
  font-size: 11px;
  line-height: 1.6;
}

.badge-progress-count {
  display: grid;
  flex: 0 0 auto;
  min-width: 90px;
  padding: 9px 11px;
  border: 1px solid rgba(237, 184, 78, 0.25);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  text-align: right;
}

.badge-progress-count small,
.badge-progress-count strong {
  display: block;
}

.badge-progress-count small {
  color: rgba(247, 241, 232, 0.43);
  font-size: 8px;
}

.badge-progress-count strong {
  margin-top: 3px;
  color: var(--gold);
  font-family: var(--display);
  font-size: 18px;
}

.badge-focus-panel {
  display: grid;
  margin-top: 20px;
  padding: 15px 17px;
  align-items: center;
  gap: 19px;
  grid-template-columns: 139px minmax(0, 1fr);
  border: 1px solid rgba(237, 184, 78, 0.21);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
}

.badge-focus-art-wrap {
  display: grid;
  min-height: 145px;
  place-items: center;
}

.badge-focus-art-wrap .showcase-art {
  width: 110px;
  height: 127px;
}

.badge-focus-art-wrap .showcase-art strong {
  font-size: 39px;
}

.badge-focus-art-wrap .showcase-art small {
  bottom: 19px;
  font-size: 8px;
}

.badge-focus-copy {
  min-width: 0;
}

.badge-focus-eyebrow {
  color: var(--coral);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.badge-focus-copy h3 {
  margin: 8px 0 0;
  color: #fff8df;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.badge-focus-copy p {
  margin: 7px 0 17px;
  color: rgba(247, 241, 232, 0.57);
  font-size: 10px;
  line-height: 1.65;
}

.badge-focus-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(247, 241, 232, 0.14);
}

.badge-focus-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  box-shadow: 0 0 14px rgba(237, 184, 78, 0.34);
  transition: width 350ms ease;
}

.badge-focus-progress-meta {
  display: flex;
  margin-top: 8px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(247, 241, 232, 0.48);
  font-size: 9px;
}

.badge-focus-progress-meta strong {
  color: var(--gold);
  font-family: var(--display);
  font-size: 14px;
}

.badge-road-heading,
.badge-quest-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.badge-road-heading {
  margin-top: 23px;
}

.badge-road-heading > span,
.badge-quest-heading h3 {
  color: #fff8df;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 900;
}

.badge-road-heading > small,
.badge-quest-heading > span {
  color: rgba(247, 241, 232, 0.4);
  font-size: 9px;
}

.badge-road-wrap {
  margin-top: 9px;
  overflow-x: auto;
  padding-bottom: 7px;
  scrollbar-width: thin;
}

.badge-road-inner {
  position: relative;
  min-width: 650px;
  padding: 16px 0 1px;
}

.badge-road-track {
  position: absolute;
  top: 40px;
  right: 42px;
  left: 42px;
  height: 3px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(247, 241, 232, 0.14);
}

.badge-road-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  box-shadow: 0 0 12px rgba(237, 184, 78, 0.38);
  transition: width 400ms ease;
}

.badge-road-stops {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
}

.badge-road-stop {
  display: grid;
  min-height: 105px;
  padding: 0 4px;
  align-content: start;
  justify-items: center;
  gap: 5px;
  border: 0;
  color: rgba(247, 241, 232, 0.49);
  background: transparent;
  text-align: center;
}

.badge-road-stop:hover,
.badge-road-stop.is-selected {
  color: #fff8df;
}

.badge-road-node {
  position: relative;
  display: grid;
  width: 53px;
  height: 52px;
  place-items: center;
}

.badge-road-node::after {
  position: absolute;
  inset: 1px;
  border: 1px solid transparent;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.badge-road-stop.is-selected .badge-road-node::after {
  border-color: rgba(237, 184, 78, 0.85);
  box-shadow: 0 0 0 4px rgba(237, 184, 78, 0.11);
}

.badge-road-glyph {
  display: grid;
  width: 34px;
  height: 42px;
  place-items: center;
  clip-path: polygon(50% 0, 90% 18%, 100% 65%, 72% 100%, 28% 100%, 0 65%, 10% 18%);
  color: #fff9e7;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 900;
  filter: drop-shadow(0 7px 6px rgba(0, 0, 0, 0.2));
  transition: transform 200ms ease, filter 200ms ease, opacity 200ms ease;
}

.badge-road-stop:hover .badge-road-glyph,
.badge-road-stop.is-selected .badge-road-glyph {
  transform: translateY(-3px);
}

.badge-road-stop.is-locked .badge-road-glyph {
  filter: grayscale(1) drop-shadow(0 5px 5px rgba(0, 0, 0, 0.15));
  opacity: 0.55;
}

.badge-road-node > b {
  position: absolute;
  right: 1px;
  bottom: 1px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 2px solid #14272d;
  border-radius: 50%;
  color: var(--gold);
  background: #263f43;
  font-size: 8px;
}

.badge-road-stop.is-earned .badge-road-node > b {
  color: var(--ink);
  background: var(--gold);
}

.badge-road-stop strong,
.badge-road-stop small {
  display: block;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-road-stop strong {
  color: inherit;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
}

.badge-road-stop small {
  color: rgba(247, 241, 232, 0.36);
  font-size: 8px;
}

.badge-quest-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(247, 241, 232, 0.11);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.badge-quest-heading h3 {
  margin: 6px 0 0;
}

.badge-quest-summary {
  display: flex;
  margin-top: 13px;
  padding: 9px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  background: rgba(237, 184, 78, 0.1);
  color: rgba(247, 241, 232, 0.47);
  font-size: 9px;
}

.badge-quest-summary strong {
  color: var(--gold);
  font-size: 10px;
}

.badge-quest-steps {
  display: grid;
  margin-top: 7px;
  gap: 5px;
}

.badge-quest-step {
  display: grid;
  padding: 9px 0;
  align-items: start;
  gap: 10px;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  border-bottom: 1px solid rgba(247, 241, 232, 0.08);
}

.badge-quest-step:last-child {
  border-bottom: 0;
}

.badge-quest-step > span {
  color: var(--coral);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.badge-quest-step strong,
.badge-quest-step small {
  display: block;
}

.badge-quest-step strong {
  color: rgba(247, 241, 232, 0.9);
  font-size: 10px;
}

.badge-quest-step small {
  margin-top: 3px;
  color: rgba(247, 241, 232, 0.42);
  font-size: 9px;
  line-height: 1.5;
}

.badge-quest-step i {
  color: var(--gold);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.badge-progress-library {
  display: inline-flex;
  margin-top: 15px;
  padding: 0;
  align-items: center;
  gap: 7px;
  color: rgba(247, 241, 232, 0.58);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.badge-progress-library:hover {
  color: var(--gold);
}

.badge-progress-library .icon {
  width: 13px;
  height: 13px;
}

.badge-showcase-modal {
  position: relative;
  width: min(470px, 100%);
  padding: 31px 34px 28px;
  overflow: hidden;
  border: 1px solid rgba(237, 184, 78, 0.44);
  border-radius: 25px;
  color: #f7f1e8;
  background:
    radial-gradient(circle at 50% 20%, rgba(237, 184, 78, 0.2), transparent 12rem),
    linear-gradient(145deg, #182c32, #102127);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.35);
  text-align: center;
  animation: modal-rise 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.badge-showcase-modal .modal-close {
  color: rgba(247, 241, 232, 0.56);
  background: rgba(255, 255, 255, 0.08);
}

.showcase-modal-kicker {
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.showcase-stage {
  position: relative;
  display: grid;
  min-height: 225px;
  margin: 11px auto 4px;
  place-items: center;
}

.showcase-stage-line {
  position: absolute;
  right: 12%;
  left: 12%;
  bottom: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237, 184, 78, 0.56), transparent);
}

.showcase-orbit {
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(237, 184, 78, 0.23);
  border-radius: 50%;
}

.showcase-orbit::after {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(237, 184, 78, 0.13);
  content: "";
}

.showcase-orbit.orbit-one { transform: rotate(26deg) scaleY(0.42); }
.showcase-orbit.orbit-two { transform: rotate(-26deg) scaleY(0.42); }

.showcase-art {
  width: 143px;
  height: 163px;
  color: #fff7da;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.3));
  animation: showcase-float 4s ease-in-out infinite;
}

.showcase-art strong { font-size: 47px; }
.showcase-art small { bottom: 25px; font-size: 10px; }
.showcase-art i { right: 22px; top: 20px; font-size: 16px; }

.showcase-art.is-locked,
.showcase-mini-badge.is-locked {
  filter: grayscale(1) drop-shadow(0 10px 10px rgba(0, 0, 0, 0.16));
}

@keyframes showcase-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

.showcase-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--gold);
  background: rgba(237, 184, 78, 0.13);
  font-size: 9px;
  font-weight: 800;
}

.badge-showcase-modal h2 {
  margin: 16px 0 7px;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.badge-showcase-modal > p {
  max-width: 300px;
  margin: 0 auto;
  color: rgba(247, 241, 232, 0.58);
  font-size: 11px;
  line-height: 1.7;
}

.showcase-requirement {
  display: flex;
  margin: 17px auto 0;
  padding: 10px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid rgba(247, 241, 232, 0.12);
  border-radius: 8px;
  color: rgba(247, 241, 232, 0.48);
  background: rgba(255, 255, 255, 0.05);
  font-size: 9px;
}

.showcase-requirement strong {
  color: rgba(247, 241, 232, 0.88);
  font-size: 10px;
}

.showcase-equip-button {
  display: inline-flex;
  margin-top: 16px;
  padding: 10px 13px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--gold);
  font-size: 10px;
  font-weight: 900;
}

.showcase-equip-button:hover { background: #f5ca67; }
.showcase-equip-button .icon { width: 13px; height: 13px; }

.bottom-tabs {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: none;
  height: 72px;
  padding: 8px 15px calc(8px + env(safe-area-inset-bottom));
  align-items: stretch;
  justify-content: space-around;
  gap: 0;
  border-top: 1px solid rgba(20, 36, 43, 0.08);
  background: rgba(247, 241, 232, 0.93);
  box-shadow: 0 -10px 25px rgba(20, 36, 43, 0.07);
  backdrop-filter: blur(16px);
}

.bottom-tab {
  position: relative;
  display: flex;
  width: auto;
  min-width: 0;
  flex: 0 1 82px;
  padding: 4px 9px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  color: var(--ink-faint);
  background: transparent;
  flex-direction: column;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  transition: color 180ms ease, background 180ms ease;
}

.bottom-tab .icon {
  width: 18px;
  height: 18px;
}

.bottom-tab.is-active {
  color: var(--coral-deep);
  background: transparent;
}

.bottom-tab.is-active::after {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--coral);
  content: "";
  transform: translateX(-50%);
}

.bottom-tab-add {
  position: relative;
  transform: translateY(-6px);
  color: var(--ink);
  background: transparent;
}

.bottom-tab-add:hover {
  color: var(--coral-deep);
  background: transparent;
}

.bottom-add-mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 3px;
  place-items: center;
  border: 4px solid var(--paper);
  border-radius: 50%;
  color: #fffaf1;
  background: var(--coral);
  box-shadow: 0 8px 18px rgba(239, 106, 84, 0.26), 0 0 0 1px rgba(239, 106, 84, 0.16);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.bottom-tab-add:hover .bottom-add-mark {
  background: var(--coral-deep);
  box-shadow: 0 11px 23px rgba(239, 106, 84, 0.32), 0 0 0 1px rgba(239, 106, 84, 0.2);
  transform: rotate(90deg);
}

.bottom-tab-add .icon {
  width: 22px;
  height: 22px;
}

.bottom-tab-add > span:last-child {
  color: var(--coral-deep);
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(14, 27, 32, 0.72);
  backdrop-filter: blur(9px);
}

body.modal-open {
  overflow: hidden;
}

.profile-modal {
  position: relative;
  width: min(470px, 100%);
  padding: 31px 31px 25px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 23px;
  background: var(--paper);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.28);
  animation: modal-rise 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-modal .modal-close {
  color: var(--ink-faint);
  background: rgba(20, 36, 43, 0.06);
}

.profile-modal-eyebrow {
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.profile-modal-heading {
  display: flex;
  margin-top: 12px;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.profile-modal-heading h2 {
  max-width: 310px;
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1.35;
}

.profile-modal-heading p {
  margin: 7px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.profile-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  clip-path: polygon(50% 0, 90% 19%, 100% 65%, 72% 100%, 28% 100%, 0 65%, 10% 19%);
  color: var(--ink);
  background: var(--gold);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
  flex: 0 0 auto;
}

.profile-preview {
  display: flex;
  margin-top: 24px;
  padding: 14px;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(20, 36, 43, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.4);
}

.avatar-upload {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  cursor: pointer;
  flex: 0 0 auto;
}

.profile-avatar-large {
  display: grid;
  width: 52px;
  height: 52px;
  overflow: hidden;
  place-items: center;
  border: 2px solid rgba(237, 184, 78, 0.8);
  border-radius: 50%;
  color: var(--ink);
  background-color: var(--gold-soft);
  background-position: center;
  background-size: cover;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 900;
}

.avatar-upload:hover .profile-avatar-large {
  border-color: var(--coral);
}

.avatar-upload-badge {
  position: absolute;
  right: -3px;
  bottom: -2px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: #fffaf1;
  background: var(--coral);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

.avatar-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.profile-preview strong,
.profile-preview span,
.profile-preview small {
  display: block;
}

.profile-preview strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
}

.profile-preview div > span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
}

.profile-preview small {
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 9px;
}

.profile-form {
  display: grid;
  margin-top: 17px;
  gap: 12px;
}

.profile-form label {
  display: grid;
  gap: 6px;
}

.profile-form label > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.profile-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(20, 36, 43, 0.13);
  border-radius: 9px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.profile-save {
  display: inline-flex;
  min-height: 41px;
  margin-top: 2px;
  padding: 0 14px 0 16px;
  align-items: center;
  justify-content: space-between;
  border-radius: 9px;
  color: #fffaf1;
  background: var(--ink);
  font-size: 11px;
  font-weight: 800;
  transition: background 180ms ease, transform 180ms ease;
}

.profile-save:hover {
  background: var(--coral-deep);
  transform: translateY(-1px);
}

.profile-save .icon {
  width: 15px;
  height: 15px;
}

.profile-integration-note {
  display: flex;
  margin-top: 16px;
  padding: 10px 11px;
  align-items: flex-start;
  gap: 8px;
  border: 1px dashed rgba(20, 36, 43, 0.14);
  border-radius: 9px;
  color: var(--ink-faint);
  background: rgba(236, 228, 217, 0.45);
  font-size: 9px;
  line-height: 1.6;
}

.profile-integration-note b {
  color: var(--ink-soft);
}

.profile-logout {
  display: block;
  width: 100%;
  margin-top: 13px;
  padding: 8px;
  border-radius: 8px;
  color: var(--coral-deep);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.profile-logout:hover {
  background: var(--coral-wash);
}

.integration-dot {
  width: 6px;
  height: 6px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(168, 216, 195, 0.18);
  flex: 0 0 auto;
}

.promotion-modal {
  position: relative;
  width: min(420px, 100%);
  padding: 39px 35px 31px;
  overflow: hidden;
  border: 1px solid rgba(237, 184, 78, 0.45);
  border-radius: 25px;
  color: #f7f1e8;
  background:
    radial-gradient(circle at 50% 24%, rgba(237, 184, 78, 0.2), transparent 11rem),
    #16272d;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.35);
  text-align: center;
  animation: modal-rise 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes modal-rise {
  from { opacity: 0; transform: translateY(22px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: rgba(247, 241, 232, 0.54);
  background: rgba(255, 255, 255, 0.08);
}

.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.modal-close .icon {
  width: 14px;
  height: 14px;
}

.promotion-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 9px;
}

.promotion-kicker .status-dot {
  width: 5px;
  height: 5px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(237, 184, 78, 0.14);
}

.promotion-emblem {
  width: 130px;
  height: 145px;
  margin: 20px auto 18px;
  color: #fff7da;
  background: linear-gradient(145deg, #f3d68a, #b9802d 48%, #73501d);
  font-family: var(--display);
  font-size: 51px;
  font-weight: 900;
  filter: drop-shadow(0 15px 18px rgba(0, 0, 0, 0.23));
  animation: emblem-pop 900ms 120ms cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

@keyframes emblem-pop {
  0% { transform: scale(0.35) rotate(-17deg); opacity: 0; }
  65% { transform: scale(1.09) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.promotion-rays {
  position: absolute;
  inset: -37px;
  z-index: -2;
  border: 1px dashed rgba(237, 184, 78, 0.7);
  border-radius: 50%;
  animation: spin 16s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.promotion-transition {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: rgba(247, 241, 232, 0.52);
  font-family: var(--display);
  font-size: 13px;
}

.promotion-transition .icon {
  width: 17px;
  height: 17px;
  color: var(--gold);
}

.promotion-transition strong {
  color: var(--gold);
  font-size: 20px;
}

.promotion-modal h2 {
  margin: 20px 0 9px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.promotion-modal p {
  margin: 0 auto;
  max-width: 280px;
  color: rgba(247, 241, 232, 0.57);
  font-size: 11px;
  line-height: 1.7;
}

.promotion-button {
  display: inline-flex;
  margin-top: 25px;
  padding: 12px 15px;
  align-items: center;
  gap: 12px;
  border-radius: 9px;
  color: var(--ink);
  background: var(--gold);
  font-size: 11px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease;
}

.promotion-button:hover {
  background: #f5ca67;
  transform: translateY(-2px);
}

.promotion-button .icon {
  width: 14px;
  height: 14px;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: grid;
  max-width: min(350px, calc(100vw - 44px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  padding: 12px 14px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(20, 36, 43, 0.12);
  border-radius: 11px;
  color: #f7f1e8;
  background: rgba(20, 36, 43, 0.95);
  box-shadow: 0 10px 27px rgba(20, 36, 43, 0.18);
  font-size: 11px;
  animation: toast-in 320ms ease both;
}

.toast.is-leaving {
  animation: toast-out 280ms ease both;
}

.toast .icon {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 214px minmax(0, 1fr);
    width: min(1440px, calc(100% - 24px));
  }

  .desktop-rail {
    padding-right: 19px;
    padding-left: 19px;
  }

  .topbar,
  .scroll-area {
    padding-right: 32px;
    padding-left: 32px;
  }

  .hero-card {
    padding-right: 28px;
    padding-left: 28px;
  }

  .rank-stage {
    padding-left: 0;
  }
}

@media (max-width: 760px) {
  html,
  body {
    background: var(--paper);
  }

  .app-shell {
    display: block;
    width: 100%;
    min-height: 100vh;
  }

  .desktop-rail {
    display: none;
  }

  .app-main {
    min-height: 100svh;
  }

  .topbar {
    min-height: 65px;
    padding: 0 18px;
  }

  .mobile-brand {
    display: flex;
  }

  .topbar-date {
    display: block;
    margin-left: auto;
    margin-right: 11px;
    text-align: right;
  }

  .topbar-kicker {
    display: block;
    margin-bottom: 3px;
    font-size: 8px;
  }

  .topbar-date > span:last-child {
    font-size: 11px;
  }

  .topbar-pill {
    display: none;
  }

  .scroll-area {
    height: calc(100svh - 65px);
    padding: 20px 17px 105px;
  }

  .page-heading {
    margin-bottom: 23px;
  }

  .page-heading-note {
    display: none;
  }

  .hero-card {
    display: grid;
    min-height: 365px;
    padding: 26px 23px 24px;
    place-items: center;
  }

  .hero-copy h1 {
    margin-top: 22px;
    font-size: clamp(41px, 13vw, 61px);
  }

  .hero-copy p {
    max-width: 300px;
    font-size: 12px;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .hero-microcopy {
    width: 100%;
  }

  .rank-stage {
    margin-top: 0;
    padding: 0;
    border-top: 0;
  }

  .rank-emblem {
    width: 130px;
    height: 143px;
    margin-top: 12px;
  }

  .metrics-grid {
    margin-top: 11px;
    gap: 8px;
  }

  .metric-card {
    min-height: 118px;
    padding: 14px 12px 13px;
  }

  .metric-icon {
    top: 13px;
    right: 12px;
    width: 24px;
    height: 24px;
  }

  .metric-icon .icon {
    width: 13px;
    height: 13px;
  }

  .metric-label {
    max-width: 55px;
    font-size: 9px;
    line-height: 1.35;
  }

  .metric-value {
    margin-top: 11px;
    font-size: 24px;
  }

  .metric-value small {
    margin-left: 2px;
    font-size: 9px;
  }

  .metric-foot {
    right: 10px;
    bottom: 12px;
    left: 10px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .section-block {
    margin-top: 36px;
  }

  .section-heading {
    align-items: start;
  }

  .section-heading h2 {
    font-size: 22px;
  }

  .section-side-note {
    display: none;
  }

  .composer-main {
    min-height: 97px;
    padding: 17px 15px 12px;
  }

  .composer-main textarea {
    font-size: 15px;
  }

  .ai-detection {
    right: 15px;
    bottom: 9px;
    font-size: 8px;
  }

  .composer-tools {
    min-height: 50px;
    padding: 0 12px 0 15px;
  }

  .composer-tool-group {
    gap: 9px;
  }

  .composer-tool,
  .reminder-toggle {
    font-size: 0;
  }

  .composer-tool .icon,
  .reminder-toggle .icon {
    width: 16px;
    height: 16px;
  }

  .reminder-label {
    display: inline-flex;
    font-size: 0;
  }

  .reminder-label .icon {
    width: 16px;
    height: 16px;
  }

  .link-editor {
    padding: 0 15px 15px 49px;
  }

  .dayline::before {
    left: 43px;
  }

  .promise-card {
    padding-right: 11px;
    gap: 10px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .promise-time {
    padding-left: 7px;
  }

  .promise-time::after {
    right: -3px;
  }

  .promise-time strong {
    font-size: 14px;
  }

  .promise-time small {
    font-size: 8px;
  }

  .promise-title {
    font-size: 13px;
  }

  .promise-meta,
  .promise-links {
    margin-left: 29px;
  }

  .promise-side {
    min-height: 64px;
  }

  .link-tile {
    width: min(170px, 100%);
  }

  .goals-grid,
  .habit-strip,
  .badge-strip {
    grid-template-columns: 1fr;
  }

  .goal-card {
    padding: 16px;
  }

  .goal-title {
    min-height: 0;
  }

  .goal-heading-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .goal-add-button {
    align-self: flex-start;
  }

  .goal-logs {
    grid-template-columns: 1fr;
  }

  .habit-card {
    min-height: 128px;
  }

  .badge-card {
    min-height: 88px;
  }

  .badge-wall {
    grid-template-columns: 1fr;
  }

  .badge-card,
  .badge-card:nth-child(1),
  .badge-card:nth-child(2),
  .badge-card:nth-child(3),
  .badge-card:nth-child(4),
  .badge-card:nth-child(5),
  .badge-card:nth-child(6) {
    min-height: 126px;
    grid-column: auto;
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .badge-art {
    width: 68px;
    height: 84px;
  }

  .my-profile-card {
    padding: 23px 17px 0;
  }

  .my-identity-row {
    flex-wrap: wrap;
    gap: 13px;
  }

  .my-avatar-upload {
    width: 72px;
    height: 72px;
  }

  .my-avatar-frame {
    width: 72px;
    height: 72px;
  }

  .my-avatar {
    width: 66px;
    height: 66px;
    font-size: 27px;
  }

  .my-avatar-plus {
    right: -1px;
    width: 20px;
    height: 20px;
    font-size: 14px;
  }

  .my-identity-copy {
    max-width: calc(100% - 88px);
  }

  .my-name-line h3 {
    font-size: 20px;
  }

  .profile-edit-button {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .my-stat-line {
    margin-right: -17px;
    margin-left: -17px;
    padding-right: 17px;
    padding-left: 17px;
  }

  .my-stat-line > div:not(:first-child) {
    padding-left: 9px;
  }

  .my-stat-line strong {
    font-size: 17px;
  }

  .my-stat-line span {
    font-size: 8px;
  }

  .my-grid {
    grid-template-columns: 1fr;
  }

  .bubble-panel-heading {
    display: block;
  }

  .bubble-panel-heading > span {
    display: block;
    margin-top: 6px;
  }

  .bubble-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-modal,
  .badge-showcase-modal {
    padding-right: 20px;
    padding-left: 20px;
  }

  .badge-showcase-modal h2 {
    font-size: 24px;
  }

  .toast-region {
    right: 15px;
    bottom: 83px;
  }
}

@media (max-width: 390px) {
  .mobile-brand > span {
    display: none;
  }

  .topbar-date > span:last-child {
    font-size: 10px;
  }

  .hero-card {
    min-height: 365px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-cta {
    width: 100%;
    justify-content: space-between;
  }

  .promise-card {
    grid-template-columns: 43px minmax(0, 1fr) 22px;
  }

  .habit-action {
    max-width: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.promise-planner {
  margin-top: 28px;
  padding: 23px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 7px 23px rgba(33, 43, 43, 0.045);
}

.planner-heading,
.planner-subheading,
.month-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.planner-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(20, 36, 43, 0.1);
  gap: 12px;
}

.planner-heading h3 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.planner-heading > span {
  color: var(--ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

.week-planner {
  padding: 19px 0 23px;
  border-bottom: 1px solid rgba(20, 36, 43, 0.09);
}

.planner-subheading {
  margin-bottom: 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 900;
}

.planner-subheading small {
  color: var(--ink-faint);
  font-family: var(--body);
  font-size: 9px;
  font-weight: 600;
}

.week-strip {
  display: grid;
  padding: 3px 2px 8px;
  gap: 9px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(126px, 1fr);
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.week-day-card {
  position: relative;
  display: grid;
  min-height: 128px;
  padding: 13px 13px 12px;
  align-content: start;
  border: 1px solid rgba(20, 36, 43, 0.11);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(247, 241, 232, 0.72);
  text-align: left;
  scroll-snap-align: start;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.week-day-card:hover {
  border-color: rgba(239, 106, 84, 0.4);
  transform: translateY(-2px);
}

.week-day-card.is-selected {
  border-color: var(--coral);
  background: var(--ink);
  color: #fffaf0;
  box-shadow: 0 8px 18px rgba(20, 36, 43, 0.16);
}

.week-day-name {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
}

.week-day-card.is-selected .week-day-name,
.week-day-card.is-selected .week-day-count,
.week-day-card.is-selected .week-day-preview {
  color: rgba(255, 250, 240, 0.64);
}

.week-day-card strong {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 29px;
  line-height: 1;
}

.week-day-count {
  margin-top: 6px;
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 900;
}

.week-day-preview {
  display: block;
  max-width: 100%;
  margin-top: 11px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-day-dot,
.calendar-day-dot {
  display: block;
  border-radius: 50%;
  background: var(--coral);
}

.week-day-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 4px rgba(239, 106, 84, 0.12);
}

.week-day-card.is-selected .week-day-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(237, 184, 78, 0.14);
}

.month-planner {
  padding-top: 22px;
}

.month-controls {
  gap: 7px;
  font-family: var(--body);
}

.month-controls strong {
  min-width: 76px;
  color: var(--ink-soft);
  font-size: 10px;
  text-align: center;
}

.month-controls button {
  display: grid;
  width: 25px;
  height: 25px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(20, 36, 43, 0.13);
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.58);
}

.month-controls button:hover {
  color: var(--coral-deep);
  border-color: rgba(239, 106, 84, 0.5);
}

.month-controls .icon {
  width: 12px;
  height: 12px;
}

.calendar-weekdays,
.month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  padding: 1px 1px 8px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.month-calendar {
  overflow: hidden;
  border-top: 1px solid rgba(20, 36, 43, 0.1);
  border-left: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 10px;
}

.calendar-day {
  position: relative;
  display: flex;
  min-height: 92px;
  padding: 9px 8px 7px;
  align-items: flex-start;
  border: 0;
  border-right: 1px solid rgba(20, 36, 43, 0.1);
  border-bottom: 1px solid rgba(20, 36, 43, 0.1);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.3);
  text-align: left;
  flex-direction: column;
  transition: background 180ms ease, color 180ms ease;
}

button.calendar-day:hover {
  color: var(--ink);
  background: #fffaf2;
}

.calendar-day.is-selected {
  color: #fffaf0;
  background: var(--ink);
}

.calendar-day.is-today .calendar-day-number {
  display: grid;
  width: 23px;
  height: 23px;
  margin: -3px 0 0 -3px;
  place-items: center;
  border-radius: 50%;
  color: #fffaf1;
  background: var(--coral);
}

.calendar-day.is-selected.is-today .calendar-day-number {
  color: var(--ink);
  background: var(--gold);
}

.calendar-day-number {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.calendar-day-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 6px;
  height: 6px;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(239, 106, 84, 0.1);
}

.calendar-day.is-selected .calendar-day-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(237, 184, 78, 0.14);
}

.calendar-day-events {
  display: grid;
  width: 100%;
  margin-top: 12px;
  gap: 3px;
  overflow: hidden;
  font-size: 8px;
  line-height: 1.3;
}

.calendar-day-events span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-empty-mark {
  margin-top: 15px;
  color: rgba(20, 36, 43, 0.2);
  font-size: 15px;
}

.calendar-day.is-selected .calendar-day-empty-mark {
  color: rgba(255, 250, 240, 0.32);
}

.calendar-day-empty {
  cursor: default;
  background: rgba(20, 36, 43, 0.018);
}

/* Editing and achievement moments. */
.promise-editor-modal,
.achievement-modal {
  position: relative;
  width: min(560px, 100%);
  padding: 31px;
  border: 1px solid rgba(20, 36, 43, 0.11);
  border-radius: 23px;
  background: var(--paper);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.3);
  animation: modal-rise 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.promise-editor-modal .modal-close,
.achievement-modal .modal-close {
  color: var(--ink-faint);
  background: rgba(20, 36, 43, 0.06);
}

.promise-modal-kicker,
.achievement-kicker {
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.promise-editor-modal h2,
.achievement-modal h2 {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1.2;
}

.promise-editor-modal > p {
  margin: 9px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

#promiseEditorForm {
  display: grid;
  margin-top: 23px;
  gap: 13px;
}

.editor-field {
  display: grid;
  gap: 7px;
}

.editor-field > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.editor-field textarea,
.editor-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(20, 36, 43, 0.14);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.editor-field textarea {
  min-height: 81px;
  resize: vertical;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.55;
}

.editor-field textarea:focus,
.editor-field input:focus {
  border-color: rgba(239, 106, 84, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 106, 84, 0.1);
}

.editor-field-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: 1fr 1fr;
}

.editor-time-detection {
  display: flex;
  min-height: 34px;
  padding: 8px 10px;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  color: var(--ink-faint);
  background: rgba(20, 36, 43, 0.045);
  font-size: 9px;
  line-height: 1.4;
}

.editor-time-detection.is-detected {
  color: #39745f;
  background: #dcf0e4;
}

.editor-time-detection .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.editor-reminder-row {
  display: flex;
  padding: 10px 0;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
}

.editor-reminder-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.editor-reminder-row .toggle-track {
  flex: 0 0 auto;
}

.editor-reminder-row strong,
.editor-reminder-row small {
  display: block;
}

.editor-reminder-row strong {
  font-size: 10px;
}

.editor-reminder-row small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.editor-reminder-row input:checked + .toggle-track {
  background: var(--coral);
}

.editor-reminder-row input:checked + .toggle-track::after {
  transform: translateX(10px);
}

.promise-editor-actions {
  display: flex;
  margin-top: 4px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-save-button,
.editor-delete-button {
  display: inline-flex;
  min-height: 40px;
  padding: 0 13px;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 900;
}

.editor-save-button {
  padding-right: 11px;
  color: #fffaf1;
  background: var(--ink);
}

.editor-save-button:hover {
  background: var(--coral-deep);
}

.editor-delete-button {
  color: var(--coral-deep);
  background: transparent;
}

.editor-delete-button:hover {
  background: var(--coral-wash);
}

.editor-save-button .icon,
.editor-delete-button .icon {
  width: 13px;
  height: 13px;
}

.achievement-modal {
  width: min(440px, 100%);
  padding: 29px 30px 25px;
  overflow: hidden;
  color: #fffaf0;
  background:
    radial-gradient(circle at 50% 31%, rgba(237, 184, 78, 0.25), transparent 10rem),
    linear-gradient(160deg, #1a3036, #102127 72%);
  text-align: center;
}

.achievement-modal .modal-close {
  color: rgba(255, 250, 240, 0.68);
  background: rgba(255, 255, 255, 0.08);
}

.achievement-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
}

.achievement-kicker .status-dot {
  width: 5px;
  height: 5px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(237, 184, 78, 0.12);
}

.achievement-stage {
  position: relative;
  display: grid;
  min-height: 180px;
  margin: 15px -10px 0;
  place-items: center;
}

.achievement-rays {
  position: absolute;
  width: 178px;
  height: 178px;
  border: 1px solid rgba(237, 184, 78, 0.4);
  border-radius: 50%;
  box-shadow: 0 0 0 13px rgba(237, 184, 78, 0.05), 0 0 0 33px rgba(237, 184, 78, 0.035);
  animation: orbit-spin 15s linear infinite;
}

.achievement-rays::before,
.achievement-rays::after {
  position: absolute;
  inset: 17px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: inherit;
  content: "";
}

.achievement-rays::after {
  inset: -13px;
  border-style: solid;
  border-color: rgba(239, 106, 84, 0.21);
}

.achievement-art {
  position: relative;
  display: grid;
  width: 126px;
  height: 148px;
  place-items: center;
  color: #fff8db;
  background: var(--gold);
  clip-path: polygon(50% 0, 88% 17%, 100% 55%, 77% 100%, 23% 100%, 0 55%, 12% 17%);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.25));
  animation: badge-pulse 3.8s ease-in-out infinite;
}

.achievement-art::before,
.achievement-art::after {
  position: absolute;
  inset: 7px;
  z-index: 0;
  border: 1px solid rgba(255, 253, 239, 0.62);
  content: "";
  clip-path: inherit;
}

.achievement-art::after {
  inset: 14px;
  border-color: rgba(20, 36, 43, 0.25);
}

.achievement-art .badge-art-glow {
  position: absolute;
  width: 83px;
  height: 83px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent 68%);
}

.achievement-art strong,
.achievement-art small,
.achievement-art i {
  position: relative;
  z-index: 1;
}

.achievement-art strong {
  margin-top: -11px;
  font-family: var(--display);
  font-size: 38px;
  line-height: 1;
  text-shadow: 1px 2px 0 rgba(20, 36, 43, 0.24);
}

.achievement-art small {
  position: absolute;
  bottom: 23px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.achievement-art i {
  position: absolute;
  top: 17px;
  right: 19px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

.achievement-label {
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.achievement-modal h2 {
  margin-top: 9px;
  color: #fffaf0;
  font-size: 25px;
}

.achievement-modal > p {
  max-width: 300px;
  margin: 10px auto 0;
  color: rgba(255, 250, 240, 0.62);
  font-size: 11px;
  line-height: 1.7;
}

.achievement-modal > p strong {
  color: var(--gold);
}

.achievement-equip-button,
.achievement-dismiss-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  margin-top: 19px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 900;
}

.achievement-equip-button {
  color: var(--ink);
  background: var(--gold);
}

.achievement-equip-button:hover {
  background: #f5ca67;
}

.achievement-equip-button .icon {
  width: 14px;
  height: 14px;
}

.achievement-dismiss-button {
  min-height: 30px;
  margin-top: 5px;
  color: rgba(255, 250, 240, 0.48);
  background: transparent;
}

.achievement-dismiss-button:hover {
  color: #fffaf0;
}

.edit-promise-button {
  color: var(--coral-deep);
}

.my-block {
  margin-top: 0;
}

@media (max-width: 760px) {
  .promise-planner {
    padding: 17px 13px;
  }

  .planner-heading {
    display: block;
  }

  .planner-heading > span {
    display: block;
    margin-top: 7px;
  }

  .week-strip {
    grid-auto-columns: minmax(132px, 43vw);
  }

  .calendar-day {
    min-height: 73px;
    padding: 7px 5px 5px;
  }

  .calendar-day-number {
    font-size: 12px;
  }

  .calendar-day-events {
    margin-top: 8px;
    font-size: 7px;
  }

  .calendar-day-dot {
    top: 9px;
    right: 7px;
  }

  .promise-editor-modal,
  .achievement-modal {
    padding: 26px 19px 21px;
  }

  .promise-editor-modal h2,
  .achievement-modal h2 {
    font-size: 24px;
  }

  .promise-editor-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .editor-save-button,
  .editor-delete-button {
    justify-content: center;
  }

}

/* One creation route, linked habit cadence, and quiet timeline states. */
.editor-links {
  padding: 13px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.36);
}

.editor-links-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.editor-links-heading > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 900;
}

.editor-links-heading > small {
  color: var(--ink-faint);
  font-size: 8px;
  text-align: right;
}

.editor-link-input-row {
  display: flex;
  margin-top: 9px;
  gap: 8px;
}

.editor-link-input-row input {
  min-width: 0;
  flex: 1;
  padding: 10px 11px;
  border: 1px solid rgba(20, 36, 43, 0.14);
  border-radius: 9px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.editor-link-input-row input:focus {
  border-color: rgba(239, 106, 84, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 106, 84, 0.1);
}

.editor-link-input-row button {
  min-width: 48px;
  padding: 0 11px;
  border-radius: 9px;
  color: #fffaf1;
  background: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.editor-link-input-row button:hover {
  background: var(--coral-deep);
}

.editor-link-list {
  display: flex;
  min-height: 0;
  margin-top: 9px;
  flex-wrap: wrap;
  gap: 7px;
}

.editor-link-chip {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 6px 5px 8px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 7px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 700;
}

.editor-link-chip > .icon {
  width: 11px;
  height: 11px;
  color: var(--coral-deep);
}

.editor-link-chip button {
  display: grid;
  width: 16px;
  height: 16px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-faint);
  background: transparent;
}

.editor-link-chip button:hover {
  color: var(--coral-deep);
  background: var(--coral-wash);
}

.editor-link-chip button .icon {
  width: 11px;
  height: 11px;
}

.habit-card {
  width: 100%;
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.habit-card:hover {
  border-color: rgba(239, 106, 84, 0.38);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 9px 23px rgba(33, 43, 43, 0.08);
  transform: translateY(-2px);
}

.habit-card:focus-visible {
  outline-offset: 4px;
}

.habit-card.is-paused {
  opacity: 0.62;
}

.habit-card-source {
  display: flex;
  margin-top: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 8px;
}

.habit-card-source > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--coral-deep);
  font-weight: 900;
}

.habit-card-source .icon {
  width: 11px;
  height: 11px;
}

.habit-editor-modal {
  position: relative;
  width: min(560px, 100%);
  padding: 31px;
  border: 1px solid rgba(20, 36, 43, 0.11);
  border-radius: 23px;
  background: var(--paper);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.3);
  animation: modal-rise 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.habit-editor-modal .modal-close {
  color: var(--ink-faint);
  background: rgba(20, 36, 43, 0.06);
}

.habit-modal-kicker {
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.habit-editor-modal h2 {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1.2;
}

.habit-editor-modal > p {
  margin: 9px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.55;
}

#habitEditorForm {
  display: grid;
  margin-top: 23px;
  gap: 13px;
}

.habit-editor-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(239, 106, 84, 0.16);
  border-radius: 11px;
  background: rgba(255, 224, 213, 0.38);
}

.habit-editor-summary .habit-symbol {
  width: 33px;
  height: 33px;
}

.habit-editor-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#habitEditorStatus {
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.weekday-field {
  padding: 13px;
  border: 1px solid rgba(20, 36, 43, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.36);
}

.weekday-field-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.weekday-field-heading > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 900;
}

.weekday-field-heading > small {
  color: var(--ink-faint);
  font-size: 8px;
  text-align: right;
}

.weekday-presets {
  display: flex;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 7px;
}

.weekday-presets button {
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(20, 36, 43, 0.11);
  border-radius: 7px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 800;
}

.weekday-presets button:hover {
  border-color: rgba(239, 106, 84, 0.42);
  color: var(--coral-deep);
}

.weekday-picker {
  display: grid;
  margin-top: 10px;
  gap: 6px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-choice {
  min-height: 35px;
  padding: 0 3px;
  border: 1px solid rgba(20, 36, 43, 0.12);
  border-radius: 8px;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.64);
  font-size: 9px;
  font-weight: 900;
}

.weekday-choice:hover {
  border-color: rgba(239, 106, 84, 0.48);
  color: var(--coral-deep);
}

.weekday-choice.is-selected {
  border-color: var(--coral);
  color: #fffaf1;
  background: var(--coral);
  box-shadow: 0 5px 12px rgba(239, 106, 84, 0.16);
}

.habit-active-row {
  display: flex;
  padding: 3px 0;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
}

.habit-active-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.habit-active-row .toggle-track {
  flex: 0 0 auto;
}

.habit-active-row strong,
.habit-active-row small {
  display: block;
}

.habit-active-row strong {
  font-size: 10px;
}

.habit-active-row small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.habit-active-row input:checked + .toggle-track {
  background: var(--coral);
}

.habit-active-row input:checked + .toggle-track::after {
  transform: translateX(10px);
}

.habit-editor-actions {
  display: flex;
  margin-top: 4px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 760px) {
  .auth-gate {
    min-height: 100svh;
    padding: 23px 17px;
  }

  .auth-card {
    padding: 29px 22px 24px;
    border-radius: 21px;
  }

  .auth-eyebrow {
    margin-top: 35px;
  }

  .auth-card h1 {
    font-size: 31px;
  }

  .auth-side-note {
    display: none;
  }

  .bottom-tabs {
    display: flex;
    height: 72px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    align-items: flex-end;
    justify-content: space-around;
    gap: 0;
  }

  .bottom-tab {
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 4px 4px 5px;
    flex: 1 1 0;
  }

  .bottom-tab-add {
    transform: translateY(-6px);
  }

  .bottom-add-mark {
    width: 44px;
    height: 44px;
    margin-bottom: 3px;
  }

  .bottom-tab-add:hover .bottom-add-mark {
    transform: none;
  }

  .bottom-tab-add > span:last-child {
    font-size: 8px;
  }

  .habit-editor-modal {
    padding: 26px 19px 21px;
  }

  .habit-editor-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #habitEditorStatus {
    grid-column: 2;
    margin-top: -5px;
    text-align: left;
  }

  .weekday-picker {
    gap: 4px;
  }

  .weekday-choice {
    font-size: 8px;
  }

  .habit-editor-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .habit-editor-actions .editor-save-button,
  .habit-editor-actions .editor-delete-button {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .badge-progress-modal {
    max-height: calc(100svh - 24px);
    padding: 24px 16px 18px;
    border-radius: 20px;
  }

  .badge-progress-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .badge-progress-count {
    align-self: flex-start;
    text-align: left;
  }

  .badge-focus-panel {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .badge-focus-art-wrap {
    min-height: 132px;
  }

  .badge-focus-art-wrap .showcase-art {
    width: 100px;
    height: 114px;
  }

  .badge-focus-copy h3 {
    font-size: 22px;
  }

  .badge-quest-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}
