:root {
  --iw-ink: #f8fbff;
  --iw-muted: #b8c9d9;
  --iw-deep: #06111e;
  --iw-panel: rgba(10, 29, 47, 0.92);
  --iw-cyan: #39d9df;
  --iw-teal: #159ca7;
  --iw-gold: #ffd56c;
  --iw-coral: #ff7d61;
  --iw-line: rgba(77, 218, 223, 0.3);
  --iw-radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body.inselwurf-page {
  min-width: 300px;
  margin: 0;
  color: var(--iw-ink);
  background:
    radial-gradient(circle at 82% 8%, rgba(38, 192, 194, 0.15), transparent 31rem),
    radial-gradient(circle at 11% 32%, rgba(255, 155, 86, 0.1), transparent 29rem),
    #06111e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.inselwurf-page *,
.inselwurf-page *::before,
.inselwurf-page *::after {
  box-sizing: border-box;
}

.iw-skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #04131d;
  background: #fff4c2;
  border-radius: 9px;
  transform: translateY(-150%);
}

.iw-skip-link:focus {
  transform: translateY(0);
}

.iw-site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
  padding: 10px clamp(16px, 4vw, 64px);
  border-bottom: 1px solid rgba(93, 220, 225, 0.18);
  background: rgba(4, 15, 27, 0.86);
  backdrop-filter: blur(18px);
}

.iw-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
  line-height: 1.05;
}

.iw-brand strong,
.iw-brand small {
  display: block;
}

.iw-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.iw-brand small {
  margin-top: 3px;
  color: var(--iw-cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.iw-brand-shell {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #073243;
  background: radial-gradient(circle at 38% 33%, #fffbd7 0 13%, #ffd577 36%, #df8c3d 72%, #7c401f 100%);
  border: 2px solid rgba(255, 234, 166, 0.88);
  border-radius: 50% 50% 46% 54%;
  box-shadow: 0 0 22px rgba(255, 190, 75, 0.25);
}

.iw-header-links {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.iw-header-links a,
.iw-user-pill {
  padding: 9px 13px;
  color: var(--iw-muted);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.iw-header-links a:hover,
.iw-header-links a:focus-visible {
  color: #fff;
  border-color: var(--iw-line);
  background: rgba(23, 90, 106, 0.24);
}

.iw-user-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff0ae;
  border-color: rgba(255, 213, 108, 0.35);
  background: rgba(125, 84, 24, 0.24);
}

.inselwurf-page main,
.iw-footer {
  width: min(1450px, calc(100% - 32px));
  margin-inline: auto;
}

.iw-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(460px, 1.4fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  min-height: 590px;
  padding: clamp(48px, 7vw, 100px) 0;
}

.iw-eyebrow {
  margin: 0 0 11px;
  color: var(--iw-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.iw-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.15rem, 7vw, 7.2rem);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.iw-hero h1 span {
  display: block;
  margin-top: 0.28em;
  color: #ffda7f;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.24em;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.iw-lead {
  max-width: 640px;
  margin: 28px 0 22px;
  color: #d4e0e9;
  font-size: clamp(1.03rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

.iw-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.iw-hero-badges span {
  padding: 7px 11px;
  color: #d9fbff;
  border: 1px solid rgba(68, 222, 228, 0.3);
  border-radius: 999px;
  background: rgba(12, 103, 116, 0.17);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.iw-primary-link,
.iw-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  color: #efffff;
  border: 1px solid rgba(63, 226, 231, 0.58);
  border-radius: 12px;
  background: rgba(7, 55, 69, 0.82);
  box-shadow: 0 11px 30px rgba(0, 0, 0, 0.2);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.iw-primary-link:hover,
.iw-primary-link:focus-visible,
.iw-button:hover,
.iw-button:focus-visible {
  border-color: #a5fbff;
  background: #0c7080;
  transform: translateY(-2px);
}

.iw-button[hidden] {
  display: none;
}

.iw-hero-art {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(69, 224, 229, 0.34);
  border-radius: clamp(20px, 3vw, 34px);
  background: #0a1e2d;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38), 0 0 0 8px rgba(65, 217, 222, 0.03);
  transform: rotate(0.7deg);
}

.iw-hero-art::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 57%, rgba(2, 13, 22, 0.68));
}

.iw-hero-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.iw-hero-art figcaption {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 14px;
  padding: 6px 10px;
  color: #d6f9fa;
  border: 1px solid rgba(155, 247, 246, 0.2);
  border-radius: 999px;
  background: rgba(3, 20, 31, 0.72);
  font-size: 0.71rem;
  font-weight: 800;
}

.iw-game-section {
  scroll-margin-top: 90px;
  padding: clamp(34px, 5vw, 70px) 0;
}

.iw-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.iw-section-heading h2,
.iw-info-grid h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.6vw, 3.3rem);
  line-height: 1.05;
}

.iw-daily-text {
  max-width: 610px;
  margin: 0;
  color: var(--iw-muted);
  line-height: 1.55;
}

.iw-game-card {
  padding: clamp(10px, 1.7vw, 24px);
  border: 1px solid rgba(67, 213, 220, 0.27);
  border-radius: var(--iw-radius);
  background: linear-gradient(145deg, rgba(14, 38, 59, 0.97), rgba(5, 18, 31, 0.98));
  box-shadow: 0 30px 95px rgba(0, 0, 0, 0.36);
}

.iw-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.iw-hud > div {
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid rgba(79, 217, 221, 0.18);
  border-radius: 12px;
  background: rgba(4, 18, 30, 0.66);
}

.iw-hud span,
.iw-hud strong {
  display: block;
}

.iw-hud span {
  margin-bottom: 2px;
  color: #87a7bb;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.iw-hud strong {
  overflow: hidden;
  color: #fff4c4;
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iw-stage-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(119, 237, 238, 0.3);
  border-radius: 17px;
  background: #0b3143;
  box-shadow: inset 0 0 70px rgba(1, 10, 18, 0.4);
  isolation: isolate;
}

#iwCanvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  cursor: grab;
}

#iwCanvas.is-dragging {
  cursor: grabbing;
}

#iwCanvas:focus-visible {
  box-shadow: inset 0 0 0 3px #fff0a6;
}

.iw-stage-vignette {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(0, 8, 16, 0.42);
}

.iw-power {
  position: absolute;
  z-index: 4;
  bottom: 17px;
  left: 18px;
  width: clamp(95px, 16vw, 190px);
  height: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(0, 10, 18, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.iw-stage-shell.is-aiming .iw-power {
  opacity: 1;
}

.iw-power span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #40e3cf, #ffe273 68%, #ff795f);
  transition: width 50ms linear;
}

.iw-power strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #07131d;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
}

.iw-overlay {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(3, 17, 27, 0.61);
  backdrop-filter: blur(6px);
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.iw-overlay[hidden] {
  display: none;
}

.iw-overlay-card {
  width: min(510px, 94%);
  padding: clamp(22px, 4vw, 40px);
  text-align: center;
  border: 1px solid rgba(106, 233, 235, 0.4);
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(9, 39, 55, 0.96), rgba(3, 17, 29, 0.97));
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.48);
  max-height: 100%;
  overflow-y: auto;
}

.iw-overlay-card h3 {
  margin: 0 0 11px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 3rem);
}

.iw-overlay-card > p:not(.iw-eyebrow) {
  margin: 0 auto 21px;
  color: #c5d6df;
  line-height: 1.55;
}

.iw-overlay-pearl {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 29%, #fff 0 9%, #dbfbf7 23%, #9fdad9 57%, #5689a0 78%, #153a52 100%);
  box-shadow: 0 0 26px rgba(136, 255, 248, 0.55), inset -7px -8px 13px rgba(5, 33, 58, 0.32);
}

.iw-overlay-card .iw-button {
  margin: 4px;
}

.iw-button-primary {
  color: #031519;
  border-color: #82fbf7;
  background: linear-gradient(135deg, #54f1e4, #2bc6db);
}

.iw-button-reward {
  color: #2b1b00;
  border-color: #ffefae;
  background: linear-gradient(135deg, #ffe583, #f6a941);
  box-shadow: 0 0 28px rgba(255, 192, 75, 0.28);
}

.iw-message {
  min-height: 46px;
  margin-top: 12px;
  padding: 12px 15px;
  color: #d5eaf1;
  border-left: 3px solid var(--iw-cyan);
  border-radius: 5px 11px 11px 5px;
  background: rgba(7, 30, 45, 0.78);
  line-height: 1.45;
}

.iw-message.is-good {
  color: #fff3bd;
  border-left-color: var(--iw-gold);
}

.iw-message.is-error {
  color: #ffd2ca;
  border-left-color: var(--iw-coral);
}

.iw-controls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.iw-controls-grid > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 10px;
  padding: 13px;
  border: 1px solid rgba(70, 207, 214, 0.16);
  border-radius: 13px;
  background: rgba(4, 17, 29, 0.48);
}

.iw-control-icon {
  grid-row: 1 / 3;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: #ffe09a;
  border: 1px solid rgba(255, 216, 122, 0.28);
  border-radius: 50%;
  background: rgba(129, 80, 22, 0.2);
  font-size: 1.2rem;
  font-weight: 900;
}

.iw-controls-grid strong {
  color: #edfaff;
  font-size: 0.9rem;
}

.iw-controls-grid small {
  margin-top: 3px;
  color: #91aabd;
  line-height: 1.35;
}

.iw-keyboard-help {
  margin-top: 10px;
  padding: 10px 13px;
  color: #9db4c5;
  border-radius: 10px;
  background: rgba(3, 15, 26, 0.35);
  font-size: 0.85rem;
}

.iw-keyboard-help summary {
  color: #cbe9ec;
  font-weight: 800;
  cursor: pointer;
}

.iw-keyboard-help p {
  margin: 8px 0 0;
}

.iw-info-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 15px;
  padding: clamp(30px, 5vw, 75px) 0 100px;
}

.iw-info-grid article {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(70, 205, 211, 0.2);
  border-radius: 18px;
  background: rgba(9, 27, 43, 0.72);
}

.iw-info-grid h2 {
  margin-bottom: 18px;
  font-size: clamp(1.45rem, 2.7vw, 2.4rem);
}

.iw-info-grid p,
.iw-info-grid li {
  color: #b7cad7;
  line-height: 1.65;
}

.iw-info-grid ul {
  padding-left: 19px;
}

.iw-info-grid li + li {
  margin-top: 6px;
}

.iw-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0 45px;
  color: #819bad;
  border-top: 1px solid rgba(66, 205, 212, 0.17);
  font-size: 0.85rem;
}

.iw-footer a {
  color: #8aebef;
}

/* Kompakte Desktop-Spielansicht: rund 25 % kleiner, ohne die 1280x720-Spielwelt zu verändern. */
@media (min-width: 981px) {
  .iw-game-card {
    width: min(100%, 1088px);
    margin-inline: auto;
    padding: 12px;
  }

  .iw-hud {
    gap: 7px;
    margin-bottom: 8px;
  }

  .iw-hud > div {
    padding: 6px 10px;
    border-radius: 10px;
  }

  .iw-hud span {
    font-size: 0.61rem;
  }

  .iw-hud strong {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .iw-stage-shell {
    border-radius: 13px;
  }

  .iw-message {
    min-height: 36px;
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 0.91rem;
    line-height: 1.3;
  }

  .iw-controls-grid {
    gap: 7px;
    margin-top: 8px;
  }

  .iw-controls-grid > div {
    grid-template-columns: 34px 1fr;
    column-gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .iw-control-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .iw-controls-grid strong {
    font-size: 0.84rem;
  }

  .iw-controls-grid small {
    margin-top: 1px;
    font-size: 0.76rem;
    line-height: 1.2;
  }

  .iw-keyboard-help {
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }
}

@media (max-width: 980px) {
  .iw-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 62px;
  }

  .iw-hero-copy {
    max-width: 780px;
  }

  .iw-hero-art {
    transform: none;
  }

  .iw-section-heading {
    align-items: start;
    flex-direction: column;
  }

  .iw-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .iw-info-grid article:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .iw-site-header {
    min-height: 62px;
    padding-inline: 12px;
  }

  .iw-brand-shell {
    width: 37px;
    height: 37px;
  }

  .iw-brand strong {
    font-size: 1rem;
  }

  .iw-header-links a:first-child {
    display: none;
  }

  .iw-header-links a,
  .iw-user-pill {
    padding: 7px 9px;
    font-size: 0.76rem;
  }

  .inselwurf-page main,
  .iw-footer {
    width: min(100% - 18px, 1450px);
  }

  .iw-hero {
    gap: 29px;
    padding: 44px 4px 58px;
  }

  .iw-hero h1 {
    font-size: clamp(3rem, 18vw, 5.1rem);
  }

  .iw-hero h1 span {
    font-size: 0.22em;
  }

  .iw-hero-art figcaption {
    display: none;
  }

  .iw-game-section {
    padding-top: 30px;
  }

  .iw-game-card {
    padding: 8px;
    border-radius: 15px;
  }

  .iw-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .iw-hud > div {
    padding: 7px 9px;
  }

  .iw-stage-shell {
    aspect-ratio: 4 / 3;
    border-radius: 11px;
  }

  .iw-overlay {
    padding: 8px;
  }

  .iw-overlay-card {
    width: min(440px, 97%);
    padding: 10px 12px 12px;
  }

  .iw-overlay-pearl {
    width: 31px;
    height: 31px;
    margin-bottom: 5px;
  }

  .iw-overlay-card .iw-eyebrow {
    display: none;
  }

  .iw-overlay-card h3 {
    margin-bottom: 6px;
    font-size: 1.4rem;
  }

  .iw-overlay-card > p:not(.iw-eyebrow) {
    margin-bottom: 8px;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .iw-overlay-card .iw-button {
    min-height: 38px;
    padding-block: 8px;
  }

  .iw-controls-grid,
  .iw-info-grid {
    grid-template-columns: 1fr;
  }

  .iw-info-grid article:first-child {
    grid-column: auto;
  }

  .iw-controls-grid > div {
    padding: 10px;
  }

  .iw-footer {
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .iw-brand small,
  .iw-header-links {
    display: none;
  }

  .iw-user-pill {
    margin-left: auto;
  }

  .iw-hero-badges span {
    font-size: 0.66rem;
  }

  .iw-overlay-card .iw-button {
    width: 100%;
    min-height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .iw-primary-link,
  .iw-button,
  .iw-overlay,
  .iw-power span {
    transition: none;
  }
}
