/* Card 673: the share button and its "Kopierad!" toast (Amanda's share673
   design). Loaded last on the portal, every arcade game page and the dice
   game, so the header tweaks below win over the page stylesheets. */
header .hdr-r{display:flex;align-items:center;gap:8px;flex:none}
.share{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 14px;margin:0;font:400 18px/1 'Bangers',Impact,sans-serif;letter-spacing:.04em;color:#141414;background:#2EE6A6;border:3px solid #141414;border-radius:999px;box-shadow:3px 3px 0 #141414;cursor:pointer;flex:none;white-space:nowrap;-webkit-text-stroke:0;text-shadow:none;transition:transform 120ms ease-out,box-shadow 120ms ease-out}
.share svg{width:20px;height:20px;flex:none;display:block}
.share:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 #141414}
.share:active{transform:translate(2px,2px);box-shadow:1px 1px 0 #141414}
.share:focus-visible{outline:3px solid #2F6BFF;outline-offset:3px}
@media (max-width:399.98px){
  .share{padding:0;width:44px}
  .share .share-lbl{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}
.share-toast{position:fixed;left:50%;bottom:24px;bottom:calc(24px + env(safe-area-inset-bottom));z-index:999;max-width:calc(100vw - 32px);transform:translate(-50%,16px);opacity:0;visibility:hidden;pointer-events:none;font:800 16px/1.2 'Nunito',system-ui,sans-serif;color:#FFFBF0;background:#141414;border:3px solid #FFFBF0;border-radius:999px;padding:10px 18px;box-shadow:4px 4px 0 #FF3B30;text-align:center;transition:opacity 180ms ease-out,transform 180ms ease-out,visibility 0s linear 180ms}
.share-toast.on{opacity:1;visibility:visible;transform:translate(-50%,0);transition:opacity 180ms ease-out,transform 180ms ease-out,visibility 0s}
/* The execCommand('copy') fallback needs a real, selectable textarea. */
.share-ta{position:fixed;top:0;left:-9999px;width:1px;height:1px;opacity:0}
@media (prefers-reduced-motion:reduce){
  .share,.share-toast,.share-toast.on{transition:none}
  .share:hover,.share:active{transform:none}
  .share-toast{transform:translate(-50%,0)}
}
html.reduce-motion .share,html.reduce-motion .share-toast,html.reduce-motion .share-toast.on{transition:none}
html.reduce-motion .share:hover,html.reduce-motion .share:active{transform:none}
html.reduce-motion .share-toast{transform:translate(-50%,0)}

/* Amanda's note (a): below 400px the game pages show only the game name
   ("MINRÖJ"), not "AMANDA" above it, so the logo is never cut off. */
@media (max-width:399.98px){
  header:has(#back){gap:6px}
  header #back{padding:0;width:44px}
  header .logo.logo-g{font-size:0;min-width:0;flex:1 1 auto;align-items:center}
  header .logo.logo-g span{font-size:20px;margin-top:0;line-height:1}
  /* Sten, sax, påse has no "AMANDA" line; its long name wraps instead. */
  header #back + .logo:not(.logo-g){white-space:normal;font-size:18px;line-height:1;min-width:0;flex:1 1 0}
}
/* Amanda's note (b): the portal logo link is a 44px+ target. */
header a.logo{min-height:44px;min-width:44px;display:inline-flex;flex-direction:column;justify-content:center}
/* Dice game (/10000/): it has no shared header, so the button sits on the
   setup card, left of the SV/EN pill that used to be pinned there alone. */
.setup-tools{position:absolute;top:16px;left:16px;display:flex;align-items:center;gap:8px;z-index:2}
.setup-tools .setup-lang{position:static}
/* 320: "MINESWEEPER" is the longest game name; 18px keeps it whole. */
@media (max-width:359.98px){header .logo.logo-g span{font-size:18px}}
/* r2: the dice game also gets the button mid-game and on the win screen.
   Phone and desktop: in the turn-points row, next to the SV/EN pill; it is
   icon-only on phones (<=640px) like the rules button beside it. Tablets:
   in the top strip, where the row's rules and SV/EN buttons live too. */
.scoreline .share{flex:none}
@media (max-width:640px){
  .scoreline .share{padding:0;width:44px}
  .scoreline .share .share-lbl{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}
.t-actions button.share{padding:0 14px;font:400 18px/1 'Bangers',Impact,sans-serif;letter-spacing:.04em;color:#141414;background:#2EE6A6;border-radius:999px;box-shadow:3px 3px 0 #141414}
@media (min-width:641px) and (max-width:1024px), (min-width:641px) and (max-width:1194px) and (orientation:landscape) and (max-height:920px){
  .scoreline .share{display:none}
}
.win-actions .share{align-self:center}
/* With the share button in the row, 361-440px phones no longer fit both
   language halves (the turn-points box wrapped and pushed the board below
   the fold); show only the language you can switch to, as <=360 already does. */
@media (min-width:361px) and (max-width:440px){
  .scoreline .game-lang button[aria-pressed="true"]{display:none}
  .scoreline .game-lang button+button{border-left:0}
}
@media (min-width:361px) and (max-width:389px){
  .scoreline{gap:4px}
  .scoreline .tp{padding-left:10px;padding-right:10px}
}
