.gm {
  --forest: #102d32;
  --ivory: #f7f7ef;
  --amber: #ffd56d;
  background: var(--ivory);
  color: var(--forest);
}

.gm-wrap {
  max-width: 1320px;
  padding-inline: clamp(18px, 4vw, 64px);
  margin-inline: auto;
}

.gm-bar { border-bottom: 1px solid #ccd8cc; }
.gm-bar__in, .gm-bar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.gm-bar__in { justify-content: space-between; padding-block: 16px; }
.gm-bar nav button { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.gm-bar nav a, .gm-bar nav button { font-weight: 700; font-size: .9rem; text-decoration: none; color: inherit; }
.gm-bar nav a:hover, .gm-bar nav button:hover { text-decoration: underline; }
.gm :focus-visible { outline: 3px solid #e99512; outline-offset: 4px; }

.gm-film { padding-block: clamp(28px, 4vw, 56px); background: var(--forest); color: var(--ivory); }
.gm-film h1 { font-size: clamp(31px, 4.5vw, 65px); text-transform: none; line-height: 1.1; word-spacing: 0; margin-bottom: clamp(20px, 3vw, 36px); }
.gm-film__grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(250px, 1fr); align-items: center; gap: clamp(20px, 3.7vw, 54px); }
.gm-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; background: #071e21; }
.gm-film__about h2 { font-size: clamp(25px, 2.5vw, 38px); margin-bottom: 14px; }
.gm-film__about p:not(.gm-meta) { color: #d4e3df; line-height: 1.55; }
.gm-meta { color: var(--amber); font-size: .85rem; font-weight: 700; margin-bottom: 12px; }
.gm-film__save { display: grid; justify-items: start; gap: 8px; margin-top: 22px; }
.gm-contact { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 20px; border: 0; border-radius: 8px; background: var(--amber); color: var(--forest); cursor: pointer; font: inherit; font-weight: 800; line-height: 1.35; }
.gm-contact:hover { background: #ffe198; }
.gm-download { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ivory); font-weight: 700; text-underline-offset: 4px; }
.gm-download:hover { color: var(--amber); }
.gm-film__save small { color: #d4e3df; margin-top: -8px; }

.gm-explain, .gm-demo, .gm-band, .gm-mobile { padding-block: clamp(40px, 6vw, 80px); }
.gm-intro, .gm-demo, .gm-config, .gm-mobile__grid, .gm-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 72px); align-items: start; }
.gm h2 { text-wrap: balance; }
.gm-intro h2, .gm-intro p, .gm-config p:last-child, .gm-pair p, .gm-demo p:last-child { margin-bottom: 0; }

.gm-gallery { min-width: 0; margin: 32px 0 0; border: 0; padding: 0; }
.gm-gallery legend { font-size: .9rem; font-weight: 700; padding: 0 0 9px; }
.gm-gallery label { display: inline-block; margin: 0 4px 8px 0; border: 1px solid #859a92; border-radius: 24px; padding: 8px 17px; cursor: pointer; font-size: .95rem; font-weight: 700; }
.gm-gallery label:hover { background: #dfebe0; }
.gm-gallery input:checked + label { background: var(--forest); border-color: var(--forest); color: white; }
.gm-gallery input:focus-visible + label { outline: 3px solid #c47a00; outline-offset: 2px; }
.gm-role-panel { display: none; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: stretch; margin-top: 10px; border: 1px solid #cad8ca; border-radius: 14px; overflow: hidden; background: #fff; }
#view-owner:checked ~ #panel-owner, #view-manager:checked ~ #panel-manager, #view-courier:checked ~ #panel-courier { display: grid; }
.gm-role-panel img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: right center; }
#panel-owner img { object-position: left center; }
.gm-role-panel > div { align-self: center; padding: clamp(20px, 2.8vw, 40px); }
.gm-role-panel h3, .gm-config h3 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.15; }
.gm-role-panel dl { margin: 18px 0 0; }
.gm-role-panel dt { color: #316157; font-size: .86rem; font-weight: 800; }
.gm-role-panel dd { margin: 3px 0 14px; line-height: 1.5; }
.gm-role-panel dd:last-child { margin-bottom: 0; }
.gm-config { padding-top: clamp(30px, 4.5vw, 58px); }

.gm-mobile { background: #dce8df; }
.gm-mobile__grid { align-items: center; grid-template-columns: 1.2fr 1fr; }
.gm-steps { margin: 24px 0 0; padding-left: 1.5em; }
.gm-steps li { margin-top: 12px; padding-left: 6px; }
.gm-steps li::marker { color: #316157; font-weight: 800; }
.gm-handset { margin: 0; text-align: center; }
.gm-phone { text-align: left; width: min(100%, 282px); border: 7px solid #18353a; border-radius: 30px; overflow: hidden; margin: auto; background: #fafaf5; box-shadow: 0 14px 30px #18353a20; }
.gm-phone__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 17px 12px; color: white; background: var(--forest); font-weight: 800; }
.gm-phone__head span { color: var(--amber); font-size: .8rem; }
.gm-phone__map { height: 94px; background: #79ab67 url('/assets/game-mode/role-courier.webp') no-repeat left 43% / 162% auto; }
.gm-phone__body { padding: 18px; }
.gm-phone__body small { color: #47675e; font-weight: 700; }
.gm-phone__body strong { display: block; font-size: 1.42rem; }
.gm-phone__body p { margin-bottom: 16px; }
.gm-phone__photo, .gm-phone__confirm { border-radius: 8px; padding: 10px 9px; font-size: .88rem; font-weight: 700; text-align: center; }
.gm-phone__photo { color: #215843; background: #e4efe5; }
.gm-phone__photo span { margin-right: 3px; }
.gm-phone__confirm { margin-top: 8px; background: var(--amber); }
.gm-handset figcaption { max-width: 34ch; margin: 14px auto 0; font-size: .86rem; color: #37584d; }

.gm-pair h2 { font-size: clamp(25px, 2.8vw, 36px); }
.gm-band { border-bottom: 1px solid #c7d5c7; }
.gm-demo { grid-template-columns: minmax(0, 2fr) auto; align-items: center; }
.gm-demo .gm-contact { background: var(--forest); color: var(--ivory); }
.gm-demo .gm-contact:hover { background: #204848; }

@media (max-width: 800px) {
  .gm-film__grid, .gm-intro, .gm-demo, .gm-config { grid-template-columns: 1fr; }
  .gm-role-panel { grid-template-columns: 1fr; }
  .gm-role-panel img { aspect-ratio: 2 / 1; height: auto; }
  .gm-config { gap: 8px; }
  .gm-demo .gm-contact { justify-self: start; }
}

@media (max-width: 640px) {
  .gm-pair, .gm-mobile__grid { grid-template-columns: 1fr; }
  .gm-bar nav { gap: 12px; }
  .gm-bar nav a, .gm-bar nav button { font-size: .82rem; }
  .gm-gallery label { padding-inline: 12px; margin-right: 0; }
  .gm-role-panel img { aspect-ratio: 1.5; height: auto; }
}
