.ak-page {
  margin: 0;
  color: #f4f0e6;
  background-color: #0c171e;
  background-image: linear-gradient(#07131c88, #07131cbb), url("../images/backgrounds/main_background.jpg");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  font-family: system-ui, sans-serif;
  min-height: 100vh;
}
.ak-shell {
  width: min(1180px, 94vw);
  margin: 24px auto 64px;
}
.ak-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.ak-nav a,
.ak-btn {
  color: #fff;
  background: #233239;
  border: 1px solid #64706c;
  border-radius: 8px;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.ak-btn:hover,
.ak-nav a:hover {
  border-color: #ffd044;
}
.ak-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ak-btn.primary {
  background: #e4b333;
  color: #171b1d;
  font-weight: 750;
}
.ak-panel {
  background: rgba(9, 19, 24, 0.91);
  border: 1px solid #425056;
  border-radius: 16px;
  padding: 24px;
  margin: 16px 0;
}
.ak-kicker {
  color: #dec17d;
  letter-spacing: 0.16em;
  font-size: 12px;
}
.ak-title {
  font-size: clamp(30px, 5vw, 58px);
  margin: 8px 0;
}
.ak-muted {
  color: #b4bcbf;
}
.ak-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 24px;
}
.ak-worlds {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ak-worlds button {
  flex: 1;
  min-width: 84px;
}
.ak-worlds .selected {
  border: 2px solid #ffd044;
  background: #403b24;
}
.ak-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  padding: 24px 0;
}
.ak-stage {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  background: #293238;
  border: 1px solid #596469;
  border-radius: 16px;
  color: #fff;
  cursor: pointer;
}
.ak-stage b {
  font-size: 24px;
}
.ak-stage small {
  font-size: 11px;
}
.ak-stage.cleared {
  background: #403921;
  border-color: #d4ad4b;
}
.ak-stage.current {
  box-shadow: 0 0 20px #ffc60066;
  outline: 3px solid #ffd044;
}
.ak-stage:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ak-stars {
  color: #ffd044;
  letter-spacing: 3px;
}
.ak-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ak-table td,
.ak-table th {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid #364148;
}
.ak-error {
  white-space: pre-line;
  color: #ffb4a9;
  min-height: 24px;
}
.ak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px;
}
.ak-skin-preview {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 20px;
}
.ak-stone {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #171b20;
  box-shadow:
    inset -6px -7px 8px #0008,
    0 4px 8px #0008;
}
.ak-stone.white {
  border-color: #fff;
}
.ak-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  margin: 8px 0;
}
.ak-page input,
.ak-page select,
.ak-page textarea,
.ak-panel input,
.ak-panel select {
  background: #18252c;
  color: #fff;
  border: 1px solid #59666d;
  padding: 8px;
  border-radius: 6px;
  max-width: 100%;
  box-sizing: border-box;
}
.ak-editor {
  display: grid;
  grid-template-columns: 160px minmax(320px, 1fr) 260px;
  gap: 16px;
}
.ak-stage-list {
  max-height: 75vh;
  overflow: auto;
}
.ak-stage-list button {
  display: block;
  width: 100%;
  margin: 4px 0;
  text-align: left;
}
.ak-editor canvas {
  width: 100%;
  background: #b78657;
  border-radius: 8px;
  touch-action: none;
}
.ak-properties {
  max-height: 75vh;
  overflow: auto;
}
.ak-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ak-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.ak-toolbar .ak-btn {
  padding: 8px 10px;
  font-size: 13px;
}
.ak-dialog {
  background: #14212a;
  color: #fff;
  border: 1px solid #af934c;
  border-radius: 16px;
  max-width: min(460px, 88vw);
  padding: 24px;
}
.ak-dialog::backdrop {
  background: #000a;
}
.ak-room {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #34434b;
}
.ak-hud {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 880px;
  margin: 10px auto;
  color: #ffd044;
}
.ak-page :focus-visible,
.ak-btn:focus-visible {
  outline: 3px solid #8ed5ff;
  outline-offset: 3px;
}
#alkkagiSkinShop {
  max-width: 1100px;
  margin: 24px auto;
}
#akResultActions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 850px) {
  .ak-layout {
    grid-template-columns: 1fr;
  }
  .ak-editor {
    grid-template-columns: 110px 1fr;
  }
  .ak-properties {
    grid-column: 1/-1;
    max-height: none;
  }
  .ak-map {
    gap: 12px;
  }
  .ak-panel {
    padding: 16px;
  }
}
@media (max-width: 480px) {
  .ak-map {
    grid-template-columns: repeat(3, 1fr);
  }
  .ak-editor {
    grid-template-columns: 1fr;
  }
  .ak-stage-list {
    max-height: 150px;
  }
  .ak-title {
    font-size: 34px;
  }
  .ak-nav a,
  .ak-btn {
    padding: 8px 10px;
  }
  .ak-editor canvas {
    min-width: 0;
  }
  .ak-shell {
    width: 94vw;
  }
}

.ak-worlds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
#alkkagiSkinShop {
  width: min(1100px, 94vw);
  box-sizing: border-box;
  scroll-margin-top: 90px;
}
.ak-hud {
  font-family: system-ui, sans-serif;
}
.ak-error:empty {
  display: none;
}
.ak-stage-list.ak-panel {
  padding: 10px;
}
.ak-editor .ak-properties {
  padding: 16px;
}
@media (min-width: 1050px) {
  .ak-worlds {
    grid-template-columns: repeat(9, 1fr);
  }
  .ak-worlds button {
    min-width: 0;
    padding: 10px 3px;
    font-size: 12px;
  }
}

.ak-skin-preview { margin: 20px 0; gap: 12px; } .ak-stone { width: 46px; height: 46px; }
