*, ::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.19 | 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: Figtree, system-ui, sans-serif;
  /* 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: Roboto 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;
}

:root {
  /* Nord Polar Night */
  --nord0: #2E3440;
  --nord1: #3B4252;
  --nord2: #434C5E;
  --nord3: #4C566A;
  /* Nord Snow Storm */
  --nord4: #D8DEE9;
  --nord5: #E5E9F0;
  --nord6: #ECEFF4;
  /* Nord Frost */
  --nord7: #8FBCBB;
  --nord8: #88C0D0;
  --nord9: #81A1C1;
  --nord10: #5E81AC;
  /* Nord Aurora */
  --nord11: #BF616A;
  --nord12: #D08770;
  --nord13: #EBCB8B;
  --nord14: #A3BE8C;
  --nord15: #B48EAD;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  background-color: var(--nord6);
  color: var(--nord0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

html {
  height: 100vh;
  overflow: hidden;
}

.container {
  width: 100%;
}

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

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

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

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

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

/* Main App Layout */

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Navbar */

.navbar {
  border-bottom-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(216 222 233 / var(--tw-border-opacity, 1));
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  flex-shrink: 0;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.navbar-controls {
  flex: 1 1 0%;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.75rem;
}

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

.navbar-title {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(46 52 64 / var(--tw-text-opacity, 1));
  white-space: nowrap;
  flex-shrink: 0;
}

/* Control Groups */

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.control-label {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  --tw-text-opacity: 1;
  color: rgb(67 76 94 / var(--tw-text-opacity, 1));
  white-space: nowrap;
}

/* Grid Size Controls */

.grid-size-inline {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.grid-input {
  width: 3.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1rem;
  border-radius: 0.25rem;
  border-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(216 222 233 / var(--tw-border-opacity, 1));
  --tw-bg-opacity: 1;
  background-color: rgb(236 239 244 / var(--tw-bg-opacity, 1));
}

.grid-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --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);
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(129 161 193 / var(--tw-ring-opacity, 1));
}

.grid-x {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  --tw-text-opacity: 1;
  color: rgb(67 76 94 / var(--tw-text-opacity, 1));
}

.apply-btn {
  display: flex;
  height: 1.75rem;
  width: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  --tw-bg-opacity: 1;
  background-color: rgb(129 161 193 / var(--tw-bg-opacity, 1));
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.apply-btn:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(94 129 172 / var(--tw-bg-opacity, 1));
}

.apply-btn {
  cursor: pointer;
  border-style: none;
  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;
}

.apply-btn svg {
  height: 0.875rem;
  width: 0.875rem;
}

/* Algorithm Select */

.control-select {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  border-radius: 0.25rem;
  border-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(216 222 233 / var(--tw-border-opacity, 1));
  --tw-bg-opacity: 1;
  background-color: rgb(236 239 244 / var(--tw-bg-opacity, 1));
}

.control-select:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --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);
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(129 161 193 / var(--tw-ring-opacity, 1));
}

.control-select {
  cursor: pointer;
  min-width: 140px;
}

/* Speed Control */

.speed-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.25rem;
  --tw-bg-opacity: 1;
  background-color: rgb(236 239 244 / var(--tw-bg-opacity, 1));
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.speed-icon {
  --tw-text-opacity: 1;
  color: rgb(67 76 94 / var(--tw-text-opacity, 1));
  width: 14px;
  height: 14px;
}

.speed-slider {
  height: 0.375rem;
  width: 6rem;
  border-radius: 0.5rem;
  --tw-bg-opacity: 1;
  background-color: rgb(216 222 233 / var(--tw-bg-opacity, 1));
  cursor: pointer;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}

.speed-slider::-webkit-slider-thumb {
  height: 0.75rem;
  width: 0.75rem;
  -webkit-appearance: none;
          appearance: none;
  border-radius: 9999px;
  cursor: pointer;
  --tw-bg-opacity: 1;
  background-color: rgb(129 161 193 / var(--tw-bg-opacity, 1));
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.speed-slider::-webkit-slider-thumb:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(94 129 172 / var(--tw-bg-opacity, 1));
  transform: scale(1.2);
}

.speed-slider::-moz-range-thumb {
  height: 0.75rem;
  width: 0.75rem;
  border-radius: 9999px;
  border-width: 0px;
  cursor: pointer;
  --tw-bg-opacity: 1;
  background-color: rgb(129 161 193 / var(--tw-bg-opacity, 1));
  -moz-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.speed-slider::-moz-range-thumb:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(94 129 172 / var(--tw-bg-opacity, 1));
  transform: scale(1.2);
}

.speed-label {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  --tw-text-opacity: 1;
  color: rgb(46 52 64 / var(--tw-text-opacity, 1));
  min-width: 3.5rem;
}

/* Action Buttons */

.action-buttons {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: 0.25rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.nav-btn svg {
  height: 0.875rem;
  width: 0.875rem;
}

.nav-btn-primary {
  --tw-bg-opacity: 1;
  background-color: rgb(129 161 193 / var(--tw-bg-opacity, 1));
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.nav-btn-primary:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(94 129 172 / var(--tw-bg-opacity, 1));
}

.nav-btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.nav-btn-secondary {
  --tw-bg-opacity: 1;
  background-color: rgb(229 233 240 / var(--tw-bg-opacity, 1));
  --tw-text-opacity: 1;
  color: rgb(46 52 64 / var(--tw-text-opacity, 1));
}

.nav-btn-secondary:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(216 222 233 / var(--tw-bg-opacity, 1));
}

.nav-btn-secondary {
  border-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(216 222 233 / var(--tw-border-opacity, 1));
}

.nav-btn-danger {
  --tw-bg-opacity: 1;
  background-color: rgb(191 97 106 / var(--tw-bg-opacity, 1));
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.nav-btn-danger:hover {
  --tw-bg-opacity: 0.9;
}

.nav-btn:active {
  transform: scale(0.98);
}

/* Stats Inline */

.stats-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.25rem;
  --tw-bg-opacity: 1;
  background-color: rgb(236 239 244 / var(--tw-bg-opacity, 1));
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.stat-inline {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.stat-icon {
  --tw-text-opacity: 1;
  color: rgb(129 161 193 / var(--tw-text-opacity, 1));
  width: 14px;
  height: 14px;
}

.stat-value {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(46 52 64 / var(--tw-text-opacity, 1));
  min-width: 3rem;
  display: inline-block;
  text-align: right;
}

/* Icon Button */

.icon-btn {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background-color: transparent;
}

.icon-btn:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(229 233 240 / var(--tw-bg-opacity, 1));
}

.icon-btn {
  --tw-text-opacity: 1;
  color: rgb(59 66 82 / var(--tw-text-opacity, 1));
}

.icon-btn:hover {
  --tw-text-opacity: 1;
  color: rgb(46 52 64 / var(--tw-text-opacity, 1));
}

.icon-btn {
  cursor: pointer;
  border-style: none;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.icon-btn svg {
  height: 1.25rem;
  width: 1.25rem;
}

/* Grid Container (Full Screen) */

.grid-container {
  flex: 1 1 0%;
  --tw-bg-opacity: 1;
  background-color: rgb(236 239 244 / var(--tw-bg-opacity, 1));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2rem;
  padding-bottom: 4rem;
  position: relative;
}

.path-grid {
  display: grid;
  gap: 2px;
  padding: 1rem;
  background: var(--nord5);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
  /* Make grid as large as possible */
  width: min(98%, calc(100vh - 120px));
  height: min(98%, calc(100vh - 120px));
  aspect-ratio: 1;
}

/* Grid Cell Styles */

.grid-cell {
  aspect-ratio: 1;
  border: 1px solid var(--nord4);
  transition: all 0.15s ease;
  position: relative;
  cursor: default;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.cell-empty {
  background-color: var(--nord6);
}

.cell-empty:hover {
  background-color: var(--nord5);
}

.cell-wall {
  background-color: var(--nord2);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  border-color: var(--nord1);
}

.cell-start,
  .cell-end {
  cursor: grab;
  font-weight: bold;
  font-size: clamp(0.5rem, 2vw, 0.9rem);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
  border-width: 2px;
  border-style: solid;
}

.cell-start:hover,
  .cell-end:hover {
  transform: scale(1.05);
  z-index: 10;
}

.cell-start.dragging,
  .cell-end.dragging {
  cursor: grabbing;
  opacity: 0.8;
  transform: scale(1.02);
}

.cell-start {
  background: linear-gradient(135deg, #A3BE8C 0%, #8aa373 100%);
  border-color: #7a9363;
  box-shadow: 0 2px 4px rgba(163, 190, 140, 0.3);
}

.cell-end {
  background: linear-gradient(135deg, #BF616A 0%, #a34d55 100%);
  border-color: #933d45;
  box-shadow: 0 2px 4px rgba(191, 97, 106, 0.3);
}

.cell-visited {
  background-color: var(--nord8);
  animation: visitedPulse 0.3s ease-out;
}

.cell-path {
  background-color: var(--nord10);
  animation: pathGlow 0.5s ease-out;
  box-shadow: 0 0 5px 2px rgba(94, 129, 172, 0.3);
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0px;
  background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
  --tw-bg-opacity: 0.5;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.modal-overlay.hidden {
  pointer-events: none;
  opacity: 0;
}

.modal-content {
  border-radius: 0.5rem;
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
  --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  margin-left: 1rem;
  margin-right: 1rem;
  width: 100%;
  max-width: 42rem;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(216 222 233 / var(--tw-border-opacity, 1));
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.modal-title {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(46 52 64 / var(--tw-text-opacity, 1));
}

.modal-body {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* Instructions */

.instruction-list {
  margin-bottom: 1.5rem;
}

.instruction-list > :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));
}

.instruction-item-new {
  display: flex;
  gap: 1rem;
}

.instruction-number {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  --tw-bg-opacity: 1;
  background-color: rgb(129 161 193 / var(--tw-bg-opacity, 1));
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.instruction-title {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(46 52 64 / var(--tw-text-opacity, 1));
}

.instruction-text {
  font-size: 0.875rem;
  line-height: 1.25rem;
  line-height: 1.625;
  --tw-text-opacity: 1;
  color: rgb(67 76 94 / var(--tw-text-opacity, 1));
}

/* Keyboard Shortcuts */

.keyboard-shortcuts {
  border-radius: 0.5rem;
  --tw-bg-opacity: 1;
  background-color: rgb(236 239 244 / var(--tw-bg-opacity, 1));
  padding: 1rem;
}

.shortcuts-title {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(46 52 64 / var(--tw-text-opacity, 1));
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  --tw-text-opacity: 1;
  color: rgb(59 66 82 / var(--tw-text-opacity, 1));
}

kbd {
  border-radius: 0.25rem;
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  border-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(216 222 233 / var(--tw-border-opacity, 1));
  font-family: Roboto Mono, monospace;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(46 52 64 / var(--tw-text-opacity, 1));
  --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.visible {
  visibility: visible;
}

.static {
  position: static;
}

.fixed {
  position: fixed;
}

.right-4 {
  right: 1rem;
}

.top-12 {
  top: 3rem;
}

.top-14 {
  top: 3.5rem;
}

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

.flex {
  display: flex;
}

.table {
  display: table;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.h-16 {
  height: 4rem;
}

.w-16 {
  width: 4rem;
}

.gap-2 {
  gap: 0.5rem;
}

.overflow-hidden {
  overflow: hidden;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.bg-nord-aurora-green {
  --tw-bg-opacity: 1;
  background-color: rgb(163 190 140 / var(--tw-bg-opacity, 1));
}

.bg-nord-aurora-red {
  --tw-bg-opacity: 1;
  background-color: rgb(191 97 106 / var(--tw-bg-opacity, 1));
}

.bg-nord-frost-3 {
  --tw-bg-opacity: 1;
  background-color: rgb(129 161 193 / var(--tw-bg-opacity, 1));
}

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

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

.bg-slate-500 {
  --tw-bg-opacity: 1;
  background-color: rgb(100 116 139 / var(--tw-bg-opacity, 1));
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

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

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

.shadow-lg {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

/* Animations */

@keyframes visitedPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pathGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(94, 129, 172, 0.5);
  }

  50% {
    box-shadow: 0 0 15px 5px rgba(94, 129, 172, 0.3);
  }

  100% {
    box-shadow: 0 0 5px 2px rgba(94, 129, 172, 0.2);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Custom Tooltip */

.custom-tooltip {
  position: fixed;
  background: var(--nord0);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.custom-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.custom-tooltip::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 4px solid var(--nord0);
}

/* Footer Credit */

.footer-credit {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
}

.footer-text {
  --tw-text-opacity: 1;
  color: rgb(67 76 94 / var(--tw-text-opacity, 1));
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.modal-overlay.footer-created {
  pointer-events: none;
  opacity: 0;
}

.footer-created {
  display: none;
}

@media (min-width: 640px) {
  .footer-created {
    display: inline;
  }
}

.footer-link {
  --tw-text-opacity: 1;
  color: rgb(30 41 59 / var(--tw-text-opacity, 1));
}

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

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 640px) {
  .footer-link {
    gap: 0.5rem;
  }
}

.footer-link {
  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;
  pointer-events: auto;
  text-decoration: none;
}

.footer-avatar {
  border-radius: 9999px;
  border-width: 2px;
  border-color: rgb(0 0 0 / 0.2);
}

.footer-avatar:hover {
  border-color: rgb(0 0 0 / 0.4);
}

.footer-avatar {
  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;
  width: 0.8rem;
  height: 0.8rem;
}

@media (min-width: 640px) {
  .footer-text {
    font-size: 0.75rem;
  }

  .footer-avatar {
    width: 1.5rem;
    height: 1.5rem;
  }
}
