.primary-button,
.secondary-button,
.ghost-button,
.choice-card,
.count-pill,
.hero-cta {
  -webkit-tap-highlight-color: rgba(234, 153, 97, 0.18);
  touch-action: manipulation;
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button,
.secondary-button,
.ghost-button,
.hero-cta,
.profile-button,
.story-actor-button,
.profile-save-button {
  min-height: 44px;
  padding: 14px 22px;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(61, 44, 33, 0.12);
}

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

button:focus-visible,
input:focus-visible,
.info-card:focus-visible {
  outline: 3px solid rgba(217, 122, 52, 0.46);
  outline-offset: 3px;
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf3;
  font-weight: 800;
  box-shadow: 0 18px 32px rgba(234, 153, 97, 0.28);
}

.secondary-button,
.ghost-button,
.count-pill {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
}

.ghost-button {
  padding-inline: 16px;
}

.topbar .ghost-button {
  border-color: rgba(201, 95, 63, 0.28);
  background: linear-gradient(145deg, rgba(255, 242, 235, 0.96), rgba(255, 229, 215, 0.92));
  color: var(--tile-strong);
  box-shadow: 0 14px 28px rgba(168, 70, 47, 0.14);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 190px;
  border: 1px solid rgba(96, 74, 59, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  text-align: left;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(96, 74, 59, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(61, 44, 33, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.profile-menu-anchor {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 0 0 auto;
  margin-top: -12px;
}

.profile-quick-stats {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(96, 74, 59, 0.1);
  background: linear-gradient(145deg, rgba(255, 251, 246, 0.98), rgba(255, 242, 231, 0.95));
  box-shadow: 0 22px 38px rgba(61, 44, 33, 0.12);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 8;
}

.profile-menu-anchor:hover .profile-quick-stats,
.profile-menu-anchor:focus-within .profile-quick-stats {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.profile-quick-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(96, 74, 59, 0.08);
}

.profile-quick-stat:last-of-type {
  border-bottom: 0;
}

.profile-quick-stat span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-quick-stat strong {
  font-size: 1rem;
}

.profile-dropdown-button {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
  box-shadow: none;
}

.profile-avatar-image {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 18px rgba(61, 44, 33, 0.14);
  flex-shrink: 0;
}

.profile-button-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.profile-button-copy strong,
.profile-button-copy small {
  display: block;
}

.profile-button-copy strong {
  font-size: 1.02rem;
  font-weight: 800;
}

.profile-button-copy small {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-cta-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #fffaf3;
  box-shadow: 0 18px 32px rgba(234, 153, 97, 0.28);
}

.hero-cta-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(255, 240, 222, 0.88);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.hero-cta-primary .hero-cta-icon {
  background: rgba(255, 255, 255, 0.22);
}

.hero-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-cta-copy strong,
.hero-cta-copy small {
  display: block;
}

.hero-cta-copy strong {
  font-size: 1rem;
  font-weight: 800;
}

.hero-cta-copy small {
  color: var(--muted);
  line-height: 1.25;
}

#goFavoritesButton .hero-cta-icon {
  color: var(--accent-deep);
}

#goOnlineButton .hero-cta-icon {
  color: #7d5ef0;
  background: rgba(125, 94, 240, 0.14);
}

.hero-cta-primary .hero-cta-copy small {
  color: rgba(255, 250, 243, 0.82);
}

.status-notice {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 248, 240, 0.96);
  border: 1px solid rgba(240, 179, 107, 0.22);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(61, 44, 33, 0.06);
}

.status-notice[data-kind="error"] {
  background: var(--danger-panel);
  border-color: rgba(143, 74, 74, 0.16);
  color: var(--danger-text);
}

.status-notice[data-kind="loading"] {
  background: rgba(248, 242, 232, 0.98);
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.choice-card:hover,
.count-pill:hover,
.hero-cta:hover,
.profile-button:hover,
.story-actor-button:hover,
.profile-save-button:hover,
.actor-button:hover,
.mcq-option:hover {
  transform: translateY(-2px);
}

.secondary-button:hover,
.ghost-button:hover,
.count-pill:hover,
.choice-card:hover,
.hero-cta:hover,
.profile-button:hover,
.story-actor-button:hover,
.profile-save-button:hover {
  box-shadow: var(--lift-shadow);
}

.primary-button:hover,
.hero-cta-primary:hover {
  box-shadow: 0 22px 36px rgba(234, 153, 97, 0.34);
}

.secondary-button:hover,
.ghost-button:hover,
.count-pill:hover,
.choice-card:hover,
.hero-cta:hover,
.mcq-option:hover {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf3;
}

.secondary-button:hover,
.ghost-button:hover,
.count-pill:hover {
  box-shadow: 0 18px 32px rgba(234, 153, 97, 0.22);
}

.choice-card:hover .choice-title,
.choice-card:hover .choice-copy,
.hero-cta:hover .hero-cta-copy small {
  color: #fffaf3;
}

.choice-card:hover .choice-badge,
.hero-cta:hover .hero-cta-icon,
.secondary-button:hover .button-icon,
.ghost-button:hover .button-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fffaf3;
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.choice-card:active,
.count-pill:active,
.profile-button:active,
.hero-cta:active,
.story-actor-button:active,
.profile-save-button:active,
.actor-button:active,
.mcq-option:active {
  transform: translateY(0) scale(0.98);
}

.mcq-option.is-selected:hover,
.mcq-option.is-correct:hover,
.mcq-option.is-wrong:hover,
.mcq-option.is-flash-correct:hover,
.mcq-option.is-flash-wrong:hover {
  border-color: inherit;
  color: inherit;
}

.mcq-option:hover {
  box-shadow: 0 18px 32px rgba(234, 153, 97, 0.28);
}

.profile-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(234, 153, 97, 0.22);
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 22px;
}

.stat-card,
.quiz-score-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 24px rgba(61, 44, 33, 0.06);
}

.stat-label,
.quiz-score-card span,
.film-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-card strong,
.quiz-score-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.online-grid-single {
  grid-template-columns: 1fr;
}

.choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border: 1px solid rgba(96, 74, 59, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 237, 0.95));
  box-shadow: 0 18px 38px rgba(61, 44, 33, 0.09);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

.choice-badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  font-size: 1.35rem;
}

.choice-badge-text {
  background: linear-gradient(135deg, #f8dfc7, #f4caa3);
  color: #8b5f39;
}

.choice-badge-favorite {
  color: #b88900;
  text-shadow: 0 1px 0 rgba(120, 80, 0, 0.12);
}

.choice-badge-mcq {
  background: linear-gradient(135deg, #f8d9d6, #f1c1ce);
  color: #8d5160;
}

.quiz-type-card .choice-badge {
  background: linear-gradient(135deg, #f8d9d6, #f1c1ce);
  color: #8d5160;
}

.choice-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #5e4336;
}

.choice-copy {
  color: var(--muted);
  line-height: 1.6;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.count-pill {
  padding: 14px 18px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(61, 44, 33, 0.06);
}

.count-pill.is-selected,
.count-pill.is-selected:hover,
.count-pill.is-selected:focus-visible,
.count-pill.is-selected:active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf3;
  box-shadow: 0 18px 32px rgba(234, 153, 97, 0.26);
}

#screen-home .hero-actions,
#screen-quiz-count .hero-actions,
#screen-quiz-result .hero-actions {
  position: relative;
  z-index: 1;
}

#screen-home h1,
#screen-quiz-mode h2,
#screen-quiz-count h2,
#screen-quiz-result h2 {
  position: relative;
  z-index: 1;
}

#screen-home .intro,
#screen-quiz-mode .intro,
#screen-quiz-count .intro,
#screen-quiz-result .intro,
#screen-quiz-mode .choice-grid,
#screen-quiz-count .pill-row,
#screen-quiz-result .result-stats {
  position: relative;
  z-index: 1;
}

.game-shell {
  min-height: calc(100dvh - 120px);
  display: grid;
  place-items: start center;
  padding-top: 6px;
}

.game-stage {
  width: min(720px, calc(100vw - 24px));
  display: grid;
  gap: clamp(7px, 1.05vw, 11px);
  justify-items: center;
  animation: fadeUp 360ms ease;
}

.quiz-live-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(4px, 0.7vw, 6px);
  width: min(100%, 360px);
}

.culture-timer-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, 640px);
}

.culture-timer-track {
  position: relative;
  flex: 1 1 auto;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(240, 179, 107, 0.16);
  border: 1px solid rgba(240, 179, 107, 0.22);
  box-shadow: inset 0 1px 2px rgba(61, 44, 33, 0.08);
}

.culture-timer-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform-origin: left center;
  background: linear-gradient(90deg, #f4b35b 0%, #f19b43 55%, #e67b2f 100%);
}

.culture-timer-value {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 108px;
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(240, 179, 107, 0.24);
  box-shadow: 0 10px 24px rgba(61, 44, 33, 0.08);
  color: var(--text);
}

.culture-timer-value span {
  font-size: 0.82rem;
}

.culture-timer-value strong {
  font-size: 1.25rem;
}

.quiz-live-pill {
  min-width: 130px;
  padding: 10px 16px;
  border-radius: 999px;
  text-align: center;
  border: 1px solid var(--line);
}

.quiz-live-pill span {
  display: block;
  font-size: 0.82rem;
}

.quiz-live-pill strong {
  display: block;
  margin-top: 2px;
  font-size: 1.15rem;
}

.quiz-live-pill-correct {
  background: var(--success-panel);
  color: var(--success-text);
}

.quiz-live-pill-wrong {
  background: var(--danger-panel);
  color: var(--danger-text);
}

.quiz-live-pill-correct.is-flash {
  background: var(--success-panel-strong);
}

.quiz-live-pill-wrong.is-flash {
  background: var(--danger-panel-strong);
}

.game-image-frame {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.game-copy {
  width: min(100%, 360px);
  text-align: center;
}

.game-hint {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
}

.favorite-star-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(217, 122, 52, 0.2);
  background: rgba(255, 248, 240, 0.94);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(61, 44, 33, 0.08);
  font-size: 1.2rem;
  line-height: 1;
  flex: 0 0 auto;
  text-shadow: 0 1px 2px rgba(106, 72, 39, 0.22);
  -webkit-text-stroke: 1px rgba(18, 18, 18, 0.88);
}

.favorite-star-button:hover,
.favorite-star-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(217, 122, 52, 0.34);
}

.favorite-star-button.is-favorited {
  background: rgba(255, 248, 240, 0.94);
  color: #d97a34;
  border-color: rgba(217, 122, 52, 0.34);
  box-shadow: 0 10px 20px rgba(61, 44, 33, 0.1);
}

.favorite-star-button-image {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  z-index: 2;
  width: 42px;
  height: 42px;
  pointer-events: auto;
  box-shadow: 0 10px 20px rgba(36, 24, 18, 0.18);
}

.actor-card .favorite-star-button-image,
.info-card .favorite-star-button-image {
  pointer-events: auto;
}

.favorite-star-button-inline {
  flex: 0 0 auto;
}

.quiz-name-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
}

.answer-zone {
  width: min(100%, 360px);
}

.quiz-reveal-answer {
  display: block;
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.quiz-reveal-answer-value {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

#screen-quiz-play .mcq-answer-zone,
#screen-quiz-play #mcqAnswerZone {
  margin-top: 1px;
}

#screen-quiz-play .answer-zone {
  margin-top: 0;
}

#screen-quiz-play.is-film-quiz .game-copy {
  display: none;
}

#screen-quiz-play.is-film-quiz .answer-zone {
  margin-top: 0;
}

#screen-quiz-play.is-film-quiz .mcq-answer-zone {
  margin-top: 0;
}

.online-panel {
  display: grid;
  gap: 22px;
}

.online-subpage {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.online-view {
  display: grid;
  gap: 14px;
}

.online-list {
  display: grid;
  gap: 10px;
}

.online-search-row {
  display: grid;
  gap: 12px;
}

.online-search-result {
  display: grid;
  gap: 10px;
}

.online-card,
.online-list-item {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(61, 44, 33, 0.06);
}

.online-list-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.online-list-item.is-current-user {
  border-color: rgba(240, 162, 92, 0.5);
  background: rgba(255, 245, 231, 0.96);
}

.online-avatar,
.online-profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(234, 153, 97, 0.18);
  background: rgba(255, 255, 255, 0.85);
}

.online-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

.online-list-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.online-list-item strong {
  font-size: 1rem;
  line-height: 1.2;
}

.online-list-item small {
  color: var(--muted);
  line-height: 1.35;
}

.online-list-copy strong,
.online-list-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.online-profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(61, 44, 33, 0.06);
}

.online-profile-meta {
  display: grid;
  gap: 4px;
}

.online-profile-meta strong {
  font-size: 1.12rem;
}

.online-profile-meta small {
  color: var(--muted);
}

.online-inline-notice {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.online-empty-state {
  text-align: center;
  color: var(--muted);
  font-weight: 500;
}

.answer-input {
  width: 100%;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
  text-align: center;
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease, color 220ms ease;
}

.answer-input::placeholder {
  color: rgba(118, 102, 93, 0.82);
}

.answer-input:focus {
  border-color: rgba(234, 153, 97, 0.44);
  box-shadow: 0 0 0 5px rgba(240, 179, 107, 0.18);
}

.answer-input.is-correct {
  background: var(--success-panel);
  border-color: rgba(80, 143, 98, 0.18);
  color: var(--success-text);
  box-shadow: 0 0 0 5px rgba(196, 235, 208, 0.5);
}

.answer-input.is-wrong {
  background: var(--danger-panel);
  border-color: rgba(143, 74, 74, 0.16);
  color: var(--danger-text);
  box-shadow: 0 0 0 5px rgba(244, 198, 192, 0.52);
}

.answer-input.is-flash-correct {
  background: var(--success-panel-strong);
}

.answer-input.is-flash-wrong {
  background: var(--danger-panel-strong);
}

.mcq-grid {
  display: grid;
  gap: 6px;
}

.mcq-option {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, transform 180ms ease, box-shadow 220ms ease;
}

.mcq-option.is-selected {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf3;
  box-shadow: 0 18px 32px rgba(234, 153, 97, 0.28);
}

.mcq-option.is-correct {
  border-color: rgba(80, 143, 98, 0.28);
  background: var(--success-panel);
  color: var(--success-text);
}

.mcq-option.is-wrong {
  border-color: rgba(143, 74, 74, 0.22);
  background: var(--danger-panel);
  color: var(--danger-text);
}

.mcq-option.is-flash-correct {
  background: var(--success-panel-strong);
}

.mcq-option.is-flash-wrong {
  background: var(--danger-panel-strong);
}

.profile-stage-description {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
  max-width: 34ch;
}
