/* ==========================================================================
   GSM Design System — Swiss Minimal
   ==========================================================================
   Color palette, typography, and component overrides for the
   Groundstreet Society Manager.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --gsm-bg:        #FAFAFA;
  --gsm-surface:   #FFFFFF;
  --gsm-border:    #E5E5E5;
  --gsm-text:      #1A1A1A;
  --gsm-text-secondary: #6B6B6B;
  --gsm-accent:    #E63946;
  --gsm-accent-hover: #C62D39;
  --gsm-success:   #2D936C;
  --gsm-warning:   #F4A261;
  --gsm-danger:    #E63946;
  --gsm-info:      #457B9D;

  /* Typography */
  --gsm-font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gsm-font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;

  /* Font sizes */
  --gsm-fs-xs:   0.75rem;   /* 12px */
  --gsm-fs-sm:   0.8125rem; /* 13px */
  --gsm-fs-base: 0.875rem;  /* 14px */
  --gsm-fs-md:   1rem;      /* 16px */
  --gsm-fs-lg:   1.25rem;   /* 20px */
  --gsm-fs-xl:   1.5rem;    /* 24px */
  --gsm-fs-2xl:  2rem;      /* 32px */

  /* Spacing */
  --gsm-radius:    6px;
  --gsm-radius-lg: 10px;

  /* Shadows */
  --gsm-shadow-sm:  0 1px 2px rgba(0,0,0,0.04);
  --gsm-shadow:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --gsm-shadow-md:  0 4px 6px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --gsm-shadow-lg:  0 10px 15px rgba(0,0,0,0.06), 0 4px 6px rgba(0,0,0,0.04);

  /* Transitions */
  --gsm-transition: 150ms ease;
}

/* ---------- Base ---------- */
html {
  font-size: 16px;
}

body {
  font-family: var(--gsm-font);
  font-size: var(--gsm-fs-base);
  color: var(--gsm-text);
  background-color: var(--gsm-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 60px; /* offset for fixed navbar */
}

.gsm-games-page {
  padding-top: calc(60px + env(safe-area-inset-top));
  padding-bottom: 1.5rem;
}

.gsm-yatzy-fullscreen.gsm-games-page {
  padding-bottom: 0;
}

.gsm-games-shell {
  padding-top: 1.5rem;
  padding-bottom: 1rem;
  padding-left: clamp(0.5rem, 2vw, 1.5rem);
  padding-right: clamp(0.5rem, 2vw, 1.5rem);
  overflow-x: clip;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--gsm-text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--gsm-fs-2xl); }
h2 { font-size: var(--gsm-fs-xl); }
h3 { font-size: var(--gsm-fs-lg); }
h4 { font-size: var(--gsm-fs-md); }

.text-muted,
.text-secondary {
  color: var(--gsm-text-secondary) !important;
}

a {
  color: var(--gsm-text);
  text-decoration: none;
  transition: color var(--gsm-transition);
}

a:hover {
  color: var(--gsm-accent);
}

/* ---------- Navbar ---------- */
.navbar {
  background-color: var(--gsm-surface) !important;
  border-bottom: 1px solid var(--gsm-border);
  box-shadow: var(--gsm-shadow-sm);
  padding: 0.5rem 1rem;
  min-height: 56px;
}

.navbar .navbar-brand {
  font-weight: 700;
  font-size: var(--gsm-fs-lg);
  color: var(--gsm-accent) !important;
  letter-spacing: -0.02em;
}

.navbar .nav-link {
  color: var(--gsm-text) !important;
  font-size: var(--gsm-fs-sm);
  font-weight: 500;
  padding: 0.5rem 0.75rem !important;
  border-radius: var(--gsm-radius);
  transition: background-color var(--gsm-transition), color var(--gsm-transition);
}

.navbar .nav-link:hover {
  color: var(--gsm-accent) !important;
  background-color: rgba(230, 57, 70, 0.06);
}

.navbar .nav-item.active > .nav-link,
.navbar .nav-link.active {
  color: var(--gsm-accent) !important;
}

.navbar .dropdown-menu {
  border: 1px solid var(--gsm-border);
  border-radius: var(--gsm-radius);
  box-shadow: var(--gsm-shadow-md);
  padding: 0.375rem 0;
  margin-top: 0.25rem;
  background-color: var(--gsm-surface);
}

.navbar .dropdown-item {
  font-size: var(--gsm-fs-sm);
  padding: 0.5rem 1rem;
  color: var(--gsm-text);
  transition: background-color var(--gsm-transition);
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: rgba(230, 57, 70, 0.06);
  color: var(--gsm-accent);
}

.navbar-toggler {
  border: 1px solid var(--gsm-border) !important;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231A1A1A' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ---------- Cards ---------- */
.card {
  background-color: var(--gsm-surface);
  border: 1px solid var(--gsm-border);
  border-radius: var(--gsm-radius-lg);
  box-shadow: var(--gsm-shadow-sm);
  transition: box-shadow var(--gsm-transition);
  display: block; /* override the old inline-block from custom.css */
}

.card:hover {
  box-shadow: var(--gsm-shadow);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--gsm-border);
  font-weight: 600;
  font-size: var(--gsm-fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gsm-text-secondary);
  padding: 1rem 1.25rem;
}

.card-body {
  padding: 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  font-size: var(--gsm-fs-sm);
  font-weight: 500;
  border-radius: var(--gsm-radius);
  padding: 0.5rem 1rem;
  transition: all var(--gsm-transition);
  border: none;
  letter-spacing: 0.01em;
}

.btn-primary,
.btn-danger {
  background-color: var(--gsm-accent);
  color: #fff;
  border: none;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-danger:hover,
.btn-danger:focus {
  background-color: var(--gsm-accent-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.25);
}

.btn-success {
  background-color: var(--gsm-success);
  border: none;
  color: #fff;
}

.btn-success:hover,
.btn-success:focus {
  background-color: #247a59;
  color: #fff;
}

.btn-outline-primary {
  color: var(--gsm-accent);
  border: 1px solid var(--gsm-accent);
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--gsm-accent);
  color: #fff;
}

.btn-secondary,
.btn-outline-secondary {
  background-color: transparent;
  color: var(--gsm-text);
  border: 1px solid var(--gsm-border);
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
  background-color: var(--gsm-bg);
  border-color: #ccc;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: var(--gsm-fs-xs);
}

.btn-lg {
  padding: 0.65rem 1.5rem;
  font-size: var(--gsm-fs-md);
}

/* ---------- Tables ---------- */
.table {
  font-size: var(--gsm-fs-sm);
  border-color: var(--gsm-border);
}

.table > thead > tr > th {
  font-weight: 600;
  font-size: var(--gsm-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gsm-text-secondary);
  border-bottom: 2px solid var(--gsm-border);
  padding: 0.75rem;
  white-space: nowrap;
}

.table > tbody > tr > td {
  padding: 0.65rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gsm-border);
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
  background-color: rgba(0, 0, 0, 0.015);
}

.table-hover > tbody > tr:hover > td {
  background-color: rgba(230, 57, 70, 0.03);
}

/* Tablesorter header arrows */
.tablesorter-header {
  cursor: pointer;
  position: relative;
  padding-right: 1.25rem !important;
}

.tablesorter-header::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.5rem;
  vertical-align: middle;
  opacity: 0.3;
}

.tablesorter-headerAsc::after {
  content: '\2191';
  opacity: 0.7;
}

.tablesorter-headerDesc::after {
  content: '\2193';
  opacity: 0.7;
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
  font-size: var(--gsm-fs-base);
  border: 1px solid var(--gsm-border);
  border-radius: var(--gsm-radius);
  padding: 0.5rem 0.75rem;
  background-color: var(--gsm-surface);
  color: var(--gsm-text);
  transition: border-color var(--gsm-transition), box-shadow var(--gsm-transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--gsm-accent);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: #B0B0B0;
}

.form-label,
label {
  font-size: var(--gsm-fs-sm);
  font-weight: 500;
  color: var(--gsm-text);
  margin-bottom: 0.3rem;
}

.form-check {
  display: flex;
  align-items: flex-start;
  padding-left: 1rem;
  min-height: 1.5rem;
}

.form-check-input {
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0;
  margin-top: 0.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-label {
  cursor: pointer;
  padding-left: 0.6rem;
  line-height: 1.4;
}

.form-check-input:checked {
  background-color: var(--gsm-accent);
  border-color: var(--gsm-accent);
}

/* ---------- Alerts ---------- */
.alert {
  border-radius: var(--gsm-radius);
  font-size: var(--gsm-fs-sm);
  border: none;
  padding: 0.75rem 1rem;
}

.alert-dismissible {
  padding-right: 2.5rem;
}

.alert-dismissible .btn-close {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  padding: 0.5rem;
}

.alert-success {
  background-color: #ecf9f3;
  color: #1a6b4a;
}

.alert-danger {
  background-color: #fdecea;
  color: #a4262c;
}

.alert-warning {
  background-color: #fff8ed;
  color: #8a6d3b;
}

.alert-info {
  background-color: #eef4f8;
  color: #31708f;
}

/* ---------- Badges ---------- */
.badge {
  font-size: var(--gsm-fs-xs);
  font-weight: 500;
  padding: 0.3em 0.6em;
  border-radius: 4px;
}

.badge.bg-primary,
.badge.badge-primary {
  background-color: var(--gsm-accent) !important;
}

.badge.bg-success,
.badge.badge-success {
  background-color: var(--gsm-success) !important;
}

/* ---------- Modals ---------- */
.modal-content {
  border: none;
  border-radius: var(--gsm-radius-lg);
  box-shadow: var(--gsm-shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--gsm-border);
  padding: 1rem 1.25rem;
}

.modal-header .modal-title {
  font-size: var(--gsm-fs-md);
  font-weight: 600;
}

.modal-footer {
  border-top: 1px solid var(--gsm-border);
  padding: 0.75rem 1.25rem;
}

.modal-body {
  padding: 1.25rem;
}

/* ---------- Login Page ---------- */
.gsm-login-wrapper {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.gsm-login-card {
  background: var(--gsm-surface);
  border: 1px solid var(--gsm-border);
  border-radius: var(--gsm-radius-lg);
  box-shadow: var(--gsm-shadow);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.gsm-login-card h2 {
  font-size: var(--gsm-fs-xl);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.gsm-login-card .gsm-login-subtitle {
  font-size: var(--gsm-fs-sm);
  color: var(--gsm-text-secondary);
  margin-bottom: 1.5rem;
}

.gsm-login-card .btn-primary {
  width: 100%;
  padding: 0.6rem;
  font-size: var(--gsm-fs-base);
  margin-top: 0.5rem;
}

/* ---------- Dashboard ---------- */
.gsm-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .gsm-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.gsm-chart-card {
  background: var(--gsm-surface);
  border: 1px solid var(--gsm-border);
  border-radius: var(--gsm-radius-lg);
  box-shadow: var(--gsm-shadow-sm);
  padding: 1.25rem;
}

.gsm-chart-card h4 {
  font-size: var(--gsm-fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gsm-text-secondary);
  margin-bottom: 1rem;
}

/* ---------- Exchange / Marketplace ---------- */
.gsm-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.gsm-member-card {
  background: var(--gsm-surface);
  border: 1px solid var(--gsm-border);
  border-radius: var(--gsm-radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: box-shadow var(--gsm-transition), border-color var(--gsm-transition);
}

.gsm-member-card:hover {
  box-shadow: var(--gsm-shadow-md);
  border-color: var(--gsm-accent);
}

.gsm-member-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.gsm-member-card .name {
  font-size: var(--gsm-fs-sm);
  font-weight: 600;
  color: var(--gsm-text);
}

.gsm-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.gsm-product-card {
  background: var(--gsm-surface);
  border: 1px solid var(--gsm-border);
  border-radius: var(--gsm-radius);
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: box-shadow var(--gsm-transition), border-color var(--gsm-transition);
}

.gsm-product-card:hover {
  box-shadow: var(--gsm-shadow);
  border-color: var(--gsm-accent);
}

.gsm-product-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.gsm-product-card .product-name {
  font-size: var(--gsm-fs-sm);
  font-weight: 500;
}

.gsm-product-card .product-price {
  font-size: var(--gsm-fs-xs);
  color: var(--gsm-text-secondary);
  margin-top: 0.25rem;
}

/* ---------- Cart Sidebar (Floating Overlay) ---------- */
#sidebar {
  width: 280px;
  min-height: 0;
  position: fixed;
  right: 0;
  top: 0;
  margin-top: 56px;
  background-color: var(--gsm-surface);
  border-left: 1px solid var(--gsm-border);
  padding: 1rem;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
  z-index: 1040;
  overflow-y: auto;
  max-height: calc(100vh - 56px);
  transform: translateX(0);
  transition: transform 0.3s ease;
}

#sidebar.active {
  transform: translateX(100%);
}

.wrapper {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 56px);
  align-items: stretch;
}

.wrapper.active {
  width: 100%;
}

.badge.shoppingcart {
  width: 240px;
  height: auto;
  min-height: 50px;
  background-color: var(--gsm-surface);
  border: 1px solid var(--gsm-border);
  border-radius: var(--gsm-radius);
  color: var(--gsm-text);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.375rem;
  font-size: var(--gsm-fs-sm);
  font-weight: 400;
  text-align: left;
}

.badge.shoppingcart.checkout {
  width: 240px;
  min-height: 44px;
  background-color: var(--gsm-accent);
  color: #fff;
  border: none;
  border-radius: var(--gsm-radius);
  position: relative;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--gsm-fs-sm);
  cursor: pointer;
  transition: background-color var(--gsm-transition);
}

.badge.shoppingcart.checkout:hover {
  background-color: var(--gsm-accent-hover);
}

.warenkorbActive {
  color: var(--gsm-accent) !important;
}

/* ---------- Fees / Horizontal Scroll Cards ---------- */
.scrolling-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.scrolling-wrapper .card {
  display: inline-block;
  white-space: normal;
  vertical-align: top;
}

.gsm-fee-card {
  border-left: 3px solid transparent;
  transition: border-color var(--gsm-transition);
}

.gsm-fee-card.selected,
.gsm-fee-card:hover {
  border-left-color: var(--gsm-accent);
}

/* ---------- Protocol / Bottom Filter Bar ---------- */
.gsm-filter-bar {
  background: var(--gsm-surface);
  border-top: 1px solid var(--gsm-border);
  padding: 0.75rem 1rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1020;
  box-shadow: 0 -1px 3px rgba(0,0,0,0.04);
}

/* ---------- Camera Page ---------- */
.cam_pics {
  padding: 2px;
  max-width: 100%;
  height: auto;
  border-radius: var(--gsm-radius);
  border: 1px solid var(--gsm-border);
}

/* ---------- Utility Classes ---------- */
.gsm-page-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gsm-border);
}

.gsm-page-header h2 {
  margin-bottom: 0;
}

.gsm-section {
  margin-bottom: 1.5rem;
}

.gsm-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gsm-text-secondary);
}

.gsm-empty-state i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

/* ---------- Stacked Alert Toasts ---------- */
.gsm-alert-stack {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  width: 420px;
  max-width: calc(100vw - 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gsm-auto-dismiss {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gsm-auto-dismiss.gsm-alert-visible {
  opacity: 1;
  transform: translateY(0);
}

.gsm-auto-dismiss.gsm-alert-exit {
  opacity: 0;
  transform: translateY(-20px);
}

/* ---------- General Alert Fly-out ---------- */
.gsm-flyout {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gsm-flyout.gsm-alert-visible {
  opacity: 1;
  transform: translateY(0);
}

.gsm-flyout.gsm-alert-exit {
  opacity: 0;
  transform: translateY(-20px);
}

/* ---------- Loading Spinner Overlay ---------- */
.gsm-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gsm-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gsm-border);
  border-top-color: var(--gsm-accent);
  border-radius: 50%;
  animation: gsm-spin 0.6s linear infinite;
}

@keyframes gsm-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Miscellaneous Overrides ---------- */
.container .content_top {
  position: absolute;
  top: 5px;
  left: 5px;
}

.container .content_bottom {
  position: absolute;
  bottom: 5px;
  right: 5px;
}

.container .content_bottom_left {
  position: absolute;
  bottom: 5px;
  left: 5px;
}

.vertical-text {
  transform: rotate(270deg);
  position: absolute;
  bottom: 100px;
  left: -20px;
}

.col.centered,
.centered {
  align-self: center;
  text-align: center;
}

/* Pagination */
.page-link {
  color: var(--gsm-text);
  border-color: var(--gsm-border);
  font-size: var(--gsm-fs-sm);
}

.page-item.active .page-link {
  background-color: var(--gsm-accent);
  border-color: var(--gsm-accent);
  color: #fff;
}

.page-link:hover {
  color: var(--gsm-accent);
}

/* Chart.js canvas containers */
canvas {
  max-width: 100%;
}

/* ---------- Responsive ---------- */
@media (max-width: 576px) {
  .gsm-login-card {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }

  .gsm-member-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  #sidebar {
    width: 100%;
  }
}

/* ==========================================================================
   Darts Game Styles
   ========================================================================== */

/* Container */
.gsm-darts-container {
  max-width: 72rem;
  margin: 0 auto;
}

.gsm-darts-container .row.g-3,
.gsm-darts-container .row.g-4 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

/* Navigation Tabs */
.gsm-darts-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gsm-darts-nav .btn.active {
  pointer-events: none;
}

.gsm-darts-nav .btn-primary.active,
.gsm-darts-nav .btn-outline-primary.active {
  background-color: var(--gsm-accent);
  border-color: var(--gsm-accent);
  color: #fff;
}

/* Game Selection Cards */
.gsm-darts-game-card {
  cursor: pointer;
  transition: box-shadow var(--gsm-transition), border-color var(--gsm-transition), transform var(--gsm-transition);
}

.gsm-darts-game-card:hover {
  box-shadow: var(--gsm-shadow-md);
  border-color: var(--gsm-accent);
  transform: translateY(-0.125rem);
}

.gsm-darts-game-icon {
  color: var(--gsm-accent);
}

/* Player checkboxes in setup */
.gsm-darts-player-check {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gsm-border);
}

.gsm-darts-player-check:last-child {
  border-bottom: none;
}

/* Scoreboard active row */
.gsm-darts-active-row {
  background-color: rgba(230, 57, 70, 0.08) !important;
}

.gsm-darts-active-row td {
  border-bottom-color: rgba(230, 57, 70, 0.2) !important;
}

.gsm-darts-score-cell {
  font-size: var(--gsm-fs-lg);
  font-weight: 700;
  font-family: var(--gsm-font-mono);
}

/* Current throw dart slots */
.gsm-darts-current-throw {
  display: flex;
  gap: 0.75rem;
}

.gsm-darts-dart-slot {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border: 0.125rem solid var(--gsm-border);
  border-radius: var(--gsm-radius);
  background: var(--gsm-bg);
  transition: border-color var(--gsm-transition), background var(--gsm-transition);
}

.gsm-darts-dart-slot.gsm-darts-dart-active {
  border-color: var(--gsm-accent);
  background: rgba(230, 57, 70, 0.04);
}

.gsm-darts-dart-slot.gsm-darts-dart-filled {
  border-color: var(--gsm-success);
  background: rgba(45, 147, 108, 0.06);
}

.gsm-darts-dart-value {
  font-size: var(--gsm-fs-lg);
  font-weight: 700;
  font-family: var(--gsm-font-mono);
  margin-top: 0.25rem;
}

/* Multiplier buttons */
.gsm-darts-multiplier-row {
  display: flex;
  gap: 0.5rem;
}

.gsm-darts-mult-btn {
  flex: 1;
  padding: 0.6rem;
  font-weight: 600;
  font-size: var(--gsm-fs-sm);
  border: 2px solid var(--gsm-border);
  background: var(--gsm-surface);
  color: var(--gsm-text);
  border-radius: var(--gsm-radius);
  transition: all var(--gsm-transition);
}

.gsm-darts-mult-btn:hover {
  border-color: var(--gsm-accent);
  color: var(--gsm-accent);
}

.gsm-darts-mult-btn.active {
  background: var(--gsm-accent);
  border-color: var(--gsm-accent);
  color: #fff;
}

/* Number keypad */
.gsm-darts-keypad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}

.gsm-darts-num-btn {
  padding: 0.75rem 0.25rem;
  font-size: var(--gsm-fs-md);
  font-weight: 600;
  font-family: var(--gsm-font-mono);
  border: 1px solid var(--gsm-border);
  background: var(--gsm-surface);
  color: var(--gsm-text);
  border-radius: var(--gsm-radius);
  transition: all var(--gsm-transition);
  cursor: pointer;
  min-height: 3rem;
}

.gsm-darts-num-btn:hover {
  background: rgba(230, 57, 70, 0.08);
  border-color: var(--gsm-accent);
  color: var(--gsm-accent);
}

.gsm-darts-num-btn:active {
  background: var(--gsm-accent);
  color: #fff;
  transform: scale(0.96);
}

.gsm-darts-bull-btn {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.gsm-darts-bull-btn:hover {
  background: #fde68a;
  border-color: #d97706;
  color: #78350f;
}

.gsm-darts-miss-btn {
  background: var(--gsm-bg);
  color: var(--gsm-text-secondary);
}

/* Bust overlay */
.gsm-darts-bust-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(230, 57, 70, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gsm-darts-bust-in 0.3s ease;
}

.gsm-darts-bust-msg {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: gsm-darts-bust-pulse 0.6s ease infinite alternate;
}

@keyframes gsm-darts-bust-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gsm-darts-bust-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

/* Progress bar for ATC */
.gsm-darts-container .progress {
  background: var(--gsm-border);
  border-radius: 0.25rem;
  overflow: hidden;
}

.gsm-darts-container .progress-bar {
  transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gsm-darts-keypad {
    grid-template-columns: repeat(4, 1fr);
  }

  .gsm-darts-num-btn {
    padding: 0.65rem 0.2rem;
    font-size: var(--gsm-fs-base);
    min-height: 2.75rem;
  }

  .gsm-darts-dart-value {
    font-size: var(--gsm-fs-md);
  }

  .gsm-darts-bust-msg {
    font-size: 2.25rem;
  }
}

@media (max-width: 576px) {
  .gsm-games-page {
    padding-top: calc(60px + env(safe-area-inset-top));
    padding-bottom: 0.75rem;
  }

  .gsm-games-shell {
    padding-top: 0.2rem;
    padding-bottom: 0.5rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .gsm-darts-container {
    max-width: 100%;
  }

  .gsm-darts-nav {
    gap: 0.35rem;
    width: 100%;
  }

  .gsm-darts-nav .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 6.5rem;
    min-width: 0;
    white-space: normal;
    line-height: 1.15;
  }

  .gsm-darts-container .card-header {
    padding: 0.7rem 0.8rem;
  }

  .gsm-darts-container .card-body {
    padding: 0.8rem;
  }

  .gsm-darts-container .table > :not(caption) > * > * {
    padding: 0.45rem 0.5rem;
  }

  .gsm-darts-current-throw {
    gap: 0.4rem;
  }

  .gsm-darts-dart-slot {
    padding: 0.4rem 0.3rem;
  }

  .gsm-darts-dart-slot small {
    font-size: var(--gsm-fs-xs);
  }

  .gsm-darts-game-card .card-body {
    padding: 0.7rem 0.6rem;
  }

  #darts-hs-filter {
    width: 100% !important;
    max-width: 100%;
  }

  .gsm-darts-keypad {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
  }

  .gsm-darts-multiplier-row {
    gap: 0.3rem;
  }

  .gsm-darts-nav .btn {
    font-size: var(--gsm-fs-xs);
    padding: 0.4rem 0.6rem;
  }
}

@media (max-width: 420px) {
  .gsm-darts-nav .btn {
    flex-basis: 100%;
    width: 100%;
    justify-content: flex-start;
  }
}

/* ============================================================
   YATZY — Scorecard (site-consistent theme)
   ============================================================ */

/* ---- 1. Container & Custom Properties ---- */
.gsm-yatzy-container {
  --yatzy-bg:           var(--gsm-bg);
  --yatzy-surface:      var(--gsm-surface);
  --yatzy-surface-alt:  #F2F2F2;
  --yatzy-border:       #CCCCCC;
  --yatzy-border-dark:  #AAAAAA;
  --yatzy-text:         var(--gsm-text);
  --yatzy-text-muted:   var(--gsm-text-secondary);
  --yatzy-filled:       var(--gsm-success);
  --yatzy-zero:         #AAAAAA;
  --yatzy-empty-border: #CCCCCC;
  --yatzy-available-bg: rgba(230, 57, 70, 0.06);
  --yatzy-active-col:   rgba(230, 57, 70, 0.10);
  --yatzy-scale:        1;
  --yatzy-popover-bg:        var(--yatzy-surface);
  --yatzy-popover-shadow:    0 4px 16px rgba(0,0,0,0.15), 0 1px 4px rgba(0,0,0,0.08);
  --yatzy-popover-border:    #CCCCCC;
  --yatzy-die-bg:            #FFFFFF;
  --yatzy-die-border:        #D4D4D4;
  --yatzy-die-dot:           #2B1810;
  --yatzy-die-selected-ring: var(--gsm-accent);
  --yatzy-strike-bg:         rgba(230, 57, 70, 0.08);
  --yatzy-strike-hover:      rgba(230, 57, 70, 0.16);
  --yatzy-turn-bg:           rgba(230, 57, 70, 0.06);
  --yatzy-turn-border:       var(--gsm-accent);
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  height: calc(100vh - var(--navbar-height, 60px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--yatzy-bg);
}

/* ---- 2. Scroll Wrapper ---- */
.gsm-yatzy-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ---- 3. Table Base ---- */
.gsm-yatzy-scorecard {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--yatzy-surface);
  font-family: var(--gsm-font);
  border: 1px solid #AAA !important;
}

.gsm-yatzy-scorecard td,
.gsm-yatzy-scorecard th {

}

/* ---- 4. Header Row ---- */
.gsm-yatzy-header th {
  background: var(--yatzy-surface-alt);
  padding: 0.1875rem 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--yatzy-text);
  text-align: center;
  white-space: nowrap;
}

.gsm-yatzy-header th:first-child {
  text-align: left;
}

/* ---- 5. Category Column (sticky) ---- */
.gsm-yatzy-cat {
  width: 8.75rem;
  min-width: 8.75rem;
  max-width: 8.75rem;
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
  text-align: left;
  padding: 0.125rem 0.375rem;
  vertical-align: middle;
  border: 1px solid #CCC !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 6. Player Columns ---- */
.gsm-yatzy-player {
  min-width: 3.5rem;
  text-align: center;
  padding: 0.1875rem 0.375rem;
}

/* ---- 7. Category Row ---- */
.gsm-yatzy-row {
  background: var(--yatzy-surface);
  border-bottom: 1px solid #CCC !important;
}

.gsm-yatzy-cat-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--yatzy-text);
  line-height: 1.2;
}

.gsm-yatzy-cat-dice {
  display: inline-flex;
  align-items: center;
  margin-right: 0.375rem;
  font-size: 1.4em;
  line-height: 1;
  vertical-align: text-bottom;
}

/* ---- 8. Section Header Row ---- */
.gsm-yatzy-section {
  background: var(--yatzy-surface-alt);
  border-top: 2px solid #AAA !important;
}

.gsm-yatzy-section td {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--yatzy-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.125rem 0.375rem;
  border: 1px solid #CCC !important;
}

/* ---- 9. Subtotal Row ---- */
.gsm-yatzy-subtotal {
  background: var(--yatzy-surface-alt);
  border-top: 2px solid #AAA !important;
}

.gsm-yatzy-subtotal td {
  padding: 0.125rem 0.375rem;
  border: 1px solid #CCC !important;
}

.gsm-yatzy-subtotal .gsm-yatzy-cell {
  font-family: var(--gsm-font-mono);
  font-size: 0.875rem;
  font-weight: 700;
}

/* ---- 10. Bonus Row ---- */
.gsm-yatzy-bonus {
  background: var(--yatzy-surface-alt);
  border-bottom: 1px solid #CCC !important;
}

.gsm-yatzy-bonus td {
  padding: 0.125rem 0.375rem;
  border: 1px solid #CCC !important;
}

.gsm-yatzy-bonus-hint {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--yatzy-text-muted);
}

.gsm-yatzy-bonus-earned {
  color: var(--yatzy-filled);
  font-weight: 700;
}

/* ---- 11. Grand Total Row ---- */
.gsm-yatzy-total {
  background: var(--yatzy-surface-alt);
  border-top: 2px solid #AAA !important;
}

.gsm-yatzy-total td {
  padding: 0.25rem 0.375rem;
  border: 1px solid #AAA !important;
}

.gsm-yatzy-total .gsm-yatzy-cell,
.gsm-yatzy-total .gsm-yatzy-grand-total {
  font-family: var(--gsm-font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--yatzy-text);
}

/* ---- 12. Cell Base ---- */
.gsm-yatzy-cell {
  text-align: center;
  font-family: var(--gsm-font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.2;
  color: var(--yatzy-text);
  padding: 0.125rem 0.375rem;
  border: 1px solid #CCC !important;
}

/* ---- 13. Cell States ---- */
.gsm-yatzy-cell-empty {
  border: 1px solid #CCC !important;
  background: transparent;
}

.gsm-yatzy-cell-filled {
  color: var(--yatzy-filled);
  font-weight: 700;
}

.gsm-yatzy-cell-zero {
  color: var(--yatzy-zero);
  font-weight: 700;
  text-decoration: line-through;
  opacity: 0.5;
}

.gsm-yatzy-cell-available {
  cursor: pointer;
  color: var(--yatzy-text-muted);
  font-style: italic;
  font-weight: 400;
  transition: background 0.15s ease;
}

.gsm-yatzy-cell-available:hover {
  background: var(--yatzy-available-bg);
  color: var(--gsm-accent);
  font-weight: 700;
  font-style: normal;
}

/* ---- 14. Active Column (Phase 2 foundation) ---- */
.gsm-yatzy-active-col {
  background: var(--yatzy-active-col);
}

/* ---- 15. Row Hover ---- */
.gsm-yatzy-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* ---- 16. Empty State ---- */
.gsm-yatzy-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--yatzy-text-muted);
}

/* ---- 17. Responsive Breakpoints ---- */
@media (max-width: 767px) {
  .gsm-yatzy-cat {
    width: 7.5rem;
    min-width: 7.5rem;
    max-width: 7.5rem;
  }
}

@media (max-width: 576px) {
  .gsm-yatzy-scorecard {
    font-size: 0.75rem;
  }

  .gsm-yatzy-cat {
    width: 6.5rem;
    min-width: 6.5rem;
    max-width: 6.5rem;
  }

  .gsm-yatzy-total .gsm-yatzy-cell,
  .gsm-yatzy-total .gsm-yatzy-grand-total {
    font-size: 1rem;
  }
}

/* ============ Phase 2: Dice Entry & Score Engine ============ */

/* ---- 18. Turn Indicator Bar ---- */
.gsm-yatzy-turn-bar {
  display: flex;
  align-items: center;
  height: 2rem;
  padding: 0 0.5rem;
  background: var(--yatzy-turn-bg);
  border-left: 0.1875rem solid var(--yatzy-turn-border);
  font-size: 0.75rem;
  transition: background-color 150ms ease;
  flex-shrink: 0;
}
.gsm-yatzy-turn-bar strong { font-weight: 700; }

/* ---- 19. Undo Button ---- */
.gsm-yatzy-undo {
  margin-left: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gsm-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none !important;
}
.gsm-yatzy-undo:hover { text-decoration: underline; }
.gsm-yatzy-undo-disabled { opacity: 0.3; pointer-events: none; }

/* ---- 20. Active Player Header ---- */
.gsm-yatzy-active-player-header {
  border-bottom: 2px solid var(--gsm-accent) !important;
}

/* ---- 21. Cell Interaction States ---- */
.gsm-yatzy-cell-locked {
  pointer-events: none !important;
  cursor: default;
}
.gsm-yatzy-cell-empty.gsm-yatzy-active-col {
  cursor: pointer;
  background: rgba(230, 57, 70, 0.12);
}
.gsm-yatzy-cell-empty:not(.gsm-yatzy-active-col) {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ---- 22. Popover Container ---- */
.gsm-yatzy-popover {
  position: fixed;
  background: #FFFFFF;
  border: 1px solid #CCC !important;
  border-radius: 0.5rem;
  box-shadow: var(--yatzy-popover-shadow);
  min-width: max(12.5rem, 335px);
  max-width: min(23.75rem, calc(100vw - 16px));
  padding: 0;
  z-index: 1000;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}
.gsm-yatzy-popover-open {
  opacity: 1;
  transform: translateY(0);
}
.gsm-yatzy-popover-header {
  background: #FFFFFF;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem 0.5rem 0 0;
  font-size: max(0.75rem, 12px);
  font-weight: 700;
  color: var(--yatzy-text);
}
.gsm-yatzy-popover-body {
  padding: 1rem 0.5rem 0.5rem;
  background: #FFFFFF;
  border-radius: 0 0 0.5rem 0.5rem;
  font-size: max(0.75rem, 12px);
}

/* ---- 23. Overlay Dice ---- */
.gsm-yatzy-overlay-dice {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}
.gsm-yatzy-die {
  cursor: pointer;
  display: inline-block;
  line-height: 0;
  border-radius: 0.375rem;
  transition: transform 0.1s ease;
}
.gsm-yatzy-die:hover { transform: scale(1.08); }

/* ---- 24. Overlay Labels & Scores ---- */
.gsm-yatzy-overlay-row-label {
  font-size: max(0.75rem, 12px);
  font-weight: 700;
  color: var(--yatzy-text);
  margin-bottom: 0.25rem;
}
.gsm-yatzy-overlay-score {
  font-size: max(1rem, 14px);
  font-weight: 700;
  text-align: center;
  margin-top: 0.5rem;
  color: var(--yatzy-text);
}
.gsm-yatzy-overlay-confirm {
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
}
.gsm-yatzy-overlay-confirm:hover {
  background: var(--yatzy-available-bg);
}

/* ---- 25. Chance Grid ---- */
.gsm-yatzy-chance-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.25rem;
}
.gsm-yatzy-chance-cell {
  min-width: max(2.25rem, 32px);
  height: max(2rem, 28px);
  border-radius: 0.25rem;
  border: 1px solid var(--yatzy-die-border) !important;
  background: var(--yatzy-surface);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.gsm-yatzy-chance-cell:hover {
  background: var(--yatzy-available-bg);
  color: var(--gsm-accent);
}

/* ---- 26. Strike Button ---- */
.gsm-yatzy-strike {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: max(2rem, 32px);
  border-radius: 0.25rem;
  background: var(--yatzy-strike-bg);
  border-top: 1px solid var(--yatzy-popover-border) !important;
  margin-top: 0.5rem;
  cursor: pointer;
  font-size: max(0.75rem, 12px);
  font-weight: 400;
  color: var(--yatzy-text);
  transition: background 0.15s ease;
}
.gsm-yatzy-strike:hover {
  background: var(--yatzy-strike-hover);
  color: var(--gsm-danger, #E63946);
}

/* ---- 27. Yatzy Display ---- */
.gsm-yatzy-overlay-yatzy-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gsm-accent);
  text-align: center;
}

/* ============ Phase 3: Game Flow & Persistence ============ */

/* --- New CSS Custom Properties (on .gsm-yatzy-container) --- */
.gsm-yatzy-container {
  position: relative;
  --yatzy-overlay-bg: rgba(255, 255, 255, 0.96);
  --yatzy-overlay-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  --yatzy-winner-bg: rgba(230, 57, 70, 0.06);
  --yatzy-result-winner-bg: rgba(230, 57, 70, 0.06);
  --yatzy-resume-border: var(--gsm-accent);
  --yatzy-drag-ghost-bg: rgba(230, 57, 70, 0.06);
  --yatzy-drag-indicator: var(--gsm-accent);
}

/* --- Game-Over Overlay --- */
.gsm-yatzy-gameover-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: var(--yatzy-overlay-bg);
  box-shadow: var(--yatzy-overlay-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  opacity: 0;
  animation: yatzyOverlayFadeIn 300ms ease-out 200ms forwards;
}
@keyframes yatzyOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gsm-yatzy-winner {
  text-align: center;
  margin-bottom: 1.5rem;
  background: var(--yatzy-winner-bg);
  border-radius: 0.75rem;
  padding: 1.5rem 2rem;
}
.gsm-yatzy-winner-emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.gsm-yatzy-winner h2 {
  font-size: var(--gsm-fs-xl, 1.5rem);
  font-weight: 700;
  color: var(--yatzy-text, #1a1a1a);
  margin-bottom: 0.25rem;
}
.gsm-yatzy-winner-score {
  font-size: var(--gsm-fs-lg, 1.25rem);
  font-weight: 700;
  color: var(--gsm-text-secondary, #6c757d);
  font-family: var(--gsm-font-mono, 'SF Mono', 'Fira Code', monospace);
  margin-bottom: 0;
}

/* --- Ranked Results List --- */
.gsm-yatzy-results-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 22.5rem;
  border: 1px solid var(--gsm-border, #dee2e6) !important;
  border-radius: var(--gsm-radius, 0.375rem);
  overflow: hidden;
}
.gsm-yatzy-result-row {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  border-bottom: 1px solid var(--gsm-border, #dee2e6) !important;
}
.gsm-yatzy-result-row:last-child {
  border-bottom: none !important;
}
.gsm-yatzy-result-winner {
  background: var(--yatzy-result-winner-bg);
}
.gsm-yatzy-result-winner .gsm-yatzy-result-name {
  font-weight: 700;
}
.gsm-yatzy-result-rank {
  width: 1.5rem;
  font-size: var(--gsm-fs-md, 1rem);
  font-weight: 700;
  color: var(--gsm-text-secondary, #6c757d);
}
.gsm-yatzy-result-name {
  flex: 1;
  font-size: var(--gsm-fs-md, 1rem);
  font-weight: 400;
  color: var(--yatzy-text, #1a1a1a);
}
.gsm-yatzy-result-score {
  font-size: var(--gsm-fs-md, 1rem);
  font-weight: 700;
  font-family: var(--gsm-font-mono, 'SF Mono', 'Fira Code', monospace);
  color: var(--yatzy-text, #1a1a1a);
}

/* --- Game-Over Action Buttons --- */
.gsm-yatzy-gameover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
  max-width: 22.5rem;
  width: 100%;
}

/* --- Save Status --- */
.gsm-yatzy-save-status {
  font-size: var(--gsm-fs-xs, 0.75rem);
  margin-top: 0.5rem;
  text-align: center;
}
.gsm-yatzy-save-status.gsm-yatzy-save-success {
  color: var(--gsm-success, #2D936C);
}

/* --- Resume Card --- */
.gsm-yatzy-resume-card {
  border-left: 0.1875rem solid var(--yatzy-resume-border) !important;
  background: var(--yatzy-surface, #FFFFFF);
  border-radius: var(--gsm-radius, 0.375rem);
}
.gsm-yatzy-resume-card .card-body {
  padding: 1rem;
}
.gsm-yatzy-resume-heading {
  font-size: var(--gsm-fs-md, 1rem);
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.gsm-yatzy-resume-detail {
  font-size: var(--gsm-fs-sm, 0.8125rem);
  color: var(--gsm-text-secondary, #6c757d);
  margin-bottom: 0.5rem;
}

/* --- Drag-to-Reorder Column Headers --- */
.gsm-yatzy-header-draggable {
  cursor: grab;
  touch-action: none;
}
.gsm-yatzy-header-draggable:active {
  cursor: grabbing;
}
.gsm-yatzy-drop-target {
  background: rgba(230, 57, 70, 0.15) !important;
  box-shadow: inset 0 0 0 2px var(--gsm-accent, #E63946);
}
.gsm-yatzy-drag-ghost {
  position: absolute;
  opacity: 0.7;
  background: var(--yatzy-drag-ghost-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  z-index: 300;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: var(--gsm-fs-sm, 0.8125rem);
  font-weight: 700;
}
.gsm-yatzy-drag-indicator {
  position: absolute;
  width: 2px;
  background: var(--yatzy-drag-indicator);
  z-index: 250;
  pointer-events: none;
}

/* --- Fullscreen Mode --- */
.gsm-yatzy-fullscreen {
  padding-top: 0 !important;
}
.gsm-yatzy-fullscreen .navbar {
  display: none !important;
}
.gsm-yatzy-fullscreen .gsm-games-shell {
  padding: 0 !important;
  overflow: visible !important;
}
.gsm-yatzy-fullscreen .gsm-yatzy-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  height: 100vh !important;
  width: 100vw;
  max-width: 100vw;
  margin: 0;
}
.gsm-yatzy-fullscreen .gsm-yatzy-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 2rem);
}
.gsm-yatzy-fullscreen .gsm-yatzy-scorecard {
  flex: 1;
}
.gsm-yatzy-fullscreen-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gsm-accent);
  cursor: pointer;
  background: none;
  border: none !important;
  margin-left: 0.5rem;
}
.gsm-yatzy-fullscreen-toggle:hover { text-decoration: underline; }
