﻿:root {
  color-scheme: light;
  --ink: #0d1730;
  --muted: #60708c;
  --line: #263c62;
  --blue: #6eb0ff;
  --deep-blue: #4f82d6;
  --cyan: #bdf6ff;
  --green: #a9ef55;
  --yellow: #ffe070;
  --orange: #ff9a34;
  --red: #ff5c55;
  --cream: #fff9d8;
  --card: #f8fcff;
  --shadow: rgba(6, 13, 31, 0.24);
}

.word-guide.hidden {
  display: none;
}

.word-guide {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
  font-family: var(--lq-font-sans, "Inter", "Noto Sans SC", system-ui, sans-serif);
}

.word-guide-dim,
.word-guide-spotlight,
.word-guide-arrow,
.word-guide-card {
  position: fixed;
}

.word-guide-dim {
  z-index: 5000;
  background: rgba(6, 21, 45, 0.62);
  pointer-events: auto;
}

.word-guide-spotlight {
  z-index: 5001;
  border: 3px solid #ffe47a;
  border-radius: 16px;
  box-shadow:
    0 0 0 3px rgba(65, 139, 225, 0.9),
    0 0 24px rgba(255, 223, 96, 0.72),
    inset 0 0 18px rgba(255, 247, 193, 0.26);
  pointer-events: none;
  animation: wordGuidePulse 0.95s ease-in-out infinite alternate;
}

.word-guide-arrow {
  z-index: 5003;
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 3px 0 rgba(24, 71, 125, 0.32));
  pointer-events: none;
}

.word-guide-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
}

.word-guide-arrow.up::before {
  border-bottom: 28px solid #ffc24b;
}

.word-guide-arrow.down::before {
  border-top: 28px solid #ffc24b;
}

.word-guide-card {
  z-index: 5004;
  box-sizing: border-box;
  padding: 15px;
  color: #17345f;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(229, 247, 255, 0.98));
  border: 2px solid #8fc1f4;
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(20, 70, 130, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  pointer-events: auto;
}

.word-guide-step {
  margin: 0 0 5px;
  color: #2f76d2;
  font-size: 12px;
  font-weight: 900;
}

.word-guide-title {
  margin: 0 0 8px;
  color: #17345f;
  font-size: 20px;
  line-height: 1.15;
}

.word-guide-text {
  margin: 0;
  color: #315278;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.word-guide-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.word-guide-skip,
.word-guide-next {
  min-height: 34px;
  padding: 7px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  border: 2px solid #8fc1f4;
  border-radius: 999px;
  box-shadow: 0 6px 12px rgba(47, 118, 210, 0.16);
  cursor: pointer;
}

.word-guide-skip {
  color: #315278;
  background: #ffffff;
}

.word-guide-next {
  color: #4a2f00;
  background: linear-gradient(180deg, #ffe08b, #ffc24b);
  border-color: #f0a930;
}

@keyframes wordGuidePulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.012);
  }
}

@media (max-width: 760px) {
  .word-guide-card {
    padding: 13px;
    border-radius: 14px;
  }

  .word-guide-title {
    font-size: 18px;
  }

  .word-guide-text {
    font-size: 13px;
  }

  .word-guide-skip,
  .word-guide-next {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Inter", "Noto Sans SC", system-ui, sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18) 2px, transparent 2px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 2px, transparent 2px) 0 0 / 24px 24px,
    linear-gradient(135deg, #d7ecff, #f7fbff 48%, #fff3c9);
}

button,
a {
  font: inherit;
}

.flash-app {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 18px;
}

.flash-phone {
  width: min(430px, 100%);
  min-height: min(860px, calc(100vh - 36px));
  border-radius: 28px;
  border: 6px solid rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(45deg, rgba(118, 178, 255, 0.72) 25%, transparent 25%) 0 0 / 36px 36px,
    linear-gradient(45deg, transparent 75%, rgba(118, 178, 255, 0.72) 75%) 0 0 / 36px 36px,
    linear-gradient(45deg, transparent 75%, rgba(91, 151, 230, 0.72) 75%) 18px 18px / 36px 36px,
    linear-gradient(45deg, rgba(91, 151, 230, 0.72) 25%, #9bc9ff 25%) 18px 18px / 36px 36px;
  box-shadow: 0 18px 48px rgba(25, 45, 90, 0.18);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.flash-topbar,
.flash-status,
.deck-title-row,
.swipe-hints,
.pending-panel,
.postcard-progress,
.flash-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.flash-topbar {
  color: #fff;
}

.flash-topbar p {
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.flash-topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.flash-back,
.flash-small-button,
.modal-close {
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(38, 60, 98, 0.78);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.flash-back,
.flash-small-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.deck-panel {
  border: 3px solid var(--line);
  border-radius: 6px;
  background: rgba(248, 252, 255, 0.92);
  box-shadow: 4px 4px 0 rgba(38, 60, 98, 0.72);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.deck-panel[hidden] {
  display: none;
}

.deck-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deck-series-list,
.deck-grade-list {
  display: grid;
  gap: 8px;
}

.deck-series-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deck-grade-list {
  max-height: 190px;
  overflow: auto;
}

.deck-choice {
  border: 2px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  min-height: 42px;
  padding: 7px 9px;
  box-shadow: 2px 2px 0 rgba(38, 60, 98, 0.75);
  cursor: pointer;
  text-align: left;
  font-weight: 900;
}

.deck-choice-name {
  min-width: 0;
}

.deck-choice small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.deck-grade-list .deck-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
}

.deck-grade-list .deck-choice small {
  margin-top: 0;
  white-space: nowrap;
  justify-self: end;
}

.deck-choice.active {
  background: var(--green);
}

.flash-status {
  align-items: stretch;
}

.status-pill {
  min-width: 94px;
  border: 3px solid var(--line);
  border-radius: 5px;
  padding: 6px 8px;
  box-shadow: 3px 3px 0 rgba(38, 60, 98, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill strong {
  font-size: 18px;
}

.status-pill.pending {
  background: var(--yellow);
}

.status-pill.mastered {
  background: var(--green);
}

.status-track,
.reward-track {
  flex: 1;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.16);
  overflow: hidden;
  display: flex;
  min-height: 18px;
  align-self: center;
}

.status-track span,
.reward-track span {
  display: block;
  width: 0%;
  transition: width 0.22s ease;
}

.pending-bar {
  background: var(--yellow);
}

.mastered-bar,
.reward-track span {
  background: var(--green);
}

.flash-stage {
  position: relative;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 252, 255, 0.2);
  box-shadow: 5px 5px 0 rgba(38, 60, 98, 0.75);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.deck-title-row {
  color: #fff;
  font-weight: 900;
}

.deck-title-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-title-row strong {
  color: var(--yellow);
  white-space: nowrap;
}

.swipe-zone {
  min-height: 442px;
  position: relative;
  display: grid;
  place-items: center;
  touch-action: pan-y;
}

.word-card {
  width: min(315px, 94%);
  min-height: 430px;
  border: 4px solid var(--line);
  border-radius: 6px;
  background: #fffaf0;
  box-shadow: 7px 7px 0 rgba(38, 60, 98, 0.85);
  transform: rotate(-4deg);
  padding: 14px;
  display: grid;
  grid-template-rows: 234px 1fr;
  gap: 0;
  position: relative;
  user-select: none;
  cursor: grab;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.word-card.dragging {
  transition: none;
  cursor: grabbing;
}

.word-card.fly-left {
  transform: translateX(-130%) rotate(-18deg);
  opacity: 0;
}

.word-card.fly-right {
  transform: translateX(130%) rotate(18deg);
  opacity: 0;
}

.word-card.entering {
  animation: cardEnter 0.24s ease both;
}

@keyframes cardEnter {
  from {
    transform: translateY(24px) rotate(2deg);
    opacity: 0;
  }
  to {
    transform: rotate(-4deg);
    opacity: 1;
  }
}

.swipe-label {
  position: absolute;
  top: 18px;
  z-index: 3;
  border: 3px solid var(--line);
  border-radius: 4px;
  padding: 5px 10px;
  font-weight: 900;
  box-shadow: 3px 3px 0 rgba(38, 60, 98, 0.78);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.swipe-label.left {
  left: 12px;
  background: var(--yellow);
  transform: rotate(-8deg);
}

.swipe-label.right {
  right: 12px;
  background: var(--green);
  transform: rotate(8deg);
}

.word-card.show-left .swipe-label.left,
.word-card.show-right .swipe-label.right {
  opacity: 1;
}

.pixel-frame {
  border: 4px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(0deg, rgba(124, 196, 93, 0.94) 0 28%, transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.32) 2px, transparent 2px) 0 0 / 34px 34px,
    linear-gradient(rgba(255, 255, 255, 0.32) 2px, transparent 2px) 0 0 / 34px 34px,
    linear-gradient(#9bd2ff, #dff4ff 62%, #91cf6f 62%);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 -26px 0 rgba(112, 176, 82, 0.24);
}

.pixel-art {
  width: 160px;
  height: 160px;
  image-rendering: pixelated;
  position: relative;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: repeat(12, 1fr);
  filter: drop-shadow(7px 9px 0 rgba(42, 63, 93, 0.18));
  transform: translateY(8px);
}

.pixel-art::before,
.pixel-art::after {
  display: none !important;
}

.pixel-art i {
  grid-column: calc(var(--x) + 1);
  grid-row: calc(var(--y) + 1);
  background: var(--c);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.22),
    inset -2px -2px 0 rgba(0, 0, 0, 0.16);
}

.pixel-art.word-image {
  display: grid;
  place-items: center;
  grid-template-columns: none;
  grid-template-rows: none;
}

.pixel-art.word-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.word-content {
  display: grid;
  align-content: start;
  gap: 5px;
  text-align: center;
  padding: 14px 4px 0;
}

.word-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.word-line h2 {
  margin: 0 0 2px;
  min-width: 0;
  color: var(--ink);
  font-size: var(--word-size, 38px);
  line-height: 1.16;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  letter-spacing: 0;
}

.sound-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(211, 237, 255, 0.72);
  box-shadow: none;
  color: #5da6df;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
  position: relative;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.sound-button::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 9v6h4l5 4V5L7 9H3Zm13.5 3a4.5 4.5 0 0 0-2.2-3.86v7.72A4.5 4.5 0 0 0 16.5 12Zm-2.2-8.35v2.1A7.5 7.5 0 0 1 18.5 12a7.5 7.5 0 0 1-4.2 6.75v2.1A9.5 9.5 0 0 0 20.5 12a9.5 9.5 0 0 0-6.2-8.35Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 9v6h4l5 4V5L7 9H3Zm13.5 3a4.5 4.5 0 0 0-2.2-3.86v7.72A4.5 4.5 0 0 0 16.5 12Zm-2.2-8.35v2.1A7.5 7.5 0 0 1 18.5 12a7.5 7.5 0 0 1-4.2 6.75v2.1A9.5 9.5 0 0 0 20.5 12a9.5 9.5 0 0 0-6.2-8.35Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sound-button:active,
.sound-button.is-tapped {
  transform: scale(0.86);
  background: rgba(181, 225, 255, 0.95);
  color: #2f8fcb;
  box-shadow: 0 0 0 6px rgba(93, 166, 223, 0.16);
}

.sound-button.is-speaking {
  opacity: 1;
  color: #2f8fcb;
  background: rgba(225, 245, 255, 0.96);
  animation: soundPulse 0.78s ease-in-out infinite;
}

.sound-button:disabled {
  opacity: 0.95;
  cursor: default;
}

@keyframes soundPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(93, 166, 223, 0.3);
  }
  55% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(93, 166, 223, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(93, 166, 223, 0);
  }
}

.meaning,
.example-box p,
.example-box span,
.pending-panel p {
  margin: 0;
}

.meaning {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.05;
}

.example-box {
  border: 3px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  padding: 7px;
  margin-top: 2px;
  display: grid;
  gap: 4px;
}

.example-box p {
  font-size: 14px;
  font-weight: 900;
}

.example-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  width: min(315px, 94%);
  align-self: center;
  transform: translateY(0);
  border: 4px solid var(--line);
  border-radius: 6px;
  background: var(--cream);
  box-shadow: 5px 5px 0 rgba(38, 60, 98, 0.8);
  padding: 22px;
  text-align: center;
  display: grid;
  gap: 12px;
}

.empty-state[hidden] {
  display: none;
}

.empty-state strong {
  font-size: 26px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.empty-state .primary-action {
  justify-self: center;
  min-width: 142px;
}

.swipe-hints {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.primary-action,
.secondary-action {
  border: 3px solid var(--line);
  border-radius: 5px;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(38, 60, 98, 0.82);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.secondary-action {
  background: var(--yellow);
}

.primary-action {
  background: var(--green);
}

.judge-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(211, 237, 255, 0.7);
  box-shadow: none;
  color: #6daadd;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.judge-button::before {
  content: "";
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14.7 5.3 8 12l6.7 6.7 1.4-1.4L10.8 12l5.3-5.3-1.4-1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14.7 5.3 8 12l6.7 6.7 1.4-1.4L10.8 12l5.3-5.3-1.4-1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.judge-button.mastered::before {
  transform: scaleX(-1);
}

.judge-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.pending-panel,
.postcard-progress {
  border: 3px solid var(--line);
  border-radius: 6px;
  background: rgba(248, 252, 255, 0.88);
  box-shadow: 4px 4px 0 rgba(38, 60, 98, 0.72);
  padding: 8px;
}

.pending-panel {
  align-items: flex-start;
  gap: 8px;
}

.pending-panel strong,
.postcard-text strong {
  display: block;
  font-size: 13px;
}

.pending-panel p,
.postcard-text span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.pending-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: 190px;
}

.pending-tag {
  border: 2px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 224, 112, 0.86);
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 900;
  display: inline-grid;
  gap: 1px;
  line-height: 1.05;
  text-align: center;
}

.pending-tag b {
  font-size: 11px;
  text-transform: lowercase;
}

.pending-tag small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.postcard-progress {
  display: grid;
  gap: 6px;
}

.postcard-text {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.reward-track {
  min-height: 11px;
}

.postcard-collection {
  border: 3px solid var(--line);
  border-radius: 6px;
  background: rgba(248, 252, 255, 0.9);
  box-shadow: 4px 4px 0 rgba(38, 60, 98, 0.72);
  overflow: hidden;
}

.postcard-collection-toggle {
  width: 100%;
  border: 0;
  background: linear-gradient(90deg, rgba(255, 224, 112, 0.86), rgba(212, 246, 255, 0.9));
  color: var(--ink);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-weight: 900;
  text-align: left;
}

.postcard-collection-toggle strong {
  font-size: 13px;
}

.postcard-collection-toggle span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.postcard-collection-grid {
  max-height: 190px;
  overflow-y: auto;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.postcard-collection-grid[hidden] {
  display: none;
}

.mini-postcard {
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #fff;
  min-height: 92px;
  padding: 6px 4px;
  display: grid;
  place-items: center;
  gap: 2px;
  box-shadow: 2px 2px 0 rgba(38, 60, 98, 0.45);
}

.mini-postcard img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  image-rendering: pixelated;
}

.mini-postcard strong {
  max-width: 100%;
  font-size: 8px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-postcard-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.flash-actions {
  margin-top: auto;
}

.flash-actions a {
  flex: 1;
}

.reward-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 12, 28, 0.7);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 20;
  overflow: hidden;
}

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

.reward-card {
  width: min(340px, 100%);
  border: 4px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 249, 216, 0.98);
  box-shadow: 6px 6px 0 rgba(38, 60, 98, 0.86);
  padding: 12px;
  position: relative;
  text-align: center;
  display: grid;
  gap: 10px;
  z-index: 1;
}

.reward-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.reward-confetti i {
  position: absolute;
  top: -24px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  background: var(--c);
  border: 2px solid rgba(38, 60, 98, 0.65);
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
  animation: confettiFall var(--d) ease-in forwards;
  animation-delay: var(--delay);
}

.reward-confetti i.reward-drop-piece {
  width: var(--s);
  height: var(--s);
  border: 0;
  border-radius: 0;
  background:
    url("assets/ui/word-flash/reward-shards.png") center / 230px 230px no-repeat,
    var(--c);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 4px 6px rgba(51, 96, 141, 0.18);
  animation-name: rewardShardFall;
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0, -20px, 0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift), 112vh, 0) rotate(420deg);
    opacity: 0;
  }
}

@keyframes rewardShardFall {
  0% {
    transform: translate3d(0, -24px, 0) rotate(0deg) scale(0.4);
    opacity: 0;
  }
  14% {
    opacity: 1;
    transform: translate3d(0, 10vh, 0) rotate(40deg) scale(1);
  }
  100% {
    transform: translate3d(var(--drift), 112vh, 0) rotate(var(--r)) scale(0.86);
    opacity: 0;
  }
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
}

.reward-kicker {
  margin: 0;
  color: var(--deep-blue);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.reward-card h2 {
  margin: 0;
  font-size: 17px;
}

.postcard {
  border: 3px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(111, 244, 255, 0.36), rgba(255, 211, 77, 0.3)),
    #fff;
  padding: 9px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.5);
  display: grid;
  gap: 8px;
}

.postcard-image {
  height: 182px;
  border: 3px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(10, 31, 78, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(10, 31, 78, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    #e9fbff;
  display: grid;
  place-items: center;
}

.postcard-image img {
  max-width: 162px;
  max-height: 162px;
  image-rendering: pixelated;
}

.postcard-info {
  display: grid;
  gap: 4px;
}

.postcard-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.postcard-info span {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--green);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 900;
}

.postcard-info strong {
  font-size: 15px;
}

.postcard-info p {
  margin: 0;
  color: var(--deep-blue);
  font-weight: 900;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 460px) {
  .flash-app {
    padding: 0;
  }

  .flash-phone {
    min-height: 100vh;
    border-radius: 0;
    border: 0;
    width: 100%;
  }

  .status-pill {
    min-width: 82px;
    padding: 5px 7px;
  }

  .swipe-zone {
    min-height: 432px;
  }

  .word-card {
    min-height: 420px;
    grid-template-rows: 224px 1fr;
    padding: 13px;
  }

  .pixel-art {
    width: 150px;
    height: 150px;
  }

  .swipe-hints span {
    display: none;
  }
}

.game-page-nav {
  position: fixed;
  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: min(390px, calc(100vw - 14px));
  padding: 4px;
  border: 2px solid rgba(83, 115, 154, 0.72);
  border-radius: 12px;
  background: rgba(247, 252, 255, 0.9);
  box-shadow: 0 9px 22px rgba(27, 70, 111, 0.22);
  transform: translateX(-50%);
}

.game-page-nav a {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: #2c4668;
  text-decoration: none;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

.game-page-nav a.active {
  color: #11203a;
  background: linear-gradient(180deg, #fff3a5 0 50%, #ffc857 50% 100%);
}

.flash-app {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

/* 20260719 Word Flash RPG postcard UI */
:root {
  --wf-ink: #17345c;
  --wf-muted: #5f7794;
  --wf-sky: #aee2ff;
  --wf-sky-soft: #e9f8ff;
  --wf-cloud: rgba(248, 253, 255, 0.9);
  --wf-line: rgba(92, 154, 207, 0.72);
  --wf-gold: #ffd46a;
  --wf-orange: #ffb86a;
  --wf-green: #8fe28b;
  --wf-shadow: rgba(43, 101, 153, 0.2);
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    linear-gradient(180deg, rgba(234, 249, 255, 0.16), rgba(239, 248, 255, 0.62)),
    url("assets/ui/word-flash/word-flash-bg.png") center / cover fixed no-repeat,
    #d7f1ff;
  color: var(--wf-ink);
}

body:has(.flash-app) {
  background:
    linear-gradient(180deg, rgba(234, 249, 255, 0.16), rgba(239, 248, 255, 0.62)),
    url("assets/ui/word-flash/word-flash-bg.png") center / cover fixed no-repeat,
    #d7f1ff;
}

.flash-app {
  display: block;
  width: 100%;
  min-height: 100vh;
  padding: clamp(12px, 2vw, 22px) clamp(12px, 2.2vw, 28px) calc(86px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(234, 249, 255, 0.1), rgba(239, 248, 255, 0.44)),
    url("assets/ui/word-flash/word-flash-bg.png") center / cover fixed no-repeat;
}

.flash-shell,
.flash-phone {
  width: min(1360px, 100%);
  min-height: calc(100vh - 112px);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  padding: clamp(12px, 1.7vw, 20px);
  overflow: visible;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: clamp(10px, 1.2vw, 16px);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.58) 0 42px, transparent 43px),
    radial-gradient(circle at 86% 14%, rgba(255, 234, 169, 0.28) 0 52px, transparent 53px),
    linear-gradient(180deg, rgba(238, 250, 255, 0.62), rgba(217, 241, 255, 0.52));
  box-shadow:
    0 22px 48px rgba(56, 111, 161, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(2px) saturate(1.02);
}

.flash-topbar {
  display: grid;
  grid-template-columns: auto minmax(170px, 0.75fr) minmax(260px, 1.25fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(111, 178, 226, 0.65);
  border-radius: 18px;
  color: var(--wf-ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(226, 246, 255, 0.76));
  box-shadow: 0 10px 24px rgba(54, 119, 174, 0.15), inset 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.flash-title h1,
.flash-title p,
.flash-topbar h1,
.flash-topbar p {
  margin: 0;
  color: var(--wf-ink);
  letter-spacing: 0;
}

.flash-title h1 {
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.08;
  font-weight: 900;
}

.flash-title p {
  margin-top: 2px;
  color: #58a2d8;
  font-size: 12px;
  font-weight: 900;
}

.flash-back,
.flash-small-button,
.deck-chip {
  border: 1px solid rgba(91, 151, 211, 0.7);
  border-radius: 999px;
  min-height: 38px;
  box-shadow: 0 5px 12px rgba(71, 131, 186, 0.14), inset 0 -2px 0 rgba(100, 166, 220, 0.12);
  background: linear-gradient(180deg, #ffffff, #eaf8ff);
  color: var(--wf-ink);
  text-decoration: none;
  font-weight: 900;
}

.flash-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
}

.flash-top-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.deck-chip {
  min-width: 0;
  padding: 8px 14px;
  cursor: pointer;
  text-align: left;
}

.deck-chip span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flash-top-meta strong {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7c3, #ffd976);
  color: #704914;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 rgba(191, 134, 39, 0.16);
}

.flash-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.flash-small-button {
  padding: 7px 12px;
  cursor: pointer;
}

.flash-sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.flash-sound-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background: url("assets/ui/sentence-pixel/sentence-icon-sound.png") center / contain no-repeat;
}

.flash-sound-toggle.is-muted .flash-sound-icon {
  filter: grayscale(0.9) opacity(0.62);
}

.flash-settings {
  position: relative;
}

.flash-settings summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  list-style: none;
  border: 1.5px solid rgba(84, 145, 204, 0.64);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(221, 244, 255, 0.94));
  box-shadow:
    0 8px 16px rgba(66, 122, 177, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.flash-settings summary::-webkit-details-marker {
  display: none;
}

.flash-settings summary img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.flash-settings-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 80;
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 28px));
  padding: 12px;
  border: 2px solid rgba(88, 151, 210, 0.72);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 253, 255, 0.98), rgba(229, 247, 255, 0.96));
  box-shadow: 0 18px 34px rgba(38, 88, 145, 0.2);
}

.flash-settings-menu strong {
  color: #183766;
  font-size: 16px;
  font-weight: 900;
}

.settings-action {
  min-height: 38px;
  padding: 8px 12px;
  color: #1d4579;
  text-align: left;
  text-decoration: none;
  font-weight: 900;
  border: 1.5px solid rgba(90, 151, 210, 0.48);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #e8f7ff);
  cursor: pointer;
}

.settings-action.danger {
  color: #a64b36;
  border-color: rgba(230, 143, 104, 0.55);
  background: linear-gradient(180deg, #fff8ef, #ffe2cd);
}

.hidden-file-input {
  display: none;
}

.deck-panel {
  border: 1px solid rgba(99, 154, 205, 0.7);
  border-radius: 18px;
  background: rgba(247, 253, 255, 0.95);
  box-shadow: 0 14px 28px rgba(52, 103, 154, 0.18);
}

.deck-choice {
  border: 1px solid rgba(108, 168, 218, 0.62);
  border-radius: 14px;
  box-shadow: 0 5px 12px rgba(69, 130, 188, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

.deck-choice.active {
  background: linear-gradient(180deg, #fff4bf, #ffd778);
}

.flash-status {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(112, 176, 225, 0.62);
  border-radius: 18px;
  background: rgba(248, 253, 255, 0.74);
  box-shadow: 0 10px 22px rgba(56, 121, 177, 0.13);
}

.status-goal {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.status-goal span,
.status-pill span {
  color: var(--wf-muted);
  font-size: 13px;
  font-weight: 900;
}

.status-goal strong {
  color: var(--wf-ink);
  font-size: 15px;
}

.status-pill {
  min-width: auto;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.72);
}

.status-pill.pending {
  background: rgba(255, 218, 127, 0.32);
}

.status-pill.mastered {
  background: rgba(160, 232, 151, 0.34);
}

.status-pill strong {
  color: var(--wf-ink);
  font-size: 18px;
}

.status-track,
.reward-track {
  border: 0;
  min-height: 12px;
  border-radius: 999px;
  background: rgba(117, 172, 217, 0.22);
  box-shadow: inset 0 2px 4px rgba(53, 105, 154, 0.14);
}

.pending-bar {
  background: linear-gradient(90deg, #ffd66c, #ffb96d);
}

.mastered-bar,
.reward-track span {
  background: linear-gradient(90deg, #86dcff, #7ee594);
}

.flash-board {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
  gap: clamp(12px, 1.6vw, 20px);
  align-items: stretch;
}

.flash-stage,
.flash-reward-column {
  min-width: 0;
}

.flash-stage {
  border: 1px solid rgba(102, 166, 218, 0.68);
  border-radius: 22px;
  padding: clamp(12px, 1.6vw, 20px);
  background:
    linear-gradient(180deg, rgba(248, 253, 255, 0.8), rgba(233, 248, 255, 0.68));
  box-shadow:
    0 18px 34px rgba(52, 109, 165, 0.16),
    inset 0 0 0 4px rgba(255, 255, 255, 0.26);
}

.deck-title-row {
  color: var(--wf-ink);
}

.deck-title-row span {
  font-size: clamp(18px, 1.5vw, 24px);
}

.deck-title-row strong {
  color: #5a9bcf;
  font-size: 13px;
}

.swipe-zone {
  min-height: clamp(430px, 52vh, 620px);
  display: grid;
  place-items: center;
}

.word-card {
  width: min(520px, 96%);
  min-height: clamp(420px, 50vh, 590px);
  grid-template-rows: minmax(210px, 0.58fr) auto;
  gap: 0;
  border: 1px solid rgba(92, 154, 207, 0.75);
  border-radius: 22px;
  padding: clamp(12px, 1.3vw, 18px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 250, 255, 0.92));
  box-shadow: 0 18px 36px rgba(52, 109, 165, 0.2), inset 0 0 0 5px rgba(255, 255, 255, 0.42);
  transform: none;
}

.word-card.entering {
  animation: cardEnterRpg 0.24s ease both;
}

@keyframes cardEnterRpg {
  from {
    transform: translateY(18px) scale(0.985);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.word-card.fly-left {
  transform: translateX(-130%) rotate(-12deg);
}

.word-card.fly-right {
  transform: translateX(130%) rotate(12deg);
}

.swipe-label {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--wf-ink);
  box-shadow: 0 8px 18px rgba(50, 106, 164, 0.18);
}

.swipe-label.left {
  background: #ffe3bc;
}

.swipe-label.right {
  background: #cbf4c7;
}

.pixel-frame {
  border: 1px solid rgba(107, 173, 220, 0.58);
  border-radius: 18px;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 239, 170, 0.66) 0 34px, transparent 35px),
    linear-gradient(0deg, rgba(126, 204, 113, 0.92) 0 22%, transparent 22%),
    linear-gradient(#9bdcff, #eaf9ff 66%, #9bd879 66%);
  box-shadow: inset 0 -28px 0 rgba(105, 185, 89, 0.18);
}

.pixel-art {
  width: clamp(168px, 19vw, 230px);
  height: clamp(168px, 19vw, 230px);
  transform: translateY(8px);
}

.word-content {
  gap: 8px;
  padding: clamp(14px, 1.5vw, 18px) 4px 0;
}

.word-line {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.word-line h2 {
  color: #17345c;
  font-size: var(--word-size, clamp(42px, 5vw, 68px));
  line-height: 1.04;
  text-transform: lowercase;
}

.sound-button {
  width: 42px;
  height: 42px;
  background: linear-gradient(180deg, #f7fdff, #dff5ff);
  color: #3c9ed4;
  box-shadow: 0 6px 14px rgba(63, 132, 188, 0.16);
}

.meaning {
  color: #24466d;
  font-size: clamp(28px, 3vw, 42px);
}

.example-box {
  width: min(100%, 420px);
  margin: 4px auto 0;
  border: 1px solid rgba(125, 181, 225, 0.54);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.76);
}

.example-box p {
  color: #17345c;
  font-size: clamp(15px, 1.5vw, 18px);
}

.example-box span {
  color: #5f7794;
  font-size: 13px;
}

.gesture-tip {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #4d7398;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(48, 105, 160, 0.14);
  transform: translateX(-50%);
  pointer-events: none;
  animation: gestureTipFade 5.5s ease forwards;
}

.gesture-tip img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

@keyframes gestureTipFade {
  0%,
  68% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

.swipe-hints {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: clamp(10px, 1.6vw, 18px);
  color: var(--wf-ink);
}

.judge-button {
  width: 100%;
  height: auto;
  min-height: clamp(58px, 6.5vh, 78px);
  border: 1px solid rgba(104, 166, 217, 0.62);
  border-radius: 18px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--wf-ink);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(56, 112, 169, 0.18), inset 0 0 0 3px rgba(255, 255, 255, 0.34);
}

.judge-button::before {
  display: none;
}

.judge-button img {
  width: clamp(34px, 4vw, 50px);
  height: clamp(34px, 4vw, 50px);
  object-fit: contain;
}

.judge-button.pending {
  background: linear-gradient(180deg, #fff4dc, #ffdcae);
}

.judge-button.mastered {
  background: linear-gradient(180deg, #f0fff0, #c5f1bd);
}

.judge-button:disabled {
  opacity: 0.48;
}

.flash-reward-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(12px, 1.4vw, 16px);
}

.postcard-progress,
.postcard-collection {
  border: 1px solid rgba(104, 166, 217, 0.68);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 253, 255, 0.78), rgba(231, 247, 255, 0.64));
  box-shadow:
    0 18px 32px rgba(52, 109, 165, 0.14),
    inset 0 0 0 4px rgba(255, 255, 255, 0.24);
}

.postcard-progress {
  display: grid;
  gap: 14px;
  padding: clamp(14px, 1.5vw, 20px);
}

.postcard-preview {
  position: relative;
  min-height: clamp(210px, 32vh, 340px);
  border-radius: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 225, 130, 0.58) 0 34px, transparent 35px),
    radial-gradient(circle at 20% 80%, rgba(205, 238, 255, 0.92) 0 46px, transparent 47px),
    linear-gradient(180deg, #aee8ff, #effbff 62%, #b8ea9c);
}

.postcard-preview img {
  width: min(72%, 240px);
  max-height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(52, 94, 136, 0.22));
}

.postcard-spark {
  position: absolute;
  right: 8%;
  top: 8%;
  width: 70px;
  height: 70px;
  background: url("assets/ui/word-flash/gold-spark.png") center / contain no-repeat;
}

.postcard-text {
  display: grid;
  gap: 4px;
  text-align: center;
}

.postcard-text strong {
  color: var(--wf-ink);
  font-size: clamp(20px, 2vw, 28px);
}

.postcard-text span {
  color: var(--wf-muted);
  font-size: 14px;
}

.reward-track {
  min-height: 16px;
}

.postcard-collection {
  overflow: hidden;
}

.postcard-collection-toggle {
  min-height: 72px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-areas: "icon title" "icon count";
  justify-content: start;
  text-align: left;
  border: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(225, 246, 255, 0.9));
}

.postcard-collection-toggle img {
  grid-area: icon;
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.postcard-collection-toggle strong {
  grid-area: title;
  color: var(--wf-ink);
  font-size: 20px;
}

.postcard-collection-toggle span {
  grid-area: count;
  color: var(--wf-muted);
  font-size: 13px;
}

.postcard-collection-grid {
  max-height: min(300px, 34vh);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
}

.mini-postcard {
  border: 1px solid rgba(103, 157, 205, 0.7);
  border-radius: 14px;
  min-height: 112px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 16px rgba(62, 118, 171, 0.14);
}

.mini-postcard img {
  width: 70px;
  height: 70px;
}

.mini-postcard strong {
  color: var(--wf-ink);
  font-size: 11px;
}

.flash-actions {
  display: none;
}

.reward-modal {
  z-index: 220;
  background: rgba(38, 82, 137, 0.46);
  backdrop-filter: blur(5px);
}

.reward-card {
  width: min(430px, 94vw);
  border: 1px solid rgba(96, 154, 207, 0.78);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #eaf8ff);
  box-shadow: 0 24px 52px rgba(27, 70, 118, 0.3), inset 0 0 0 5px rgba(255, 255, 255, 0.46);
}

.reward-kicker {
  color: #4c9ed4;
}

.reward-card h2 {
  color: var(--wf-ink);
  font-size: 22px;
}

.reward-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  width: 74px;
  height: 74px;
  background: url("assets/ui/word-flash/new-badge.png") center / contain no-repeat;
  transform: rotate(-8deg);
  pointer-events: none;
}

.modal-close {
  border: 1px solid rgba(91, 151, 211, 0.7);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 16px rgba(51, 102, 156, 0.18);
}

.postcard {
  border: 1px solid rgba(95, 154, 207, 0.72);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(226, 247, 255, 0.96), rgba(255, 248, 217, 0.9));
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.52);
}

.postcard-image {
  border: 1px solid rgba(103, 162, 213, 0.62);
  border-radius: 16px;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 223, 116, 0.48) 0 30px, transparent 31px),
    linear-gradient(180deg, #b8e9ff, #effcff 66%, #aee196);
}

.postcard-info span {
  border: 0;
  background: #d8f5ff;
  color: #377cac;
}

.postcard-info p {
  color: #4c6c8c;
}

@media (max-width: 1080px) {
  .flash-topbar {
    grid-template-columns: auto minmax(150px, 1fr) minmax(230px, 1fr);
  }

  .flash-tools {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .flash-board {
    grid-template-columns: 1fr;
  }

  .flash-reward-column {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    grid-template-rows: auto;
  }

  .postcard-preview {
    min-height: 190px;
  }
}

@media (max-width: 760px) {
  .flash-app {
    padding: 8px 8px calc(78px + env(safe-area-inset-bottom));
  }

  .flash-shell,
  .flash-phone {
    min-height: auto;
    border-radius: 18px;
    padding: 10px;
  }

  .flash-topbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .flash-title {
    min-width: 0;
  }

  .flash-top-meta,
  .flash-tools {
    grid-column: 1 / -1;
  }

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

  .flash-back {
    justify-self: start;
  }

  .flash-top-meta {
    grid-template-columns: 1fr auto;
  }

  .flash-status {
    gap: 8px;
  }

  .status-goal {
    grid-column: 1 / -1;
  }

  .status-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .status-pill {
    justify-content: space-between;
  }

  .status-pill.pending,
  .status-pill.mastered {
    grid-row: 3;
  }

  .flash-stage {
    padding: 10px;
  }

  .swipe-zone {
    min-height: 410px;
  }

  .word-card {
    width: 100%;
    min-height: 390px;
    grid-template-rows: 190px auto;
    border-radius: 18px;
  }

  .pixel-art {
    width: 150px;
    height: 150px;
  }

  .word-line h2 {
    font-size: var(--word-size, 42px);
  }

  .meaning {
    font-size: 28px;
  }

  .swipe-hints {
    grid-template-columns: 1fr 1fr;
  }

  .judge-button {
    min-height: 56px;
    padding: 8px 10px;
    font-size: 17px;
  }

  .judge-button img {
    width: 34px;
    height: 34px;
  }

  .flash-reward-column {
    grid-template-columns: 1fr;
  }

  .postcard-preview {
    min-height: 170px;
  }

  .postcard-preview img {
    width: min(56%, 190px);
  }

  .gesture-tip {
    display: none;
  }
}

@media (max-width: 430px) {
  .flash-title h1 {
    font-size: 22px;
  }

  .flash-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .flash-small-button {
    padding: 7px 8px;
  }

  .deck-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .swipe-zone {
    min-height: 390px;
  }

  .word-card {
    min-height: 374px;
    grid-template-rows: 168px auto;
  }

  .example-box {
    padding: 9px 10px;
  }

  .example-box p {
    font-size: 14px;
  }

  .swipe-hints {
    gap: 8px;
  }

  .judge-button {
    gap: 6px;
    font-size: 15px;
  }
}

/* Reward postcard reveal system */
.postcard-progress {
  align-content: start;
}

.postcard-preview {
  min-height: clamp(230px, 31vh, 360px);
  background:
    radial-gradient(circle at 20% 14%, rgba(255, 255, 255, 0.72) 0 42px, transparent 43px),
    radial-gradient(circle at 82% 18%, rgba(255, 226, 142, 0.34) 0 42px, transparent 43px),
    linear-gradient(180deg, rgba(179, 231, 255, 0.72), rgba(238, 251, 255, 0.56) 60%, rgba(166, 222, 143, 0.46));
}

.postcard-preview img[src*="reward-card-back"] {
  width: min(78%, 300px);
  max-height: 92%;
}

.postcard-spark {
  background-image: url("assets/ui/word-flash/reward-flash.png");
  opacity: 0.72;
  mix-blend-mode: screen;
}

.reward-postcard-dialog {
  width: min(520px, 94vw);
  padding: clamp(16px, 2.2vw, 24px);
  overflow: visible;
  animation: rewardCardFlyIn 0.52s cubic-bezier(0.22, 1.28, 0.36, 1) both;
}

.reward-postcard-dialog::before {
  opacity: 0;
  transform: translateY(8px) rotate(-8deg) scale(0.8);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.reward-modal.is-revealed .reward-postcard-dialog::before {
  opacity: 1;
  transform: translateY(0) rotate(-8deg) scale(1);
  transition-delay: 0.72s;
}

@keyframes rewardCardFlyIn {
  0% {
    opacity: 0;
    transform: translateY(72px) scale(0.7);
  }
  72% {
    opacity: 1;
    transform: translateY(-8px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.postcard-flip-stage {
  position: relative;
  width: min(70vw, 360px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  perspective: 1100px;
  display: grid;
  place-items: center;
}

.postcard-flip-stage::after {
  content: none;
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  background: url("assets/ui/word-flash/reward-card-front.png") center / contain no-repeat;
  opacity: 0;
  pointer-events: none;
  transform: rotateY(90deg) scale(0.98);
  transform-style: preserve-3d;
}

.postcard-flip-stage:focus-visible {
  outline: 3px solid rgba(255, 205, 90, 0.85);
  outline-offset: 4px;
  border-radius: 24px;
}

.postcard-flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  transform-style: preserve-3d;
  transition: transform 0.82s cubic-bezier(0.2, 0.72, 0.2, 1);
  filter: drop-shadow(0 22px 24px rgba(33, 83, 131, 0.26));
}

.reward-modal.is-ready .postcard-flip-card {
  animation: rewardCardIdle 1.4s ease-in-out infinite;
}

.reward-modal.is-revealed .postcard-flip-card {
  transform: rotateY(180deg);
}

@keyframes rewardCardIdle {
  0%,
  100% {
    transform: translateY(0) rotateZ(0deg);
  }
  50% {
    transform: translateY(-5px) rotateZ(0.8deg);
  }
}

.postcard-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.postcard-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.postcard-face-front {
  transform: rotateY(180deg);
}

.postcard-face-front::before {
  content: "";
  position: absolute;
  left: 13.5%;
  top: 14.5%;
  z-index: 2;
  width: 73%;
  height: 62%;
  border-radius: 12%;
  background:
    radial-gradient(circle at 23% 22%, rgba(255, 255, 255, 0.78) 0 13%, transparent 14%),
    radial-gradient(circle at 74% 27%, rgba(255, 255, 255, 0.62) 0 10%, transparent 11%),
    linear-gradient(180deg, #aee4ff 0%, #eaf9ff 56%, #96dc7f 57%, #73c960 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.52);
  pointer-events: none;
}

.postcard-front-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.postcard-pet-image {
  position: absolute;
  left: 15%;
  top: 17%;
  z-index: 5;
  width: 70% !important;
  height: 58% !important;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 9px rgba(41, 90, 133, 0.25));
}

.postcard-face-front .postcard-pet-image {
  display: block;
}

.postcard-front-name {
  min-width: 0;
  color: #234d86;
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.postcard-stage-pet-scene {
  position: absolute;
  left: 11.8%;
  top: 13.6%;
  z-index: 4;
  width: 76.4%;
  height: 62.8%;
  border-radius: 12%;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 23% 22%, rgba(255, 255, 255, 0.78) 0 13%, transparent 14%),
    radial-gradient(circle at 74% 27%, rgba(255, 255, 255, 0.62) 0 10%, transparent 11%),
    linear-gradient(180deg, #aee4ff 0%, #eaf9ff 56%, #96dc7f 57%, #73c960 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.52);
  transition: opacity 0.16s ease 0.52s;
}

.postcard-stage-pet-image {
  position: absolute;
  left: -4%;
  top: -1%;
  width: 108%;
  height: 92%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 9px rgba(41, 90, 133, 0.25));
}

.postcard-stage-caption {
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  bottom: 5.4%;
  z-index: 6;
  display: grid;
  gap: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease 0.54s, transform 0.18s ease 0.54s;
  transform: translateY(4px);
}

.postcard-stage-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.postcard-stage-attr {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: #2a70bb;
  font-size: clamp(10px, 1.5vw, 13px);
  font-weight: 900;
  line-height: 1;
  border: 1px solid rgba(95, 159, 223, 0.48);
  border-radius: 999px;
  background: rgba(224, 245, 255, 0.92);
}

.postcard-stage-line {
  display: block;
  min-height: 2.15em;
  padding: 3px 6px;
  color: #2875c6;
  font-size: clamp(10px, 1.7vw, 14px);
  font-weight: 900;
  line-height: 1.18;
  text-align: center;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(236, 249, 255, 0.84);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.reward-postcard-dialog .postcard-info {
  display: none !important;
}

.reward-modal.is-revealed .postcard-stage-pet-scene,
.reward-modal.is-direct .postcard-stage-pet-scene {
  opacity: 1;
}

.reward-modal.is-revealed .postcard-stage-caption,
.reward-modal.is-direct .postcard-stage-caption {
  opacity: 1;
  transform: translateY(0);
}

.reward-modal.is-direct .postcard-stage-pet-scene {
  transition: none;
}

.reward-modal.is-direct .postcard-stage-caption {
  transition: none;
}

.reward-flash,
.reward-shards {
  position: absolute;
  inset: 0;
  z-index: 5;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  opacity: 0;
}

.reward-flash {
  background-image: url("assets/ui/word-flash/reward-flash.png");
  mix-blend-mode: screen;
}

.reward-shards {
  background-image: url("assets/ui/word-flash/reward-shards.png");
}

.reward-modal.is-revealed .reward-flash {
  animation: rewardFlashPop 0.64s ease 0.32s both;
}

.reward-modal.is-bursting .reward-shards {
  animation: rewardShardBurst 1.05s ease-out both;
}

@keyframes rewardFlashPop {
  0% {
    opacity: 0;
    transform: scale(0.38) rotate(0deg);
  }
  42% {
    opacity: 1;
    transform: scale(1.18) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.52) rotate(18deg);
  }
}

@keyframes rewardShardBurst {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.35) rotate(16deg);
  }
}

.reward-postcard-dialog .postcard-info,
.reward-actions {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.reward-modal.is-revealed .reward-postcard-dialog .postcard-info,
.reward-modal.is-revealed .reward-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.28s ease 0.72s, transform 0.28s ease 0.72s;
}

.reward-postcard-dialog .postcard-info {
  display: grid;
  gap: 6px;
}

.reward-postcard-dialog .postcard-head strong {
  color: var(--wf-ink);
  font-size: clamp(18px, 2.6vw, 24px);
}

.reward-postcard-dialog .postcard-info p {
  color: #5a7897;
  font-size: 14px;
}

.reward-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reward-actions .secondary-action,
.reward-actions .primary-action {
  min-height: 44px;
  border: 1px solid rgba(91, 151, 211, 0.72);
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(54, 111, 166, 0.16);
}

.reward-actions .secondary-action {
  background: linear-gradient(180deg, #ffffff, #e6f7ff);
}

.reward-actions .primary-action {
  background: linear-gradient(180deg, #fff2bf, #ffc86b);
}

@media (max-width: 1080px) {
  .postcard-flip-stage {
    width: min(70vw, 320px);
  }
}

@media (max-width: 760px) {
  .postcard-flip-stage {
    width: min(68vw, 300px);
  }

  .reward-postcard-dialog {
    width: min(94vw, 390px);
  }

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

/* Keep reward cards fully visible in every reward surface. */
.postcard-progress .postcard-preview {
  min-height: clamp(330px, 42vh, 430px);
  padding: clamp(16px, 2vw, 22px);
  overflow: visible;
  align-items: center;
}

.postcard-progress .postcard-preview img[src*="reward-card-back"] {
  width: min(100%, 340px);
  height: auto;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.postcard-flip-stage {
  width: min(76vw, 380px);
  max-width: 100%;
  overflow: visible;
}

.postcard-flip-card,
.postcard-face,
.postcard-face img {
  overflow: visible;
}

@media (max-width: 1080px) {
  .postcard-progress .postcard-preview {
    min-height: clamp(280px, 34vh, 360px);
  }

  .postcard-progress .postcard-preview img[src*="reward-card-back"] {
    width: min(100%, 320px);
  }

  .postcard-flip-stage {
    width: min(72vw, 330px);
  }
}

@media (max-width: 760px) {
  .postcard-progress .postcard-preview {
    min-height: clamp(260px, 42vh, 340px);
    padding: 18px;
  }

  .postcard-progress .postcard-preview img[src*="reward-card-back"] {
    width: min(68vw, 280px);
    max-width: 100%;
  }

  .postcard-flip-stage {
    width: min(70vw, 300px);
  }
}

@media (max-width: 430px) {
  .postcard-progress .postcard-preview {
    min-height: 300px;
  }

  .postcard-progress .postcard-preview img[src*="reward-card-back"] {
    width: min(70vw, 260px);
  }
}

/* Make the reward flip explicit after click so the front card always appears. */
.reward-modal.is-revealed .postcard-flip-card {
  animation: rewardFlipToFront 0.82s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.reward-modal.is-revealed .postcard-face-back {
  opacity: 0;
  transition: opacity 0.01s linear 0.42s;
}

.reward-modal.is-revealed .postcard-face-front {
  opacity: 1;
  z-index: 4;
}

.reward-modal.is-revealed .postcard-flip-stage::after {
  animation: none !important;
}

.reward-modal:not(.is-revealed) .postcard-face-front {
  opacity: 0;
}

@keyframes rewardFlipToFront {
  0% {
    transform: rotateY(0deg) scale(1);
  }
  48% {
    transform: rotateY(90deg) scale(1.04);
  }
  100% {
    transform: rotateY(180deg) scale(1);
  }
}

@keyframes rewardFrontCardAppear {
  0% {
    opacity: 0;
    transform: rotateY(90deg) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
  }
}

/* Final cloud kingdom background lock for Word Flash. */
body:has(.flash-app),
body {
  background:
    linear-gradient(180deg, rgba(224, 246, 255, 0.04), rgba(222, 243, 255, 0.1)),
    url("assets/ui/word-flash/word-flash-cloud-bg-portrait.png") center center / cover fixed no-repeat,
    #cfeeff !important;
}

.flash-app {
  background:
    linear-gradient(180deg, rgba(224, 246, 255, 0.02), rgba(222, 243, 255, 0.08)),
    url("assets/ui/word-flash/word-flash-cloud-bg-portrait.png") center center / cover fixed no-repeat !important;
}

.flash-shell,
.flash-phone {
  border-color: rgba(98, 163, 220, 0.55) !important;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.2) 0 42px, transparent 43px),
    radial-gradient(circle at 86% 14%, rgba(255, 234, 169, 0.12) 0 52px, transparent 53px),
    linear-gradient(180deg, rgba(235, 250, 255, 0.22), rgba(217, 241, 255, 0.16)) !important;
  box-shadow:
    0 22px 48px rgba(56, 111, 161, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.36) !important;
  backdrop-filter: blur(1px) saturate(1.02) !important;
}

.flash-topbar,
.flash-status,
.flash-stage,
.postcard-progress,
.postcard-collection {
  border-color: rgba(91, 154, 211, 0.66) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(225, 246, 255, 0.32)) !important;
  box-shadow:
    0 16px 32px rgba(47, 104, 160, 0.14),
    inset 0 0 0 3px rgba(255, 255, 255, 0.16) !important;
  backdrop-filter: blur(1.5px) saturate(1.04) !important;
}

.flash-stage {
  background:
    linear-gradient(180deg, rgba(250, 254, 255, 0.46), rgba(226, 246, 255, 0.24)) !important;
}

.postcard-progress,
.postcard-collection {
  background:
    linear-gradient(180deg, rgba(250, 254, 255, 0.46), rgba(226, 246, 255, 0.26)) !important;
}

.word-card,
.example-box,
.judge-button,
.postcard-preview,
.postcard-collection-toggle,
.mini-postcard,
.deck-chip,
.flash-back,
.flash-small-button,
.status-pill {
  background-color: rgba(255, 255, 255, 0.94) !important;
}

.word-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(241, 250, 255, 0.95)) !important;
}

.postcard-preview {
  background:
    radial-gradient(circle at 20% 14%, rgba(255, 255, 255, 0.64) 0 42px, transparent 43px),
    radial-gradient(circle at 82% 18%, rgba(255, 226, 142, 0.28) 0 42px, transparent 43px),
    linear-gradient(180deg, rgba(179, 231, 255, 0.62), rgba(238, 251, 255, 0.4) 60%, rgba(166, 222, 143, 0.42)) !important;
}

.postcard-collection-toggle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(225, 246, 255, 0.68)) !important;
}

@media (max-width: 1100px) {
  body:has(.flash-app),
  body,
  .flash-app {
    background:
      linear-gradient(180deg, rgba(224, 246, 255, 0.04), rgba(222, 243, 255, 0.1)),
      url("assets/ui/word-flash/word-flash-cloud-bg-portrait.png") center center / cover fixed no-repeat,
      #cfeeff !important;
  }
}

@media (max-width: 620px) {
  body:has(.flash-app),
  body,
  .flash-app {
    background:
      linear-gradient(180deg, rgba(224, 246, 255, 0.04), rgba(222, 243, 255, 0.1)),
      url("assets/ui/word-flash/word-flash-cloud-bg-portrait.png") center center / cover scroll no-repeat,
      #cfeeff !important;
  }

  .flash-shell,
  .flash-phone,
  .flash-topbar,
  .flash-status,
  .flash-stage,
  .postcard-progress,
  .postcard-collection {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(225, 246, 255, 0.38)) !important;
  }
}

/* Final portrait-background and full postcard fit pass. */
.postcard-progress .postcard-preview {
  min-height: clamp(390px, 52vh, 520px) !important;
  overflow: visible !important;
}

.postcard-progress .postcard-preview img[src*="reward-card-back"] {
  width: min(100%, 300px) !important;
  aspect-ratio: 512 / 672 !important;
  max-height: none !important;
  object-fit: contain !important;
}

.postcard-flip-stage {
  width: min(76vw, 340px) !important;
  aspect-ratio: 512 / 672 !important;
}

.postcard-flip-stage::after,
.postcard-flip-card,
.postcard-face,
.postcard-face img {
  aspect-ratio: 512 / 672 !important;
}

.postcard-face img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

@media (max-width: 1080px) {
  .postcard-progress .postcard-preview {
    min-height: clamp(340px, 42vh, 450px) !important;
  }

  .postcard-progress .postcard-preview img[src*="reward-card-back"] {
    width: min(100%, 270px) !important;
  }

  .postcard-flip-stage {
    width: min(72vw, 310px) !important;
  }
}

@media (max-width: 760px) {
  .postcard-progress .postcard-preview {
    min-height: clamp(310px, 48vh, 390px) !important;
  }

  .postcard-progress .postcard-preview img[src*="reward-card-back"] {
    width: min(66vw, 240px) !important;
  }

  .postcard-flip-stage {
    width: min(72vw, 280px) !important;
  }
}

@media (max-width: 430px) {
  .postcard-progress .postcard-preview {
    min-height: 330px !important;
  }

  .postcard-progress .postcard-preview img[src*="reward-card-back"] {
    width: min(64vw, 220px) !important;
  }
}

/* Direct postcard view from collection: no flip, show the selected catalog pet immediately. */
.reward-modal.is-direct .reward-postcard-dialog {
  animation: none !important;
}

.reward-modal.is-direct .postcard-flip-card {
  animation: none !important;
  transition: none !important;
  transform: rotateY(180deg) !important;
}

.reward-modal.is-direct .reward-flash,
.reward-modal.is-direct .reward-shards,
.reward-modal.is-direct .reward-confetti {
  display: none !important;
  animation: none !important;
}

.reward-modal.is-direct .reward-postcard-dialog .postcard-info,
.reward-modal.is-direct .reward-actions {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  transition: none !important;
}

/* Absolute final settings popover layer fix for Word Flash. */
.flash-app,
.flash-shell,
.flash-phone,
.flash-topbar,
.flash-tools,
.flash-settings {
  overflow: visible !important;
}

.flash-topbar {
  position: relative !important;
  z-index: 8200 !important;
}

.flash-status,
.flash-stage,
.flash-reward-column,
.postcard-progress,
.postcard-collection {
  position: relative !important;
  z-index: 1 !important;
}

.flash-settings,
.flash-settings[open] {
  position: relative !important;
  z-index: 9000 !important;
}

.flash-settings-menu,
.flash-settings[open] .flash-settings-menu {
  position: absolute !important;
  top: calc(100% + 9px) !important;
  right: 0 !important;
  z-index: 9200 !important;
  display: grid !important;
  gap: 8px !important;
  width: min(320px, calc(100vw - 28px)) !important;
  min-width: 220px !important;
  max-height: min(68vh, 540px) !important;
  overflow: auto !important;
  padding: 12px !important;
  border: 2px solid rgba(88, 151, 210, 0.78) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(248, 253, 255, 0.99), rgba(229, 247, 255, 0.97)) !important;
  box-shadow: 0 18px 34px rgba(38, 88, 145, 0.22) !important;
}

.flash-settings-menu .settings-action {
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

/* Shared learning-game background: Word Flash. */
body:has(.flash-app),
body {
  background:
    linear-gradient(180deg, rgba(160, 222, 255, 0.18), rgba(255, 255, 255, 0.06)),
    url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover fixed no-repeat,
    #bdeeff !important;
}

.flash-app {
  background:
    linear-gradient(180deg, rgba(160, 222, 255, 0.18), rgba(255, 255, 255, 0.06)),
    url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover fixed no-repeat !important;
}

@media (max-width: 720px) {
  body:has(.flash-app),
  body,
  .flash-app {
    background:
      linear-gradient(180deg, rgba(160, 222, 255, 0.16), rgba(255, 255, 255, 0.04)),
      url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover scroll no-repeat,
      #bdeeff !important;
  }
}

/* Lingo Quest word page migration v1: align with the homepage visual system. */
html:has(.flash-app),
body:has(.flash-app) {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body:has(.flash-app) {
  color: var(--lq-ink, #17345f);
  font-family: var(--lq-font-sans, "Inter", "Noto Sans SC", system-ui, sans-serif);
  background:
    linear-gradient(180deg, rgba(160, 222, 255, 0.16), rgba(255, 255, 255, 0.06)),
    url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover fixed no-repeat,
    #bdeeff !important;
}

body:has(.flash-app),
body:has(.flash-app) * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.flash-app {
  width: 100%;
  min-height: 100vh;
  padding: 16px 18px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  background:
    linear-gradient(180deg, rgba(160, 222, 255, 0.14), rgba(255, 255, 255, 0.04)),
    url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover fixed no-repeat !important;
}

.flash-shell,
.flash-phone {
  width: min(1120px, calc(100vw - 36px)) !important;
  min-height: auto !important;
  margin: 0 auto !important;
  padding: 16px !important;
  display: grid !important;
  grid-template-rows: auto auto auto minmax(0, 1fr) !important;
  gap: 12px !important;
  border: 2px solid rgba(143, 193, 244, 0.82) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 18px 34px rgba(38, 88, 145, 0.16) !important;
  overflow: visible !important;
  backdrop-filter: blur(1.5px) saturate(1.05);
}

.flash-topbar {
  min-height: 78px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, auto) auto !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  color: var(--lq-ink, #17345f) !important;
  border: 2px solid var(--lq-blue-300, #8fc1f4) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.84) !important;
  box-shadow: var(--lq-shadow-soft, 0 8px 18px rgba(65, 129, 196, 0.14)) !important;
}

.flash-back {
  width: auto !important;
  min-width: 58px !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  box-shadow: var(--lq-shadow-soft, 0 8px 18px rgba(65, 129, 196, 0.14)) !important;
}

.flash-title h1 {
  color: var(--lq-ink, #17345f) !important;
  font-size: clamp(22px, 2vw, 28px) !important;
}

.flash-title p {
  color: var(--lq-muted, #5f789d) !important;
}

.deck-chip,
.flash-top-meta strong,
.flash-small-button,
.flash-settings summary {
  border: 2px solid rgba(143, 193, 244, 0.82) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #ffffff, #eef9ff) !important;
  color: var(--lq-ink, #17345f) !important;
  box-shadow: var(--lq-shadow-soft, 0 8px 18px rgba(65, 129, 196, 0.14)) !important;
}

.flash-top-meta {
  width: min(360px, 34vw) !important;
}

.flash-top-meta strong {
  background: linear-gradient(180deg, #fff2bf, #ffc24b) !important;
  color: #5b3908 !important;
}

.flash-tools {
  flex-wrap: nowrap !important;
}

.flash-status,
.deck-panel,
.flash-stage,
.postcard-progress,
.postcard-collection {
  border: 2px solid rgba(143, 193, 244, 0.82) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.84) !important;
  box-shadow: var(--lq-shadow-soft, 0 8px 18px rgba(65, 129, 196, 0.14)) !important;
}

.flash-status {
  grid-template-columns: auto auto minmax(120px, 1fr) auto !important;
  padding: 10px 12px !important;
}

.status-track,
.reward-track {
  border: 2px solid rgba(143, 193, 244, 0.72) !important;
  background: rgba(224, 240, 255, 0.88) !important;
}

.flash-board {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

.flash-stage {
  min-height: 0 !important;
  padding: 14px !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: 10px !important;
}

.deck-title-row {
  color: var(--lq-ink, #17345f) !important;
}

.swipe-zone {
  min-height: 430px !important;
}

.word-card {
  width: min(330px, 94%) !important;
  min-height: 408px !important;
  grid-template-rows: 210px 1fr !important;
  border: 2px solid rgba(143, 193, 244, 0.9) !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 32px rgba(38, 88, 145, 0.18) !important;
  transform: rotate(-2deg) !important;
}

.swipe-zone {
  overflow: hidden !important;
}

.word-card.fly-left {
  transform: translateX(-125%) rotate(-8deg) !important;
  opacity: 0 !important;
}

.word-card.fly-right {
  transform: translateX(125%) rotate(8deg) !important;
  opacity: 0 !important;
}

.word-card.entering {
  animation: cardEnterRpg 0.24s ease both !important;
}

.pixel-frame,
.example-box {
  border: 2px solid rgba(143, 193, 244, 0.82) !important;
  border-radius: 18px !important;
}

.word-line h2 {
  color: var(--lq-ink, #17345f) !important;
  font-size: var(--word-size, clamp(38px, 4.4vw, 58px)) !important;
}

.meaning {
  color: var(--lq-ink, #17345f) !important;
}

.swipe-hints {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  color: var(--lq-ink, #17345f) !important;
}

.judge-button {
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 2px solid rgba(143, 193, 244, 0.82) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #ffffff, #eef9ff) !important;
  box-shadow: var(--lq-shadow-soft, 0 8px 18px rgba(65, 129, 196, 0.14)) !important;
}

.judge-button.mastered {
  background: linear-gradient(180deg, #fff2bf, #ffc24b) !important;
}

.judge-button span {
  display: inline !important;
  color: var(--lq-ink, #17345f) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.flash-reward-column {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  min-height: 0 !important;
}

.postcard-progress {
  min-height: 0 !important;
  padding: 12px !important;
}

.postcard-progress .postcard-preview {
  min-height: 260px !important;
  border: 2px solid rgba(143, 193, 244, 0.72) !important;
  border-radius: 20px !important;
}

.postcard-progress .postcard-preview img[src*="reward-card-back"] {
  width: min(100%, 190px) !important;
}

.postcard-text {
  display: grid !important;
  gap: 4px !important;
}

.postcard-collection-toggle {
  min-height: 58px !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #ffffff, #eef9ff) !important;
}

.postcard-collection.is-open {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

.postcard-collection.is-open .postcard-collection-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  max-height: min(360px, 46vh) !important;
  overflow: auto !important;
}

.postcard-collection.is-open .mini-postcard {
  display: grid !important;
  place-items: center !important;
  gap: 6px !important;
  min-height: 118px !important;
  padding: 10px 6px !important;
}

.postcard-collection.is-open .mini-postcard img {
  display: block !important;
  width: 72px !important;
  height: 72px !important;
  object-fit: contain !important;
}

.postcard-collection.is-open .mini-postcard strong {
  max-width: 100% !important;
  text-align: center !important;
}

.mini-postcard-empty {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  padding: 14px !important;
  color: var(--lq-muted, #5d7390) !important;
  font-weight: 800 !important;
  text-align: center !important;
}

@media (min-width: 1180px) {
  .flash-shell,
  .flash-phone {
    width: min(1120px, calc(100vw - 36px)) !important;
  }

  .flash-board {
    grid-template-columns: minmax(0, 760px) 300px !important;
  }
}

@media (min-width: 721px) and (max-width: 1179px) {
  .flash-app {
    padding: 14px 16px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .flash-shell,
  .flash-phone {
    width: min(736px, calc(100vw - 32px)) !important;
  }

  .flash-topbar {
    grid-template-columns: auto minmax(140px, 0.7fr) minmax(230px, 1fr) auto !important;
    min-height: 84px !important;
    padding: 10px 12px !important;
  }

  .flash-top-meta {
    width: auto !important;
    grid-column: auto !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .flash-tools {
    grid-column: auto !important;
    gap: 6px !important;
    justify-self: end !important;
  }

  .flash-small-button {
    padding-right: 10px !important;
    padding-left: 10px !important;
  }

  .flash-board {
    grid-template-columns: 1fr !important;
  }

  .swipe-zone {
    min-height: 410px !important;
  }

  .flash-reward-column {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.85fr) !important;
    grid-template-rows: auto !important;
  }

  .postcard-progress,
  .postcard-collection {
    min-height: 138px !important;
    max-height: 138px !important;
    overflow: hidden !important;
  }

  .postcard-progress .postcard-preview {
    min-height: 58px !important;
    height: 58px !important;
  }

  .postcard-progress .postcard-preview img[src*="reward-card-back"] {
    width: min(100%, 44px) !important;
  }

  .postcard-collection-toggle {
    min-height: 70px !important;
  }

  .postcard-collection.is-open {
    max-height: none !important;
    overflow: visible !important;
  }

  .postcard-collection.is-open .postcard-collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    max-height: 240px !important;
  }
}

@media (max-width: 720px) {
  html:has(.flash-app),
  body:has(.flash-app) {
    overflow-x: hidden !important;
  }

  body:has(.flash-app) {
    background-attachment: scroll !important;
  }

  .flash-app {
    padding: 10px 10px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    background:
      linear-gradient(180deg, rgba(160, 222, 255, 0.14), rgba(255, 255, 255, 0.04)),
      url("assets/ui/cloud-kingdom-game-bg.png") center bottom / cover scroll no-repeat !important;
  }

  .flash-shell,
  .flash-phone {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    padding: 10px !important;
    gap: 8px !important;
    border-radius: 22px !important;
  }

  .flash-topbar {
    min-height: auto !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: 9px !important;
    border-radius: 20px !important;
  }

  .flash-back {
    min-width: 44px !important;
    width: 44px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
  }

  .flash-back::before {
    content: "<";
    font-size: 20px;
    line-height: 1;
  }

  .flash-back {
    width: auto !important;
    min-width: 58px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    font-weight: 950 !important;
  }

  .flash-back::before {
    display: none !important;
    content: none !important;
  }

  .flash-title h1 {
    font-size: 20px !important;
  }

  .flash-title p {
    font-size: 11px !important;
  }

  .flash-top-meta {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px !important;
  }

  .deck-chip,
  .flash-top-meta strong {
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
  }

  .flash-tools {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
  }

  .flash-small-button {
    min-height: 36px !important;
    padding: 5px 8px !important;
    font-size: 12px !important;
  }

  .flash-sound-toggle span:not(.flash-sound-icon) {
    display: none !important;
  }

  .flash-settings summary {
    width: 38px !important;
    height: 38px !important;
    border-radius: 13px !important;
  }

  .flash-status {
    grid-template-columns: 1fr auto auto !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    border-radius: 18px !important;
  }

  .status-goal {
    grid-column: 1 / -1 !important;
    justify-content: space-between !important;
    font-size: 12px !important;
  }

  .status-track {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    min-height: 8px !important;
  }

  .status-pill {
    min-height: 32px !important;
    padding: 5px 8px !important;
  }

  .status-pill span,
  .status-goal span,
  .status-goal strong {
    font-size: 12px !important;
  }

  .status-pill strong {
    font-size: 15px !important;
  }

  .flash-board {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .flash-stage {
    padding: 9px !important;
    gap: 7px !important;
    border-radius: 20px !important;
  }

  .deck-title-row {
    gap: 8px !important;
  }

  .deck-title-row span {
    font-size: 15px !important;
  }

  .deck-title-row strong {
    font-size: 11px !important;
  }

  .swipe-zone {
    min-height: 266px !important;
  }

  .word-card {
    width: min(270px, 94%) !important;
    min-height: 254px !important;
    grid-template-rows: 104px 1fr !important;
    padding: 7px !important;
    border-radius: 18px !important;
    transform: rotate(-1deg) !important;
  }

  .pixel-art {
    width: 92px !important;
    height: 92px !important;
  }

  .word-content {
    gap: 3px !important;
    padding-top: 8px !important;
  }

  .word-line h2 {
    font-size: var(--word-size, 28px) !important;
  }

  .meaning {
    font-size: 18px !important;
  }

  .example-box {
    padding: 6px !important;
    gap: 2px !important;
  }

  .example-box p {
    font-size: 11px !important;
  }

  .example-box span {
    font-size: 10px !important;
  }

  .gesture-tip {
    display: none !important;
  }

  .swipe-hints {
    gap: 8px !important;
  }

  .judge-button {
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 16px !important;
  }

  .judge-button span {
    font-size: 14px !important;
  }

  .flash-reward-column {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 8px !important;
  }

  .postcard-progress {
    min-height: auto !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px !important;
    border-radius: 18px !important;
  }

  .postcard-progress .postcard-preview {
    min-height: 44px !important;
    height: 44px !important;
    padding: 3px !important;
    border-radius: 14px !important;
  }

  .postcard-progress .postcard-preview img[src*="reward-card-back"] {
    width: 30px !important;
  }

  .postcard-text {
    min-width: 0 !important;
  }

  .postcard-text strong {
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  .postcard-text span {
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .reward-track {
    grid-column: 1 / -1 !important;
    min-height: 8px !important;
  }

  .postcard-collection-toggle {
    min-height: 64px !important;
    height: 100% !important;
    padding: 6px 8px !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    justify-items: start !important;
    align-content: center !important;
  }

  .postcard-collection-toggle img {
    width: 30px !important;
    height: 30px !important;
    grid-row: 1 / span 2 !important;
  }

  .postcard-collection-toggle strong {
    font-size: 12px !important;
  }

  .postcard-collection-toggle span {
    font-size: 10px !important;
  }
}

@media (max-width: 390px) {
  .word-card {
    min-height: 248px !important;
    grid-template-rows: 100px 1fr !important;
  }

  .swipe-zone {
    min-height: 260px !important;
  }
}

/* Mobile collection expansion: keep postcard thumbnails in a full-width panel. */
@media (max-width: 720px) {
  .postcard-collection.is-open {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .postcard-collection.is-open .postcard-collection-toggle {
    height: auto !important;
    min-height: 58px !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    align-content: center !important;
  }

  .postcard-collection.is-open .postcard-collection-grid {
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    max-height: min(280px, 38vh) !important;
    margin-top: 8px !important;
    padding: 8px !important;
    overflow: auto !important;
    overscroll-behavior: contain !important;
  }

  .postcard-collection.is-open .mini-postcard {
    min-width: 0 !important;
    min-height: 112px !important;
    padding: 8px 6px !important;
    border-radius: 16px !important;
  }

  .postcard-collection.is-open .mini-postcard img {
    width: 66px !important;
    height: 66px !important;
  }

  .postcard-collection.is-open .mini-postcard strong {
    font-size: 11px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

/* Word Flash polish v2: unified tool buttons and tidy tablet postcard layout. */
.flash-tools {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
}

.flash-tools .flash-small-button,
.flash-settings summary {
  width: 48px !important;
  height: 44px !important;
  min-width: 48px !important;
  min-height: 44px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 2px solid #9ecbf7 !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #ffffff, #eef9ff) !important;
  box-shadow: 0 6px 14px rgba(65, 129, 196, 0.13) !important;
  color: var(--lq-ink, #17345f) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.flash-tools .flash-small-button:not(.flash-sound-toggle) {
  width: 58px !important;
  min-width: 58px !important;
}

.flash-sound-toggle {
  gap: 0 !important;
}

.flash-sound-toggle span:not(.flash-sound-icon) {
  display: none !important;
}

.flash-sound-icon {
  width: 26px !important;
  height: 26px !important;
}

.flash-settings summary img {
  width: 25px !important;
  height: 25px !important;
}

@media (min-width: 721px) and (max-width: 1179px) {
  .postcard-progress {
    grid-template-columns: 76px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 8px 12px !important;
    padding: 12px !important;
  }

  .postcard-progress .postcard-preview {
    grid-row: 1 / span 2 !important;
    min-height: 86px !important;
    height: 86px !important;
    padding: 6px !important;
    overflow: hidden !important;
  }

  .postcard-progress .postcard-preview img[src*="reward-card-back"] {
    width: 52px !important;
    max-height: 74px !important;
  }

  .postcard-text {
    align-self: end !important;
    min-width: 0 !important;
    gap: 3px !important;
  }

  .postcard-text strong {
    font-size: 17px !important;
    line-height: 1.12 !important;
    white-space: normal !important;
  }

  .postcard-text span {
    font-size: 12px !important;
    line-height: 1.15 !important;
  }

  .postcard-progress .reward-track {
    grid-column: 2 !important;
    min-height: 10px !important;
    align-self: start !important;
  }
}

@media (max-width: 720px) {
  .flash-tools {
    gap: 5px !important;
  }

  .flash-tools .flash-small-button,
  .flash-settings summary {
    width: 40px !important;
    height: 38px !important;
    min-width: 40px !important;
    min-height: 38px !important;
    border-radius: 15px !important;
  }

  .flash-tools .flash-small-button:not(.flash-sound-toggle) {
    width: 52px !important;
    min-width: 52px !important;
    font-size: 13px !important;
  }

  .flash-sound-icon {
    width: 23px !important;
    height: 23px !important;
  }

  .flash-settings summary img {
    width: 23px !important;
    height: 23px !important;
  }
}

/* Unified sound toggle state: blue when on, gray when muted. */
.flash-sound-toggle .flash-sound-icon {
  filter: none !important;
}

.flash-sound-toggle.is-muted .flash-sound-icon {
  filter: grayscale(1) saturate(0) opacity(0.58) !important;
}

/* Mobile reward cards: stack progress and collection vertically by default. */
@media (max-width: 720px) {
  .flash-reward-column {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .postcard-progress,
  .postcard-collection {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
  }

  .postcard-progress {
    min-height: 82px !important;
  }

  .postcard-collection {
    min-height: 72px !important;
    overflow: visible !important;
  }

  .postcard-collection-toggle {
    height: auto !important;
    min-height: 72px !important;
  }
}

