/* ============================================================
   67420 – spillernes egne kortpakker (pakker.php) · v0.43.0
   ============================================================ */
.upk-body { overscroll-behavior: auto; }
html.upk-noscroll, html.upk-noscroll body { overflow: hidden; }
#app.upk-app { padding-bottom: calc(40px + var(--safe-b)); } /* (v0.74.65: #app's egen padding satte bunden til 0 – den sidste pakke lå helt nede ved kanten og under iPhones hjem-linje) */
.upk-app main { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.upk-toast { z-index: 9999; }
.upk-top-a { color: var(--cyan); font-weight: 800; text-decoration: none; font-size: 15px; }
.upk-hero h1 { margin: 6px 0 4px; font-size: 26px; font-weight: 900; }
.upk-hero p { margin: 0; color: var(--muted); font-size: 15px; }
.upk-h { font-size: 12px; font-weight: 800; color: #c4a6ff; letter-spacing: .6px; text-transform: uppercase; margin: 10px 2px 0; }
.upk-empty { color: var(--muted); text-align: center; padding: 22px 10px; font-size: 15px; }
.upk-empty.big { font-size: 18px; padding: 40px 10px; }
.upk-note { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: #d6d6f0; }
.upk-mini-note { font-size: 13px; color: var(--muted); }
.upk-mini-note.center { text-align: center; }
.upk-mini-note a { color: var(--cyan); }
.upk-row { display: flex; gap: 8px; align-items: center; }
.upk-row .text-input { flex: 1; min-width: 0; margin: 0; font-size: 15px; padding: 10px 12px; text-align: left; }
.upk-l { display: block; font-size: 13px; font-weight: 800; color: var(--muted); margin: 6px 2px -4px; }
.upk-l small { font-weight: 600; opacity: .8; }
.upk-l.sm { font-size: 12px; margin-top: 2px; }
.upk-in, .upk-search { text-align: left !important; font-size: 16px; padding: 11px 12px; width: 100%; }
.upk-in.sm { font-size: 15px; padding: 9px 11px; }
.upk-ta { resize: vertical; font-family: inherit; line-height: 1.35; }

/* Faner */
.upk-seg { display: flex; background: var(--bg2); border-radius: 14px; padding: 4px; gap: 4px; }
.upk-seg button { flex: 1; border: 0; background: none; color: var(--muted); font-weight: 800; font-size: 15px; padding: 10px 6px; border-radius: 10px; cursor: pointer; }
.upk-seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.upk-seg.small button { font-size: 13px; padding: 8px 4px; }
.upk-search { text-align: left; font-size: 16px; padding: 10px 12px; margin: 0; }
.upk-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
/* v0.49.5: kategorierne i browseren – luft over, aldrig to linjer, og tydeligt at man kan scrolle (glider ud til kanten + toning) */
#homeBody > .upk-search { margin-top: 14px; }
#homeBody > .upk-cats { margin: 12px -16px 4px; padding: 4px 16px 6px; scroll-padding-inline: 16px; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, transparent var(--el, 0px), #000 calc(var(--el, 0px) + var(--fl, 0px)), #000 calc(100% - 16px - var(--fr, 44px)), transparent calc(100% - 16px));
          mask-image: linear-gradient(90deg, transparent 0, transparent var(--el, 0px), #000 calc(var(--el, 0px) + var(--fl, 0px)), #000 calc(100% - 16px - var(--fr, 44px)), transparent calc(100% - 16px)); }
#homeBody > .upk-cats button { white-space: nowrap; scroll-snap-align: start; }
#homeBody > .upk-cats.at-end { --fr: 0px; } /* (helt ude til højre: ingen toning) */
#homeBody > .upk-cats.scrolled { --el: 16px; --fl: 32px; } /* (toningen er væk ved søgefeltets kanter – v0.49.6) */

.upk-cats::-webkit-scrollbar { display: none; }
.upk-cats.wrap { flex-wrap: wrap; overflow: visible; }
.upk-cats button, .upk-reasons button { flex: none; border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.upk-cats button.on, .upk-reasons button.on { background: var(--pink); border-color: var(--pink); color: #fff; }
.upk-reasons { display: flex; flex-wrap: wrap; gap: 6px; }

/* Pakke-rækker */
.upk-prow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; color: var(--text); cursor: pointer; margin-top: 8px; }
.upk-prow:active { transform: scale(.99); }
.upk-pic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; }
.upk-pic.big { width: 64px; height: 64px; font-size: 36px; border-radius: 18px; }
.upk-pt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.upk-pt b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upk-pt small { color: var(--muted); font-size: 13px; }
.upk-stats { display: block; color: #c4a6ff; font-weight: 700; font-size: 12px; margin-top: 1px; }
.upk-chev { color: var(--muted); font-size: 22px; }
.upk-more { margin-top: 8px; }
.upk-more summary { color: var(--cyan); font-weight: 700; font-size: 14px; cursor: pointer; padding: 6px 2px; }
.upk-more .upk-row { margin-top: 6px; }

/* Én pakke */
.upk-phead { display: flex; align-items: center; gap: 12px; }
.upk-pinfo { flex: 1; min-width: 0; }
.upk-pinfo h1 { margin: 0; font-size: 24px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.upk-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.upk-gear { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); font-size: 20px; cursor: pointer; }
.upk-desc { font-size: 15px; color: #d6d6f0; }
.upk-actions { display: flex; gap: 8px; }
.upk-actions .btn { padding: 13px 10px; font-size: 16px; }
.upk-vote { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.upk-vote button { border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 999px; padding: 7px 14px; font-size: 15px; cursor: pointer; }
.upk-vote button.on { background: rgba(82, 214, 0, .2); border-color: #52d600; }
.upk-vote button.on.down { background: rgba(255, 77, 94, .2); border-color: var(--red); }
.upk-vote span { flex: 1; }
.upk-report { border: 0 !important; background: none !important; font-size: 18px !important; padding: 4px 6px !important; opacity: .7; cursor: pointer; }
.upk-report.sm { font-size: 14px !important; }
.upk-collab { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.upk-here small { color: var(--muted); }
.upk-chip { display: inline-block; background: rgba(25, 227, 255, .15); color: var(--cyan); border-radius: 999px; padding: 2px 9px; font-weight: 800; font-size: 13px; margin-right: 4px; }
.upk-act { font-size: 12px; color: #c6c6e4; display: flex; flex-direction: column; gap: 1px; }
.upk-act small { color: var(--muted); }
.upk-addrow { display: flex; gap: 8px; }
.upk-addrow .btn-primary { flex: 1.4; padding: 14px 10px; font-size: 17px; }
.upk-addrow .upk-std { flex: 1; padding: 12px 8px; font-size: 14px; }
.upk-pubhint { border: 1px dashed var(--pink); background: rgba(255, 45, 149, .08); color: var(--text); border-radius: 12px; padding: 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.upk-cards { display: flex; flex-direction: column; gap: 10px; }
.upk-card { border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.upk-card.locked { opacity: .65; }
.upk-cbody { padding: 12px 14px; cursor: pointer; }
.upk-ctype { font-size: 12px; font-weight: 900; letter-spacing: .8px; opacity: .9; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.upk-cmech { font-weight: 700; letter-spacing: 0; background: rgba(0,0,0,.22); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.upk-ctext { font-size: 16px; font-weight: 600; margin-top: 4px; line-height: 1.35; }
.upk-cfoot { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; font-size: 13px; }
.upk-by { flex: 1; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upk-cfoot button { border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.upk-like.on { border-color: var(--pink); }

/* Sheets */
.upk-sheet .sheet { gap: 9px; }
.upk-emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.upk-emojis button { aspect-ratio: 1; border: 2px solid transparent; background: var(--bg2); border-radius: 10px; font-size: 21px; cursor: pointer; padding: 0; }
.upk-emojis button.on { border-color: var(--pink); background: rgba(255, 45, 149, .15); }
.upk-colors { display: flex; gap: 8px; }
.upk-colors button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.upk-colors button.on { border-color: #fff; }
.upk-share { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.upk-share.edit { border-color: rgba(255, 45, 149, .5); }
.upk-share small { color: var(--muted); font-size: 13px; }
.upk-link { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #0b0b14; border-radius: 8px; padding: 8px; overflow-wrap: anywhere; user-select: all; }
.upk-danger { color: var(--red) !important; border-color: rgba(255, 77, 94, .4) !important; }
.upk-rules { background: var(--bg2); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.upk-rules ul { margin: 6px 0; padding-left: 18px; color: #d6d6f0; }
.upk-rules small { color: var(--muted); display: block; margin-top: 4px; }
.upk-check { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; margin-top: 6px; }
.upk-check input { width: 20px; height: 20px; accent-color: var(--pink); }
.upk-quote { background: var(--bg2); border-left: 3px solid var(--pink); padding: 8px 10px; border-radius: 8px; font-size: 14px; }

/* Byggeren */
.upk-tpls, .upk-mechs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.upk-tpls button, .upk-mechs button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; color: var(--text); cursor: pointer; }
.upk-tpls button span, .upk-mechs button span { font-size: 24px; }
.upk-tpls button b, .upk-mechs button b { font-size: 15px; }
.upk-tpls button small, .upk-mechs button small { font-size: 12px; color: var(--muted); line-height: 1.25; }
.upk-mechs button.on { border-color: var(--pink); background: rgba(255, 45, 149, .12); }
.upk-prev .card67 { min-height: 0; padding: 14px 14px; gap: 6px; border-radius: 16px; box-shadow: none; }
.upk-prev .card67-title { font-size: 18px; }
.upk-prev .card67-text { font-size: 16px; }
.upk-fakebtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.upk-fakebtn { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px; font-size: 13px; font-weight: 700; }
.upk-fakebtn.timer { border-color: var(--yellow); color: var(--yellow); }
.upk-edtext { font-size: 17px; min-height: 84px; text-align: left; }
.upk-tools { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.upk-tools span { margin: 0 2px 0 4px; }
.upk-tools button { border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 9px; padding: 6px 9px; font-size: 14px; font-weight: 800; cursor: pointer; }
.upk-morebtn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); font-weight: 800; font-size: 15px; cursor: pointer; }
.upk-morebtn small { flex: 1; font-weight: 600; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upk-morebtn span { transition: transform .2s; color: var(--muted); }
.upk-morebtn.open span { transform: rotate(90deg); }
.upk-more-body { display: flex; flex-direction: column; gap: 8px; border-left: 2px solid var(--line); padding-left: 10px; }
.upk-types { display: flex; flex-wrap: wrap; gap: 5px; }
.upk-types button { border: 2px solid transparent; background: var(--bg2); color: var(--text); border-radius: 999px; padding: 6px 10px 6px 8px; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.upk-types button::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--tc); flex: none; }
.upk-types button.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 25%, var(--bg2)); }
.upk-mechbtn { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--text); cursor: pointer; }
.upk-mechbtn span { grid-row: span 2; font-size: 26px; }
.upk-mechbtn small { color: var(--muted); font-size: 12px; grid-column: 2; }
.upk-mechbtn i { grid-row: 1 / span 2; grid-column: 3; font-style: normal; color: var(--cyan); font-weight: 800; font-size: 13px; }
.upk-fields { display: flex; flex-direction: column; gap: 4px; background: var(--bg2); border-radius: 12px; padding: 8px 10px; }
.upk-seg2 { display: flex; flex-wrap: wrap; gap: 5px; }
.upk-seg2 button { border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 9px; padding: 6px 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.upk-seg2 button.on { background: var(--yellow); color: #1a1400; border-color: var(--yellow); }
.upk-edfoot { display: flex; gap: 8px; position: sticky; bottom: -18px; background: #12121d; padding: 8px 0 4px; margin-top: 4px; }
.upk-edfoot .upk-danger { width: auto; padding: 14px 16px; }
.upk-edfoot .btn-primary { flex: 1; }
.upk-stdc { display: flex; gap: 10px; text-align: left; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; color: var(--text); cursor: pointer; margin-top: 6px; font-size: 14px; }
.upk-stdc i { flex: none; width: 6px; border-radius: 3px; }
.upk-stdc small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ✍️ v0.43.1: kort fra draft-spil */
.upk-draftbtn { display: grid; grid-template-columns: 1fr auto; text-align: left; width: 100%; background: linear-gradient(135deg, rgba(157, 92, 255, .22), rgba(157, 92, 255, .08)); border: 1px solid rgba(157, 92, 255, .55); border-radius: 14px; padding: 10px 14px; color: var(--text); cursor: pointer; font-size: 15px; margin-top: 8px; }
.upk-draftbtn small { grid-column: 1; color: var(--muted); font-size: 13px; }
.upk-draftbtn span { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--muted); font-size: 22px; }
.upk-drg { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.upk-drh { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; margin-top: 4px; }
.upk-drh small { grid-column: 1; color: var(--muted); font-size: 12px; }
.upk-drh button { grid-row: 1 / span 2; grid-column: 2; border: 1px solid var(--line); background: var(--bg2); color: var(--cyan); border-radius: 9px; padding: 6px 10px; font-weight: 800; font-size: 13px; cursor: pointer; }
.upk-drc { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 9px 10px; cursor: pointer; font-size: 14px; }
.upk-drc.on { border-color: var(--pink); background: rgba(255, 45, 149, .1); }
.upk-drc.has { opacity: .5; cursor: default; }
.upk-drc i { flex: none; width: 6px; align-self: stretch; border-radius: 3px; }
.upk-drc span { flex: 1; min-width: 0; }
.upk-drc small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.upk-drx { flex: none; border: 1px solid var(--line); background: var(--bg2); border-radius: 9px; padding: 5px 8px; cursor: pointer; font-size: 14px; }
.upk-drbox { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 14px; color: #fff; }
.upk-drc.on .upk-drbox { background: var(--pink); border-color: var(--pink); }

/* 🃏 v0.44: Kortpakker-forsiden (3 valg) og officielle pakker */
.upk-hub { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.upk-hubbtn { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; text-align: left; border: 0; border-radius: 20px; padding: 18px 16px; color: #fff; cursor: pointer; box-shadow: 0 8px 26px rgba(0,0,0,.35); }
.upk-hubbtn:active { transform: scale(.98); }
.upk-hubbtn span { grid-row: span 2; font-size: 38px; align-self: center; }
.upk-hubbtn b { font-size: 20px; font-weight: 900; }
.upk-hubbtn small { font-size: 14px; opacity: .85; }
.upk-hubbtn.official { background: linear-gradient(135deg, #1e8bff, #19c3ff); color: #04121a; }
.upk-hubbtn.browse { background: linear-gradient(135deg, #9d5cff, #6a3df0); }
.upk-hubbtn.mine { background: linear-gradient(135deg, var(--pink), #c3129f); }
.upk-h small { text-transform: none; letter-spacing: 0; color: #6c6c90; font-weight: 600; }
.upk-off { background: var(--panel); border: 2px solid var(--line); border-radius: 16px; margin-top: 8px; overflow: hidden; }
.upk-off.on { border-color: var(--cyan); }
.upk-offt { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 12px; cursor: pointer; }
.upk-offt .ic { font-size: 28px; flex: none; }
.upk-offt .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.upk-offt .t b { font-size: 16px; }
.upk-offt .t small { color: var(--muted); font-size: 13px; }
.upk-offt .t i { font-style: normal; color: var(--cyan); font-size: 12px; font-weight: 800; margin-top: 2px; }
.upk-offt .t em { font-style: normal; color: var(--red); font-size: 12px; font-weight: 700; }
.upk-offt .sw { flex: none; width: 46px; height: 28px; border-radius: 999px; background: #2c2c4a; position: relative; transition: background .2s; }
.upk-offt .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.upk-off.on .sw { background: var(--cyan); }
.upk-off.on .sw::after { transform: translateX(18px); }
.upk-offsee { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: var(--cyan); font-weight: 800; font-size: 13px; padding: 8px; cursor: pointer; }
.upk-offcards { max-height: 340px; overflow-y: auto; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 5px; }
.upk-offc { display: flex; gap: 8px; font-size: 13px; background: var(--bg2); border-radius: 9px; padding: 7px 9px; }
.upk-offc i { flex: none; width: 5px; border-radius: 3px; }
.upk-offseg { flex: 1; min-width: 0; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.upk-offseg span { font-size: 12px; opacity: .7; margin-left: 2px; }

.upk-offseg + .upk-note { margin-top: 12px; }

/* ============================================================
   ✨ v0.44.3: animationer
   ============================================================ */
:root { --upk-spring: cubic-bezier(.34, 1.4, .5, 1); --upk-ease: cubic-bezier(.2, .8, .2, 1); }
@keyframes upkUp { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes upkPop { 0% { transform: scale(1); } 40% { transform: scale(.94); } 100% { transform: scale(1); } } /* v0.44.13: trykkes ind – hopper aldrig ud mod en */
@keyframes upkShake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes upkView { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes upkExpand { from { max-height: 0; opacity: 0; } to { max-height: 340px; opacity: 1; } }
@keyframes upkExpand2 { from { max-height: 0; opacity: 0; transform: translateY(-6px); } to { max-height: 1600px; opacity: 1; transform: none; } }
@keyframes upkNew { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 149, .9); transform: scale(.96); } 40% { box-shadow: 0 0 0 6px rgba(255, 45, 149, .45); transform: scale(1.01); } 100% { box-shadow: 0 0 0 14px rgba(255, 45, 149, 0); transform: none; } }
@keyframes upkFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes upkSheetOut { to { transform: translateY(100%); } }
@keyframes upkFadeOut { to { opacity: 0; } }
@keyframes upkToast { 0% { opacity: 0; transform: translate(-50%, -24px) scale(.9); } 70% { transform: translate(-50%, 3px) scale(1.02); } 100% { opacity: 1; transform: translate(-50%, 0); } }
@keyframes upkStep { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes upkTick { 0% { transform: scale(.6); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }

.upk-st { animation: upkUp .42s var(--upk-ease) both; animation-delay: calc(var(--k, 0) * var(--ks, 40ms)); }
.upk-pop { animation: upkPop .38s var(--upk-ease); }
.upk-shake { animation: upkShake .4s ease; }
.upk-viewin { animation: upkView .32s var(--upk-ease); }
.upk-newc { animation: upkNew .9s ease-out; }
.upk-stepin { animation: upkStep .3s var(--upk-ease); }
.upk-out { opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; }
#blist, #offList { transition: opacity .2s, transform .2s; }
.upk-toast { animation: upkToast .38s var(--upk-ease); }

/* Skyderen: en pille glider hen til det valgte */
.upk-seg { position: relative; }
.upk-seg .upk-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px - (var(--n) - 1) * 4px) / var(--n)); border-radius: 10px; background: var(--panel); box-shadow: 0 2px 12px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.06);
  transform: translateX(calc(var(--i) * (100% + 4px))); transition: transform .38s cubic-bezier(.3, 1.15, .5, 1); pointer-events: none; }
.upk-seg button { position: relative; z-index: 1; transition: color .25s; }
.upk-seg button.on { background: none !important; box-shadow: none !important; }
.upk-seg button:active { transform: scale(.96); }

/* Kontakter */
.upk-offt .sw { transition: background .3s ease, box-shadow .3s; }
.upk-offt .sw::after { transition: transform .38s var(--upk-spring), width .2s; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.upk-offt:active .sw::after { width: 27px; }
.upk-off.on .upk-offt:active .sw::after { transform: translateX(13px); }
.upk-off.on .sw { box-shadow: 0 0 14px rgba(25, 227, 255, .45); }
.upk-off { transition: border-color .3s, box-shadow .3s; }
.upk-off.on { box-shadow: 0 0 0 1px rgba(25, 227, 255, .15), 0 6px 20px rgba(25, 227, 255, .08); }
.upk-offt .ic { transition: transform .3s var(--upk-spring), filter .3s; }
.upk-off:not(.on) .upk-offt .ic { filter: grayscale(.7); opacity: .7; transform: scale(.92); }
.upk-offsee b { display: inline-block; transition: transform .3s var(--upk-ease); }
.upk-offsee.open b { transform: rotate(90deg); }
.upk-offcards.upk-expand { animation: upkExpand .35s var(--upk-ease) both; overflow: hidden; }
.upk-offcards.upk-collapse { max-height: 0 !important; opacity: 0; transition: max-height .25s ease, opacity .2s; overflow: hidden; }

/* Tryk: alt, man kan trykke på, giver lidt efter */
.upk-prow, .upk-hubbtn, .upk-tpls button, .upk-mechs button, .upk-card .upk-cbody, .upk-drc, .upk-stdc, .upk-draftbtn, .upk-cats button, .upk-types button, .upk-seg2 button,
.upk-tools button, .upk-vote button, .upk-cfoot button, .upk-mechbtn, .upk-morebtn, .upk-gear, .upk-emojis button, .upk-colors button, .upk-reasons button, .upk-offt {
  transition: transform .15s var(--upk-ease), background .25s, border-color .25s, color .25s, box-shadow .25s; }
.upk-prow:active, .upk-tpls button:active, .upk-mechs button:active, .upk-drc:active, .upk-stdc:active, .upk-draftbtn:active, .upk-mechbtn:active, .upk-morebtn:active { transform: scale(.97); }
.upk-cats button:active, .upk-types button:active, .upk-seg2 button:active, .upk-tools button:active, .upk-vote button:active, .upk-cfoot button:active, .upk-emojis button:active, .upk-colors button:active, .upk-reasons button:active, .upk-gear:active { transform: scale(.9); }
.upk-card .upk-cbody:active { transform: scale(.985); }
.upk-offt:active { transform: scale(.99); }
.upk-gear:hover { transform: rotate(40deg); }
.upk-chev { transition: transform .2s; }
.upk-prow:hover .upk-chev { transform: translateX(3px); }
.upk-emojis button.on, .upk-colors button.on { animation: upkPop .35s var(--upk-ease); }
.upk-colors button.on { box-shadow: 0 0 0 2px #fff; }

/* Kort, valg og flueben */
.upk-card { transition: opacity .3s, transform .3s; }
.upk-card.locked { transform: scale(.985); }
.upk-like.on { animation: upkPop .4s var(--upk-ease); }
.upk-drc.on .upk-drbox { animation: upkTick .32s var(--upk-ease); }
.upk-drbox { transition: background .2s, border-color .2s; }
.upk-morebtn span { transition: transform .3s var(--upk-spring); }
.upk-more-body.upk-expand2 { animation: upkExpand2 .45s var(--upk-ease) both; overflow: hidden; }
.upk-prev .card67 { transition: background .35s ease, color .35s ease; }
.upk-fakebtn { animation: upkUp .3s var(--upk-ease) both; }
.upk-chip { animation: upkPop .4s var(--upk-ease); }
.upk-pubhint { animation: upkGlow 2.4s ease-in-out infinite; }
@keyframes upkGlow { 0%, 100% { box-shadow: 0 0 0 rgba(255, 45, 149, 0); } 50% { box-shadow: 0 0 18px rgba(255, 45, 149, .35); } }

/* Sheets: baggrunden toner ind, og arket glider ned igen, når det lukkes */
.upk-sheet { animation: upkFadeIn .22s ease; }
.upk-closing { animation: upkFadeOut .23s ease forwards; pointer-events: none; }
.upk-closing .sheet { animation: upkSheetOut .23s cubic-bezier(.4, 0, 1, 1) forwards; }

/* Kortpakker-forsiden */
.upk-hubbtn { position: relative; overflow: hidden; }
.upk-hubbtn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%); transform: translateX(-120%); animation: upkShine 4.5s ease-in-out infinite; animation-delay: calc(var(--k, 0) * .5s + 1s); }
@keyframes upkShine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.upk-hubbtn span { transition: transform .3s var(--upk-spring); }


@media (prefers-reduced-motion: reduce) {
  .upk-app *, .upk-sheet, .upk-sheet *, .upk-toast { animation: none !important; transition: none !important; }
}
/* ‹ Tilbage (v0.44.4: diskret – bare tekst) */
.upk-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); padding: 4px 6px 4px 0; margin-bottom: -6px; font-weight: 700; font-size: 14px; cursor: pointer; transition: color .2s, transform .15s var(--upk-ease); }
.upk-back span { font-size: 20px; line-height: 1; margin-top: -2px; transition: transform .2s var(--upk-ease); }
.upk-back:hover { color: var(--text); }
.upk-back:hover span { transform: translateX(-3px); }
.upk-back:active { transform: scale(.95); }
/* v0.44.5: antal kort + ⚠️-mærke på én linje, mærket som en lille pille */
.upk-offt .t .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.upk-offt .t .meta i { margin-top: 0; }
.upk-offt .t .meta em { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 77, 94, .14); border: 1px solid rgba(255, 77, 94, .35); color: #ff7b88; border-radius: 999px; padding: 2px 8px 2px 6px; font-size: 11px; font-weight: 800; letter-spacing: .4px; line-height: 1.4; }
/* ⭐ v0.44.14: installerede community-pakker */
.upk-offt .upk-pic { width: 42px; height: 42px; font-size: 22px; border-radius: 12px; }
.upk-offbtns { display: flex; border-top: 1px solid var(--line); }
.upk-offbtns .upk-offsee { border-top: 0; flex: 1; }
.upk-offbtns .upk-offrm { flex: none; width: 90px; color: var(--muted); border-left: 1px solid var(--line); }
.upk-copybtn { padding: 11px; font-size: 15px; }
.upk-inst.on { color: var(--lime); border-color: rgba(182, 255, 59, .4); }
.upk-offseg button { white-space: nowrap; font-size: 14px; padding: 10px 2px; }


/* v0.45.5: "Vis alle" er en lille rund knap til højre for skyderen (alle 3 faner) */
.upk-offtop { position: sticky; top: 6px; z-index: 5; display: flex; gap: 6px; align-items: stretch; }
.upk-offtop + #offList, .upk-allchk + #offList { margin-top: 6px; }
/* ☑ v0.74.48: "Alle pakker (3 af 8 valgt)" – halvt udfyldt (▣), når kun nogle er valgt */
.upk-allchk { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 14px; font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.upk-allchk[hidden] { display: none; }
.upk-allchk b { font-weight: 800; }
.upk-allchk small { color: var(--muted); font-weight: 700; font-size: 13px; }
.upk-allchk .bx { position: relative; flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--muted); transition: background .18s, border-color .18s; }
.upk-allchk.all .bx { background: var(--pink); border-color: var(--pink); }
.upk-allchk.some .bx { border-color: var(--pink); }
.upk-allchk.all .bx::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.upk-allchk.some .bx::after { content: ""; position: absolute; inset: 3px; border-radius: 3px; background: var(--pink); } /* (▣ halvt udfyldt) */
.upk-offreset { flex: none; padding: 0 11px; white-space: nowrap; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); border-radius: 12px; font-size: 13px; font-weight: 800; cursor: pointer; transition: color .2s, transform .15s var(--upk-ease); }
.upk-offreset:hover { color: var(--text); } .upk-offreset:active { transform: scale(.94); }
@media (max-width: 439px) { .upk-offseg span { display: none; } }
@media (max-width: 389px) { .upk-offseg button { font-size: 13px; } }

/* v0.46: vælg selv ikon (alle emojis) og farvehjul */
.upk-emojis .upk-emore { font-size: 20px; font-weight: 800; color: var(--muted); border: 2px dashed var(--line); background: none; }
.upk-emojis .upk-emore.on { border: 2px solid var(--pink); background: rgba(255, 45, 149, .15); color: var(--text); }
.upk-wheel { position: relative; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; flex: none; border: 3px solid transparent;
  background: conic-gradient(from 0deg, #ff2d2d, #ffd23f, #2fd36b, #19e3ff, #1e8bff, #9d5cff, #ff2d95, #ff2d2d); transition: transform .15s; }
.upk-wheel::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--cw, transparent); box-shadow: 0 0 0 2px rgba(0,0,0,.25); opacity: 0; transition: opacity .2s; }
.upk-wheel.on { border-color: #fff; } .upk-wheel.on::after { opacity: 1; }
.upk-wheel:active { transform: scale(.92); }
.upk-wheel input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.upk-emoin { font-size: 18px; }
.upk-emocats { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: var(--bg2); border-radius: 12px; padding: 4px; }
.upk-emocats::-webkit-scrollbar { display: none; }
.upk-emocats button { flex: 1 0 auto; min-width: 38px; border: 0; background: none; font-size: 20px; padding: 6px; border-radius: 9px; cursor: pointer; opacity: .55; transition: opacity .2s, background .2s; }
.upk-emocats button.on { background: var(--panel); opacity: 1; }
.upk-emogrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 46vh; overflow-y: auto; }
.upk-emogrid button { aspect-ratio: 1; border: 0; background: none; font-size: 26px; border-radius: 10px; cursor: pointer; padding: 0; transition: background .15s, transform .12s; }
.upk-emogrid button:hover { background: var(--bg2); } .upk-emogrid button:active { transform: scale(.9); }
/* 👥 bygge-kode */
.upk-bigcode { font-size: 48px; font-weight: 900; letter-spacing: 6px; text-align: center; color: var(--yellow); font-variant-numeric: tabular-nums; padding: 10px 0 2px; cursor: pointer; }
.upk-joincode { font-size: 34px !important; font-weight: 900; letter-spacing: 6px; text-align: center !important; font-variant-numeric: tabular-nums; }
.upk-here2 { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.upk-here2:empty { display: none; }
.upk-addrow.eq .btn { flex: 1; padding: 14px 8px; font-size: 16px; }
/* v0.46.1: bygge-koden står på pakkesiden · Udgiv ude på siden · ✕ i Mine pakker */
.upk-codebar { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 1px dashed rgba(255, 210, 63, .45); background: rgba(255, 210, 63, .06); border-radius: 14px; padding: 8px 14px; color: var(--text); cursor: pointer; transition: transform .15s var(--upk-ease), background .2s; }
.upk-codebar span { font-size: 14px; font-weight: 800; color: var(--muted); }
.upk-codebar b { font-size: 26px; font-weight: 900; letter-spacing: 4px; color: var(--yellow); font-variant-numeric: tabular-nums; }
.upk-codebar:active { transform: scale(.98); }
.upk-actions .btn small { font-size: 12px; opacity: .8; }
.upk-actions .btn:disabled { opacity: .45; }
.upk-pubon { color: var(--lime) !important; border-color: rgba(182, 255, 59, .4) !important; }
.upk-prw { position: relative; }
.upk-prw .upk-prow { padding-right: 46px; }
.upk-prx { position: absolute; right: 8px; top: 50%; margin-top: -2px; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--bg2); color: var(--muted); font-size: 13px; cursor: pointer; }
.upk-prw .upk-chev { display: none; }
/* v0.46.4: ret navn og beskrivelse direkte på siden · Udgiv under 5 kort · Byg selv */
.upk-editable { cursor: text; border-radius: 8px; transition: background .2s; }
.upk-editable:hover { background: rgba(255,255,255,.04); }
h1.upk-editable::after { content: ' ✏️'; font-size: 14px; opacity: .35; }
.upk-desc.upk-editable { padding: 2px 4px; margin: -2px -4px; }
.upk-desc.empty { color: var(--muted); font-size: 14px; font-weight: 700; }
.upk-inl { margin: 0; font-size: inherit; font-weight: inherit; }
h1 .upk-inl { font-size: 22px; font-weight: 900; padding: 6px 10px; }
.upk-actions .btn[data-few] { opacity: .5; }
.upk-tpls button.custom { border-style: dashed; border-color: rgba(255, 45, 149, .5); } /* (v0.74.69: 🛠️ Byg selv – samme størrelse som de andre, sidst i gitteret) */
#cDraft { font-size: 14px; padding: 12px 6px; }
/* ✨ v0.47: kort-teksten med brikker (spiller / tåre / shot / bund) */
.upk-rich { min-height: 84px; text-align: left !important; font-size: 17px; line-height: 2; padding: 10px 12px; outline: none; white-space: pre-wrap; word-break: break-word; cursor: text; transition: border-color .2s, box-shadow .2s; }
.upk-rich.empty::before { content: attr(data-ph); color: var(--muted); pointer-events: none; }
.upk-rich:focus { border-color: var(--pink); }
.upk-rich.drop { border-style: dashed; }
.upk-rich.over { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(25, 227, 255, .2); }
.upk-tok { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 1px 9px; margin: 0 1px; font-size: 14px; font-weight: 800; line-height: 1.5; cursor: pointer; user-select: none; -webkit-user-select: none; white-space: nowrap; vertical-align: baseline; border: 1px solid transparent; transition: transform .15s var(--upk-ease), background .2s; }
.upk-tok.k-p { background: rgba(157, 92, 255, .25); color: #d9c4ff; border-color: rgba(157, 92, 255, .5); }
.upk-tok.k-t { background: rgba(255, 210, 63, .18); color: #ffe27a; border-color: rgba(255, 210, 63, .45); }
.upk-tok.k-s { background: rgba(255, 77, 94, .18); color: #ff9aa6; border-color: rgba(255, 77, 94, .45); }
.upk-tok.k-b { background: rgba(255, 138, 43, .18); color: #ffbe8a; border-color: rgba(255, 138, 43, .45); }
.upk-tok:active { transform: scale(.94); }
@keyframes upkTokIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.upk-tokin { animation: upkTokIn .25s var(--upk-ease); }
.upk-tools { gap: 6px; flex-wrap: nowrap; }
.upk-tooltok { font-size: 14px !important; padding: 6px 11px !important; border-radius: 999px !important; touch-action: none; }
.upk-tokghost { position: fixed; z-index: 10000; pointer-events: none; transform: translate(-50%, -130%) scale(1.05); box-shadow: 0 8px 24px rgba(0,0,0,.5); border-radius: 999px; padding: 7px 13px; font-weight: 800; font-size: 15px; }
.upk-tokghost.k-p, .upk-tokghost { background: #3a2a63; color: #fff; }
.upk-tokmenu { position: absolute; z-index: 20; background: #1f1f36; border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 6px; animation: upkUp .2s var(--upk-ease); max-width: 300px; }
.upk-tmk, .upk-tmo { display: flex; flex-wrap: wrap; gap: 4px; }
.upk-tokmenu button { border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 9px; padding: 6px 10px; font-weight: 800; font-size: 13px; cursor: pointer; }
.upk-tokmenu button.on { background: var(--pink); border-color: var(--pink); }
.upk-tmx { align-self: flex-end; }
.upk-sheet .sheet { position: relative; }
/* v0.47.1: spiller-brikkens menu – stor skyder 1·2·3 + ejefald ('s) */
.upk-tmp { min-width: 230px; }
.upk-tmrow { display: flex; gap: 6px; align-items: stretch; }
.upk-tmseg { flex: 1; }
.upk-tmseg button { font-size: 18px; padding: 8px 0; }
.upk-tokmenu .upk-tmseg button { border: 0; background: none; color: var(--muted); }
.upk-tokmenu .upk-tmseg button.on { background: none; color: var(--text); }
.upk-tmseg .upk-pill { background: var(--tmc, var(--purple)); transition: left .3s cubic-bezier(.3,1.15,.5,1), transform .3s cubic-bezier(.3,1.15,.5,1), background .25s; }
.upk-tokmenu .upk-tmseg button.on { color: var(--tmt, #fff); }
.upk-tokmenu .upk-tmpos { font-size: 18px; min-width: 52px; border-radius: 12px; }
.upk-tokmenu .upk-tmpos.on { background: var(--tmc); border-color: var(--tmc); color: var(--tmt); }
.upk-tmrow .upk-tmx { align-self: stretch; margin: 0; }
.upk-tmp { min-width: 270px; }
/* v0.47.2: samme menu for tåre/shot/bund – slags-skyder øverst, tåre = slider 1–10 */
.upk-tokmenu .upk-tmkind button { font-size: 13px; padding: 8px 2px; white-space: nowrap; }
.upk-tmsl { align-items: center; }
.upk-tmsl .lslider { --pink: var(--tmc); flex: 1; }
.upk-tmsl .lslider::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255,210,63,.45), 0 4px 10px #0008; }
.upk-tmv { min-width: 26px; text-align: center; font-size: 20px; font-weight: 900; color: var(--tmc); }
.upk-tokmenu .upk-tmtxt { flex: 1; color: var(--muted); }
@keyframes upkTmIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.upk-tmin { animation: upkTmIn .2s cubic-bezier(.2,.8,.2,1); }
/* v0.47.3: korttyper uden farveprik · knapper kan rettes · spiller-vælger */
.upk-types button::before { display: none; }
.upk-types button { padding: 6px 11px; }
.upk-fakebtn[data-fp] { cursor: pointer; transition: transform .12s, border-color .2s; }
.upk-fakebtn[data-fp]:active { transform: scale(.94); }
.upk-fakebtn[data-fp]:hover { border-color: var(--cyan); }
.upk-richsm { min-height: 0 !important; padding: 9px 12px !important; font-size: 15px !important; line-height: 1.6; }
.upk-richsm .upk-tok { font-size: 13px; }
.upk-frow { display: flex; gap: 6px; align-items: stretch; }
.upk-frow .upk-richsm { flex: 1; min-width: 0; }
.upk-fx { flex: none; width: 44px; border: 1px solid var(--line); background: var(--bg2); border-radius: 12px; cursor: pointer; font-size: 16px; }
.upk-fx:active, .upk-addopt:active { transform: scale(.94); }
.upk-addopt { margin-top: 8px; border: 1.5px dashed var(--line); background: none; color: var(--muted); border-radius: 12px; padding: 9px 14px; font-weight: 800; cursor: pointer; width: 100%; }
.upk-byseg { margin-bottom: 4px; }
.upk-tokmenu .upk-tmtx { font-size: 15px; min-width: 44px; color: var(--muted); }
/* v0.47.4/5: ▶️ Prøv kortet – spillets egen skærm (#screen-game/#gameMain) + en lille prøve-bjælke øverst */
.upk-edfoot .upk-trybtn { width: auto; flex: none; padding: 14px 16px; }
.upk-try { position: fixed; inset: 0; z-index: 9000; background: var(--bg); background-image: radial-gradient(ellipse at top, rgba(157, 92, 255, .14), transparent 55%); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.upk-trybar { flex: none; display: flex; gap: 8px; align-items: center; padding: max(8px, env(safe-area-inset-top)) 12px 6px; max-width: 560px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.upk-trybar .upk-tryme { flex: 1; min-width: 0; }
.upk-tryme button { font-size: 12px; white-space: nowrap; padding: 7px 2px; }
.upk-tryx { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-size: 16px; font-weight: 900; cursor: pointer; transition: transform .12s; }
.upk-tryx:active { transform: scale(.94); }
.upk-tryapp { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.upk-tryapp .topbar { padding-top: 4px; }
@keyframes upkTrySlide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.upk-tryslide { animation: upkTrySlide .35s cubic-bezier(.2,.8,.2,1); }
.upk-try.closing { animation: upkTryOut .22s ease forwards; }
@keyframes upkTryOut { to { transform: translateX(40px); opacity: 0; } }
.upk-try .game-main .card67 { animation: none; }
.upk-try .game-main .card67.upk-trycard { animation: cardIn .45s cubic-bezier(.2, .9, .3, 1.2); }
.upk-tryout > * { transition: opacity .2s, transform .2s; opacity: 0; transform: translateX(-30px); }
@media (prefers-reduced-motion: reduce) { .upk-tryslide, .upk-try.closing, .upk-trycard { animation: none; } }
/* v0.47.8: 🔗 kortets drik ↔ knappernes drik */
.upk-link { border: 1px solid var(--line); background: var(--bg2); border-radius: 999px; padding: 1px 8px; font-size: 13px; cursor: pointer; filter: grayscale(1); opacity: .55; transition: transform .12s, opacity .2s, filter .2s, border-color .2s; vertical-align: middle; margin-left: 4px; }
.upk-link.on { filter: none; opacity: 1; border-color: var(--cyan); background: rgba(25, 227, 255, .12); }
.upk-link:active { transform: scale(.94); }
.upk-tmacts { justify-content: flex-end; }
.upk-tokmenu .upk-link { font-size: 15px; padding: 0 9px; border-radius: 9px; margin: 0; }
.upk-tokmenu .upk-link.on { background: rgba(25, 227, 255, .14); border-color: var(--cyan); }
/* v0.47.10: brik-menuen uden tomrum – værdi og knapper på én række */
.upk-tmp { min-width: 0; width: max-content; max-width: min(330px, calc(100vw - 40px)); }
.upk-tokmenu .upk-tmrow > button { flex: none; min-width: 38px; padding: 0 9px; }
.upk-tokmenu .upk-tmrow .upk-tmseg { min-width: 120px; }
.upk-tokmenu .upk-tmsl .lslider { min-width: 100px; }
.upk-tokmenu .upk-tmkind { min-width: 250px; }
.upk-tokmenu .upk-tmsl > button { height: 38px; }
#upkTry .secret-note { top: 58px; }
/* v0.48: regler (karakter → drik), pladser og nægt-knap i kort-editoren */
.upk-rules { display: flex; flex-direction: column; gap: 6px; }
.upk-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 7px; }
.upk-rule select, .upk-rule input[type=number] { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 6px 6px; font: inherit; font-weight: 800; font-size: 13px; width: auto; min-width: 0; }
.upk-rule input[type=number] { width: 46px; text-align: center; -moz-appearance: textfield; }
.upk-rule input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.upk-rbr { flex-basis: 100%; height: 0; }
.upk-rule select:focus, .upk-rule input:focus { outline: none; border-color: var(--pink); }
.upk-rpre { font-weight: 800; font-size: 13px; color: var(--muted); }
.upk-rarr { color: var(--muted); font-weight: 900; }
.upk-rule .upk-fx { width: 34px; height: 31px; margin-left: auto; font-size: 14px; }
.upk-refuse .upk-in { flex: 1 1 90px; min-width: 0; padding: 7px 10px !important; font-size: 14px !important; }
.upk-rules .upk-addopt { margin-top: 0; }
.upk-rule select { -webkit-appearance: none; appearance: none; padding-right: 20px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239a9ac0' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; cursor: pointer; }
.upk-rule { row-gap: 6px; }
.upk-rule select { field-sizing: content; }
.upk-rule .upk-emo { width: 44px; text-align: center; font-size: 20px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 3px 0; }
.upk-rule input[type=number] + .upk-rpre { margin-right: 2px; }
/* v0.48.2: knuste hjerter – tæt */
.upk-hrow { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.upk-hrow .upk-emo, .upk-hf .upk-emo { width: 40px; text-align: center; font-size: 19px; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 4px 0; flex: none; }
.upk-hrow .upk-hseg { flex: 1; min-width: 0; }
.upk-hrow input[type=number] { width: 44px; flex: none; text-align: center; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 7px 4px; font: inherit; font-weight: 800; font-size: 14px; -moz-appearance: textfield; }
.upk-hrow input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.upk-hf { flex-wrap: nowrap; gap: 4px; padding: 5px 6px; }
.upk-hf input[type=number] { width: 38px; }
.upk-hf .upk-rpre { white-space: nowrap; }
.upk-hf .upk-fx { width: 30px; }
/* v0.48.3: knuste hjerter – små forklaringer under felterne */
.upk-hlab { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.upk-hlab > small { font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; line-height: 1.1; }
.upk-hrow { align-items: flex-start; }
.upk-hrow .upk-hlab:nth-child(3) { flex: 1; }
.upk-hrow .upk-hlab:nth-child(3) .upk-hseg { width: 100%; }
.upk-hin { display: inline-flex; align-items: center; gap: 4px; }
.upk-hf { align-items: flex-start; }
.upk-hf .upk-fx { align-self: center; margin-top: -12px; }
/* v0.48.7: Prøv – Kill, Marry, Fuck med knapper (samme udseende som spillet) */
.upk-try :where(button.kmf-slot) { background: transparent; color: inherit; font: inherit; }
.upk-try :where(button.kmf-chip) { color: inherit; font-family: inherit; }
.upk-try button.kmf-slot:disabled, .upk-try button.kmf-chip:disabled { opacity: 1; cursor: default; }
/* v0.48.8: kædede kort – trin 1 / trin 2 */
.upk-steps button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upk-try .chain-step, .chain-step { text-align: center; font-weight: 900; font-size: 15px; color: var(--cyan); margin-bottom: 4px; }
/* v0.48.9: trin som fold-ud-knapper over hinanden */
.upk-stepbtn { margin-top: 8px; }
.upk-stepbtn small { color: var(--text); font-size: 14px; font-weight: 800; }
.upk-stepbtn.open { border-color: var(--cyan); }
.upk-mechbtn.upk-instep { margin-top: 8px; }
/* v0.49.0: trin foldes ud og ind (grid 0fr → 1fr) */
.upk-stepbody { display: grid; grid-template-rows: 1fr; margin-top: 2px; }
.upk-stepbody > div { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding-left: 10px; border-left: 2px solid var(--cyan); margin: 6px 0 0 14px; }
.upk-stepbody.in { animation: upkFoldIn .32s cubic-bezier(.2,.8,.2,1) both; }
.upk-stepbody.in > div { animation: upkFadeIn .32s ease both; }
.upk-stepbody.out { animation: upkFoldOut .18s ease-in both; }
@keyframes upkFoldIn { from { grid-template-rows: 0fr; } to { grid-template-rows: 1fr; } }
@keyframes upkFoldOut { from { grid-template-rows: 1fr; opacity: 1; } to { grid-template-rows: 0fr; opacity: 0; } }
@keyframes upkFadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.upk-stepif { font-style: normal; font-size: 11px; font-weight: 800; color: var(--cyan); background: rgba(25,227,255,.1); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.upk-ifseg button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upk-nextadd { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .upk-stepbody.in, .upk-stepbody.in > div, .upk-stepbody.out { animation: none; } }
/* v0.49.2: trin som et træ – flere veje fra samme trin (indrykket efter dybde) */
/* v0.49.4: rækker med streger (├ └ │) fra et trin til dets næste trin */
.upk-steprow { position: relative; padding-left: calc(var(--d, 0) * 18px); } /* (afstanden kommer fra ⚙️ Mere's gap: 8px – stregerne går 8px op) */
.upk-steprow.b { margin-top: 0; }
.upk-steprow > .upk-stepbtn { margin-top: 0; }
.upk-rail { position: absolute; left: calc((var(--c) - 1) * 18px + 8px); top: -8px; bottom: 0; width: 10px; pointer-events: none; }
.upk-rail.v { border-left: 2px solid rgba(255,255,255,.22); }
.upk-rail.e { bottom: auto; height: calc(50% + 8px); border-left: 2px solid rgba(255,255,255,.22); border-bottom: 2px solid rgba(255,255,255,.22); border-bottom-left-radius: 8px; }
.upk-rail.t { border-left: 2px solid rgba(255,255,255,.22); }
.upk-rail.t::after { content: ''; position: absolute; left: -2px; top: calc(50% + 4px); width: 10px; border-top: 2px solid rgba(255,255,255,.22); }

/* v0.49.8: pakkens beskrivelse i community-listen (højst to linjer) */
.upk-pdesc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.3; color: var(--text); opacity: .82; margin: 2px 0 3px; font-weight: 500; }

/* v0.74.36: listen dæmpes, mens nye pakker hentes (fanerne/kategorierne) – i stedet for at tone ud og ind */
#blist.upk-dim { opacity: .45; pointer-events: none; }

/* 🎓 v0.74.39: guidet første kort – boblen peger på knappen, man skal trykke på */
.upk-guide { position: fixed; left: 16px; right: 16px; max-width: 440px; margin: 0 auto; z-index: 9600; background: #1d1640; border: 1.5px solid var(--pink); border-radius: 16px; padding: 12px 14px 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,.6), 0 0 0 4px rgba(255,45,149,.15); font-size: 15px; line-height: 1.4; }
.upk-gin { animation: upkUp .3s var(--upk-ease); }
.upk-gtx b { color: #fff; }
.upk-gbtns { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.upk-gnum { font-size: 12px; font-weight: 800; color: var(--muted); }
.upk-gskip { margin-left: auto; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px; }
.upk-gnext { background: linear-gradient(135deg, var(--pink), #c2187a); color: #fff; border: 0; border-radius: 99px; font: inherit; font-weight: 800; font-size: 14px; padding: 7px 16px; cursor: pointer; }
.upk-guide-hi { outline: 3px solid var(--pink) !important; outline-offset: 3px; border-radius: 14px; box-shadow: 0 0 0 9px rgba(255,45,149,.18) !important; animation: upkGuidePulse 1.6s ease-in-out infinite; }
@keyframes upkGuidePulse { 0%, 100% { outline-color: var(--pink); } 50% { outline-color: rgba(255,45,149,.45); } }
/* knappen, der starter guiden igen */
.upk-guidebtn { display: flex; align-items: center; gap: 12px; width: 100%; margin: 10px 0 2px; padding: 11px 14px; text-align: left; cursor: pointer; color: var(--text); font: inherit;
  background: linear-gradient(135deg, rgba(157,92,255,.16), rgba(255,45,149,.10)); border: 1.5px solid rgba(157,92,255,.45); border-radius: 16px; }
.upk-guidebtn .gi { font-size: 24px; flex: none; }
.upk-guidebtn .gt { flex: 1; min-width: 0; }
.upk-guidebtn .gg { flex: none; font-size: 22px; color: var(--muted); }
.upk-guidebtn b { display: block; font-size: 15px; }
.upk-guidebtn small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.upk-guidebtn:active { transform: scale(.98); }

/* 👥 v0.74.41: "Byg med" – kodefelt som på forsiden */
.upk-joinlab { text-align: center; font-weight: 900; font-size: 22px; margin: 4px 0 12px; }
.upk-jcode { margin-bottom: 10px; }
.upk-jcode input { font-family: inherit; }
.upk-joinalt { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px; }
.upk-joinalt[hidden] { display: none; }
#joinIn { margin-top: 10px; }

.upk-gend { margin-left: auto; } /* (v0.74.43: "Slut guiden" i højre side, hvor "Spring guiden over" plejer at stå) */

/* 🎛️ v0.74.48: knapperne i Kortpakker opfører sig som knapperne i resten af appen (.btn i app.css):
   giver lidt efter (97 %) på 0,08 s – ingen glimt, ingen hop ved hover og ingen særlige tryk-størrelser */
.upk-app button, .upk-sheet button, .upk-app a.btn {
  transition: transform .08s ease, opacity .2s ease, box-shadow .2s ease, background .2s, border-color .2s, color .2s; }
.upk-app button:active, .upk-sheet button:active, .upk-app a.btn:active, .upk-app .upk-card .upk-cbody:active { transform: scale(.97); }
.upk-app .upk-seg button:active { transform: none; } /* (fanerne: den glidende pille viser trykket) */
.upk-hubbtn::after { display: none; }
.upk-hubbtn span, .upk-prow .upk-chev, .upk-back span { transition: none; }
.upk-prow:hover .upk-chev, .upk-back:hover span, .upk-gear:hover { transform: none; }

/* 🎞️ v0.74.55: sideskift i Kortpakker er en blød udtoning – ingen glid eller trinvis opbygning af siden */
@keyframes upkFade { from { opacity: 0; } to { opacity: 1; } }
.upk-viewin { animation: upkFade .2s ease; }
.upk-hub > .upk-st { animation: none; }
/* 🃏 v0.74.66: Installerede – overskrift, faner og "Alle pakker" står fast; kun listen med pakker scroller */
html.upk-fixed, html.upk-fixed body { height: 100%; overflow: hidden; }
html.upk-fixed #app.upk-app { height: 100dvh; min-height: 0; padding-bottom: 0; }
html.upk-fixed #view, html.upk-fixed #homeBody { flex: 1; min-height: 0; display: flex; flex-direction: column; }
html.upk-fixed #offList { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 4px 16px calc(28px + var(--safe-b)); scrollbar-width: none; }
html.upk-fixed #offList::-webkit-scrollbar { display: none; }
html.upk-fixed #offList { -webkit-mask-image: linear-gradient(transparent 0, #000 14px); mask-image: linear-gradient(transparent 0, #000 14px); } /* (kortene toner blødt ud under toppen) */
html.upk-fixed .upk-offtop { position: static; }
/* ‹ v0.74.83: tilbage-knappen er tydelig – samme pille som på forsiden og Leaderboards */
.upk-back { gap: 6px; padding: 7px 14px 7px 10px; margin-bottom: 2px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: var(--text); font-size: 14px; font-weight: 800; box-shadow: 0 4px 14px -6px rgba(0,0,0,.6); -webkit-tap-highlight-color: transparent; }
.upk-back span { font-size: 22px; margin-top: -3px; color: inherit; opacity: .75; }
.upk-back:hover { background: rgba(255,255,255,.13); color: var(--text); }
/* ⭐ v0.75.7: pakkekode fra en ven (Installerede → Community) + pakker under 5 kort kan ikke slås til */
.upk-codeadd { display: flex; gap: 8px; margin-top: 8px; }
.upk-codeadd input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 15px; outline: none; }
.upk-codeadd input:focus { border-color: var(--cyan); }
.upk-codeadd .btn { flex: none; width: auto; padding: 12px 18px; font-size: 15px; }
/* 💬 v0.75.11: besked lige under en knap, der nægter (fx en pakke med under 5 kort) */
.near-msg { margin: 6px 4px 2px; padding: 8px 12px; border-radius: 12px; background: rgba(255,77,94,.12); border: 1px solid rgba(255,77,94,.35); color: #ff8fa3; font-size: 13px; font-weight: 700; text-align: center; animation: nearIn .22s cubic-bezier(.2,.8,.2,1) both; transition: opacity .25s, transform .25s; }
.near-msg.out { opacity: 0; transform: translateY(-4px); }
@keyframes nearIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* 🔒 v0.75.14: pakker under 5 kort – hele kortet gråt og svagt, kontakten bliver til en lås */
.upk-off.few { filter: grayscale(1); border-style: dashed; }
.upk-off.few > * { opacity: .4; } /* (på indholdet – indtonings-animationen holder kortets egen opacity på 1) */
.upk-off.few .upk-offt .sw { background: none; box-shadow: none; width: 28px; }
.upk-off.few .upk-offt .sw::after { content: "🔒"; color: #fff; background: none; box-shadow: none; width: auto; height: auto; top: 3px; left: 4px; font-size: 16px; transform: none; }
/* 💎 v0.75.21: pakker, der kræver abonnement – nedtonet med 💎 i stedet for kontakten (samme som i lobbyen) */
.upk-off.prem > * { opacity: .55; }
.upk-off.prem .upk-offt .sw { background: none; box-shadow: none; width: 28px; }
.upk-off.prem .upk-offt .sw::after { content: "💎"; color: #fff; background: none; box-shadow: none; width: auto; height: auto; top: 3px; left: 4px; font-size: 16px; transform: none; }
.near-msg.prem-msg { background: rgba(255,45,149,.1); border-color: rgba(255,45,149,.4); color: #ff9fcf; }
.upk-plock { opacity: .55; filter: grayscale(.6); } /* (💎 v0.75.21: Spil pakken / Installér uden abonnement) */
/* 💬 v0.75.22: beskeden svæver oven på indholdet lige under knappen (rykker ikke noget) */
.near-msg.float { position: fixed; z-index: 10040; margin: 0; box-sizing: border-box; background: #2a1420; box-shadow: 0 10px 30px -8px rgba(0,0,0,.7); pointer-events: none; }
.near-msg.float.prem-msg { background: #2a1430; }
.near-msg.float.has-btn { pointer-events: auto; display: flex; align-items: center; gap: 10px; text-align: left; }
.near-msg.float .nm-btn { margin-left: auto; flex: none; padding: 7px 12px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #ff2d95, #c3129f); color: #fff; font: inherit; font-size: 12.5px; font-weight: 900; cursor: pointer; white-space: nowrap; }
#upkPaywall .pw .btn-ghost { width: 100%; }
