
:root{
  --bg:#041522;
  --bg2:#08253b;
  --panel:#dcecf7;
  --panel2:#bdd7e8;
  --line:#347ca9;
  --line2:#183c57;
  --ink:#09243b;
  --text:#f2f8fc;
  --muted:#7fa9c3;
  --red:#dd3d3d;
  --green:#22a85b;
  --yellow:#e8af29;
  --blue:#328fd1;
  --purple:#7047b7;
  --shadow:0 8px 24px rgba(0,0,0,.24);
  --radius:12px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;background:radial-gradient(circle at 50% -10%,#154c72 0,#08263d 33%,#041522 74%);color:var(--text);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}
body{min-height:100dvh;overscroll-behavior-y:none}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
img{display:block;max-width:100%}
#app{width:100%;max-width:700px;margin:0 auto;min-height:100dvh;padding:calc(8px + env(safe-area-inset-top)) 10px calc(92px + env(safe-area-inset-bottom))}
.topbar{height:64px;display:grid;grid-template-columns:42px minmax(0,1fr) 42px;align-items:center;gap:9px;margin-bottom:8px}
.brand-mark{width:42px;height:42px;display:grid;place-items:center}
.brand-ball{width:38px;height:38px;border-radius:50%;position:relative;background:linear-gradient(var(--red) 0 46%,#152f43 46% 56%,#f7fbff 56%);border:3px solid #d8ecfa;box-shadow:0 0 0 2px #143851}
.brand-ball:after{content:"";position:absolute;left:50%;top:51%;transform:translate(-50%,-50%);width:10px;height:10px;border-radius:50%;background:#fff;border:3px solid #173b55}
.brand-copy{min-width:0}
.brand-copy h1{font-size:clamp(20px,5.7vw,30px);letter-spacing:-1.1px;line-height:1;margin:0;white-space:nowrap}
.brand-copy h1 small{font-size:.45em;color:#85c4ee}
.brand-copy p{font-size:9px;letter-spacing:.7px;color:#87b1ca;margin:5px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.icon-btn{width:42px;height:42px;border:1px solid #2c678e;border-radius:10px;background:#0a2b45;color:#deeff9;font-size:19px}
.statusbar{height:32px;display:flex;align-items:center;padding:0 10px;border:1px solid #2c678e;background:#09263c;border-radius:9px;font-size:10px;line-height:1.2;color:#a9c9dc;margin-bottom:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.statusbar.free{border-color:#9c7929;color:#ffdda0;background:#332913}
.statusbar.ok{border-color:#2c8752;color:#b9f3cc}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 13px;background:linear-gradient(#eaf5fc,#c4ddeb);color:var(--ink);border:2px solid var(--line);box-shadow:var(--shadow);border-radius:var(--radius);margin-bottom:8px}
.page-head h2{margin:0;font-size:20px;line-height:1}
.page-head small{display:block;margin-top:5px;font-size:9px;color:#486f88}
.panel,.stat,.card-row,.tool-card,.market-card{background:linear-gradient(180deg,#e9f4fb,#bfd9e9);color:var(--ink);border:2px solid var(--line);border-radius:var(--radius);box-shadow:inset 0 0 0 1px rgba(255,255,255,.5),var(--shadow)}
.panel{padding:12px;margin-bottom:8px}
.grid{display:grid;gap:8px}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.stat{padding:10px;min-height:88px;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}
.stat .label,.label{font-size:9px;letter-spacing:.5px;color:#3e6680;text-transform:uppercase}
.stat strong{font-size:20px;line-height:1.05;overflow-wrap:anywhere}
.stat small{font-size:9px;color:#4c758e}
.value{font-size:28px;font-weight:900;line-height:1.05}
.up{color:#078b48}.down{color:#c72d3a}.flat{color:#536f83}
.badge,.pill{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:4px 7px;border-radius:7px;background:#6ea9ce;color:#07243a;font-size:10px;font-weight:900;white-space:nowrap}
.badge.free{background:#f1c85e}.badge.live{background:#68d58a}.badge.fallback{background:#c7d5df}
.actions{display:flex;gap:7px;flex-wrap:wrap}
.btn{border:1px solid #367ba6;border-radius:9px;padding:9px 11px;background:#d9edf9;color:#08243a;font-weight:800;font-size:11px}
.btn.primary{background:#327fb5;color:#fff}
.btn.green{background:#63cf82;color:#073016}
.btn.red{background:#db4343;color:#fff}
.btn.yellow{background:#f0c24e;color:#3b2b00}
.btn.full{width:100%}
.hero{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;align-items:center}
.card-image-wrap{position:relative;border-radius:10px;background:#0a263d;border:2px solid #4e8db6;overflow:hidden;aspect-ratio:2.5/3.5}
.card-image{width:100%;height:100%;object-fit:cover;background:#0e3452}
.card-image.contain{object-fit:contain;background:#071c2d}
.card-image-note{position:absolute;left:4px;right:4px;bottom:4px;padding:4px 5px;border-radius:5px;background:rgba(1,14,24,.82);color:#e4f3fb;font-size:7px;line-height:1.2;text-align:center}
.hero h3{margin:0 0 5px;font-size:22px}
.hero p{font-size:10px;color:#315e79;margin:5px 0}
.confidence-bar{height:7px;background:#8daabb;border-radius:9px;overflow:hidden;margin-top:5px}
.confidence-bar i{display:block;height:100%;background:#28a95c}
.searchbar{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:7px;margin-bottom:8px}
.searchbar input,.searchbar select,.form-grid input,.form-grid select,.form-grid textarea{width:100%;min-width:0;background:#eff8fd;color:#08243a;border:2px solid #6fa4c5;border-radius:9px;padding:10px;font-size:12px}
.card-list{display:grid;gap:7px}
.card-row{display:grid;grid-template-columns:62px minmax(0,1fr) 74px 18px;gap:8px;align-items:center;padding:7px;min-height:86px}
.thumb{width:62px;height:78px;border-radius:7px;overflow:hidden;border:1px solid #5890b2;background:#0f3551}
.thumb img{width:100%;height:100%;object-fit:cover}
.card-main{min-width:0}
.card-main strong{font-size:13px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meta{display:block;color:#3d6881;font-size:9px;line-height:1.3;margin-top:3px}
.price-col{text-align:right;min-width:0}
.price-col .price{font-weight:900;font-size:13px}
.price-col small{font-size:8px;display:block;margin-top:3px}
.chev{font-size:22px;color:#234f6d}
.source{display:inline-block;margin-top:5px;font-size:8px;background:#c8e0ee;color:#234a63;padding:3px 5px;border-radius:5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tool-card{min-height:114px;padding:12px;background:linear-gradient(180deg,#133d5d,#09283f);color:#f0f8fd;position:relative}
.tool-card h3{font-size:14px;margin:4px 0}.tool-card p{font-size:9px;line-height:1.4;color:#9fc3d9;margin:0 0 30px}.tool-card .emoji{font-size:23px}.tool-card button{position:absolute;bottom:9px;right:9px}
.market-card{padding:10px;margin-bottom:7px}
.market-row{display:grid;grid-template-columns:minmax(0,1fr) 66px 64px;gap:8px;align-items:center;padding:9px 0;border-bottom:1px solid #9dc0d5;font-size:11px}.market-row:last-child{border-bottom:0}
.market-row b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notice{padding:10px;border:1px dashed #6b9dbc;border-radius:9px;background:#cee4f1;color:#173f59;font-size:10px;line-height:1.45}
.form-grid{display:grid;gap:8px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid label{font-size:9px;color:#315f79}
.image-upload{display:grid;grid-template-columns:90px minmax(0,1fr);gap:10px;align-items:center}
.image-upload-preview{width:90px;height:126px;border-radius:8px;overflow:hidden;background:#0e304b;border:2px solid #4b8ab3}.image-upload-preview img{width:100%;height:100%;object-fit:cover}
.spark{height:54px;display:flex;align-items:end;gap:3px;padding:5px 2px}.spark i{flex:1;min-width:2px;background:#28a95c;border-radius:2px 2px 0 0}
.history-chart{height:90px;border-radius:8px;background:repeating-linear-gradient(to bottom,#dcebf4 0,#dcebf4 22px,#bed8e8 23px);position:relative;overflow:hidden}
.history-bars{height:100%;display:flex;align-items:end;gap:4px;padding:8px}.history-bars i{flex:1;background:linear-gradient(#39b96b,#168946);border-radius:3px 3px 0 0;min-height:6px}
.bottom-nav{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(700px,100%);height:calc(72px + env(safe-area-inset-bottom));padding:8px 10px calc(7px + env(safe-area-inset-bottom));background:rgba(3,18,30,.97);border-top:1px solid #2d678f;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;gap:4px;z-index:40}
.bottom-nav>button:not(.master-add){height:52px;border:1px solid #22577e;border-radius:9px;background:#0a2a44;color:#dcedf7;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:3px}
.bottom-nav button.active{background:#b63236;border-color:#f36d70}
.bottom-nav b{font-size:18px}.bottom-nav span{font-size:8px}
.master-add{width:66px;height:66px;border:0;background:transparent;padding:0;justify-self:center;align-self:end;margin-bottom:8px;position:relative;z-index:4}
.mb-shell{position:absolute;inset:0;border-radius:50%;filter:drop-shadow(0 5px 7px rgba(0,0,0,.45));transition:transform .2s}
.mb-top,.mb-bottom{position:absolute;left:4px;right:4px;height:28px;border:4px solid #101a24;background:#7148b9}
.mb-top{top:4px;border-radius:34px 34px 5px 5px;border-bottom-width:3px;transform-origin:50% 100%;transition:transform .34s ease,top .34s ease}
.mb-bottom{bottom:4px;border-radius:5px 5px 34px 34px;border-top-width:3px;background:#f7fbff;transform-origin:50% 0%;transition:transform .34s ease,bottom .34s ease}
.mb-band{position:absolute;left:3px;right:3px;top:28px;height:10px;background:#151e27;border:2px solid #101820;z-index:3}
.mb-center{position:absolute;width:17px;height:17px;border-radius:50%;background:#f8fbff;border:4px solid #111b24;left:50%;top:50%;transform:translate(-50%,-50%);z-index:5;box-shadow:0 0 0 2px #dcecf7}
.mb-m{position:absolute;left:50%;top:2px;transform:translateX(-50%);font-style:normal;font-family:system-ui,sans-serif;font-weight:1000;font-size:17px;color:#fff;text-shadow:1px 1px 0 #151c25;z-index:2}
.mb-dot{position:absolute;width:10px;height:10px;border-radius:50%;background:#fff;top:11px;border:2px solid #101820}.mb-dot.left{left:8px}.mb-dot.right{right:8px}
.master-add:active .mb-shell{transform:scale(.95)}
.master-add.opening .mb-top{top:-9px;transform:rotateX(52deg) rotate(-4deg)}
.master-add.opening .mb-bottom{bottom:-9px;transform:rotateX(-52deg) rotate(4deg)}
.master-add.opening:after{content:"";position:absolute;left:50%;top:50%;width:22px;height:22px;border-radius:50%;background:#fff;transform:translate(-50%,-50%);animation:masterFlash .45s ease-out forwards;z-index:0}
@keyframes masterFlash{0%{opacity:1;box-shadow:0 0 0 0 #fff,0 0 20px 4px #8fd5ff}100%{opacity:0;box-shadow:0 0 0 56px rgba(255,255,255,0),0 0 48px 22px rgba(143,213,255,0)}}
.toast{position:fixed;left:50%;bottom:96px;transform:translate(-50%,20px);max-width:calc(100% - 24px);background:#041522;color:#eef8ff;border:1px solid #3b789e;border-radius:9px;padding:9px 12px;font-size:10px;opacity:0;pointer-events:none;transition:.25s;z-index:80}.toast.show{opacity:1;transform:translate(-50%,0)}
@media (max-width:430px){
  #app{padding-left:7px;padding-right:7px}
  .topbar{grid-template-columns:38px minmax(0,1fr) 38px;height:58px;gap:6px}
  .brand-mark,.icon-btn{width:38px;height:38px}.brand-ball{width:35px;height:35px}
  .brand-copy h1{font-size:20px}.brand-copy p{font-size:7.5px}
  .grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
  .stat{padding:8px;min-height:80px}.stat strong{font-size:17px}.stat .label{font-size:8px}
  .hero{grid-template-columns:102px minmax(0,1fr);gap:9px}
  .hero h3{font-size:19px}
  .tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tool-card{min-height:108px;padding:10px}
}
@media (max-width:360px){
  .grid.three{grid-template-columns:1fr}
  .grid.two{grid-template-columns:1fr 1fr}
  .card-row{grid-template-columns:54px minmax(0,1fr) 64px 15px}
  .thumb{width:54px;height:70px}
  .tool-grid{grid-template-columns:1fr}
  .searchbar{grid-template-columns:1fr}
  .form-grid.two{grid-template-columns:1fr}
}

/* v1.3.1: handheld/TCG visual polish */
body:before{content:"";position:fixed;inset:0;pointer-events:none;z-index:999;background:repeating-linear-gradient(180deg,rgba(255,255,255,.018) 0 1px,transparent 1px 3px);mix-blend-mode:screen}
.icon-btn svg,.nav-glyph svg,.poke-symbol svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.page-head{position:relative;overflow:hidden;padding:10px 12px 10px 10px;background:linear-gradient(180deg,#f4fbff,#d5e9f2 48%,#b7d2df);border-color:#2a6b95;border-radius:9px;box-shadow:inset 0 2px 0 #fff,inset 0 -3px 0 rgba(39,83,110,.18),0 5px 12px rgba(0,0,0,.22)}
.page-head:after{content:"";position:absolute;right:-18px;top:-24px;width:78px;height:78px;border:9px solid rgba(51,118,159,.08);border-radius:50%}
.page-title-row{display:flex;align-items:center;gap:9px}
.poke-symbol{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:8px;background:linear-gradient(#194e74,#0a2b45);color:#dff5ff;border:1px solid #5c9ac0;box-shadow:inset 0 1px 0 rgba(255,255,255,.2)}
.page-head h2{font-size:18px;letter-spacing:.2px}
.panel,.stat,.card-row,.market-card{border-radius:9px;border-color:#3c7fa8;box-shadow:inset 0 2px 0 rgba(255,255,255,.72),inset 0 -2px 0 rgba(51,95,121,.15),0 5px 12px rgba(0,0,0,.18)}
.tool-card{border-radius:9px;border-color:#346c91;background:linear-gradient(180deg,#16496d 0,#0d3552 54%,#08283f 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.13),inset 0 -3px 0 rgba(0,0,0,.2),0 5px 12px rgba(0,0,0,.22)}
.tool-card .emoji{font-size:0;width:34px;height:34px;display:grid;place-items:center;border:1px solid #568fb2;border-radius:8px;background:#08243a;color:#dff5ff;margin-bottom:5px}
.tool-card .emoji svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}
.tool-card p{min-height:38px}
.card-row{transition:transform .12s ease,filter .12s ease}.card-row:active{transform:scale(.985);filter:brightness(.94)}
.card-image-wrap{border-radius:8px;box-shadow:0 0 0 1px rgba(255,255,255,.25),0 7px 14px rgba(0,0,0,.25)}
.card-image-wrap:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(115deg,transparent 18%,rgba(255,255,255,.14) 34%,transparent 50%);transform:translateX(-120%);animation:cardSheen 5.5s ease-in-out infinite}
@keyframes cardSheen{0%,76%{transform:translateX(-130%)}91%,100%{transform:translateX(150%)}}
.bottom-nav{height:calc(76px + env(safe-area-inset-bottom));background:linear-gradient(180deg,rgba(9,38,59,.98),rgba(3,17,29,.99));box-shadow:0 -4px 16px rgba(0,0,0,.3);border-top:2px solid #2d678f}
.bottom-nav>button:not(.master-add){border-radius:8px;border-color:#285d7d;background:linear-gradient(#103954,#09283e);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.bottom-nav>button:not(.master-add).active{background:linear-gradient(#b13b43,#74262d);border-color:#eb6f76;box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 0 10px rgba(211,65,75,.18)}
.nav-glyph{height:22px;display:grid;place-items:center}.nav-glyph svg{width:20px;height:20px}
.master-add{width:68px;height:68px;margin-bottom:7px}.mb-shell{filter:drop-shadow(0 7px 8px rgba(0,0,0,.5))}
.mb-top{background:radial-gradient(circle at 50% 0,#9b7bd0,#6f49b2 55%,#56358f)}.mb-bottom{background:linear-gradient(#fcfdff,#d7e5ee)}
.mb-center{box-shadow:0 0 0 2px #dcecf7,0 0 10px rgba(148,210,255,.45)}
.btn{border-radius:7px;box-shadow:inset 0 1px 0 rgba(255,255,255,.4),inset 0 -2px 0 rgba(0,0,0,.1)}
.symbol-status{display:inline-flex;align-items:center;gap:5px;font-size:9px;font-weight:900}.symbol-status i{width:9px;height:9px;border-radius:50%;display:inline-block}.symbol-status.collection i{background:#d6434e}.symbol-status.watch i{background:#dba832}.symbol-status.hold i{background:#27a863}
@media(max-width:430px){.page-head{padding:9px}.page-head h2{font-size:17px}.poke-symbol{width:32px;height:32px;flex-basis:32px}.tool-card{min-height:112px}}

/* v1.3.2 — mobile precision pass based on iPhone screenshot */
:root{
  --nav-h:82px;
}
#app{
  padding-bottom:calc(132px + env(safe-area-inset-bottom));
}
.topbar{
  margin-bottom:10px;
}
.brand-copy h1{
  letter-spacing:-1.35px;
}
.brand-copy h1 small{
  margin-left:5px;
  letter-spacing:0;
}
.statusbar{
  height:34px;
  padding-inline:12px;
  border-radius:10px;
  margin-bottom:10px;
}
.page-head{
  min-height:58px;
  margin-bottom:9px;
}
.page-title-row{
  min-width:0;
}
.page-title-copy{
  min-width:0;
}
.page-title-copy h2{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.page-title-copy small{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:78vw;
}
.header-ball{
  position:absolute;
  right:18px;
  top:50%;
  width:46px;
  height:46px;
  transform:translateY(-50%);
  border-radius:50%;
  opacity:.075;
  border:7px solid #195781;
}
.header-ball:before{
  content:"";
  position:absolute;
  left:-7px;right:-7px;top:50%;
  height:7px;
  transform:translateY(-50%);
  background:#195781;
}
.header-ball:after{
  content:"";
  position:absolute;
  width:12px;height:12px;
  left:50%;top:50%;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:#dceef8;
  border:4px solid #195781;
}
.page-enter{
  animation:pageSlide .18s ease-out both;
}
@keyframes pageSlide{
  from{opacity:.25;transform:translateY(4px)}
  to{opacity:1;transform:none}
}
.grid.three{
  gap:7px;
}
.stat{
  min-height:78px;
  padding:9px 10px;
}
.stat strong{
  font-size:clamp(16px,4.3vw,21px);
  letter-spacing:-.35px;
}
.panel.hero{
  grid-template-columns:108px minmax(0,1fr);
  min-height:188px;
  padding:11px;
}
.panel.hero .value{
  font-size:clamp(28px,8vw,38px);
  letter-spacing:-1px;
}
.card-image-wrap{
  align-self:center;
}
.tool-grid{
  gap:8px;
}
.tool-card{
  min-height:126px;
  padding:11px;
}
.tool-card h3{
  margin-top:7px;
}
.tool-card p{
  padding-right:2px;
  margin-bottom:32px;
}
.tool-card button{
  min-width:88px;
  min-height:32px;
}
.card-row{
  min-height:88px;
}
.source{
  max-width:min(100%,230px);
}
.card-detail-hero{
  overflow:hidden;
}
.card-reveal{
  animation:cardReveal .34s cubic-bezier(.18,.8,.28,1) both;
  transform-origin:50% 80%;
}
@keyframes cardReveal{
  0%{opacity:.15;transform:perspective(600px) rotateY(-15deg) scale(.94);filter:brightness(1.7)}
  65%{opacity:1;transform:perspective(600px) rotateY(2deg) scale(1.015);filter:brightness(1.08)}
  100%{transform:none;filter:none}
}
.bottom-nav{
  height:calc(var(--nav-h) + env(safe-area-inset-bottom));
  grid-template-columns:minmax(58px,1fr) minmax(58px,1fr) 82px minmax(58px,1fr) minmax(58px,1fr);
  gap:7px;
  padding:9px 12px calc(8px + env(safe-area-inset-bottom));
  align-items:end;
}
.bottom-nav>button:not(.master-add){
  height:58px;
  min-width:0;
}
.bottom-nav span{
  font-size:8.5px;
  letter-spacing:.25px;
}
.master-add{
  width:74px;
  height:74px;
  margin-bottom:8px;
}
.mb-top,.mb-bottom{
  left:4px;
  right:4px;
  height:31px;
}
.mb-top{
  top:4px;
}
.mb-bottom{
  bottom:4px;
}
.mb-band{
  left:3px;right:3px;top:31px;height:11px;
}
.mb-center{
  width:19px;height:19px;
}
.mb-m{
  top:3px;
  font-size:19px;
}
.mb-dot{
  top:12px;
}
.master-add.opening .mb-top{top:-11px;transform:rotateX(58deg) rotate(-5deg)}
.master-add.opening .mb-bottom{bottom:-11px;transform:rotateX(-58deg) rotate(5deg)}
.symbol-status b{
  font-size:9px;
  letter-spacing:.25px;
}
@media(max-width:430px){
  #app{padding-bottom:calc(128px + env(safe-area-inset-bottom))}
  .topbar{height:60px}
  .brand-copy h1{font-size:19.5px}
  .brand-copy p{font-size:7.6px}
  .panel.hero{grid-template-columns:106px minmax(0,1fr);min-height:182px}
  .hero h3{font-size:18.5px}
  .hero p{font-size:9.4px}
  .stat{min-height:76px}
  .bottom-nav{grid-template-columns:1fr 1fr 78px 1fr 1fr;padding-left:10px;padding-right:10px;gap:6px}
  .master-add{width:70px;height:70px}
}
@media(max-width:380px){
  .brand-copy h1{font-size:18px}
  .brand-copy p{font-size:7px}
  .panel.hero{grid-template-columns:96px minmax(0,1fr)}
  .bottom-nav{grid-template-columns:1fr 1fr 72px 1fr 1fr;gap:4px}
  .bottom-nav>button:not(.master-add){height:54px}
  .master-add{width:66px;height:66px}
}

/* ===== PokéTerminal v1.4 — Collection + Market Terminal ===== */
:root{
  --nav-h:82px;
  --terminal-yellow:#efbd3f;
}
#app{padding-bottom:calc(144px + env(safe-area-inset-bottom))}
.eyebrow{
  display:block;
  font-size:9px;
  letter-spacing:1.05px;
  color:#47748f;
  margin-bottom:4px;
}
.home-hit{min-height:194px}
.home-hit .card-image-wrap{box-shadow:0 5px 14px rgba(5,26,42,.24)}
.hero-copy{min-width:0}
.hero-price{
  font-size:35px;
  font-weight:1000;
  letter-spacing:-1.4px;
  line-height:1;
  margin:8px 0 2px;
}
.hero-trend{font-size:15px;margin-bottom:8px}
.dashboard-stats .stat strong{font-size:clamp(16px,4.1vw,21px)}
.market-pulse{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(130px,.85fr);
  gap:12px;
  align-items:center;
  min-height:98px;
}
.market-pulse .value{font-size:22px;margin-top:3px}
.market-pulse p{font-size:9px;color:#416d86;margin:7px 0 0}
.market-pulse-chart{min-width:0}
.row-set{
  display:block;
  margin-top:4px;
  font-size:8px;
  color:#5b8096;
}
.terminal-row{
  grid-template-columns:58px minmax(0,1fr) 82px 13px;
  min-height:80px;
}
.terminal-row .thumb{width:58px;height:72px}
.terminal-row .source{display:none}
.terminal-row .price-col small:last-child{color:#58798e}
.image-failed{
  background:
    radial-gradient(circle at 50% 42%,#346d92 0 10%,transparent 11%),
    linear-gradient(135deg,#0a263d,#154e72);
}
.image-failed:after{
  content:"IMAGEN NO DISPONIBLE\A USA CAMBIAR FOTO";
  white-space:pre;
  position:absolute;
  inset:auto 8px 12px;
  color:#d9edf8;
  text-align:center;
  font-size:7px;
  line-height:1.5;
}
.card-terminal-hero{
  display:grid;
  grid-template-columns:minmax(118px,41%) minmax(0,1fr);
  gap:16px;
  align-items:center;
  padding:14px;
}
.detail-art{min-width:0}
.detail-art .card-image-wrap{
  width:100%;
  max-width:190px;
  margin:auto;
  box-shadow:0 8px 20px rgba(4,25,40,.3);
}
.detail-info{min-width:0}
.detail-info h3{
  margin:3px 0 7px;
  font-size:clamp(23px,6vw,31px);
  line-height:.98;
  overflow-wrap:anywhere;
}
.detail-id{
  font-size:11px;
  color:#376984;
  margin-bottom:9px;
}
.detail-id span{opacity:.5;margin:0 3px}
.detail-badges{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin-bottom:11px;
}
.pill.rarity{
  background:#68a6cc;
  min-width:39px;
  font-size:11px;
}
.photo-btn{
  width:100%;
  min-height:40px;
  background:#e7f3fa;
}
.quote-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-bottom:8px;
}
.quote-strip>div{
  min-height:84px;
  padding:10px;
  background:linear-gradient(#eaf5fb,#c1dbea);
  color:var(--ink);
  border:2px solid var(--line);
  border-radius:var(--radius);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55),var(--shadow);
  overflow:hidden;
}
.quote-strip span{
  display:block;
  font-size:8px;
  color:#456d85;
  letter-spacing:.7px;
}
.quote-strip b{
  display:block;
  font-size:clamp(18px,5vw,25px);
  line-height:1;
  margin:8px 0 5px;
}
.quote-strip small{
  display:block;
  font-size:7.5px;
  line-height:1.25;
  color:#52778c;
}
.data-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.data-confidence{
  font-size:34px;
  font-weight:1000;
  line-height:1;
  margin-top:5px;
}
.data-grid{
  display:grid;
  grid-template-columns:58px minmax(0,1fr) 78px;
  gap:7px;
  margin:10px 0;
}
.data-grid>div{
  background:rgba(81,137,171,.11);
  border:1px solid rgba(65,123,157,.28);
  border-radius:8px;
  padding:7px;
  min-width:0;
}
.data-grid span{
  display:block;
  font-size:7px;
  letter-spacing:.65px;
  color:#5c7e91;
  margin-bottom:4px;
}
.data-grid b{
  display:block;
  font-size:9px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.detail-actions .btn{flex:1}
.section-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.section-title h3{margin:0}
.section-title small{font-size:8px;color:#557b91}
.microcopy{
  font-size:8px;
  line-height:1.45;
  color:#456f87;
  margin-bottom:0;
}
.exact-print{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
}
.exact-print p{
  margin:5px 0 0;
  font-size:9px;
  line-height:1.45;
}
.market-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-bottom:8px;
}
.market-summary>div{
  background:#0b2d47;
  border:1px solid #2a668e;
  border-radius:10px;
  padding:10px;
  min-height:76px;
  overflow:hidden;
}
.market-summary span{
  display:block;
  font-size:7.5px;
  letter-spacing:.65px;
  color:#7fa9c3;
}
.market-summary b{
  display:block;
  font-size:14px;
  margin:7px 0 3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.market-summary small{font-size:8px;color:#b7d1e1}
.market-disclaimer p{
  font-size:9.5px;
  line-height:1.52;
  margin:10px 0 0;
}
.terminal-market-row{
  grid-template-columns:minmax(0,1fr) 62px 55px;
  min-height:59px;
}
.add-terminal{padding:14px}
.add-step{
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 0 10px;
}
.add-step.second{margin-top:16px}
.add-step>span{
  width:30px;height:30px;
  display:grid;place-items:center;
  border-radius:8px;
  background:#0c3a59;
  color:#dff2fc;
  font-size:10px;
  font-weight:900;
}
.add-step b{display:block;font-size:11px}
.add-step small{display:block;font-size:8px;color:#55788d;margin-top:2px}
.photo-drop{
  min-height:102px;
  border:2px dashed #6fa4c5;
  border-radius:11px;
  background:rgba(239,248,253,.72);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:5px;
  color:#173e57;
}
.photo-drop-icon{
  width:30px;height:30px;
  color:#286b95;
}
.photo-drop-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8}
.photo-drop b{font-size:10px}
.photo-drop small{font-size:7.5px;color:#5d8196}
.new-photo-preview{
  width:92px;
  height:128px;
  margin:10px auto 0;
  border-radius:8px;
  overflow:hidden;
  border:2px solid #4b8ab3;
  background:#0b2e49;
}
.new-photo-preview img{width:100%;height:100%;object-fit:cover}
.capture-btn{margin-top:16px;min-height:46px}
.bottom-nav{
  box-shadow:0 -10px 26px rgba(3,17,28,.32);
}
.master-add{
  margin-bottom:12px;
}
@media(max-width:430px){
  .card-terminal-hero{grid-template-columns:124px minmax(0,1fr);gap:12px}
  .detail-info h3{font-size:24px}
  .quote-strip{gap:5px}
  .quote-strip>div{padding:8px;min-height:79px}
  .quote-strip b{font-size:18px}
  .data-grid{grid-template-columns:54px minmax(0,1fr) 67px}
  .market-summary{gap:5px}
  .market-summary>div{padding:8px}
  .market-summary b{font-size:12px}
}
@media(max-width:370px){
  .card-terminal-hero{grid-template-columns:110px minmax(0,1fr);padding:11px}
  .quote-strip small{font-size:6.8px}
  .data-grid{grid-template-columns:48px minmax(0,1fr) 60px}
}

/* ===== v1.5 — Pokédex + Holo 3D ===== */
.settings-btn{
  border-radius:14px!important;
  background:linear-gradient(145deg,#123f60,#092a43)!important;
  box-shadow:inset 0 0 0 1px rgba(128,205,248,.18),0 5px 14px rgba(0,0,0,.2)!important;
}
.settings-btn svg{width:25px!important;height:25px!important;stroke-width:1.55!important}
.card-open-3d{border:0;padding:0;background:none;position:relative;cursor:pointer}
.view3d-chip{
 position:absolute;right:6px;top:6px;display:flex;align-items:center;gap:3px;
 padding:4px 6px;border-radius:7px;background:rgba(4,32,51,.84);color:#dff5ff;
 font:800 7px/1 var(--mono);border:1px solid rgba(137,213,255,.55)
}
.view3d-chip svg,.view3d-btn svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8}
.view3d-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:7px;background:#0b4165;color:#eefaff;margin-bottom:7px}
.mini-sprite{display:flex;align-items:center;gap:5px;margin:6px 0 8px}
.mini-sprite img{width:40px;height:40px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 3px 2px rgba(0,0,0,.22))}
.mini-sprite span{display:block;font-size:6.5px;letter-spacing:.7px;color:#618196}
.mini-sprite b{font-size:10px}
.pokedex-panel{position:relative;overflow:hidden;background:linear-gradient(135deg,#e9f5fb,#c5dfec)}
.pokedex-panel:after{content:"";position:absolute;width:110px;height:110px;border:14px solid rgba(35,107,149,.07);border-radius:50%;right:-35px;bottom:-42px}
.pokedex-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.pokedex-head h3{margin:3px 0 0;font-size:17px}
.sprite-stage{width:74px;height:56px;position:relative;display:grid;place-items:center}
.sprite-stage span{position:absolute;width:62px;height:17px;border-radius:50%;bottom:2px;background:radial-gradient(ellipse,rgba(23,65,87,.28),transparent 68%)}
.sprite-stage img{width:58px;height:58px;object-fit:contain;image-rendering:pixelated;position:relative;z-index:1;animation:spriteFloat 1.15s steps(2,end) infinite}
@keyframes spriteFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.dex-meta{display:grid;grid-template-columns:1.5fr .8fr .8fr;gap:6px;margin:9px 0}
.dex-meta>div{padding:7px;border-radius:7px;background:rgba(31,99,138,.09);border:1px solid rgba(42,115,157,.2)}
.dex-meta span{display:block;font-size:6.5px;color:#66869a;letter-spacing:.6px;margin-bottom:4px}
.dex-meta b{font-size:8px}
.type-pill{display:inline-block;padding:3px 5px;border-radius:5px;background:#4f8ab0;color:white;margin-right:3px;font-size:7px}
.type-fuego{background:#e45c3f}.type-planta{background:#4ca965}.type-psiquico{background:#cc5d9b}.type-dragon{background:#6559b9}.type-hielo{background:#4faac4}.type-acero{background:#738a9a}.type-tierra{background:#b7864b}.type-bicho{background:#769844}.type-lucha{background:#a75045}
.dex-entry{font-size:8.5px;line-height:1.45;color:#345f77;margin:7px 0 0;max-width:85%}

/* Full 3D/Holo viewer */
.viewer-shell{min-height:calc(100dvh - 210px);padding-bottom:20px;color:#dff4ff}
.viewer-head{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center;margin-bottom:8px}
.viewer-head>div span{display:block;font-size:18px;font-weight:1000}
.viewer-head small{display:block;font-size:7px;color:#79a9c5;margin-top:3px}
.viewer-back{width:42px;height:42px;border-radius:11px;border:1px solid #3d85b0;background:#0b3857;color:white;font-size:30px;line-height:1}
.viewer-dex{font-size:9px;color:#78a9c5}
.viewer-stage{height:min(61vh,520px);min-height:390px;display:grid;place-items:center;position:relative;perspective:1000px;touch-action:none;overflow:hidden}
.viewer-stage:before{content:"";position:absolute;width:280px;height:280px;border-radius:50%;background:radial-gradient(circle,rgba(53,170,232,.17),transparent 68%);filter:blur(6px)}
.viewer-glow{position:absolute;width:220px;height:320px;border-radius:50%;background:rgba(87,173,227,.09);filter:blur(32px)}
.tilt-card{--rx:0deg;--ry:0deg;--mx:50%;--my:50%;width:min(67vw,285px);aspect-ratio:2.5/3.5;transform-style:preserve-3d;transform:rotateX(var(--rx)) rotateY(var(--ry));transition:transform .08s linear;filter:drop-shadow(0 24px 20px rgba(0,0,0,.48))}
.tilt-face{width:100%;height:100%;position:relative;border-radius:4.5%/3.2%;overflow:hidden;background:#132c40;transform:translateZ(7px);box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}
.viewer-card-image{width:100%;height:100%;object-fit:cover;display:block}
.holo-layer,.shine-layer,.texture-layer{position:absolute;inset:0;pointer-events:none;border-radius:inherit;mix-blend-mode:color-dodge}
.shine-layer{background:radial-gradient(circle at var(--mx) var(--my),rgba(255,255,255,.72),rgba(255,255,255,.12) 16%,transparent 38%);opacity:.62;mix-blend-mode:screen}
.texture-layer{opacity:.22;background-image:repeating-linear-gradient(115deg,transparent 0 8px,rgba(255,255,255,.22) 9px,transparent 10px)}
.holo-ar .holo-layer{opacity:.42;background:linear-gradient(115deg,transparent 10%,rgba(78,219,255,.55) 27%,rgba(255,90,208,.48) 43%,rgba(255,224,86,.52) 59%,transparent 77%);background-position:var(--mx) var(--my);background-size:180% 180%}
.holo-sr .holo-layer{opacity:.62;background:conic-gradient(from 20deg at var(--mx) var(--my),#6ef3ff33,#ff59d966,#ffe76766,#78ffad55,#6ef3ff33)}
.holo-sar .holo-layer{opacity:.72;background:linear-gradient(125deg,#5df4ff44,#ff62e466,#ffe56b55,#6dffba55,#8a78ff55,#5df4ff44);background-size:220% 220%;background-position:var(--mx) var(--my)}
.holo-rr .holo-layer{opacity:.28;background:linear-gradient(105deg,transparent 20%,rgba(126,218,255,.5) 45%,transparent 68%)}
.viewer-readout{display:flex;justify-content:space-between;padding:8px 12px;border:1px solid #245f84;background:#092a43;border-radius:9px;font-size:8px;color:#80afca}
.viewer-readout b{color:#d6f2ff}
.viewer-controls{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:8px}
.viewer-controls button{min-height:48px;border:1px solid #2f739d;border-radius:9px;background:#0b3857;color:#e4f6ff;font:700 7.5px var(--mono)}
.viewer-controls button:active{background:#175a83}
.viewer-help{text-align:center;font-size:7.5px;color:#6d9bb7;margin-top:9px}

/* Settings */
.settings-group{border:1px solid #28698f;border-radius:11px;padding:8px;background:#082a43;margin-bottom:9px}
.settings-group>h3{font-size:8px;letter-spacing:.8px;color:#65b8e4;margin:1px 4px 7px}
.setting-row{width:100%;min-height:58px;display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px;border:1px solid #245f83;border-radius:8px;background:#0b3552;color:#e6f7ff;text-align:left;margin-top:5px;font-family:var(--mono)}
.setting-icon{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;background:#0d456a;color:#cfeeff}
.setting-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7}
.setting-row b{display:block;font-size:9px}.setting-row small{display:block;font-size:7px;color:#7da9c2;margin-top:3px}
.setting-arrow{font-size:22px;color:#6da5c5}
.toggle{width:34px;height:19px;border-radius:12px;background:#35536a;position:relative}
.toggle:after{content:"";position:absolute;width:15px;height:15px;left:2px;top:2px;border-radius:50%;background:#c7d8e3;transition:.2s}
.toggle.on{background:#258fd0}.toggle.on:after{left:17px;background:white}

/* Premium Master Ball */
.master-add{filter:drop-shadow(0 7px 7px rgba(0,0,0,.42))}
.master-add:before{content:"";position:absolute;inset:-7px;border-radius:50%;background:radial-gradient(circle,rgba(178,94,255,.3),transparent 64%);animation:masterAura 2.2s ease-in-out infinite;pointer-events:none}
@keyframes masterAura{50%{transform:scale(1.08);opacity:.55}}
.mb-top{background:radial-gradient(circle at 50% 20%,#b57cff 0,#7641a8 34%,#3e1f65 72%,#25153e 100%)!important;box-shadow:inset 0 2px 4px rgba(255,255,255,.4)}
.mb-bottom{background:linear-gradient(#f9fcff,#dce9ef)!important;box-shadow:inset 0 -4px 8px rgba(77,111,130,.18)}
.mb-band{background:linear-gradient(#07121a,#18232b,#07121a)!important}
.mb-center{background:radial-gradient(circle,#f8fdff 0 38%,#86c8e9 40% 48%,#0a1821 50% 67%,#d9f3ff 69% 77%,#07141c 79%)!important;box-shadow:0 0 10px rgba(143,218,255,.7)!important}
.mb-m{text-shadow:0 2px 0 #32104f,0 0 6px rgba(255,255,255,.4)}
.mb-dot{box-shadow:0 0 5px rgba(255,255,255,.65)}
@media(max-width:430px){
 .card-terminal-hero{grid-template-columns:126px minmax(0,1fr)}
 .mini-sprite img{width:34px;height:34px}
 .view3d-btn,.photo-btn{min-height:35px;font-size:8px}
 .viewer-stage{min-height:370px;height:55vh}
 .tilt-card{width:min(70vw,270px)}
 .dex-entry{max-width:100%}
}

/* ===== v1.6 — DEX MOTION + HOLO LAB ===== */

/* Perfectly round settings button / gear */
.settings-btn{
  width:54px!important;height:54px!important;min-width:54px!important;
  border-radius:50%!important;
  display:grid!important;place-items:center!important;
  background:radial-gradient(circle at 35% 28%,#174d70,#0a2b44 72%)!important;
  border:1px solid #347ba5!important;
  box-shadow:inset 0 0 0 2px rgba(137,210,248,.08),0 5px 15px rgba(0,0,0,.22)!important;
}
.settings-btn .gear-round{width:28px!important;height:28px!important;display:block;stroke:#e7f7ff!important;fill:none!important}
.settings-btn:active{transform:scale(.95)}

/* Only one sprite: the larger Pokédex sprite */
.mini-sprite{display:none!important}
.sprite-stage{width:86px;height:64px}
.sprite-stage img{width:66px;height:66px}
.pokedex-head h3{font-size:18px}
.pokedex-panel{
  border-color:#5b9dc1;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.65),0 5px 14px rgba(0,0,0,.18);
}
.pokedex-panel:before{
  content:"DEX";position:absolute;right:15px;top:12px;
  font-size:7px;letter-spacing:1.2px;color:rgba(30,94,130,.25);font-weight:1000;
}

/* Premium center Master Ball — cleaner silhouette and no awkward icon feel */
.master-add{
  width:76px!important;height:76px!important;
  border-radius:50%!important;
  margin-bottom:14px!important;
  background:transparent!important;
  overflow:visible!important;
}
.master-add:before{
  inset:-8px!important;
  background:radial-gradient(circle,rgba(153,73,245,.24) 0 30%,rgba(62,163,222,.09) 46%,transparent 70%)!important;
  filter:blur(2px);
}
.master-add:after{
  content:"";position:absolute;inset:2px;border-radius:50%;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.14),0 0 0 1px rgba(16,6,29,.8);
  pointer-events:none;z-index:9;
}
.mb-top,.mb-bottom{
  left:2px!important;right:2px!important;height:35px!important;
  border-radius:74px 74px 7px 7px!important;
}
.mb-top{
  top:2px!important;
  background:
    radial-gradient(circle at 27% 42%,#f8f7ff 0 5px,#34174f 5.8px 8px,transparent 8.6px),
    radial-gradient(circle at 73% 42%,#f8f7ff 0 5px,#34174f 5.8px 8px,transparent 8.6px),
    radial-gradient(circle at 50% 0%,#c992ff 0,#8749bc 40%,#4e286f 75%,#29183f 100%)!important;
  box-shadow:inset 0 4px 7px rgba(255,255,255,.32),inset 0 -5px 9px rgba(27,8,44,.28)!important;
}
.mb-bottom{
  bottom:2px!important;
  border-radius:7px 7px 74px 74px!important;
  background:linear-gradient(#ffffff,#e8f1f6 55%,#c8d8e1)!important;
  box-shadow:inset 0 -5px 8px rgba(54,91,112,.18)!important;
}
.mb-band{
  left:2px!important;right:2px!important;top:33px!important;height:10px!important;
  background:#0b1117!important;z-index:4!important;
  box-shadow:0 1px 0 rgba(255,255,255,.15),0 -1px 0 rgba(0,0,0,.8)!important;
}
.mb-center{
  width:24px!important;height:24px!important;z-index:7!important;
  background:radial-gradient(circle,#fafdff 0 32%,#99d8f4 34% 43%,#0a1820 45% 63%,#f8fdff 65% 73%,#111b21 75%)!important;
  border:0!important;
  box-shadow:0 0 10px rgba(150,222,255,.8),0 2px 5px rgba(0,0,0,.5)!important;
}
.mb-m{
  z-index:6!important;top:7px!important;font-size:16px!important;
  font-weight:1000!important;letter-spacing:-2px!important;
  color:#fff!important;text-shadow:0 2px 0 #321247!important;
}
.mb-dot{display:none!important}
.master-add.opening{animation:masterPulse .42s ease-out}
@keyframes masterPulse{50%{transform:translateY(-3px) scale(1.06)}}

/* Holo Lab: stronger depth, easier movement, visible foil */
.viewer-shell{padding-bottom:28px}
.viewer-stage{
  min-height:430px!important;height:min(62vh,560px)!important;
  perspective:1250px!important;
  touch-action:none!important;
  user-select:none;
  -webkit-user-select:none;
}
.viewer-grid{
  position:absolute;inset:0;
  background:
    linear-gradient(rgba(70,141,181,.055) 1px,transparent 1px),
    linear-gradient(90deg,rgba(70,141,181,.055) 1px,transparent 1px);
  background-size:24px 24px;
  mask-image:radial-gradient(circle at 50% 50%,black,transparent 72%);
}
.viewer-glow{
  width:290px!important;height:390px!important;
  background:radial-gradient(circle,rgba(62,192,255,.19),rgba(124,57,203,.11) 46%,transparent 70%)!important;
  filter:blur(24px)!important;
}
.tilt-card{
  --rx:0deg;--ry:0deg;--mx:50%;--my:50%;--dx:0px;--dy:0px;--holo:1;
  width:min(72vw,300px)!important;
  transform:translate3d(var(--dx),var(--dy),0) rotateX(var(--rx)) rotateY(var(--ry))!important;
  transition:transform .045s linear!important;
  will-change:transform;
  filter:drop-shadow(calc(var(--ry) * -.25) 25px 22px rgba(0,0,0,.5))!important;
}
.viewer-stage.dragging .tilt-card{transition:none!important}
.tilt-depth{
  position:absolute;inset:0;border-radius:4.5%/3.2%;background:#06141f;transform:translateZ(-8px);
}
.depth-b{transform:translateZ(-4px);background:#18354a}
.tilt-face{
  transform:translateZ(8px)!important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.55),
    inset 0 0 12px rgba(255,255,255,.18),
    0 0 0 1px rgba(0,0,0,.7)!important;
}
.holo-layer,.rainbow-layer,.shine-layer,.texture-layer,.edge-light{position:absolute;inset:0;pointer-events:none;border-radius:inherit}
.holo-layer{mix-blend-mode:color-dodge;opacity:calc(.78 * var(--holo))!important}
.rainbow-layer{
  opacity:calc(.54 * var(--holo));
  mix-blend-mode:screen;
  background:
    conic-gradient(from 135deg at var(--mx) var(--my),
      transparent 0 7%,rgba(65,216,255,.72) 12%,rgba(128,95,255,.68) 22%,
      rgba(255,85,205,.75) 31%,rgba(255,218,72,.68) 42%,
      rgba(90,255,175,.63) 54%,transparent 68% 100%);
  filter:saturate(1.35);
}
.shine-layer{
  opacity:calc(.9 * var(--holo))!important;
  background:
    radial-gradient(circle at var(--mx) var(--my),rgba(255,255,255,.98) 0 4%,rgba(255,255,255,.46) 9%,rgba(173,226,255,.2) 19%,transparent 38%)!important;
  mix-blend-mode:screen!important;
}
.texture-layer{
  opacity:calc(.34 * var(--holo))!important;
  background:
    repeating-linear-gradient(115deg,transparent 0 7px,rgba(255,255,255,.28) 8px,transparent 10px),
    repeating-radial-gradient(circle at 20% 25%,rgba(255,255,255,.13) 0 1px,transparent 1px 5px)!important;
  background-position:calc(var(--mx) * .25) calc(var(--my) * .25);
}
.edge-light{
  box-shadow:
    inset calc((var(--mx) - 50%) / 5) calc((var(--my) - 50%) / 5) 20px rgba(255,255,255,.34),
    inset 0 0 20px rgba(85,199,255,.18);
  mix-blend-mode:screen;
}
.holo-ar .holo-layer{
  background:
    linear-gradient(115deg,transparent 4%,rgba(61,219,255,.75) 22%,rgba(255,79,205,.72) 42%,rgba(255,228,80,.75) 59%,rgba(91,255,171,.6) 72%,transparent 88%)!important;
  background-size:220% 220%!important;
  background-position:var(--mx) var(--my)!important;
}
.holo-sr .holo-layer{
  background:
    conic-gradient(from 20deg at var(--mx) var(--my),#50eaffbb,#ff52d8bb,#ffe164aa,#65ffb6aa,#715cffaa,#50eaffbb)!important;
}
.holo-sar .holo-layer{
  background:
    linear-gradient(125deg,#55eeff99,#ff58dda8,#ffe66499,#63ffbb92,#8a71ff99,#55eeff99)!important;
  background-size:260% 260%!important;background-position:var(--mx) var(--my)!important;
}
.holo-rr .holo-layer{
  opacity:calc(.48 * var(--holo))!important;
  background:
    linear-gradient(108deg,transparent 12%,rgba(110,216,255,.82) 38%,rgba(255,255,255,.64) 49%,rgba(188,114,255,.58) 59%,transparent 78%)!important;
  background-position:var(--mx) var(--my)!important;background-size:180% 180%!important;
}
.drag-hint{
  position:absolute;bottom:18px;left:50%;transform:translateX(-50%);
  padding:6px 10px;border-radius:999px;background:rgba(5,29,45,.82);
  border:1px solid rgba(81,163,206,.45);color:#a8d4ea;
  font-size:7px;letter-spacing:.8px;pointer-events:none;
  animation:hintPulse 1.8s ease-in-out infinite;
}
.drag-hint.hidden{opacity:0;transition:.25s}
@keyframes hintPulse{50%{transform:translateX(-50%) translateY(-2px);box-shadow:0 0 13px rgba(71,184,239,.22)}}
.viewer-controls button{
  min-height:52px!important;
  background:linear-gradient(#0e4568,#092f4a)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)!important;
}
.holo-strength{
  display:grid;grid-template-columns:auto 1fr 38px;gap:9px;align-items:center;
  margin-top:8px;padding:8px 10px;border-radius:9px;border:1px solid #28698e;background:#092c46;
}
.holo-strength span,.holo-strength b{font-size:7px;color:#8fb9d0}
.holo-strength input{width:100%;accent-color:#64c8f0}
.viewer-help{font-size:8px!important;line-height:1.5!important}

/* slightly closer to reference mockup */
.card-terminal-hero{box-shadow:inset 0 0 0 1px rgba(255,255,255,.55),0 7px 18px rgba(0,0,0,.2)}
.view3d-btn{
  background:linear-gradient(180deg,#0d4a70,#0a3858)!important;
  box-shadow:inset 0 0 0 1px rgba(121,204,247,.12);
}
@media(max-width:430px){
  .viewer-stage{min-height:400px!important;height:57vh!important}
  .tilt-card{width:min(74vw,285px)!important}
  .master-add{width:72px!important;height:72px!important}
  .mb-top,.mb-bottom{height:33px!important}
  .mb-band{top:31px!important}
}

/* ===== v1.7 — RETRO CAPTURE + SOUND LAB ===== */

/* Top settings: circular control + truly symmetric gear */
.top-settings-btn{
  width:54px!important;height:54px!important;min-width:54px!important;
  padding:0!important;border-radius:50%!important;
  display:grid!important;place-items:center!important;
  color:#eefaff!important;
  background:radial-gradient(circle at 35% 27%,#164d71 0,#0d3857 47%,#071f34 100%)!important;
  border:1.5px solid #3b84ad!important;
  box-shadow:inset 0 0 0 2px rgba(161,220,250,.07),0 5px 13px rgba(0,0,0,.22)!important;
}
.top-settings-btn .top-gear{
  width:29px!important;height:29px!important;
  display:block!important;fill:none!important;stroke:#edfaff!important;
  transform:none!important;
}
.top-settings-btn:active .top-gear{transform:rotate(22.5deg)!important;transition:.12s}

/* Gen-IV/old-handheld-inspired Master Ball, redrawn from scratch */
.master-add{
  width:78px!important;height:78px!important;
  margin-bottom:15px!important;padding:0!important;
  border:0!important;background:transparent!important;
  overflow:visible!important;filter:drop-shadow(0 7px 6px rgba(0,0,0,.4))!important;
}
.mb-shell{
  position:absolute!important;inset:0!important;display:block!important;
  transform-origin:50% 50%;
}
.master-add:before{
  content:"";position:absolute!important;inset:-6px!important;border-radius:50%!important;
  background:radial-gradient(circle,rgba(145,70,222,.17),transparent 67%)!important;
  filter:none!important;animation:none!important;
}
.master-add:after{
  content:"";position:absolute!important;inset:1px!important;border-radius:50%!important;
  border:2px solid #06131d!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.15)!important;
  z-index:8!important;pointer-events:none;
}
.mb-top,.mb-bottom{
  position:absolute!important;left:3px!important;right:3px!important;
  width:auto!important;height:35px!important;
  overflow:hidden!important;z-index:2!important;
  transition:transform .2s steps(4,end),top .2s steps(4,end),bottom .2s steps(4,end)!important;
}
.mb-top{
  top:3px!important;border-radius:36px 36px 3px 3px!important;
  background:
    linear-gradient(90deg,transparent 0 10%,#de3edb 10% 23%,transparent 23% 77%,#de3edb 77% 90%,transparent 90%),
    linear-gradient(#ad61cf 0 12%,#8845ae 13% 47%,#6d328f 48% 77%,#54266f 78% 100%)!important;
  box-shadow:inset 0 4px 0 rgba(255,255,255,.18),inset 0 -3px 0 rgba(44,10,58,.3)!important;
}
.mb-top:before,.mb-top:after{
  content:"";position:absolute;top:7px;width:14px;height:8px;background:#ef54eb;
  clip-path:polygon(0 0,100% 0,80% 100%,20% 100%);
}
.mb-top:before{left:8px}.mb-top:after{right:8px}
.mb-bottom{
  bottom:3px!important;border-radius:3px 3px 36px 36px!important;
  background:linear-gradient(#fefefe 0 58%,#e9eef0 59% 78%,#cdd9de 79% 100%)!important;
  box-shadow:inset 0 -4px 0 rgba(97,121,135,.14)!important;
}
.mb-band{
  position:absolute!important;left:2px!important;right:2px!important;top:33px!important;
  height:12px!important;background:#0b1115!important;z-index:4!important;
  border-top:1px solid #000;border-bottom:1px solid #202a31;
}
.mb-center{
  position:absolute!important;width:25px!important;height:25px!important;left:50%!important;top:50%!important;
  transform:translate(-50%,-50%)!important;border-radius:50%!important;z-index:7!important;
  background:
    radial-gradient(circle,#ffffff 0 31%,#cdeeff 32% 41%,#0a151b 43% 58%,#fafafa 60% 71%,#0b161c 73% 100%)!important;
  box-shadow:0 0 0 1px #000,0 2px 4px rgba(0,0,0,.5)!important;
}
.mb-m{
  position:absolute!important;left:50%!important;top:5px!important;transform:translateX(-50%)!important;
  width:auto!important;height:auto!important;color:white!important;z-index:5!important;
  font:bold 18px/1 Georgia,serif!important;letter-spacing:-2px!important;
  text-shadow:1px 1px 0 #4b1c61,-1px 0 0 #4b1c61!important;
}
.mb-m:before,.mb-m:after{display:none!important}
.mb-dot{display:none!important}

/* Pixel sparkle burst when opening */
.mb-spark{
  position:absolute;width:5px;height:5px;background:#fff9a8;z-index:15;opacity:0;pointer-events:none;
  box-shadow:5px 0 #fff9a8,-5px 0 #fff9a8,0 5px #fff9a8,0 -5px #fff9a8;
}
.mb-spark.s1{left:7px;top:9px}.mb-spark.s2{right:8px;top:5px}.mb-spark.s3{left:8px;bottom:4px}.mb-spark.s4{right:6px;bottom:8px}
.mb-flash{
  position:absolute;left:50%;top:50%;width:8px;height:8px;transform:translate(-50%,-50%);
  background:white;border-radius:50%;z-index:14;opacity:0;pointer-events:none;
}
.master-add.opening .mb-top{top:-9px!important;transform:translateY(-3px) rotateX(48deg)!important}
.master-add.opening .mb-bottom{bottom:-9px!important;transform:translateY(3px) rotateX(-48deg)!important}
.master-add.opening .mb-band{opacity:.25;transition:.12s}
.master-add.opening .mb-center{animation:retroButton .48s steps(4,end)}
.master-add.opening .mb-flash{animation:retroFlash .5s steps(5,end)}
.master-add.opening .mb-spark.s1{animation:pixelSpark1 .56s steps(5,end) .10s}
.master-add.opening .mb-spark.s2{animation:pixelSpark2 .56s steps(5,end) .13s}
.master-add.opening .mb-spark.s3{animation:pixelSpark3 .56s steps(5,end) .16s}
.master-add.opening .mb-spark.s4{animation:pixelSpark4 .56s steps(5,end) .19s}
@keyframes retroButton{0%,100%{filter:none}30%,60%{filter:brightness(2.4);box-shadow:0 0 0 3px #bceaff,0 0 12px #fff}}
@keyframes retroFlash{0%{opacity:0;transform:translate(-50%,-50%) scale(.5)}35%{opacity:1;transform:translate(-50%,-50%) scale(3.4)}70%{opacity:.75;transform:translate(-50%,-50%) scale(5)}100%{opacity:0;transform:translate(-50%,-50%) scale(6)}}
@keyframes pixelSpark1{0%{opacity:0;transform:translate(0,0) scale(.5)}25%,55%{opacity:1}100%{opacity:0;transform:translate(-15px,-18px) scale(1.15)}}
@keyframes pixelSpark2{0%{opacity:0;transform:translate(0,0) scale(.5)}25%,55%{opacity:1}100%{opacity:0;transform:translate(16px,-20px) scale(1.15)}}
@keyframes pixelSpark3{0%{opacity:0;transform:translate(0,0) scale(.5)}25%,55%{opacity:1}100%{opacity:0;transform:translate(-17px,18px) scale(1.15)}}
@keyframes pixelSpark4{0%{opacity:0;transform:translate(0,0) scale(.5)}25%,55%{opacity:1}100%{opacity:0;transform:translate(17px,17px) scale(1.15)}}

/* Settings audio lab */
.music-note{
  font:1000 22px/1 Georgia,serif!important;color:#dff6ff!important;
}
.setting-slider{
  min-height:58px;margin-top:5px;padding:10px 12px;
  border:1px solid #245f83;border-radius:8px;background:#0a314c;color:#e6f7ff;
}
.setting-slider>div{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}
.setting-slider b{font-size:8px;letter-spacing:.55px}
.setting-slider small{font-size:8px;color:#7fc0e2}
.setting-slider input{
  width:100%;height:18px;margin:0;accent-color:#48b7ef;
}
.settings-group:first-of-type{
  border-color:#367da7;
  box-shadow:inset 0 0 0 1px rgba(110,194,239,.05),0 5px 15px rgba(0,0,0,.15);
}

@media(max-width:430px){
 .master-add{width:74px!important;height:74px!important}
 .mb-top,.mb-bottom{height:33px!important}
 .mb-band{top:31px!important}
 .mb-m{top:4px!important;font-size:17px!important}
}

/* ===== v1.8 — Master Ball reference pass + ambient mix ===== */

/* Master Ball rebuilt to match the supplied pixel-art proportions:
   broad magenta side caps, purple crown, centered M, thick black band, cool white lower shell. */
.master-add{
  width:80px!important;height:80px!important;
  margin-bottom:15px!important;
}
.mb-top{
  top:3px!important;left:3px!important;right:3px!important;height:37px!important;
  border-radius:38px 38px 5px 5px!important;
  background:
    radial-gradient(ellipse at 15% 24%,rgba(255,198,238,.92) 0 4%,transparent 5%),
    radial-gradient(ellipse at 84% 22%,rgba(255,194,236,.88) 0 4%,transparent 5%),
    radial-gradient(ellipse at 50% 5%,#b66ad5 0 24%,#9251bb 25% 54%,transparent 55%),
    linear-gradient(90deg,#a61961 0 31%,#8d45b2 31% 69%,#a61961 69% 100%)!important;
  box-shadow:
    inset 0 5px 0 rgba(255,255,255,.10),
    inset 0 -5px 0 rgba(48,18,67,.23)!important;
}
.mb-top:before,.mb-top:after{
  top:5px!important;width:24px!important;height:24px!important;
  background:linear-gradient(#b41a68,#941356)!important;
  clip-path:polygon(10% 0,90% 0,100% 30%,88% 100%,12% 100%,0 30%)!important;
  box-shadow:inset 0 -5px 0 #df1b84,inset 0 4px 0 rgba(255,255,255,.06)!important;
}
.mb-top:before{left:5px!important}.mb-top:after{right:5px!important}
.mb-m{
  top:14px!important;font-size:17px!important;z-index:8!important;
  color:#dcecf6!important;
  text-shadow:1px 1px 0 #6d3b8a,-1px 0 #6d3b8a!important;
}
.mb-band{
  top:35px!important;height:13px!important;left:2px!important;right:2px!important;
  background:linear-gradient(#0c0d18,#1c1d2e 58%,#11111f)!important;
}
.mb-bottom{
  bottom:3px!important;left:4px!important;right:4px!important;height:36px!important;
  border-radius:4px 4px 38px 38px!important;
  background:
    linear-gradient(135deg,#f8fcff 0 12%,#cbdcf0 13% 30%,#e8f1fa 31% 50%,#bfcee1 51% 68%,#dfe8f4 69% 100%)!important;
  box-shadow:inset 0 -5px 0 rgba(74,84,126,.12)!important;
}
.mb-center{
  width:26px!important;height:26px!important;
  background:
    radial-gradient(circle,#dfeaf5 0 30%,#b4cde8 31% 43%,#20213a 44% 59%,#deeaf4 60% 71%,#171827 72% 100%)!important;
  box-shadow:0 0 0 2px #121220,0 2px 4px rgba(0,0,0,.48)!important;
}
.master-add:after{
  border-color:#2f2352!important;
}

/* ambient selector */
.music-theme-card{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;
  margin-top:5px;padding:10px 12px;border:1px solid #2d6d91;border-radius:8px;
  background:linear-gradient(135deg,#0b344f,#0c2a43);color:#e7f7ff;
}
.music-theme-card span{display:block;font-size:6.5px;letter-spacing:.7px;color:#78aac5}
.music-theme-card b{display:block;font-size:15px;margin:4px 0 2px}
.music-theme-card small{display:block;font-size:7px;color:#7ea6bd}
.music-theme-card button{
  min-height:38px;padding:0 10px;border-radius:7px;border:1px solid #3b83aa;
  background:#0f4567;color:white;font:800 7px var(--mono);
}

/* Victini: make broken-reference fallback visually clean while new exact URL loads */
.card-image-wrap.image-failed:before{
  content:"VICTINI 097/086";position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);
  width:100%;text-align:center;color:#ccecff;font-size:7px;letter-spacing:.6px;
}

/* ===== v1.9 — LOCKED MOBILE + TYPE CONTRAST ===== */

/* Hard mobile viewport lock: prevents the side-to-side page drift seen in the screen recording. */
html{
  width:100%;
  max-width:100%;
  overflow-x:hidden!important;
  overscroll-behavior-x:none;
  touch-action:pan-y pinch-zoom;
}
body{
  width:100%;
  max-width:100vw;
  overflow-x:hidden!important;
  overscroll-behavior-x:none;
  position:relative;
}
#app,.app-shell,main,#view{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:clip!important;
  box-sizing:border-box;
}
*,*::before,*::after{box-sizing:border-box}
img,svg,canvas,video{max-width:100%}
.panel,.page-head,.statusbar,.topbar,.tool-grid,.grid,.quote-strip,.market-summary,
.card-terminal-hero,.pokedex-panel,.settings-group,.add-terminal,.market-pulse,
.card-row,.market-row,.form-grid,.actions,.data-grid,.dex-meta{
  min-width:0!important;
  max-width:100%!important;
}
input,select,textarea,button,label{
  min-width:0;
  max-width:100%;
}
.page-title-copy,.hero-copy,.detail-info,.card-main,.price-col,.setting-row>div{
  min-width:0!important;
}
.bottom-nav{
  width:100vw!important;
  max-width:100vw!important;
  left:0!important;right:0!important;
  overflow:visible;
}
.viewer-shell,.viewer-stage{
  width:100%!important;
  max-width:100vw!important;
  overflow:hidden!important;
}
.tilt-card{max-width:76vw!important}

/* Prevent long copy/source strings from widening the viewport. */
p,small,.meta,.source,.dex-entry,.microcopy,.market-disclaimer,.setting-row small{
  overflow-wrap:anywhere;
  word-break:normal;
}
.data-grid b,.source{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Cleaner mobile rhythm observed from the recording. */
@media(max-width:430px){
  body{padding-inline:0!important}
  #app{
    padding-left:8px!important;
    padding-right:8px!important;
  }
  .topbar,.statusbar,.page-head,.panel,.tool-grid,.quote-strip,.market-summary{
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  .tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .card-terminal-hero{grid-template-columns:122px minmax(0,1fr)!important}
  .detail-info h3{overflow-wrap:anywhere}
}

/* Type labels: complementary foreground colors with strong contrast.
   Each text hue is deliberately opposite its type background. */
.type-pill{
  border:1px solid rgba(7,25,38,.26);
  font-weight:1000!important;
  letter-spacing:.35px;
  text-shadow:none!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22);
}
.type-pill-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  align-items:center;
  min-height:20px;
}
.dex-types{min-width:0}
.dex-types .type-pill{margin:0}

/* complementary color pairs */
.type-fuego{background:#e95b3f!important;color:#062d45!important}     /* orange-red ↔ cyan/navy */
.type-planta{background:#4da966!important;color:#4b164e!important}   /* green ↔ magenta-purple */
.type-psiquico{background:#d461a0!important;color:#123f24!important} /* pink ↔ green */
.type-dragon{background:#6756bd!important;color:#fff08a!important}   /* violet ↔ yellow */
.type-hielo{background:#62c7dd!important;color:#7a2c12!important}    /* cyan ↔ warm orange */
.type-acero{background:#8295a3!important;color:#2b2038!important}    /* blue-gray ↔ deep warm violet */
.type-tierra{background:#c58d4e!important;color:#123d58!important}   /* earth orange ↔ blue */
.type-bicho{background:#829d42!important;color:#3b174f!important}    /* yellow-green ↔ violet */
.type-lucha{background:#b8574d!important;color:#9cefff!important}    /* red ↔ cyan */

/* Extra types for future cards */
.type-agua{background:#4c8fd6!important;color:#5b240c!important}
.type-electrico{background:#efd34f!important;color:#332064!important}
.type-veneno{background:#9656aa!important;color:#bff28f!important}
.type-volador{background:#89a8dc!important;color:#5a2f10!important}
.type-roca{background:#aa9451!important;color:#173a62!important}
.type-fantasma{background:#685f9d!important;color:#e4e86f!important}
.type-siniestro{background:#4e4651!important;color:#d8f0ab!important}
.type-hada{background:#e596be!important;color:#174f45!important}
.type-normal{background:#aaa8a1!important;color:#25365c!important}

/* Typography: slightly more polished hierarchy without losing DS/terminal character. */
.page-head h2,.hero h3,.detail-info h3,.section-title h3{
  letter-spacing:-.45px;
}
.label,.eyebrow,.dex-meta span,.quote-strip span,.market-summary span{
  letter-spacing:.78px;
}
.dex-entry{
  font-size:9px!important;
  line-height:1.52!important;
}
.dex-meta b{
  font-size:8.5px!important;
  line-height:1.3;
}

/* Refine top gear once more: clear circular gear, consistent stroke at iPhone size. */
.top-settings-btn{
  border-radius:50%!important;
}
.top-settings-btn .top-gear{
  width:27px!important;height:27px!important;
  stroke-width:2!important;
  shape-rendering:geometricPrecision;
}

/* Prevent accidental sideways drag on cards except inside the dedicated 3D viewer. */
.card-row,.market-row,.panel,.page-head,.tool-card,.setting-row{
  touch-action:pan-y;
}
.viewer-stage{touch-action:none!important}

/* ===== PokéTerminal v2.0 — Sets + Full Collection ===== */

/* Definitive bottom navigation fix: previous left:0 still inherited translateX(-50%). */
.bottom-nav{
  left:0!important;
  right:0!important;
  transform:none!important;
  width:100%!important;
  max-width:100%!important;
  grid-template-columns:minmax(58px,1fr) minmax(58px,1fr) 82px minmax(58px,1fr) minmax(58px,1fr)!important;
  padding-left:max(10px,env(safe-area-inset-left))!important;
  padding-right:max(10px,env(safe-area-inset-right))!important;
  gap:6px!important;
}
.bottom-nav>button:not(.master-add){width:100%!important;min-width:0!important}
@media(max-width:390px){
 .bottom-nav{grid-template-columns:1fr 1fr 74px 1fr 1fr!important;gap:4px!important}
}

/* Master Ball refinement: larger pink caps + M visible while closed and open. */
.mb-top:before,.mb-top:after{
  width:29px!important;height:27px!important;top:3px!important;
}
.mb-top:before{left:3px!important}.mb-top:after{right:3px!important}
.mb-m{display:none!important}
.mb-m-fixed{
  position:absolute;left:50%;top:11px;transform:translateX(-50%);
  z-index:12;color:#edf4fa;font:1000 19px/1 Georgia,serif;
  letter-spacing:-2px;text-shadow:1px 1px 0 #63337c,-1px 0 #63337c;
  pointer-events:none;transition:top .22s steps(4,end),transform .22s steps(4,end);
}
.master-add.opening .mb-m-fixed{
  top:-3px;transform:translateX(-50%) scale(.95);
}
.master-add.opening .mb-top:before,.master-add.opening .mb-top:after{
  filter:brightness(1.1);
}

/* Collection tabs + overview */
.collection-tabs{
  display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:8px;
  padding:4px;border:1px solid #2b6b92;border-radius:10px;background:#082a43;
}
.collection-tabs button{
  min-height:36px;border:0;border-radius:7px;background:transparent;color:#83afc6;
  font:900 9px var(--mono);letter-spacing:.6px;
}
.collection-tabs button.active{background:#dbeef8;color:#12364e;box-shadow:inset 0 0 0 1px #83b4d0}
.collection-summary,.set-overview{
  display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:8px;
}
.collection-summary>div,.set-overview>div{
  padding:9px;background:linear-gradient(#e8f4fa,#bfdbea);border:2px solid #66a1c4;border-radius:10px;color:#133850;
}
.collection-summary span,.set-overview span{display:block;font-size:6.5px;letter-spacing:.7px;color:#5b7f94}
.collection-summary b,.set-overview b{display:block;font-size:20px;margin-top:4px}
.collection-search{
  grid-template-columns:minmax(0,1fr) 76px 86px!important;
}
.collection-search input,.collection-search select{font-size:8.5px!important}

/* Sets browser */
.year-strip{
  display:flex;gap:5px;overflow-x:auto;padding:2px 0 8px;scrollbar-width:none;
}
.year-strip::-webkit-scrollbar{display:none}
.year-strip button{
  flex:0 0 auto;min-width:54px;height:34px;border:1px solid #2c6d94;border-radius:8px;
  background:#0a304a;color:#a9ccde;font:800 8px var(--mono);
}
.year-strip button.active{background:#e2f1f8;color:#123650}
.set-list{display:grid;gap:7px}
.set-row{
  display:grid;grid-template-columns:52px minmax(0,1fr);gap:10px;align-items:center;
  padding:9px;border:1px solid #2d6689;border-radius:10px;background:linear-gradient(145deg,#0c3551,#09283f);
  color:#e6f6ff;
}
.set-symbol{
  width:52px;height:52px;border-radius:9px;background:#e8f4f9;display:grid;place-items:center;
  overflow:hidden;color:#345d75;font:900 9px var(--mono);
}
.set-symbol img{width:80%;height:80%;object-fit:contain}
.set-copy b{display:block;font-size:10px}
.set-copy small{display:block;font-size:7px;color:#79a7bf;margin-top:3px}
.set-progress{height:6px;margin:7px 0 4px;border-radius:4px;background:#173e58;overflow:hidden}
.set-progress i{display:block;height:100%;background:linear-gradient(90deg,#24bd7b,#55d49b)}
.set-copy em{font-style:normal;font-size:7px;color:#9fc3d6}
.set-source{padding:8px 2px 0}

/* Add common/no-hit cards */
.card-kind-picker{
  display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:15px;
}
.card-kind-picker>span{grid-column:1/-1;font-size:7px;letter-spacing:.7px;color:#557d93}
.card-kind-picker label{
  display:block;padding:9px;border:1px solid #75a8c6;border-radius:9px;background:#d9eaf4;
  color:#143950;font-size:9px;font-weight:900;
}
.card-kind-picker label small{display:block;font-size:6.5px;font-weight:400;color:#5a7c90;margin:4px 0 0 18px}
.card-kind-picker input{width:auto;margin-right:5px}

/* App icon preview language echoed subtly in branding */
.brand-mark{
  background:linear-gradient(145deg,#b52f40,#7a2740)!important;
  border-color:#8b63b5!important;
}
.brand-ball{filter:saturate(.9)}

/* ===== PokéTerminal v2.1 — visual parity + complete set browser ===== */

/* Universal spacing system */
:root{
  --u:8px;
  --panel-gap:8px;
  --side:10px;
}
#app{
  padding-left:var(--side)!important;
  padding-right:var(--side)!important;
}
#view{
  display:block;
  width:100%;
}
#view>*{
  margin-left:0!important;
  margin-right:0!important;
}
#view>section,
#view>.collection-tabs,
#view>.collection-summary,
#view>.searchbar,
#view>.year-strip,
#view>.era-strip{
  margin-bottom:var(--panel-gap)!important;
}
.grid,.tool-grid,.quote-strip,.market-summary,.collection-summary,.set-overview,.data-grid{
  gap:var(--panel-gap)!important;
}
.panel,.page-head,.statusbar,.tool-card,.stat,.settings-group,.add-terminal,
.collection-tabs,.collection-summary>div,.set-overview>div{
  border-radius:10px!important;
}
.panel,.page-head,.statusbar,.tool-card,.stat{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45),0 4px 10px rgba(0,0,0,.17)!important;
}

/* More prominent PokéTerminal brand */
.topbar{
  height:72px!important;
  display:grid!important;
  grid-template-columns:64px minmax(0,1fr) 54px!important;
  gap:9px!important;
  align-items:center!important;
  padding:6px 0!important;
}
.brand-copy h1{
  font-size:clamp(22px,5.7vw,27px)!important;
  line-height:1!important;
  letter-spacing:-1.35px!important;
  white-space:nowrap;
}
.brand-copy h1 small{
  font-size:9px!important;
  vertical-align:middle;
  margin-left:5px!important;
}
.brand-copy p{
  font-size:7.5px!important;
  letter-spacing:1.05px!important;
  margin-top:7px!important;
}

/* Retro Master Ball logo */
.brand-mark.master-logo{
  width:60px!important;height:60px!important;
  position:relative!important;border-radius:50%!important;
  background:transparent!important;border:0!important;
  box-shadow:none!important;overflow:visible!important;
}
.logo-master-top,.logo-master-bottom{
  position:absolute;left:4px;right:4px;height:25px;overflow:hidden;
}
.logo-master-top{
  top:4px;border-radius:28px 28px 3px 3px;
  background:
    radial-gradient(circle at 21% 25%,#ffb8e8 0 5%,transparent 6%),
    radial-gradient(circle at 79% 25%,#ffb8e8 0 5%,transparent 6%),
    linear-gradient(90deg,#c72a75 0 29%,#7f45ac 29% 71%,#c72a75 71% 100%);
  border:2px solid #121526;border-bottom:0;
}
.logo-master-top:before,.logo-master-top:after{
  content:"";position:absolute;top:4px;width:17px;height:16px;border-radius:45% 45% 35% 35%;
  background:#a71760;border-bottom:4px solid #df2789;
}
.logo-master-top:before{left:4px}.logo-master-top:after{right:4px}
.logo-master-top i{
  position:absolute;left:50%;top:7px;transform:translateX(-50%);z-index:4;
  color:#eef7fc;font:1000 13px/1 Georgia,serif;font-style:normal;
  text-shadow:1px 1px #5b2b79;
}
.logo-master-band{
  position:absolute;left:3px;right:3px;top:27px;height:8px;background:#0b1018;z-index:4;
}
.logo-master-bottom{
  bottom:4px;border-radius:3px 3px 28px 28px;
  background:linear-gradient(135deg,#fbfdff,#d9e6ef 48%,#bfcfda);
  border:2px solid #121526;border-top:0;
}
.logo-master-center{
  position:absolute;width:19px;height:19px;left:50%;top:50%;transform:translate(-50%,-50%);
  z-index:6;border-radius:50%;background:radial-gradient(circle,#ecf8ff 0 34%,#b9d6e8 36% 49%,#111827 51% 66%,#eef8fb 68% 76%,#111827 78%);
}

/* Normal Poké Ball as ADD button */
.pokeball-add .mb-m-fixed,.pokeball-add .mb-m{display:none!important}
.pokeball-add .mb-top{
  background:
    radial-gradient(circle at 30% 20%,rgba(255,255,255,.35) 0 6%,transparent 7%),
    linear-gradient(#ef4b56 0 18%,#d82f3e 19% 74%,#b31f2f 75% 100%)!important;
}
.pokeball-add .mb-top:before,.pokeball-add .mb-top:after{display:none!important}
.pokeball-add .mb-bottom{
  background:linear-gradient(#fff,#edf2f5 58%,#ccd8df)!important;
}
.pokeball-add .mb-band{background:#0a1015!important}
.pokeball-add .mb-center{
  background:radial-gradient(circle,#fff 0 31%,#d6ecf8 32% 42%,#101820 44% 59%,#fff 61% 72%,#101820 74%)!important;
}

/* Bottom nav symmetrical */
.bottom-nav{
  display:grid!important;
  grid-template-columns:1fr 1fr 78px 1fr 1fr!important;
  gap:6px!important;
  padding:9px var(--side) calc(8px + env(safe-area-inset-bottom))!important;
  align-items:end!important;
}
.bottom-nav>button:not(.master-add){
  width:100%!important;height:58px!important;padding:5px 2px!important;
}
.bottom-nav span{
  font-size:7.3px!important;
  letter-spacing:.18px!important;
}
.master-add{
  width:72px!important;height:72px!important;margin:0 auto 12px!important;
}

/* Consistent page header */
.page-head{
  min-height:62px!important;
  padding:9px 12px!important;
}
.page-title-row{gap:10px!important}
.poke-symbol{width:48px!important;height:48px!important;flex:0 0 48px!important}
.page-title-copy h2{font-size:22px!important}
.page-title-copy small{font-size:8px!important;margin-top:4px!important}

/* Home symmetry */
.panel.hero{
  grid-template-columns:124px minmax(0,1fr)!important;
  gap:12px!important;
  padding:12px!important;
}
.dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.stat{padding:10px!important}
.market-pulse{padding:12px!important}
.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.tool-card{min-height:132px!important;padding:12px!important}

/* Complete set browser */
.era-strip,.year-strip{
  display:flex!important;
  gap:5px!important;
  overflow-x:auto!important;
  padding:2px 0 7px!important;
  scrollbar-width:none;
  touch-action:pan-x;
}
.era-strip::-webkit-scrollbar,.year-strip::-webkit-scrollbar{display:none}
.era-strip button,.year-strip button{
  flex:0 0 auto;min-width:54px;height:34px;border:1px solid #2c6d94;border-radius:8px;
  background:#0a304a;color:#a9ccde;font:800 7.5px var(--mono);padding:0 9px;
}
.era-strip button.active,.year-strip button.active{
  background:#e6f3fa;color:#123650;border-color:#70afd1;
}
.set-grid-v21{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.set-card-v21{
  display:grid;
  grid-template-columns:116px minmax(0,1fr);
  min-height:112px;
  overflow:hidden;
  border:1px solid #2e6f95;
  border-radius:11px;
  background:linear-gradient(145deg,#0d3855,#08263d);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 4px 11px rgba(0,0,0,.16);
  color:#e8f7ff;
}
.set-art{
  min-width:0;
  display:grid;
  place-items:center;
  padding:9px;
  background:
    radial-gradient(circle at 50% 38%,rgba(89,181,229,.18),transparent 58%),
    linear-gradient(145deg,#102f4a,#0a2237);
  border-right:1px solid #285f80;
}
.set-art img{
  width:100%;
  height:74px;
  object-fit:contain;
  filter:drop-shadow(0 3px 5px rgba(0,0,0,.32));
}
.set-fallback-mark{
  font:1000 15px var(--mono);color:#81c5e8;letter-spacing:.8px;text-align:center;
}
.set-card-copy{
  min-width:0;padding:10px 11px;
  display:flex;flex-direction:column;justify-content:center;
}
.set-card-title{display:flex;justify-content:space-between;gap:7px;align-items:flex-start}
.set-card-title b{
  min-width:0;font-size:11px;line-height:1.12;overflow-wrap:anywhere;
}
.set-card-title span{
  flex:0 0 auto;font-size:7px;color:#8db6cc;border:1px solid #285f80;padding:3px 5px;border-radius:5px;
}
.set-card-copy>small{
  font-size:7px;color:#77a7c0;margin-top:4px;
}
.set-card-meta{
  display:grid;grid-template-columns:1fr 1fr auto;gap:5px;align-items:center;
}
.set-card-meta em{font-style:normal;font-size:7px;color:#9ac0d4}
.set-card-meta strong{font-size:9px;color:#65d89d}
.set-progress{height:7px!important;margin:8px 0 5px!important}
.set-progress i{background:linear-gradient(90deg,#16b974,#55d89d)!important}

/* Collection and add page closer to mockup */
.collection-tabs{padding:4px!important}
.collection-search{
  grid-template-columns:minmax(0,1fr) 72px 82px!important;
  gap:5px!important;
}
.card-row{border-radius:9px!important}
.add-terminal{padding:12px!important}
.form-grid.two{gap:8px!important}
.form-grid.two label{font-size:8px!important}
.form-grid input,.form-grid select{min-height:44px!important}

/* Detail symmetry */
.card-terminal-hero{
  grid-template-columns:132px minmax(0,1fr)!important;
  gap:12px!important;padding:12px!important;
}
.quote-strip{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.data-grid{grid-template-columns:58px minmax(0,1fr) 74px!important}

/* Responsive fine-tune */
@media(max-width:390px){
  :root{--side:8px;--panel-gap:7px}
  .topbar{grid-template-columns:58px minmax(0,1fr) 50px!important}
  .brand-mark.master-logo{width:54px!important;height:54px!important}
  .brand-copy h1{font-size:20px!important}
  .brand-copy p{font-size:6.7px!important}
  .bottom-nav{grid-template-columns:1fr 1fr 72px 1fr 1fr!important;gap:4px!important}
  .bottom-nav span{font-size:6.6px!important}
  .master-add{width:68px!important;height:68px!important}
  .panel.hero{grid-template-columns:112px minmax(0,1fr)!important}
  .set-card-v21{grid-template-columns:102px minmax(0,1fr)}
}

/* ===== PokéTerminal v2.2 — Original identity + More ===== */

/* Restore the original red/white PokéTerminal brand mark */
.brand-mark.original-brand{
  width:60px!important;height:60px!important;
  position:relative!important;border-radius:50%!important;
  display:grid!important;place-items:center!important;
  background:linear-gradient(#eff7fb,#cfe1ec)!important;
  border:2px solid #dcecf5!important;
  box-shadow:0 4px 12px rgba(0,0,0,.2),inset 0 0 0 2px rgba(255,255,255,.7)!important;
}
.brand-ball{
  position:relative;display:block;width:48px;height:48px;border-radius:50%;
  overflow:hidden;border:3px solid #173047;background:white;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.4);
}
.brand-ball-top{
  position:absolute;left:0;right:0;top:0;height:22px;background:linear-gradient(#f0545d,#d73b47);
}
.brand-ball-bottom{
  position:absolute;left:0;right:0;bottom:0;height:22px;background:linear-gradient(#f8fbfd,#e6eef3);
}
.brand-ball-band{
  position:absolute;left:0;right:0;top:20px;height:8px;background:#163047;z-index:3;
}
.brand-ball-center{
  position:absolute;width:16px;height:16px;border-radius:50%;left:50%;top:50%;
  transform:translate(-50%,-50%);z-index:4;
  background:#f7fbfd;border:4px solid #163047;
}

/* Add button: clean Poké Ball while closed. The black split only appears during opening. */
.pokeball-add .mb-band{
  opacity:0!important;
  transition:opacity .08s linear!important;
}
.pokeball-add .mb-top{
  bottom:auto!important;
  height:50%!important;
  border-radius:38px 38px 0 0!important;
  background:
    radial-gradient(circle at 30% 22%,rgba(255,255,255,.28) 0 6%,transparent 7%),
    linear-gradient(#ef4d58,#d93241 70%,#c52a37)!important;
  box-shadow:inset 0 -1px 0 rgba(0,0,0,.08)!important;
}
.pokeball-add .mb-bottom{
  height:50%!important;
  border-radius:0 0 38px 38px!important;
  background:linear-gradient(#fff,#eef3f6 66%,#d7e0e6)!important;
}
.pokeball-add .mb-center{
  z-index:8!important;
}
.pokeball-add.opening .mb-band{
  opacity:1!important;
}
.pokeball-add.opening .mb-top{
  border-radius:38px 38px 4px 4px!important;
}
.pokeball-add.opening .mb-bottom{
  border-radius:4px 4px 38px 38px!important;
}

/* MORE page */
.more-list{
  display:grid;
  gap:8px;
}
.more-row{
  width:100%;
  min-height:66px;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 18px;
  align-items:center;
  gap:10px;
  padding:9px 11px;
  border:1px solid #2e6e93;
  border-radius:10px;
  background:linear-gradient(145deg,#0d3652,#08263d);
  color:#e8f7ff;
  text-align:left;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 4px 10px rgba(0,0,0,.15);
}
.more-row.featured{
  border-color:#56a9d3;
  background:linear-gradient(145deg,#114a6e,#0a2d46);
}
.more-icon{
  width:40px;height:40px;border-radius:9px;display:grid;place-items:center;
  background:#0d4568;color:#dff4ff;border:1px solid #367da5;
}
.more-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
.more-row b{display:block;font-size:10px}
.more-row small{display:block;font-size:7px;color:#83adc3;margin-top:4px}
.more-row>span:last-child{font-size:22px;color:#84bddb}

/* Navigation symmetry stays fixed */
.bottom-nav{
  grid-template-columns:1fr 1fr 78px 1fr 1fr!important;
}
.bottom-nav button[data-route="more"] .nav-glyph svg{
  fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;
}

/* Slightly soften brand prominence after reverting to original identity */
.brand-copy h1{
  font-size:clamp(22px,5.55vw,26px)!important;
}
.brand-copy p{
  letter-spacing:.95px!important;
}

/* Keep everything aligned on narrow iPhones */
@media(max-width:390px){
  .brand-mark.original-brand{width:54px!important;height:54px!important}
  .brand-ball{width:44px;height:44px}
  .brand-ball-top,.brand-ball-bottom{height:20px}
  .brand-ball-band{top:18px}
}

/* ===== PokéTerminal v2.3 — Collection Data + Quick Add ===== */

.collection-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin-bottom:8px;
}
.collection-kpis>div{
  min-width:0;
  padding:9px 8px;
  border:1px solid #5f99ba;
  border-radius:9px;
  background:linear-gradient(#e8f4fa,#c3ddea);
  color:#153950;
}
.collection-kpis span{
  display:block;font-size:6px;letter-spacing:.65px;color:#5d7d90
}
.collection-kpis b{
  display:block;font-size:15px;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.collection-kpis small{
  display:block;font-size:6px;color:#6b8999;margin-top:3px
}
.collection-search-v23{
  grid-template-columns:minmax(0,1fr) 72px 74px 72px!important;
  gap:5px!important;
}
.collection-tools{
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;margin-bottom:8px
}
.collection-tools button{
  min-height:38px;border:1px solid #2e7199;border-radius:8px;
  background:#0c3855;color:#dff4ff;font:800 7px var(--mono)
}

/* Add search */
.add-mode-tabs{
  display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;margin-bottom:8px;
  border:1px solid #2c6c92;border-radius:10px;background:#082a43
}
.add-mode-tabs button{
  min-height:38px;border:0;border-radius:7px;background:transparent;color:#81abc2;
  font:900 9px var(--mono)
}
.add-mode-tabs button.active{
  background:#e2f0f7;color:#12364d;box-shadow:inset 0 0 0 1px #7eafca
}
.add-search-panel{padding:12px!important}
.quick-search-box{
  display:grid;grid-template-columns:minmax(0,1fr) 82px;gap:6px
}
.quick-search-box input,.quick-search-box button,.quick-search-filters select{
  min-height:44px;border-radius:8px;border:2px solid #6da3c2;
  font-family:var(--mono)
}
.quick-search-box input{padding:0 11px;background:#eaf4f9;color:#173d54;font-size:9px}
.quick-search-box button{background:#0d456a;color:white;font-size:8px;font-weight:900}
.quick-search-filters{
  display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px;margin-top:7px
}
.quick-search-filters select{background:#e5f1f7;color:#173d54;padding:0 8px;font-size:8px}
.quick-results{display:grid;gap:7px;margin-top:12px}
.empty-search,.search-loading{
  min-height:88px;display:grid;place-items:center;text-align:center;padding:14px;
  border:1px dashed #6c9db9;border-radius:9px;color:#5b7e93;font-size:8px;background:rgba(230,244,251,.7)
}
.quick-result{
  display:grid;grid-template-columns:52px minmax(0,1fr) 38px;gap:9px;align-items:center;
  padding:7px;border:1px solid #5f99ba;border-radius:9px;background:linear-gradient(#eaf5fa,#c6e0ed);
  color:#163b52
}
.quick-thumb{width:52px;height:68px;border-radius:6px;overflow:hidden;background:#0b2e49}
.quick-thumb img{width:100%;height:100%;object-fit:contain}
.quick-copy b{display:block;font-size:10px}
.quick-copy span{display:block;font-size:7.5px;margin-top:3px}
.quick-copy small{display:block;font-size:7px;color:#5d7f92;margin-top:3px}
.quick-result>button{
  width:36px;height:36px;border:0;border-radius:8px;background:#0d4a70;color:white;font-size:22px
}

/* Quick add modal */
.quick-modal{
  position:fixed;inset:0;z-index:1000;background:rgba(2,14,24,.72);
  display:grid;place-items:end center;padding:18px 10px calc(18px + env(safe-area-inset-bottom));
  backdrop-filter:blur(5px)
}
.quick-modal-card{
  position:relative;width:min(100%,460px);max-height:88dvh;overflow:auto;
  padding:14px;border:1px solid #4f98c1;border-radius:14px;
  background:linear-gradient(#eaf5fa,#c5dfea);color:#15384f;
  box-shadow:0 18px 50px rgba(0,0,0,.48)
}
.quick-close{
  position:absolute;right:9px;top:8px;width:32px;height:32px;border-radius:50%;border:1px solid #6b9fbc;
  background:#0c3c5c;color:white;font-size:20px;z-index:3
}
.quick-modal-head{display:grid;grid-template-columns:92px minmax(0,1fr);gap:11px;align-items:center;padding-right:32px}
.quick-modal-head img{width:92px;height:128px;object-fit:contain}
.quick-modal-head span{font-size:7px;color:#5f7f91}
.quick-modal-head h3{font-size:22px;margin:4px 0}
.quick-modal-head p{font-size:9px;margin:0}
.quick-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}
.quick-form-grid label,.notes-field{font-size:7px;color:#557a90}
.quick-form-grid input,.quick-form-grid select,.notes-field textarea{
  width:100%;min-height:42px;margin-top:4px;padding:7px;border:2px solid #70a5c4;border-radius:8px;
  background:#f0f7fb;color:#173b51;font:9px var(--mono)
}
.duplicate-warning{
  margin-top:10px;padding:8px;border-radius:8px;border:1px solid #d59a35;background:#fff0c2;color:#5c4517;
  font-size:7.5px;font-weight:800
}
.quick-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}
.quick-modal-actions button{
  min-height:44px;border:1px solid #347ea7;border-radius:8px;background:#dcecf5;color:#173a50;font:900 8px var(--mono)
}
.quick-modal-actions .primary{background:#0c4a70;color:white}

/* Ownership */
.ownership-panel{padding:12px!important}
.text-btn{
  border:1px solid #4e8fb5;border-radius:7px;background:#dbeaf3;color:#17415a;
  font:800 7px var(--mono);padding:6px 8px
}
.ownership-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:9px
}
.ownership-grid>div{
  padding:8px;border:1px solid #89aec3;border-radius:8px;background:rgba(255,255,255,.24)
}
.ownership-grid span{display:block;font-size:6px;color:#668398;letter-spacing:.55px}
.ownership-grid b{display:block;font-size:12px;margin-top:4px}
.ownership-note{font-size:8px;line-height:1.45;color:#3f657b;margin:8px 0 0}

/* Duplicates */
.duplicate-summary p{font-size:8.5px;line-height:1.5;margin:0}
.duplicate-list{display:grid;gap:7px}
.duplicate-row{
  display:grid;grid-template-columns:50px minmax(0,1fr) 44px;gap:9px;align-items:center;
  padding:8px;border:1px solid #2d6c92;border-radius:9px;background:#0b334f;color:#e7f6ff
}
.duplicate-row .thumb{width:50px;height:66px}
.duplicate-row b{display:block;font-size:9px}.duplicate-row span{display:block;font-size:7px;color:#83aec5;margin-top:3px}
.duplicate-row strong{font-size:18px;text-align:center;color:#72dcaa}

/* Stats */
.stats-hero{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:8px
}
.stats-hero>div{
  padding:9px;border:1px solid #2e6d92;border-radius:9px;background:#0b334f;color:#e9f7ff
}
.stats-hero span{display:block;font-size:6px;color:#83adc3}.stats-hero b{display:block;font-size:14px;margin-top:5px}
.stats-block h3{font-size:11px;margin:0 0 10px}
.stats-bars{display:grid;gap:7px}
.stats-bars>div{display:grid;grid-template-columns:58px 1fr 28px;gap:6px;align-items:center}
.stats-bars span,.stats-bars em{font-size:7px;font-style:normal}
.stats-bars i{height:7px;border-radius:6px;background:#8facbd;overflow:hidden}
.stats-bars i b{display:block;height:100%;background:#2aba7b}
.stats-set-list{display:grid;gap:6px}
.stats-set-list>div{display:flex;justify-content:space-between;gap:8px;padding:7px;border-bottom:1px solid rgba(54,116,151,.18)}
.stats-set-list b{font-size:8px}.stats-set-list span{font-size:7px;color:#577d92}

@media(max-width:390px){
  .collection-kpis,.stats-hero{grid-template-columns:repeat(2,1fr)}
  .collection-search-v23{grid-template-columns:minmax(0,1fr) 68px!important}
  .collection-search-v23 select:nth-of-type(2),.collection-search-v23 select:nth-of-type(3){grid-column:auto}
  .ownership-grid{grid-template-columns:repeat(2,1fr)}
}

/* ===== v2.4 — Dimension lock + Scan + Watch Alerts ===== */

/* Precision pass from Cloudflare screen recording */
#view{overflow-x:hidden!important}
#view>*{width:100%;max-width:100%;min-width:0}
.panel,.page-head,.statusbar,.tool-card,.more-row,.card-row,.set-card-v21,.quick-result{
  overflow:hidden;
}
button,select,input,textarea{box-sizing:border-box}
button{white-space:normal}

/* Collection filters no longer squeeze outside their card.
   Search gets a full row, filters share an equal second row. */
.collection-search-v23{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;
  padding:0!important;
}
.collection-search-v23 input{
  grid-column:1/-1!important;
  width:100%!important;
}
.collection-search-v23 select{
  width:100%!important;
  min-width:0!important;
  font-size:7.4px!important;
  padding-left:6px!important;
  padding-right:16px!important;
}
.collection-tools{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;
}
.collection-tools button{
  min-width:0!important;
  padding:5px 3px!important;
  font-size:6.4px!important;
  letter-spacing:0!important;
  overflow:hidden;
}
.collection-tools button:nth-child(3){font-size:6.1px!important}

/* Card detail: prevent labels/source buttons from escaping boxes */
.quote-strip>div,.data-grid>div,.ownership-grid>div{min-width:0!important;overflow:hidden!important}
.quote-strip small,.data-grid b,.ownership-grid b{overflow-wrap:anywhere}
.detail-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
.detail-actions .btn{width:100%!important;min-width:0!important;padding-inline:4px!important}
.source-badge{max-width:100%!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Set browser: keep horizontal filters intentional, not accidental page overflow */
.era-strip,.year-strip{
  max-width:100%!important;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}
.set-card-v21{width:100%!important}
.set-card-copy,.set-card-title{min-width:0!important}
.set-card-title b{max-width:100%;overflow:hidden;text-overflow:ellipsis}

/* Home tool cards: button always remains inside */
.tool-card{position:relative;overflow:hidden!important}
.tool-card button{
  max-width:calc(100% - 20px)!important;
  right:10px!important;bottom:10px!important;
}

/* Add tabs */
.add-mode-tabs.three{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.add-mode-tabs.three button{min-width:0!important;font-size:7.5px!important;padding:0 4px!important}

/* Scanner */
.scan-panel{padding:12px!important}
.scan-frame{
  position:relative;min-height:300px;border-radius:12px;overflow:hidden;
  border:1px solid #3b7fa5;background:
   linear-gradient(135deg,rgba(65,155,207,.07),transparent 40%),
   #071e31;
  display:grid;place-items:center;
}
.scan-frame:before{
  content:"";position:absolute;left:50%;top:50%;width:205px;height:282px;
  transform:translate(-50%,-50%);border:1px dashed rgba(113,194,235,.55);border-radius:9px;
}
.scan-corners:before,.scan-corners:after{
  content:"";position:absolute;width:34px;height:34px;border-color:#64d0ff;border-style:solid
}
.scan-corners:before{left:calc(50% - 111px);top:calc(50% - 148px);border-width:3px 0 0 3px}
.scan-corners:after{right:calc(50% - 111px);bottom:calc(50% - 148px);border-width:0 3px 3px 0}
.scan-copy{position:relative;z-index:2;text-align:center;color:#bfe9fb;padding:20px}
.scan-copy b{display:block;font-size:12px}.scan-copy small{display:block;font-size:8px;line-height:1.5;margin-top:6px;color:#78a9c3}
.scan-frame img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#071e31;z-index:3
}
.scan-frame.has-photo:before,.scan-frame.has-photo .scan-copy,.scan-frame.has-photo .scan-corners{display:none}
.scan-camera{margin-top:8px!important;min-height:44px!important}
.scan-assist{margin-top:12px}
.scan-step{display:grid;grid-template-columns:30px 1fr;gap:8px;align-items:center;margin:8px 0}
.scan-step>span{width:30px;height:30px;border-radius:7px;display:grid;place-items:center;background:#0d4568;color:white;font-size:9px}
.scan-step b{display:block;font-size:9px}.scan-step small{display:block;font-size:7px;color:#5d7f93;margin-top:2px}
.scan-note{margin-top:10px!important}

/* Watchlist & alerts */
.alert-banner{
  margin-bottom:8px;padding:10px 12px;border:1px solid #42b77d;border-radius:10px;
  background:linear-gradient(135deg,#0d5138,#0a3b31);color:#d8ffec;
}
.alert-banner b{display:block;font-size:10px}.alert-banner small{display:block;font-size:7px;margin-top:3px;color:#9de0bd}
.watch-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:8px}
.watch-actions button{
  min-height:40px;border:1px solid #32779f;border-radius:8px;background:#0c3957;color:#e4f6ff;font:800 7px var(--mono)
}
.watch-list-v24{display:grid;gap:7px}
.watch-row-v24{
  display:grid;grid-template-columns:52px minmax(0,1fr) 72px;gap:8px;align-items:center;
  padding:8px;border:1px solid #2e6c91;border-radius:9px;background:#0a314c;color:#e8f7ff
}
.watch-row-v24.target-hit{border-color:#35b879;box-shadow:inset 0 0 0 1px rgba(62,209,139,.12)}
.watch-row-v24 .thumb{width:52px;height:68px}
.watch-row-v24 b{display:block;font-size:9px}.watch-row-v24 span{display:block;font-size:7px;color:#83acc3;margin-top:3px}
.watch-row-v24 small{display:block;font-size:7px;color:#9fc1d2;margin-top:4px}
.watch-side{text-align:right}.watch-side strong{display:block;font-size:7px}.watch-side button{margin-top:6px;border:1px solid #3a7ca1;border-radius:6px;background:#0d4568;color:white;font:700 6px var(--mono);padding:5px}
.watch-picker-list{display:grid;gap:6px;margin-top:10px}
.watch-picker-list button{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;text-align:left;padding:9px;border:1px solid #74a5bf;border-radius:8px;background:#e5f0f6;color:#173b51}
.watch-picker-list button span{font-size:9px;font-weight:900}.watch-picker-list button small{font-size:7px;color:#628094}.watch-picker-list button b{grid-column:2;grid-row:1/3;font-size:20px;align-self:center}
.alert-info p{font-size:8px;line-height:1.5;margin:0}
.more-row.has-alert{border-color:#35b879!important}
.batch-textarea{width:100%;margin:10px 0;min-height:190px;border:2px solid #70a5c4;border-radius:8px;padding:9px;background:#f0f7fb;color:#173b51;font:8px/1.5 var(--mono)}

/* Tightest iPhone pass */
@media(max-width:390px){
  .collection-tools button{font-size:5.9px!important}
  .watch-row-v24{grid-template-columns:48px minmax(0,1fr) 64px}
  .watch-row-v24 .thumb{width:48px;height:64px}
  .scan-frame{min-height:280px}
}
