:root {
  --ink: #eff8ef;
  --muted: #a8bea9;
  --line: rgba(225, 246, 226, 0.13);
  --panel: rgba(255, 255, 255, 0.075);
  --green: #79df8e;
  --gold: #f4ce68;
  --tap-target: 44px;
  color-scheme: dark;
  font-family: Inter, ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  background: #101511;
  color: var(--ink);
}

button,
input,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.strain-shell {
  min-height: 100vh;
  padding: 0 0 140px;
  background:
    radial-gradient(circle at 78% 10%, rgba(151, 194, 102, 0.13), transparent 24%),
    radial-gradient(circle at 10% 52%, rgba(119, 90, 133, 0.12), transparent 27%),
    #101511;
}

.d-header {
  width: min(1180px, calc(100% - 36px));
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.d-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
}

.d-brand img {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #ddf0a6;
  padding: 9px;
}

.d-brand > span {
  display: grid;
  gap: 4px;
}

.d-brand small {
  color: #c6e478;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.d-brand small i {
  border-radius: 4px;
  background: #c6e478;
  color: #142014;
  padding: 2px 4px;
  font-size: 6px;
  font-style: normal;
}

.d-brand strong {
  font-size: 21px;
}

.d-account,
.identity {
  display: flex;
  align-items: center;
}

.d-account {
  gap: 18px;
}

.account-trigger {
  min-height: var(--tap-target);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  padding: 4px 7px 4px 4px;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease;
}

.account-trigger:hover,
.account-trigger:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

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

.account-trigger-copy strong {
  max-width: 150px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-trigger-copy small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.account-settings-mark {
  border: 1px solid rgba(198, 228, 120, 0.22);
  border-radius: 999px;
  color: #c6e478;
  padding: 4px 7px;
  font-size: 8px;
  font-weight: 900;
}

.identity {
  gap: 10px;
}

.identity > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.identity strong {
  font-size: 14px;
}

.identity small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.avatar,
.friend-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #7ce196, #326e46);
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.avatar {
  width: 40px;
  height: 40px;
}

.friend-avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.wallet-pill {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 6px;
  border: 1px solid rgba(244, 206, 104, 0.28);
  border-radius: 16px;
  background: rgba(244, 206, 104, 0.11);
  color: #ffe598;
  padding: 8px 12px;
}

.wallet-pill > span {
  grid-row: span 2;
  font-size: 20px;
}

.wallet-pill strong {
  font-size: 17px;
  line-height: 1;
}

.wallet-pill small {
  color: #cdbb82;
  font-size: 9px;
  text-align: left;
}

.d-system-bar {
  width: min(1180px, calc(100% - 36px));
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.d-system-bar > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.d-system-bar > div > span {
  border: 1px solid rgba(198, 228, 120, 0.25);
  border-radius: 999px;
  color: #c6e478;
  padding: 5px 8px;
  font-size: 7px;
  font-weight: 900;
}

.d-system-bar p {
  color: #b5c0b2;
  font-size: 9px;
}

.d-rule-details {
  position: relative;
}

.d-rule-details summary {
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d7dfd1;
  padding: 7px 10px;
  font-size: 8px;
}

.d-rule-details > div {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 18, 14, 0.98);
  padding: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.d-rule-details b {
  color: #e8efdf;
  font-size: 9px;
}

.d-rule-details span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 8px;
}

.d-content {
  width: min(1180px, calc(100% - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  margin: 28px auto 0;
}

.d-content > *,
.view > * {
  min-width: 0;
  max-width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 34px;
}

.d-mobile-status {
  display: none;
}

.d-hero {
  --strain: #9bd7ba;
  position: relative;
  min-height: 410px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.85fr) 126px;
  overflow: hidden;
  border: 1px solid rgba(225, 236, 203, 0.18);
  border-radius: 32px;
  background:
    radial-gradient(circle at 67% 45%, color-mix(in srgb, var(--strain) 24%, transparent), transparent 35%),
    linear-gradient(118deg, #20291f, #151a16 62%, #0e120f);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.d-hero::before {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent 69px, rgba(255, 255, 255, 0.07) 70px);
  content: "";
  opacity: 0.16;
  pointer-events: none;
}

.d-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 50px 20px 50px 48px;
}

.d-hero-copy > small {
  color: var(--strain);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.d-hero-copy h1 {
  max-width: 580px;
  margin-top: 9px;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.d-hero-copy > p {
  max-width: 460px;
  margin-top: 22px;
  color: #b5c1b0;
  font-size: 11px;
  line-height: 1.7;
}

.d-hero-math {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 17px;
}

.d-hero-math span {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #d4dbc8;
  padding: 6px 9px;
  font-size: 8px;
}

.d-hero-action {
  min-height: var(--tap-target);
  margin-top: 28px;
  border: 0;
  border-radius: 14px;
  background: #dcefa4;
  color: #172016;
  padding: 13px 17px;
  font-size: 10px;
  font-weight: 950;
  box-shadow: 0 12px 30px rgba(177, 215, 111, 0.15);
}

.d-hero-art {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
}

.d-hero-art::before {
  position: absolute;
  width: min(33vw, 340px);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--strain) 36%, transparent);
  border-radius: 50%;
  box-shadow: inset 0 0 90px color-mix(in srgb, var(--strain) 8%, transparent), 0 0 0 28px rgba(255, 255, 255, 0.012);
  content: "";
}

.d-hero-art img {
  position: relative;
  z-index: 2;
  width: 92%;
  height: 340px;
  object-fit: contain;
  filter: drop-shadow(0 28px 22px rgba(0, 0, 0, 0.47));
  transform: rotate(-4deg) scale(1.06);
}

.d-orbit {
  position: absolute;
  z-index: 4;
  top: 24px;
  right: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd6c6;
  padding: 5px 8px;
  font: 800 7px ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.d-hero-score {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.d-hero-score small {
  font-size: 8px;
  letter-spacing: 0.1em;
}

.d-hero-score strong {
  margin: 9px 0;
  color: #ffd36f;
  font-size: 32px;
}

.d-hero-score span {
  color: #bdc6b6;
  font-size: 7px;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
}

.d-section-title {
  min-width: 0;
  display: flex;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}

.d-section-title > span {
  color: #7d887d;
  font: 900 9px ui-monospace, monospace;
}

.d-section-title > div {
  min-width: 0;
  flex: 1;
}

.d-section-title small {
  color: #aab5a7;
  font-size: 7px;
  letter-spacing: 0.18em;
}

.d-section-title h2 {
  margin-top: 3px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.d-section-title > b {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #aeb9ab;
  padding: 6px 9px;
  font-size: 7px;
}

.d-seed-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.d-seed {
  --strain: #9bd7ba;
  position: relative;
  height: 345px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--strain) 10%, #1b211c), #141916 72%);
  color: var(--ink);
  padding: 13px;
  text-align: left;
}

.d-seed.selected {
  border-color: var(--strain);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--strain) 24%, transparent), 0 14px 34px rgba(0, 0, 0, 0.2);
}

.d-seed-number {
  position: absolute;
  z-index: 3;
  color: rgba(255, 255, 255, 0.45);
  font: 900 9px ui-monospace, monospace;
}

.d-seed > img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 23px 18px rgba(0, 0, 0, 0.46));
}

.d-seed-copy {
  display: grid;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 10px;
}

.d-seed-copy small {
  color: var(--strain);
  font-size: 7px;
}

.d-seed-copy strong {
  margin-top: 2px;
  font-size: 14px;
}

.d-seed-copy i {
  margin-top: 5px;
  color: #9fac9d;
  font-size: 8px;
  font-style: normal;
}

.d-grow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.d-grow-card {
  --strain: #9bd7ba;
  display: grid;
  grid-template-rows: auto 190px auto auto auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: #171d18;
  padding: 12px;
}

.d-grow-card.ready {
  border-color: rgba(255, 199, 91, 0.48);
}

.d-grow-card.ready .d-grow-art {
  box-shadow: inset 0 0 0 1px rgba(255, 199, 91, 0.2), 0 0 34px rgba(255, 199, 91, 0.12);
}

.d-grow-card.ready .d-grow-art img {
  animation: ready-pulse 2.4s ease-in-out infinite;
}

.d-grow-card > header {
  display: flex;
  justify-content: space-between;
  padding: 3px 2px 10px;
  color: #849083;
  font: 800 7px ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.d-grow-card > header b {
  color: var(--strain);
}

.d-grow-card.ready > header b {
  color: #ffc75b;
}

.d-grow-art {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(circle, color-mix(in srgb, var(--strain) 25%, #283029), #202621 66%);
}

.d-grow-art::after {
  position: absolute;
  right: 8%;
  bottom: 12px;
  left: 8%;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  content: "";
  filter: blur(5px);
}

.d-grow-art img {
  position: relative;
  z-index: 2;
  width: 86%;
  height: 170px;
  object-fit: contain;
  filter: drop-shadow(0 18px 15px rgba(0, 0, 0, 0.42));
}

.d-grow-art.empty img {
  opacity: 0.28;
  filter: grayscale(0.7) drop-shadow(0 18px 15px rgba(0, 0, 0, 0.3));
}

.d-grow-art > i {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  background: #ffc75b;
  color: #2f270e;
  padding: 5px 7px;
  font-size: 7px;
  font-style: normal;
  font-weight: 950;
}

.d-grow-copy {
  display: grid;
  gap: 3px;
  padding: 13px 2px 10px;
}

.d-grow-copy > small {
  color: var(--strain);
  font-size: 7px;
}

.d-grow-copy h3 {
  font-size: 16px;
}

.d-grow-copy p {
  color: #9aa69a;
  font-size: 8px;
}

.d-yield {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 7px;
}

.d-yield span {
  color: #98a392;
  font-size: 8px;
}

.d-yield strong {
  color: #ffd36f;
  font-size: 20px;
  line-height: 1;
}

.d-yield small {
  color: #c6cdbf;
  font-size: 7px;
}

.d-grow-copy details {
  margin-top: 6px;
  color: #9da898;
}

.d-grow-copy summary {
  cursor: pointer;
  width: max-content;
  color: #bdc7b8;
  font-size: 8px;
}

.d-grow-copy details p {
  margin-top: 5px;
  font-size: 8px;
}

.d-progress {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.d-progress i {
  display: block;
  height: 100%;
  background: var(--strain);
}

.d-grow-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 11px;
}

.d-grow-actions button {
  min-height: 37px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: #e0e6d9;
  padding: 7px;
  font-size: 8px;
  font-weight: 850;
}

.d-grow-actions button.primary,
.d-grow-actions button.gold,
.d-grow-actions button.help-request {
  grid-column: 1 / -1;
}

.d-grow-actions button.help-request {
  border-color: rgba(198, 228, 120, 0.26);
  background: linear-gradient(90deg, rgba(198, 228, 120, 0.1), rgba(121, 223, 142, 0.07));
  color: #d9eea2;
}

.d-grow-actions button.help-request.sent {
  border-color: rgba(121, 223, 142, 0.18);
  background: rgba(121, 223, 142, 0.06);
  color: #8de59e;
  opacity: 0.78;
}

button.primary,
.game-launch {
  border-color: transparent;
  background: var(--green);
  color: #0b2917;
}

button.gold {
  border-color: transparent;
  background: var(--gold);
  color: #34290d;
}

button.done {
  background: rgba(121, 223, 142, 0.09);
  color: #8de59e;
}

.d-activity-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.d-activity-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 10px 2px;
}

.d-activity-list img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.d-activity-list article > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.d-activity-list b,
.d-activity-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-activity-list b {
  font-size: 8px;
}

.d-activity-list small {
  color: var(--muted);
  font-size: 7px;
}

.d-activity-list article > i {
  color: #c8d2c2;
  font-size: 13px;
  font-style: normal;
}

.text-button,
.outline-button {
  min-height: var(--tap-target);
  border: 0;
  background: transparent;
  color: #9aefa8;
  font-size: 11px;
  font-weight: 800;
}

.outline-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 13px;
}

.app-nav {
  display: flex;
}

.d-bottom-nav.tabbar {
  position: fixed;
  z-index: 30;
  right: auto;
  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  width: min(540px, calc(100% - 20px));
  min-height: 62px;
  display: flex;
  justify-content: space-around;
  transform: translateX(-50%);
  border: 1px solid rgba(228, 237, 211, 0.15);
  border-radius: 18px;
  background: rgba(14, 19, 15, 0.92);
  padding: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
}

.d-bottom-nav .tab {
  width: 19%;
  min-height: var(--tap-target);
  border: 0;
  background: transparent;
  color: #78917e;
  padding: 4px;
}

.d-bottom-nav .tab span,
.d-bottom-nav .tab small {
  display: block;
}

.d-bottom-nav .tab span {
  font-size: 18px;
}

.d-bottom-nav .tab small {
  margin-top: 2px;
  color: inherit;
  font-size: 9px;
}

.d-bottom-nav .tab.active {
  color: #d8f58a;
}

.d-friends-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 4px;
}

.d-friends-head > div:first-child {
  display: grid;
  gap: 5px;
}

.d-friends-head small {
  color: #c6e478;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.d-friends-head h1 {
  font-size: clamp(38px, 7vw, 68px);
  letter-spacing: -0.06em;
}

.d-friends-head p {
  color: var(--muted);
  font-size: 10px;
}

.d-quota {
  min-width: 100px;
  display: grid;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.d-quota strong {
  color: #ffc75b;
  font-size: 34px;
}

.d-quota span {
  color: var(--muted);
  font-size: 8px;
}

.d-priority-zone {
  display: grid;
  gap: 10px;
  margin: 18px 0 14px;
  padding: 16px;
  border: 1px solid rgba(198, 228, 120, 0.28);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(198, 228, 120, 0.09), rgba(255, 199, 91, 0.04)), #141a15;
}

.d-priority-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.d-priority-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.d-priority-zone .d-friend.access-revenge {
  border-color: rgba(255, 199, 91, 0.55);
}

.d-priority-zone .d-friend.access-relationship {
  border-color: rgba(198, 228, 120, 0.5);
}

.d-friend-filters,
.filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.d-friend-filters button,
.filter-row button {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: #aab5a6;
  padding: 8px 12px;
  font-size: 9px;
  font-weight: 800;
}

.d-friend-filters button b {
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  font-size: 7px;
}

.d-friend-filters button.active,
.filter-row button.active {
  border-color: #c6e478;
  background: #d9ee99;
  color: #172116;
}

.d-friend-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.d-friend {
  --strain: #9bd7ba;
  display: grid;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #171d18;
  padding: 10px;
}

.d-friend-art {
  position: relative;
  height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(circle, color-mix(in srgb, var(--strain) 23%, #283029), #202621 68%);
}

.d-friend-art > span {
  position: absolute;
  z-index: 3;
  top: 11px;
  left: 11px;
  color: rgba(255, 255, 255, 0.45);
  font: 900 9px ui-monospace, monospace;
}

.d-friend-art img {
  width: 94%;
  height: 205px;
  object-fit: contain;
  filter: drop-shadow(0 20px 15px rgba(0, 0, 0, 0.44));
}

.d-friend-art i,
.d-friend-art > b {
  position: absolute;
  z-index: 3;
  bottom: 9px;
  border-radius: 999px;
  padding: 5px 7px;
  font-size: 7px;
  font-style: normal;
  font-weight: 950;
}

.d-friend-art i {
  right: 9px;
  background: rgba(13, 18, 14, 0.75);
  color: var(--strain);
}

.d-friend-art > b {
  left: 9px;
  background: #ffc75b;
  color: #30270e;
}

.d-friend-info {
  display: flex;
  align-items: center;
  gap: 9px;
}

.d-friend-info > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.d-friend-info small,
.d-friend-info p,
.d-friend-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-friend-info small,
.d-friend-info p {
  color: var(--muted);
  font-size: 7px;
}

.d-friend-info strong {
  font-size: 11px;
}

.d-friend-info em {
  display: block;
  overflow: hidden;
  color: #d8f58a;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-friend-art > b.relationship-badge {
  background: #d9ee99;
  color: #172116;
}

.d-friend > button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px;
  font-size: 8px;
  font-weight: 900;
}

.d-photo-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.d-photo-rail article {
  --strain: #9bd7ba;
  min-width: 0;
  height: 90px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--strain) 11%, #1a201b), #151a16);
  padding: 8px;
}

.d-photo-rail img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.38));
}

.d-photo-rail article > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.d-photo-rail b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-photo-rail small {
  color: var(--strain);
  font-size: 7px;
}

.d-empty-state {
  grid-column: 1 / -1;
  min-height: 90px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  padding: 20px;
  font-size: 10px;
  text-align: center;
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0 2px;
}

.view-header > div:first-child {
  display: grid;
  gap: 5px;
}

.view-header h2 {
  font-size: clamp(25px, 6vw, 38px);
  letter-spacing: -0.04em;
}

.view-header p {
  max-width: 500px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.quota-box {
  min-width: 80px;
  display: grid;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 10px 12px;
  text-align: right;
}

.quota-box strong {
  color: var(--gold);
  font-size: 22px;
}

.quota-box span {
  color: var(--muted);
  font-size: 8px;
}

.task-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(244, 206, 104, 0.25);
  border-radius: 22px;
  padding: 20px;
}

.d-task-hero {
  min-height: 220px;
  display: grid;
  grid-template-columns: 210px minmax(170px, 1fr) auto;
  align-items: center;
  gap: 28px;
  background: radial-gradient(circle at 13% 50%, color-mix(in srgb, var(--strain) 20%, transparent), transparent 22%), linear-gradient(125deg, #202a20, #171d18);
}

.d-task-art {
  align-self: stretch;
  display: grid;
  grid-template-columns: 96px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 9px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  padding-right: 20px;
}

.d-task-art img {
  grid-row: 1 / -1;
  width: 96px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 15px 12px rgba(0, 0, 0, 0.4));
}

.d-task-art small {
  align-self: end;
  color: var(--strain);
  font-size: 7px;
}

.d-task-art b {
  align-self: start;
  margin-top: 4px;
  font-size: 12px;
}

.d-task-copy > span {
  color: #e1c978;
  font-size: 10px;
}

.d-task-copy > strong {
  display: block;
  margin-top: 4px;
  font-size: 42px;
}

.d-task-copy > strong small {
  font-size: 13px;
}

.d-task-copy p {
  color: var(--muted);
  font-size: 9px;
}

.d-task-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.d-task-stats span {
  min-width: 90px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: #aeb9aa;
  padding: 11px;
  font-size: 7px;
}

.d-task-stats b {
  color: #eaf2dc;
  font-size: 19px;
}

.task-hero > i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--gold);
}

.task-list,
.rank-list {
  display: grid;
  gap: 7px;
}

.task-list article,
.rank-list article {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #171d18;
  padding: 11px;
}

.task-list article.complete,
.rank-list article.me {
  border-color: rgba(121, 223, 142, 0.28);
}

.task-index {
  color: #6c8372;
  font: 800 10px ui-monospace, monospace;
}

.task-list article > div,
.rank-list article > div {
  min-width: 0;
  display: grid;
  flex: 1;
  gap: 3px;
}

.task-list strong,
.rank-list strong {
  font-size: 11px;
}

.task-list small,
.rank-list small {
  color: var(--muted);
  font-size: 8px;
}

.task-list button {
  min-width: 70px;
  min-height: 37px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: #dceade;
  font-size: 8px;
}

.d-my-rank {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 199, 91, 0.25);
  border-radius: 20px;
  background: linear-gradient(115deg, rgba(255, 199, 91, 0.13), rgba(255, 255, 255, 0.035));
  padding: 15px 18px;
}

.d-my-rank > span,
.d-my-rank > p,
.d-my-rank > i {
  color: #aeb8aa;
  font-size: 8px;
}

.d-my-rank > strong {
  color: #ffd36f;
  font-size: 30px;
}

.d-my-rank > i {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px;
  font-style: normal;
}

.podium {
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 10px 4px 0;
}

.podium article {
  width: 30%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px 18px 4px 4px;
  background: linear-gradient(180deg, rgba(244, 206, 104, 0.16), rgba(255, 255, 255, 0.04));
  padding: 14px 7px;
}

.podium .place-1 {
  min-height: 150px;
  order: 2;
}

.podium .place-2 {
  min-height: 120px;
  order: 1;
}

.podium .place-3 {
  min-height: 105px;
  order: 3;
}

.podium article > span {
  color: var(--gold);
  font-size: 10px;
}

.podium article > i {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 7px;
  border-radius: 16px;
  background: rgba(198, 228, 120, 0.1);
}

.podium img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.podium strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium small {
  margin-top: 3px;
  font-size: 7px;
}

.rank-list article.me {
  border-color: rgba(244, 206, 104, 0.4);
  background: rgba(244, 206, 104, 0.08);
}

.rank-list article > b {
  width: 25px;
  color: #809185;
  font-size: 10px;
}

.rank-list em {
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.d-rank-thumb {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
}

.d-rank-thumb img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

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

.view-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.account-modal-open {
  overflow: hidden;
}

.account-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.account-modal[hidden] {
  display: none;
}

.account-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(3, 7, 4, 0.78);
  backdrop-filter: blur(14px);
}

.account-sheet {
  position: relative;
  z-index: 1;
  width: min(580px, 100%);
  max-height: min(820px, calc(100dvh - 36px));
  overflow: auto;
  border: 1px solid rgba(198, 228, 120, 0.2);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 2%, rgba(198, 228, 120, 0.13), transparent 25%),
    #101712;
  padding: 20px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  transform: translateY(8px) scale(0.985);
  opacity: 0;
  transition: opacity 170ms ease, transform 170ms ease;
}

.account-modal.open .account-sheet {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.account-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.account-sheet-header small {
  color: #c6e478;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.account-sheet-header h2 {
  margin-top: 3px;
  font-size: 25px;
}

.account-sheet-close {
  width: var(--tap-target);
  height: var(--tap-target);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.account-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(198, 228, 120, 0.18);
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(198, 228, 120, 0.1), rgba(107, 201, 137, 0.04));
  padding: 13px;
}

.account-profile-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #7ce196, #326e46);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.account-profile-card > div {
  min-width: 0;
}

.account-profile-card small,
.account-profile-card p {
  color: var(--muted);
  font-size: 9px;
}

.account-profile-card h3 {
  margin: 2px 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-card > i {
  border-radius: 999px;
  background: rgba(198, 228, 120, 0.12);
  color: #c6e478;
  padding: 6px 8px;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.account-form-panel {
  gap: 12px;
  margin: 0 0 10px;
  border-color: var(--line);
  border-radius: 19px;
  background: #171d18;
  padding: 14px;
}

.settings-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-section-title > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: rgba(198, 228, 120, 0.1);
  color: #c6e478;
  font-size: 8px;
  font-weight: 900;
}

.settings-section-title > div {
  min-width: 0;
}

.settings-section-title strong,
.settings-section-title small {
  display: block;
}

.settings-section-title strong {
  font-size: 13px;
}

.settings-section-title small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.account-field {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.account-field small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  text-align: right;
}

.account-form-panel .name-input {
  min-height: var(--tap-target);
  border-radius: 12px;
  background: rgba(5, 9, 8, 0.62);
  color: var(--ink);
}

.account-form-panel .toggle-row {
  min-height: 66px;
  border-color: var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.account-form-panel .toggle-row.is-disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.account-form-panel .btn {
  min-height: var(--tap-target);
  border-radius: 12px;
}

.account-privacy-note {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.name-panel,
.settings-panel,
.d-formal-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #171d18;
  padding: 14px;
}

.redeem-panel {
  position: relative;
  display: grid;
  gap: 13px;
  overflow: hidden;
  border: 1px solid rgba(244, 206, 104, 0.28);
  border-radius: 24px;
  background: radial-gradient(circle at 95% 10%, rgba(244, 206, 104, 0.25), transparent 30%), linear-gradient(135deg, #233b2b, #18251d);
  padding: 20px;
}

.d-redeem-panel {
  padding-right: 130px;
}

.redeem-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.redeem-panel span {
  color: #e6cc7c;
  font-size: 9px;
}

.redeem-panel h2 {
  font-size: 23px;
}

.redeem-panel p {
  color: var(--muted);
  font-size: 9px;
}

.redeem-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.redeem-progress i {
  display: block;
  height: 100%;
  background: var(--gold);
}

.redeem-panel > button {
  min-height: var(--tap-target);
  border: 0;
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 9px;
  font-weight: 900;
}

.d-redeem-brand {
  position: absolute;
  top: 50%;
  right: 25px;
  width: 82px;
  height: 82px;
  transform: translateY(-50%);
  border-radius: 24px;
  background: rgba(222, 239, 185, 0.9);
  padding: 15px;
  opacity: 0.85;
}

.gift-exchange {
  position: relative;
  display: grid;
  gap: 15px;
  overflow: hidden;
  border: 1px solid rgba(244, 206, 104, 0.4);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 4%, rgba(244, 206, 104, 0.2), transparent 32%),
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(121, 223, 142, 0.025) 17px 18px),
    linear-gradient(145deg, #203b2a, #101b15 68%);
  padding: 20px;
}

.gift-exchange::after {
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(244, 206, 104, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px rgba(121, 223, 142, 0.025),
    0 0 0 48px rgba(244, 206, 104, 0.025),
    0 0 0 76px rgba(121, 223, 142, 0.02);
  content: '';
  pointer-events: none;
}

.exchange-head,
.exchange-denominations,
.exchange-terms,
.active-ticket-notice {
  position: relative;
  z-index: 1;
}

.exchange-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.exchange-head > div:first-child {
  display: grid;
  gap: 5px;
}

.exchange-head > div:first-child > span,
.admin-console-head small {
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.exchange-head h2 {
  font-size: 22px;
}

.exchange-head p,
.admin-console-head p {
  max-width: 540px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.exchange-rate {
  min-width: 126px;
  border: 1px solid rgba(244, 206, 104, 0.28);
  border-radius: 16px;
  background: rgba(5, 13, 9, 0.48);
  padding: 13px 15px;
  text-align: right;
}

.exchange-rate small,
.exchange-rate span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.exchange-rate strong {
  display: block;
  margin-block: 2px;
  color: var(--gold);
  font-size: 25px;
}

.exchange-rate i {
  color: #aee9bd;
  font-size: 9px;
  font-style: normal;
}

.exchange-denominations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.exchange-card {
  display: grid;
  gap: 3px;
  min-height: 132px;
  border: 1px solid rgba(121, 223, 142, 0.26);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(25, 64, 42, 0.92), rgba(7, 19, 13, 0.94));
  color: #f1faf4;
  padding: 13px;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.exchange-card:not(:disabled):hover,
.exchange-card:not(:disabled):focus-visible {
  border-color: rgba(244, 206, 104, 0.72);
  box-shadow: 0 12px 24px rgba(2, 10, 6, 0.32);
  transform: translateY(-2px);
}

.exchange-card:disabled {
  cursor: not-allowed;
  filter: saturate(0.45);
  opacity: 0.48;
}

.exchange-card small {
  color: rgba(206, 231, 214, 0.62);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.exchange-card strong {
  color: #fff4ce;
  font-size: 30px;
}

.exchange-card strong em {
  margin-left: 2px;
  font-size: 0.42em;
  font-style: normal;
}

.exchange-card.product {
  border-color: rgba(244, 206, 104, 0.42);
  background: linear-gradient(150deg, rgba(74, 57, 19, 0.86), rgba(13, 27, 18, 0.96));
}

.exchange-card.product strong {
  font-size: 22px;
  line-height: 1.12;
}

.exchange-card.product strong em {
  display: block;
  margin: 4px 0 0;
  color: #f5cf69;
  font-size: 10px;
}

.exchange-card span {
  color: #8eeab0;
  font-size: 9px;
  font-weight: 800;
}

.exchange-card i {
  align-self: end;
  color: var(--gold);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.exchange-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.exchange-terms span {
  border-radius: 8px;
  background: rgba(121, 223, 142, 0.07);
  color: #b9d3c0;
  padding: 7px 9px;
  font-size: 8px;
}

.active-ticket-notice {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(244, 206, 104, 0.28);
  border-radius: 12px;
  background: rgba(244, 206, 104, 0.08);
  padding: 10px 12px;
}

.active-ticket-notice b {
  color: var(--gold);
  font-size: 10px;
}

.active-ticket-notice span {
  color: var(--muted);
  font-size: 8px;
}

.active-ticket-notice code {
  color: #c8f5d3;
}

.active-ticket-notice.paused {
  border-color: rgba(241, 134, 107, 0.3);
  background: rgba(120, 35, 22, 0.14);
}

.gift-ticket-admin {
  display: grid;
  gap: 13px;
  border-color: rgba(244, 206, 104, 0.32);
  background: linear-gradient(145deg, #191e18, #121713);
}

.admin-console-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: start;
}

.admin-console-head > div {
  display: grid;
  gap: 4px;
}

.admin-console-head strong {
  font-size: 14px;
}

.admin-console-head > span {
  border: 1px solid rgba(244, 206, 104, 0.32);
  border-radius: 999px;
  color: var(--gold);
  padding: 6px 9px;
  font-size: 8px;
  white-space: nowrap;
}

.ticket-verify-form {
  display: grid;
  gap: 6px;
}

.ticket-verify-form label {
  color: var(--muted);
  font-size: 8px;
}

.ticket-verify-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.ticket-verify-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(5, 11, 7, 0.72);
  color: #f1faf4;
  padding: 11px 12px;
  font: inherit;
  text-transform: uppercase;
}

.ticket-verify-form button,
.expired-ticket-button,
.ticket-admin-actions button {
  min-height: var(--tap-target);
  border: 1px solid rgba(244, 206, 104, 0.28);
  border-radius: 11px;
  background: rgba(244, 206, 104, 0.12);
  color: var(--gold);
  padding: 9px 12px;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.expired-ticket-button {
  justify-self: start;
}

.ticket-verify-result {
  min-height: 52px;
  border: 1px dashed rgba(121, 223, 142, 0.2);
  border-radius: 14px;
  color: var(--muted);
  padding: 12px;
  font-size: 9px;
}

.verified-ticket {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px 18px;
}

.verified-ticket-stamp,
.verified-ticket-value {
  display: grid;
  align-content: center;
  border-radius: 12px;
  padding: 11px;
}

.verified-ticket-stamp {
  border: 1px solid rgba(121, 223, 142, 0.3);
  background: rgba(121, 223, 142, 0.08);
}

.verified-ticket-stamp span,
.verified-ticket-value small {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.verified-ticket-stamp strong {
  color: #9aefa8;
  font-size: 10px;
}

.verified-ticket-value {
  justify-self: end;
  min-width: 116px;
  border: 1px solid rgba(244, 206, 104, 0.28);
  background: rgba(244, 206, 104, 0.07);
  text-align: right;
}

.verified-ticket-value strong {
  color: #fff1bf;
  font-size: 24px;
}

.verified-ticket-value span {
  color: #8eeab0;
  font-size: 8px;
}

.verified-ticket dl {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.verified-ticket dl > div {
  min-width: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  padding: 8px;
}

.verified-ticket dt {
  color: var(--muted);
  font-size: 7px;
}

.verified-ticket dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: #eff8f1;
  font-size: 9px;
  font-weight: 700;
}

.ticket-admin-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px;
}

.ticket-admin-actions button.confirm {
  border-color: rgba(121, 223, 142, 0.4);
  background: #80df91;
  color: #07130a;
}

.ticket-admin-actions button.danger {
  border-color: rgba(241, 134, 107, 0.35);
  background: rgba(120, 35, 22, 0.18);
  color: #f3a38f;
}

.ticket-invalid {
  color: #f3a38f;
}

.expired-ticket-list {
  display: grid;
  gap: 7px;
}

.expired-ticket-list button {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: #eef7f0;
  padding: 9px;
  text-align: left;
  cursor: pointer;
}

.expired-ticket-list span {
  display: grid;
  gap: 2px;
  font-size: 8px;
}

.expired-ticket-list b {
  color: var(--gold);
}

.expired-ticket-list code {
  color: var(--muted);
  font-size: 7px;
}

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

.game-wallet {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #171d18;
  padding: 15px;
}

.game-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(244, 206, 104, 0.13);
  color: var(--gold);
  font-size: 22px;
}

.game-wallet h3 {
  margin-top: 3px;
  font-size: 13px;
}

.game-wallet p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.game-wallet > strong {
  grid-column: 1 / -1;
  font-size: 29px;
}

.game-wallet > strong small {
  font-size: 9px;
}

.transfer-actions {
  grid-column: 1 / -1;
  display: grid;
}

.game-launch {
  min-height: var(--tap-target);
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
}

.economy-note {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #171d18;
  padding: 15px;
}

.economy-note strong {
  font-size: 12px;
}

.economy-note p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.economy-note > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.economy-note span {
  border-radius: 9px;
  background: rgba(121, 223, 142, 0.08);
  color: #b8d2bd;
  padding: 7px 9px;
  font-size: 8px;
}

.economy-note b {
  color: #9aefa8;
}

.festival-banner {
  border: 1px solid rgba(244, 206, 104, 0.28);
  border-radius: 18px;
  background: rgba(244, 206, 104, 0.08);
}

@keyframes ready-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 18px 15px rgba(0, 0, 0, 0.42));
  }
  50% {
    transform: scale(1.045);
    filter: drop-shadow(0 18px 18px rgba(255, 199, 91, 0.27));
  }
}

@media (max-width: 900px) {
  .d-hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
  }

  .d-hero-score {
    display: none;
  }

  .d-seed-deck,
  .d-friend-wall,
  .d-priority-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .d-photo-rail,
  .d-activity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .strain-shell {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .d-header {
    position: sticky;
    z-index: 15;
    top: 0;
    min-height: 68px;
    border-bottom-color: rgba(225, 236, 203, 0.1);
    background: rgba(16, 21, 17, 0.88);
    backdrop-filter: blur(16px);
  }

  .d-brand img {
    width: 42px;
    height: 42px;
  }

  .d-brand strong {
    font-size: 14px;
  }

  .d-account {
    gap: 7px;
  }

  .account-trigger {
    position: relative;
    width: var(--tap-target);
    min-width: var(--tap-target);
    height: var(--tap-target);
    padding: 3px;
    border-color: var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
  }

  .account-trigger .avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .account-trigger-copy {
    display: none;
  }

  .account-settings-mark {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border: 2px solid #101511;
    background: #c6e478;
    color: #142014;
    padding: 0;
    font-size: 0;
  }

  .account-settings-mark::before {
    font-size: 9px;
    content: "⚙";
  }

  .d-system-bar {
    min-height: 42px;
  }

  .d-system-bar > div > span {
    font-size: 6px;
  }

  .d-system-bar p {
    max-width: 190px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .d-rule-details summary {
    min-height: 34px;
    display: grid;
    place-items: center;
  }

  .d-rule-details > div {
    width: min(280px, calc(100vw - 28px));
  }

  .d-content,
  .view.active {
    gap: 25px;
  }

  .account-modal {
    place-items: end center;
    padding: 0;
  }

  .account-sheet {
    width: 100%;
    max-height: min(88dvh, 760px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 26px 26px 0 0;
    padding: 18px 14px max(18px, env(safe-area-inset-bottom));
    transform: translateY(28px);
  }

  .account-sheet-header::before {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: rgba(225, 246, 226, 0.18);
    transform: translateX(-50%);
    content: "";
  }

  .account-profile-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .account-profile-card > i {
    display: none;
  }

  .account-field {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }

  .account-field small {
    text-align: left;
  }

  .view-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .d-content {
    margin-top: 12px;
  }

  .d-mobile-status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .d-mobile-status article {
    min-width: 0;
    display: grid;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #171d18;
    padding: 10px;
  }

  .d-mobile-status article.ready {
    border-color: rgba(255, 199, 91, 0.45);
    background: linear-gradient(140deg, rgba(255, 199, 91, 0.12), #171d18 62%);
  }

  .d-mobile-status span {
    color: #a8b2a4;
    font-size: 9px;
  }

  .d-mobile-status strong {
    margin-top: 4px;
    color: #e7efd9;
    font-size: 22px;
  }

  .d-mobile-status article.ready strong {
    color: #ffd36f;
  }

  .d-mobile-status small {
    overflow: hidden;
    margin-top: 2px;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .d-hero {
    min-height: 350px;
    display: block;
    border-radius: 24px;
  }

  .d-hero-copy {
    width: 64%;
    min-height: 350px;
    justify-content: center;
    padding: 24px 0 24px 20px;
  }

  .d-hero-copy > small {
    font-size: 8px;
  }

  .d-hero-copy h1 {
    margin-top: 7px;
    font-size: clamp(36px, 10vw, 48px);
    line-height: 0.94;
  }

  .d-hero-copy > p {
    display: none;
  }

  .d-hero-math {
    margin-top: 13px;
  }

  .d-hero-math span {
    display: none;
  }

  .d-hero-math span:first-child {
    display: block;
    font-size: 8px;
  }

  .d-hero-action {
    margin-top: 18px;
    padding: 11px 13px;
    font-size: 9px;
  }

  .d-hero-art {
    position: absolute;
    z-index: 3;
    top: 0;
    right: -7%;
    bottom: 0;
    width: 50%;
    pointer-events: none;
  }

  .d-hero-art::before {
    width: 210px;
  }

  .d-hero-art img {
    width: 116%;
    height: 270px;
    transform: rotate(-4deg) scale(1.04);
  }

  .d-orbit {
    top: 13px;
    right: 15px;
    font-size: 6px;
  }

  .d-section-title > b {
    display: none;
  }

  .d-seed-deck {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .d-seed {
    flex: 0 0 210px;
    height: 270px;
  }

  .d-seed > img {
    height: 185px;
  }

  .d-grow-grid {
    grid-template-columns: 1fr;
  }

  .d-grow-card {
    grid-template-columns: 128px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    column-gap: 13px;
    border-radius: 20px;
  }

  .d-grow-card > header {
    grid-column: 1 / -1;
  }

  .d-grow-art {
    grid-row: 2 / 5;
    min-height: 180px;
  }

  .d-grow-art img {
    height: 165px;
  }

  .d-grow-copy {
    align-self: end;
  }

  .d-grow-copy small,
  .d-grow-copy p,
  .d-grow-copy summary,
  .d-grow-copy details p {
    font-size: 9px;
  }

  .d-grow-copy h3 {
    font-size: 18px;
  }

  .d-yield span {
    font-size: 9px;
  }

  .d-yield strong {
    font-size: 23px;
  }

  .d-grow-actions {
    align-self: start;
  }

  .d-grow-actions button {
    min-height: var(--tap-target);
    font-size: 9px;
  }

  .d-activity-list {
    grid-template-columns: 1fr;
  }

  .d-photo-rail,
  .d-friend-wall,
  .d-priority-wall {
    display: flex;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
  }

  .d-photo-rail article {
    flex: 0 0 185px;
  }

  .d-friend {
    flex: 0 0 235px;
  }

  .d-friend-art {
    height: 210px;
  }

  .d-friend > button,
  .d-friend-filters button,
  .filter-row button {
    min-height: var(--tap-target);
    font-size: 9px;
  }

  .d-task-hero {
    min-height: 250px;
    grid-template-columns: 118px 1fr;
    gap: 15px;
    padding: 16px;
  }

  .d-task-art {
    grid-template-columns: 1fr;
    grid-template-rows: 118px auto auto;
    border-right: 0;
    padding-right: 0;
    text-align: center;
  }

  .d-task-art img {
    grid-row: 1;
    width: 100%;
    height: 115px;
  }

  .d-task-art small,
  .d-task-art b {
    align-self: auto;
  }

  .d-task-art b {
    margin-top: 2px;
    font-size: 10px;
  }

  .d-task-copy > strong {
    font-size: 34px;
  }

  .d-task-stats {
    grid-column: 1 / -1;
  }

  .d-task-stats span {
    min-width: 0;
    padding: 9px;
  }

  .task-list button {
    min-height: var(--tap-target);
  }

  .d-my-rank {
    grid-template-columns: auto auto 1fr;
    padding: 13px;
  }

  .d-my-rank > i {
    display: none;
  }

  .d-my-rank > p {
    text-align: right;
  }

  .d-settings-grid,
  .wallet-grid {
    grid-template-columns: 1fr;
  }

  .exchange-head {
    grid-template-columns: 1fr;
  }

  .exchange-rate {
    display: grid;
    grid-template-columns: auto auto;
    align-items: end;
    text-align: left;
  }

  .exchange-rate small,
  .exchange-rate strong {
    grid-column: 1;
  }

  .exchange-rate span {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    text-align: right;
  }

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

  .exchange-card {
    min-height: 118px;
  }

  .ticket-verify-form > div,
  .verified-ticket dl {
    grid-template-columns: 1fr;
  }

  .d-redeem-panel {
    padding-right: 90px;
  }

  .d-redeem-brand {
    right: 13px;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    padding: 11px;
  }
}

@media (max-width: 390px) {
  .d-header,
  .d-system-bar,
  .d-content {
    width: calc(100% - 22px);
  }

  .d-brand small {
    font-size: 7px;
  }

  .d-brand strong {
    font-size: 12px;
  }

  .d-account .wallet-pill {
    padding: 7px 9px;
  }

  .d-account .wallet-pill small {
    display: none;
  }

  .d-system-bar p {
    max-width: 145px;
  }

  .d-rule-details summary {
    width: 34px;
    overflow: hidden;
    color: transparent;
    padding-inline: 8px;
    white-space: nowrap;
  }

  .d-rule-details summary::first-letter {
    color: #d7dfd1;
  }

  .d-hero-copy {
    width: 67%;
    padding-inline: 16px 0;
  }

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

  .d-hero-art {
    right: -12%;
    width: 51%;
  }

  .d-hero-art img {
    height: 245px;
  }

  .d-grow-card {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .d-grow-art {
    min-height: 170px;
  }

  .d-task-hero {
    grid-template-columns: 96px 1fr;
    gap: 11px;
  }

  .d-task-art {
    grid-template-rows: 100px auto auto;
  }

  .d-task-art img {
    height: 96px;
  }

  .d-task-stats span {
    padding: 7px;
    font-size: 6px;
  }

  .d-task-stats b {
    font-size: 16px;
  }

  .d-my-rank {
    gap: 9px;
  }

  .d-my-rank > strong {
    font-size: 26px;
  }

  .d-my-rank > p {
    font-size: 7px;
  }
}
