#finish-stats[hidden] ~ .msg-actions #story-share { display: none; }

#share-game-dialog {
  --gutter: clamp(13px, 3.7vw, 24px);
  width: min(560px, calc(100vw - 24px));
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 0 0 var(--gutter);
  border: 0;
  border-radius: 0;
  color: var(--forest);
  background: var(--paper);
  box-shadow: 0 14px 48px rgb(5 25 21 / 36%);
  overscroll-behavior: contain;
  scrollbar-color: #6d8876 var(--paper);
}
#share-game-dialog::backdrop { background: rgb(9 27 25 / 70%); }
.share-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px var(--gutter);
  color: var(--paper-light);
  background: var(--forest);
}
.share-heading h2 {
  margin: 0;
  font: 800 clamp(30px, 5vw, 40px)/1 var(--display);
  letter-spacing: -.015em;
}
#share-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid #8da195;
  color: var(--paper-light);
  background: transparent;
  font: 400 26px/1 var(--body);
}
.share-pack {
  margin: 0;
  padding: var(--gutter);
  border-bottom: 1px dashed #8a9b86;
}
.share-pack img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px var(--gutter) 0;
}
.share-actions button, .share-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--forest);
  border-radius: 0;
  background: transparent;
  color: var(--forest);
  font: 650 14px/1.15 var(--body);
  text-decoration: none;
}
#share-native, #share-native[hidden] + #share-copy {
  color: var(--paper-light);
  background: var(--forest);
}
#share-native:disabled { opacity: .65; }
#share-feedback {
  margin: 8px var(--gutter) 0;
  font: 550 13px/1.4 var(--body);
}
#share-feedback:empty { display: none; }
#share-manual {
  display: block;
  width: calc(100% - 2 * var(--gutter));
  margin: 8px var(--gutter) 0;
  padding: 9px;
  border: 1px solid var(--forest);
  font: 500 16px/1.2 var(--body);
  color: var(--forest);
  background: var(--paper-light);
}
#share-game-dialog a:focus-visible,
#share-game-dialog input:focus-visible {
  outline: 3px solid #9d351f;
  outline-offset: 2px;
}
#share-close:focus-visible { outline-color: var(--orange); }
@media (hover:hover) {
  #share-close:hover { background: #31594c; }
  .share-actions a:hover, .share-actions button:hover { background: #e1e1cb; }
  #share-native:hover, #share-native[hidden] + #share-copy:hover { background: #295747; }
}
@media (max-width:620px) {
  .mast .share-word { display: none; }
}
@media (max-width:360px) {
  .mast #how { width: 41px; justify-content: center; }
  .mast .controls-word { display: none; }
  .share-actions { gap: 6px; }
}
