:root {
  --ink: #fff5fb;
  --muted: #d8bccb;
  --soft: #f4b4cb;
  --hot: #ff79aa;
  --violet: #a879ff;
  --milk: #e9c7aa;
  --coffee: #3a2a25;
  --panel: rgba(35, 24, 39, 0.82);
  --panel-strong: rgba(24, 16, 29, 0.94);
  --line: rgba(255, 206, 224, 0.18);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #171018;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 121, 170, 0.24), transparent 34rem),
    radial-gradient(circle at 84% 24%, rgba(168, 121, 255, 0.24), transparent 30rem),
    linear-gradient(180deg, #171018 0%, #201520 48%, #151016 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    #151018;
}

.gate {
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: max(18px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  isolation: isolate;
  transition: opacity 360ms ease, transform 360ms ease, filter 360ms ease;
}

.gate::before,
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 238, 247, 0.28) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(233, 199, 170, 0.2) 0 1px, transparent 1.5px);
  background-position: 0 0, 18px 26px;
  background-size: 46px 46px, 62px 62px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  opacity: 0.42;
}

.gate__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(21, 16, 24, 0.02) 0%, rgba(21, 16, 24, 0.1) 30%, rgba(21, 16, 24, 0.72) 67%, #151018 100%),
    url("../images/hero-chenzi.png") center -18px / cover no-repeat;
  z-index: -2;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 520ms ease, opacity 520ms ease;
}

.gate__content {
  width: 100%;
  position: relative;
  z-index: 1;
  margin-top: clamp(120px, 34dvh, 210px);
  padding: 20px 18px 18px;
  border: 1px solid rgba(255, 214, 229, 0.14);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(29, 19, 34, 0.6), rgba(20, 14, 24, 0.84));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform 460ms ease, opacity 320ms ease, filter 360ms ease;
}

.gate__content::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -118px;
  width: min(38vw, 142px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 214, 229, 0.34);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(21, 16, 24, 0), rgba(21, 16, 24, 0.2)),
    url("../images/hero-chenzi.png") center 18% / 188% no-repeat;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38), 0 0 0 10px rgba(255, 246, 250, 0.035);
  transform: translateX(-50%);
  animation: puppyFloat 3.8s ease-in-out infinite;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 700;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.25rem, 11.2vw, 3.45rem);
  line-height: 1.06;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.gate__subtitle {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.login-card {
  display: grid;
  gap: 12px;
}

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

.account-card {
  min-width: 0;
  min-height: 86px;
  border: 1px solid rgba(255, 206, 224, 0.16);
  border-radius: 18px;
  padding: 10px 8px;
  background: rgba(255, 246, 250, 0.07);
  text-align: left;
}

.account-card.is-active {
  border-color: rgba(255, 212, 227, 0.8);
  background: rgba(255, 212, 227, 0.17);
}

.account-card strong,
.account-card span,
.account-card small {
  display: block;
}

.account-card strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.account-card span {
  margin-top: 5px;
  color: var(--milk);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.account-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.login-form {
  display: grid;
  gap: 10px;
}

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

.login-form label span {
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.login-form input,
.owner-form input,
.owner-form textarea,
.owner-form select {
  width: 100%;
  border: 1px solid rgba(255, 206, 224, 0.16);
  border-radius: 16px;
  background: rgba(9, 7, 12, 0.34);
  color: var(--ink);
  outline: none;
}

.login-form input,
.owner-form input,
.owner-form select {
  height: 46px;
  padding: 0 13px;
}

.owner-form textarea {
  min-height: 104px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.55;
}

.permission-note {
  margin: 0;
  color: var(--milk);
  font-size: 0.78rem;
  line-height: 1.45;
}

.primary-button,
.secondary-button,
.inline-form button {
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 20px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(255, 84, 145, 0.24);
}

.primary-button {
  width: 100%;
  background: linear-gradient(135deg, #ff79aa, #bf8aff 54%, #e9c7aa);
  color: #20131f;
}

.primary-button.compact {
  width: auto;
  min-width: 136px;
}

.secondary-button {
  flex: 1;
  border: 1px solid rgba(255, 206, 224, 0.24);
  background: rgba(255, 246, 250, 0.09);
  color: var(--ink);
  box-shadow: none;
}

.app {
  min-height: 100dvh;
  position: relative;
  padding: max(16px, env(safe-area-inset-top)) 14px calc(94px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255, 121, 170, 0.06), rgba(168, 121, 255, 0.04)),
    #151018;
}

.app:not(.is-locked) {
  animation: appArrive 420ms ease both;
}

.app.is-locked {
  display: none;
}

.gate.is-hidden {
  display: none;
}

.gate.is-unlocking {
  pointer-events: none;
  filter: saturate(1.08);
}

.gate.is-unlocking .gate__media {
  filter: blur(5px) brightness(1.25);
  transform: scale(1.08);
}

.gate.is-unlocking .gate__content {
  border-color: transparent;
  background: rgba(20, 14, 24, 0);
  box-shadow: none;
  backdrop-filter: blur(0);
  transform: translateY(22px) scale(0.985);
}

.gate.is-unlocking .gate__content::before {
  animation: puppyUnlock 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.gate.is-unlocking .gate__content > * {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(14px);
  transition: opacity 260ms ease, transform 320ms ease, filter 320ms ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 12px;
  background: linear-gradient(180deg, #151018 0%, rgba(21, 16, 24, 0.82) 70%, transparent 100%);
  backdrop-filter: blur(12px);
}

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

.role-badge {
  max-width: 96px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 206, 224, 0.18);
  border-radius: 999px;
  background: rgba(255, 246, 250, 0.08);
  color: var(--milk);
  font-size: 0.72rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar h2 {
  margin: 0;
  font-size: 1.46rem;
  line-height: 1.1;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 206, 224, 0.2);
  border-radius: 50%;
  background: rgba(255, 246, 250, 0.08);
}

.hero-card,
.id-card,
.letter-card,
.game-card,
.progress-card,
.message-board,
.message-form,
.inline-form,
.rule-item,
.task-item,
.owner-form,
.settings-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  position: relative;
  padding: 18px 88px 18px 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 121, 170, 0.2), rgba(168, 121, 255, 0.12)),
    rgba(35, 24, 39, 0.86);
  overflow: hidden;
}

.hero-card > div:first-child {
  min-width: 0;
}

.hero-card h3 {
  margin-bottom: 9px;
  font-size: 1.36rem;
  line-height: 1.22;
}

.hero-card p:last-child,
.soft-copy,
.progress-card p {
  color: var(--muted);
  line-height: 1.65;
}

.status-pill {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 121, 170, 0.16);
  color: #ffd5e4;
  font-size: 0.75rem;
  font-weight: 800;
}

.mini-tag {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9fc1, #b99cff);
  color: #271321;
  font-weight: 900;
  box-shadow: 0 0 0 8px rgba(255, 197, 222, 0.1);
}

.avatar-photo {
  object-fit: cover;
  object-position: center;
  border: 2px solid rgba(255, 212, 227, 0.72);
}

.tabs {
  display: flex;
  gap: 9px;
  margin: 16px -14px 10px;
  padding: 0 14px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  min-width: 66px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 206, 224, 0.16);
  border-radius: 999px;
  background: rgba(255, 246, 250, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.tab.is-active {
  background: #ffd4e3;
  color: #21141f;
  border-color: transparent;
}

.panels {
  position: relative;
}

.panel {
  display: none;
  animation: rise 240ms ease both;
}

.panel.is-active {
  display: block;
}

.section-heading {
  margin: 18px 2px 12px;
}

.section-heading h3 {
  margin: 0;
  font-size: 1.35rem;
}

.letter-card {
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 20px;
}

.letter-card__title {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0 16px;
  text-align: left;
  color: var(--ink);
  font-weight: 850;
}

.letter-card__title span:first-child {
  overflow-wrap: anywhere;
}

.letter-card__body {
  display: none;
  padding: 0 16px 16px;
  color: #ead0dc;
  line-height: 1.74;
}

.letter-card.is-open .letter-card__body {
  display: block;
}

.id-card {
  border-radius: 24px;
  padding: 18px;
}

.avatar {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 38% 24%, #fff2f7, transparent 22px),
    linear-gradient(135deg, #e9c7aa, #ff8fb8 52%, #9e79ff);
  color: #261521;
  font-size: 2.1rem;
  font-weight: 900;
}

img.avatar {
  display: block;
  background: rgba(255, 246, 250, 0.08);
}

dl {
  margin: 0;
}

.id-card dl div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 206, 224, 0.12);
}

dt {
  color: var(--soft);
  font-weight: 800;
}

dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.rule-list,
.task-list {
  display: grid;
  gap: 10px;
}

.rule-item,
.task-item {
  border-radius: 18px;
  padding: 14px;
}

.rule-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: flex-start;
}

.rule-item span {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 121, 170, 0.18);
  color: #ffd4e3;
  font-weight: 900;
  font-size: 0.78rem;
}

.rule-item p {
  margin: 1px 0 0;
  line-height: 1.6;
}

.inline-form,
.message-form {
  margin-top: 12px;
  padding: 10px;
  border-radius: 18px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.inline-form input,
.message-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 206, 224, 0.16);
  border-radius: 999px;
  background: rgba(9, 7, 12, 0.3);
  color: var(--ink);
  outline: none;
}

.inline-form input {
  min-width: 0;
  height: 46px;
  padding: 0 14px;
}

.inline-form button {
  min-width: 72px;
  background: #ffd4e3;
  color: #21141f;
  box-shadow: none;
}

.progress-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 18px;
}

.progress-card span {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 121, 170, 0.17);
  color: #ffd4e3;
  font-weight: 900;
}

.progress-card p {
  margin: 0;
  font-size: 0.88rem;
}

.task-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 12px;
  align-items: start;
}

.task-item input {
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  accent-color: var(--hot);
}

.task-item h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.task-item p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.5;
}

.task-item small {
  color: var(--milk);
  font-weight: 800;
}

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

.memory-item {
  position: relative;
  margin: 0;
}

.memory-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(255, 206, 224, 0.12);
  border-radius: 18px;
  filter: saturate(1.08) contrast(1.03);
}

.memory-item figcaption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(20, 14, 24, 0.72);
  color: var(--ink);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 22px;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: -60% -20%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 214, 229, 0.16), transparent 65%);
  opacity: 0;
  transform: translateX(-40%) rotate(8deg);
}

.game-card.is-revealing {
  animation: cardPulse 760ms ease both;
}

.game-card.is-revealing::before {
  animation: shineSweep 760ms ease both;
}

.game-label {
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 850;
}

.game-card h4 {
  min-height: 66px;
  margin-bottom: 14px;
  font-size: 1.08rem;
  line-height: 1.5;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.game-card h4.is-shuffling {
  opacity: 0.62;
  transform: translateY(3px) scale(0.98);
  filter: blur(1px);
}

.draw-reel {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 74px;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
}

.draw-reel span {
  display: block;
  padding: 5px 7px;
  border: 1px solid rgba(255, 206, 224, 0.18);
  border-radius: 999px;
  background: rgba(25, 16, 30, 0.82);
  color: var(--milk);
  font-size: 0.68rem;
  font-weight: 850;
  text-align: center;
}

.draw-card.is-revealing .draw-reel {
  animation: reelPop 760ms ease both;
}

.tail-card.is-wagging {
  animation: tailWag 560ms ease both;
}

.float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.float-burst {
  position: absolute;
  left: var(--x);
  bottom: 54px;
  color: var(--soft);
  font-size: var(--size);
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, 0) rotate(var(--rotate));
  animation: floatUp 950ms ease-out forwards;
}

.button-row {
  display: flex;
  gap: 10px;
}

.message-board {
  min-height: 180px;
  padding: 16px;
  border-radius: 22px;
}

.message-item {
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 206, 224, 0.12);
  line-height: 1.65;
}

.message-item:first-child {
  padding-top: 0;
}

.message-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.message-item time {
  display: block;
  margin-bottom: 4px;
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 850;
}

.message-item .message-text {
  color: #f5dce6;
  overflow-wrap: anywhere;
}

.message-item.is-owner time {
  color: #ffd3a8;
}

.message-item.is-owner .message-text {
  color: #ffe0ca;
}

.message-item.is-dog time {
  color: #d8c4ff;
}

.message-item.is-dog .message-text {
  color: #e9dcff;
}

.message-form {
  display: grid;
  gap: 10px;
}

.owner-form,
.settings-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 20px;
}

.owner-form h4,
.settings-card h4 {
  margin: 0;
  color: var(--soft);
  font-size: 0.98rem;
}

.editor-list {
  display: grid;
  gap: 8px;
}

.editor-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) auto;
  gap: 8px;
}

.tiny-button,
.danger-button {
  border: 1px solid rgba(255, 206, 224, 0.18);
  border-radius: 999px;
  background: rgba(255, 246, 250, 0.08);
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 850;
}

.tiny-button {
  min-width: 38px;
  height: 34px;
  padding: 0 8px;
}

.danger-button {
  min-height: 36px;
  margin-top: 8px;
  padding: 0 12px;
}

.module-toggle-list,
.account-table {
  display: grid;
  gap: 8px;
}

.module-toggle {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 206, 224, 0.12);
  border-radius: 14px;
  background: rgba(255, 246, 250, 0.05);
}

.module-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--hot);
}

.module-toggle span {
  font-weight: 850;
}

.module-toggle small,
.account-table small {
  color: var(--muted);
}

.account-table div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 206, 224, 0.12);
  border-radius: 14px;
  background: rgba(255, 246, 250, 0.05);
}

.account-table small {
  grid-column: 1 / -1;
}

.message-form textarea {
  min-height: 100px;
  resize: vertical;
  border-radius: 16px;
  padding: 12px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 20;
  width: min(calc(100% - 36px), 420px);
  transform: translate(-50%, 130%);
  padding: 13px 16px;
  border: 1px solid rgba(255, 206, 224, 0.18);
  border-radius: 999px;
  background: rgba(28, 18, 33, 0.94);
  color: var(--ink);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 220ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes puppyFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  50% {
    transform: translateX(-50%) translateY(-7px) scale(1.015);
  }
}

@keyframes puppyUnlock {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  58% {
    opacity: 1;
    transform: translateX(-50%) translateY(18px) scale(1.2);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(38px) scale(1.42);
  }
}

@keyframes appArrive {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardPulse {
  0% {
    transform: translateY(0) scale(1);
    border-color: var(--line);
  }
  34% {
    transform: translateY(-2px) scale(1.012);
    border-color: rgba(255, 212, 227, 0.58);
  }
  100% {
    transform: translateY(0) scale(1);
    border-color: var(--line);
  }
}

@keyframes shineSweep {
  0% {
    opacity: 0;
    transform: translateX(-42%) rotate(8deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(42%) rotate(8deg);
  }
}

@keyframes reelPop {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  22%,
  72% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes tailWag {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  18% {
    transform: rotate(-1.2deg) scale(1.01);
  }
  36% {
    transform: rotate(1.2deg) scale(1.012);
  }
  54% {
    transform: rotate(-0.8deg) scale(1.008);
  }
  72% {
    transform: rotate(0.6deg) scale(1.004);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.7) rotate(var(--rotate));
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift)), -96px) scale(1.18) rotate(calc(var(--rotate) * -1));
  }
}

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

@media (min-width: 720px) {
  .site-shell {
    margin: 24px auto;
    min-height: calc(100dvh - 48px);
    border: 1px solid rgba(255, 206, 224, 0.14);
    border-radius: 34px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  }

  .gate,
  .app {
    min-height: calc(100dvh - 48px);
  }
}

@media (max-width: 380px) {
  .account-grid {
    grid-template-columns: 1fr;
  }

  .account-card {
    min-height: 0;
  }

  .role-badge {
    max-width: 82px;
  }

  .mini-tag {
    width: 50px;
    height: 50px;
    font-size: 0.9rem;
  }

  .hero-card {
    padding: 16px 76px 16px 16px;
  }
}
