.page-greg-tales { background: #070b18; color: #edf7ff; }
.greg-tales-page { min-height: calc(100vh - 86px); padding: clamp(1.5rem, 5vw, 4rem) 1rem 4rem; background-image: linear-gradient(180deg, rgba(4, 8, 16, .84) 0%, rgba(7, 16, 31, .76) 42%, rgba(7, 16, 31, .9) 100%), url('../images/optimized/twin-pulsars-desktop.webp'); background-size: cover; background-position: center; background-attachment: fixed; }
.greg-tales-shell { width: min(1120px, 100%); margin: 0 auto; }
.greg-tales-landing { max-width: 760px; }
.greg-game-nav { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.5rem; }
.greg-game-nav-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.35rem; padding: .55rem .8rem; border: 1px solid #52708f; border-radius: 6px; color: #d8fbff; background: #12253d; font: 800 .75rem ui-monospace, monospace; text-decoration: none; transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease; }
.greg-game-nav-button:hover, .greg-game-nav-button:focus-visible { border-color: #7de3ff; color: #081126; background: #7de3ff; outline: none; transform: translateY(-1px); }
.greg-tales-kicker { margin: 2rem 0 .6rem; color: #7de3ff; font: 700 .75rem/1.2 ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; }
.greg-tales-hero { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.2rem 0 2.5rem; }
.greg-tales-hero h1 { margin: 0; color: #fff; font-size: clamp(2.8rem, 8vw, 6rem); letter-spacing: -.07em; line-height: .9; }
.greg-tales-hero p { max-width: 620px; margin: 1rem 0 0; color: #b8c9df; font-size: 1.1rem; line-height: 1.55; }
.greg-beta-note { display: inline-block; margin: 0 0 1rem; padding: .35rem .55rem; border: 1px solid rgba(255, 230, 109, .35); border-radius: 4px; color: #ffe66d; background: rgba(255, 230, 109, .07); font: 700 .68rem ui-monospace, monospace; letter-spacing: .08em; }
.greg-tales-intro { max-width: 650px; margin: 1rem 0 2rem; color: #c1d0e1; font-size: clamp(1.1rem, 2.5vw, 1.45rem); line-height: 1.6; }
.greg-tales-controls { margin: 0 0 2rem; padding: 1.2rem 1.3rem; border: 1px solid rgba(145, 215, 255, .25); border-radius: 14px; background: rgba(8, 18, 39, .78); }
.greg-tales-controls h2 { margin: 0 0 1rem; color: #fff; font-size: 1.3rem; }
.greg-tales-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.5rem; color: #c1d0e1; font: 700 .85rem ui-monospace, monospace; }
.greg-tales-control-grid span { display: flex; align-items: center; gap: .45rem; }
.greg-tales-control-grid kbd { min-width: 2rem; padding: .3rem .4rem; border: 1px solid #52708f; border-radius: 4px; color: #edf7ff; background: #12253d; text-align: center; }
.greg-tales-level-links { display: flex; flex-wrap: wrap; gap: .8rem; }
.greg-tales-character { width: 150px; height: 170px; flex: 0 0 150px; background: url('../greg-game/greg-character-sprite.png') left center / 500% 100% no-repeat; image-rendering: auto; filter: drop-shadow(0 14px 16px rgba(0,0,0,.35)); }
.greg-tales-savebar { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1rem; padding: .75rem 1rem; border: 1px solid rgba(145, 215, 255, .2); border-radius: 9px; color: #a9bdd5; background: rgba(8, 18, 39, .65); font: 700 .75rem ui-monospace, monospace; }
.greg-tales-savebar strong { color: #ffe66d; }
.greg-tales-savebar button { margin-left: auto; padding: .35rem .55rem; border: 1px solid #405b77; border-radius: 5px; color: #9bb4ce; background: transparent; font: inherit; cursor: pointer; }
.greg-tales-savebar button:hover { color: #fff; border-color: #7de3ff; }
.greg-tales-game { margin-top: 1rem; }
.greg-tales-game .greg-level-heading { margin: 0 0 1.2rem; }
.greg-tales-game-instructions { margin: .8rem 0 0; color: #8ea5c1; font: 700 .8rem ui-monospace, monospace; text-align: center; }
.greg-tales-game-instructions kbd { display: inline-block; margin: 0 .15rem; padding: .18rem .4rem; border: 1px solid #587796; border-radius: 4px; color: #effaff; background: #15253a; font: inherit; }
.greg-tales-level-picker { display: flex; flex-direction: column; align-items: stretch; width: min(15rem, 100%); gap: .45rem; margin: 1.4rem auto 0; }
.greg-tales-level-picker p { margin: 0 0 .25rem; color: #7de3ff; font: 800 .75rem ui-monospace, monospace; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.greg-tales-level-picker a { display: block; width: 100%; padding: .65rem 1rem; border: 1px solid #6c91af; border-radius: 6px; color: #effaff; background: linear-gradient(180deg, #1d3855, #12253d); box-shadow: 0 3px 10px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(216, 251, 255, .12); font: 800 .76rem ui-monospace, monospace; text-align: center; text-decoration: none; transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease; }
.greg-tales-level-picker a:hover, .greg-tales-level-picker a:focus-visible { border-color: #ffe66d; color: #081126; background: #ffe66d; outline: none; transform: translateY(-1px); }
.greg-tales-layout { display: grid; grid-template-columns: minmax(210px, .7fr) 1.5fr; gap: 1rem; }
.greg-tales-chapters, .greg-tales-story { border: 1px solid rgba(145, 215, 255, .25); border-radius: 14px; background: rgba(8, 18, 39, .78); box-shadow: 0 18px 55px rgba(0,0,0,.25); }
.greg-tales-chapters { padding: 1rem; }
.greg-tales-label, .greg-tales-eyebrow { color: #7de3ff; font: 700 .72rem ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }
.greg-tales-chapters button { display: block; width: 100%; padding: .7rem; border: 0; border-left: 2px solid transparent; color: #a9bdd5; background: transparent; font: 700 .75rem ui-monospace, monospace; text-align: left; cursor: pointer; }
.greg-tales-chapters button span { display: block; }
.greg-tales-chapters button:disabled { opacity: .38; cursor: not-allowed; }
.greg-tales-chapters button:hover, .greg-tales-chapters button.is-active { border-left-color: #ffe66d; color: #fff; background: rgba(255,230,109,.08); }
.greg-tales-story { padding: clamp(1.3rem, 4vw, 3rem); }
.greg-tales-story h2 { margin: .45rem 0 1rem; color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); }
.greg-tales-storyline { display: none; }
.greg-tales-story > p:not(.greg-tales-eyebrow) { max-width: 680px; color: #c1d0e1; font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.75; }
.greg-tales-objective { margin-bottom: .75rem; }
.greg-tales-objective strong { color: #ffe66d; }
.greg-tales-mode { color: #7de3ff !important; font: 700 .72rem ui-monospace, monospace; letter-spacing: .12em; }
.greg-tales-progress { height: 4px; margin: 2rem 0 1.5rem; overflow: hidden; background: #1e3551; }
.greg-tales-progress span { display: block; width: 25%; height: 100%; background: #ffe66d; transition: width .2s ease; }
.greg-tales-actions { display: flex; justify-content: space-between; gap: 1rem; }
.greg-tales-play { padding: .7rem .9rem; border: 1px solid #ffe66d; border-radius: 6px; color: #081126; background: #ffe66d; font: 800 .8rem ui-monospace, monospace; text-decoration: none; }
.greg-tales-actions button { padding: .7rem .9rem; border: 1px solid #52708f; border-radius: 6px; color: #eaf7ff; background: #12253d; font: 700 .8rem ui-monospace, monospace; cursor: pointer; }
.greg-tales-actions button:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 700px) {
  .greg-tales-page { background-image: linear-gradient(180deg, rgba(4, 8, 16, .84) 0%, rgba(7, 16, 31, .76) 42%, rgba(7, 16, 31, .9) 100%), url('../images/optimized/twin-pulsars-mobile.webp'); }
  .greg-tales-page { padding: 1rem .7rem 2.5rem; }
  .greg-game-nav { gap: .4rem; margin-bottom: 1rem; }
  .greg-game-nav-button { flex: 1 1 calc(50% - .4rem); min-height: 2.15rem; padding: .45rem .55rem; font-size: .68rem; text-align: center; }
  .greg-tales-kicker { margin: 1rem 0 .45rem; }
  .greg-tales-hero { display: block; padding: .8rem 0 1.4rem; }
  .greg-tales-hero p { margin-top: .8rem; font-size: .98rem; line-height: 1.45; }
  .greg-tales-character { width: 100px; height: 112px; min-height: 112px; margin: 1rem auto 0; }
  .greg-tales-savebar { flex-wrap: wrap; gap: .55rem .8rem; margin-bottom: .8rem; padding: .65rem .7rem; font-size: .68rem; }
  .greg-tales-savebar button { width: 100%; margin-left: 0; }
  .greg-tales-layout { grid-template-columns: 1fr; gap: .7rem; }
  .greg-tales-chapters { padding: .7rem; }
  .greg-tales-chapters .greg-tales-label { margin: 0 0 .45rem; }
  .greg-tales-chapters > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem; }
  .greg-tales-chapters button { padding: .55rem .35rem; border-left: 0; border-bottom: 2px solid transparent; text-align: center; }
  .greg-tales-chapters button:hover, .greg-tales-chapters button.is-active { border-bottom-color: #ffe66d; border-left-color: transparent; }
  .greg-tales-story { padding: 1rem; }
  .greg-tales-story h2 { margin-top: .35rem; font-size: 1.65rem; }
  .greg-tales-story > p:not(.greg-tales-eyebrow) { font-size: .95rem; line-height: 1.55; }
  .greg-tales-progress { margin: 1.3rem 0 1rem; }
  .greg-tales-actions { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: .35rem; }
  .greg-tales-play, .greg-tales-actions button { min-width: 0; padding: .6rem .35rem; font-size: .68rem; text-align: center; }
}
