/* Cubes 2048 IO: the game itself is an embedded page, so this only lays out the
   frame inside the one-screen stage. Colors come from the site tokens (assets/site.css),
   which already switch with the theme. */
* { box-sizing: border-box; }

.app {
  width: 100%;
  max-width: 1100px;
  height: 100%;
  padding: clamp(4px, 1.5vw, 12px) clamp(12px, 3vw, 24px) clamp(12px, 3vw, 20px);
  color: var(--sf-ink);
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.8vw, 12px);
}

.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.title-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title {
  font-size: clamp(26px, 6vw, 40px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  display: flex;
}
.title .c1 { color: #e0524a; }
.title .c2 { color: #e8942f; }
.title .c3 { color: #3f8a52; }
.title .c4 { color: #2f6fb5; }
:root[data-theme="dark"] .title .c1 { color: #ff8a80; }
:root[data-theme="dark"] .title .c2 { color: #ffc266; }
:root[data-theme="dark"] .title .c3 { color: #7fd69a; }
:root[data-theme="dark"] .title .c4 { color: #7fb8f5; }

.title-sub {
  display: inline-block;
  padding: 3px 10px;
  font-size: clamp(10px, 2.8vw, 13px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  background: #2f5f9e;
  border-radius: 999px;
}

.game-intro {
  margin: 0;
  flex: 1 1 260px;
  font-size: clamp(12px, 3.1vw, 15px);
  line-height: 1.35;
  color: var(--sf-ink-soft);
}

.game-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-fullscreen,
.btn-theme-toggle {
  border: 0;
  border-radius: 6px;
  background: var(--sf-surface);
  color: var(--sf-ink);
  font: 700 clamp(12px, 3vw, 14px)/1 var(--sf-font);
  padding: 9px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-fullscreen:hover,
.btn-theme-toggle:hover { background: var(--sf-surface-hover); }
.btn-fullscreen:focus-visible,
.btn-theme-toggle:focus-visible { outline: 3px solid var(--sf-accent-dark); outline-offset: 2px; }
.btn-fullscreen svg,
.btn-theme-toggle svg { width: 16px; height: 16px; flex: none; }
.btn-theme-toggle { padding: 9px 11px; }
.btn-theme-toggle .icon-moon { display: inline; }
.btn-theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .btn-theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .btn-theme-toggle .icon-sun { display: inline; }

.frame-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #1c3560;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  /* Wheel and touch gestures belong to the game while the pointer is over it. */
  touch-action: none;
}

.frame-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: #dbe7fb;
  font: 600 15px/1.4 var(--sf-font);
  pointer-events: none;
  background: #1c3560;
  transition: opacity 0.3s ease;
}
.frame-note.is-gone { opacity: 0; }

@media (max-height: 560px) {
  .title-sub, .game-intro { display: none; }
}
