/* The one header for the Pokémon and One Piece apps, matching the Yu-Gi-Oh! app's bar: logo, game switch, card search,
   format, theme, favorites / collection / alerts, account. Loaded after each page's own styles. */
header.gb{display:block;padding:0;gap:0;position:sticky;top:0;z-index:20;border-bottom:1px solid var(--line);
  background:color-mix(in srgb,var(--panel) 86%,transparent);-webkit-backdrop-filter:blur(12px) saturate(1.2);backdrop-filter:blur(12px) saturate(1.2)}
header.gb .hbar{display:flex;align-items:center;gap:14px;padding:9px 18px;min-width:0}
header.gb .logo{flex-shrink:0;font:700 24px var(--display);letter-spacing:.2px;color:var(--brand2);text-decoration:none;display:flex;gap:8px;align-items:center;white-space:nowrap}
header.gb .logo img{width:28px;height:28px}
header.gb .games{display:flex;gap:4px;padding:3px;background:var(--panel2);border-radius:999px}
header.gb .gamebtn{padding:4px 12px;border-radius:999px;font-weight:600;font-size:13px;color:var(--muted);text-decoration:none;white-space:nowrap;line-height:1.15;text-align:center}
header.gb .gamebtn:hover{color:var(--text)}
header.gb .gamebtn.on{background:var(--panel);color:var(--text);box-shadow:var(--shadow)}
header.gb .gamebtn small{display:block;font-size:9.5px;font-weight:600;color:var(--muted)}
header.gb .hsearch{position:relative;flex:1 1 140px;min-width:110px;max-width:560px;margin:0}
header.gb .hsearch input{width:100%;box-sizing:border-box;padding:8px 12px;border-radius:10px;border:1px solid var(--line);background:var(--panel2)}
header.gb .hsearch input:focus{border-color:var(--brand);outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 22%,transparent)}
header.gb .hctl{display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0}
header.gb .hctl .ghost{display:inline-grid;place-items:center;min-width:34px;min-height:34px;background:var(--panel);border:1px solid var(--line2);color:var(--text);padding:6px 10px;border-radius:9px;
  font-weight:600;font-size:14px;text-decoration:none;white-space:nowrap}
header.gb .hctl .ghost:hover{border-color:var(--brand);color:var(--brand2)}
header.gb .hctl [data-tip]{position:relative}
header.gb .hctl [data-tip]::after{content:attr(data-tip);position:absolute;top:calc(100% + 8px);right:0;z-index:30;width:max-content;max-width:230px;padding:6px 10px;border-radius:8px;
  background:var(--text);color:var(--bg);font:600 12.5px/1.35 Barlow,system-ui,sans-serif;text-align:left;white-space:normal;box-shadow:0 6px 18px rgba(0,0,0,.25);
  opacity:0;visibility:hidden;transform:translateY(-3px);transition:opacity .12s,transform .12s;pointer-events:none}
header.gb .hctl [data-tip]:hover::after,header.gb .hctl [data-tip]:focus-visible::after{opacity:1;visibility:visible;transform:none}
@media (hover:none){ header.gb .hctl [data-tip]::after{display:none} }
header.gb #acctlink{max-width:170px;overflow:hidden;text-overflow:ellipsis}
header.gb #joinlink{display:inline-grid;place-items:center;min-height:34px;padding:6px 12px;border-radius:9px;font-weight:700;font-size:14px;text-decoration:none;white-space:nowrap;background:var(--brand);color:var(--onbrand)}
header.gb #joinlink[hidden]{display:none}
@media (max-width:560px){ header.gb .hctl:has(#joinlink:not([hidden])) #acctlink{display:none} }   /* phones: Join free and Menu fit; Log in is the Menu's last link and a tab in the sign-up window */
/* One navigation bar (2026-11-03, the same as the Yu-Gi-Oh! app): the game switch, the two page tabs, the search and the
   controls all in one row. Home and Magic hide first, then the icons fold into the Menu, then the game switch itself. */
header.gb .tabs{display:flex;gap:2px;flex:none}
header.gb .tab{background:none;border:0;color:var(--muted);padding:8px 10px;border-radius:8px;font-weight:600;font-size:15px;position:relative;white-space:nowrap;min-height:36px}
header.gb .tab:hover{color:var(--text)}
header.gb .tab.on{color:var(--text)}
header.gb .tab.on::after{content:"";position:absolute;left:10px;right:10px;bottom:-2px;height:3px;border-radius:3px 3px 0 0;background:var(--brand)}
header.gb .mmenu{position:absolute;right:12px;top:calc(100% + 6px);z-index:25;width:min(360px,calc(100vw - 24px));background:var(--panel);border:1px solid var(--line2);border-radius:14px;box-shadow:0 14px 34px rgba(0,0,0,.28);padding:10px 12px;display:flex;flex-direction:column;gap:10px;animation:gb-pop .16s cubic-bezier(.2,.8,.2,1)}
header.gb .mmenu[hidden]{display:none}
@keyframes gb-pop{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
header.gb .mm-sec b{display:block;font:700 11px var(--body);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:5px}
header.gb .mm-sec:empty,header.gb .mm-sec #fmtslot:empty{display:none}
header.gb .mm-links{display:flex;flex-wrap:wrap;gap:6px}
header.gb .mm-links a,header.gb .mm-links button{text-decoration:none;color:var(--text);font-weight:600;font-size:14px;padding:8px 12px;min-height:40px;display:inline-flex;align-items:center;border-radius:999px;border:1px solid var(--line2);background:var(--panel2)}
header.gb .mm-links a:hover,header.gb .mm-links button:hover{border-color:var(--brand);color:var(--brand2)}
header.gb .gsrow,header.gb .mnav{display:none}
@media (max-width:1320px){ header.gb .games .gamebtn[href="/"],header.gb .games .gamebtn.soon{display:none} }
@media (max-width:1180px){ header.gb .games .gamebtn[href="/magic"]{display:none} }   /* all five games fit on a 13-inch laptop; below that Magic is in the Menu */
@media (max-width:1380px){ header.gb .hctl > a.ghost.tool{display:none} }
@media (max-width:1100px){ header.gb .hsearch{display:none} }   /* the builder has its own search box */
/* When the bar is wider than the window, gamebar.js adds fit1..fit5 until it fits. Everything that steps aside is also in the Menu. */
header.gb.fit1 .hsearch{display:none}
header.gb.fit2 .hctl > #themebtn,header.gb.fit2 .hctl > a.ghost[href="/pricing"],header.gb.fit2 .hctl > a.ghost.tool{display:none}
header.gb.fit3 .games .gamebtn[href="/"],header.gb.fit3 .games .gamebtn.soon{display:none}
header.gb.fit4 .games .gamebtn:not(.on){display:none}
header.gb.fit5 .games{display:none}
@media (max-width:860px){
  header.gb .hbar{gap:8px;padding:8px 12px}
  header.gb .games{display:none}   /* the game links live in the Menu */
  header.gb .hctl{gap:6px}
  header.gb .hctl > #fmt,header.gb .hctl > #themebtn,header.gb .hctl > a.ghost[href="/pricing"]{display:none}
  header.gb .mm-sec #fmt{display:inline-flex}
  header.gb .tab{padding:8px 8px;font-size:14.5px}
}
@media (max-width:560px){ header.gb .hbar{gap:6px;padding:8px 10px} header.gb .logo span{display:none} header.gb .logo img{width:30px;height:30px} header.gb #acctlink{max-width:90px;padding:6px 8px} header.gb #mmenuBtn{padding:6px 9px} }

/* the welcome every game opens with (the Yu-Gi-Oh! app's "What do you want to play?"), shown until there is a deck */
.welcome{margin:0 0 14px;padding:22px 22px 18px;border:1px solid var(--line);border-radius:18px;background:var(--panel)}
.welcome h2{font:700 clamp(34px,4.6vw,54px)/1 var(--display);margin:0 0 10px;letter-spacing:-.2px}
.welcome p{margin:0 0 14px;color:var(--muted);font-size:16px;max-width:60ch}
.welcome .w-ask{display:flex;gap:8px;padding:6px;border:1px solid var(--line2);border-radius:14px;background:var(--panel2);max-width:640px}
.welcome .w-ask input{flex:1;min-width:0;border:0;background:none;padding:10px 12px;font-size:16px;outline:none}
.welcome .w-ask button{border:0;background:var(--brand);color:var(--onbrand);border-radius:10px;padding:10px 18px;font-weight:700;white-space:nowrap}
.welcome .w-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px}
.welcome .w-chips button{border:1px solid var(--line2);background:none;border-radius:999px;padding:6px 12px;font-weight:500;font-size:13.5px;color:var(--muted)}
.welcome .w-chips button:hover{color:var(--text);border-color:var(--brand)}
.welcome .w-ways{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.welcome .w-way{text-align:left;border:1px solid var(--line);border-top:3px solid var(--brand);background:var(--bg);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:4px}
.welcome .w-way:hover{border-color:var(--brand)}
.welcome .w-way b{font-size:16px}.welcome .w-way span{color:var(--muted);font-size:14px;line-height:1.4}.welcome .w-way em{font-style:normal;font-weight:700;color:var(--brand2);font-size:14px;margin-top:4px}
@media (max-width:760px){ .welcome{padding:18px 14px 14px} .welcome .w-ways{grid-template-columns:1fr} .welcome .w-ask{flex-direction:column} }
/* "Your first week": the three steps a member gets (gamebar.js), the same card as the Yu-Gi-Oh! app's. Bottom left, hidden
   while a window is open, and on a phone it starts folded to its title so it never sits over the builder's buttons. */
.fw{position:fixed;left:16px;bottom:16px;z-index:19;box-sizing:border-box;width:min(340px,calc(100vw - 32px));background:var(--panel);color:var(--text);border:1px solid var(--line2);border-radius:16px;
  padding:6px 14px 12px;box-shadow:0 18px 50px rgba(0,0,0,.35);animation:fw-in .45s cubic-bezier(.3,1.5,.5,1)}
body:has(.modal.on) .fw{display:none}
@keyframes fw-in{0%{opacity:0;transform:translateY(20px) scale(.96)}100%{opacity:1;transform:none}}
.fw-head{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;background:none;border:0;padding:0;text-align:left;color:var(--text);font:inherit;cursor:pointer}
.fw-head b{display:block;font:700 18px var(--display)}.fw-head span span{display:block;color:var(--muted);font-size:14px}
.fw-chev{margin-left:auto;flex:none;color:var(--muted);transition:transform .15s}
.fw.min{width:auto;max-width:calc(100vw - 32px);padding:4px 14px}.fw.min .fw-body{display:none}.fw.min .fw-chev{transform:rotate(180deg)}
.fw-rows{list-style:none;margin:6px 0 0;padding:0;border-top:1px solid var(--line)}
.fw-rows li{display:flex;align-items:center;gap:10px;min-height:52px;border-bottom:1px solid var(--line);font-size:14.5px}
.fw-tick{flex:none;width:22px;height:22px;border-radius:50%;border:2px solid var(--line2);display:grid;place-items:center;color:transparent;box-sizing:border-box}
.fw-rows li.done .fw-tick{background:var(--brand);border-color:var(--brand);color:var(--onbrand)}
.fw-t{flex:1;min-width:0}.fw-rows li.done .fw-t,.fw-ok{color:var(--muted)}.fw-ok{font-size:13.5px;font-weight:600}
.fw-go{flex:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;padding:0 12px;border-radius:8px;border:1px solid var(--line2);background:var(--panel);
  color:var(--text);font:600 13.5px var(--body);text-decoration:none;white-space:nowrap;cursor:pointer}
.fw-go:hover{border-color:var(--brand);color:var(--brand2)}
.fw-foot{display:flex;margin-top:8px}
.fw-toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:41;background:var(--text);color:var(--bg);padding:9px 16px;border-radius:10px;font-weight:600;max-width:calc(100vw - 32px)}
@media (prefers-reduced-motion:reduce){.fw{animation:none}.fw-chev{transition:none}}
/* iPhone Safari zooms in when a typing box under 16 px is tapped: 16 px on touch screens and phones (Apple review 11-10) */
@media (pointer:coarse),(max-width:800px){input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=submit]):not([type=button]):not([type=image]),select,textarea{font-size:16px!important}}
