:root {
  --green-light: #eafaef;
  --green-dark: #a3d9b1;
  --yellow-light: #fffaea;
  --yellow-dark: #f0d78c;
  --blue-light: #eaf4ff;
  --blue-dark: #a9cdf0;

  --ink: #14171f;
  --ink-soft: #5b6270;
  --ink-faint: #9aa1ac;
  --brand-blue: #3b6fe0;
  --brand-green: #3fa66a;
  --brand-purple: #8b6fe0;
  --hairline: #ecedf3;
}

body {
  background: #ffffff;
  color: #2b2b2b;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==================== Home / Landing page ==================== */

.home-page {
  color: var(--ink);
}

.home-page .home-header {
  padding: 1.5rem 2rem 0.5rem 2rem;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 1.5rem 3.5rem;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -15% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(420px circle at 18% 25%, rgba(59, 111, 224, 0.14), transparent 60%),
    radial-gradient(420px circle at 84% 12%, rgba(63, 166, 106, 0.13), transparent 60%),
    radial-gradient(480px circle at 50% 50%, rgba(139, 111, 224, 0.11), transparent 65%);
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.hero-logo {
  height: 152px;
  width: auto;
  display: block;
  margin: 0 auto 1.75rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-blue);
  background: #eef2ff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
  .hero-logo {
    height: 108px;
    margin-bottom: 1.4rem;
  }
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}

.hero h1 .grad {
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 2.25rem;
  line-height: 1.6;
}

/* Create-board card */

.create-board-card {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 1.65rem 1.75rem;
  box-shadow: 0 24px 50px -24px rgba(20, 23, 31, 0.22);
  text-align: left;
  scroll-margin-top: 2rem;
}

.create-board-card label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  display: block;
  margin-bottom: 0.5rem;
}

.create-board-form-row {
  display: flex;
  gap: 0.6rem;
}

#board_name.form-control {
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  border: 1.5px solid #e3e5ec;
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
}

#board_name.form-control:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(59, 111, 224, 0.15);
  outline: none;
}

.btn-create-board {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.4rem;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-create-board:hover {
  filter: brightness(1.07);
}

.btn-create-board:disabled {
  opacity: 0.6;
}

.create-board-hint {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.7rem;
}

/* Trust badges */

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.5rem;
  margin-top: 2.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.trust-row svg {
  width: 16px;
  height: 16px;
  color: var(--brand-green);
  flex-shrink: 0;
}

/* Generic section */

.home-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-heading {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
}

.section-heading .eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand-blue);
}

.section-heading h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  margin: 0.4rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.section-heading p {
  color: var(--ink-soft);
  line-height: 1.6;
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
}

.step {
  text-align: center;
}

.step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin: 0 auto 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 260px;
  margin: 0 auto;
}

/* Features grid */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1.5rem;
  background: #fff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  box-shadow: 0 16px 34px -20px rgba(20, 23, 31, 0.22);
  transform: translateY(-2px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-icon.c-blue { background: #eaf1ff; color: var(--brand-blue); }
.feature-icon.c-green { background: #eafaef; color: var(--brand-green); }
.feature-icon.c-purple { background: #f2edfe; color: var(--brand-purple); }

.feature-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.feature-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.methodology-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.methodology-pill {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #fbfbfd;
}

/* CTA band */

.cta-band {
  max-width: 1120px;
  margin: 0 auto 4rem;
  padding: 3rem 2rem;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(135deg, #eef4ff, #f3effd);
}

.cta-band h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.cta-band p {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

/* Footer */

.home-footer {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 1.5rem 2rem;
}

.home-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.home-footer-brand img {
  height: 32px;
}

.home-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.88rem;
}

.home-footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.home-footer-links a:hover {
  color: var(--brand-blue);
}

.home-footer-note {
  font-size: 0.78rem;
  color: var(--ink-faint);
  width: 100%;
  text-align: center;
  margin-top: 1.25rem;
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .create-board-form-row {
    flex-direction: column;
  }

  .btn-create-board {
    width: 100%;
  }

  .home-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Board page */

.board-page {
  min-height: 100vh;
  padding: 1.5rem 2rem 4.5rem 2rem;
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.board-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  outline: none;
}

.board-title:hover,
.board-title:focus {
  background: #f5f5f5;
}

.board-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.board-search {
  width: 220px;
}

.board-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.board-column {
  background: #fafafa;
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.board-column-header {
  padding: 0.2rem 0.35rem 0.6rem 0.35rem;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 0.75rem;
}

.column-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  outline: none;
  color: #333;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  align-content: start;
  min-height: 60px;
  flex: 1;
}

.board-column[data-color="green"] .retro-card { background: var(--green-light); border-left: 3px solid var(--green-dark); }
.board-column[data-color="yellow"] .retro-card { background: var(--yellow-light); border-left: 3px solid var(--yellow-dark); }
.board-column[data-color="blue"] .retro-card { background: var(--blue-light); border-left: 3px solid var(--blue-dark); }

.retro-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s ease, transform 0.15s ease, outline-color 0.1s ease;
  display: flex;
  flex-direction: column;
  height: 8.8rem;
  overflow: hidden;
}

.retro-card:active {
  cursor: grabbing;
}

.retro-card.sortable-ghost {
  opacity: 0.4;
}

.retro-card.top-voted {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.retro-card.merge-source {
  outline: 3px dashed #2a5cbf;
  outline-offset: -3px;
  box-shadow: 0 0 0 4px rgba(42, 92, 191, 0.12);
}

body.merge-mode-active .retro-card:not(.merge-source) {
  cursor: pointer;
}

body.merge-mode-active .retro-card:not(.merge-source):hover {
  outline: 2px solid #2a5cbf;
  outline-offset: -2px;
}

.merge-hint {
  position: sticky;
  top: 0.5rem;
  z-index: 15;
  background: #2a5cbf;
  color: #fff;
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
}

.merge-hint #merge-cancel {
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.merge-hint #merge-cancel:hover {
  background: rgba(255, 255, 255, 0.32);
}

.board-column[data-color="green"] .retro-card.top-voted { background: var(--green-dark); }
.board-column[data-color="yellow"] .retro-card.top-voted { background: var(--yellow-dark); }
.board-column[data-color="blue"] .retro-card.top-voted { background: var(--blue-dark); }

@media (max-width: 480px) {
  .card-list {
    grid-template-columns: 1fr;
  }
}

.retro-card-text {
  margin: 0 0 0.4rem 0;
  font-size: 0.92rem;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-word;
  flex-shrink: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.retro-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #777;
  flex-shrink: 0;
  margin-top: auto;
}

.retro-card-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.btn-vote,
.btn-merge {
  border: none;
  background: transparent;
  color: #666;
  font-size: 0.8rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
}

.btn-vote.voted {
  background: #e9f0ff;
  color: #2a5cbf;
  font-weight: 700;
}

.btn-vote:hover,
.btn-merge:hover {
  background: #f0f0f0;
}

.btn-add-card {
  margin-top: 0.6rem;
  background: transparent;
  border: 1px dashed #ccc;
  color: #666;
  font-size: 0.85rem;
}

.btn-add-card:hover {
  background: #f0f0f0;
}

.card-hidden {
  display: none !important;
}

.color-picker {
  display: flex;
  gap: 0.5rem;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ddd;
  cursor: pointer;
}

.color-swatch[data-color=""] {
  background: #fff;
  background-image: linear-gradient(45deg, transparent 45%, #ccc 45%, #ccc 55%, transparent 55%);
}

.color-swatch.selected {
  border-color: #333;
}

#sort-toggle-btn.active {
  background: #e9f0ff;
  border-color: #7fa8e8;
  color: #2a5cbf;
}

/* Footer / timer */

.board-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid #e8e8e8;
  z-index: 20;
}

.timer-widget {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.timer-adjust {
  border: none;
  background: #eef1f8;
  color: #3355aa;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}

.timer-adjust:hover {
  background: #dfe6f6;
}

.timer-sep {
  width: 1px;
  height: 20px;
  background: #e0e0e0;
  margin: 0 0.2rem;
}

.timer-clock {
  font-size: 0.95rem;
}

.timer-display {
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 700;
  min-width: 3.4rem;
  text-align: center;
}

.timer-display.timer-warning {
  color: #c0392b;
}

.timer-action {
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  color: #fff;
}

.timer-action-reset {
  background: #9aa3af;
}

.timer-action-reset:hover {
  background: #838d99;
}

.timer-action-start {
  background: #3fa66a;
}

.timer-action-start:hover {
  background: #34905b;
}

.timer-action-start:disabled,
.timer-action-stop:disabled {
  opacity: 0.5;
}

.timer-action-stop {
  background: #d0524a;
}

.timer-action-stop:hover {
  background: #bb453e;
}

.board-footer-brand {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  text-decoration: none;
}

.board-footer-brand:hover {
  color: #222;
  text-decoration: underline;
}

@media (max-width: 576px) {
  .board-page {
    padding: 1rem 1rem 8rem 1rem;
  }

  .board-header-actions {
    width: 100%;
  }

  .board-search {
    width: 100%;
  }

  .board-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Header brand (logo + título) */

.board-header-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-logo-link {
  display: inline-flex;
  flex-shrink: 0;
}

.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

/* Login / avatar */

.auth-widget {
  display: flex;
  align-items: center;
}

.auth-avatar-btn {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 50%;
  line-height: 0;
}

.auth-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2a5cbf;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.auth-avatar-fallback {
  text-transform: uppercase;
}

.auth-dropdown-menu {
  min-width: 220px;
}

.auth-dropdown-name {
  padding: 0.25rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Concluir retro */

.badge-concluded-btn {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6a6a6a;
  background: #eee;
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
}

.badge-concluded {
  font-size: 0.68rem;
  font-weight: 600;
  color: #6a6a6a;
  background: #eee;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  vertical-align: middle;
}

/* Modo somente-leitura (retro concluída) — a maior parte é só CSS;
   Sortable (drag) e o modal de edição precisam de JS (ver board.js). */

body[data-board-concluded="1"] .btn-add-card,
body[data-board-concluded="1"] .btn-merge {
  display: none !important;
}

body[data-board-concluded="1"] .btn-vote {
  pointer-events: none;
  opacity: 0.55;
}

body[data-board-concluded="1"] .retro-card {
  cursor: default;
}

/* Modal "Minhas Retros" */

.my-boards-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 55vh;
  overflow-y: auto;
}

.my-board-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #eee;
  border-radius: 8px;
}

.my-board-title {
  font-weight: 600;
}

.my-board-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.my-boards-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

/* Modal "Opções" */

.options-account-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.options-account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2a5cbf;
  color: #fff;
  font-weight: 700;
}

@media (max-width: 576px) {
  .my-board-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Páginas legais (privacidade / termos) */

.legal-body {
  background: #fff;
}

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem 1.5rem;
  line-height: 1.6;
}

.legal-page h1 {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.legal-updated {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.legal-page p {
  margin-bottom: 0.9rem;
  color: #333;
}

.legal-back {
  margin-top: 2.5rem;
}

/* ==================== Planning Poker ==================== */

.home-header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.home-nav-link {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.home-nav-link:hover {
  color: var(--brand-blue);
}

.poker-hero {
  padding-bottom: 5rem;
}

.poker-create-card {
  max-width: 560px;
  margin: 2rem auto 0;
  text-align: left;
}

.poker-create-card label:not(.poker-deck-option) {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.poker-deck-options {
  display: grid;
  gap: 0.6rem;
}

.poker-deck-option {
  display: block;
  cursor: pointer;
  margin: 0;
}

.poker-deck-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.poker-deck-option-body {
  display: block;
  border: 2px solid var(--hairline);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.poker-deck-option-body strong {
  display: block;
  font-size: 0.95rem;
}

.poker-deck-option-body small {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.poker-deck-option:hover .poker-deck-option-body {
  border-color: var(--blue-dark);
}

.poker-deck-option input:checked + .poker-deck-option-body {
  border-color: var(--brand-blue);
  background: var(--blue-light);
}

.poker-deck-option input:focus-visible + .poker-deck-option-body {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Sala */

.poker-page {
  min-height: 100vh;
  color: var(--ink);
  background: #ffffff;
}

.poker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--hairline);
}

.poker-header-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.poker-room-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.poker-room-meta {
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.poker-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.poker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.75rem 2rem 3rem;
}

.poker-main {
  text-align: center;
  min-width: 0;
}

.poker-status {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: #f4f5fa;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
}

.poker-status.is-ready {
  color: #1f7a45;
  background: var(--green-light);
}

.poker-table {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 1.25rem;
  min-height: 150px;
  margin: 1.75rem 0;
}

.poker-empty {
  color: var(--ink-faint);
  align-self: center;
}

.poker-player {
  width: 90px;
  transition: opacity 0.2s ease;
}

.poker-player.is-away {
  opacity: 0.4;
}

.pcard {
  width: 66px;
  height: 94px;
  margin: 0 auto;
  perspective: 700px;
}

.pcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}

.pcard.is-revealed .pcard-inner {
  transform: rotateY(180deg);
}

.pcard-face {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcard-back {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--blue-dark), 0 6px 14px rgba(59, 111, 224, 0.25);
}

.pcard.is-empty:not(.is-revealed) .pcard-back {
  background: transparent;
  border: 2px dashed #d3d7e2;
  box-shadow: none;
}

.pcard-front {
  transform: rotateY(180deg);
  background: #fff;
  border: 2px solid var(--brand-blue);
  color: var(--brand-blue);
  font-size: 1.8rem;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(59, 111, 224, 0.18);
}

.pcard-front.is-small {
  font-size: 1.3rem;
}

.pcard.is-empty .pcard-front {
  border-color: #d3d7e2;
  color: var(--ink-faint);
  box-shadow: none;
}

.poker-player-name {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.poker-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3rem;
}

.btn-poker-primary,
.btn-poker-secondary {
  border-radius: 12px;
  padding: 0.7rem 1.8rem;
  font-weight: 700;
  font-size: 1rem;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-poker-primary {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
}

.btn-poker-primary:hover:not(:disabled) {
  filter: brightness(1.07);
}

.btn-poker-primary:disabled {
  opacity: 0.45;
}

.btn-poker-primary.is-ready {
  box-shadow: 0 0 0 4px rgba(59, 111, 224, 0.2);
}

.btn-poker-secondary {
  background: #fff;
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue);
}

.btn-poker-secondary:hover {
  background: var(--blue-light);
}

.poker-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2.5rem;
  max-width: 720px;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.75rem;
  background: var(--blue-light);
  border: 1px solid var(--blue-dark);
  border-radius: 18px;
}

.poker-result-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.poker-result-value {
  font-size: 3.6rem;
  line-height: 1.1;
  font-weight: 800;
  color: var(--brand-blue);
}

.poker-result-value.is-tie {
  font-size: 2.4rem;
}

.poker-result-sub {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.poker-result-avg {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.poker-result-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.poker-chip {
  background: #fff;
  border: 1px solid var(--blue-dark);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.poker-coffee {
  flex-basis: 100%;
  background: #fff4d6;
  border: 1px solid var(--yellow-dark);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  font-weight: 600;
}

.poker-hand-label {
  margin-top: 2.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.poker-hand {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.5rem 0 0.5rem;
}

.poker-card {
  width: 92px;
  height: 132px;
  background: #fff;
  border: 2px solid var(--blue-dark);
  border-radius: 14px;
  color: var(--brand-blue);
  font-size: 2.5rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(59, 111, 224, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.poker-card.is-small {
  font-size: 1.9rem;
}

.poker-card:hover:not(:disabled) {
  transform: translateY(-8px);
  border-color: var(--brand-blue);
  box-shadow: 0 10px 22px rgba(59, 111, 224, 0.22);
}

.poker-card.is-selected {
  transform: translateY(-16px);
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
  box-shadow: 0 14px 26px rgba(91, 100, 224, 0.35);
}

.poker-card:disabled {
  cursor: default;
}

.poker-card:disabled:not(.is-selected) {
  opacity: 0.45;
}

.poker-notes {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  background: #fafbff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
}

.poker-notes h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

.poker-notes-text {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.45;
  max-height: calc(100vh - 10rem);
  overflow-y: auto;
}

.poker-notes-text.is-empty {
  color: var(--ink-faint);
}

.poker-fatal {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: 2rem;
}

@media (max-width: 900px) {
  .poker-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.25rem 1rem 2.5rem;
  }

  .poker-notes {
    position: static;
  }

  .poker-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
  }

  .poker-card {
    width: 62px;
    height: 90px;
    font-size: 1.7rem;
    border-radius: 10px;
  }

  .poker-card.is-small {
    font-size: 1.3rem;
  }

  .poker-result-value {
    font-size: 2.8rem;
  }
}
