.features {
  padding: var(--sp-9) var(--sp-5);
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
}

.features-header {
  text-align: center;
  margin-bottom: var(--sp-8);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.features-header h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}

.bento-cell {
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--r-card);
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  position: relative;
  overflow: hidden;
  min-height: 480px;
  will-change: transform;
}
.bento-cell:hover {
  border-color: var(--primary-soft-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-tinted);
}

.bento-cell-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.bento-cell-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.bento-cell-icon svg { width: 22px; height: 22px; }

.bento-cell h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.bento-flow {
  display: grid;
  gap: 12px;
  margin: 0 0 var(--sp-3);
  padding: var(--sp-4) var(--sp-4) var(--sp-4) 18px;
  border-radius: var(--r-input);
  background:
    linear-gradient(135deg, rgba(250, 58, 127, 0.08), rgba(250, 58, 127, 0.02)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(250, 58, 127, 0.10);
}
.bento-flow-row {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: var(--sp-3);
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.55;
}
.bento-flow-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: var(--r-pill);
  background: var(--primary);
  box-shadow: 0 0 0 5px var(--primary-soft);
  opacity: 0.88;
}
.bento-flow-row:nth-child(2) .bento-flow-dot { opacity: 0.62; }
.bento-flow-row:nth-child(3) .bento-flow-dot {
  opacity: 1;
  box-shadow: 0 0 0 5px var(--primary-soft-2);
}
.bento-flow-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.bento-flow-kicker {
  width: max-content;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(250, 58, 127, 0.09);
  border: 1px solid rgba(250, 58, 127, 0.14);
  color: var(--primary);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.11em;
  line-height: 1.45;
  text-transform: uppercase;
}
.bento-flow-row:nth-child(2) .bento-flow-kicker {
  background: rgba(0, 202, 253, 0.08);
  border-color: rgba(0, 202, 253, 0.14);
  color: var(--cat-travel);
}
.bento-flow-row:nth-child(3) .bento-flow-kicker {
  background: var(--primary-soft);
  border-color: var(--primary-soft-2);
}
.bento-flow-text {
  color: var(--text-main);
  opacity: 0.72;
  text-wrap: pretty;
}
.bento-flow-row:nth-child(3) .bento-flow-text {
  color: var(--text-main);
  opacity: 0.94;
  font-weight: var(--fw-semibold);
}

.bento-card-stage {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 240px;
  position: relative;
}

.cell-1 .bento-cell-icon { background: linear-gradient(135deg, var(--cat-places), var(--primary)); }
.cell-2 .bento-cell-icon { background: linear-gradient(135deg, var(--cat-travel), var(--cat-games)); }
.cell-3 .bento-cell-icon { background: linear-gradient(135deg, var(--cat-rest), var(--cat-recipes)); }
.cell-4 .bento-cell-icon { background: linear-gradient(135deg, var(--cat-score), var(--cat-games)); }

.journal-stack {
  position: relative;
  width: 240px;
  height: 280px;
  flex-shrink: 0;
}
.j-card {
  position: absolute;
  width: 200px;
  height: 240px;
  border-radius: var(--r-card);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  color: #fff;
  transition: transform 0.6s var(--ease-out), opacity 0.6s, z-index 0.6s step-end;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  top: 20px;
  left: 20px;
  padding: var(--sp-4);
  text-align: center;
}
.j-card svg { width: 32px; height: 32px; opacity: 0.9; }
.j-card p { font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: 1.2; opacity: 0.9; }

.c-1 { background: linear-gradient(135deg, #F48FB1, #D81B60); }
.c-2 { background: linear-gradient(135deg, #80DEEA, #00838F); }
.c-3 { background: linear-gradient(135deg, #FFF176, #F57F17); }
.c-4 { background: linear-gradient(135deg, #CE93D8, #7B1FA2); }
.c-5 { background: linear-gradient(135deg, #F48FB1, #AD1457); }

.slot-0 { transform: translate(40px, 90px)  rotate(8deg)  scale(0.92); opacity: 0.4;  z-index: 0; }
.slot-1 { transform: translate(-18px, 60px) rotate(-4deg) scale(0.94); opacity: 0.55; z-index: 1; }
.slot-2 { transform: translate(24px, 32px)  rotate(4deg)  scale(0.96); opacity: 0.70; z-index: 2; }
.slot-3 { transform: translate(-32px, 0px)  rotate(-8deg) scale(0.98); opacity: 0.85; z-index: 3; }
.slot-4 { transform: translate(0px, -28px)  rotate(0deg)  scale(1.0);  opacity: 1.0;  z-index: 4; }

.journal-stack:hover .slot-0 { transform: translate(60px, 110px) rotate(12deg)  scale(0.92); }
.journal-stack:hover .slot-1 { transform: translate(-44px, 80px) rotate(-8deg) scale(0.94); }
.journal-stack:hover .slot-2 { transform: translate(44px, 36px)  rotate(8deg)  scale(0.96); }
.journal-stack:hover .slot-3 { transform: translate(-54px, -8px) rotate(-12deg) scale(0.98); }
.journal-stack:hover .slot-4 { transform: translate(0px, -44px)  rotate(0deg)  scale(1.05); }

@keyframes frontToBackArc {
  0%   { transform: translate(0px, -28px) scale(1.0);  z-index: 4; opacity: 1; }
  35%  { transform: translate(110px, -110px) rotate(20deg) scale(0.96); z-index: 4; opacity: 0.7; }
  100% { transform: translate(40px, 90px)  rotate(8deg)  scale(0.92); z-index: 0; opacity: 0.4; }
}
.moving-to-back {
  animation: frontToBackArc 0.6s var(--ease-out) forwards !important;
}

.quiz-ui {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: var(--sp-5);
}
.quiz-question {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-5);
  text-align: center;
  color: var(--text-main);
  line-height: 1.4;
}
.quiz-option {
  background: var(--surface-elevated);
  border: 2px solid var(--border-color);
  padding: 14px;
  border-radius: var(--r-input);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
  font-weight: var(--fw-medium);
  color: var(--text-main);
  user-select: none;
}
.quiz-option:hover { border-color: var(--primary); transform: translateX(4px); }
.quiz-option:active { transform: translateX(4px) scale(0.99); transition-duration: 0.08s; }
.quiz-option.selected {
  border-color: var(--cat-travel);
  background: rgba(0, 202, 253, 0.10);
}
.quiz-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  transition: all var(--t-base) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  font-weight: var(--fw-bold);
}
.quiz-option.selected .quiz-circle {
  border-color: var(--cat-travel);
  background: var(--cat-travel);
  box-shadow: 0 0 0 4px rgba(0, 202, 253, 0.20);
}

.place-card {
  width: 320px;
  margin: 0 auto;
  background: var(--surface-solid);
  border: 2px solid rgba(255, 79, 88, 0.10);
  border-radius: var(--r-card);
  padding: var(--sp-5);
  box-shadow: 0 12px 30px -10px rgba(255, 79, 88, 0.15);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: all var(--t-base) var(--ease);
}
.pc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
}
.pc-check {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--t-base) var(--ease), border-color var(--t-base) var(--ease), color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-color);
  color: transparent;
  font-size: 14px;
  font-weight: var(--fw-bold);
  flex-shrink: 0;
  user-select: none;
}
.pc-check:hover { border-color: var(--primary); transform: scale(1.05); }
.pc-check:active { transform: scale(0.92); transition-duration: 0.08s; }
.pc-check.checked {
  background: var(--primary);
  border-color: var(--cat-travel);
  color: var(--text-white);
}
.pc-title { font-weight: var(--fw-bold); font-size: var(--fs-xl); color: var(--text-main); letter-spacing: -0.02em; flex: 1; }
.pc-score-box {
  background: var(--primary);
  border-radius: var(--r-input);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(250, 58, 127, 0.20);
  flex-shrink: 0;
}
.pc-score-box .score-val {
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  line-height: 1;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.pc-score-box .score-lbl { font-size: 8px; font-weight: var(--fw-semibold); letter-spacing: 0.08em; opacity: 0.85; text-transform: uppercase; }

.pc-ratings { display: flex; flex-direction: column; gap: var(--sp-3); }
.pc-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--r-input);
  gap: var(--sp-3);
}
.pc-rating-row.red { background: rgba(255, 79, 88, 0.06); border: 1px solid rgba(255, 79, 88, 0.08); color: #FF6982; }
.pc-rating-row.teal { background: rgba(0, 198, 185, 0.06); border: 1px solid rgba(0, 198, 185, 0.08); color: #00C6B9; }

.pc-user { display: flex; align-items: center; gap: var(--sp-3); flex: 1; min-width: 0; }
.pc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: var(--fw-bold);
  font-size: 14px;
  flex-shrink: 0;
}
.pc-rating-row.red .pc-avatar { background: #FF6982; }
.pc-rating-row.teal .pc-avatar { background: #00C6B9; }

.pc-user-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pc-user-name {
  font-size: 10px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-stars { display: flex; gap: 3px; font-size: 13px; cursor: pointer; }
.pc-stars span {
  transition: transform 0.2s var(--ease), color var(--t-base) var(--ease);
  line-height: 1;
  display: inline-block;
}
.pc-stars span:hover { transform: scale(1.25); color: var(--cat-act); }
.pc-stars span:active { transform: scale(1.1); transition-duration: 0.08s; }
.pc-rating-val {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.scoreboard-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.scoreboard-trophy {
  font-size: 28px;
  margin-bottom: var(--sp-4);
  animation: trophyFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4));
}

.confetti-piece {
  position: absolute;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  animation: confettiFall 4s linear infinite;
}
.cf1 { top: -20px; left: 10%; animation-delay: 0s; }
.cf2 { top: -20px; left: 30%; animation-delay: 1.2s; }
.cf3 { top: -20px; left: 60%; animation-delay: 2.5s; }
.cf4 { top: -20px; left: 85%; animation-delay: 0.8s; }

.game-score-card {
  width: 100%;
  max-width: 360px;
  background: var(--cat-score);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-card);
  padding: var(--sp-5) var(--sp-4);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 15px -3px rgba(143, 31, 208, 0.30), 0 4px 6px -4px rgba(143, 31, 208, 0.20);
  color: var(--text-white);
  transition: transform var(--t-base) var(--ease);
  position: relative;
  animation: cardGlow 3s ease-in-out infinite;
  cursor: pointer;
}
.game-score-card:hover { transform: translateY(-5px) scale(1.02); }
.game-score-card:active { transform: translateY(-2px) scale(1.01); transition-duration: 0.08s; }
.game-score-card:hover .gsc-avatar { animation: avatarBounce 0.6s var(--ease); }
.game-score-card:hover .gsc-avatar:last-child { animation-delay: 0.15s; }
.game-score-card:hover .gsc-score { animation: scorePop 0.4s var(--ease); }

.gsc-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.gsc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.gsc-score {
  font-weight: var(--fw-black);
  font-size: 36px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.gsc-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1.5;
  text-align: center;
}
.gsc-title { font-weight: var(--fw-bold); font-size: var(--fs-md); line-height: 1.2; }
.gsc-subtitle { font-weight: var(--fw-medium); font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.8); }

.bg-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.bg-element {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  animation: bgFloat linear infinite;
  filter: drop-shadow(0 0 8px rgba(250, 58, 127, 0.3));
}
.bg-icon { font-size: 26px; animation-name: bgFloatEmoji; }
.bg-shape {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--cat-travel));
  animation-name: bgFloatShape;
  filter: blur(2px);
}
.bg-ring {
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  animation-name: bgFloatRing;
  opacity: 0;
}
