input, textarea, select {
  padding: 5px;
  margin-top: 5px;
  border: var(--border-width) solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
  margin: 5px;
}

#wheel-title-display {
  display: flex;
  color: var(--text);
  font-size: 2rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  text-align: center;
}



#show-leave {
  pointer-events: none;
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  color: var(--text);
  border: var(--border-width-big) solid var(--border-strong);
  padding: 15px 20px;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  text-align: center;
  width: 80%;
  min-height: 30px;
  z-index: 999;
}


.create-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 600px;
  margin: auto;
  background: var(--accent-strong);
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: var(--border-width) solid var(--border-strong);
  color: var(--text);
  padding: 10px 0;
}

#wheelOfFortune:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

#wheel-container:not(:has(#wheel-creator)) {
  justify-content: center;
  width: auto;
}


#wheel-container {
  display: flex;
  position: relative;
  height: auto;
  padding-right: 20px;
  left: 10px;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 20px;
}

#wheel-creator {
  display: flex;
  flex-direction: column;
  width: 45%;
  min-width: 400px;
  max-height: 100%;
  padding: 20px;
  background-color: var(--bg);
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius);
  z-index: 1;
  margin-right: 10px;
  color: var(--text);
  border: var(--border-width) solid var(--border-strong);
}

#title-container,
#add-segment-container {
  background: var(--bg);
  padding: 10px 0;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
}

#segment-list-container {
  background-color: var(--grid-bg-color);
  flex: 1;
  overflow-y: auto;
  min-height: 300px;
  max-height: calc(60vh - 200px);
  padding: 10px 0;
}

.segment {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem;
  background-color: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
}

#wheelOfFortune {
    position: relative;
    width: min(80vw, 500px);
    aspect-ratio: 1 / 1;
    background: var(--bg);
    border-radius: 50%;
    box-shadow: 0px 0px 20px 1px var(--accent-strong);
    overflow: hidden;
}

.wheel-inner {
    position: absolute;
    inset: 10px; /* THIS replaces padding */
    border-radius: 50%;
}

#wheel {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#spin {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: bold;
  user-select: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20%;
  aspect-ratio: 1;
  height: auto;
  transform: translate(-50%, -50%);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 0 0 8px var(--accent-strong),
              0 0px 15px 10px rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  z-index: 2;
  flex-direction: column;
}

#spin-multi {
    font-size: clamp(0.8rem, 2vw, 1rem);
}


/* Adjust the pointer triangle to remain proportional */
#spin::after {
  content: "";
  position: absolute;
  top: -17px;
  border: 12px solid transparent;
  border-bottom-color: var(--accent-strong); /* white -> var */
  border-top: none;
}

/* Title Section */
#title-section {
  color: var(--text);
  margin-bottom: 20px;
  padding: 10px;
}

#bg-color-pickers,
#font-color-pickers {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-picker-group input[type="color"] {
  width: 30px;
  height: 30px;
  cursor: pointer;
  border: var(--border-width) solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color 0.3s;
}

.color-picker-group input[type="color"]:hover {
  border-color: #888; /* Optional: you can define a --hover-border-color if you want */
}

.color-picker-group button {
  background-color: #e74c3c; /* Consider adding a variable for delete/danger buttons */
  color: var(--text);
  border: none;
  border-radius: calc(var(--radius) / 2);
  cursor: pointer;
  margin-right: 5px;
  font-size: 0.575rem;
  transition: background-color 0.3s;
}

.color-picker-group button:hover {
  background-color: #c0392b; /* Same here for hover-danger if needed */
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-strong);
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}


.fontslider {
  width: 170px;
}

.edit-div {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.edit-button {
  cursor: pointer;
  font-weight: bold;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: 20px;
  margin-left: 10px;
  color: var(--text);
  display: inline-block;
  font-size: 30px;
  justify-content: center;
  align-items: center;
  display: flex;
  margin-left: auto;
}
.edit-button a {
  text-decoration: none;
  color: var(--text);
}

/* Main container */
#wheel-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 900px;
  margin: auto;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: var(--border-width) solid var(--border-strong);
}

.topflex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Profile & Title Section */
#wheel-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  background: var(--accent-strong);
  border-radius: var(--radius);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  border-bottom: var(--border-width) solid var(--border-strong);
  margin: 0;
}

#wheel-header-box {
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.profile-section {
  display: flex;
  align-items: center;
}

.profile-pic {
  width: 50px;
  aspect-ratio: 1 / 1;
  max-width: 100px;
  max-height: 100px;
  border-radius: 50%;
  border: var(--border-width-big) solid var(--border-strong);
  background: #888; /* fallback for no image */
  overflow: hidden;
  display: flex;
  margin-right: 10px;
  justify-content: center;
  align-items: center;
  box-shadow: 3px 3px 5px 1px var(--bg);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Username */
.username a {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--link-color);
  text-decoration: none;
  margin-bottom: 10px;
}

/* Wheel Title */
#wheel-title-display {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  color: var(--text);
}



.flex-container {
  display: flex;
  margin-right: 10px;
}
.column {
  flex-direction: column;
}

/* Wheel */
#wheelOfFortune {
  position: relative;
  /* left: 10px; */
}

/* Wheel Result Display */
#wheel-result {
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  color: var(--text);
  border: var(--border-width-big) solid var(--border-strong);
  padding: 15px 20px;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  text-align: center;
  width: 80%;
  min-height: 30px;
  z-index: 999;
}

/* Input Groups */
.input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.input-group > div {
  display: flex;
  flex-direction: column;
  min-width: 100px;
  flex: 1;
}

.smallinput {
  width: 60px;
  background: var(--bg);
  color: var(--text);
  border: var(--border-width) solid var(--border-strong);
  border-radius: var(--radius);
  padding: 5px;
}

/* Delete Button */
button.delete {
  background-color: #cc2e2e;
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

button.delete:hover {
  background-color: #e44242;
}

/* Controls Section */
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

/* General Button Styles */
button {
  padding: 10px 15px;
  font-size: 1rem;
  background-color: var(--accent-strong);
  color: var(--text);
  border: var(--border-width) solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--accent);
}

button:active {
  background-color: var(--accent);
}


#info-icon {
  cursor: pointer;
  font-weight: bold;
  border: var(--border-width) solid var(--border-strong);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: 20px;
  margin-left: 10px;
  background-color: var(--bg);
  color: var(--text);
  display: inline-block;
  font-size: 30px;
  justify-content: center;
  align-items: center;
  display: flex;
  box-shadow: 1px 1px 5px 1px var(--bg);
  margin-left: auto;
}

#game-info-popup, #tease-window, #login-window {
  position: absolute;
  top: 60px; /* adjust based on your layout */
  right: 20px;
  width: 50vw;
  background: var(--bg);
  border: var(--border-width) solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0px 4px 8px var(--bg);
  color: var(--text);
  z-index: 1000;
  padding: 15px;
  left: 25%;
  border-radius: 8px;
}

#game-info-content, #tease-content, #login-content {
  position: relative;
}

#close-info, #tease-close, #login-close {
  position: absolute;
  top: 0;
  right: 5px;
  cursor: pointer;
  font-size: 18px;
}


/* Mobile Adjustments */
@media (max-aspect-ratio: 1/1) {
  #wheel-container {
    flex-direction: column;
    margin: 0;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  #wheel-creator {
    width: 90vw;
    padding: 0;
    margin-bottom: 30px;
  }

  button {
    padding: 8px 12px;
    font-size: 0.9rem;
  }


  #game-info-popup {
    position: absolute;
    top: 60px; /* adjust based on your layout */
    width: 85vw;
    left: 10px;
  }
  


}






/* ============================================================
   Game styles (everything is scoped under .dabs-root)
   ============================================================ */
/* .dabs-root {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  font-family: Roboto, Arial, sans-serif; color: #fff;
  border-radius: var(--radius);
  background-color: #444;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.03) 75%),
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.03) 75%);
  background-size: 8px 8px; background-position: 0 0, 4px 4px;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.dabs-root *, .dabs-root *::before, .dabs-root *::after { box-sizing: border-box; margin: 0; padding: 0; }
.dabs-root button { font-family: inherit; border: 0; cursor: pointer; color: inherit; }


.dabs-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: grid; gap: 12px; padding: 14px; }
.dabs-stage.landscape { width: 780px; height: 620px; grid-template-columns: 492px 1fr; grid-template-rows: auto 1fr;
  grid-template-areas: "title title" "card side"; }
.dabs-stage.portrait  { width: 520px; height: 900px; grid-template-columns: 1fr; grid-template-rows: auto auto 1fr;
  grid-template-areas: "title" "card" "side"; }

.dabs-title { grid-area: title; font: 400 28px/36px Roboto, Arial, sans-serif; text-align: center; }


.dabs-cardwrap { grid-area: card; display: flex; flex-direction: column; gap: 6px; }
.dabs-letters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; text-align: center;
  font: 700 24px/28px Roboto, Arial, sans-serif; text-shadow: 0 2px 3px rgba(0,0,0,.5); }
.dabs-card { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: 8px; width: 492px; height: 492px; }
.dabs-cell { position: relative; background: #777; border-radius: 6px; border: 3px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: box-shadow .25s, border-color .25s; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.dabs-cell:hover { box-shadow: inset 0 0 35px #bbb; }
.dabs-cell::after { content: ""; position: absolute; inset: 9%; border-radius: 50%; background: var(--dab, #e53935);
  opacity: 0; transform: scale(.3); transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.5,1); }
.dabs-cell.is-dabbed::after { opacity: .8; transform: scale(1); }
.dabs-cell.is-called { border-color: #ffd54a; animation: dabs-pulse 1.2s ease-in-out infinite; }
.dabs-num { position: relative; z-index: 1; font: 700 30px/1 Roboto, Arial, sans-serif; }
.dabs-amt { position: relative; z-index: 1; margin-top: 4px; font-size: 13px; color: #c8f7bd; }
.dabs-cell.is-free { cursor: default; }
.dabs-cell.is-free:hover { box-shadow: none; }
.dabs-cell.is-free .dabs-num { color: #ffd54a; font-size: 34px; }
@keyframes dabs-pulse { 50% { box-shadow: 0 0 14px 2px #ffd54a; } }


.dabs-side { grid-area: side; display: grid; gap: 10px; align-content: start;
  grid-template-areas: "caller" "prizes" "actions" "colors"; }
.dabs-stage.portrait .dabs-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto;
  grid-template-areas: "caller prizes" "caller actions" "colors actions"; }
.dabs-panel { background: rgba(34,34,34,.6); border-radius: 6px; padding: 10px; }

.dabs-caller { grid-area: caller; display: flex; flex-direction: column; gap: 8px; }
.dabs-tray { position: relative; height: 110px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(#1b1b1b, #2a2a2a); box-shadow: inset 0 3px 8px rgba(0,0,0,.7); }
.dabs-tray::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; background: rgba(255,255,255,.06); }
.dabs-tray-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; letter-spacing: 1px; color: #888; }
.dabs-ball { position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, rgba(255,255,255,.55) 0 7%, transparent 32%), var(--ball);
  box-shadow: inset -8px -10px 18px rgba(0,0,0,.35), 0 4px 8px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; }
.dabs-ball-face { width: 54px; height: 54px; border-radius: 50%; background: #fff; color: #222; text-shadow: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.dabs-ball-face small { font: 700 11px Roboto, Arial, sans-serif; color: var(--ball); }
.dabs-ball-face b { font: 700 24px Roboto, Arial, sans-serif; }
.dabs-ball.roll-in  { animation: dabs-roll-in .65s cubic-bezier(.2,.8,.3,1) both; }
.dabs-ball.roll-out { animation: dabs-roll-out .5s cubic-bezier(.6,0,.9,.6) both; }
@keyframes dabs-roll-in  { from { transform: translateX(170%) rotate(400deg); } to { transform: none; } }
@keyframes dabs-roll-out { to   { transform: translateX(-170%) rotate(-400deg); } }

.dabs-recent { display: flex; gap: 4px; height: 22px; justify-content: center; }
.dabs-chip { width: 22px; height: 22px; border-radius: 50%; background: var(--ball); font: 700 9px/22px Roboto, Arial, sans-serif;
  text-align: center; box-shadow: inset -2px -3px 4px rgba(0,0,0,.3); }
.dabs-count { font-size: 11px; text-align: center; color: #bbb; letter-spacing: 1px; }

.dabs-btn { display: block; width: 100%; height: 36px; border-radius: 4px; background: rgba(34,34,34,.6);
  font: 700 12px Roboto, Arial, sans-serif; letter-spacing: 1px; transition: background .25s; }
.dabs-btn:hover { background: rgba(34,34,34,1); }
.dabs-btn:disabled { opacity: .4; cursor: default; }
.dabs-btn-primary { background: #1e63d6; height: 38px; }
.dabs-btn-primary:hover { background: #2f74e6; }

.dabs-prizes { grid-area: prizes; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.dabs-prizes div { display: flex; justify-content: space-between; align-items: baseline; }
.dabs-prizes span { color: #ccc; letter-spacing: 1px; text-transform: uppercase; font-size: 11px; }
.dabs-prizes b { font-size: 16px; color: #9be58a; }
.dabs-prizes .dabs-sep { border-top: 1px solid rgba(255,255,255,.12); padding-top: 6px; margin-top: 2px; }
.dabs-prizes .dabs-total b { color: #ffd54a; }

.dabs-actions { grid-area: actions; display: flex; flex-direction: column; gap: 6px; }
.dabs-colors { grid-area: colors; display: flex; align-items: center; gap: 6px; padding: 7px 10px; }
.dabs-colors > span { font-size: 10px; letter-spacing: 1px; color: #bbb; margin-right: auto; }
.dabs-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.dabs-root .dabs-dot, .dabs-root .dabs-dot:hover, .dabs-root .dabs-dot:active { background: var(--c); }
.dabs-dot.is-active { outline: 2px solid #fff; outline-offset: 2px; }
.dabs-root .dabs-dot[data-color="random"], .dabs-root .dabs-dot[data-color="random"]:hover, .dabs-root .dabs-dot[data-color="random"]:active { background: conic-gradient(#e53935, #fb8c00, #e6d307, #2e9d44, #1e63d6, #8e24aa, #e53935);
  font: 700 11px/18px Roboto, Arial, sans-serif; color: #fff; text-shadow: 0 0 2px #000; }


.dabs-toasts { position: absolute; top: 54px; left: 0; right: 0; z-index: 20; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dabs-toast { background: rgba(20,20,20,.93); padding: 8px 18px; border-radius: 20px; font-size: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,.5); animation: dabs-toast-in .25s ease-out; transition: opacity .3s, transform .3s; }
.dabs-toast b { color: #9be58a; }
.dabs-toast.bingo { background: linear-gradient(#ffd54a, #e8a400); color: #222; font-size: 22px; font-weight: 700; }
.dabs-toast.bingo b { color: #1a5c12; }
.dabs-toast.blackout { background: #111; border: 2px solid #ffd54a; color: #ffd54a; font-size: 28px; font-weight: 700; padding: 12px 26px; }
.dabs-toast.blackout b { color: #fff; }
.dabs-toast.warn { background: rgba(122,43,43,.95); }
.dabs-toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes dabs-toast-in { from { opacity: 0; transform: translateY(-10px) scale(.95); } }


.dabs-modal { position: absolute; inset: 0; z-index: 30; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; }
.dabs-modal[hidden] { display: none; }
.dabs-sheet { width: 470px; max-height: calc(100% - 30px); overflow: auto; background: #2b2b2b; border-radius: 10px;
  padding: 16px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.6); font-size: 14px; }
.dabs-sheet h2 { font-size: 20px; margin-bottom: 10px; }
.dabs-sheet fieldset { border: 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; margin-bottom: 10px; }
.dabs-sheet legend { font-size: 11px; letter-spacing: 1px; color: #aaa; text-transform: uppercase; padding-right: 8px; }
.dabs-sheet label { display: flex; align-items: center; gap: 8px; margin: 5px 0; cursor: pointer; }
.dabs-sheet input[type=range] { flex: 1; accent-color: #ffd54a; }
.dabs-sheet input[type=radio], .dabs-sheet input[type=checkbox] { accent-color: #ffd54a; width: 16px; height: 16px; }
.dabs-range { margin: 6px 0 10px; }
.dabs-range-head { display: flex; justify-content: space-between; }
.dabs-range-head b { color: #9be58a; }
.dabs-range label span { width: 30px; font-size: 12px; color: #aaa; }
.dabs-note { font-size: 12px; color: #999; }
.dabs-sheet-actions { display: flex; gap: 8px; }
.dabs-sheet-actions .dabs-btn { background: #444; }
.dabs-sheet-actions .dabs-btn:hover { background: #555; }
.dabs-sheet-actions .dabs-btn-primary { background: #1e63d6; } */



/* ============================================================
   Game styles (everything is scoped under .dabs-root)
   Uses the site theme variables; the fallbacks match the default dark theme.
   ============================================================ */
.dabs-root {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  font-family: var(--font, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  color: var(--text, #f2f2f2);
  background: var(--bg, #000);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.dabs-root *, .dabs-root *::before, .dabs-root *::after { box-sizing: border-box; margin: 0; padding: 0; }
.dabs-root button { font-family: inherit; border: 0; cursor: pointer; color: inherit; }
.dabs-root button:focus-visible { outline: 2px solid var(--accent, #0897ef); outline-offset: 2px; }

/* Stage: fixed design size, scaled to fit the root by JS */
.dabs-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: grid; gap: 12px; padding: 14px; }
.dabs-stage.landscape { width: 780px; height: 620px; grid-template-columns: 492px 1fr; grid-template-rows: auto 1fr;
  grid-template-areas: "title title" "card side"; }
.dabs-stage.portrait  { width: 520px; height: 900px; grid-template-columns: 1fr; grid-template-rows: auto auto 1fr;
  grid-template-areas: "title" "card" "side"; }

.dabs-title { grid-area: title; font-size: 28px; line-height: 36px; font-weight: 700; text-align: center; letter-spacing: .5px; }

/* ---------- Card ---------- */
.dabs-cardwrap { grid-area: card; display: flex; flex-direction: column; gap: 6px; }
.dabs-letters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; text-align: center;
  font-size: 24px; line-height: 28px; font-weight: 800; }
.dabs-card { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: 8px;
  width: 492px; height: 492px; }
.dabs-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface, #101010);
  border: var(--border-width, 2px) solid var(--border, #262626);
  border-radius: var(--radius-sm, 9px);
  cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background .2s, border-color .2s, box-shadow .2s; }
.dabs-cell:hover { background: var(--surface-2, #191919); border-color: var(--accent, #0897ef); }
.dabs-cell::after { content: ""; position: absolute; inset: 9%; border-radius: 50%; background: var(--dab, #e53935);
  opacity: 0; transform: scale(.3); transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.5,1); }
.dabs-cell.is-dabbed::after { opacity: .85; transform: scale(1); }
.dabs-cell.is-dabbed { text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.dabs-cell.is-called { border-color: var(--warning, #fbbf24); animation: dabs-pulse 1.2s ease-in-out infinite; }
.dabs-num { position: relative; z-index: 1; font-size: 30px; line-height: 1; font-weight: 700; }
.dabs-amt { position: relative; z-index: 1; margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--success, #15b100); min-height: 16px; }
.dabs-cell.is-dabbed .dabs-amt { color: var(--text, #f2f2f2); }
.dabs-cell.is-free { cursor: default; background: var(--surface-2, #191919); }
.dabs-cell.is-free:hover { border-color: var(--border, #262626); }
.dabs-cell.is-free .dabs-num { color: var(--warning, #fbbf24); font-size: 34px; }
.dabs-cell.is-free .dabs-amt { color: var(--text-muted, #9a9a9a); letter-spacing: 1px; }
@keyframes dabs-pulse { 50% { box-shadow: 0 0 14px 1px var(--warning, #fbbf24); } }

/* ---------- Side panel ---------- */
.dabs-side { grid-area: side; display: grid; gap: 10px; align-content: start;
  grid-template-areas: "caller" "prizes" "actions" "colors"; }
.dabs-stage.portrait .dabs-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto;
  grid-template-areas: "caller prizes" "caller actions" "colors actions"; }
.dabs-panel { background: var(--surface, #101010); border: var(--border-width, 2px) solid var(--border, #262626);
  border-radius: var(--radius, 14px); padding: 10px; }

/* Ball caller */
.dabs-caller { grid-area: caller; display: flex; flex-direction: column; gap: 8px; }
.dabs-tray { position: relative; height: 110px; overflow: hidden; background: var(--bg, #000);
  border: var(--border-width, 2px) solid var(--border, #262626); border-radius: var(--radius-sm, 9px);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.8); }
.dabs-tray::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--border, #262626); }
.dabs-tray-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; letter-spacing: 1px; color: var(--text-muted, #9a9a9a); }
.dabs-ball { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, rgba(255,255,255,.55) 0 7%, transparent 32%), var(--ball);
  box-shadow: inset -8px -10px 18px rgba(0,0,0,.4), 0 4px 10px rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center; }
.dabs-ball-face { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: #111;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.dabs-ball-face small { font-size: 11px; font-weight: 800; color: var(--ball); }
.dabs-ball-face b { font-size: 24px; font-weight: 800; }
.dabs-ball.roll-in  { animation: dabs-roll-in .65s cubic-bezier(.2,.8,.3,1) both; }
.dabs-ball.roll-out { animation: dabs-roll-out .5s cubic-bezier(.6,0,.9,.6) both; }
@keyframes dabs-roll-in  { from { transform: translateX(170%) rotate(400deg); } to { transform: none; } }
@keyframes dabs-roll-out { to   { transform: translateX(-170%) rotate(-400deg); } }

.dabs-recent { display: flex; gap: 4px; height: 22px; justify-content: center; }
.dabs-chip { width: 22px; height: 22px; border-radius: 50%; background: var(--ball); color: #fff;
  font-size: 9px; line-height: 22px; font-weight: 800; text-align: center; box-shadow: inset -2px -3px 4px rgba(0,0,0,.35); }
.dabs-count { font-size: 11px; text-align: center; color: var(--text-muted, #9a9a9a); letter-spacing: 1px; }

/* Buttons (prefixed with .dabs-root so site-wide button rules don't win) */
.dabs-root .dabs-btn { display: block; width: 100%; height: 36px;
  background: var(--surface-2, #191919); color: var(--text, #f2f2f2);
  border: var(--border-width, 2px) solid var(--border, #262626); border-radius: var(--radius-sm, 9px);
  font-size: 12px; font-weight: 700; letter-spacing: 1px; transition: background .2s, border-color .2s; }
.dabs-root .dabs-btn:hover { background: var(--surface-3, #262626); border-color: var(--border-strong, #cecbcb); }
.dabs-root .dabs-btn:active { background: var(--surface-3, #262626); }
.dabs-root .dabs-btn:disabled { opacity: .4; cursor: default; background: var(--surface-2, #191919); border-color: var(--border, #262626); }
.dabs-root .dabs-btn-primary { height: 40px; background: var(--accent, #0897ef); border-color: var(--accent, #0897ef);
  color: var(--accent-text, #f7fafc); font-size: 13px; }
.dabs-root .dabs-btn-primary:hover, .dabs-root .dabs-btn-primary:active { background: var(--accent-strong, #1675b7); border-color: var(--accent-strong, #1675b7); }
.dabs-root .dabs-btn-primary:disabled { background: var(--accent, #0897ef); border-color: var(--accent, #0897ef); }

/* Prizes */
.dabs-prizes { grid-area: prizes; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.dabs-prizes div { display: flex; justify-content: space-between; align-items: baseline; }
.dabs-prizes span { color: var(--text-muted, #9a9a9a); letter-spacing: 1px; text-transform: uppercase; font-size: 11px; }
.dabs-prizes b { font-size: 16px; color: var(--success, #15b100); }
.dabs-prizes .dabs-sep { border-top: 1px solid var(--border, #262626); padding-top: 6px; margin-top: 2px; }
.dabs-prizes .dabs-sep b { color: var(--text, #f2f2f2); }
.dabs-prizes .dabs-total b { color: var(--warning, #fbbf24); }

.dabs-actions { grid-area: actions; display: flex; flex-direction: column; gap: 6px; }

/* Dab colour picker */
.dabs-colors { grid-area: colors; display: flex; align-items: center; gap: 6px; padding: 7px 10px; }
.dabs-colors > span { font-size: 10px; letter-spacing: 1px; color: var(--text-muted, #9a9a9a); margin-right: auto; }
.dabs-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.dabs-root .dabs-dot, .dabs-root .dabs-dot:hover, .dabs-root .dabs-dot:active { background: var(--c); }
.dabs-root .dabs-dot[data-color="black"] { box-shadow: inset 0 0 0 1px var(--border-strong, #cecbcb); }
.dabs-dot.is-active { outline: 2px solid var(--text, #f2f2f2); outline-offset: 2px; }
.dabs-root .dabs-dot[data-color="random"], .dabs-root .dabs-dot[data-color="random"]:hover, .dabs-root .dabs-dot[data-color="random"]:active {
  background: conic-gradient(#e53935, #fb8c00, #e6d307, #2e9d44, #1e63d6, #8e24aa, #e53935);
  font-size: 11px; line-height: 18px; font-weight: 800; color: #fff; text-shadow: 0 0 2px #000; }

/* ---------- Toasts ---------- */
.dabs-toasts { position: absolute; top: 54px; left: 0; right: 0; z-index: 20; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dabs-toast { background: var(--surface-2, #191919); color: var(--text, #f2f2f2);
  border: var(--border-width, 2px) solid var(--border-strong, #262626); border-radius: 999px;
  padding: 8px 18px; font-size: 15px; box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.6), 0 8px 24px rgba(0,0,0,.5));
  animation: dabs-toast-in .25s ease-out; transition: opacity .3s, transform .3s; }
.dabs-toast b { color: var(--success, #15b100); }
.dabs-toast.bingo { background: linear-gradient(135deg, var(--accent, #0897ef), var(--accent-2, #9b8cff)); border-color: transparent;
  color: var(--accent-text, #f7fafc); font-size: 22px; font-weight: 800; }
.dabs-toast.bingo b { color: var(--accent-text, #f7fafc); }
.dabs-toast.blackout { background: var(--bg, #000); border: var(--border-width-big, 3px) solid var(--warning, #fbbf24);
  color: var(--warning, #fbbf24); font-size: 28px; font-weight: 800; padding: 12px 26px; }
.dabs-toast.blackout b { color: var(--text, #f2f2f2); }
.dabs-toast.warn { border-color: var(--danger, #fd0019); }
.dabs-toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes dabs-toast-in { from { opacity: 0; transform: translateY(-10px) scale(.95); } }

/* ---------- Settings ---------- */
.dabs-modal { position: absolute; inset: 0; z-index: 30; background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center; }
.dabs-modal[hidden] { display: none; }
.dabs-sheet { width: 470px; max-height: calc(100% - 30px); overflow: auto; padding: 16px 20px; font-size: 14px;
  background: var(--surface, #101010); border: var(--border-width, 2px) solid var(--border, #262626);
  border-radius: var(--radius, 14px); box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.6), 0 8px 24px rgba(0,0,0,.5)); }
.dabs-sheet h2 { font-size: 20px; margin-bottom: 10px; }
.dabs-sheet fieldset { border: 0; border-top: 1px solid var(--border, #262626); padding-top: 8px; margin-bottom: 10px; }
.dabs-sheet legend { font-size: 11px; letter-spacing: 1px; color: var(--text-muted, #9a9a9a); text-transform: uppercase; padding-right: 8px; }
.dabs-sheet label { display: flex; align-items: center; gap: 8px; margin: 5px 0; cursor: pointer; }
.dabs-root .dabs-sheet input[type=radio], .dabs-root .dabs-sheet input[type=checkbox] {
  accent-color: var(--accent, #0897ef); width: 16px; height: 16px; flex: none; }
.dabs-root .dabs-sheet input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border: 0;
  background: var(--surface-3, #262626); border-radius: 2px; outline: none; }
.dabs-root .dabs-sheet input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent, #0897ef); border: 0; cursor: pointer; }
.dabs-root .dabs-sheet input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent, #0897ef); border: 0; cursor: pointer; }
.dabs-range { margin: 6px 0 12px; }
.dabs-range-head { display: flex; justify-content: space-between; margin-bottom: 2px; }
.dabs-range-head b { color: var(--success, #15b100); }
.dabs-range label span { width: 30px; font-size: 12px; color: var(--text-muted, #9a9a9a); }
.dabs-note { font-size: 12px; color: var(--text-muted, #9a9a9a); }
.dabs-sheet-actions { display: flex; gap: 8px; }