:root {
    --bg:#dce9e4; --panel:#faf4e8; --panel2:#f3ead8; --line:#d3c4a6;
    --text:#23291b; --muted:#6f6753; --accent:#1f6e49; --amber:#e6a53c;

    /* WildLens design system (Claude Design) — tokens aditivos */
    --wl-inset:#e7dcc4; --border-strong:#c2b08c; --on-accent:#f7f2e8;
    --accent-ink:#165236; --amber-ink:#c4862a;

    --font-display:'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-body:'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --fs-display:2.5rem; --fs-h1:1.875rem; --fs-h2:1.5rem; --fs-h3:1.25rem;
    --fs-body-lg:1.0625rem; --fs-body:1rem; --fs-sm:.875rem; --fs-xs:.75rem; --fs-2xs:.6875rem;

    --space-1:.25rem; --space-2:.5rem; --space-3:.75rem; --space-4:1rem;
    --space-5:1.25rem; --space-6:1.5rem; --space-8:2rem; --space-10:2.5rem; --space-12:3rem;

    --radius-sm:6px; --radius-md:10px; --radius-lg:14px; --radius-xl:18px;
    --radius-card:16px; --radius-pill:999px;

    --shadow-xs:0 1px 2px rgba(35,41,27,.06);
    --shadow-sm:0 2px 6px rgba(35,41,27,.08);
    --shadow-md:0 6px 16px rgba(35,41,27,.10);
    --shadow-lg:0 14px 34px rgba(35,41,27,.16);
    --scrim:rgba(20,24,14,.45);

    --ease-out:cubic-bezier(.2,.7,.3,1); --ease-soft:cubic-bezier(.34,1.3,.55,1);
    --dur-fast:120ms; --dur-base:200ms; --dur-slow:320ms;
  }
  * { box-sizing:border-box; }
  body { margin:0; background:var(--bg); color:var(--text);
         font-family:var(--font-body); }
  .wrap { max-width:1040px; margin:0 auto; padding:20px 16px 60px; }
  h1 { font-size:22px; margin:0; letter-spacing:.3px; font-family:var(--font-display); }
  .muted { color:var(--muted); } .small { font-size:13px; }
  button { background:var(--accent); color:#f7f2e8; border:0; border-radius:8px;
           padding:10px 16px; font-size:15px; cursor:pointer; font-weight:600; }
  button:not(:disabled):hover { filter:brightness(1.08); }
  button:disabled { opacity:.5; cursor:default; }
  button.ghost { background:transparent; border:1px solid var(--line); color:var(--text); }
  input { width:100%; padding:11px 12px; border-radius:8px; border:1px solid var(--line);
          background:#e7dcc4; color:var(--text); font-size:15px; margin-top:6px; }
  input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px #1f6e4924; }
  input[type=checkbox] { width:18px; min-width:18px; height:18px; flex:0 0 auto; padding:0; margin:2px 0 0; accent-color:var(--accent); }
  .field { margin-bottom:12px; } .field label { font-size:13px; color:var(--muted); }
  .auth { max-width:380px; margin:60px auto; background:var(--panel);
          border:1px solid var(--line); border-radius:14px; padding:26px; }
  .topbar { display:flex; align-items:center; justify-content:space-between;
            gap:12px; flex-wrap:wrap; margin-bottom:14px; }
  .stats { display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
  .xpbar { width:88px; height:6px; background:var(--line); border-radius:4px; overflow:hidden; margin-top:3px; }
  .xpbar span { display:block; height:100%; background:var(--accent); border-radius:4px; transition:width .4s ease; }
  .stat b { font-size:17px; }
  .tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; border-bottom:1px solid var(--line); }
  .tab { padding:9px 14px; cursor:pointer; color:var(--muted); border-bottom:2px solid transparent; font-weight:600; font-size:14px; }
  .tab.active { color:var(--text); border-bottom-color:var(--amber); }
  .navmenu { position:absolute; top:100%; left:0; margin-top:6px; background:var(--panel);
             border:1px solid var(--line); border-radius:10px; padding:6px; min-width:172px;
             box-shadow:0 10px 26px #000a; z-index:50; }
  .navmenu-item { padding:8px 10px; border-radius:7px; cursor:pointer; color:var(--muted);
             font-size:14px; font-weight:600; white-space:nowrap; }
  .navmenu-item:hover { background:var(--panel2); color:var(--text); }
  .navmenu-item.on { color:var(--text); background:var(--panel2); }
  .navmenu-item.off { opacity:.5; cursor:default; }
  .albumgrid { display:flex; flex-wrap:wrap; gap:8px; }
  .choosegrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(118px, 1fr)); gap:12px; }
  .choosecard { display:flex; flex-direction:column; }
  .albent { width:84px; text-align:center; }
  .albent .thumb { width:84px; height:64px; border-radius:8px; border:1px solid var(--line);
             object-fit:cover; display:block; background:#e7dcc4; }
  .albent .miss { width:84px; height:64px; border-radius:8px; border:1px dashed var(--line);
             display:flex; align-items:center; justify-content:center; color:var(--muted);
             font-size:20px; background:#e7dcc4; }
  .albent .nm { font-size:10px; margin-top:3px; white-space:nowrap; overflow:hidden;
             text-overflow:ellipsis; color:var(--muted); }
  .albent.has .nm { color:var(--text); font-weight:600; }
  .albent.dim { opacity:.55; }
  .albent.ready .miss { border:1px solid var(--accent); color:var(--accent); }
  .albent.ready .nm { color:var(--text); }
  .pastebtn { margin-top:4px; width:84px; font-size:10px; padding:3px 0; border-radius:6px;
             background:var(--accent); color:#f7f2e8; border:none; cursor:pointer; font-weight:700; }
  .pastebtn:disabled { opacity:.6; cursor:default; }
  .seg { display:inline-flex; gap:4px; background:var(--panel2); border:1px solid var(--line);
             border-radius:9px; padding:3px; }
  .seg button { background:transparent; border:none; padding:6px 12px; border-radius:7px;
             color:var(--muted); font-weight:600; font-size:13px; cursor:pointer; }
  .seg button.on { background:var(--accent); color:#f7f2e8; }
  .panel { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:18px; margin-bottom:22px; box-shadow:0 1px 2px rgba(70,55,30,.05), 0 4px 14px rgba(70,55,30,.04); }
  .grid { display:grid; gap:14px; grid-template-columns:repeat(auto-fill,minmax(175px,1fr)); }
  .selcard { position:relative; cursor:pointer; border-radius:14px; }
  .selcard.on { outline:3px solid var(--accent); outline-offset:3px; }
  .selcard .selmark { position:absolute; top:8px; right:8px; width:26px; height:26px; border-radius:50%;
    background:var(--accent); color:#f7f2e8; display:flex; align-items:center; justify-content:center;
    font-weight:800; font-size:15px; box-shadow:0 2px 6px #0005; opacity:0; transition:opacity .12s ease; }
  .selcard.on .selmark { opacity:1; }
  .card { background:var(--panel2); border:1px solid var(--line); border-radius:12px; overflow:hidden; box-shadow:0 1px 2px rgba(70,55,30,.06), 0 4px 12px rgba(70,55,30,.05); }
  .card .photo { height:120px; display:flex; align-items:center; justify-content:center; text-align:center; padding:8px; font-weight:700; }
  .card .body { padding:11px 12px 13px; }
  .sci { font-style:italic; }
  .card .sci { font-style:italic; color:var(--muted); font-size:12px; margin-top:2px; }
  .badges { display:flex; gap:6px; flex-wrap:wrap; margin:9px 0; }
  .badge { font-size:11px; padding:3px 8px; border-radius:20px; font-weight:700; }
  .floatbar { height:6px; background:#e7dcc4; border-radius:4px; overflow:hidden; margin-top:4px; }
  .floatbar > span { display:block; height:100%; }
  .attrs { margin-top:9px; font-size:12.5px; color:var(--muted); line-height:1.7; }
  .attrs b { color:var(--text); font-weight:600; }
  .err { color:#c0413c; font-size:14px; margin-top:10px; }
  .ok { color:#2f9e57; font-size:14px; margin-top:10px; }
  .reveal { border:1px solid var(--accent); }
  .section-title { font-size:15px; color:var(--muted); margin:0 0 12px; text-transform:uppercase; letter-spacing:.6px; }
  .row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); }
  .row:last-child { border-bottom:0; }
  .dots { display:flex; gap:6px; }
  .dot { font-size:11px; padding:2px 7px; border-radius:12px; font-weight:700; }
  .opt { display:block; width:100%; text-align:left; background:var(--panel2); border:1px solid var(--line);
         color:var(--text); padding:13px 14px; border-radius:10px; margin-bottom:10px; cursor:pointer; font-size:15px; }
  .opt:hover:enabled { border-color:var(--accent); }
  .opt.correct { border-color:#3fb950; background:#3fb95018; }
  .opt.wrong { border-color:#ff7b72; background:#ff7b7218; }
  .diffseal { font-size:11px; font-weight:700; padding:2px 8px; border-radius:8px; border:1px solid; white-space:nowrap; }
  .timer { font-weight:700; }
  .pbar { height:8px; background:#e7dcc4; border-radius:5px; overflow:hidden; margin-top:6px; }
  .pbar > span { display:block; height:100%; background:var(--accent); }
  .ach { padding:14px 0; border-bottom:1px solid var(--line); }
  .ach:last-child { border-bottom:0; }
  .tcard { position:relative; aspect-ratio:63/88; border-radius:14px; overflow:hidden;
           border:2px solid var(--bcol,#3a4a3f); background:var(--bdark,#1a1d17);
           color:#f5f1e6; --text:#f5f1e6; --muted:#c4cbb8; --line:#ffffff22;
           display:flex; flex-direction:column; box-shadow:0 3px 12px #0008;
           container-type:inline-size; text-align:left; }
  .tcard.reveal { box-shadow:0 0 0 2px #e6a53c, 0 3px 12px #0008; }
  .tcard .titlebar { font-weight:700; font-size:6.3cqw; line-height:1.15; padding:2.3cqw 4.6cqw;
           white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .tcard .artwin { position:relative; flex:1; margin:1.1cqw 3.4cqw 0; border:1px solid #00000088;
           border-radius:2.9cqw; overflow:hidden; background:#0d0f0b; }
  .tcard .artwin .img, .tcard .artwin .ph { width:100%; height:100%; object-fit:cover; display:block; }
  .tcard .ph { display:flex; flex-direction:column; align-items:center; justify-content:center;
           text-align:center; gap:1.1cqw; color:#dfe7ee; font-weight:700; font-size:6.3cqw; padding:3.4cqw; }
  .tcard .infobox { flex:0 0 auto; margin:2.9cqw 3.4cqw 3.4cqw; padding:3.4cqw 4cqw; display:flex; flex-direction:column; gap:2.3cqw;
           border:1px solid #ffffff14; border-radius:3.4cqw; background:rgba(0,0,0,.4); }
  .tcard .sci { font-style:italic; color:var(--muted); font-size:5.7cqw;
           white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .statrow { display:flex; gap:5px; }
  .statrow .stat { flex:1; min-width:0; background:#e7dcc4; border:1px solid var(--line);
           border-radius:5px; padding:3px 1px; text-align:center; }
  .statrow .stat .v { font-weight:700; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .statrow .stat .l { font-size:7.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.3px; }
  .enc .small { font-size:14px; }
  .enc .statrow { gap:8px; }
  .enc .statrow .stat { min-width:92px; padding:6px 8px; }
  .enc .statrow .stat .v { font-size:15px; white-space:normal; overflow:visible; text-overflow:clip; }
  .enc .statrow .stat .l { font-size:11px; }
  .tcard .statrow { gap:2.9cqw; }
  .tcard .statrow .stat { border-radius:2.9cqw; padding:1.7cqw 0.6cqw; background:rgba(0,0,0,.32); border-color:#ffffff22; }
  .tcard .floatbar { background:rgba(0,0,0,.32); }
  .tcard .statrow .stat .v { font-size:5.6cqw; }
  .tcard .statrow .stat .u { font-size:3.4cqw; font-weight:600; opacity:.72; margin-left:0.4cqw; }
  .tcard .statrow .stat .l { font-size:4.2cqw; }
  .botline { font-size:4.86cqw; color:var(--muted); white-space:nowrap; overflow:hidden;
           text-overflow:ellipsis; }
  .rgem { position:absolute; top:3.4cqw; left:3.4cqw; width:8cqw; height:8cqw; border-radius:50%;
           border:2px solid #ffffffcc; box-shadow:0 1px 3px #0009; }
  .biomechip { position:absolute; top:2.9cqw; right:2.9cqw; color:#fff; font-weight:700; font-size:4.86cqw;
           padding:1.1cqw 4cqw; border-radius:5.7cqw; box-shadow:0 1px 3px #0009; max-width:62%;
           white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .tcard .fa-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
  .tcard .fa-scrim { position:absolute; left:0; right:0; bottom:0; padding:4cqw 4.6cqw 5.1cqw;
           background:linear-gradient(transparent, rgba(0,0,0,.55) 28%, rgba(0,0,0,.9));
           display:flex; flex-direction:column; gap:2.3cqw; }
  .tcard .fa-scrim .fa-name { font-weight:800; font-size:7.4cqw; color:#fff;
           overflow:hidden; word-break:break-word;
           display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .tcard .fa-scrim .sci { color:#d3dce4; }
  .tcard.fullart .statrow .stat { background:rgba(0,0,0,.45); border-color:#ffffff33; }
  /* ---- carta emoldurada — estilo Claude Design ---- */
  .tcard.framed { gap:0; }
  .tcard.framed .artwin { flex:1 1 0; min-height:0; margin:3.4cqw 3.4cqw 0; border:none; border-radius:3cqw;
           overflow:hidden; background:linear-gradient(160deg, var(--bcol,#3a4a3f), var(--bdark,#1a1d17)); }
  .tcard.framed .artwin .img { width:100%; height:100%; object-fit:cover; display:block; }
  .tcard.framed .ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center;
           padding:3.4cqw; text-align:center; color:rgba(255,255,255,.78); font-weight:700;
           font-size:4.2cqw; letter-spacing:.05em; text-transform:uppercase; }
  .tcard.framed .rdot { position:absolute; top:5cqw; right:5cqw; width:5.2cqw; height:5.2cqw;
           border-radius:50%; background:var(--rcol,#fff); box-shadow:0 1px 3px rgba(0,0,0,.4); z-index:10; }
  .tcard.framed .plate { flex:0 0 auto; margin:2.6cqw 3.4cqw 0; padding:2.9cqw 3.6cqw; background:var(--panel);
           border-radius:3cqw; display:flex; flex-direction:column; gap:1.6cqw;
           --text:#23291b; --muted:#6f6753; --line:#d8cdb2; color:#23291b; }
  .tcard.framed .prow { display:flex; align-items:baseline; justify-content:space-between; gap:2cqw; }
  .tcard.framed .pname { font-family:var(--font-display); font-weight:800; font-size:6.4cqw; line-height:1.05;
           color:#23291b; min-width:0; overflow:hidden; word-break:break-word;
           display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .tcard.framed .pstatus { flex:none; font-weight:700; font-size:3.6cqw; color:#fff; padding:0.6cqw 1.8cqw;
           border-radius:2cqw; letter-spacing:.02em; }
  .tcard.framed .sci { font-style:italic; color:#6f6753; font-size:4.6cqw; line-height:1.1;
           min-width:0; overflow:hidden; word-break:break-word;
           display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .tcard.framed .pfam { flex:none; font-weight:600; font-size:3.8cqw; color:#6f6753; white-space:nowrap; }
  .tcard.framed .statrow { gap:2cqw; margin-top:1.2cqw; padding-top:2.6cqw; border-top:1px solid #d8cdb2; }
  .tcard.framed .statrow .stat { flex:1; min-width:0; background:transparent; border:none;
           border-radius:0; padding:0; text-align:left; }
  .tcard.framed .statrow .stat .v { color:#23291b; font-family:var(--font-display); font-weight:800;
           font-size:6cqw; white-space:nowrap; }
  .tcard.framed .statrow .stat .u { font-size:3.2cqw; font-weight:600; color:#6f6753; margin-left:0.6cqw; opacity:1; }
  .tcard.framed .statrow .stat .l { font-size:3.5cqw; color:#6f6753; text-transform:uppercase;
           letter-spacing:.04em; margin-top:0.3cqw; }
  .tcard.framed .pcred { flex:0 0 auto; margin:1.8cqw 3.6cqw 3cqw; padding-top:1.6cqw;
           border-top:1px solid rgba(255,255,255,.12); font-size:3.3cqw; color:rgba(255,255,255,.6);
           white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .tcard.framed .pfoot { flex:0 0 auto; margin:1.8cqw 3.6cqw 3cqw; padding-top:1.6cqw;
           border-top:1px solid rgba(255,255,255,.12); display:flex; align-items:baseline;
           justify-content:space-between; gap:2cqw; font-size:3.3cqw; color:rgba(255,255,255,.6); }
  .tcard.framed .pfoot .pcred { flex:1 1 auto; margin:0; padding:0; border:none;
           white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
  .tcard.framed .pfoot .pserial { flex:none; font-weight:700; color:rgba(255,255,255,.74); white-space:nowrap; }
  .tcard .fa-scrim .fa-foot { display:flex; align-items:baseline; justify-content:space-between; gap:2cqw;
           font-size:3.3cqw; color:rgba(255,255,255,.72); margin-top:0.6cqw; }
  .tcard .fa-scrim .fa-foot .fcred { flex:1 1 auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
  .tcard .fa-scrim .fa-foot .pserial { flex:none; font-weight:700; white-space:nowrap; }
  .tcard .statrow .stat .v { overflow:visible; text-overflow:clip; }
  .tcard .statrow .stat .v.vsm { font-size:4.6cqw; }
  .tcard .statrow .stat .v.vxs { font-size:3.8cqw; }
  .tcard.framed .statrow .stat .v.vsm { font-size:4.8cqw; }
  .tcard.framed .statrow .stat .v.vxs { font-size:3.9cqw; }
  .holo { position:absolute; inset:0; pointer-events:none; mix-blend-mode:screen;
          background:linear-gradient(115deg, transparent 25%, rgba(255,255,255,.30) 40%, rgba(120,200,255,.28) 48%, rgba(255,150,230,.26) 56%, transparent 72%);
          background-size:300% 100%; animation:holo 4.5s linear infinite; }
  @keyframes holo { 0%{background-position:0 0;} 100%{background-position:300% 0;} }
  .newshero { min-height:200px; background-size:cover; background-position:center;
              background-color:#123322; display:flex; align-items:flex-end; }
  .newshero-scrim { width:100%; padding:18px; display:flex; flex-direction:column;
              color:#fff; background:linear-gradient(rgba(8,32,25,.78), rgba(8,32,25,.96)); }
  .newshero-scrim > .muted { color:#e4f2ec; }
  .newsthumb { height:120px; background-size:cover; background-position:center;
              border-radius:8px; margin-bottom:10px; background-color:#10202a; }
  .overlay { position:fixed; inset:0; background:rgba(0,0,0,.72); display:flex; align-items:flex-start;
             justify-content:center; z-index:50; padding:24px 16px; overflow-y:auto; }
  .modal { width:100%; max-width:420px; }
  .ovbtn.ghost { color:#f4f1e8; border-color:#ffffff66; background:rgba(255,255,255,.1); }
  .ovbtn.ghost:hover { background:rgba(255,255,255,.2); }
  .scene { perspective:1100px; width:300px; margin:0 auto; }
  .tiltwrap { transition:transform .12s ease-out; transform-style:preserve-3d; }
  .flip3d { position:relative; transform-style:preserve-3d; transition:transform .55s; }
  .flip3d.flipped { transform:rotateY(180deg); }
  .face { backface-visibility:hidden; -webkit-backface-visibility:hidden; }
  .face.front { transform:rotateY(0deg); }
  .face.back { position:absolute; inset:0; transform:rotateY(180deg); }
  .detrow { display:flex; justify-content:space-between; gap:12px; padding:5px 0; border-bottom:1px solid var(--line); }
  .detrow:last-child { border-bottom:0; }
  .cardback { width:100%; height:100%; border-radius:14px; border:2px solid var(--line);
              background:radial-gradient(circle at 50% 30%, #1a4634, #0c1f17 78%); display:flex; align-items:center; justify-content:center; }
  .cardback-inner { text-align:center; color:#f4f1e8; display:flex; flex-direction:column; align-items:center; gap:12px; padding:10px; }
  .cardback-brand { font-weight:700; font-size:22px; letter-spacing:3px; }
  .cardback-sub { font-size:13px; color:#bfe3d0; letter-spacing:1px; }
  .photoview { width:100%; }
  .photoview img { width:100%; max-height:62vh; object-fit:contain; border-radius:10px; display:block;
              background:#e7dcc4; border:1px solid var(--line); }
  .photoph { width:100%; aspect-ratio:4/3; display:flex; align-items:center; justify-content:center;
              color:var(--muted); background:#e7dcc4; border-radius:10px; border:1px solid var(--line); }
  .photocred { text-align:center; font-size:12px; color:#d8d2c4; margin-top:8px; font-style:italic; }
  .preveal-stage { display:flex; justify-content:center; align-items:flex-start; padding:2px 0; }
  .preveal-card { width:min(72vw, 300px, calc(60vh * 63 / 88)); aspect-ratio:63/88; perspective:1100px; cursor:pointer; border-radius:12px;
                  box-shadow:0 0 26px 4px var(--rglow,#888), 0 0 9px 1px var(--rglow,#888); transition:box-shadow .35s, transform .12s;
                  animation:previn .32s cubic-bezier(.2,.7,.2,1); }
  .preveal-card:active { transform:scale(.985); }
  @keyframes previn { from{ opacity:0; transform:scale(.94); } to{ opacity:1; transform:scale(1); } }
  .pflip { position:relative; width:100%; height:100%; transform-style:preserve-3d; transition:transform .6s cubic-bezier(.2,.7,.2,1); }
  .pflip.flipped { transform:rotateY(180deg); }
  .pface { position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; border-radius:11px; overflow:hidden; }
  .pface.front { transform:rotateY(0deg); }
  .pface.back { transform:rotateY(180deg); }
  .packback { width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px;
              background:radial-gradient(circle at 50% 32%, #1a4634, #0c1f17 78%); border:1px solid #ffffff1f; color:#f4f1e8; }
  .packback-wm { font-size:14px; font-weight:700; letter-spacing:2px; color:#bfe3d0; }
  .preveal-nav { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:14px; }
  .preveal-arrow { width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:var(--panel2); color:var(--text);
                   font-size:24px; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0; }
  .preveal-arrow:disabled { opacity:.3; cursor:default; }
  .preveal-arrow.pulse { border-color:var(--accent); color:var(--accent); animation:prevpulse 1.1s ease-in-out infinite; }
  @keyframes prevpulse { 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.13); } }
  .preveal-dots { display:flex; gap:7px; align-items:center; }
  .preveal-dot { width:9px; height:9px; border-radius:50%; background:var(--line); transition:background .2s, transform .2s; }
  .preveal-dot.on { transform:scale(1.3); }
  .preveal-dot.cur { box-shadow:0 0 0 2px var(--panel), 0 0 0 3px var(--accent); }
  .bhand { display:flex; justify-content:center; align-items:flex-end; gap:8px; flex-wrap:wrap; padding:18px 4px 6px; }
  .bhand-card { width:clamp(150px,44vw,175px); cursor:pointer; position:relative; transition:transform .18s ease, filter .18s ease; touch-action:pan-y; }
  .bhand-card:hover { transform:translateY(-16px) scale(1.05); z-index:5; filter:drop-shadow(0 10px 16px rgba(0,0,0,.35)); }
  .bhand-card.match { filter:drop-shadow(0 0 0 transparent); }
  .bhand-card.match .tcard { box-shadow:0 0 0 2px #2f9e57, 0 3px 12px #0008; }
  .bhand-bonus { position:absolute; top:-10px; left:50%; transform:translateX(-50%); background:#2f9e57; color:#fff;
                 font-size:9px; font-weight:700; padding:1px 7px; border-radius:7px; white-space:nowrap; z-index:6; }
  .bhand-hint { text-align:center; color:var(--muted); font-size:12px; margin-top:8px; }
  .duel { display:flex; gap:8px; align-items:stretch; justify-content:center; }
  .duel-side { flex:1 1 0; min-width:0; text-align:center; display:flex; flex-direction:column; align-items:center; gap:4px; }
  .duel-card { width:100%; max-width:188px; }
  .duel-vs { display:flex; flex-direction:column; align-items:center; justify-content:center; font-weight:800; font-size:24px; padding:0 2px; }
  .duel-val { font-weight:800; font-size:17px; }
  .duel-base { font-size:10px; }
  .ncard { width:100%; aspect-ratio:63/88; border-radius:10px; border:2px solid var(--line); overflow:hidden; position:relative; display:flex; flex-direction:column; box-shadow:0 3px 12px #0008; }
  .ncard-art { flex:1; background:#0d0f0b; overflow:hidden; }
  .ncard-art img { width:100%; height:100%; object-fit:cover; display:block; }
  .ncard-ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#9aa39a; font-size:11px; }
  .ncard-name { padding:5px 6px; font-weight:700; font-size:11px; color:#f5f1e6; text-align:center; background:rgba(0,0,0,.4); }
  .ncard-chip { position:absolute; top:6px; left:6px; font-size:9px; color:#fff; padding:1px 6px; border-radius:6px; font-weight:700; }
  .btable { display:flex; flex-direction:column; gap:12px; }
  .bopp { text-align:center; }
  .bopp-hand { display:flex; justify-content:center; align-items:center; min-height:62px; }
  .bback { width:52px; aspect-ratio:63/88; border-radius:6px; background:radial-gradient(circle at 50% 32%, #1a4634, #0c1f17 78%);
           border:1px solid #ffffff26; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 6px #0007; }
  .bback + .bback { margin-left:-18px; }
  .bfield { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:14px; box-shadow:0 1px 2px rgba(70,55,30,.05); }
  .duel-card.up { animation:duelUp .45s cubic-bezier(.2,.7,.2,1); }
  .duel-card.down { animation:duelDown .45s cubic-bezier(.2,.7,.2,1); }
  @keyframes duelUp { from{ transform:translateY(60px); opacity:0; } to{ transform:translateY(0); opacity:1; } }
  @keyframes duelDown { from{ transform:translateY(-60px); opacity:0; } to{ transform:translateY(0); opacity:1; } }
  .cracha { transition:border-color .15s ease, box-shadow .15s ease; }
  .cracha:hover { border-color:var(--accent); }
  .itip-wrap { position:relative; display:inline-flex; cursor:pointer; }
  .itip { position:absolute; bottom:calc(100% + 7px); left:50%; transform:translateX(-50%);
          background:var(--text); color:var(--panel); padding:6px 9px; border-radius:8px;
          font-size:11px; line-height:1.3; width:max-content; max-width:190px; z-index:60;
          box-shadow:0 5px 16px rgba(0,0,0,.28); text-align:left; pointer-events:none; }
  .itip b { display:block; margin-bottom:2px; }
  .itip::after { content:""; position:absolute; top:100%; left:50%; transform:translateX(-50%);
                 border:5px solid transparent; border-top-color:var(--text); }
  /* ---- cabecalho do jogador (cracha) ---- */
  .crh { display:flex; gap:16px; align-items:flex-start; flex-wrap:wrap; }
  .crh-id { display:flex; gap:12px; align-items:center; flex:0 1 auto; min-width:0; }
  .crh-name { font-weight:800; font-size:18px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
  .crh-line { margin-top:3px; font-size:13px; color:var(--muted); display:flex; gap:10px; flex-wrap:wrap; align-items:baseline; }
  .crh-line .rkpos { color:var(--accent); font-weight:600; white-space:nowrap; }
  .crh-ins { display:flex; flex-wrap:wrap; gap:8px; align-content:flex-start; align-items:center; flex:0 1 auto; min-width:0; }
  .crh-seals { display:flex; flex-direction:column; align-items:flex-end; gap:5px; flex:0 0 auto; margin-left:auto; }
  .crh-seals-cap { letter-spacing:.05em; text-transform:uppercase; font-size:10px; }
  .crh-seals-row { display:flex; gap:7px; align-items:center; }
  .seal-dot { width:34px; height:34px; border-radius:50%; display:inline-block; box-shadow:0 1px 3px rgba(0,0,0,.25); }
  .seal-ph { width:34px; height:34px; border-radius:50%; display:inline-block;
             border:1.5px dashed var(--line); opacity:.55; }
  .seal-wrap { position:relative; display:inline-flex; cursor:pointer; }
  /* ---- interruptor on/off ---- */
  .swt { position:relative; width:44px; height:24px; border-radius:999px; border:none; padding:0;
         background:var(--line); cursor:pointer; transition:background .15s ease; flex-shrink:0; }
  .swt.on { background:var(--accent); }
  .swt:disabled { opacity:.5; cursor:default; }
  .swt-knob { position:absolute; top:2px; left:2px; width:20px; height:20px; border-radius:50%;
              background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.3); transition:transform .15s ease; }
  .swt.on .swt-knob { transform:translateX(20px); }
  .crh-controls { margin-top:12px; padding-top:12px; border-top:1px solid var(--line);
                  display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:space-between; }
  .crh-actions { display:flex; gap:8px; flex-wrap:wrap; }
  .tiergrid { display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); margin-bottom:14px; }
  .tier { display:flex; flex-direction:column; }
  .tier-name { font-weight:800; font-size:17px; }
  .tier-soon { color:var(--accent); font-weight:700; font-size:12px; margin-top:2px; }
  @media (max-width:560px){
    .crh-seals { margin-left:0; align-items:center; flex-direction:row; gap:9px; flex-basis:100%; }
  }

/* WildLens — atlas de campo */
:root {
  --bg:#dce9e4; --panel:#f7faf8; --panel2:#edf4f0; --line:#c3d2ca;
  --text:#142e28; --muted:#526558; --accent:#166049; --amber:#ffc35a;
}
html, body, body > footer {
  background:var(--bg);
}
body {min-height:100vh}
.wrap {max-width:1160px;padding-inline:clamp(14px,3vw,36px)}
.panel,.auth {border:1px solid var(--line);border-radius:18px;background:var(--panel);box-shadow:0 8px 25px #243c2510}
.section-title {color:#325b45;font-weight:900;letter-spacing:.085em}
button:not(.ghost):not(:disabled) {box-shadow:inset 0 1px 0 #ffffff38,0 2px 0 #17392d40}
button {border-radius:10px;transition:transform .15s,box-shadow .15s,background-color .15s}
button:not(:disabled):active {transform:translateY(1px)}
button:focus-visible,.tab:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {outline:3px solid #bf7723;outline-offset:3px}
.topbar {background:#f7faf8;border-radius:18px 18px 0 0;border:1px solid var(--line);border-top:4px solid #28684d;margin-bottom:0;padding:18px clamp(12px,2vw,24px)}
.topbar .stats {gap:12px}
.tabs {background:#143b32;border-radius:0 0 16px 16px;border:0;padding:8px;gap:3px;box-shadow:0 6px 18px #17392d24}
.tabs .tab {border:0;border-radius:8px;color:#e9f0e4;font-weight:800;padding:10px 12px}
.tabs .tab:hover {background:#295447;color:white}
.tabs .tab.active {background:#ffca69;color:#213b2e;box-shadow:inset 0 -2px #ac782c}
.navmenu {border-radius:12px;border-top:3px solid #d89c45;box-shadow:0 12px 26px #17392d38}
.navmenu-item.on,.navmenu-item:not(.off):hover {background:#dcebdc;color:#164536}
.wrap:has(#wlc_land) {display:grid;grid-template-columns:1.25fr 1fr;gap:14px}
.wrap:has(#wlc_land)>div {margin-bottom:0}
.wrap:has(#wlc_land)>:first-child,.wrap:has(#wlc_land)>:last-child,.panel:has(#wlc_land) {grid-column:1/-1}
.wrap:has(#wlc_land)>.panel:nth-child(3) {grid-row:span 2}
.panel:has(#wlc_land) {
  position:relative;isolation:isolate;overflow:hidden;text-align:left!important;
  padding:clamp(24px,5vw,66px);min-height:375px;border:0;border-radius:24px;
  background:var(--panel);
}
.panel:has(#wlc_land)::before {
  content:"";position:absolute;inset:0 0 0 46%;z-index:-1;
  background:url("https://jpwaszlegloctkrfvpca.supabase.co/storage/v1/object/public/fotos/rabo-branco-de-garganta-rajada_acosta.jpg") center / cover no-repeat;
}
.panel:has(#wlc_land)>div:first-child {align-items:flex-start!important}
.panel:has(#wlc_land)>div:nth-child(2) {font:italic 600 clamp(24px,3vw,38px)/1.2 Georgia,serif!important}
.panel:has(#wlc_land)>p {width:42%;margin:10px 0 0!important;color:#284738;line-height:1.5}
.panel:has(#wlc_land)>button {background:#164c39;color:#fffbea;border-radius:999px}
.panel:has(#wlc_land)>button::after {content:" →";margin-left:14px}
.panel:has(#wlc_land)::after {content:"Phaethornis eurynome  ·  © Alan da Costa";position:absolute;bottom:12px;right:14px;color:white;background:#102a24e8;padding:5px 10px;border-radius:6px;font:italic 13px Georgia,serif}
@media(max-width:680px){
 .wrap:has(#wlc_land){display:block}
 .wrap:has(#wlc_land)>.panel{margin-bottom:12px}
 .panel:has(#wlc_land){padding:0 20px 24px}
 .panel:has(#wlc_land)::before{position:static;display:block;width:calc(100% + 40px);margin:0 -20px 18px;aspect-ratio:3/2}
 .panel:has(#wlc_land)>p{width:auto}
 .panel:has(#wlc_land)::after{top:10px;right:10px;bottom:auto}
 .tabs .tab{padding:9px;font-size:13px}
}
@media(prefers-reduced-motion:reduce){button{transition:none}}

/* Superfície dos diálogos que apresentam o conteúdo diretamente no modal. */
.overlay > .modal:has(> .section-title) {
  background:var(--panel);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:16px;
  padding:20px;
  box-shadow:0 16px 44px #142e2838;
}
button.ghost:not(.ovbtn) {
  background:#edf4f0;
  color:#214c3e;
  border-color:#829b90;
}
button.ghost:not(.ovbtn):not(:disabled):hover {
  background:#dce9e4;
  border-color:#526e60;
}

.cracha > .overlay > .modal:has(> div:first-child > .section-title + button.ovbtn) {
  background:#f7faf8;
  color:#18362c;
  border:1px solid #b8cbc1;
  border-radius:16px;
  padding:20px;
  box-sizing:border-box;
  box-shadow:0 16px 44px #142e2838;
}
.cracha > .overlay > .modal:has(> div:first-child > .section-title + button.ovbtn) button.ovbtn {
  background:#edf4f0;
  color:#214c3e;
  border-color:#829b90;
}

.cardback,.packback,.bback {
  position:relative;
  box-sizing:border-box;
  border-color:#46725a;
  background:
    repeating-radial-gradient(ellipse at 110% 110%, transparent 0 15px, #bad2b312 16px, transparent 17px 25px),
    linear-gradient(145deg,#275a43,#153d30 56%,#102f27);
}
.cardback::before,.packback::before,.bback::before {
  content:""; position:absolute; inset:3%; border:1px solid #b5c99c70;
  border-radius:inherit; pointer-events:none;
}
.cardback-inner,.packback img,.bback img {position:relative;}
.cardback-sub {color:#d0e3ce;}
.cardback-inner img,.packback img {max-width:88%;object-fit:contain;}
.cardback-inner img:first-child,.packback img:first-child,.bback img {
  padding:8%; box-sizing:content-box; border-radius:50%;
  background:#dcead6; box-shadow:0 0 0 2px #27533f,0 0 0 3px #a7bd95;
}
.cardback-inner img[src$="word.svg"],.packback img[src$="word.svg"] {
  filter:brightness(0) invert(95%) sepia(9%) saturate(430%) hue-rotate(52deg);
}
.bback img {padding:3px;}


.photo-application{display:grid;gap:.85rem;max-width:46rem;margin:1rem 0 1.6rem}
.photo-application label{font-weight:800}
.photo-application p{margin:0}
.photo-application textarea{box-sizing:border-box;width:100%;min-height:8rem;padding:.85rem;font:inherit;color:#173a32;background:#fff;border:1px solid #75998a;border-radius:.7rem;resize:vertical}
.photo-application button{justify-self:start}
.wild-footer{display:flex;align-items:center;flex-wrap:wrap;gap:.85rem 1.25rem;margin:2rem 0 1rem;padding:1.25rem clamp(1rem,3vw,2rem);background:linear-gradient(110deg,#12382f,#205747);color:#fff;border-radius:1rem;border-top:4px solid #75b89b}
.wild-footer strong{margin-right:auto}.wild-footer a,.wild-footer summary{color:#f0ffef;text-underline-offset:.22em}.wild-footer summary{cursor:pointer}
@media(max-width:600px){.wild-footer strong,.wild-footer a[href="mailto:vbagios@gmail.com"]{flex-basis:100%}.photo-application button{width:100%}}

/* Authenticated WildLens masthead */
.topbar:has(.field-brand){padding:0;gap:0;align-items:stretch;overflow:hidden;background:#eef5ef}
.field-brand{flex:1 1 320px;min-width:0;position:relative;isolation:isolate;display:flex;align-items:center;gap:10px;min-height:104px;padding:12px 16px;box-sizing:border-box;background:#183e30}
.field-brand::before{content:"";position:absolute;inset:0 0 0 auto;width:min(56%,280px);z-index:-1;background:linear-gradient(90deg,#183e30,transparent 38%),url("https://jpwaszlegloctkrfvpca.supabase.co/storage/v1/object/public/fotos/rabo-branco-de-garganta-rajada_acosta.jpg") center 48% / cover no-repeat}
.field-brand #wlc_top{background:#e4efdf;border-radius:12px;padding:5px;box-sizing:content-box}
.field-brand .field-name{display:block;width:auto;height:28px;filter:brightness(0) invert(1)}
.field-brand .muted{display:inline-block;color:white;background:#183e30e8;border-radius:4px;padding:2px 4px;overflow-wrap:anywhere}
.field-brand small{position:absolute;bottom:3px;right:6px;font:10px/1.3 sans-serif;color:white;background:#102820e6;padding:1px 4px;border-radius:3px}
.topbar:has(.field-brand) .stats{align-self:center;padding:12px 16px}
@media(max-width:760px){.field-brand{flex-basis:100%;min-height:92px}.topbar:has(.field-brand) .stats{padding:9px 12px;gap:8px;width:100%;box-sizing:border-box}.field-brand .field-name{height:25px}}


.field-brand{flex-basis:390px;min-height:156px}
.field-brand::before{content:none}
.field-brand > div{min-width:0;max-width:46%;z-index:1}
.field-brand #wlc_top{position:relative;z-index:1}
.field-brand .muted{background:transparent;padding:0}
.field-photo{position:absolute;inset:0 0 0 auto;width:60%;margin:0;overflow:hidden}
.field-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:var(--desk-crop)}
.field-photo::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#183e30,rgba(24,62,48,.8) 9%,transparent 43%),linear-gradient(0deg,#081a13db,transparent 30%)}
.field-photo figcaption{position:absolute;z-index:1;bottom:5px;right:8px;max-width:90%;color:white;text-align:right;font:11px/1.25 var(--font-body);text-shadow:0 1px 3px #000}
@media(max-width:760px){.field-brand{flex-basis:100%;min-height:148px}.field-photo img{object-position:var(--mobile-crop)}.field-brand>div{max-width:38%}.field-photo figcaption{max-width:85%}}
.wl-prefs{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;white-space:nowrap}
.wl-prefs button.ghost{padding:5px 8px;min-height:32px;font-size:12px;line-height:1.2}
.wl-prefs button.ghost[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 -2px var(--accent);font-weight:800}
.wl-theme span{margin-right:4px;font-size:15px}
:root[data-theme=dark]{color-scheme:dark;--bg:#101c19;--panel:#192b25;--panel2:#22382f;--text:#ecf4ed;--muted:#b4c8bd;--line:#41594c;--accent:#88d8af;--amber:#ffcb75;--wl-inset:#22382f;--border-strong:#749382;--on-accent:#10281e;--accent-ink:#b0e9c9;--amber-ink:#ffd087}
[data-theme=dark] .topbar:has(.field-brand),[data-theme=dark] .cracha>.overlay>.modal:has(>div:first-child>.section-title+button.ovbtn){background:var(--panel);color:var(--text);border-color:var(--line)}
[data-theme=dark] .section-title{color:#a9dfbf}
[data-theme=dark] button{background-color:#306a50;color:#f3faf5}
[data-theme=dark] button.ghost:not(.ovbtn),[data-theme=dark] .cracha>.overlay>.modal button.ovbtn.ghost{background:#263d34;color:var(--text);border-color:#658270}
[data-theme=dark] button.ghost:not(.ovbtn):not(:disabled):hover,[data-theme=dark] .navmenu-item.on,[data-theme=dark] .navmenu-item:not(.off):hover{background:#345444;color:#fff}
[data-theme=dark] :is(input,select,textarea),[data-theme=dark] .photo-application textarea{background:var(--panel2);color:var(--text);border-color:var(--line)}
[data-theme=dark] :is(input,textarea)::placeholder{color:#a9beb1}
[data-theme=dark] .enc .statrow .stat,[data-theme=dark] .pbar{background:var(--panel2)}
[data-theme=dark] .ok{color:#8ddda5}[data-theme=dark] .err{color:#ffa99e}
[data-theme=dark] a{color:#a4deca}
[data-theme=dark] .panel:has(#wlc_land)>p{color:var(--muted)}
[data-theme=dark] :is(.auth,.panel:has(#wlc_land)) img[src$="word.svg"]{filter:brightness(0) invert(94%)}
[data-theme=dark] :is(.auth,.panel:has(#wlc_land)) img[src$="mark.svg"]{background:#dcead6;border-radius:12%;padding:3px}
[data-theme=dark] .seg button.on{background:#386b52;color:white}
[data-theme=dark] :is(button,a,input,textarea,select,.tab):focus-visible{outline:3px solid #ffcb75;outline-offset:2px}
@media(max-width:480px){.topbar .stats{row-gap:8px}.wl-prefs button.ghost{padding-inline:7px}}

/* Keep the printed field label legible independently of the surrounding UI. */
[data-theme=dark] .tcard.framed .plate { background:#e5eee6; }
.match-result-photo { display:block; width:100%; max-width:260px; aspect-ratio:63/88; object-fit:contain; background:var(--panel2); border-radius:8px; }
