:root {
  --ion-bg: #061225;
  --ion-panel: rgba(8, 30, 60, 0.82);
  --ion-panel-2: rgba(5, 22, 48, 0.78);
  --ion-text: #e8fbff;
  --ion-muted: #8fb9cc;
  --ion-line: rgba(62, 210, 255, 0.28);
  --ion-cyan: #20e7ff;
  --ion-gold: #ffe86b;
  --ion-pink: #ff4fd8;
  --ion-green: #4dff9a;
  --ion-red: #ff4f7d;
  --ion-ink: #e8fbff;
  --ion-surface: rgba(8, 30, 60, 0.86);
  --ion-surface-strong: rgba(4, 15, 34, 0.94);
  --ion-glass: rgba(5, 22, 48, 0.68);
  --ion-shadow: 0 24px 70px rgba(0, 18, 48, 0.48), 0 0 28px rgba(32, 231, 255, 0.08), inset 0 1px 0 rgba(157, 239, 255, 0.18);
  --ion-glow: 0 14px 34px rgba(0, 18, 48, 0.36), 0 0 30px rgba(32, 231, 255, 0.24);
  --ion-radius: 8px;
}

html {
  color-scheme: dark;
  min-width: 320px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  background:
    linear-gradient(rgba(32,231,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,231,255,0.05) 1px, transparent 1px),
    radial-gradient(ellipse at 12% 8%, rgba(32, 231, 255, 0.22), transparent 28rem),
    radial-gradient(ellipse at 88% 12%, rgba(71, 119, 255, 0.2), transparent 30rem),
    radial-gradient(ellipse at 70% 92%, rgba(255, 232, 107, 0.12), transparent 26rem),
    linear-gradient(145deg, #020713 0%, #061a35 48%, #030a18 100%) !important;
  background-size: 32px 32px, 32px 32px, auto, auto, auto, auto !important;
  color: var(--ion-text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 26%, rgba(32, 231, 255, 0.16) 41%, transparent 56%),
    radial-gradient(circle at 50% 0%, rgba(32, 231, 255, 0.12), transparent 34rem),
    radial-gradient(circle at 20% 70%, rgba(77, 255, 154, 0.1), transparent 22rem);
  animation: ionAmbientSweep 22s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 20%, rgba(32,231,255,0.18), transparent 18rem),
    repeating-linear-gradient(180deg, rgba(32,231,255,0.045) 0 1px, transparent 1px 6px);
  opacity: 0.82;
}

img,
video,
canvas {
  max-width: 100%;
}

main,
.panel,
.card-grid,
.cards-grid,
.collection-grid,
.inventory-grid,
.shop-grid,
.news-grid,
.deck-grid {
  content-visibility: auto;
  contain-intrinsic-size: 1px 760px;
}

.panel,
main {
  border-color: var(--ion-line) !important;
  box-shadow: var(--ion-shadow);
}

.panel::after,
.hero-card::after {
  content: "";
  position: absolute;
  right: -6%;
  bottom: -14%;
  width: 190px;
  height: 190px;
  pointer-events: none;
  background: url("/ion2.png") center/contain no-repeat;
  opacity: 0.08;
  filter: saturate(0.8) brightness(1.16);
  transform: rotate(-12deg);
}

.panel {
  background: var(--ion-panel) !important;
  border: 1px solid rgba(62, 210, 255, 0.28) !important;
  backdrop-filter: blur(26px) saturate(1.14);
  -webkit-backdrop-filter: blur(26px) saturate(1.14);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(32,231,255,0.12), transparent 32%),
    linear-gradient(315deg, rgba(255,232,107,0.06), transparent 36%);
  opacity: 0.82;
}

h1 {
  color: var(--ion-text);
  text-shadow: 0 8px 26px rgba(62, 84, 108, 0.12);
}

h2 {
  color: var(--ion-text);
}

a {
  color: var(--ion-cyan);
}

button,
.primary,
.secondary,
.tab {
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

button.primary,
.primary,
button.submit,
.tab.active {
  background: linear-gradient(135deg, var(--ion-cyan), #4777ff 62%, var(--ion-gold)) !important;
  color: #02101f !important;
  box-shadow: 0 0 24px rgba(32, 231, 255, 0.24);
}

button.secondary,
.secondary,
.tab {
  background: var(--ion-panel-2) !important;
  border: 1px solid rgba(62,210,255,0.26) !important;
  color: var(--ion-text);
  box-shadow: inset 0 1px 0 rgba(157,239,255,0.14), 0 10px 22px rgba(0, 18, 48, 0.28);
}

button:hover,
.primary:hover,
.secondary:hover,
.tab:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: var(--ion-glow);
}

button:active,
.primary:active,
.secondary:active,
.tab:active {
  transform: translateY(1px) scale(0.99);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}

input,
select,
textarea {
  border-color: rgba(62, 210, 255, 0.28) !important;
  background: rgba(3, 13, 31, 0.74) !important;
  color: var(--ion-text);
  box-shadow: inset 0 1px 0 rgba(157,239,255,0.12), 0 8px 18px rgba(0, 18, 48, 0.22);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(53, 231, 255, 0.34);
  border-color: rgba(53, 231, 255, 0.7) !important;
}

.ion-card,
.card-preview,
.saved-card,
.face,
.front,
.back,
.viewer-card {
  position: relative;
  aspect-ratio: 2.5 / 3.5;
  border: 10px solid rgba(255,255,255,0.9);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(16,29,49,0.98), rgba(3,13,31,0.96));
  color: var(--ion-text);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto;
  gap: 8px;
  padding: 11px;
  box-shadow:
    0 24px 58px rgba(0,0,0,0.38),
    0 0 0 1px rgba(53,231,255,0.16),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -12px 28px rgba(0,0,0,0.24);
  transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease;
  isolation: isolate;
  background-image:
    linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02)),
    radial-gradient(circle at 82% 8%, rgba(32,231,255,0.16), transparent 38%),
    url("/ion2.png");
  background-size: auto, auto, 78% auto;
  background-position: center, center, 50% 48%;
  background-repeat: no-repeat;
  background-blend-mode: normal, screen, overlay;
}

.ion-card::before,
.card-preview::before,
.saved-card::before,
.face::before,
.front::before,
.back::before,
.viewer-card::before {
  content: "";
  position: absolute;
  inset: -8% 45% auto -12%;
  height: 44%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.46), transparent);
  transform: rotate(-18deg);
  pointer-events: none;
  opacity: 0.8;
  animation: ionAmbientSweep 3.4s ease-in-out infinite;
}

.ion-card::after,
.card-preview::after,
.saved-card::after,
.face::after,
.front::after,
.back::after,
.viewer-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.10),
    inset 0 0 26px rgba(255,255,255,0.10),
    inset 0 0 42px rgba(53,231,255,0.08);
  border-radius: inherit;
}

.ion-card:hover,
.card:hover,
.card-preview:hover,
.saved-card:hover,
.face:hover,
.front:hover,
.back:hover,
.viewer-card:hover {
  transform: translateY(-3px) scale(1.01);
  filter: saturate(1.08) brightness(1.04);
  box-shadow: 0 30px 70px rgba(0,0,0,0.42), 0 0 34px rgba(53,231,255,0.16);
}

.holo,
.legendary,
[class*="holo"],
[class*="legendary"] {
  text-shadow: 0 0 16px currentColor;
}

.message {
  overflow-wrap: anywhere;
}

.credit-gain-pop,
.xp-gain-pop {
  position: fixed;
  right: 18px;
  top: max(70px, calc(env(safe-area-inset-top) + 70px));
  z-index: 1000;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "logo label"
    "logo value";
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  min-width: 180px;
  border: 1px solid rgba(246, 200, 95, 0.58);
  border-radius: 8px;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(255, 232, 107, 0.24), rgba(32, 231, 255, 0.14)),
    rgba(4, 15, 34, 0.94);
  color: var(--ion-text);
  box-shadow: 0 18px 54px rgba(0,0,0,0.38), 0 0 30px rgba(246, 200, 95, 0.18);
  pointer-events: none;
  animation: creditGainPop 1800ms ease forwards;
}

.credit-pop-logo {
  grid-area: logo;
  width: 38px;
  height: 38px;
  animation: creditLogoSheen 1.3s ease-in-out infinite;
}

.xp-gain-pop {
  right: 214px;
  border-color: rgba(53, 231, 255, 0.58);
  background:
    linear-gradient(135deg, rgba(32, 231, 255, 0.24), rgba(77, 255, 154, 0.14)),
    rgba(4, 15, 34, 0.94);
  box-shadow: 0 18px 54px rgba(0,0,0,0.38), 0 0 30px rgba(53, 231, 255, 0.18);
  animation-duration: 2100ms;
}

.xp-gain-pop.level-up {
  border-color: rgba(246, 200, 95, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 232, 107, 0.24), rgba(255, 79, 216, 0.16), rgba(32, 231, 255, 0.14)),
    rgba(4, 15, 34, 0.94);
}

.credit-gain-pop.spend {
  border-color: rgba(255, 107, 139, 0.58);
  background:
    linear-gradient(135deg, rgba(255, 107, 139, 0.22), rgba(255, 79, 216, 0.12)),
    rgba(4, 15, 34, 0.94);
  box-shadow: 0 18px 54px rgba(0,0,0,0.38), 0 0 30px rgba(255, 107, 139, 0.18);
}

.credit-gain-pop strong,
.xp-gain-pop strong {
  grid-area: value;
  color: var(--ion-gold);
  font-size: 1.15rem;
}

.xp-gain-pop strong {
  color: var(--ion-cyan);
}

.xp-gain-pop.level-up strong {
  color: var(--ion-gold);
}

.credit-gain-pop.spend strong {
  color: #ff8fac;
}

.credit-gain-pop span,
.xp-gain-pop span {
  grid-area: label;
  color: var(--ion-muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

body {
  color: var(--ion-text) !important;
}

.hero,
.toolbar,
.controls,
.filters,
.status-card,
.profile-card,
.stat-card,
.job-card,
.training-card,
.house-card,
.market-card,
.item-card,
.news-card,
.stock-card,
.deck-row,
.card-row,
.message-row,
.conversation,
.thread-item,
.player,
.slot-machine,
.city-action,
.arena-panel,
.admin-card,
.inventory-card,
.shop-card,
.pack-card {
  border: 1px solid rgba(62, 210, 255, 0.28) !important;
  background:
    linear-gradient(rgba(32,231,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,231,255,0.035) 1px, transparent 1px),
    linear-gradient(145deg, rgba(32,231,255,0.12), transparent 34%),
    radial-gradient(circle at 18% 0%, rgba(32, 231, 255, 0.16), transparent 15rem),
    radial-gradient(circle at 100% 28%, rgba(255, 232, 107, 0.08), transparent 15rem),
    rgba(5, 22, 48, 0.82) !important;
  background-size: 18px 18px, 18px 18px, auto, auto, auto, auto !important;
  color: var(--ion-text) !important;
  box-shadow: var(--ion-shadow) !important;
  backdrop-filter: blur(22px) saturate(1.14);
  -webkit-backdrop-filter: blur(22px) saturate(1.14);
}

.hero::before,
.hero::after,
.toolbar::before,
.controls::before,
.filters::before,
.status-card::before,
.profile-card::before,
.stat-card::before,
.job-card::before,
.training-card::before,
.house-card::before,
.market-card::before,
.item-card::before,
.news-card::before,
.stock-card::before,
.shop-card::before,
.pack-card::before {
  border-color: rgba(62, 210, 255, 0.22) !important;
}

h1,
h2,
h3,
h4,
strong,
label,
legend,
.title,
.name {
  color: var(--ion-text) !important;
}

p,
small,
.muted,
.meta,
.hint,
.message,
.preview,
.subtitle {
  color: var(--ion-muted) !important;
}

button,
.button,
.primary,
.secondary,
.danger,
.ghost,
.quick,
.tab,
input,
select,
textarea {
  border-radius: 999px !important;
}

textarea {
  border-radius: 18px !important;
}

button,
.button,
.primary,
.secondary,
.danger,
.ghost,
.quick,
.tab {
  border: 1px solid rgba(62, 210, 255, 0.34) !important;
  font-weight: 1000;
  box-shadow: 0 10px 22px rgba(0, 18, 48, 0.28), inset 0 1px 0 rgba(157, 239, 255, 0.16);
}

.danger,
button.danger {
  background: linear-gradient(135deg, #ff6b8b, #ff9cc8) !important;
  color: #ffffff !important;
}

.tag,
.badge,
.pill,
.chip,
.status,
.rarity,
.price,
.stat,
.timer,
.value {
  border-color: rgba(62, 210, 255, 0.28) !important;
  background: rgba(5, 22, 48, 0.72) !important;
  color: var(--ion-text) !important;
  box-shadow: inset 0 1px 0 rgba(157, 239, 255, 0.14), 0 8px 16px rgba(0, 18, 48, 0.22);
}

table,
thead,
tbody,
tr,
td,
th {
  border-color: rgba(151, 172, 198, 0.28) !important;
}

th {
  color: var(--ion-muted) !important;
}

::selection {
  background: rgba(53,231,255,0.28);
  color: var(--ion-text);
}

.ion-card,
.card-preview,
.saved-card,
.face,
.front,
.back,
.viewer-card {
  color: #f5f8ff !important;
}

.ion-card h1,
.ion-card h2,
.ion-card h3,
.ion-card h4,
.ion-card strong,
.ion-card label,
.ion-card .name,
.card-preview h1,
.card-preview h2,
.card-preview h3,
.card-preview h4,
.card-preview strong,
.card-preview label,
.card-preview .name,
.saved-card h1,
.saved-card h2,
.saved-card h3,
.saved-card h4,
.saved-card strong,
.saved-card label,
.saved-card .name,
.face h1,
.face h2,
.face h3,
.face h4,
.face strong,
.face label,
.face .name,
.viewer-card h1,
.viewer-card h2,
.viewer-card h3,
.viewer-card h4,
.viewer-card strong,
.viewer-card label,
.viewer-card .name {
  color: inherit !important;
  letter-spacing: 0.01em;
}

.ion-card p,
.ion-card small,
.ion-card .muted,
.ion-card .meta,
.card-preview p,
.card-preview small,
.card-preview .muted,
.card-preview .meta,
.saved-card p,
.saved-card small,
.saved-card .muted,
.saved-card .meta,
.face p,
.face small,
.face .muted,
.face .meta,
.viewer-card p,
.viewer-card small,
.viewer-card .muted,
.viewer-card .meta {
  color: rgba(245,248,255,0.78) !important;
}

.ion-card .rarity,
.card-preview .rarity,
.saved-card .rarity,
.face .rarity,
.viewer-card .rarity {
  background: linear-gradient(135deg, rgba(255,232,107,0.16), rgba(53,231,255,0.12)) !important;
  color: #fff8d8 !important;
  border: 1px solid rgba(255,255,255,0.26) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 16px rgba(0,0,0,0.18) !important;
}

.ion-type-badge {
  --type-a: #9aa7b4;
  --type-b: #f4f8ff;
  --type-ink: #06101f;
  position: relative;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--type-a) 62%, white 12%);
  border-radius: 999px;
  padding: 3px 9px 3px 5px;
  color: var(--type-ink);
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,0.62), transparent 30%),
    linear-gradient(135deg, var(--type-a), var(--type-b));
  box-shadow: 0 0 16px color-mix(in srgb, var(--type-a) 36%, transparent), inset 0 1px 0 rgba(255,255,255,0.52);
  font-size: 0.66rem;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.ion-type-badge::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    var(--type-mark),
    rgba(3,13,31,0.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.52), 0 0 12px rgba(255,255,255,0.22);
}

.ion-type-fire { --type-a:#ff5d35; --type-b:#ffd166; --type-mark: radial-gradient(circle at 50% 74%, #fff4bd 0 16%, transparent 17%), conic-gradient(from 210deg, #ff3d2e, #ffd166, #ff7a1a, #ff3d2e); }
.ion-type-water { --type-a:#35a7ff; --type-b:#7df7ff; --type-mark: radial-gradient(circle at 50% 72%, #dffcff 0 18%, transparent 19%), conic-gradient(from 180deg, #0d6bff, #7df7ff, #35a7ff); }
.ion-type-electric { --type-a:#ffe34d; --type-b:#35e7ff; --type-mark: linear-gradient(130deg, transparent 0 34%, #06101f 35% 46%, transparent 47%), conic-gradient(from 90deg, #fff176, #35e7ff, #ffe34d); }
.ion-type-grass { --type-a:#48e06f; --type-b:#caff6b; --type-mark: radial-gradient(ellipse at 62% 38%, #06101f 0 24%, transparent 25%), conic-gradient(from 90deg, #2edb62, #caff6b, #48e06f); }
.ion-type-ice { --type-a:#8ff7ff; --type-b:#e6fbff; --type-mark: linear-gradient(60deg, transparent 0 42%, #06101f 43% 55%, transparent 56%), linear-gradient(120deg, transparent 0 42%, #06101f 43% 55%, transparent 56%), conic-gradient(#8ff7ff, #fff, #72c7ff, #8ff7ff); }
.ion-type-fighting { --type-a:#d94f35; --type-b:#ff9a76; --type-mark: radial-gradient(circle at 50% 50%, #06101f 0 26%, transparent 27%), conic-gradient(#d94f35, #ff9a76, #d94f35); }
.ion-type-poison { --type-a:#b76bff; --type-b:#ff79d8; --type-mark: radial-gradient(circle at 50% 42%, #06101f 0 20%, transparent 21%), radial-gradient(circle at 34% 66%, #06101f 0 9%, transparent 10%), radial-gradient(circle at 66% 66%, #06101f 0 9%, transparent 10%), conic-gradient(#b76bff, #ff79d8, #b76bff); }
.ion-type-ground { --type-a:#d8a75f; --type-b:#8f6235; --type-mark: linear-gradient(180deg, transparent 0 46%, #06101f 47% 58%, transparent 59%), conic-gradient(#d8a75f, #8f6235, #d8a75f); }
.ion-type-flying { --type-a:#9bb8ff; --type-b:#e7f0ff; --type-mark: radial-gradient(ellipse at 62% 42%, #06101f 0 18%, transparent 19%), conic-gradient(#9bb8ff, #fff, #7a9cff, #9bb8ff); }
.ion-type-psychic { --type-a:#ff5dab; --type-b:#ffc0e0; --type-mark: radial-gradient(circle at 50% 50%, transparent 0 30%, #06101f 31% 38%, transparent 39%), conic-gradient(#ff5dab, #ffc0e0, #ff5dab); }
.ion-type-bug { --type-a:#a6d945; --type-b:#e7ff74; --type-mark: radial-gradient(circle at 42% 45%, #06101f 0 10%, transparent 11%), radial-gradient(circle at 58% 45%, #06101f 0 10%, transparent 11%), conic-gradient(#a6d945, #e7ff74, #a6d945); }
.ion-type-rock { --type-a:#b99a6b; --type-b:#e0c792; --type-mark: linear-gradient(135deg, transparent 0 35%, #06101f 36% 48%, transparent 49%), conic-gradient(#b99a6b, #e0c792, #8d7450, #b99a6b); }
.ion-type-ghost { --type-a:#7164d8; --type-b:#b99cff; --type-mark: radial-gradient(circle at 40% 46%, #06101f 0 8%, transparent 9%), radial-gradient(circle at 60% 46%, #06101f 0 8%, transparent 9%), conic-gradient(#7164d8, #b99cff, #7164d8); }
.ion-type-dragon { --type-a:#6a63ff; --type-b:#ff7adf; --type-mark: conic-gradient(from 45deg, #06101f 0 18%, transparent 19% 48%, #06101f 49% 62%, transparent 63%), conic-gradient(#6a63ff, #ff7adf, #35e7ff, #6a63ff); }
.ion-type-dark { --type-a:#4a5264; --type-b:#a0a8b8; --type-ink:#f6fbff; --type-mark: radial-gradient(circle at 62% 38%, #f6fbff 0 18%, transparent 19%), conic-gradient(#111827, #4a5264, #111827); }
.ion-type-steel { --type-a:#aab8c4; --type-b:#f0f7ff; --type-mark: linear-gradient(90deg, transparent 0 38%, #06101f 39% 48%, transparent 49%), conic-gradient(#aab8c4, #f0f7ff, #7b8794, #aab8c4); }
.ion-type-fairy { --type-a:#ff93d8; --type-b:#fff0fa; --type-mark: radial-gradient(circle at 50% 50%, #06101f 0 16%, transparent 17%), conic-gradient(#ff93d8, #fff0fa, #ffc8ec, #ff93d8); }
.ion-type-normal { --type-a:#a8afba; --type-b:#f4f8ff; --type-mark: radial-gradient(circle at 50% 50%, #06101f 0 22%, transparent 23%), conic-gradient(#a8afba, #f4f8ff, #a8afba); }

.ion-card-hp {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 6px;
  align-items: center;
  min-height: 18px;
  color: #f6c85f;
  font-size: 0.58rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ion-card-hp-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.ion-card-hp-fill {
  display: block;
  width: var(--hp-pct, 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #49f78a, #35e7ff);
  box-shadow: 0 0 10px rgba(53,231,255,0.34);
}

.ion-card-hp-fill.low {
  background: linear-gradient(90deg, #ff4f7b, #f6c85f);
}

.ion-card-moves {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 18px;
}

.ion-card-move-chip {
  border: 1px solid rgba(62,210,255,0.24);
  border-radius: 999px;
  padding: 3px 7px;
  background: linear-gradient(135deg, rgba(53,231,255,0.14), rgba(0,0,0,0.26));
  color: rgba(245,248,255,0.92);
  font-size: 0.55rem;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.ion-card .effect,
.card-preview .effect,
.saved-card .effect,
.face .effect,
.viewer-card .effect {
  display: none !important;
}

.ion-card .art,
.card-preview .art,
.saved-card .art,
.face .art,
.viewer-card .art {
  min-height: 180px;
}

@keyframes creditGainPop {
  0% { opacity: 0; transform: translateY(-16px) scale(0.92); filter: brightness(1.6); }
  16% { opacity: 1; transform: translateY(0) scale(1.04); }
  72% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(0.96); }
}

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

@media (max-width: 760px) {
  body {
    padding: 14px !important;
    background-size: auto, auto, auto, 52px 52px, 52px 52px, auto !important;
  }

  .panel,
  main {
    border-radius: 8px !important;
  }

  h1 {
    font-size: clamp(1.55rem, 8vw, 2.25rem);
    line-height: 1.05;
  }

  h2 {
    font-size: clamp(1.15rem, 5vw, 1.55rem);
  }

  button,
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .credit-gain-pop,
  .xp-gain-pop {
    top: auto;
    right: 12px;
    left: 12px;
    bottom: max(14px, env(safe-area-inset-bottom));
    min-width: 0;
  }
}
