/* src/styles.css */
:root {
  --display:
    "Bricolage Grotesque",
    system-ui,
    sans-serif;
  --body:
    "IBM Plex Sans",
    system-ui,
    sans-serif;
  --mono:
    "IBM Plex Mono",
    ui-monospace,
    monospace;
  --ink: #141519;
  --ink-2: #181a20;
  --panel: #1d2029;
  --panel-2: #252934;
  --panel-3: #2c313d;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f4f1e8;
  --text-2: #a7adbb;
  --text-3: #6c7282;
  --amber: #ffb020;
  --amber-deep: #e8930a;
  --coral: #ff5d5d;
  --blue: #4f82f0;
  --tile: #2f5fd0;
  --tile-2: #274fb0;
  --tile-edge: #6f97f4;
  --tile-ink: #fdfdff;
  --empty: #23262f;
  --empty-edge: #2b2f3a;
  --tw: #d2506e;
  --dw: #e08a3c;
  --tl: #2fa793;
  --dl: #5570d8;
  --px: 0px;
  --py: 0px;
  --gx: 50%;
  --gy: 0%;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(
      120% 80% at 50% -10%,
      #20232e 0%,
      var(--ink) 55%,
      #101115 100%);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(
      to right,
      rgba(255, 255, 255, 0.028) 1px,
      transparent 1px),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.028) 1px,
      transparent 1px);
  background-size: 46px 46px;
  transform: translate3d(var(--px), var(--py), 0);
  -webkit-mask-image:
    radial-gradient(
      120% 90% at 50% 30%,
      #000 35%,
      transparent 80%);
  mask-image:
    radial-gradient(
      120% 90% at 50% 30%,
      #000 35%,
      transparent 80%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      420px 420px at var(--gx) var(--gy),
      rgba(255, 176, 32, 0.10),
      rgba(255, 93, 93, 0.05) 40%,
      transparent 70%);
  mix-blend-mode: screen;
  transition: background 0.25s ease-out;
}
.topbar,
.hero,
.loop,
.foot {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 22px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.glyph {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  color: var(--tile-ink);
  background:
    linear-gradient(
      160deg,
      var(--tile-edge),
      var(--tile) 55%,
      var(--tile-2));
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 16px rgba(20, 40, 110, 0.45);
}
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-2);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.chip {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-3);
}
.chip[data-state=ready] {
  color: #7fe0b0;
  border-color: rgba(127, 224, 176, 0.3);
}
.chip[data-state=error] {
  color: var(--coral);
  border-color: rgba(255, 93, 93, 0.35);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.92fr);
  gap: 26px;
  align-items: start;
  padding-top: 14px;
  padding-bottom: 30px;
}
.board-wrap {
  min-width: 0;
}
.board-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.seg {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 3px;
}
.seg-btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 7px 15px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.seg-btn.is-active {
  color: #1a1407;
  background:
    linear-gradient(
      180deg,
      var(--amber),
      var(--amber-deep));
}
.board-actions {
  display: flex;
  gap: 14px;
}
.link-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-2);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.link-btn:hover {
  color: var(--amber);
  border-color: var(--amber);
}
.board {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
  gap: 3px;
  aspect-ratio: 1 / 1;
  width: 100%;
  padding: 10px;
  background:
    linear-gradient(
      180deg,
      var(--panel-2),
      var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.cell {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--empty);
  box-shadow: inset 0 0 0 1px var(--empty-edge);
  font-family: var(--mono);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}
.cell:hover {
  transform: translateY(-1px);
}
.cell .bl {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: clamp(6px, 0.78vw, 9px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  opacity: 0.92;
}
.cell .lt {
  font-size: clamp(10px, 1.7vw, 22px);
  line-height: 1;
}
.cell .pv {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: clamp(6px, 0.72vw, 9px);
  font-weight: 600;
  line-height: 1;
}
.cell.b-TW {
  background: color-mix(in srgb, var(--tw) 26%, var(--empty));
}
.cell.b-TW .bl {
  color: var(--tw);
}
.cell.b-DW {
  background: color-mix(in srgb, var(--dw) 24%, var(--empty));
}
.cell.b-DW .bl {
  color: var(--dw);
}
.cell.b-TL {
  background: color-mix(in srgb, var(--tl) 24%, var(--empty));
}
.cell.b-TL .bl {
  color: var(--tl);
}
.cell.b-DL {
  background: color-mix(in srgb, var(--dl) 26%, var(--empty));
}
.cell.b-DL .bl {
  color: var(--dl);
}
.cell.b-center:not(.filled)::after {
  content: "\2605";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--amber);
  font-size: clamp(10px, 1.5vw, 18px);
  opacity: 0.85;
  animation: pulseStar 3.4s ease-in-out infinite;
}
.cell.filled {
  background:
    linear-gradient(
      160deg,
      var(--tile-edge) 0%,
      var(--tile) 48%,
      var(--tile-2) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 3px 7px rgba(15, 30, 90, 0.4);
  color: var(--tile-ink);
}
.cell.filled .lt {
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.cell.filled .pv {
  color: rgba(255, 255, 255, 0.82);
}
.cell.filled .bl {
  display: none;
}
.cell.filled.blank .lt {
  opacity: 0;
}
.cell.filled.blank::after {
  content: "";
  position: absolute;
  width: 46%;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.7);
  transform: rotate(-32deg);
}
.cell.sel {
  box-shadow: 0 0 0 2px var(--amber), inset 0 0 0 1px var(--empty-edge);
}
.cell.filled.sel {
  box-shadow: 0 0 0 2px var(--amber), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.cell.hl {
  transform: translateY(-1px) scale(1.05);
  z-index: 3;
  box-shadow: 0 0 0 2px var(--amber), 0 6px 14px rgba(255, 176, 32, 0.35);
}
.cell.hl.filled {
  background:
    linear-gradient(
      160deg,
      #ffd27a,
      var(--amber) 60%,
      var(--amber-deep));
  color: #241602;
}
.cell.hl.filled .pv {
  color: rgba(36, 22, 2, 0.7);
}
.cell.drop-anim {
  animation: tileIn 0.42s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
.board-foot {
  margin: 12px 2px 0;
  font-size: 12.5px;
  color: var(--text-3);
}
kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-2);
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  margin: 0 1px;
}
.side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.dropzone {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 124px;
  padding: 16px;
  border: 1.5px dashed var(--line-2);
  border-radius: 14px;
  background: var(--panel);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}
.dropzone:hover {
  border-color: var(--text-3);
}
.dropzone.dragover {
  transform: translateY(-2px) scale(1.01);
  border-color: var(--amber);
  border-style: solid;
  background: color-mix(in srgb, var(--amber) 8%, var(--panel));
  box-shadow: 0 12px 30px -12px rgba(255, 176, 32, 0.5);
}
.drop-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.drop-ico {
  font-size: 24px;
  color: var(--amber);
  line-height: 1;
}
.drop-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
}
.drop-hint {
  font-size: 12.5px;
  color: var(--text-3);
}
.drop-img {
  max-width: 100%;
  max-height: 168px;
  border-radius: 9px;
  object-fit: contain;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.7);
}
.dropzone.has-image .drop-state {
  display: none;
}
.dropzone.has-image {
  border-style: solid;
  border-color: var(--line-2);
  cursor: default;
}
.drop-reading {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(16, 17, 21, 0.72);
  backdrop-filter: blur(2px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--amber);
}
.dropzone.reading .drop-reading {
  display: grid;
}
.dropzone.reading .drop-reading span {
  background:
    linear-gradient(
      90deg,
      var(--text-3),
      var(--amber),
      var(--text-3));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.3s linear infinite;
}
.rack-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rack-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--text-2);
}
.rack-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}
.rack {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.rslot {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  background: var(--empty);
  box-shadow: inset 0 0 0 1.5px dashed var(--empty-edge);
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(14px, 3.4vw, 22px);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.rslot:hover {
  transform: translateY(-2px);
}
.rslot.filled {
  background:
    linear-gradient(
      160deg,
      var(--tile-edge),
      var(--tile) 52%,
      var(--tile-2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 4px 9px rgba(15, 30, 90, 0.4);
  color: var(--tile-ink);
}
.rslot.filled.blank {
  color: transparent;
}
.rslot.filled.blank::after {
  content: "";
  position: absolute;
  width: 44%;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.75);
  transform: rotate(-32deg);
}
.rslot .pv {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.8);
}
.rslot.sel {
  box-shadow: 0 0 0 2px var(--amber);
}
.controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.btn {
  position: relative;
  flex: 0 0 auto;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #241602;
  background:
    linear-gradient(
      180deg,
      #ffc24d,
      var(--amber) 55%,
      var(--amber-deep));
  border: 0;
  border-radius: 12px;
  padding: 13px 30px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(255, 176, 32, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition:
    transform 0.1s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
  min-width: 132px;
}
.btn:hover {
  filter: brightness(1.05);
}
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 5px 14px -8px rgba(255, 176, 32, 0.7);
}
.btn:disabled {
  filter: grayscale(0.4) brightness(0.8);
  cursor: default;
}
.btn-spin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  display: none;
  border: 2px solid rgba(36, 22, 2, 0.35);
  border-top-color: #241602;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.is-solving .btn-label {
  visibility: hidden;
}
.btn.is-solving .btn-spin {
  display: block;
}
.solve-status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}
.results-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-height: 44vh;
}
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  border-radius: 14px 14px 0 0;
}
.results-count {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}
.solve-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}
.results {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
}
.results::-webkit-scrollbar {
  width: 9px;
}
.results::-webkit-scrollbar-thumb {
  background: var(--panel-3);
  border-radius: 9px;
  border: 2px solid var(--panel);
}
.res {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: default;
  border-left: 2px solid transparent;
  animation: reveal 0.4s cubic-bezier(0.2, 0.8, 0.25, 1) both;
  transition:
    background 0.13s ease,
    border-color 0.13s ease,
    transform 0.13s ease;
}
.res:hover {
  background: var(--panel-2);
  border-left-color: var(--amber);
  transform: translateX(2px);
}
.res .rk {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
}
.res .word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.res .mid {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.res .meta {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 2px;
  letter-spacing: 0.01em;
  white-space: normal;
  overflow-wrap: anywhere;
}
.res .meta .used {
  color: var(--text-2);
}
.res .sc {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 21px;
  text-align: right;
  min-width: 40px;
}
.res.bingo .sc {
  color: var(--coral);
}
.res .bingo-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--coral);
  border: 1px solid rgba(255, 93, 93, 0.4);
  border-radius: 5px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}
.results-empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.dev {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.dev summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dev summary::-webkit-details-marker {
  display: none;
}
.dev summary::before {
  content: "\25b8";
  transition: transform 0.15s ease;
}
.dev[open] summary::before {
  transform: rotate(90deg);
}
.dev-tag {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}
.dev-text {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-3);
}
.dev-fine {
  font-size: 11px;
  opacity: 0.85;
}
.dev-input {
  width: 100%;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 9px 10px;
}
.dev-input:focus {
  outline: none;
  border-color: var(--amber);
}
.loop {
  padding-top: 26px;
  padding-bottom: 40px;
}
.loop-title {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(26px, 4.4vw, 46px);
  line-height: 1.04;
  margin: 0 0 30px;
  max-width: 16ch;
}
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.steps::before {
  content: "";
  position: absolute;
  left: 19px;
  right: 19px;
  top: 19px;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      var(--amber),
      var(--coral) 50%,
      var(--blue));
  opacity: 0.35;
}
.step {
  position: relative;
}
.reveal-on .step {
  opacity: 0;
  transform: translateY(14px);
}
.reveal-on .step.in {
  animation: reveal 0.5s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
  animation-delay: calc(var(--i) * 90ms);
}
.step-n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  color: var(--amber);
  background: var(--ink-2);
  border: 1.5px solid var(--line-2);
}
.step h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  margin: 14px 0 6px;
}
.step p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
  max-width: 26ch;
}
.foot {
  padding-top: 22px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
}
.foot p {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
  max-width: 78ch;
}
.foot-small {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.8;
}
@keyframes tileIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.7);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pulseStar {
  0%, 100% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.06);
  }
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .results-wrap {
    max-height: 50vh;
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px 18px;
  }
  .steps::before {
    display: none;
  }
}
@media (max-width: 520px) {
  .topbar {
    flex-wrap: wrap;
  }
  .brand-sub {
    order: 3;
  }
  .chip {
    margin-left: 0;
  }
  .steps {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
/*# sourceMappingURL=solver.css.map */
