:root {
  --ink: #183d45;
  --ink-soft: #567078;
  --paper: #fffdf8;
  --cream: #f7f1e5;
  --cream-deep: #ede2ce;
  --blue: #2d7186;
  --blue-dark: #1b5467;
  --mint: #cfe6dc;
  --mint-strong: #3b8b6b;
  --line: rgba(24, 61, 69, 0.13);
  --shadow: 0 18px 48px rgba(39, 70, 71, 0.11);
  --radius-large: 32px;
  --radius-medium: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(207, 230, 220, 0.72), transparent 27rem),
    radial-gradient(circle at 94% 4%, rgba(229, 205, 166, 0.48), transparent 23rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  border-radius: 10px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 0.91rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.home-link:hover,
.text-link:hover {
  color: var(--blue-dark);
  transform: translateX(-3px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 50%;
  font-size: 1rem;
}

.view[hidden] {
  display: none !important;
}

.hero {
  position: relative;
  min-height: 370px;
  padding: clamp(42px, 7vw, 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  align-items: center;
  gap: 40px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(255, 253, 248, 0.97), rgba(255, 253, 248, 0.82)),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(45, 113, 134, 0.05) 14px 15px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 230px;
  height: 230px;
  right: -80px;
  top: -100px;
  border: 1px solid rgba(45, 113, 134, 0.16);
}

.hero::after {
  width: 150px;
  height: 150px;
  right: -36px;
  top: -58px;
  border: 1px solid rgba(45, 113, 134, 0.14);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.placeholder-panel h1 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Songti SC", "Times New Roman", serif;
  font-size: clamp(2.65rem, 7vw, 5.55rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-description {
  max-width: 580px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.8;
}

.progress-pill {
  width: fit-content;
  margin-top: 30px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  background: rgba(207, 230, 220, 0.5);
  border: 1px solid rgba(59, 139, 107, 0.16);
  border-radius: 999px;
  font-size: 0.88rem;
}

.progress-pill strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.progress-dot {
  width: 8px;
  height: 8px;
  background: var(--mint-strong);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(59, 139, 107, 0.12);
}

.card-fan {
  position: relative;
  z-index: 1;
  width: min(100%, 300px);
  height: 280px;
  justify-self: center;
}

.fan-card {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 142px;
  aspect-ratio: 800 / 1080;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(24, 61, 69, 0.17));
  transform-origin: 50% 92%;
}

.fan-card-back {
  transform: translateX(-72%) rotate(-15deg);
}

.fan-card-queen {
  transform: translateX(-39%) rotate(12deg);
}

.fan-card-ace {
  transform: translateX(-54%) translateY(-13px) rotate(-2deg);
}

.section-heading {
  margin: 62px 4px 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  font-weight: 600;
}

.section-heading > p {
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.level-card {
  min-height: 196px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(24, 61, 69, 0.1);
  border-radius: var(--radius-medium);
  text-decoration: none;
}

.level-card-available {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-color: rgba(45, 113, 134, 0.2);
  box-shadow: 0 8px 28px rgba(39, 70, 71, 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.level-card-available::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  right: -24px;
  top: -28px;
  background: rgba(45, 113, 134, 0.07);
  border-radius: 50%;
  transition: transform 260ms ease;
}

.level-card-available:hover {
  z-index: 1;
  border-color: rgba(45, 113, 134, 0.43);
  box-shadow: 0 16px 34px rgba(39, 70, 71, 0.14);
  transform: translateY(-5px);
}

.level-card-available:hover::after {
  transform: scale(1.22);
}

.level-card:focus-visible,
.home-link:focus-visible,
.text-link:focus-visible,
.primary-button:focus-visible {
  outline: 3px solid #173f4b;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.92);
}

.level-card-top,
.level-card-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.level-number {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.level-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--blue);
  background: rgba(45, 113, 134, 0.09);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 800;
}

.level-card-copy h3 {
  margin: 28px 0 5px;
  font-family: Georgia, "Songti SC", "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.level-card-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.79rem;
  letter-spacing: 0.035em;
}

.level-card-status {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.level-arrow {
  transition: transform 180ms ease;
}

.level-card-available:hover .level-arrow {
  transform: translateX(3px);
}

.level-card-locked {
  color: #657572;
  background: rgba(236, 232, 223, 0.58);
  border-style: dashed;
  border-color: rgba(85, 107, 109, 0.14);
}

.level-card-locked .level-icon {
  color: #8b9694;
  background: rgba(90, 108, 108, 0.08);
}

.level-card-completed {
  background: linear-gradient(145deg, #e8f5ec, #d9eddf);
  border-color: rgba(59, 139, 107, 0.34);
}

.level-card-completed .level-icon {
  color: white;
  background: var(--mint-strong);
}

.level-card-completed .level-card-status {
  color: #287052;
}

.notice {
  padding: 16px;
  background: #fff7df;
  border-radius: 14px;
}

.level-view {
  min-height: 70vh;
  padding-top: 24px;
}

.placeholder-panel {
  margin: 38px auto 0;
  padding: clamp(44px, 8vw, 90px);
  text-align: center;
  background: var(--paper);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.placeholder-panel h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
}

.placeholder-panel > p:not(.eyebrow) {
  color: var(--ink-soft);
}

.primary-button {
  min-height: 46px;
  margin-top: 16px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--blue);
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
}

.primary-button:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.site-footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(24, 61, 69, 0.72);
  font-family: Georgia, "Songti SC", serif;
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
}

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

  .card-fan {
    height: 240px;
  }

  .fan-card {
    width: 120px;
  }

  .level-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-shell {
    width: min(100% - 24px, 560px);
  }

  .site-header {
    min-height: 70px;
  }

  .brand span:last-child {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 38px 28px 30px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 15vw, 4rem);
  }

  .card-fan {
    width: 230px;
    height: 205px;
    margin: 2px auto 0;
  }

  .fan-card {
    width: 104px;
  }

  .section-heading {
    margin-top: 42px;
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

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

  .level-card {
    min-height: 178px;
    padding: 16px;
    border-radius: 18px;
  }

  .level-card-copy h3 {
    margin-top: 22px;
    font-size: 1.08rem;
  }
}

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

  .level-card {
    min-height: 166px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Level 1 game */
.game-topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.level-chip {
  padding: 8px 12px;
  color: var(--blue-dark);
  background: rgba(207, 230, 220, 0.62);
  border: 1px solid rgba(59, 139, 107, 0.14);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.game-heading {
  padding: 34px 4px 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.game-heading h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", "Times New Roman", serif;
  font-size: clamp(2.65rem, 6vw, 4.8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.goal-summary {
  min-width: 150px;
  padding: 14px 17px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  background: rgba(255, 253, 248, 0.62);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.goal-summary span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.goal-summary strong {
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  align-items: start;
  gap: 20px;
}

.bridge-table {
  --face-card-width: clamp(74px, 7.4vw, 94px);
  position: relative;
  min-height: 680px;
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(84px, 0.7fr) minmax(250px, 1.7fr) minmax(84px, 0.7fr);
  grid-template-rows: 190px minmax(220px, 1fr) 190px;
  grid-template-areas:
    ". north ."
    "west trick east"
    ". south .";
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.045) 0 4px, transparent 4px 100%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 50%),
    #286a59;
  background-size: 20px 20px, auto, auto;
  border: 9px solid #23574e;
  border-radius: 46px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.11),
    inset 0 0 46px rgba(8, 48, 40, 0.17),
    0 22px 42px rgba(26, 62, 58, 0.16);
}

.bridge-table::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 32px;
}

.seat {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
}

.seat-north {
  grid-area: north;
  align-self: start;
  flex-direction: column;
}

.seat-south {
  grid-area: south;
  align-self: end;
  flex-direction: column;
}

.seat-west {
  grid-area: west;
  flex-direction: column;
}

.seat-east {
  grid-area: east;
  flex-direction: column;
}

.seat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
}

.seat-label strong {
  color: white;
  font-size: 0.76rem;
}

.seat-label span {
  padding-left: 7px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.face-hand {
  min-height: calc(var(--face-card-width) * 1.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-card {
  position: relative;
  width: var(--face-card-width);
  margin: 0 -5px;
  padding: 0;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.play-card img,
.card-back,
.trick-card img {
  width: 100%;
  display: block;
  user-select: none;
  filter: drop-shadow(0 8px 9px rgba(4, 37, 31, 0.2));
}

.play-card[data-actionable="false"] {
  opacity: 0.7;
  filter: saturate(0.78);
}

.play-card.is-playable {
  z-index: 2;
  filter: drop-shadow(0 0 11px rgba(250, 222, 145, 0.44));
}

.play-card.is-playable:hover {
  z-index: 3;
  transform: translateY(-9px) rotate(-1deg);
}

.play-card:focus-visible {
  outline: 3px solid #ffdd7d;
  outline-offset: 4px;
  box-shadow: 0 0 0 7px #173f4b;
}

.quiet-button:focus-visible,
.button-reset:focus-visible {
  outline: 3px solid #173f4b;
  outline-offset: 4px;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.94);
}

.hidden-hand {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-back {
  width: 58px;
  margin-top: -52px;
}

.card-back:first-child {
  margin-top: 0;
}

.trick-zone {
  position: relative;
  z-index: 2;
  grid-area: trick;
  width: min(100%, 280px);
  height: 236px;
  justify-self: center;
}

.trick-slot {
  position: absolute;
  width: 64px;
  min-height: 82px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.34);
  border: 1px dashed rgba(255, 255, 255, 0.19);
  border-radius: 10px;
  font-size: 0.66rem;
}

.trick-slot.has-card {
  border-color: transparent;
}

.trick-slot-north {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.trick-slot-east {
  top: 50%;
  right: 14px;
  transform: translateY(-50%) rotate(4deg);
}

.trick-slot-south {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
}

.trick-slot-west {
  top: 50%;
  left: 14px;
  transform: translateY(-50%) rotate(-4deg);
}

.trick-card {
  width: 64px;
  perspective: 800px;
}

.trick-card.is-new {
  animation: deal-card 340ms cubic-bezier(0.21, 0.78, 0.35, 1) both;
}

.trick-card.is-auto {
  animation: flip-reveal 480ms cubic-bezier(0.24, 0.72, 0.3, 1) both;
}

.table-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(255, 255, 255, 0.12);
  font-family: Georgia, serif;
  font-size: 3.2rem;
  transform: translate(-50%, -50%);
}

.coach-panel {
  position: sticky;
  top: 18px;
  padding: 22px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(39, 70, 71, 0.1);
}

.coach-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coach-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 14px;
}

.coach-header p,
.coach-header strong {
  margin: 0;
}

.coach-header p {
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
}

.coach-header strong {
  display: block;
  margin-top: 2px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 1.1rem;
}

.goal-track {
  height: 6px;
  margin: 17px 0 24px;
  overflow: hidden;
  background: #e5e5dd;
  border-radius: 999px;
}

.goal-track span {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--mint-strong), #75b88c);
  border-radius: inherit;
  transition: width 420ms ease;
}

.turn-card {
  min-height: 124px;
  padding: 17px;
  background: #edf5f1;
  border: 1px solid rgba(59, 139, 107, 0.12);
  border-radius: 17px;
}

.turn-kicker,
.turn-status {
  margin: 0;
}

.turn-kicker {
  color: var(--mint-strong);
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.turn-status {
  margin-top: 9px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.6;
}

.turn-status.is-win {
  color: #237052;
}

.gentle-hint {
  min-height: 38px;
  margin: 10px 0 0;
  padding: 0 4px;
  color: #a15b3a;
  font-size: 0.76rem;
  line-height: 1.45;
  opacity: 0;
}

.gentle-hint.is-visible {
  opacity: 1;
}

.gentle-hint.hint-bump {
  animation: hint-bump 260ms ease;
}

.mini-lesson {
  padding: 16px 3px 5px;
  border-top: 1px solid var(--line);
}

.mini-lesson-title {
  margin: 0 0 6px;
  color: var(--blue-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.mini-lesson p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.65;
}

.quiet-button {
  width: 100%;
  min-height: 43px;
  margin-top: 16px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.77rem;
  font-weight: 750;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.quiet-button:hover {
  color: var(--blue-dark);
  background: rgba(45, 113, 134, 0.05);
  border-color: rgba(45, 113, 134, 0.28);
}

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

.modal-layer {
  position: fixed;
  z-index: 50;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(16, 44, 47, 0.65);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(100%, 570px);
  padding: clamp(30px, 6vw, 52px);
  overflow: hidden;
  text-align: center;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(13, 39, 42, 0.32);
  animation: modal-in 260ms cubic-bezier(0.21, 0.78, 0.35, 1) both;
}

.modal-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -100px;
  right: -70px;
  background: rgba(45, 113, 134, 0.07);
  border-radius: 50%;
}

.modal-suit,
.result-icon {
  position: relative;
  display: grid;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 20px;
  font-family: Georgia, serif;
  font-size: 1.45rem;
  box-shadow: 0 10px 22px rgba(45, 113, 134, 0.24);
}

.modal-card h2 {
  position: relative;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Songti SC", "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.65rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.intro-points {
  margin: 28px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  text-align: left;
}

.intro-points div {
  padding: 14px;
  background: #f3f3eb;
  border-radius: 14px;
}

.intro-points strong,
.intro-points span {
  display: block;
}

.intro-points strong {
  font-size: 0.76rem;
}

.intro-points span {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.45;
}

.button-reset {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.result-message {
  margin: 17px auto 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

.result-card.is-failure .result-icon {
  color: #8d4d31;
  background: #f4d8c9;
  box-shadow: none;
}

.result-card.is-success .result-icon {
  background: var(--mint-strong);
  box-shadow: 0 10px 22px rgba(59, 139, 107, 0.24);
}

.lesson-box {
  margin-top: 22px;
  padding: 18px;
  text-align: left;
  background: #edf5f1;
  border: 1px solid rgba(59, 139, 107, 0.13);
  border-radius: 16px;
}

.lesson-box strong {
  color: #287052;
  font-size: 0.8rem;
}

.lesson-box p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.7;
}

.modal-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.modal-actions .primary-button {
  min-width: 150px;
  margin-top: 0;
}

.success-return {
  background: var(--mint-strong);
}

.success-return:hover {
  background: #287052;
}

@keyframes deal-card {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes flip-reveal {
  0% {
    opacity: 0.45;
    transform: translateY(-10px) rotateY(88deg) scale(0.92);
  }
  68% {
    opacity: 1;
    transform: translateY(0) rotateY(-6deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0) scale(1);
  }
}

@keyframes hint-bump {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(4px); }
  70% { transform: translateX(-3px); }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  .coach-panel {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    column-gap: 24px;
  }

  .goal-track {
    grid-column: 1;
  }

  .turn-card {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .gentle-hint {
    grid-column: 2;
  }

  .mini-lesson,
  .quiet-button {
    grid-column: 1;
  }
}

@media (max-width: 680px) {
  .game-heading {
    padding-top: 22px;
    align-items: start;
  }

  .goal-summary {
    min-width: 118px;
  }

  .bridge-table {
    --face-card-width: 72px;
    min-height: 620px;
    padding: 18px;
    grid-template-columns: 70px minmax(210px, 1fr) 70px;
    grid-template-rows: 170px minmax(210px, 1fr) 170px;
    border-width: 7px;
    border-radius: 34px;
  }

  .card-back {
    width: 50px;
    margin-top: -45px;
  }

  .trick-zone {
    width: min(100%, 238px);
    height: 216px;
  }

  .trick-slot,
  .trick-card {
    width: 58px;
  }

  .trick-slot-east {
    right: 7px;
  }

  .trick-slot-west {
    left: 7px;
  }

  .coach-panel {
    display: block;
  }

  .intro-points {
    grid-template-columns: 1fr;
  }

  .intro-points div {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    align-items: center;
    gap: 12px;
  }

  .intro-points span {
    margin-top: 0;
  }
}

@media (max-width: 500px) {
  .level-chip {
    font-size: 0.61rem;
  }

  .game-heading {
    gap: 12px;
  }

  .game-heading h1 {
    font-size: 2.55rem;
  }

  .goal-summary {
    min-width: 105px;
    padding: 11px 12px;
  }

  .goal-summary strong {
    font-size: 0.98rem;
  }

  .bridge-table {
    --face-card-width: 64px;
    min-height: 570px;
    padding: 12px 8px;
    grid-template-columns: 48px minmax(150px, 1fr) 48px;
    grid-template-rows: 154px minmax(190px, 1fr) 154px;
    border-width: 6px;
    border-radius: 28px;
  }

  .seat-label {
    flex-direction: column;
    gap: 2px;
    font-size: 0.66rem;
  }

  .seat-label strong {
    font-size: 0.72rem;
  }

  .seat-label span {
    padding-left: 0;
    border-left: 0;
  }

  .seat-west .seat-label,
  .seat-east .seat-label {
    gap: 1px;
  }

  .card-back {
    width: 42px;
    margin-top: -38px;
  }

  .trick-zone {
    width: 195px;
    height: 195px;
  }

  .trick-slot,
  .trick-card {
    width: 50px;
  }

  .trick-slot {
    min-height: 68px;
  }

  .trick-slot-east {
    right: 0;
  }

  .trick-slot-west {
    left: 0;
  }

  .table-mark {
    font-size: 2.4rem;
  }

  .modal-layer {
    padding: 12px;
  }

  .modal-card {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .primary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trick-card.is-new,
  .trick-card.is-auto,
  .gentle-hint.hint-bump,
  .modal-card {
    animation: none;
  }
}
