.ana-page {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #2f0d5b 0%, #4f1d7f 38%, #5b2d84 100%);
  font-family: var(--font-family);
  color: #fff;
  overflow-x: hidden;
}

.ana-page .toast-container {
  bottom: 5.5rem;
}

.ana-page::before,
.ana-page::after {
  content: "";
  position: fixed;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 0;
}

.ana-page::before {
  top: 120px;
  right: -100px;
}

.ana-page::after {
  top: 520px;
  right: -160px;
  width: 500px;
  height: 500px;
}

.ana-shell {
  position: relative;
  z-index: 1;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 12px 20px 30px;
}

.ana-top-info {
  position: relative;
  top: 0;
  left: auto;
  transform: none;
  width: min(1080px, 92vw);
  border-radius: 34px;
  border: 10px solid #ffffff;
  background: #ffffff;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.25);
  padding: 10px 18px;
  margin-bottom: 18px;
  text-align: left;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ana-top-info.is-hidden {
  display: none;
}

.ana-top-info-title {
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}

.ana-top-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-left: auto;
}

.ana-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  line-height: 1;
  white-space: nowrap;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  border: none;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--text-inverse);
  box-shadow: var(--shadow-orange);
  cursor: pointer;
}

.ana-share-btn:hover {
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245,130,32,0.5);
}

.ana-top-action {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  cursor: pointer;
  color: #374151;
  font-size: var(--font-size-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.ana-top-action:hover {
  background: rgba(109, 40, 217, 0.08);
  color: #4c1d95;
}

.ana-top-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #475569;
  line-height: 1;
}

.ana-top-action__icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.ana-stage {
  width: min(1080px, 92vw);
  min-height: clamp(500px, 70vh, 700px);
  border-radius: 38px;
  border: 12px solid #ffffff;
  background: radial-gradient(circle at 80% 12%, rgba(255,255,255,0.16) 0 1px, transparent 1px 6px),
              linear-gradient(135deg, #13377c 0%, #0f3479 55%, #102f69 100%);
  background-size: 8px 8px, auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(0,0,0,0.35);
}

.ana-stage[data-current-view='setup'] {
  background: radial-gradient(circle at 80% 12%, rgba(255,255,255,0.16) 0 1px, transparent 1px 6px),
              linear-gradient(180deg, #7b1cd4 0%, #580a98 55%, #4d087f 100%);
  background-size: 8px 8px, auto;
}

.ana-stage[data-current-view='menu'],
.ana-stage[data-current-view='game'] {
  background:
    radial-gradient(circle at 80% 12%, rgba(255,255,255,0.16) 0 1px, transparent 1px 6px),
    linear-gradient(135deg, rgba(88, 31, 134, 0.88) 0%, rgba(92, 45, 153, 0.82) 38%, rgba(91, 45, 132, 0.8) 100%);
  background-size: 8px 8px, auto;
}

.ana-stage:fullscreen,
.ana-stage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.ana-stage:fullscreen .ana-view,
.ana-stage:-webkit-full-screen .ana-view {
  padding-top: 92px;
}

.ana-top-controls {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 24;
  pointer-events: none;
}

.ana-top-left,
.ana-top-right {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.ana-top-left,
.ana-top-right {
  flex-direction: column;
}

.ana-icon-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 3px solid rgba(104, 208, 255, 0.6);
  background: rgba(16, 49, 118, 0.72);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.ana-stage[data-current-view='menu'] #btnOpenSettings,
.ana-stage[data-current-view='game'] #btnOpenSettings {
  display: none !important;
}

.ana-icon-btn:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.12);
}

.ana-icon-btn--utility {
  border-color: rgba(255, 182, 84, 0.95);
  background: radial-gradient(circle at 30% 30%, #ffb74d, #e56f0f);
  color: rgba(255,255,255,0.95);
}

#btnFullscreen {
  border-color: rgba(255, 224, 112, 0.98);
  background: radial-gradient(circle at 30% 30%, #ffd54f, #d99a00);
}

#btnRestartTop {
  border-color: rgba(255, 198, 112, 0.98);
  background: radial-gradient(circle at 30% 30%, #ff9f1c, #c94f00);
}

#btnOpenSettings {
  border-color: rgba(160, 100, 220, 0.9);
  background: radial-gradient(circle at 30% 30%, #7b2abf, #4a0e8f);
  color: #ffffff;
}

.ana-icon-btn--danger {
  border-color: rgba(255, 150, 150, 0.98);
  background: radial-gradient(circle at 30% 30%, #ff6d6d, #d62828);
  color: rgba(255,255,255,0.98);
}

.ana-icon-btn--sound {
  position: relative;
  border-color: rgba(126, 216, 255, 0.9);
  background: radial-gradient(circle at 28% 26%, #31b7f0, #1f65b8);
  color: #ffffff;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18), 0 4px 10px rgba(9, 44, 95, 0.45);
}

.ana-icon-btn--sound.is-muted {
  border-color: rgba(170, 198, 236, 0.8);
  background: radial-gradient(circle at 28% 26%, #6c85b6, #3a4f7d);
  color: rgba(255, 255, 255, 0.95);
}

.ana-icon-btn--sound.is-muted::after {
  content: '';
  position: absolute;
  width: 34px;
  height: 3px;
  background: #ff7b7b;
  border-radius: 999px;
  transform: rotate(-38deg);
}

.ana-restart-icon {
  display: none;
  font-size: 1.8rem;
}

.ana-stage[data-current-view='game'] .ana-restart-icon,
#anaStage[data-current-view='game'] .ana-restart-icon {
  display: inline-flex;
}

.ana-view {
  display: none;
  width: 100%;
  height: 100%;
  padding: 96px 56px 40px;
}

.ana-view.active {
  display: flex;
}

.ana-view--intro {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding-top: 110px;
  background: linear-gradient(180deg, #7b1cd4 0%, #580a98 55%, #4d087f 100%);
}

.ana-intro-title {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  font-weight: 900;
  color: #fff;
  text-align: center;
  text-shadow: 0 6px 0 rgba(0,0,0,0.24);
}

.ana-intro-card {
  width: min(1060px, 95%);
  background: rgba(43, 4, 79, 0.72);
  border-radius: 18px;
  padding: 24px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  margin-bottom: 18px;
}

.ana-intro-card p {
  margin: 0;
  color: rgba(255,255,255,0.92);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.5;
  max-width: 900px;
}

.ana-view--menu,
.ana-view--setup {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ana-view {
  width: 100%;
  min-height: 100%;
  padding: 94px 44px 30px;
}

.ana-view--menu {
  justify-content: flex-start;
  overflow-y: auto;
  padding-top: 48px;
}

.ana-view--setup {
  gap: 12px;
  padding-top: 20px;
}

.ana-title {
  margin: 40px 0 0;
  color: #ffbe2f;
  text-shadow: 0 6px 0 rgba(0,0,0,0.3);
  font-size: clamp(3.2rem, 8vw, 6rem);
  line-height: 1;
  font-weight: 900;
}

.ana-symbols {
  margin-top: 18px;
  color: #1cc8ff;
  text-shadow: 0 8px 0 rgba(0,0,0,0.28);
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: 0.95;
  letter-spacing: 0.07em;
  font-weight: 900;
}

.ana-subtitle {
  margin-top: 12px;
  margin-bottom: 0;
  color: rgba(232, 246, 255, 0.96);
  font-size: 1.15rem;
  font-weight: 600;
}

.ana-menu-card {
   margin-top: 110px;
   width: min(640px, 92vw);
  background: rgba(10, 39, 94, 0.45);
  border: 2px solid rgba(133, 212, 255, 0.45);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.ana-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ana-gear-btn {
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
}

.ana-settings-panel {
  border-radius: 14px;
  border: 2px solid rgba(151, 216, 255, 0.45);
  background: rgba(6, 30, 78, 0.72);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.ana-settings-panel.hidden {
  display: none;
}

/* Global settings overlay */
.ana-settings-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 16, 50, 0.72);
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 28px 28px;
  backdrop-filter: blur(2px);
}

.ana-settings-overlay.hidden {
  display: none;
}

.ana-settings-overlay__card {
  width: min(520px, 92%);
  max-height: calc(100% - 20px);
  overflow-y: auto;
  border-radius: 18px;
  border: 2px solid rgba(151, 216, 255, 0.45);
  background: rgba(6, 30, 78, 0.97);
  padding: 14px 16px 16px;
  display: grid;
  gap: 10px;
}

.ana-settings-overlay__card {
  margin-top: 18px;
}

.ana-settings-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.ana-settings-overlay__title {
  color: #dbefff;
  font-size: 1.05rem;
  font-weight: 700;
}

.ana-settings-overlay__close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,100,100,0.18);
  color: #ffaaaa;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ana-settings-overlay__close:hover {
  background: rgba(255,100,100,0.36);
  color: #ffffff;
}

.ana-settings-group {
  display: grid;
  gap: 6px;
  color: rgba(236, 248, 255, 0.95);
}

.ana-settings-title {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: rgba(188, 227, 255, 0.85);
  font-weight: 700;
}

/* Activity title displayed above the editor card */
.ana-activity-title {
  width: min(960px, 96%);
  margin: 16px auto 14px auto;
  padding: 0;
  background: transparent;
  color: #ffffff;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  line-height: 1;
  font-weight: 900;
  text-align: center;
  border: none;
  box-shadow: none;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 8px rgba(0,0,0,0.35);
}

.ana-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.ana-inline-fields {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ana-inline-fields input {
  width: 58px;
  border-radius: 8px;
  border: 2px solid rgba(157, 217, 255, 0.7);
  background: rgba(7, 27, 72, 0.85);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 8px;
  outline: none;
}

.ana-inline-fields input:focus {
  border-color: #8be0ff;
}

.ana-menu-continue {
  justify-self: center;
  padding: 11px 36px;
   margin-top: 90px;
  min-width: 260px;
  border-radius: 30px;
  border: 3px solid rgba(178, 255, 189, 0.95);
  color: #fff;
  background: linear-gradient(180deg, #2fca56 0%, #1f9f3e 100%);
  font-size: clamp(1.1rem, 1.8vw, 2rem);
  box-shadow: inset 0 -8px 0 rgba(0,0,0,0.18), 0 12px 24px rgba(14, 90, 35, 0.35);
}

.ana-btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.ana-primary-btn,
.ana-secondary-btn {
  border-radius: 30px;
  border: 3px solid rgba(157, 217, 255, 0.85);
  color: #fff;
  background: linear-gradient(180deg, #284ab8 0%, #1f3ca7 100%);
  font-weight: 800;
  font-size: clamp(1.1rem, 1.8vw, 2rem);
  padding: 14px 42px;
  cursor: pointer;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,0.18), 0 10px 20px rgba(0,0,0,0.22);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.ana-primary-btn:hover,
.ana-secondary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.ana-primary-btn.ana-menu-continue {
  background: linear-gradient(180deg, #2fca56 0%, #1f9f3e 100%);
  border-color: rgba(178, 255, 189, 0.95);
}

#btnPlayNow {
  display: block;
  margin: 40px auto 12px;
  align-self: center;
  padding: 18px 64px;
  font-size: clamp(1.5rem, 2.2vw, 2.5rem);
  border-color: rgba(178, 255, 189, 0.95);
  background: linear-gradient(180deg, #2fca56 0%, #1f9f3e 100%);
  box-shadow: inset 0 -8px 0 rgba(0,0,0,0.18), 0 12px 24px rgba(14, 90, 35, 0.35);
}

.ana-name-setup {
  width: min(620px, 92vw);
  background: rgba(10, 39, 94, 0.45);
  border: 2px solid rgba(133, 212, 255, 0.45);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.ana-name-field {
  color: #dbefff;
  font-weight: 700;
  font-size: 0.98rem;
}

.ana-name-input,
.ana-list-input {
  width: 100%;
  border-radius: 12px;
  border: 2px solid rgba(157, 217, 255, 0.9);
  background: rgba(7, 27, 72, 0.85);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 10px 12px;
  outline: none;
}

.ana-hints-toggle {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #eff8ff;
  font-weight: 600;
}

.ana-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.ana-radio input {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #31c8ff;
  background: #1a2f6f;
  box-shadow: 0 0 0 1px rgba(10, 27, 72, 0.65);
  display: inline-grid;
  place-content: center;
  margin: 0;
  cursor: pointer;
}

.ana-radio input::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9f3ff;
  transform: scale(0);
  transition: transform 120ms ease-in-out;
}

.ana-radio input:checked::before {
  transform: scale(1);
}

.ana-editor-head {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 36px minmax(220px, 1fr) minmax(0, 1fr) 90px;
  gap: 8px;
  align-items: center;
  color: #eef7ff;
  font-size: 0.92rem;
  font-weight: 700;
}

.ana-editor-head:not(.with-hints) {
  grid-template-columns: 36px minmax(220px, 1fr) 90px;
}

.ana-word-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ana-word-row {
  display: grid;
  grid-template-columns: 36px minmax(220px, 1fr) minmax(0, 1fr) 90px;
  gap: 8px;
  align-items: center;
}

.ana-word-row:not(.with-hints) {
  grid-template-columns: 36px minmax(220px, 1fr) 90px;
}

.ana-word-row__index {
  color: #d5ebff;
  font-weight: 700;
  text-align: right;
  padding-right: 4px;
}

.ana-word-input,
.ana-hint-input {
  width: 100%;
  border-radius: 10px;
  border: 2px solid rgba(157, 217, 255, 0.7);
  background: rgba(7, 27, 72, 0.85);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  padding: 9px 10px;
  outline: none;
}

.ana-word-input:focus,
.ana-hint-input:focus {
  border-color: #8be0ff;
  box-shadow: 0 0 0 3px rgba(139, 224, 255, 0.18);
}

.ana-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.ana-row-btn {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(226, 242, 255, 0.85);
  font-size: 0.92rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ana-row-btn:hover {
  color: #ffffff;
  background: rgba(133, 212, 255, 0.18);
}

.ana-add-word {
  margin-top: 2px;
  justify-self: start;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 1.03rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.ana-add-word:hover {
  color: #c8ebff;
}

.ana-name-input:focus,
.ana-list-input:focus {
  border-color: #8be0ff;
  box-shadow: 0 0 0 3px rgba(139, 224, 255, 0.18);
}

.ana-list-input {
  resize: vertical;
  min-height: 160px;
  font-weight: 600;
  line-height: 1.45;
}

.ana-setup-help {
  margin: 0;
  color: rgba(230, 243, 255, 0.82);
  font-size: 0.84rem;
}

.ana-setup-start {
  margin-top: 12px;
  align-self: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: auto;
  min-width: 280px;
  padding: 12px 34px;
  border-color: rgba(178, 255, 189, 0.95);
  background: linear-gradient(180deg, #2fca56 0%, #1f9f3e 100%);
  box-shadow: inset 0 -8px 0 rgba(0,0,0,0.18), 0 12px 24px rgba(14, 90, 35, 0.35);
}

.ana-view--game {
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  position: relative;
  overflow-y: auto;
}

.ana-game-topbar {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ana-timer {
  align-self: center;
  background: linear-gradient(180deg, #dbe9ff 0%, #c8ddff 100%);
  color: #0d3a74;
  border: 3px solid #5f88d6;
  border-radius: 20px;
  font-size: 2rem;
  font-weight: 900;
  padding: 6px 14px;
  min-width: 130px;
  text-align: center;
}

.ana-score-pill {
  background: linear-gradient(180deg, #dff2ff 0%, #cfe8ff 100%);
  color: #0d3a74;
  border: 3px solid #5f88d6;
  border-radius: 20px;
  font-size: 1.22rem;
  font-weight: 900;
  padding: 8px 14px;
  min-width: 160px;
  text-align: center;
}

.ana-game-layout {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  width: 100%;
  max-width: 980px;
  justify-items: center;
}

.ana-score-card {
  display: none;
}

.ana-player-card {
  width: 100%;
  border-radius: 22px;
  border: 4px solid rgba(114, 224, 255, 0.75);
  background: linear-gradient(180deg, #71cce7 0%, #6ec5dd 100%);
  padding: 10px 10px 12px;
}

.ana-player-symbol {
  height: 94px;
  border-radius: 16px;
  background: #0d357c;
  color: #ffdf26;
  font-size: 3.6rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 4px 0 rgba(0,0,0,0.3);
}

.ana-player-label {
  margin-top: 8px;
  color: #0b3b77;
  font-size: 1.2rem;
  font-weight: 800;
}

.ana-score {
  margin-top: 10px;
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 700;
  text-shadow: 0 2px 0 rgba(0,0,0,0.35);
}

.ana-turn {
  margin-top: 6px;
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
  font-weight: 700;
}

.ana-board-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(560px, 100%);
}

.ana-round-pill {
  background: rgba(12, 47, 122, 0.76);
  border: 2px solid rgba(162, 223, 255, 0.8);
  border-radius: 999px;
  padding: 8px 18px;
  color: #d6f1ff;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.ana-hint {
  margin: 16px 0 10px;
  color: #ffffff;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  text-align: center;
}

.ana-answer-slots,
.ana-letter-pool {
  width: 100%;
  min-height: 84px;
  border-radius: 18px;
  border: 3px solid rgba(151, 216, 255, 0.72);
  background: rgba(10, 37, 90, 0.64);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ana-letter-pool {
  margin-top: 14px;
  background: rgba(6, 27, 70, 0.7);
}

.ana-slot,
.ana-tile {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  border: 2px solid rgba(184, 232, 255, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 2rem;
  user-select: none;
}

.ana-slot-space {
  width: 20px;
  height: 58px;
  display: inline-block;
}

.ana-slot {
  background: rgba(7, 27, 72, 0.9);
  color: rgba(255, 255, 255, 0.34);
}

.ana-slot.has-letter {
  color: #ffffff;
  border-color: #95ddff;
  background: linear-gradient(180deg, #1f93d9 0%, #1b6fc0 100%);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.ana-tile {
  background: linear-gradient(180deg, #3fb3ff 0%, #2189d6 100%);
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,0.3);
  cursor: grab;
}

.ana-tile:active {
  cursor: grabbing;
}

.ana-slot.is-drop-target,
.ana-letter-pool.is-drop-target {
  box-shadow: 0 0 0 3px rgba(130, 229, 255, 0.5) inset;
}

.ana-actions-row {
  margin-top: 16px;
  gap: 10px;
  flex-wrap: nowrap;
}

.ana-actions-row .ana-secondary-btn {
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  padding: 10px 24px;
  border-radius: 22px;
}

.ana-game-msg {
  margin-top: 14px;
  min-height: 30px;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 700;
  text-align: center;
}

.ana-game-msg.is-error {
  color: #ffd4d4;
}

.ana-game-msg.is-success {
  color: #c8ffd8;
}

.ana-match-modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 17, 50, 0.52);
  z-index: 40;
}

.ana-match-modal.hidden {
  display: none;
}

.ana-match-modal__card {
  width: min(560px, 86vw);
  border-radius: 20px;
  border: 3px solid rgba(162, 223, 255, 0.9);
  background: linear-gradient(180deg, rgba(12, 47, 122, 0.98) 0%, rgba(9, 34, 92, 0.98) 100%);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
  padding: 18px 18px 16px;
  text-align: center;
}

.ana-match-modal__text {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-weight: 800;
}

.ana-match-modal__meta {
  margin-top: 10px;
  color: #b9ecff;
  font-size: 1.08rem;
  font-weight: 700;
}

.ana-match-modal__actions {
  margin-top: 14px;
  gap: 12px;
}

.ana-ranking-box {
  width: min(1080px, 92vw);
  margin-top: 18px;
  background: #ffffff;
  border-radius: 34px;
  border: 10px solid #ffffff;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.25);
  padding: 16px 18px 18px;
  color: #0f172a;
}

.ana-ranking-box.is-hidden {
  display: none;
}

.ana-ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ana-ranking-title {
  margin: 0;
  font-size: 1.95rem;
  font-weight: 700;
  color: #0f172a;
}

.ana-ranking-reset {
  border: 1px solid #94a3b8;
  background: #ffffff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.ana-ranking-reset:hover {
  background: #f8fafc;
  color: #0f172a;
}

.ana-ranking-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 4px;
  overflow: hidden;
}

.ana-ranking-table thead th {
  background: #2093d6;
  color: #ffffff;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 10px;
}

.ana-ranking-table tbody td {
  padding: 5px 10px;
  font-size: 0.95rem;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
}

.ana-ranking-table tbody tr:nth-child(even) {
  background: #f3f4f6;
}

.ana-ranking-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.ana-ranking-col-pos {
  width: 72px;
}

.ana-ranking-pos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.ana-ranking-medal {
  font-size: 0.95rem;
  line-height: 1;
}

.ana-ranking-pos.is-gold {
  color: #a16207;
}

.ana-ranking-pos.is-silver {
  color: #475569;
}

.ana-ranking-pos.is-bronze {
  color: #9a3412;
}

.ana-ranking-pos.is-default {
  color: #374151;
}

.ana-ranking-col-score,
.ana-ranking-col-words,
.ana-ranking-col-time {
  width: 110px;
}

.ana-ranking-col-del {
  width: 38px;
  text-align: center;
  color: #6b7280;
}

.ana-ranking-delete {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
}

.ana-ranking-delete:hover {
  color: #b91c1c;
}

.ana-ranking-delete:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ana-ranking-note {
  margin: 12px 0 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.88rem;
}

#viewSetup input:disabled,
#viewSetup textarea:disabled,
#viewSetup select:disabled {
  background: #202733;
  border-color: #111827;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 1;
}

#viewSetup button:disabled,
#btnOpenSettings:disabled {
  background: #202733;
  border-color: #111827;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 1;
  filter: none;
}

#viewSetup label:has(input:disabled) {
  color: #6b7280;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  .ana-stage {
    width: calc(100vw - 24px);
    border-width: 8px;
    border-radius: 28px;
  }

  .ana-game-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ana-top-controls {
    top: 10px;
    left: 10px;
    right: 10px;
  }
}

@media (max-width: 700px) {
  .ana-view {
    padding: 84px 16px 24px;
  }

  .ana-shell {
    padding-top: 12px;
  }

  .ana-top-info {
    top: 0;
    border-width: 8px;
    border-radius: 26px;
    padding: 8px 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  .ana-top-actions-row {
    gap: 8px;
    justify-content: flex-start;
  }

  .ana-top-info-title {
    font-size: 1.12rem;
  }

  .ana-top-action,
  .ana-share-btn {
    font-size: 0.8rem;
  }

  .ana-title {
    font-size: 2.7rem;
  }

  .ana-symbols {
    font-size: 4.3rem;
  }

  .ana-slot,
  .ana-tile {
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
  }

  .ana-slot-space {
    width: 14px;
    height: 50px;
  }

  .ana-name-setup {
    width: min(92vw, 500px);
  }

  .ana-menu-card {
    width: min(92vw, 500px);
  }

  .ana-settings-title {
    font-size: 0.74rem;
  }

  .ana-check,
  .ana-radio {
    font-size: 0.88rem;
  }

  .ana-game-topbar {
    gap: 8px;
    flex-wrap: wrap;
  }

  .ana-score-pill {
    font-size: 1rem;
    min-width: 130px;
    padding: 6px 10px;
  }

  .ana-ranking-box {
    width: 100%;
    padding: 12px;
  }

  .ana-ranking-title {
    font-size: 1.55rem;
  }

  .ana-ranking-table thead th,
  .ana-ranking-table tbody td {
    font-size: 0.82rem;
    padding: 5px 6px;
  }

  .ana-ranking-box {
    overflow-x: auto;
  }

  .ana-ranking-table {
    min-width: 740px;
  }

  .ana-editor-head,
  .ana-word-row {
    grid-template-columns: 28px minmax(130px, 1fr) 78px;
    gap: 6px;
  }

  .ana-editor-head.with-hints,
  .ana-word-row.with-hints {
    grid-template-columns: 28px minmax(90px, 1fr) minmax(90px, 1fr) 78px;
  }

  .ana-word-input,
  .ana-hint-input {
    font-size: 0.9rem;
    padding: 8px;
  }
}
