html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #111820;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-shell {
  position: relative;
  flex: 0 0 auto;
  width: min(100vw, 1000px, 147.0588vh);
  aspect-ratio: 1000 / 680;
  background: #111820;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  background: #d8edf7;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.fullscreen-button {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 248, 223, 0.72);
  border-radius: 5px;
  background: rgba(27, 31, 39, 0.76);
  color: #fff8df;
  font: 600 13px/1 "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(3px);
}

.fullscreen-button:hover {
  background: rgba(61, 42, 50, 0.92);
}

.fullscreen-button:focus-visible {
  outline: 3px solid #e8bf5d;
  outline-offset: 2px;
}

.fullscreen-icon {
  font-size: 21px;
  line-height: 1;
}

.game-shell:fullscreen,
.game-shell:-webkit-full-screen,
.game-shell.is-pseudo-fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
  background: #111820;
}

.game-shell:fullscreen canvas,
.game-shell:-webkit-full-screen canvas,
.game-shell.is-pseudo-fullscreen canvas {
  width: min(100vw, 147.0588vh);
  width: min(100vw, 147.0588dvh);
  height: auto;
  aspect-ratio: 1000 / 680;
  box-shadow: none;
}

.game-shell.is-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

body.pseudo-fullscreen-active {
  overflow: hidden;
}

.ad-slot:not([hidden]) {
  width: min(100vw, 1000px);
  min-height: 90px;
  margin-top: 12px;
  overflow: hidden;
}

.feedback {
  width: 100%;
  margin-top: 24px;
  border-top: 1px solid #2d3d44;
  border-bottom: 1px solid #2d3d44;
  background: #18232a;
}

.feedback-inner {
  width: min(calc(100% - 40px), 720px);
  margin: 0 auto;
  padding: 28px 0 32px;
}

.feedback h2,
.feedback label,
.feedback-status {
  color: #f2f3e8;
}

.feedback h2 {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
}

.feedback-form {
  display: grid;
  gap: 10px;
}

.feedback label {
  font-size: 14px;
}

.feedback textarea {
  box-sizing: border-box;
  width: 100%;
  resize: vertical;
  min-height: 92px;
  padding: 12px;
  border: 1px solid #607780;
  border-radius: 4px;
  background: #f7f8f0;
  color: #1c2730;
  font: inherit;
  line-height: 1.5;
}

.feedback textarea:focus,
.feedback button:focus-visible,
.comment-delete:focus-visible {
  outline: 3px solid #e8bf5d;
  outline-offset: 2px;
}

.feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feedback-actions span {
  color: #b8c8c8;
  font-size: 13px;
}

.feedback button,
.comment-delete {
  border: 0;
  border-radius: 4px;
  background: #d5913f;
  color: #1e252a;
  padding: 9px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.feedback button:hover,
.comment-delete:hover {
  background: #efb65f;
}

.feedback button:disabled,
.comment-delete:disabled {
  opacity: 0.65;
  cursor: wait;
}

.feedback-status {
  min-height: 20px;
  margin: 0;
  font-size: 14px;
}

.feedback-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.admin-page {
  align-items: stretch;
}

.admin-shell {
  box-sizing: border-box;
  width: min(calc(100% - 40px), 820px);
  margin: 0 auto;
  padding: 48px 0 72px;
}

.admin-header {
  padding-bottom: 20px;
  border-bottom: 1px solid #3c5058;
}

.admin-header p {
  margin: 0 0 8px;
  color: #e8bf5d;
  font-size: 13px;
  font-weight: 700;
}

.admin-header h1 {
  margin: 0;
  color: #f2f3e8;
  font-size: 26px;
}

.admin-status {
  margin: 22px 0;
  color: #b8c8c8;
  font-size: 14px;
}

.comment-list {
  display: grid;
  gap: 12px;
}

.comment-item {
  padding: 18px;
  border: 1px solid #3c5058;
  border-radius: 4px;
  background: #18232a;
}

.comment-item p {
  margin: 0;
  white-space: pre-wrap;
  color: #f2f3e8;
  line-height: 1.6;
}

.comment-item footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.comment-item time {
  color: #b8c8c8;
  font-size: 13px;
}

.comment-delete {
  padding: 6px 12px;
  background: #b95c4f;
  color: #fff;
  font-size: 13px;
}

.comment-delete:hover {
  background: #d47565;
}

@media (max-width: 560px) {
  .fullscreen-button {
    bottom: 8px;
    right: 8px;
    min-width: 40px;
    min-height: 40px;
    padding: 7px 9px;
  }

  #fullscreen-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .feedback-inner,
  .admin-shell {
    width: min(calc(100% - 28px), 720px);
  }

  .feedback-inner {
    padding: 24px 0 28px;
  }
}
