*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: var(--font-sans), system-ui;
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: var(--font-mono), monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

.\!container {
  width: 100% !important;
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .\!container {
    max-width: 640px !important;
  }

  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .\!container {
    max-width: 768px !important;
  }

  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .\!container {
    max-width: 1024px !important;
  }

  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .\!container {
    max-width: 1280px !important;
  }

  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .\!container {
    max-width: 1536px !important;
  }

  .container {
    max-width: 1536px;
  }
}

.pointer-events-none {
  pointer-events: none;
}

.visible {
  visibility: visible;
}

.collapse {
  visibility: collapse;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.sticky {
  position: sticky;
}

.inset-0 {
  inset: 0px;
}

.bottom-0 {
  bottom: 0px;
}

.left-0 {
  left: 0px;
}

.left-1\/2 {
  left: 50%;
}

.right-0 {
  right: 0px;
}

.right-2\.5 {
  right: 0.625rem;
}

.right-4 {
  right: 1rem;
}

.top-0\.5 {
  top: 0.125rem;
}

.top-1\/2 {
  top: 50%;
}

.top-2 {
  top: 0.5rem;
}

.top-4 {
  top: 1rem;
}

.z-30 {
  z-index: 30;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

.z-\[60\] {
  z-index: 60;
}

.mx-4 {
  margin-left: 1rem;
  margin-right: 1rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.ml-0\.5 {
  margin-left: 0.125rem;
}

.ml-1 {
  margin-left: 0.25rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

.ml-auto {
  margin-left: auto;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-auto {
  margin-top: auto;
}

.block {
  display: block;
}

.inline {
  display: inline;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.table {
  display: table;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

.h-1\.5 {
  height: 0.375rem;
}

.h-10 {
  height: 2.5rem;
}

.h-12 {
  height: 3rem;
}

.h-16 {
  height: 4rem;
}

.h-2 {
  height: 0.5rem;
}

.h-24 {
  height: 6rem;
}

.h-28 {
  height: 7rem;
}

.h-3 {
  height: 0.75rem;
}

.h-3\.5 {
  height: 0.875rem;
}

.h-32 {
  height: 8rem;
}

.h-36 {
  height: 9rem;
}

.h-4 {
  height: 1rem;
}

.h-5 {
  height: 1.25rem;
}

.h-6 {
  height: 1.5rem;
}

.h-64 {
  height: 16rem;
}

.h-7 {
  height: 1.75rem;
}

.h-8 {
  height: 2rem;
}

.h-full {
  height: 100%;
}

.max-h-24 {
  max-height: 6rem;
}

.max-h-80 {
  max-height: 20rem;
}

.max-h-96 {
  max-height: 24rem;
}

.max-h-\[70vh\] {
  max-height: 70vh;
}

.max-h-\[85vh\] {
  max-height: 85vh;
}

.min-h-0 {
  min-height: 0px;
}

.w-1\.5 {
  width: 0.375rem;
}

.w-10 {
  width: 2.5rem;
}

.w-12 {
  width: 3rem;
}

.w-16 {
  width: 4rem;
}

.w-2 {
  width: 0.5rem;
}

.w-20 {
  width: 5rem;
}

.w-24 {
  width: 6rem;
}

.w-28 {
  width: 7rem;
}

.w-3 {
  width: 0.75rem;
}

.w-3\.5 {
  width: 0.875rem;
}

.w-32 {
  width: 8rem;
}

.w-36 {
  width: 9rem;
}

.w-4 {
  width: 1rem;
}

.w-5 {
  width: 1.25rem;
}

.w-6 {
  width: 1.5rem;
}

.w-64 {
  width: 16rem;
}

.w-7 {
  width: 1.75rem;
}

.w-72 {
  width: 18rem;
}

.w-8 {
  width: 2rem;
}

.w-9 {
  width: 2.25rem;
}

.w-full {
  width: 100%;
}

.min-w-0 {
  min-width: 0px;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-fit {
  max-width: -moz-fit-content;
  max-width: fit-content;
}

.max-w-full {
  max-width: 100%;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-sm {
  max-width: 24rem;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.shrink {
  flex-shrink: 1;
}

.shrink-0 {
  flex-shrink: 0;
}

.-translate-x-1\/2 {
  --tw-translate-x: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.-translate-y-1\/2 {
  --tw-translate-y: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

.cursor-default {
  cursor: default;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

.cursor-pointer {
  cursor: pointer;
}

.select-none {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.flex-row {
  flex-direction: row;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-end {
  align-items: flex-end;
}

.items-center {
  align-items: center;
}

.justify-end {
  justify-content: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-0\.5 {
  gap: 0.125rem;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-1\.5 {
  gap: 0.375rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-2\.5 {
  gap: 0.625rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.space-y-0\.5 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.125rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.125rem * var(--tw-space-y-reverse));
}

.space-y-1 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}

.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.375rem * var(--tw-space-y-reverse));
}

.space-y-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}

.space-y-6 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-lg {
  border-radius: var(--radius);
}

.rounded-md {
  border-radius: calc(var(--radius) - 2px);
}

.rounded-sm {
  border-radius: calc(var(--radius) - 4px);
}

.border {
  border-width: 1px;
}

.border-2 {
  border-width: 2px;
}

.border-4 {
  border-width: 4px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-b-2 {
  border-bottom-width: 2px;
}

.border-l {
  border-left-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-dashed {
  border-style: dashed;
}

.border-amber-500\/30 {
  border-color: rgb(245 158 11 / 0.3);
}

.border-border {
  border-color: var(--border);
}

.border-current {
  border-color: currentColor;
}

.border-destructive-foreground {
  border-color: var(--destructive-foreground);
}

.border-foreground {
  border-color: var(--foreground);
}

.border-green-500\/30 {
  border-color: rgb(34 197 94 / 0.3);
}

.border-primary {
  border-color: var(--primary);
}

.border-primary-foreground {
  border-color: var(--primary-foreground);
}

.border-red-600 {
  --tw-border-opacity: 1;
  border-color: rgb(220 38 38 / var(--tw-border-opacity, 1));
}

.border-slate-700 {
  --tw-border-opacity: 1;
  border-color: rgb(51 65 85 / var(--tw-border-opacity, 1));
}

.border-transparent {
  border-color: transparent;
}

.border-white {
  --tw-border-opacity: 1;
  border-color: rgb(255 255 255 / var(--tw-border-opacity, 1));
}

.border-t-transparent {
  border-top-color: transparent;
}

.bg-\[\#5865F2\] {
  --tw-bg-opacity: 1;
  background-color: rgb(88 101 242 / var(--tw-bg-opacity, 1));
}

.bg-amber-500\/10 {
  background-color: rgb(245 158 11 / 0.1);
}

.bg-black {
  --tw-bg-opacity: 1;
  background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
}

.bg-black\/50 {
  background-color: rgb(0 0 0 / 0.5);
}

.bg-black\/60 {
  background-color: rgb(0 0 0 / 0.6);
}

.bg-black\/75 {
  background-color: rgb(0 0 0 / 0.75);
}

.bg-blue-400 {
  --tw-bg-opacity: 1;
  background-color: rgb(96 165 250 / var(--tw-bg-opacity, 1));
}

.bg-card {
  background-color: var(--card);
}

.bg-destructive {
  background-color: var(--destructive);
}

.bg-green-400 {
  --tw-bg-opacity: 1;
  background-color: rgb(74 222 128 / var(--tw-bg-opacity, 1));
}

.bg-green-500\/10 {
  background-color: rgb(34 197 94 / 0.1);
}

.bg-green-500\/20 {
  background-color: rgb(34 197 94 / 0.2);
}

.bg-input {
  background-color: var(--input);
}

.bg-muted {
  background-color: var(--muted);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-red-400 {
  --tw-bg-opacity: 1;
  background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1));
}

.bg-red-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
}

.bg-red-900\/50 {
  background-color: rgb(127 29 29 / 0.5);
}

.bg-secondary {
  background-color: var(--secondary);
}

.bg-slate-800 {
  --tw-bg-opacity: 1;
  background-color: rgb(30 41 59 / var(--tw-bg-opacity, 1));
}

.bg-white {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}

.bg-yellow-500\/20 {
  background-color: rgb(234 179 8 / 0.2);
}

.bg-opacity-75 {
  --tw-bg-opacity: 0.75;
}

.object-contain {
  -o-object-fit: contain;
     object-fit: contain;
}

.object-cover {
  -o-object-fit: cover;
     object-fit: cover;
}

.p-0\.5 {
  padding: 0.125rem;
}

.p-1 {
  padding: 0.25rem;
}

.p-1\.5 {
  padding: 0.375rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-2\.5 {
  padding: 0.625rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-1 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.px-1\.5 {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.pb-3 {
  padding-bottom: 0.75rem;
}

.pb-6 {
  padding-bottom: 1.5rem;
}

.pl-3 {
  padding-left: 0.75rem;
}

.pt-1 {
  padding-top: 0.25rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.pt-3 {
  padding-top: 0.75rem;
}

.pt-4 {
  padding-top: 1rem;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.font-mono {
  font-family: var(--font-mono), monospace;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.font-normal {
  font-weight: 400;
}

.font-semibold {
  font-weight: 600;
}

.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.italic {
  font-style: italic;
}

.ordinal {
  --tw-ordinal: ordinal;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}

.leading-none {
  line-height: 1;
}

.leading-relaxed {
  line-height: 1.625;
}

.tracking-wider {
  letter-spacing: 0.05em;
}

.text-\[\#5865F2\] {
  --tw-text-opacity: 1;
  color: rgb(88 101 242 / var(--tw-text-opacity, 1));
}

.text-amber-400 {
  --tw-text-opacity: 1;
  color: rgb(251 191 36 / var(--tw-text-opacity, 1));
}

.text-current {
  color: currentColor;
}

.text-destructive {
  color: var(--destructive);
}

.text-destructive-foreground {
  color: var(--destructive-foreground);
}

.text-foreground {
  color: var(--foreground);
}

.text-green-400 {
  --tw-text-opacity: 1;
  color: rgb(74 222 128 / var(--tw-text-opacity, 1));
}

.text-green-500 {
  --tw-text-opacity: 1;
  color: rgb(34 197 94 / var(--tw-text-opacity, 1));
}

.text-muted-foreground {
  color: var(--muted-foreground);
}

.text-primary {
  color: var(--primary);
}

.text-primary-foreground {
  color: var(--primary-foreground);
}

.text-red-400 {
  --tw-text-opacity: 1;
  color: rgb(248 113 113 / var(--tw-text-opacity, 1));
}

.text-red-400\/60 {
  color: rgb(248 113 113 / 0.6);
}

.text-secondary-foreground {
  color: var(--secondary-foreground);
}

.text-sky-400 {
  --tw-text-opacity: 1;
  color: rgb(56 189 248 / var(--tw-text-opacity, 1));
}

.text-slate-400 {
  --tw-text-opacity: 1;
  color: rgb(148 163 184 / var(--tw-text-opacity, 1));
}

.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.text-yellow-500 {
  --tw-text-opacity: 1;
  color: rgb(234 179 8 / var(--tw-text-opacity, 1));
}

.placeholder-muted-foreground::-moz-placeholder {
  color: var(--muted-foreground);
}

.placeholder-muted-foreground::placeholder {
  color: var(--muted-foreground);
}

.accent-primary {
  accent-color: var(--primary);
}

.opacity-0 {
  opacity: 0;
}

.opacity-25 {
  opacity: 0.25;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-70 {
  opacity: 0.7;
}

.opacity-75 {
  opacity: 0.75;
}

.shadow {
  --tw-shadow: var(--shadow);
  --tw-shadow-colored: var(--shadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.shadow-lg {
  --tw-shadow: var(--shadow-lg);
  --tw-shadow-colored: var(--shadow-lg);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.shadow-xl {
  --tw-shadow: var(--shadow-xl);
  --tw-shadow-colored: var(--shadow-xl);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.ring-2 {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.backdrop-blur-sm {
  --tw-backdrop-blur: blur(4px);
  -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}

.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-200 {
  transition-duration: 200ms;
}

.duration-300 {
  transition-duration: 300ms;
}

/* MatchScheduler OKLCH Color System Variables */

:root {
  /* Light Mode Colors */
  --background: oklch(0.9842 0.0034 247.8575);
  --foreground: oklch(0.2795 0.0368 260.0310);
  --card: oklch(1.0000 0 0);
  --card-foreground: oklch(0.2795 0.0368 260.0310);
  --popover: oklch(1.0000 0 0);
  --popover-foreground: oklch(0.2795 0.0368 260.0310);
  --primary: oklch(0.5854 0.2041 277.1173);
  --primary-foreground: oklch(1.0000 0 0);
  --secondary: oklch(0.9276 0.0058 264.5313);
  --secondary-foreground: oklch(0.3729 0.0306 259.7328);
  --muted: oklch(0.9670 0.0029 264.5419);
  --muted-foreground: oklch(0.5510 0.0234 264.3637);
  --accent: oklch(0.9299 0.0334 272.7879);
  --accent-foreground: oklch(0.3729 0.0306 259.7328);
  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(1.0000 0 0);
  --border: oklch(0.8717 0.0093 258.3382);
  --input: oklch(0.8717 0.0093 258.3382);
  --ring: oklch(0.5854 0.2041 277.1173);
  --radius: 0.5rem;
  /* Font Families */
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: Merriweather, serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  /* Shadows */
  --shadow-2xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05);
  --shadow-xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05);
  --shadow-sm: 0px 4px 8px -1px hsl(0 0% 0% / 0.10), 0px 1px 2px -2px hsl(0 0% 0% / 0.10);
  --shadow: 0px 4px 8px -1px hsl(0 0% 0% / 0.10), 0px 1px 2px -2px hsl(0 0% 0% / 0.10);
  --shadow-md: 0px 4px 8px -1px hsl(0 0% 0% / 0.10), 0px 2px 4px -2px hsl(0 0% 0% / 0.10);
  --shadow-lg: 0px 4px 8px -1px hsl(0 0% 0% / 0.10), 0px 4px 6px -2px hsl(0 0% 0% / 0.10);
  --shadow-xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.10), 0px 8px 10px -2px hsl(0 0% 0% / 0.10);
  --shadow-2xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.25);
}

/* Dark Mode Colors */

.dark {
  --background: oklch(0.2077 0.0398 265.7549);
  --foreground: oklch(0.9288 0.0126 255.5078);
  --card: oklch(0.2527 0.0346 274.0597);
  --card-foreground: oklch(0.9288 0.0126 255.5078);
  --popover: oklch(0.2683 0.0345 271.9773);
  --popover-foreground: oklch(0.9288 0.0126 255.5078);
  --primary: oklch(0.6801 0.1583 276.9349);
  --primary-foreground: oklch(0.2077 0.0398 265.7549);
  --secondary: oklch(0.3351 0.0331 260.9120);
  --secondary-foreground: oklch(0.8717 0.0093 258.3382);
  --muted: oklch(0.2795 0.0368 260.0310);
  --muted-foreground: oklch(0.7137 0.0192 261.3246);
  --accent: oklch(0.3729 0.0306 259.7328);
  --accent-foreground: oklch(0.8717 0.0093 258.3382);
  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(0.2077 0.0398 265.7549);
  --border: oklch(0.4461 0.0263 256.8018);
  --input: oklch(0.4461 0.0263 256.8018);
  --ring: oklch(0.6801 0.1583 276.9349);
}

/* Base Styles */

* {
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
  font-size: 110%;
  /* 1440p+ */
  overflow: hidden;
  /* Prevent page-level scroll that triggers address bar */
}

/* PWA standalone mode - lock down all scrolling to inner containers only */

@media (display-mode: standalone) {
  html, body {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    overscroll-behavior: none;
  }
}

@media (max-height: 960px) {
  html {
    font-size: 100%;
    /* 1080p - scales everything down ~10% */
  }
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Application Container */

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  /* Fixed viewport height - grid drives layout, not content */
  overflow: hidden;
  /* Prevent content from pushing layout */
  padding: 1rem;
}

/* Sacred 3x3 Grid Layout - Optimized for 1080p+ */

.main-grid {
  margin-left: auto;
  margin-right: auto;
  display: grid;
  width: 100%;
  flex-grow: 1;
  gap: 0.5rem;
  max-width: 100rem;
  /* ~1600px - works well for 1080p and 1440p */
  grid-template-columns: clamp(200px, 15vw, 300px) 1fr clamp(200px, 15vw, 300px);
  grid-template-rows: 3rem 1fr 1fr;
  /* Compact nav, equal week panels */
}

/* EXPERIMENTAL: 2x3 Grid with Center Divider */

.main-grid-v2 {
  margin-left: auto;
  margin-right: auto;
  display: grid;
  width: 100%;
  flex-grow: 1;
  gap: 0.5rem;
  max-width: 100rem;
  grid-template-columns: clamp(200px, 15vw, 300px) 1fr clamp(200px, 15vw, 300px);
  grid-template-rows: 1fr 1fr;
  /* Two equal rows */
}

/* Center panel spans both rows */

.panel-center-stack {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}

.center-section-top,
.center-section-bottom {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Center Divider Bar */

.center-divider {
  flex-shrink: 0;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background-color: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.divider-left,
.divider-right {
  display: flex;
  align-items: center;
  min-width: 8rem;
}

.divider-right {
  justify-content: flex-end;
}

.divider-tabs {
  display: flex;
  gap: 0.25rem;
}

.divider-tab .tab-icon {
  width: 0.875rem;
  height: 0.875rem;
  vertical-align: -0.125rem;
  display: inline-block;
  flex-shrink: 0;
}

.divider-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 150ms ease;
}

.divider-tab:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.divider-tab.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.divider-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.divider-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background-color: var(--secondary);
  border: 1px solid var(--border);
  color: var(--secondary-foreground);
  cursor: pointer;
  font-size: 0.75rem;
}

.nav-btn:hover {
  background-color: var(--accent);
}

/* EXPERIMENTAL V3: True 3x3 Grid with Middle Row as Divider */

.main-grid-v3 {
  margin-left: auto;
  margin-right: auto;
  display: grid;
  width: 100%;
  flex-grow: 1;
  min-height: 0;
  /* Critical: allow grid to shrink within flex container */
  gap: 0.5rem;
  max-width: 100rem;
  grid-template-columns: clamp(200px, 15vw, 300px) 1fr clamp(200px, 15vw, 300px);
  grid-template-rows: 1fr 3rem 1fr;
  /* Week grid, compact divider, week grid */
}

/* Divider row panels */

.panel-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-content-compact {
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.divider-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 1rem;
  gap: 1rem;
}

.divider-content-centered {
  justify-content: center;
}

/* Panel Styles */

.panel {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  /* Critical: prevents grid item from growing beyond allocated track size */
}

.panel-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* Allow flex child to shrink below content size */
  overflow: hidden;
  /* Ensure children respect panel bounds */
}

/* Responsive Grid */

@media (max-width: 768px) {
  .main-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .app-container {
    padding: 0.5rem;
  }
}

/* Component Base Styles */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 150ms ease;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: oklch(from var(--primary) calc(l + 0.05) c h);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Gaming-specific styles */

.availability-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  font-size: 0.75rem;
}

.time-slot {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 150ms ease;
  background-color: var(--muted);
  color: var(--muted-foreground);
}

.time-slot:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.time-slot.available {
  background-color: oklch(0.45 0.15 142);
  color: oklch(0.95 0.01 142);
}

.time-slot.selected {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

/* Utility Classes */

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-muted-foreground {
  color: var(--muted-foreground);
}

.text-foreground {
  color: var(--foreground);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-muted {
  background-color: var(--muted);
}

.bg-background {
  background-color: var(--background);
}

.border {
  border: 1px solid var(--border);
}

.rounded {
  border-radius: var(--radius);
}

.p-4 {
  padding: 1rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

.gap-2 {
  gap: 0.5rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.min-h-32 {
  min-height: 8rem;
}

.fixed {
  position: fixed;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.top-4 {
  top: 1rem;
}

.right-4 {
  right: 1rem;
}

.bottom-0 {
  bottom: 0;
}

.left-0 {
  left: 0;
}

.z-30 {
  z-index: 30;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

.hidden {
  display: none;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.backdrop-blur-sm {
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.bg-background\/80 {
  background-color: oklch(from var(--background) l c h / 0.8);
}

.bg-red-600 {
  background-color: oklch(0.55 0.22 25);
}

.text-white {
  color: white;
}

.text-primary-foreground {
  color: var(--primary-foreground);
}

/* Toast Notifications */

.toast-base {
  max-width: 24rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid;
  transform: translateX(100%);
  opacity: 0;
  transition: all 300ms ease-out;
}

.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.toast-hide {
  opacity: 0;
  transform: translateX(100%);
}

.toast-success {
  background-color: oklch(0.15 0.05 142 / 0.9);
  border-color: oklch(0.35 0.15 142);
  color: oklch(0.95 0.01 142);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.toast-error {
  background-color: oklch(0.15 0.05 25 / 0.9);
  border-color: oklch(0.35 0.15 25);
  color: oklch(0.95 0.01 25);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.toast-warning {
  background-color: oklch(0.15 0.05 60 / 0.9);
  border-color: oklch(0.35 0.15 60);
  color: oklch(0.95 0.01 60);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.toast-info {
  background-color: oklch(0.15 0.05 220 / 0.9);
  border-color: oklch(0.35 0.15 220);
  color: oklch(0.95 0.01 220);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

/* Team Management Drawer - Critical Animation CSS */

.team-management-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32.5rem;
  /* Fixed height for proper drawer behavior */
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem 0.5rem 0 0;
  transition: transform 300ms ease-out;
  z-index: 30;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.drawer-closed {
  transform: translateY(calc(100% - 2.5rem));
  /* Only header visible */
}

.drawer-open {
  transform: translateY(0);
  /* Fully visible */
}

.drawer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============================================
   AVAILABILITY GRID COMPONENTS
   ============================================ */

/* Week Navigation */

.week-navigation {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.week-nav-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.week-nav-btn {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: not-allowed;
  opacity: 0.5;
  transition: all 150ms ease;
}

.week-nav-btn:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}

.week-nav-btn:not(:disabled):hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.nav-arrow {
  font-size: 0.75rem;
}

.week-nav-info {
  text-align: center;
}

.week-nav-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.week-nav-subtitle {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-left: 0.5rem;
}

/* Week Display */

.week-display {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  min-height: 0;
  /* Allow shrinking */
}

.week-header-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

/* Hide nav buttons by default, show on hover */

.week-header-nav .nav-btn {
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}

.week-header-nav:hover .nav-btn {
  opacity: 1;
}

/* Keep buttons visible when disabled (greyed out state) */

.week-header-nav .nav-btn:disabled {
  opacity: 0.3;
}

.week-header-nav:hover .nav-btn:disabled {
  opacity: 0.3;
}

.week-header {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
  flex-shrink: 0;
}

.week-grid-container {
  flex: 1;
  min-height: 0;
  /* Allow shrinking */
  overflow: hidden;
}

/* Availability Grid */

.availability-grid-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.grid-header {
  display: grid;
  grid-template-columns: 2.5rem repeat(7, 1fr);
  gap: 1px;
  flex-shrink: 0;
}

.time-label-spacer {
  /* Empty space above time labels */
}

.day-header {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--foreground);
  padding: 0.125rem 0;
  transition: color 150ms ease;
}

/* Highlight day/time headers on cell hover */

.day-header.highlight,
.time-label.highlight {
  color: #FBBF24;
  /* Amber/yellow - good contrast on dark */
  font-weight: 600;
}

.grid-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  /* Allow shrinking */
}

.grid-row {
  flex: 1;
  display: grid;
  grid-template-columns: 2.5rem repeat(7, 1fr);
  gap: 1px;
  min-height: 0;
  /* Allow cells to shrink */
}

.time-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: right;
  padding-right: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: color 150ms ease;
}

.grid-cell {
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 0.125rem;
  cursor: pointer;
  transition: all 100ms ease;
  min-height: 0;
  /* Allow shrinking */
}

.grid-cell:hover {
  background-color: var(--accent);
}

.grid-cell.selected {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* User's own availability indicator - NO border needed since badges show availability */

/* The colored badge inside the cell already indicates the user is available */

.grid-cell.user-available {
  /* No special border - badge provides visual indicator */
}

/* User-available cells that are also selected (editing mode) */

.grid-cell.user-available.selected {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Sync shimmer animation for cells being saved */

@keyframes sync-shimmer {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

.grid-cell.syncing {
  animation: sync-shimmer 0.8s ease-in-out infinite;
  pointer-events: none;
}

/* Drag preview highlight */

.grid-cell.drag-preview {
  background-color: oklch(from var(--primary) l c h / 0.3);
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
}

/* Prevent text selection during drag */

.availability-grid-container.dragging {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  cursor: crosshair;
}

/* Clickable headers */

.day-header.clickable,
.time-label.clickable {
  cursor: pointer;
  transition: background-color 150ms ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  border-radius: 0.125rem;
}

.day-header.clickable:hover,
.time-label.clickable:hover {
  background-color: var(--accent);
}

.day-header.clickable:active,
.time-label.clickable:active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* Responsive adjustments for smaller viewports */

@media (max-height: 800px) {
  .week-header {
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
  }

  .day-header {
    font-size: 0.625rem;
  }

  .time-label {
    font-size: 0.5rem;
  }

  .week-display {
    padding: 0.25rem;
  }
}

/* ============================================
   SLICE 2.5: PLAYER BADGES & TOOLTIPS
   ============================================ */

/* Player Badges Container - inside grid cells */

.player-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  justify-content: center;
  align-items: center;
  padding: 1px;
  height: 100%;
  width: 100%;
}

/* Base Player Badge */

.player-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  min-width: 1.4rem;
  border-radius: 0.125rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--card-foreground);
  overflow: hidden;
  flex-shrink: 0;
}

/* Initials Badge - clean text only, no card effect */

.player-badge.initials {
  text-transform: uppercase;
  letter-spacing: -0.025em;
  background-color: transparent;
  border: none;
}

/* Avatar Badge - round with no backdrop for transparency support */

.player-badge.avatar {
  background-color: transparent;
  border: none;
  border-radius: 9999px;
  overflow: hidden;
}

.player-badge.avatar img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 9999px;
}

/* Current User Badge - subtle highlight via color only */

.player-badge.initials.current-user {
  color: var(--primary);
}

/* Overflow Badge (+N) */

.player-badge.overflow {
  background-color: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 100ms ease;
  border: none;
  padding: 0;
}

.player-badge.overflow:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

/* Grid cell with players - ensure proper sizing */

.grid-cell.has-players {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Player Tooltip - positioned near cells */

.player-tooltip {
  position: fixed;
  z-index: 100;
  background-color: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 10rem;
  max-width: 14rem;
  overflow-y: auto;
  font-size: 0.75rem;
}

.player-tooltip::-webkit-scrollbar {
  width: 4px;
}

.player-tooltip::-webkit-scrollbar-track {
  background: transparent;
}

.player-tooltip::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

.tooltip-header {
  font-weight: 600;
  color: var(--foreground);
  padding-bottom: 0.375rem;
  margin-bottom: 0.375rem;
  border-bottom: 1px solid var(--border);
}

.tooltip-team-link:hover {
  color: var(--primary);
}

.tooltip-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tooltip-player {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem;
  border-radius: 0.125rem;
}

.tooltip-player.tooltip-current {
  background-color: oklch(from var(--primary) l c h / 0.15);
}

.tooltip-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background-color: var(--secondary);
  border-radius: 0.125rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tooltip-current .tooltip-initials {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.tooltip-name {
  color: var(--foreground);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tooltip-you {
  color: var(--primary);
  font-weight: 500;
}

/* Responsive badge sizing for smaller cells */

@media (max-height: 800px) {
  .player-badge {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    font-size: 0.5rem;
  }

  .player-badges {
    gap: 0.5px;
  }
}

/* ========================================
   SLICE 3.1: TEAM BROWSER (bottom-right panel)
   ======================================== */

.team-browser {
  height: 100%;
  min-height: 0;
  /* Allow flex child to shrink */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Team browser container - ensure it fills panel and constrains */

#team-browser-container {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Browser header should not shrink */

.browser-header {
  flex-shrink: 0;
}

/* Division Filter Buttons */

.division-filter-btn {
  border-radius: calc(var(--radius) - 2px);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  font-size: 0.75rem;
  line-height: 1rem;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  color: var(--muted-foreground);
  background-color: var(--muted);
}

.division-filter-btn:hover {
  background-color: var(--accent);
}

.division-filter-btn.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* Thin scrollbar utility - reusable across components */

.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 4px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

/* Team List Container */

.team-list {
  flex: 1 1 0;
  /* Grow, shrink, and start from 0 basis */
  min-height: 0;
  /* Critical for flex overflow to work */
  max-height: 100%;
  /* Never exceed parent */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Favorites List Container */

#favorites-list {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#favorites-list::-webkit-scrollbar {
  width: 4px;
}

#favorites-list::-webkit-scrollbar-track {
  background: transparent;
}

#favorites-list::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

.team-list::-webkit-scrollbar {
  width: 4px;
}

.team-list::-webkit-scrollbar-track {
  background: transparent;
}

.team-list::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

/* Team Card */

.team-card {
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 150ms ease;
  background-color: oklch(from var(--muted) l c h / 0.3);
  border: 1px solid transparent;
}

.team-card:hover {
  background-color: oklch(from var(--muted) l c h / 0.5);
  border-color: var(--border);
}

.team-card.selected {
  background-color: oklch(from var(--primary) l c h / 0.2);
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.team-card.selected:hover {
  background-color: oklch(from var(--primary) l c h / 0.25);
}

/* Selected team tag gets highlighted (text-only badges, not logos) */

.team-card.selected .team-tag-badge:not(:has(img)) {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* Team Tag Badge */

.team-tag-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1024px) and (orientation: landscape) {
  .mobile-drawer-content .team-info-container > .space-y-2 > :first-child > .team-tag-badge {
    gap: 0.375rem;
    align-items: center;
  }

  .mobile-drawer-content .browser-header > .team-tag-badge {
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 0.25rem;
  }
}

.team-tag-badge {
  height: 2rem;
  width: 2.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  border-radius: var(--radius);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Text-only badge (no logo) gets background */

.team-tag-badge:not(:has(img)) {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

/* Logo inside badge - no cropping */

.team-tag-badge img {
  -o-object-fit: contain;
     object-fit: contain;
}

/* Division pill (inline with team name, hidden on desktop) */

.division-pill {
  display: none;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-left: 0.25rem;
  vertical-align: middle;
}

/* Star Button */

.star-btn {
  flex-shrink: 0;
}

.star-btn.starred svg {
  fill: currentColor;
  --tw-text-opacity: 1;
  color: rgb(250 204 21 / var(--tw-text-opacity, 1));
}

.star-btn:hover svg {
  --tw-text-opacity: 1;
  color: rgb(250 204 21 / var(--tw-text-opacity, 1));
}

/* Selection Info Footer */

.selection-info {
  text-align: center;
}

/* Search Section Headers */

.search-section-header {
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--muted-foreground);
  font-weight: 600;
  margin-bottom: 0.25rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

/* Player Result Item */

.player-result {
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 150ms ease;
  background-color: oklch(from var(--muted) l c h / 0.2);
  border: 1px solid transparent;
}

.player-result:hover {
  background-color: oklch(from var(--accent) l c h / 0.5);
  border-color: var(--border);
}

.player-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--accent);
  color: var(--accent-foreground);
}

/* ========================================
   SLICE 3.4: COMPARISON MODE STYLES
   ======================================== */

/* Semantic color variables for comparison */

:root {
  --success: oklch(0.60 0.18 145);
  /* Green for full match */
  --warning: oklch(0.70 0.15 85);
  /* Amber for partial match */
}

.dark {
  --success: oklch(0.55 0.16 145);
  --warning: oklch(0.65 0.14 85);
}

/* Comparison mode indicator on grid container */

.availability-grid-container.comparison-mode {
  /* Subtle visual indicator that we're in comparison mode */
}

/* Full match - 4+ players on both sides, ready for 4v4 */

.grid-cell.comparison-match-full {
  border: 2px solid var(--success) !important;
  box-shadow: inset 0 0 0 1px oklch(from var(--success) l c h / 0.3);
}

.grid-cell.comparison-match-full:hover {
  border-color: var(--success) !important;
  box-shadow: inset 0 0 0 2px oklch(from var(--success) l c h / 0.4);
}

/* Partial match - meets filter but <4 players, possible with standins */

.grid-cell.comparison-match-partial {
  border: 2px solid var(--warning) !important;
  box-shadow: inset 0 0 0 1px oklch(from var(--warning) l c h / 0.3);
}

.grid-cell.comparison-match-partial:hover {
  border-color: var(--warning) !important;
  box-shadow: inset 0 0 0 2px oklch(from var(--warning) l c h / 0.4);
}

/* Upcoming match card in left sidebar — full row is hoverable */

.match-card-compact {
  cursor: pointer;
  border-radius: var(--radius);
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  transition: background-color 0.15s ease;
}

.match-card-compact:hover {
  background-color: oklch(1 0 0 / 0.06);
}

/* Match tooltip - shown on hover of match cells */

.match-tooltip {
  position: fixed;
  z-index: 100;
  background-color: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  width: -moz-max-content;
  width: max-content;
  max-width: 36rem;
  font-size: 0.75rem;
}

/* Side-by-side grid layout for user team vs opponents */

.match-tooltip-grid {
  display: flex;
  gap: 0.75rem;
}

.match-tooltip-grid .match-column {
  min-width: 0;
}

.match-tooltip-grid .user-team-column {
  padding-right: 0.75rem;
  border-right: 1px solid var(--border);
}

.match-tooltip-grid .opponents-column {
  /* Opponents column - can have multiple teams stacked */
}

.match-team-section {
  margin-bottom: 0.5rem;
}

.match-team-section:last-child {
  margin-bottom: 0;
}

.match-team-header {
  font-weight: 600;
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.match-team-tag {
  color: var(--primary);
  font-weight: 700;
}

.match-team-name {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

/* Vertical roster list for better readability */

.match-roster-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.match-roster-list .player-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0;
  font-size: 0.75rem;
}

.match-roster-list .player-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

.match-roster-list .player-status-dot.available {
  background-color: var(--success);
}

.match-roster-list .player-status-dot.unavailable {
  background-color: var(--muted-foreground);
  opacity: 0.5;
}

.match-roster-list .player-available .player-name {
  color: var(--foreground);
}

.match-roster-list .player-unavailable .player-name {
  color: var(--muted-foreground);
  opacity: 0.6;
}

/* Player count in header */

.match-player-count {
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.match-divider {
  margin: 0.5rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

/* Match count indicator badge - shows number of matching teams */

.match-count-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  background-color: var(--success);
  color: white;
  font-size: 0.5625rem;
  font-weight: 700;
  border-radius: 9999px;
  z-index: 10;
}

.comparison-match-partial .match-count-badge {
  background-color: var(--warning);
}

/* Grid cell needs relative positioning for badge and clickable cursor */

.grid-cell.comparison-match-full,
.grid-cell.comparison-match-partial {
  position: relative;
  cursor: pointer;
}

/* ========================================
   SCHEDULED MATCH GRID HIGHLIGHTS
   ======================================== */

/* Scheduled match cell — green border only, no background tint */

.grid-cell.has-scheduled-match {
  position: relative;
  border: 2px solid oklch(0.65 0.15 145 / 0.5) !important;
  cursor: pointer;
}

/* Hide player badges in scheduled match cells — logos replace them */

.grid-cell.has-scheduled-match > .player-badges {
  display: none;
}

.grid-cell.has-scheduled-match:hover {
  background-color: oklch(0.65 0.15 145 / 0.08) !important;
}

/* Logo vs Logo overlay inside scheduled match cells */

.scheduled-match-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 0.375rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

.scheduled-match-label .sml-logo {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.125rem;
  -o-object-fit: cover;
     object-fit: cover;
}

.scheduled-match-label .sml-tag {
  font-size: 0.5rem;
  font-weight: 600;
  color: oklch(0.8 0.12 145);
  line-height: 1;
}

.scheduled-match-label .sml-vs {
  font-size: 0.5625rem;
  font-weight: 500;
  color: var(--muted-foreground);
  line-height: 1;
}

/* ========================================
   SLICE 4.2: ENHANCED COMPARISON MODAL - VS LAYOUT
   ======================================== */

/* VS Container - side by side layout */

.vs-container {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* VS Divider in the middle */

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 0.5rem;
  align-self: center;
}

.vs-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Team Card in VS layout */

.vs-team-card {
  flex: 1;
  min-width: 0;
  background-color: oklch(from var(--muted) l c h / 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

/* Opponent side wrapper - holds tabs + card */

.vs-opponent-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.vs-opponent-side .vs-team-card {
  flex: none;
  /* Don't stretch the card inside opponent side */
}

/* Roster section inside team card */

.vs-roster {
  max-height: 12rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Player status dots in VS roster */

.vs-roster .player-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

.vs-roster .player-status-dot.available {
  background-color: var(--success);
}

.vs-roster .player-status-dot.unavailable {
  background-color: var(--muted-foreground);
  opacity: 0.4;
}

.vs-roster::-webkit-scrollbar {
  width: 4px;
}

.vs-roster::-webkit-scrollbar-track {
  background: transparent;
}

.vs-roster::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

/* Opponent Tabs Container - legacy (kept for backwards compat) */

.opponent-tabs-container {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Opponent Tabs Header - new style above opponent card */

.opponent-tabs-header {
  /* No border, just spacing */
}

/* Header opponent selector - inline with title */

.header-opponent-selector {
  display: flex;
  align-items: center;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.opponent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Individual opponent tab */

.opponent-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 150ms ease;
}

.opponent-tab:hover {
  background-color: var(--accent);
  border-color: var(--accent);
}

.opponent-tab-active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.opponent-tab-active:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Responsive - stack vertically on small screens */

@media (max-width: 640px) {
  .vs-container {
    flex-direction: column;
  }

  .vs-divider {
    align-self: center;
    padding: 0.5rem 0;
  }

  .vs-text {
    font-size: 1.25rem;
  }

  .vs-team-card {
    width: 100%;
  }
}

/* ========================================
   SLICE 4.3.3: AVATAR SOURCE BUTTONS
   ======================================== */

.avatar-source-btn {
  border-radius: 9999px;
  border-width: 1px;
  border-color: var(--border);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  color: var(--muted-foreground);
  background-color: var(--background);
  border: 1px solid var(--border);
}

.avatar-source-btn:hover:not([disabled]) {
  border-color: var(--primary);
  color: var(--foreground);
}

.avatar-source-btn.active {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.avatar-source-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ========================================
   SLICE 5.0b: FLOATING SELECTION ACTION BUTTON
   ======================================== */

/* Floating Selection Action Button */

.selection-action-btn {
  min-width: 6rem;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.selection-action-btn:hover {
  transform: translateY(-1px);
}

.selection-action-btn:active {
  transform: translateY(0);
}

.selection-action-btn.hidden {
  display: none;
}

.selection-action-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Compact grid tools panel */

.grid-tools-compact select {
  max-width: 8rem;
}

/* ========================================
   SLICE 5.0.1: GRID DISPLAY MODES & PLAYER COLORS
   ======================================== */

/* Rainbow gradient text for colored initials toggle button */

.text-rainbow {
  background: linear-gradient(90deg, #FF6B6B, #FFD93D, #6BCB77, #45B7D1, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Colored dot badge in grid cells */

.player-badge.colored-dot {
  width: 0.625rem;
  height: 0.625rem;
  min-width: 0.625rem;
  border-radius: 9999px;
  border: none;
  background-color: #6B7280;
  /* default gray, overridden by inline style */
}

/* Colored initials mode - badge with custom color */

.player-badge.initials.colored {
  background-color: transparent;
  border-color: transparent;
  /* Color applied via inline style */
}

/* Current user in colored modes - no special styling, colors are user-assigned */

/* Color Picker Popover */

.color-picker-popover {
  min-width: 12rem;
}

.color-picker-popover .color-swatch {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 150ms ease;
}

.color-picker-popover .color-swatch:hover {
  transform: scale(1.1);
}

.color-picker-popover .color-swatch:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--primary);
}

.color-picker-popover .color-hex-input {
  font-family: var(--font-mono);
}

/* Shake animation for invalid hex input */

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

.animate-shake {
  animation: shake 0.3s ease-in-out;
}

/* Roster member hover for color picker (only in colored modes) */

.roster-member {
  transition: background-color 150ms ease;
}

.roster-member:hover {
  cursor: pointer;
}

/* Responsive adjustments for colored dots in small cells */

@media (max-height: 800px) {
  .player-badge.colored-dot {
    width: 0.5rem;
    height: 0.5rem;
    min-width: 0.5rem;
  }
}

/* ========================================
   SLICE 6.0b: GRID TOOLS DRAWER IN TEAM PANEL
   ======================================== */

/* Container for TeamInfo content - needs overflow hidden for drawer */

.team-info-container {
  position: relative;
  overflow: hidden;
}

/* Grid Tools overlay drawer - slides up from bottom of panel */

.grid-tools-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12rem;
  /* Fixed height for proper drawer behavior */
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: transform 300ms ease-out;
  z-index: 20;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Collapsed state - only header visible (2rem header height) */

.grid-tools-drawer.drawer-closed {
  transform: translateY(calc(100% - 2rem));
}

/* Expanded state - fully visible */

.grid-tools-drawer.drawer-open {
  transform: translateY(0);
}

/* Drawer header - clickable toggle */

.grid-tools-header {
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  flex-shrink: 0;
}

.grid-tools-header:focus {
  outline: none;
}

.grid-tools-header:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Drawer body content - scrollable */

.grid-tools-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Inner content padding for proper spacing */

.grid-tools-content-inner {
  padding: 0.5rem 0;
}

/* Logo-as-switcher: active team logo hover */

.team-logo-clickable:hover {
  box-shadow: 0 0 0 2px var(--primary);
}

/* Logo-as-switcher: inactive team logo - greyscale until hovered */

.team-logo-switch {
  filter: grayscale(100%);
  opacity: 0.6;
}

.team-logo-switch:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ========================================
   SLICE 5.1: TEAMS/PLAYERS BROWSER PANEL
   ======================================== */

/* Main container */

.teams-browser {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.teams-browser-toolbar {
  flex-shrink: 0;
}

.teams-browser-content {
  flex: 1;
  min-height: 0;
}

/* View Toggle Buttons */

.view-toggle {
  display: inline-flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.view-toggle-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: all 150ms ease;
}

.view-toggle-btn:hover {
  background-color: var(--accent);
  color: var(--foreground);
}

.view-toggle-btn.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* Teams View - Two Panel Layout */

.teams-view-container {
  display: flex;
  height: 100%;
}

.teams-list-panel {
  width: 40%;
  min-width: 12rem;
  max-width: 20rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.teams-list-panel::-webkit-scrollbar {
  width: 4px;
}

.teams-list-panel::-webkit-scrollbar-track {
  background: transparent;
}

.teams-list-panel::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

.teams-detail-panel {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.teams-detail-panel::-webkit-scrollbar {
  width: 4px;
}

.teams-detail-panel::-webkit-scrollbar-track {
  background: transparent;
}

.teams-detail-panel::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

/* Team List Item */

.team-list-item {
  cursor: pointer;
  transition: all 150ms ease;
  border-left: 3px solid transparent;
}

.team-list-item:hover {
  background-color: oklch(from var(--accent) l c h / 0.5);
}

.team-list-item.selected {
  background-color: oklch(from var(--primary) l c h / 0.15);
  border-left-color: var(--primary);
}

.team-list-badge {
  width: 2rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Team Detail */

.team-detail-logo {
  width: 5rem;
  height: 5rem;
}

.roster-initials {
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Players View - Responsive Grid */

.players-grid-container {
  height: 100%;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.5rem;
}

.player-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  border-radius: var(--radius);
  background-color: oklch(from var(--muted) l c h / 0.5);
  cursor: default;
  transition: background-color 150ms ease;
  position: relative;
}

.player-card:hover {
  background-color: var(--accent);
}

.player-card-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  overflow: hidden;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary);
}

.player-card-name {
  font-size: 0.75rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: var(--foreground);
}

.player-card-multi-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  font-size: 0.625rem;
  padding: 0 0.25rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 9999px;
  font-weight: 600;
}

/* Player Tooltip - Additional styles for team entries */

.tooltip-team-entry {
  padding: 0.25rem 0.375rem;
  border-radius: 0.125rem;
}

.tooltip-team-entry.tooltip-primary-team {
  background-color: oklch(from var(--primary) l c h / 0.15);
}

.tooltip-team-name {
  font-size: 0.8125rem;
  color: var(--foreground);
}

/* ========================================
   SLICE 5.1b: TEAM DETAIL FULL-WIDTH + MATCH HISTORY
   ======================================== */

/* Full-width team detail view (replaces two-panel layout) */

.team-detail-full {
  padding: 0.75rem;
  overflow-y: auto;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.team-detail-full::-webkit-scrollbar {
  width: 4px;
}

.team-detail-full::-webkit-scrollbar-track {
  background: transparent;
}

.team-detail-full::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

.team-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

/* Division Overview - 3-column layout when no team selected */

.division-overview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5rem;
  height: 100%;
  padding: 0.75rem 1.25rem;
  overflow: hidden;
}

.division-overview-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.division-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  padding: 0.25rem 1.25rem 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.division-overview-header .header-players-icon {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.division-overview-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  margin-top: 0.375rem;
}

.division-overview-scroll::-webkit-scrollbar {
  width: 4px;
}

.division-overview-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.division-overview-scroll::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

.division-overview-table {
  width: 100%;
  border-collapse: collapse;
}

.division-overview-row {
  cursor: pointer;
  transition: background-color 150ms ease;
}

.division-overview-row:hover {
  background-color: oklch(from var(--muted) l c h / 0.5);
}

.division-overview-row td {
  padding: 0.3rem 0.25rem;
  vertical-align: middle;
}

.division-overview-badge {
  width: 2.75rem;
  padding-left: 0.75rem !important;
}

.division-overview-badge .team-tag-badge {
  width: 2rem;
  height: 1.5rem;
  font-size: 0.55rem;
}

.division-overview-name {
  font-size: 0.8rem;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 10rem;
}

.division-overview-players {
  font-size: 0.7rem;
  color: var(--muted-foreground);
  text-align: right;
  padding-right: 1.25rem !important;
  width: 2.5rem;
  white-space: nowrap;
}

/* Player overview rows (Players tab - both alpha and by-team modes) */

.player-overview-row {
  cursor: default;
  transition: background-color 150ms ease;
}

.player-overview-row:hover {
  background-color: oklch(from var(--muted) l c h / 0.5);
}

.player-overview-row td {
  padding: 0.25rem 0.25rem;
  vertical-align: middle;
}

.player-overview-avatar {
  width: 2.25rem;
  padding-left: 0.75rem !important;
}

.player-avatar-badge {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
  overflow: hidden;
  position: relative;
  background-color: var(--secondary);
  flex-shrink: 0;
}

.avatar-initials-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
}

.avatar-img-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 0.25rem;
}

.player-overview-name {
  font-size: 0.8rem;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 10rem;
}

.player-multi-badge {
  display: inline-block;
  font-size: 0.6rem;
  padding: 0 0.25rem;
  margin-left: 0.25rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 9999px;
  font-weight: 600;
  vertical-align: middle;
}

/* Players grouped by team - team header */

.players-team-group {
  margin-bottom: 0.25rem;
}

.players-team-group-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted-foreground);
  border-top: 1px solid oklch(from var(--border) l c h / 0.5);
}

.players-team-group:first-child .players-team-group-header {
  border-top: none;
}

/* Team Info Bar - compact horizontal layout */

.team-info-bar {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.team-info-logo {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
}

.team-info-main {
  flex: 1;
  min-width: 0;
}

.team-info-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

/* Roster as multi-column flow */

.team-info-roster {
  display: flex;
  flex-wrap: wrap;
  -moz-column-gap: 1rem;
       column-gap: 1rem;
  row-gap: 0;
  max-height: 5.5rem;
  /* ~5 rows worth */
  overflow: hidden;
}

.team-info-roster-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.0625rem 0;
  white-space: nowrap;
  width: 45%;
  /* Two-column layout */
}

/* Stats/meta area on the right */

.team-info-stats {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
}

/* Match History Section */

.match-history-section {
  /* No top border/padding - info bar handles separation */
}

.match-history-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.match-history-section .section-title {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Match List */

.match-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.match-row {
  display: grid;
  grid-template-columns: 3.5rem 4rem 1fr 1.5rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-decoration: none;
  color: inherit;
  transition: background-color 150ms;
}

.match-row:hover {
  background-color: var(--accent);
}

.match-date {
  color: var(--muted-foreground);
}

.match-map {
  color: var(--foreground);
  font-family: var(--font-mono);
}

.match-score {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.match-our-tag {
  color: var(--primary);
  font-weight: 500;
  min-width: 3rem;
  text-align: right;
}

.match-frags {
  color: var(--foreground);
  font-family: var(--font-mono);
}

.match-opp-tag {
  color: var(--muted-foreground);
  min-width: 3rem;
}

.match-result {
  font-weight: 600;
  text-align: center;
}

/* Match row clickable (POC scoreboard) */

.match-row.clickable {
  cursor: pointer;
}

/* Scoreboard - hub.quakeworld.nu replica */

.match-scoreboard {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0.375rem;
  overflow: hidden;
  margin: 0.25rem 0 0.5rem;
  /* Fallback bg */
  background-color: rgb(55 65 81 / 0.3);
}

.sb-overlay {
  background: rgb(55 65 81 / 0.2);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Hub text outline for readability on mapshot backgrounds */

.sb-text-outline {
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

/* Hub scoreboard grid layout */

.sb-scoreboard {
  display: grid;
  font-size: 0.875rem;
}

.sb-scoreboard .sc-row {
  display: grid;
  align-items: center;
  gap: 0 0.5rem;
  /* [ping] [frags] [team] [name] */
  grid-template-columns: 2.625rem 2.25rem 2.5rem auto;
}

/* Team divider: red-to-orange gradient (exact hub style) */

.sb-team-divider {
  height: 1px;
  background: linear-gradient(to right, rgba(248,113,113,0.2), rgb(251,146,60), rgba(251,146,60,0.2));
  margin: 0.375rem 0;
}

/* Ping column */

.sc-ping {
  text-align: right;
  font-size: 0.75rem;
  opacity: 0.5;
}

/* Colored frags box */

.sc-frags {
  text-align: center;
  font-weight: 700;
  padding: 1px 0;
  font-size: 0.8125rem;
}

/* Team tag (max 4 chars) */

.sc-team {
  text-align: center;
  padding: 0 0.25rem;
}

/* Player name */

.sc-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 10rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.sc-name img {
  flex-shrink: 0;
}

/* Bot player styling */

.sc-name-bot {
  color: rgb(252 211 77 / 0.8);
}

/* Scoreboard summary stats (below scoreboard on hover) */

.sb-summary {
  padding: 0.5rem 0.75rem 0.25rem;
}

.sb-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  white-space: nowrap;
}

.sb-summary-table th,
.sb-summary-table td {
  padding: 0.125rem 0.375rem;
  text-align: right;
}

.sb-summary-table thead th {
  color: rgb(148 163 184);
  font-weight: 500;
}

.sb-sum-group-hdr th {
  font-size: 0.625rem;
  color: rgb(100 116 139);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
  padding-bottom: 0.125rem;
}

.sb-sum-team {
  text-align: left !important;
  font-weight: 600;
  padding-right: 0.75rem !important;
}

.sb-sum-sep {
  border-left: 1px solid rgb(255 255 255 / 0.08);
}

.sb-sum-q {
  color: #39f;
}

.sb-sum-p {
  color: #f44;
}

.sb-sum-r {
  color: #ff0;
}

.sb-sum-ra {
  color: #f44;
}

.sb-sum-ya {
  color: #ff0;
}

/* QW text color classes (exact hub values) */

.qw-color-g {
  color: #c89b29;
}

.qw-color-b {
  color: #7a5b33;
}

.qw-color-w {
  color: #e2e8f0;
}

/* ============================================
   Slice 5.2a: Team Detail Tabs + Details Landing
   ============================================ */

/* Tab bar */

.team-detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  flex-shrink: 0;
}

.team-detail-tab {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.team-detail-tab:hover {
  color: var(--foreground);
}

.team-detail-tab.active {
  color: var(--foreground);
  border-bottom-color: var(--primary);
}

.team-detail-tab-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

/* Details landing — two-column: identity left, activity right */

.team-details-landing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  height: 100%;
}

/* Left column: title row then logo + roster side by side */

.team-details-identity {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

/* Title spanning logo + roster */

.team-details-identity-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

/* Logo + roster side by side */

.team-details-identity-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.team-details-logo {
  width: 11rem;
  height: 11rem;
  flex-shrink: 0;
}

.team-details-logo img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.team-details-logo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--muted-foreground);
  background: var(--muted);
  border-radius: 0.75rem;
}

/* Roster — beside logo */

.team-details-roster {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.team-details-roster-item {
  font-size: 1rem;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.roster-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  flex-shrink: 0;
  -o-object-fit: cover;
     object-fit: cover;
}

.roster-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.625rem;
  font-weight: 600;
}

.team-details-roster-item .leader-badge {
  font-size: 0.75rem;
  color: var(--primary);
}

/* Right column title — mirrors identity title */

.team-details-activity-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

/* Right column: activity stats */

.team-details-activity {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.team-details-right-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.team-details-right-division {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.team-details-activity-header {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.map-stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.map-stat-row {
  display: grid;
  grid-template-columns: 4rem 1fr 1.5rem 2.5rem;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
}

.map-stat-name {
  color: var(--muted-foreground);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.map-stat-bar {
  height: 0.5rem;
  border-radius: 0.25rem;
  background: var(--muted);
  overflow: hidden;
  position: relative;
}

.map-stat-bar-fill {
  height: 100%;
  border-radius: 0.25rem;
  background: var(--primary);
  transition: width 0.3s ease;
}

.map-stat-count {
  color: var(--foreground);
  font-weight: 600;
  text-align: right;
}

.map-stat-record {
  font-size: 0.6875rem;
  white-space: nowrap;
}

.map-stat-record .win {
  color: rgb(34, 197, 94);
}

.map-stat-record .loss {
  color: rgb(239, 68, 68);
}

.map-stat-record .sep {
  color: var(--muted-foreground);
}

/* Activity footer: total + H2H link */

.team-details-activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.team-details-activity-total {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.team-details-h2h-btn {
  font-size: 0.6875rem;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.15s;
}

.team-details-h2h-btn:hover {
  opacity: 0.8;
}

/* Upcoming games — flows after activity, compact */

.team-details-upcoming {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.team-details-upcoming-games {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.team-details-upcoming-header {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

/* ============================================
   Slice 5.2b: Match History Split-Panel
   ============================================ */

/* Override tab-content padding when split-panel is inside */

.team-detail-tab-content:has(.match-history-split) {
  padding: 0;
}

.match-history-split {
  display: flex;
  height: 100%;
}

/* Left panel: match list */

.mh-list-panel {
  width: 38%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-width: 0;
}

/* Filter bar */

.mh-filters {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mh-filter-select {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--foreground);
  cursor: pointer;
}

/* Match list */

.mh-match-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.mh-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0.5rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.1s;
  gap: 0.5rem;
}

.mh-match-row:hover {
  background: var(--muted);
}

.mh-match-row.selected {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border-left: 2px solid var(--primary);
}

.mh-match-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mh-match-date {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.mh-match-map {
  font-size: 0.75rem;
  color: var(--foreground);
  font-weight: 600;
}

.mh-match-score {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.mh-match-tag {
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  max-width: 2.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mh-match-frags {
  color: var(--foreground);
  font-weight: 600;
  white-space: nowrap;
}

.mh-match-result {
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
}

.mh-result-win {
  color: rgb(34, 197, 94);
}

.mh-result-loss {
  color: rgb(239, 68, 68);
}

.mh-result-draw {
  color: var(--muted-foreground);
}

/* Right panel: preview */

.mh-preview-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

.mh-preview-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Unified stats-on-map view (replaces separate scoreboard + stats) */

.mh-stats-view {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgb(15 23 42 / 0.9);
  border-radius: 0.375rem;
  overflow: hidden;
  margin: 0.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mh-stats-overlay {
  background: rgb(15 23 42 / 0.78);
  padding: 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Action links inside overlay push to bottom */

.mh-stats-overlay .mh-actions {
  margin-top: auto;
  padding-top: 0.375rem;
}

/* Loading indicator (shown before ktxstats arrive) */

.mh-stats-loading {
  padding: 0.5rem 0.75rem;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

/* Stats table (per-player, 3-tab toggle) */

.mh-stats-table-wrap {
  flex-shrink: 0;
}

/* Tab bar */

.mh-stab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.15);
}

.mh-stab {
  flex: 1;
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.mh-stab:hover {
  color: var(--foreground);
}

.mh-stab-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Table scroll container */

.mh-stats-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

/* Stats table */

.mh-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.mh-stats-table th,
.mh-stats-table td {
  padding: 0.1875rem 0.375rem;
  text-align: right;
}

.mh-stats-table th {
  color: var(--muted-foreground);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.625rem;
}

.mh-stats-table thead tr:last-child th {
  border-bottom: 1px solid rgb(255 255 255 / 0.15);
}

/* Fixed columns */

.mh-st-frags,
.mh-st-frags-hdr {
  text-align: right;
  font-weight: 600;
  width: 1.75rem;
}

.mh-st-name,
.mh-st-name-hdr {
  text-align: left !important;
  width: 1%;
  padding-left: 0.75rem !important;
  padding-right: 1.5rem !important;
}

/* Team aggregate rows */

.mh-st-agg {
  font-weight: 600;
}

.mh-st-agg td {
  border-bottom: 1px solid rgb(255 255 255 / 0.15);
}

/* Player rows — alternating bg */

.mh-st-player:nth-child(odd) {
  background: oklch(0.22 0.01 266 / 0.4);
}

.mh-st-player:hover {
  background: oklch(0.25 0.04 230 / 0.4);
}

/* Team separator between player groups — red-to-orange gradient like scoreboard */

.mh-st-team-sep td {
  padding: 0;
  height: 2px;
  background: linear-gradient(to right,
        rgba(248, 113, 113, 0.2),
        rgb(251, 146, 60),
        rgba(251, 146, 60, 0.2));
}

/* Divider between aggregates and individual players */

.mh-st-divider td {
  padding: 0;
  height: 2px;
  background: linear-gradient(to right,
        rgba(248, 113, 113, 0.2),
        rgb(251, 146, 60),
        rgba(251, 146, 60, 0.2));
}

/* Dimmed zero values */

.mh-dim {
  opacity: 0.3;
}

/* Weapon group visual separator */

.mh-group-start {
  border-left: 1px solid rgb(255 255 255 / 0.15);
  padding-left: 0.375rem !important;
}

/* Weapon group header row */

.mh-st-group-hdr th {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--foreground);
  padding-bottom: 0;
  border-bottom: none;
}

/* Colored headers — armor */

.mh-hdr-ga {
  color: #0f0 !important;
}

.mh-hdr-ya {
  color: #ff0 !important;
}

.mh-hdr-ra {
  color: #f00 !important;
}

.mh-hdr-mh {
  color: #7dd3fc !important;
}

/* Colored headers — powerups */

.mh-hdr-q {
  color: #39f !important;
}

.mh-hdr-p {
  color: #f00 !important;
}

.mh-hdr-r {
  color: #ff0 !important;
}

/* Top value highlight (inline badge around the number) */

.mh-top {
  display: inline-block;
  padding: 0.0625rem 0.25rem;
  margin: -0.0625rem -0.25rem;
  border-radius: 0.1875rem;
  font-weight: 600;
}

.mh-top-green {
  background: rgb(34 197 94 / 0.3);
  color: #86efac;
}

.mh-top-red {
  background: rgb(239 68 68 / 0.3);
  color: #fca5a5;
}

/* Awards grid */

.mh-awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0.5rem;
  overflow-y: auto;
}

.mh-award-card {
  background: rgb(255 255 255 / 0.04);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 0.375rem;
  padding: 0.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mh-award-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.625rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mh-award-icon {
  font-size: 0.75rem;
}

.mh-award-title {
  font-weight: 600;
}

.mh-award-player {
  font-size: 0.8125rem;
  font-weight: 600;
}

.mh-award-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.625rem;
}

.mh-award-team {
  color: var(--muted-foreground);
}

.mh-award-value {
  color: rgb(134 239 172);
  font-weight: 600;
}

/* Action links */

.mh-actions {
  display: flex;
  gap: 1rem;
  padding: 0.375rem 0.75rem;
  flex-shrink: 0;
}

.mh-action-link {
  font-size: 0.6875rem;
  color: var(--primary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: none;
  transition: opacity 0.15s;
}

.mh-action-link:hover {
  opacity: 0.8;
}

/* Summary panel (right side default) */

.mh-summary-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  gap: 0.75rem;
}

.mh-section-label {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* Activity line graph */

.mh-activity-section {
  flex-shrink: 0;
}

.mh-activity-total {
  font-weight: 600;
  color: var(--foreground);
  margin-left: 0.25rem;
}

/* ApexCharts container - override dark theme background */

#mh-activity-chart {
  background: transparent !important;
}

#mh-activity-chart .apexcharts-canvas {
  background: transparent !important;
}

/* Breakdown columns */

.mh-breakdown-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Single breakdown (when filtered to one type) */

.mh-breakdown-columns.mh-breakdown-single {
  grid-template-columns: 1fr;
  max-width: 16rem;
}

.mh-breakdown-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Inner table with consistent column widths */

.mh-breakdown-table {
  display: flex;
  flex-direction: column;
}

.mh-breakdown-hdr,
.mh-breakdown-row {
  display: grid;
  grid-template-columns: 1fr 1.5rem 2.5rem;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.25rem;
  font-size: 0.75rem;
  border-radius: 0.125rem;
}

.mh-breakdown-hdr {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  padding-bottom: 0.125rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.125rem;
}

.mh-breakdown-row {
  cursor: pointer;
  transition: background-color 0.1s;
}

.mh-breakdown-row:hover {
  background: var(--muted);
}

.mh-bd-name {
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.mh-bd-count {
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  text-align: right;
}

.mh-bd-record {
  font-size: 0.6875rem;
  white-space: nowrap;
  text-align: right;
}

.mh-bd-win {
  color: rgb(34, 197, 94);
}

.mh-bd-loss {
  color: rgb(239, 68, 68);
}

.mh-period-select {
  margin-left: auto;
}

/* Sortable match history table */

.mh-table-header,
.mh-table-row {
  display: grid;
  grid-template-columns: 3.25rem 1rem 4rem 2.75rem 2rem 2rem 3rem 1.5rem;
  -moz-column-gap: 0.25rem;
       column-gap: 0.25rem;
  align-items: center;
  font-size: 0.8125rem;
  padding: 0.3125rem 0.5rem;
}

.mh-table-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.mh-th {
  color: var(--muted-foreground);
  font-weight: 500;
  font-size: 0.75rem;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  white-space: nowrap;
  transition: color 0.1s;
}

.mh-th:hover {
  color: var(--foreground);
}

.mh-th-us {
  text-align: right;
}

.mh-th-score {
  text-align: center;
}

.mh-th-vs {
  text-align: left;
}

.mh-th-result {
  text-align: center;
}

.mh-table-row {
  cursor: pointer;
  transition: background-color 0.1s;
}

.mh-table-row:nth-child(even) {
  background: oklch(from var(--muted) l c h / 0.15);
}

.mh-table-row:hover {
  background: var(--muted);
}

.mh-table-row.selected {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border-left: 2px solid var(--primary);
}

.mh-td-date {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.mh-td-map {
  color: var(--foreground);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mh-td-us {
  color: var(--muted-foreground);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mh-td-score {
  text-align: center;
  font-weight: 600;
  color: var(--foreground);
  font-family: var(--font-mono);
}

.mh-td-opponent {
  color: var(--primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mh-td-result {
  font-weight: 700;
  text-align: center;
}

/* ========================================
   Slice 7.0c: Timezone Selector
   ======================================== */

.tz-selector {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Hide by default, show on header hover (matches nav button behavior) */

.tz-selector-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease-in-out, color 0.15s, border-color 0.15s;
}

.week-header-nav:hover .tz-selector-btn {
  opacity: 1;
}

/* Keep visible when dropdown is open */

.tz-selector-btn.open {
  opacity: 1;
}

.tz-selector-btn:hover {
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.tz-selector-btn .tz-chevron {
  font-size: 0.5rem;
  transition: transform 0.15s;
}

.tz-selector-btn.open .tz-chevron {
  transform: rotate(180deg);
}

.tz-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.5rem 0;
  min-width: 14rem;
  max-height: 20rem;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  margin-top: 0.25rem;
  display: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.tz-dropdown::-webkit-scrollbar {
  width: 0.375rem;
}

.tz-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.tz-dropdown::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 0.1875rem;
}

.tz-dropdown.open {
  display: block;
}

.tz-dropdown-region {
  padding: 0.375rem 0.75rem 0.125rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.tz-dropdown-item {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.tz-dropdown-item:hover {
  background: var(--muted);
  color: var(--foreground);
}

.tz-dropdown-item.active {
  color: var(--primary);
}

/* ─── Matches Panel (Slice 8.0b) ─────────────────────────────────── */

.matches-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}

.proposal-card {
  transition: border-color 0.15s ease;
}

.proposal-card:hover {
  border-color: var(--muted-foreground);
}

.proposal-card-header:hover {
  background: var(--muted);
  border-radius: var(--radius);
}

/* ═══════════════════════════════════════════════════════════════════
   Slice 10.0a: Mobile Responsive CSS Foundation
   All mobile styles are additive — desktop layout is untouched.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Portrait Orientation Overlay ──────────────────────────────── */

.portrait-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--background);
  z-index: 100;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.portrait-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.portrait-icon {
  font-size: 3rem;
  animation: rotate-hint 2s ease-in-out infinite;
}

@keyframes rotate-hint {
  0%, 100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(90deg);
  }
}

@media (max-width: 1024px) and (orientation: portrait) {
  .portrait-overlay {
    display: flex;
  }
}

/* ─── Mobile Drawer Containers ──────────────────────────────────── */

/* Hidden on desktop, styled for mobile (populated by JS in 10.0b) */

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 70vw;
  max-width: 20rem;
  background-color: var(--card);
  z-index: 45;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 200ms ease;
}

.mobile-drawer-left {
  left: 0;
}

.mobile-drawer-right {
  right: 0;
  transform: translateX(100%);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.5);
  z-index: 44;
}

/* ─── Mobile Bottom Bar ─────────────────────────────────────────── */

.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3rem;
  background-color: var(--muted);
  border-top: 1px solid var(--border);
  z-index: 46;
  /* Above overlay (44) and drawers (45) so buttons stay tappable */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bottom bar content layout */

.mobile-bottom-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 0.25rem;
  gap: 0.125rem;
}

/* Base button style */

.mobile-bb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 0.25rem;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bb-btn:active {
  background-color: var(--accent);
}

/* Tab button group */

.mobile-bb-tabs {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  justify-content: center;
}

/* Active tab indicator */

.mobile-bb-tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

/* Week navigation group (left side) */

.mobile-bb-week-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.mobile-bb-week-label {
  font-size: 0.75rem;
  color: var(--foreground);
  font-weight: 600;
  min-width: 1.75rem;
  text-align: center;
}

.mobile-bb-week-btn {
  min-width: 1.75rem;
  font-size: 0.7rem;
}

/* Compare + Filter group (right cluster) */

.mobile-bb-compare-group {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.mobile-bb-compare-btn {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0 0.25rem;
  min-width: auto;
  white-space: nowrap;
}

.mobile-bb-compare-btn.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.mobile-bb-filter-num {
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 1.5rem;
  color: var(--foreground);
}

.mobile-bb-vs-label {
  font-size: 0.6rem;
  color: var(--muted-foreground);
}

/* Dimmed state for filter numbers when compare is off */

.mobile-bb-filter-num.dimmed {
  opacity: 0.35;
}

/* Filter number popup picker */

.mobile-filter-picker {
  position: fixed;
  transform: translate(-50%, -100%);
  margin-top: -0.375rem;
  display: flex;
  gap: 0.125rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem;
  z-index: 50;
  box-shadow: 0 -4px 12px oklch(0 0 0 / 0.3);
}

.mobile-filter-picker-opt {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  background: transparent;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.mobile-filter-picker-opt:hover {
  background: var(--muted);
}

.mobile-filter-picker-opt.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* Template button in bottom bar */

.mobile-bb-template-btn {
  font-size: 0.875rem;
  min-width: 2rem;
}

/* Template popup (above bottom bar) */

.mobile-template-popup {
  position: fixed;
  transform: translate(-50%, -100%);
  margin-top: -0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  z-index: 50;
  box-shadow: 0 -4px 12px oklch(0 0 0 / 0.3);
  min-width: 12rem;
  max-width: 16rem;
}

.mobile-template-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0;
}

.mobile-template-name {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-template-week-btn {
  padding: 0.125rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--muted-foreground);
  border: none;
  cursor: pointer;
}

.mobile-template-week-btn:active {
  background: var(--accent);
}

.mobile-template-del-btn {
  padding: 0.125rem 0.25rem;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-template-del-btn:active {
  color: var(--destructive);
}

.mobile-template-empty {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: center;
  padding: 0.25rem 0;
}

.mobile-template-save-btn {
  width: 100%;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  margin-top: 0.25rem;
}

.mobile-template-save-btn:active {
  border-color: var(--primary);
  color: var(--foreground);
}

/* Drawer toggle buttons */

.mobile-bb-drawer-toggle {
  font-size: 1.125rem;
}

/* ─── Desktop: Hide all mobile elements ─────────────────────────── */

.mobile-drawer,
.mobile-drawer-overlay,
.mobile-bottom-bar {
  display: none;
}

/* ─── Mobile Landscape: Grid Collapse + Mobile Elements ─────────── */

@media (max-width: 1024px) and (orientation: landscape) {
  .app-container {
    padding: 0;
    height: calc(100vh - 3rem);
    /* fallback: full viewport minus bottom bar */
    height: calc(100dvh - 3rem);
    /* modern: dynamic viewport minus bottom bar */
  }

  /* Week header hidden on mobile - info is in the bottom bar */

  .week-header-nav {
    display: none;
  }

  .main-grid-v3 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    height: 100%;
    /* fill the app-container which already accounts for bottom bar */
  }

  /* Hide side panels */

  #panel-top-left,
  #panel-top-right,
  #panel-mid-left,
  #panel-mid-right,
  #panel-bottom-left,
  #panel-bottom-right {
    display: none;
  }

  /* Hide desktop divider row */

  #panel-mid-center {
    display: none;
  }

  /* Grid panels fill width, strip panel chrome on mobile */

  #panel-top-center,
  #panel-bottom-center {
    grid-column: 1;
    overflow: hidden;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  /* Show mobile elements - drawers only when .open class is added by JS */

  .mobile-drawer.open {
    display: flex;
  }

  .mobile-bottom-bar {
    display: flex;
  }

  /* Panels moved into drawers need to be visible */

  .mobile-drawer-content #panel-top-left {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  /* Left drawer: panel-content fills full height, tighter top padding */

  .mobile-drawer-content #panel-top-left > .panel-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 0.5rem;
    padding-bottom: 0;
  }

  /* Left drawer: logo section becomes horizontal row (logo left, name right) */

  .mobile-drawer-content .team-info-container > .space-y-2 > :first-child {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    padding: 0 0.5rem;
  }

  /* Left drawer: if there's a wrapper around logo + inactive logo, keep it compact */

  .mobile-drawer-content .team-info-container > .space-y-2 > :first-child > .flex {
    gap: 0.375rem;
    align-items: center;
  }

  /* Left drawer: shrink the team logo */

  .mobile-drawer-content .team-logo-clickable {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.25rem;
    flex-shrink: 0;
  }

  /* Left drawer: shrink inactive team logo */

  .mobile-drawer-content .team-logo-switch {
    width: 1.25rem;
    height: 1.25rem;
  }

  /* Left drawer: team name row sits next to logo */

  .mobile-drawer-content .team-info-container .group {
    justify-content: flex-start;
  }

  /* Left drawer: team name font — larger than roster */

  .mobile-drawer-content .team-info-container .group span.truncate {
    font-size: 1rem;
  }

  /* Left drawer: make gear icon always visible on mobile (no hover) */

  .mobile-drawer-content .team-settings-icon {
    opacity: 1;
  }

  /* Left drawer: hide inline logo (not needed, large logo is visible) */

  .mobile-drawer-content .team-logo-inline {
    display: none;
  }

  /* Left drawer: roster fills full width */

  .mobile-drawer-content .team-info-container .space-y-0\.5 {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  /* Left drawer: roster name font (smaller than team name) */

  .mobile-drawer-content .roster-member span.truncate {
    font-size: 0.6875rem;
  }

  /* Left drawer: shrink leader star */

  .mobile-drawer-content .roster-member svg {
    width: 0.625rem;
    height: 0.625rem;
  }

  /* Left drawer: compact avatar badges */

  .mobile-drawer-content .roster-member > div.overflow-hidden {
    width: 1.125rem;
    height: 1.125rem;
  }

  /* Left drawer: tighter roster row spacing */

  .mobile-drawer-content .roster-member {
    padding: 0.0625rem 0.5rem;
    gap: 0.25rem;
  }

  /* Left drawer: grid tools becomes single row pinned to bottom */

  .mobile-drawer-content .grid-tools-drawer {
    position: static;
    transform: none !important;
    height: auto;
    flex-shrink: 0;
    border-radius: 0;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
  }

  /* Always show drawer content on mobile (no collapse) */

  .mobile-drawer-content .grid-tools-drawer.drawer-closed {
    transform: none !important;
  }

  /* Hide the toggle arrow on mobile */

  .mobile-drawer-content .grid-tools-drawer .drawer-arrow {
    display: none;
  }

  /* Hide "Templates" label on mobile */

  .mobile-drawer-content .grid-tools-header [data-action="toggle-drawer"] {
    display: none;
  }

  /* Header: inline, no padding */

  .mobile-drawer-content .grid-tools-header {
    padding: 0;
    flex-shrink: 0;
  }

  /* Hide the entire drawer body on mobile — templates move to bottom bar */

  .mobile-drawer-content .grid-tools-drawer-body {
    display: none;
  }

  /* Right drawer: hide FilterPanel and FavoritesPanel — TeamBrowser has unified "Fav" button */

  .mobile-drawer-content #panel-top-right,
  .mobile-drawer-content #panel-mid-right {
    display: none;
  }

  /* Right drawer: TeamBrowser fills full drawer height */

  .mobile-drawer-content #panel-bottom-right {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .mobile-drawer-content .team-browser {
    height: 100%;
  }

  /* Touch-friendly filter buttons in drawer */

  .mobile-drawer-content .division-filter-btn {
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  /* Compact single-row team cards in drawer */

  .mobile-drawer-content .team-card {
    min-height: 2.25rem;
    padding: 0.25rem 0.375rem;
  }

  /* Hide the full meta line on mobile (division shown inline via pill) */

  .mobile-drawer-content .team-meta {
    display: none;
  }

  /* Show inline division pill on mobile */

  .mobile-drawer-content .division-pill {
    display: inline;
  }

  /* Smaller badge on mobile */

  .mobile-drawer-content .team-tag-badge {
    width: 1.75rem;
    height: 1.5rem;
    font-size: 0.5rem;
    border-radius: 0.1875rem;
  }

  /* Star button touch area in drawer */

  .mobile-drawer-content .star-btn {
    min-width: 2.25rem;
    min-height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Smaller star icon on mobile */

  .mobile-drawer-content .star-btn svg {
    width: 0.875rem;
    height: 0.875rem;
  }

  /* Smaller team name text on mobile */

  .mobile-drawer-content .team-name {
    font-size: 0.75rem;
  }

  /* Hide scrollbar in mobile team list */

  .mobile-drawer-content .team-list {
    scrollbar-width: none;
  }

  .mobile-drawer-content .team-list::-webkit-scrollbar {
    display: none;
  }

  /* Strip panel chrome inside drawers — panels should blend seamlessly */

  .mobile-drawer-content .panel {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  /* Drawer bottom padding for bottom bar clearance */

  .mobile-drawer-content {
    padding-bottom: 3.5rem;
    height: 100%;
    overscroll-behavior: contain;
    /* Prevent scroll from bubbling to body */
  }

  /* Reverse drawer layout: team list on top, search+filters at bottom (thumb zone) */

  .mobile-drawer-content .team-browser {
    flex-direction: column-reverse;
  }

  /* Merge search + filters into single row on mobile */

  .mobile-drawer-content .browser-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0;
    margin-top: 0.375rem;
    flex-shrink: 0;
  }

  .mobile-drawer-content .browser-header > .relative {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
  }

  .mobile-drawer-content .browser-header > .flex {
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 0.25rem;
  }

  .mobile-drawer-content .browser-header input {
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-height: 2rem;
  }

  /* Tighter team card spacing on mobile */

  .mobile-drawer-content .team-list {
    gap: 0.125rem;
  }

  .mobile-drawer-content .team-list > * + * {
    margin-top: 0.125rem;
  }

  /* Remove cell min-height so rows shrink to fit viewport */

  .grid-cell {
    min-height: 0;
    min-width: 0;
  }

  /* Narrower time label column on mobile */

  .grid-header,
  .grid-row {
    grid-template-columns: 2rem repeat(7, 1fr);
  }

  /* Smaller time labels on mobile */

  .time-label {
    font-size: 0.6rem;
  }

  /* Tighter day header */

  .day-header {
    padding: 0;
    font-size: 0.65rem;
  }

  /* Switch grid body from flex to CSS grid so rows divide space equally */

  .grid-body {
    display: grid;
    grid-template-rows: repeat(11, 1fr);
    gap: 1px;
    overflow: hidden;
  }

  /* Grid rows become grid items instead of flex items */

  .grid-row {
    min-height: 0;
  }

  /* Tighten week-display padding on mobile */

  .week-display {
    padding: 0;
  }

  /* Slice 10.0d: Touch interaction styles */

  /* Prevent browser from stealing touch pointer for scroll/zoom on grid.
     Grid doesn't scroll on mobile (overflow:hidden + 1fr rows), so this is safe.
     Without this, the browser captures the pointer before our JS can disambiguate. */

  .availability-grid-container {
    touch-action: none;
  }

  /* Prevent text selection during drag */

  .availability-grid-container.dragging {
    -moz-user-select: none;
         user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }

  /* Tap feedback on grid cells */

  .grid-cell:active {
    opacity: 0.8;
    transition: none;
  }

  /* Bottom bar button tap feedback */

  .mobile-bb-btn:active {
    opacity: 0.8;
  }

  /* FAB repositioning above bottom bar on mobile */

  .selection-action-btn {
    bottom: 3.5rem;
    /* 3rem bottom bar + 0.5rem spacing */
  }
}

.placeholder\:text-muted-foreground::-moz-placeholder {
  color: var(--muted-foreground);
}

.placeholder\:text-muted-foreground::placeholder {
  color: var(--muted-foreground);
}

.hover\:scale-110:hover {
  --tw-scale-x: 1.1;
  --tw-scale-y: 1.1;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.hover\:border-border:hover {
  border-color: var(--border);
}

.hover\:border-primary:hover {
  border-color: var(--primary);
}

.hover\:border-red-500:hover {
  --tw-border-opacity: 1;
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
}

.hover\:bg-\[\#4752C4\]:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(71 82 196 / var(--tw-bg-opacity, 1));
}

.hover\:bg-accent:hover {
  background-color: var(--accent);
}

.hover\:bg-muted:hover {
  background-color: var(--muted);
}

.hover\:bg-red-500\/10:hover {
  background-color: rgb(239 68 68 / 0.1);
}

.hover\:text-destructive:hover {
  color: var(--destructive);
}

.hover\:text-foreground:hover {
  color: var(--foreground);
}

.hover\:text-red-300:hover {
  --tw-text-opacity: 1;
  color: rgb(252 165 165 / var(--tw-text-opacity, 1));
}

.hover\:text-red-400:hover {
  --tw-text-opacity: 1;
  color: rgb(248 113 113 / var(--tw-text-opacity, 1));
}

.hover\:text-red-500:hover {
  --tw-text-opacity: 1;
  color: rgb(239 68 68 / var(--tw-text-opacity, 1));
}

.hover\:text-white:hover {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.hover\:text-yellow-400:hover {
  --tw-text-opacity: 1;
  color: rgb(250 204 21 / var(--tw-text-opacity, 1));
}

.hover\:underline:hover {
  text-decoration-line: underline;
}

.hover\:opacity-100:hover {
  opacity: 1;
}

.hover\:opacity-80:hover {
  opacity: 0.8;
}

.hover\:opacity-90:hover {
  opacity: 0.9;
}

.focus\:border-primary:focus {
  border-color: var(--primary);
}

.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:ring-1:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-2:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-primary:focus {
  --tw-ring-color: var(--primary);
}

.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}

.disabled\:opacity-50:disabled {
  opacity: 0.5;
}

.disabled\:hover\:border-border:hover:disabled {
  border-color: var(--border);
}

.disabled\:hover\:text-muted-foreground:hover:disabled {
  color: var(--muted-foreground);
}

.group:hover .group-hover\:border-primary {
  border-color: var(--primary);
}

.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}