html {
  scroll-behavior: smooth;        
  scroll-padding-top: 50px;      /* offset for in-page anchors */
}

:root {
  --grid-size: 4;
  --grid-max-width: min(100vw - 40px, 960px);
  --divider-thickness: clamp(3px, 0.8vw, 4px);
  --arrow-size: var(--divider-thickness);
  --frame-thickness: clamp(4px, 0.9vw, 7px);
  --cell-min-size: 48px;
  --cell-max-size: 180px;
  --page-side-padding: 20px;
  --layout-max-width: 1120px;
  --site-header-gap: clamp(12px, 3vw, 32px);
  font-family: 'Roboto', sans-serif;
}

@media (min-width: 769px) {
  :root {
    --grid-max-width: min(100vw - 40px, 720px);
    --divider-thickness: clamp(2.25px, 0.6vw, 3px);
    --cell-min-size: 36px;
    --cell-max-size: 135px;
  }

  .cell-value {
    font-size: clamp(2.1rem, 5.25vw, 3.75rem);
  }

  .arrow-symbol {
    font-size: clamp(15.75px, calc(var(--cell-size) * 0.525), 45px);
    width: clamp(27px, calc(var(--cell-size) * 0.675), 81px);
    height: clamp(27px, calc(var(--cell-size) * 0.675), 81px);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #111111;
  color: #1a1a1a;
  touch-action: manipulation;
}

.dojo-page {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 48px var(--page-side-padding) 96px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  color: #f3f3f5;
}

.dojo-page__intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dojo-page__title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: #f3f3f5;
}

.dojo-page__subtitle {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #c6c8d1;
  max-width: 560px;
}

.dojo-pack-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.dojo-pack-list__message {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d9099;
}

.dojo-pack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dojo-pack__header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 500px;
  width: 100%;
}

.dojo-pack__title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f3f3f5;
}

.dojo-pack__progress {
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: #999999;
}

.dojo-pack__progress--complete {
  color: #99AA99;
}

.dojo-pack__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 500px;
  width: 100%;
  align-self: flex-start;
}

.dojo-pack__error {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #ff7575;
}

.dojo-puzzle-row {
  display: flex;
  align-items: stretch;
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  background: transparent;
  position: relative;
}

.dojo-puzzle-row::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 5px solid #3a3a3a;
  opacity: 0;
  transition: opacity 120ms ease;
  pointer-events: none;
}

.dojo-puzzle-row:focus-visible {
  outline: none;
}

.dojo-puzzle-row:hover::after,
.dojo-puzzle-row:focus-visible::after,
.dojo-puzzle-row:active::after {
  opacity: 1;
}

.dojo-puzzle-row__info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: #249924;
  color: #f3f3f5;
}

.dojo-puzzle-row__title-group {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  flex-wrap: wrap;
}

.dojo-puzzle-row__title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dojo-puzzle-row__rules {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  margin-left: 0;
}

.dojo-puzzle-row__rules[hidden] {
  display: none;
}

.dojo-page__subtitle a {
  color: #6699CC;
}

.dojo-puzzle-row__rule-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: #666666;
  transform: scale(1.35);
  transform-origin: left center;
}

.dojo-puzzle-row__rule-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dojo-puzzle-row__status {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 10px;
  min-width: 150px;
  padding: 18px 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 600;
  background: #241414;
  color: #ff7676;
}

.dojo-puzzle-row__status-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  line-height: 1;
}

.dojo-puzzle-row__status-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.dojo-puzzle-row__status-text {
  color: currentColor;
}

.dojo-puzzle-row--unsolved .dojo-puzzle-row__info {
  background: #232323;
}

.dojo-puzzle-row--unsolved .dojo-puzzle-row__status {
  background: #271717;
  color: #a14545;
}

.dojo-puzzle-row--solved .dojo-puzzle-row__info {
  background: #243324;
}

.dojo-puzzle-row--solved .dojo-puzzle-row__status {
  background: #0f2617;
  color: #448760;
}

.dojo-puzzle-row--solved .dojo-puzzle-row__rule-icon {
  color: #647b6d;
}


.dojo-pack--error .dojo-pack__list {
  display: none;
}

@media (max-width: 640px) {
  .dojo-page {
    padding-top: 32px;
  }

  .dojo-pack__progress {
    font-size: 0.85rem;
  }
}

.site-header {
  background: #1a1a1a;
  color: #f3f3f5;
  position: relative;
  width: 100%;
}

.site-header__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--site-header-gap);
  margin: 0 auto;
  max-width: var(--layout-max-width);
  width: 100%;
  padding: 0;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  padding: 14px 0 14px 10px;
}

.site-header__brand-image {
  height: clamp(28px, 6vw, 42px);
  width: auto;
  display: block;
}

.site-header__nav {
  display: flex;
  align-items: stretch;
  margin-left: auto;
  background: #1a1a1a; /*was #212121;*/
  position: relative;
}

.site-header__nav::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 100vw;
  background: #1a1a1a; /*was #212121;*/
  pointer-events: none;
}

.site-header__menu {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #1a1a1a; /*was #212121;*/
  padding: 10px 12px 10px 20px;
  color: #aaaaaa;
  align-self: stretch;
  border-radius: 0;
  position: relative;
  cursor: pointer;
}

.site-header__title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: right;
  user-select: none;
}

.site-header__dropdown {
  cursor: auto;
}

.site-header__menu-toggle {
  border: none;
  background: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 25px;
  cursor: pointer;
}

.site-header__menu-toggle:focus-visible {
  outline: 2px solid #f3f3f5;
  outline-offset: 2px;
}

.site-header__menu-icon {
  width: 100%;
  height: auto;
}

.site-header__dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0px;
  background: #1a1a1a;
  border-radius: 0;
  min-width: 180px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  z-index: 1000;
}

.site-header__dropdown-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  text-align:right;
  gap: 2px;
}

.site-header__dropdown-link {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: #aaaaaa;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-header__dropdown-link:hover,
.site-header__dropdown-link:focus-visible {
  background: #2c2c2c;
  color: #ffffff;
}

.site-header--menu-open .site-header__menu-toggle {
  opacity: 0.85;
}

@media (max-width: 768px) {
  .site-header__dropdown {
    margin-top: 0;
  }

  .site-header__nav::after {
    display: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.page {
  max-width: 960px;
  margin: 18px auto 40px;
  padding: 0 var(--page-side-padding) 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.daily-page-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.daily-page-header__meta,
.daily-page-header__cta {
  width: 100%;
  max-width: min(420px, 100%);
}

.daily-page-header__cta {
  order: 1;
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin-top: -18px;
}

.daily-page-header__cta[hidden] {
  display: none !important;
}

.daily-page-header__meta {
  order: 2;
  /* //remove the border on the thing 
  border: 1px solid #2a2a2d;
  padding: 14px 16px 12px;
  */
  display: flex;
  flex-direction: column;
  gap: 0px;
  color: #d7d7db;
}

.daily-page-header__meta-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.daily-page-header__date {
  margin: 0;
  font-size: clamp(1.3rem, 4.5vw, 1.6rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e5e5e9;
}

.daily-page-header__difficulty {
  margin: 0;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666666;
  position: relative;
  top:-4px;
}

.daily-page-header__rule-icons {
  display: inline-flex;
  align-items: center;
  gap: 10;
  position: relative;
  top: -2px;
  left: -0.1em;
  vertical-align: middle;
}

.daily-page-header__rule-icons:empty {
  display: none;
}

.daily-page-header__rule-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1em;
  color: inherit;
  transform: scale(2);    /* make it look bigger without reflow */
  flex-shrink: 0;
}

.daily-page-header__rule-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.daily-page-header__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  background: none;
  color: inherit;
  appearance: none;
  cursor: default;
}

.daily-page-header__status--unsolved {
  background: #3c1418;
  border-color: #5c1d22;
  color: #f4b6bd;
}

.daily-page-header__status--solved {
  background: #123b28;
  border-color: #1e5d3c;
  color: #91f0bd;
  cursor: pointer;
}

.daily-page-header__status:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.daily-page-header__status[disabled] {
  opacity: 1;
  cursor: default;
}

.daily-page-header__status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 17px;
}

.daily-page-header__status-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.daily-page-header__button {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #161616;
  border: none;
  padding: 12px 10px 10px 10px;
  /*
  background: #1b1b1d;
  border: 1px solid #2a2a2d;
  padding: 14px 10px;
  */
  color: #999999;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 300;
  font-size: 1.0rem;
  letter-spacing: 0.1em;
}

.daily-page-header__nav-buttons {
  flex: 1 1 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.daily-page-header__nav-button {
  justify-content: center;
  gap: 0;
  color: #adadad;
  border: none;
  box-shadow: none;
}

.daily-page-header__nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.daily-page-header__nav-button .puzzle-nav-icon {
  width: 10px;
  height: auto;
}

.daily-page-header__nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  color: #6e6e72;
}

.daily-page-header__nav-button:disabled .puzzle-nav-icon path {
  fill: currentColor;
}

.daily-page-header__button--dojo
{
  text-align:left;
}

.daily-page-header__button:focus-visible {
  outline: 2px solid #b7b7bd;
  outline-offset: 2px;
}

.daily-page-header__button:hover,
.daily-page-header__button:focus-visible {
  background: #242427;
  color: #f3f3f5;
}

.daily-page-header__nav-button:hover,
.daily-page-header__nav-button:focus-visible,
.daily-page-header__nav-button:active {
  color: #adadad;
}

.daily-page-header__button:active {
  background: #2c2c30;
}

@media (min-width: 769px) {
  .daily-page-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    max-width: min(100%, var(--layout-max-width));
    margin: 0 calc(-1 * var(--page-side-padding)) 0 0;
    padding-right: var(--page-side-padding);
  }

  .daily-page-header__meta,
  .daily-page-header__cta {
    width: auto;
    max-width: 420px;
    flex: 0 1 420px;
  }

  .daily-page-header__meta {
    order: 0;
  }

  .daily-page-header__cta {
    order: 1;
    margin-left: auto;
    align-self: flex-start;
    gap: 12px;
  }
}

@media (min-width: 961px) {
  :root {
    --page-side-padding: 10px;
  }

  .page {
    max-width: var(--layout-max-width);
  }
}

.puzzle-selector {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #111113;
  border: 1px solid #2a2a2d;
  width: 100%;
  color: #f3f3f5;
}

.puzzle-selector--daily {
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
}

.puzzle-selector--dojo-hidden {
  display: none;
}

.daily-puzzle-banner {
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.06em;
  line-height: 1.25;
}

.puzzle-selector--daily .daily-puzzle-banner {
  min-width: 0;
}

.puzzle-message {
  padding: 32px 20px;
  text-align: center;
  font-size: 1.05rem;
  color: #f3f3f5;
  background: #111113;
  border: 1px solid #2a2a2d;
  border-radius: 12px;
  max-width: min(520px, 90%);
  margin: 0 auto;
}

.puzzle-set-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.puzzle-set-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #a7a7ab;
}

.puzzle-set-select {
  padding: 10px 14px;
  border-radius: 0;
  border: 1px solid #333333;
  background: #151517;
  font-size: 0.95rem;
  color: #f3f3f5;
  min-width: 180px;
}

.puzzle-set-select:focus-visible {
  outline: 2px solid #b7b7bd;
  outline-offset: 2px;
}

.puzzle-nav-button {
  padding: 10px 18px;
  border-radius: 0;
  border: 1px solid #333333;
  background: #151517;
  color: #f3f3f5;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.puzzle-nav-button--next,
.puzzle-nav-button--previous {
  font-size: 0;
  line-height: 0;
  padding: clamp(8px, 1.5vw, 12px);
}

.puzzle-nav-icon {
  width: clamp(18px, 2.8vw, 28px);
  height: auto;
}

.puzzle-nav-icon--previous {
  transform: none;
}

.puzzle-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  color: #a7a7ab;
  border-color: #2a2a2d;
}

.puzzle-nav-button:focus-visible {
  outline: 2px solid #b7b7bd;
  outline-offset: 2px;
}

.puzzle-nav-button:not(:disabled):hover {
  background: #111113;
  border-color: #2a2a2d;
}

.puzzle-title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 140px;
  text-align: center;
  color: #a7a7ab;
}

.puzzle-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.how-to-play {
  width: 100%;
  background: #111113;

  padding: clamp(28px, 6vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3vw, 18px);
  color: #f3f3f5;
  margin-top:10px;
}

.how-to-play__intro {
  display: grid;
  gap: 12px;
  text-align: center;
}

.how-to-play__title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f5f5f7;
}

.how-to-play__intro a {
  text-transform: uppercase;
  color: #6699CC;
}

.how-to-play__intro p {
  margin: 0;
  color: #a7a7ab;
  line-height: 1.6;
}

.how-to-play__basics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(18px, 4vw, 28px);
}

.how-to-play__card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  border: 1px solid #2a2a2d;
  padding: 22px;
  display: grid;
  gap: clamp(12px, 2.6vw, 18px);
}

.how-to-play__card-body {
  display: grid;
  gap: clamp(12px, 2.6vw, 18px);
}

.how-to-play__card-body--objective {
  gap: 0;
}

.how-to-play__card-title {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ededf1;
}

.how-to-play__card p {
  margin: 0;
  color: #a7a7ab;
  line-height: 1.6;
}

.how-to-play__rules {
  display: grid;
  gap: clamp(24px, 5vw, 36px);
}

.how-to-play__divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  border: none;
  margin-top:10px;
}

.rule-group {
  display: grid;
  gap: 16px;
}

.rule-group--hidden {
  display: none;
}

.how-to-play__section-title {
  margin: 0;
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ededf1;
  text-align: center;
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  /*grid-template-columns: repeat(2, minmax(260px, 1fr)); /* do this for max 2 columns! */
  gap: clamp(18px, 4vw, 28px);
}

.rule-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  border: 1px solid #2a2a2d;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.6vw, 18px);
  padding: 22px;
}

.rule-card__header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.rule-card__symbol {
  color: #b7b7bd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  width: 64px;
  height: 64px;
}

.rule-card__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
}

.rule-card__content {
  display: grid;
  gap: 8px;
}

.rule-card__demo-cta {
  appearance: none;
  border: 0;
  width: calc(100% + 44px);
  margin: auto -22px -22px;
  padding: 0 clamp(22px, 4.5vw, 28px);
  height: clamp(52px, 11vw, 62px);
  background-color: #384a5d;
  color: #f1f5ff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.rule-card__demo-cta:hover {
  background-color: #2f4e8f;
  box-shadow: inset 0 0 0 5px #2d5ba4;
}

.rule-card__demo-cta:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.rule-card__demo-cta:active {
  background-color: #2f4e8f;
  box-shadow: inset 0 0 0 5px #3161ae;
}

.rule-card__demo-cta:disabled,
.rule-card__demo-cta[aria-disabled='true'] {
  cursor: not-allowed;
  background-color: #94a3b8;
  color: #e2e8f0;
  box-shadow: none;
}

.rule-card__demo-cta:disabled:hover,
.rule-card__demo-cta[aria-disabled='true']:hover {
  box-shadow: none;
}

.rule-card__demo-cta:disabled:focus-visible,
.rule-card__demo-cta[aria-disabled='true']:focus-visible {
  outline: none;
}

.rule-card__description {
  margin: 0;
  color: #a7a7ab;
  line-height: 1.6;
}

.rule-card__example {
  display: grid;
  gap: 12px;
}

.example-grid {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  align-items: center;
  justify-content: start;
  font-size: 1.425rem;
}

.example-grid--notes {
  grid-template-columns: repeat(3, minmax(60px, 1fr));
  justify-items: center;
}

.example-grid--inline {
  grid-auto-columns: minmax(40px, auto);
}

.example-grid--objective {
  grid-template-columns: repeat(5, auto);
  grid-auto-flow: row;
  justify-content: center;
  justify-items: center;
  gap: 0;
  margin-top: 10px;
}

.example-grid--objective .example-cell {
  font-size: 1.2rem;
  line-height: 1;
  padding: 1px;
  min-width:22px;
  min-height:22px;
}

.example-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  background: #151517;
  border: 1px solid #333333;
  color: #f6f6f8;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.example-cell--candidates {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  min-width: 60px;
  min-height: 60px;
  font-size: 0.75rem;
}

.example-cell--single-answer {
  min-width: 60px;
  min-height: 60px;
  font-size: 1.6rem;
  line-height: 1;
}

.example-cell--candidates span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  padding: 2px 4px;
}

.example-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #b7b7bd;
}

.example-symbol__svg {
  width: 100%;
  height: auto;
  display: block;
}

.example-cell[data-digit="1"],
.example-cell--candidates span[data-digit="1"] {
  color: #f1c43f;
}

.example-cell[data-digit="2"],
.example-cell--candidates span[data-digit="2"] {
  color: #37ae60;
}

.example-cell[data-digit="3"],
.example-cell--candidates span[data-digit="3"] {
  color: #4498db;
}

.example-cell[data-digit="4"],
.example-cell--candidates span[data-digit="4"] {
  color: #9b69b6;
}

.example-cell[data-digit="5"],
.example-cell--candidates span[data-digit="5"] {
  color: #e74c5c;
}

.example-cell[data-digit="6"],
.example-cell--candidates span[data-digit="6"] {
  color: #f39c12;
}

.example-cell[data-digit="7"],
.example-cell--candidates span[data-digit="7"] {
  color: #1abc9c;
}

.example-cell[data-digit="8"],
.example-cell--candidates span[data-digit="8"] {
  color: #ff7aa2;
}

.example-cell[data-digit="9"],
.example-cell--candidates span[data-digit="9"] {
  color: #5f66ff;
}

@media (max-width: 640px) {
  .example-grid {
    justify-content: center;
  }
}

.puzzle-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  gap:0px;
}

.puzzle-layout > * {
  flex-shrink: 0;
}

.grid-wrapper {
  --grid-available-width: min(
    var(--grid-max-width),
    calc(100vw - 2 * var(--page-side-padding))
  );
  --cell-size: clamp(
    var(--cell-min-size),
    calc(
      (
          var(--grid-available-width) -
          (var(--grid-size) - 1) * var(--arrow-size)
        ) / var(--grid-size)
    ),
    var(--cell-max-size)
  );
  box-sizing: border-box;
  display: grid;
  position: relative;

  overflow: hidden;
  background: #151517;
  padding: 0px;
  justify-content: center;
  align-content: center;
  width: min(
    100%,
    calc(
      var(--grid-size) * var(--cell-size) +
      (var(--grid-size) - 1) * var(--arrow-size) 
    )
  );
  max-width: var(--grid-max-width);
}



.hint-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 40;
}

.hint-overlay--visible {
  display: flex;
}

.hint-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 16, 0.78);
}

.hint-overlay__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 90vw);
  max-height: min(90vh, 720px);
  background: #111113;
  border: 1px solid #2a2a2d;
  border-radius: 0;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hint-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px 8px;
}

.hint-overlay__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f3f3f5;
}

.hint-overlay__close {
  border: none;
  background: none;
  color: #9a9aa1;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.hint-overlay__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.hint-overlay__body {
  padding: 12px 26px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #d6d6dd;
  overflow-y: auto;
}

.hint-overlay__message {
  font-size: 0.95rem;
  color: #9a9aa1;
  display: none;
}

.hint-overlay__message.visible {
  display: block;
}

.hint-overlay__grid-wrapper {
  background: #151517;
  padding: 14px;
  display: flex;
  justify-content: center;
  border-radius: 0;
}

.hint-overlay__grid-wrapper--hidden {
  display: none;
}

.hint-overlay__step-indicator {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f3f3f5;
}

.hint-overlay__description {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #c1c1cb;
  min-height: calc(1.5em * 3);
}

.rule-demo-overlay .hint-overlay__dialog {
  max-width: min(720px, 92vw);
}


.rule-demo-overlay .hint-grid {
  --hint-cell-size-base: clamp(58px, calc(420px / var(--grid-size)), 96px);
  --hint-divider-thickness: 1px;
  --hint-arrow-size: var(--hint-divider-thickness);
}

.rule-demo-overlay .hint-grid__arrow {
  overflow: visible;
}

.rule-demo-overlay .hint-grid__connector {
  background: #151517;
}

.rule-demo-overlay .hint-grid__connector::before,
.rule-demo-overlay .hint-grid__connector::after {
  content: none;
}

.rule-demo-overlay .hint-grid .arrow-symbol {
  font-size: clamp(18px, calc(var(--hint-cell-size) * 0.52), 44px);
  width: clamp(32px, calc(var(--hint-cell-size) * 0.68), 72px);
  height: clamp(32px, calc(var(--hint-cell-size) * 0.68), 72px);
}

.rule-demo-overlay .hint-overlay__description {
  display: block;
}

.rule-demo-overlay .hint-overlay__description p {
  margin: 0;
}

.hint-overlay__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px 24px;
  border-top: 1px solid #1f1f23;
  background: rgba(17, 17, 19, 0.95);
}

.hint-overlay__nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.hint-overlay__nav {
  border: none;
  border-radius: 0;
  background: #2f2f37;
  color: #f3f3f5;
  padding: 8px 18px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.hint-overlay__nav:disabled {
  opacity: 0.45;
  cursor: default;
}

.hint-overlay__nav:not(:disabled):hover {
  background: #3d3d46;
}

.hint-overlay__slider {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: #3498db;
  height: 4px;
}

.hint-grid {
  --hint-cell-size-base: clamp(36px, calc(260px / var(--grid-size)), 56px);
  --hint-cell-size: var(--hint-cell-size-base);
  --hint-gap-size: clamp(2px, calc(var(--hint-cell-size) * 0.08), 6px);
  --hint-arrow-size: var(--hint-gap-size);
  --hint-divider-thickness: clamp(1.5px, calc(var(--hint-cell-size) * 0.05), 3px);
  display: grid;
  gap: 0;
}

@media (min-width: 769px) {
  .hint-grid {
    --hint-cell-size-base: clamp(45px, calc(325px / var(--grid-size)), 70px);
  }

  .grid-wrapper {
    left: -12px;
  }

  
}

.hint-grid__connector {
  position: relative;
  background: transparent;
  pointer-events: none;
  --divider-thickness: var(--hint-divider-thickness);
}

.hint-grid__connector::before,
.hint-grid__connector::after {
  content: '';
  position: absolute;
  background: #151517;
}

.hint-grid__connector::before {
  width: var(--hint-divider-thickness);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.hint-grid__connector::after {
  height: var(--hint-divider-thickness);
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.hint-grid__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  --divider-thickness: var(--hint-divider-thickness);
}

.hint-grid .arrow-symbol {
  font-size: clamp(16px, calc(var(--hint-cell-size) * 0.45), 42px);
  width: clamp(24px, calc(var(--hint-cell-size) * 0.7), 60px);
  height: clamp(24px, calc(var(--hint-cell-size) * 0.7), 60px);
  color: #a6a6b2;
}

.hint-cell {
  position: relative;
  min-width: var(--hint-cell-size);
  min-height: var(--hint-cell-size);
  background: #202028;
  border-radius: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hint-cell--given {
  background: #19191f;
}

.hint-cell--filled {
  background: #26262f;
}

.hint-cell--target {
  box-shadow: inset 0 0 0 3px rgba(52, 152, 219, 0.8);
}

.hint-cell--reference {
  box-shadow: inset 0 0 0 3px rgba(241, 196, 15, 0.75);
}

.hint-cell--solved {
  box-shadow: inset 0 0 0 3px rgba(55, 174, 96, 0.85);
}

.hint-cell__value {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.6rem, calc(var(--hint-cell-size) * 0.7), 2.4rem);
  font-weight: 600;
  color: #f4f4f7;
  width: 100%;
  height: 100%;
  place-self: center;
}

.hint-cell__value.visible {
  display: flex;
}

.hint-cell__candidates {
  display: grid;
  grid-template-columns: repeat(var(--grid-size), 1fr);
  grid-template-rows: repeat(var(--grid-size), 1fr);
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 6px;
  box-sizing: border-box;
  align-self: stretch;
  justify-self: stretch;
}

.hint-cell__candidate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: clamp(0.7rem, calc(var(--hint-cell-size) * 0.28), 1rem);
  color: #5f616b;
  border-radius: 0;
  transition: color 0.15s ease;
  opacity: 1;
}

.hint-cell__candidate.active {
  color: #f5f5f8;
  font-weight: 600;
}

.hint-cell__candidate.removed {
  color: #ff9aa2;
  background: rgba(231, 76, 60, 0.28);
}

.hint-cell--inactive .hint-cell__candidate {
  opacity: 0.45;
}

@media (max-width: 720px) {
  .hint-overlay {
    padding: 12px;
  }

  .hint-overlay__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .hint-overlay__nav-group {
    margin-left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .hint-overlay__nav {
    width: 100%;
    text-align: center;
  }

  .hint-overlay__slider {
    width: 100%;
  }
}

.grid-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 0 solid #151517;
  pointer-events: none;
}

.grid-wrapper.puzzle-solved {
  border-color: #37ae60;
  box-shadow: 0 0 0 5px rgb(38, 90, 56);
}

.grid-wrapper.puzzle-invalid {
  border-color: #e74c5c;
  box-shadow: 0 0 0 5px rgb(115, 36, 44);
}

.puzzle-status-message {
  position: absolute;
  top: 11px;
  left: 0px;
  right: auto;
  transform: none;
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  pointer-events: auto;
  white-space: nowrap;
  text-align: left;
  flex-wrap: nowrap;
  max-width: calc(100%);
  z-index: 5;
  padding: 0px 0px 20px 10px;
}

.puzzle-status-message.visible {
  display: flex;
}

.puzzle-status-message__label {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #37ae60;
}

.puzzle-status-message--error .puzzle-status-message__label {
  color: #e74c5c;
}

.puzzle-status-action {
  border: 1px solid #333333;
  background: #111113;
  color: #f3f3f5;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.puzzle-status-action:hover,
.puzzle-status-action:focus-visible {
  background: #1f1f22;
  border-color: #2a2a2d;
  outline: none;
}

.puzzle-status-action:focus-visible {
  outline: 2px solid #b7b7bd;
  outline-offset: 2px;
}

.grid-wrapper > * {
  position: relative;
}

.cell {
  background: #222222;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  border-radius: 0;
}

.cell.cell--incorrect {
  background: #5b1616;
}

.cell:focus {
  outline: none;
}

.cell.selected {
  box-shadow: inset 0 0 0 8px #3A3A3A;
}

.cell.given {
  background: #1b1b1b;
}

.candidate-grid {
  position: absolute;
  inset: clamp(6px, 1.4vw, 12px);
  display: grid;
  grid-template-columns: repeat(var(--grid-size), 1fr);
  grid-template-rows: repeat(var(--grid-size), 1fr);
  gap: clamp(2px, 0.6vw, 6px);
  align-items: stretch;
  justify-items: stretch;
}

.candidate-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  color: #60636b; /*#60636b*/
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.candidate-slot.active {
  background: #1A1A1A;
  color: #e8e8ea;
  font-weight: 600;
}

.cell-value {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  color: #E74C3C;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.cell-value.visible {
  display: flex;
}

.cell.given .cell-value {
  display: flex;
  color: #E74C3C;
  /*-webkit-text-stroke: 2px black;*/
}

.arrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: visible;
  z-index: 2;
}

.arrow.hidden {
  color: transparent;
}

.arrow-symbol {
  --arrow-symbol-rotation: 0deg;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(21px, calc(var(--cell-size) * 0.525), 60px);
  font-weight: 400;
  line-height: 1;
  color: #999999;
  pointer-events: none;
  white-space: nowrap;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: clamp(36px, calc(var(--cell-size) * 0.675), 108px);
  height: clamp(36px, calc(var(--cell-size) * 0.675), 108px);
  transform: rotate(var(--arrow-symbol-rotation));
}

.arrow-symbol svg {
  width: 100%;
  height: 100%;
}

.arrow.horizontal::before,
.arrow.vertical::before {
  content: '';
  position: absolute;
  background: #151517;
}

.arrow.horizontal::before {
  height: var(--divider-thickness);
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.arrow.vertical::before {
  width: var(--divider-thickness);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.arrow.horizontal .arrow-symbol,
.arrow.vertical .arrow-symbol {
  z-index: 1;
}

.connector {
  position: relative;
  background: transparent;
  z-index: 1;
}

.connector::before,
.connector::after {
  content: '';
  position: absolute;
  background: #151517;
}

.connector::before {
  width: var(--divider-thickness);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.connector::after {
  height: var(--divider-thickness);
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.control-panel-stack {
  width: min(100%, clamp(220px, 32vw, 380px));
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  left: 12px;
}

.control-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  background: #161618;
  box-shadow: none;
  max-width: 100%;
  color: #f3f3f5;
}

.mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #111113;
  border-radius: 0;
  border: 1px solid #333333;
}

.mode-button {
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 0.95rem;
  cursor: pointer;
  color: #a7a7ab;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.mode-button:hover {
  background: #181818;
}

.mode-button.active {
  background: #333333;
  color: #f3f3f5;
  box-shadow: none;
}

.mode-button:focus-visible {
  outline: 2px solid #b7b7bd;
  outline-offset: 2px;
}


.number-input-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;

  /*border: 1px solid #333333;*/
  /*padding: 0px; //making it not a thing at all */
  --number-button-font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  --number-button-padding-block: 14px;
  --number-button-min-height: 48px;
}

.number-input-container.mode-normal {
  --number-button-font-size: clamp(1.9rem, 6vw, 2.7rem);
  --number-button-padding-block: max(
    0px,
    calc((var(--number-button-min-height) - 1em) / 2)
  );
}

.number-input-container.mode-normal .number-button {
  font-weight: 100;
  border-color:#333333;
}

.number-input-container.mode-candidate {
  --number-button-font-size: clamp(0.95rem, 2.2vw, 1.1rem);
}

.number-input-container .number-pad {
  width: 100%;
}

.number-pad {
  display: grid;
  /*grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));*/
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.number-button {
  border: 1px solid #333333;
  border-radius: 0;
  background: #111113;
  padding: var(--number-button-padding-block) 0;
  font-size: var(--number-button-font-size);
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  color: #f3f3f5;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  min-height: var(--number-button-min-height);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.number-button.used {
  background: #1c1c1f;
  color: #55555a;
  border-color: #1c1c1f;
}

.number-button:hover:not(:disabled) {
  background: #1f1f22;
  border-color: #2a2a2d;
}

.number-button:focus-visible {
  outline: 2px solid #b7b7bd;
  outline-offset: 2px;
}

.number-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.clear-all-button {
  width: 100%;
  text-align: center;
  align-self: stretch;
}

.control-panel-footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.control-panel-footer .control-button {
  width: 100%;
}

.control-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.control-button {
  border: 1px solid #333333;
  border-radius: 0;
  padding: 12px;
  background: #111113;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f3f3f5;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.control-button:hover:not(:disabled) {
  background: #1f1f22;
  border-color: #2a2a2d;
}

.control-button:focus-visible {
  outline: 2px solid #b7b7bd;
  outline-offset: 2px;
}

.control-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.control-button.danger {
  color: #ff8080;
  background: #1e1a1a;
  border-color: #4a2d2d;
}

.control-button.danger:hover:not(:disabled) {
  background: #2a1f1f;
  border-color: #5c3939;
}

.instructions {
  max-width: 560px;
  text-align: center;
  color: #a7a7ab;
  line-height: 1.6;
}

@media (max-width: 768px) {
  :root {
    --grid-max-width: min(100vw - 24px, 640px);
    --cell-min-size: 36px;
    --cell-max-size: 160px;
    --page-side-padding: 12px;
  }

  .page {
    padding: 0 var(--page-side-padding) 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --grid-max-width: min(100vw - 24px, 520px);
    --cell-min-size: 24px;
    --cell-max-size: 140px;
  }

  .puzzle-layout {
    flex-direction: column;
    align-items: center;
    width: min(100%, var(--grid-max-width));
    margin: 0 auto;
    gap: 14px;
  }

  .grid-wrapper {
    width: 100%;
  }

  .control-panel-stack {
    width: 100%;
    position:relative;
    left:0px;
  }

  .control-panel {
    padding: 16px;
  }

  .mode-toggle {
    max-width: 420px;
    margin: 0 auto;
  }

  .number-pad {
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    gap: 8px;
  }

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

  .cell-value {
    font-size: clamp(2rem, 8vw, 3.2rem);
  }

  .candidate-grid {
    inset: clamp(6px, 2.8vw, 10px);
  }

  .arrow-symbol {
    font-size: clamp(1.4rem, 5.2vw, 2.4rem);
  }
}

.solve-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  width: 100vw;
  height: 100vh;
}

.solve-popup--visible {
  opacity: 1;
  pointer-events: auto;
}

.solve-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.solve-popup--visible .solve-popup__backdrop {
  opacity: 1;
}

.solve-popup__dialog {
  position: relative;
  background: #111113;
  border: 1px solid #333333;
  border-radius: 0;
  padding: 28px clamp(24px, 5vw, 36px);
  width: min(90%, 420px);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: auto;
}

.solve-popup--visible .solve-popup__dialog {
  transform: translateY(0);
  opacity: 1;
}

.solve-popup__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  color: #f3f3f5;
}

.solve-popup__details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  color: #c7c7cd;
}

.solve-popup__puzzle {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.solve-popup__puzzle-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8f8f95;
}

.solve-popup__puzzle-date {
  font-size: 0.95rem;
  font-weight: 500;
  color: #c7c7cd;
}

.solve-popup__stat {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.solve-popup__stat--countdown {
  font-size: 0.95rem;
  color: #a0a0a8;
  margin-top: 6px;
}

.solve-popup__actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: center;
}

.solve-popup__action-button {
  flex: 1 1 0;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  border: 1px solid #333333;
  background: #111113;
  color: #f3f3f5;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.solve-popup__action-button:hover:not(:disabled) {
  background: #1f1f22;
  border-color: #2a2a2d;
}

.solve-popup__share-button,
.solve-popup__copy-button {
  border-color: #3d6bff;
  color: #e0e5ff;
  background: #1b2542;
}

.solve-popup__share-button:hover:not(:disabled),
.solve-popup__copy-button:hover:not(:disabled) {
  background: #223059;
  border-color: #5f7bff;
}

.solve-popup__close-button {
  color: #c7c7cd;
}

.solve-popup__action-button:focus-visible {
  outline: 2px solid #b7b7bd;
  outline-offset: 2px;
}

.hint-popup .solve-popup__dialog {
  width: min(90%, 360px);
  gap: 12px;
  text-align: center;
}

.hint-popup__title {
  font-size: 1.4rem;
}

.hint-popup__message {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #c7c7cd;
}

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

.hint-popup__close-button {
  flex: 0 0 auto;
  min-width: 120px;
}

.welcome-popup__dialog {
  width: min(92%, 480px);
  padding: clamp(32px, 7vw, 44px) clamp(28px, 7vw, 48px);
  gap: clamp(22px, 5vw, 30px);
  align-items: center;
  text-align: center;
}

.welcome-popup__title {
  margin: 0;
}

.welcome-popup__logo {
  display: flex;
  justify-content: center;
  width: 100%;
}

.welcome-popup__logo-image {
  width: min(260px, 70%);
  height: auto;
}

.welcome-popup__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.welcome-popup__info-line {
  margin: 0;
  font-size: clamp(0.85rem, 2.6vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b5b5bd;
  line-height: 1.05;
}

.welcome-popup__info-line--puzzle {
  font-size: clamp(1.05rem, 3.2vw, 1.4rem);
  font-weight: 700;
}

.welcome-popup__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.welcome-popup__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 22px;
  border: 1px solid #3a3a3f;
  background: #19191c;
  color: #f3f3f5;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.welcome-popup__button--secondary {
  background: #18181b;
  border-color: #34343a;
  color: #f3f3f5;
}

.welcome-popup__button--secondary:hover {
  background: #1f1f23;
  border-color: #46464c;
}

.welcome-popup__button--primary {
  background: linear-gradient(135deg, #1d1d22, #28282f);
  border-color: #4f4f58;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 40px rgba(0, 0, 0, 0.55);
  padding: 18px 24px;
  font-size: 1.05rem;
  font-weight: 700;
}

.welcome-popup__button--primary:hover {
  background: linear-gradient(135deg, #24242a, #313139);
  border-color: #5f5f69;
  transform: translateY(-1px);
}

.welcome-popup__button:focus-visible {
  outline: 2px solid #b7b7bd;
  outline-offset: 2px;
}

.welcome-popup__start-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.08em;
  letter-spacing: 0.08em;
  font-size: 1.5em;
  color: #ffffff;
}

.welcome-popup__start-letter {
  display: inline-block;
  font-weight: 700;
  line-height: 1;
  color: inherit;
  text-shadow: none;
}

.welcome-popup__start-letter:nth-child(1) {
  color: #e74c5c;
}

.welcome-popup__start-letter:nth-child(2) {
  color: #9b69b6;
}

.welcome-popup__start-letter:nth-child(3) {
  color: #4498db;
}

.welcome-popup__start-letter:nth-child(4) {
  color: #37ae60;
}

.welcome-popup__start-letter:nth-child(5) {
  color: #f1c43f;
}
.radial-menu {
  position: fixed;
  width: 140px;
  height: 140px;
  display: none;
  z-index: 2000;
  pointer-events: none;
}

.radial-menu.visible {
  display: block;
}

.radial-menu-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.radial-menu-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(24, 24, 28, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.05);
}

.radial-menu-option {
  position: absolute;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-weight: 600;
  font-size: 1.4rem;
  color: #f3f3f5;
  border-radius: 50%;
  background: rgba(32, 32, 36, 0.95);
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

.radial-menu-option.active {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(52, 52, 58, 1);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18), 0 10px 20px rgba(0, 0, 0, 0.45);
}

.site-footer {
  margin: 56px auto 40px;
  padding: 0 var(--page-side-padding);
  max-width: 960px;
  text-align: center;
  color: #d6d6f0;
}

.site-footer__divider {
  width: 100%;
  height: 1px;
  margin: 0 auto 20px;
  background: linear-gradient(90deg, rgba(72, 129, 255, 0), rgba(72, 129, 255, 0.5), rgba(72, 129, 255, 0));
  box-shadow: 0 0 18px rgba(72, 129, 255, 0.35);
}

.site-footer__copy {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: inherit;
}

.site-footer__link {
  color: #8fb1ff;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}



@media (max-width: 600px) {
  .page {
    margin: 14px auto 32px;
    padding: 0 var(--page-side-padding) 32px;
    gap: 6px;
  }

  .puzzle-area {
    gap: 16px;
  }

  .puzzle-selector {
    gap: 10px;
  }

  .puzzle-selector:not(.puzzle-selector--daily) {
    padding: 12px 16px;
  }

  .puzzle-selector--daily {
    gap: 4px;
  }

  .daily-puzzle-banner {
    font-size: 0.95rem;
  }

  .site-footer {
    margin: 40px auto 32px;
  }
}
