/* v181 — WildDex signature masthead and field-journal atmosphere. */
body {
  background:
    radial-gradient(circle at 8% 4%, rgba(225,190,76,.14), transparent 24rem),
    radial-gradient(circle at 92% 18%, rgba(43,132,90,.12), transparent 28rem),
    #f7f5eb;
}

.app-shell::before {
  content:'';
  position:fixed;
  z-index:-1;
  inset:0;
  pointer-events:none;
  opacity:.28;
  background-image:repeating-linear-gradient(115deg,rgba(31,91,63,.035) 0 1px,transparent 1px 13px);
}

.topbar {
  isolation:isolate;
  overflow:hidden;
  min-height:94px;
  margin:0 0 22px;
  padding:15px 16px 16px;
  border:2px solid #d7b448;
  border-radius:22px 30px 22px 30px;
  background:
    radial-gradient(circle at 89% 8%,rgba(255,223,111,.22),transparent 23%),
    linear-gradient(135deg,#0d3c2d 0%,#14553c 48%,#287a51 100%);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.09),inset 0 -10px 25px rgba(3,29,20,.18),0 13px 29px rgba(10,58,39,.23);
}

.topbar::before {
  content:'';
  position:absolute;
  z-index:-1;
  width:145px;
  height:145px;
  right:-45px;
  top:-72px;
  transform:rotate(17deg);
  opacity:.22;
  background:#ffe485;
  clip-path:polygon(50% 0,61% 36%,100% 50%,61% 64%,50% 100%,39% 64%,0 50%,39% 36%);
}

.topbar::after {
  left:16px;
  right:16px;
  bottom:9px;
  height:2px;
  background:linear-gradient(90deg,#f1c84d,rgba(255,234,153,.78),transparent);
}

.brand-emblem {
  flex-basis:54px;
  width:54px;
  height:54px;
  border:3px solid #f2cb55;
  border-radius:16px 22px 16px 22px;
  background:linear-gradient(145deg,#fff9d8,#cde7bd);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.9),0 7px 16px rgba(0,24,15,.34);
}
.brand-emblem { flex:0 0 64px; width:64px; height:64px; border:0!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; transform:none!important; }
.brand-emblem img { display:block; width:64px; height:64px; object-fit:contain; filter:drop-shadow(0 4px 2px rgba(5,42,59,.28)); }

.brand-emblem svg { width:46px; height:46px; stroke:#0e5036; stroke-width:3.4; }
.brand-emblem .brand-book { fill:#fffdf1; }
.brand-emblem .brand-leaf { fill:#69ae4b; }
.brand-emblem .brand-spark { stroke:#d59400; }

.topbar .brand-words .eyebrow {
  margin-bottom:4px;
  color:#f2d47a;
  font-size:9px;
  letter-spacing:.24em;
  text-shadow:0 2px 5px rgba(0,0,0,.3);
}
.topbar .brand-words .eyebrow::before { background:#f4c948; }

.topbar .brand-words h1 {
  color:#fffdf1;
  font-size:clamp(27px,6vw,34px);
  letter-spacing:.015em;
  text-shadow:0 3px 0 #0b3c2b,0 7px 14px rgba(0,0,0,.28);
}
.topbar .brand-words h1::before {
  right:8%;
  height:4px;
  background:linear-gradient(90deg,#f5c83f,#fff0a8 60%,transparent);
  box-shadow:0 2px 6px rgba(0,0,0,.2);
}
.topbar .brand-words h1::after { color:#ffe16d; font-size:13px; text-shadow:0 2px 5px rgba(0,0,0,.3); }

.topbar .weather-widget {
  border-color:rgba(255,229,139,.72);
  background:rgba(255,255,255,.12);
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14),0 6px 15px rgba(0,27,17,.23);
  backdrop-filter:blur(8px);
}
.topbar .weather-icon { color:#e8f6ff; }
.topbar .weather-value { background:linear-gradient(145deg,#f4c842,#ffe994); color:#164a35; text-shadow:none; }
.topbar .avatar {
  border:3px solid #f1ce62;
  background:linear-gradient(145deg,#fff8d9,#dceecf);
  color:#15583d;
  box-shadow:0 7px 16px rgba(0,27,17,.3);
}

@media (max-width:420px) {
  .topbar { min-height:82px; margin-bottom:17px; padding:11px 10px 13px; border-radius:18px 24px 18px 24px; }
  .brand-emblem { flex-basis:49px; width:49px; height:49px; }
  .brand-emblem img { width:49px; height:49px; }
  .topbar .brand-lockup { gap:6px; }
  .topbar .brand-words h1 { font-size:20px; white-space:nowrap; }
  .topbar .brand-words .eyebrow { font-size:7px; letter-spacing:.14em; }
  .topbar .avatar { flex-basis:39px; width:39px; height:39px; }
}

/* Original WildDex species explorer — every mark below is drawn for this app. */
.species-explorer { position:relative; isolation:isolate; overflow:hidden; padding:24px!important; border:3px solid #d8b54b!important; border-radius:22px 34px 22px 34px!important; background:radial-gradient(circle at 92% 5%,rgba(255,220,104,.24),transparent 25%),linear-gradient(145deg,#0d382c 0%,#16563e 56%,#1c7250 100%)!important; box-shadow:inset 0 0 0 2px rgba(255,255,255,.1),inset 0 -18px 42px rgba(0,25,16,.2),0 15px 31px rgba(12,59,41,.22)!important; }
.species-explorer::before { content:''; position:absolute; z-index:-1; width:170px; height:170px; right:-62px; bottom:-85px; border:16px solid rgba(255,239,176,.08); border-radius:50%; box-shadow:0 0 0 13px rgba(255,239,176,.045); }
.species-explorer::after { width:110px!important; height:110px!important; right:-31px!important; top:-47px!important; border-radius:0!important; opacity:.18; background:#ffe37b!important; clip-path:polygon(50% 0,61% 36%,100% 50%,61% 64%,50% 100%,39% 64%,0 50%,39% 36%); }
.explorer-heading { display:flex; align-items:center; gap:14px; }
.explorer-crest { display:grid; place-items:center; flex:0 0 68px; width:68px; height:68px; transform:rotate(-2deg); filter:drop-shadow(0 6px 8px rgba(0,20,12,.3)); }
.explorer-crest svg { width:68px; height:68px; overflow:visible; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.explorer-crest .crest-ring { fill:#f7e29a; stroke:#082f23; stroke-width:4; }
.explorer-crest .crest-lens { fill:#eaf6df; stroke:#0a4833; stroke-width:3.5; }
.explorer-crest .crest-leaf { fill:#77b951; stroke:#0a4833; stroke-width:3; }
.explorer-crest .crest-vein { stroke:#ffe36c; stroke-width:2.5; }
.explorer-crest .crest-track { fill:#e78439; stroke:#713114; stroke-width:2.5; }
.explorer-crest .crest-spark { stroke:#fff1a7; stroke-width:4; }
.explorer-title { min-width:0; }
.species-explorer .explorer-title small { display:block; margin-bottom:3px; color:#f1cf66; font-size:9px; font-weight:950; letter-spacing:.22em; }
.species-explorer .explorer-title h2 { display:block; margin:0!important; color:#fffdf0!important; font-size:25px!important; font-weight:950; letter-spacing:.035em; line-height:1.15; text-shadow:0 3px 0 #083326,0 6px 12px rgba(0,0,0,.28); }
.species-explorer .explorer-title h2::before { display:none!important; }
.species-explorer .explorer-copy { margin:15px 0 17px!important; color:#f6f1d8!important; font-size:14px!important; font-weight:800!important; line-height:1.65!important; text-shadow:0 2px 5px rgba(0,0,0,.22); }
.species-explorer .explorer-copy span { color:#bfe2ca; font-size:12px; font-weight:700; }
.species-explorer > .explorer-search { display:flex; min-height:62px; padding:5px 7px 5px 10px!important; border:3px solid #e4c35e!important; border-radius:16px 24px 16px 24px!important; background:#fffdf3!important; box-shadow:inset 0 0 0 2px #fff,inset 0 -5px 12px rgba(120,79,10,.08),0 8px 18px rgba(0,28,18,.25)!important; transform:none!important; }
.species-explorer > .explorer-search::before { display:none!important; }
.explorer-search-mark { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; }
.explorer-search-mark svg { width:34px; height:34px; fill:none; stroke:#146245; stroke-width:3.5; stroke-linecap:round; stroke-linejoin:round; }
.species-explorer #speciesSearch { padding:13px 8px!important; color:#103d2d; font-size:17px; font-weight:900; }
.species-explorer #speciesSearch::placeholder { color:#758c80; font-weight:750; }
.explorer-search-end { align-self:stretch; display:grid; place-items:center; min-width:57px; padding:0 10px; border-radius:11px 18px 11px 18px; background:linear-gradient(145deg,#e69a37,#f2c24d); color:#173e2e; font-size:10px; font-weight:950; letter-spacing:.13em; box-shadow:inset 0 0 0 2px rgba(255,255,255,.35); }
.species-explorer > .explorer-search:focus-within { border-color:#fff0a4!important; box-shadow:0 0 0 4px rgba(245,205,79,.24),0 10px 22px rgba(0,28,18,.28)!important; }
.species-explorer #speciesResults:not(:empty) { border-color:#e1c76d; background:#fffdf4; }
@media (max-width:420px) { .species-explorer { padding:18px!important; border-radius:19px 28px 19px 28px!important; } .explorer-heading { gap:10px; } .explorer-crest,.explorer-crest svg { width:55px; height:55px; } .explorer-crest { flex-basis:55px; } .species-explorer .explorer-title h2 { font-size:21px!important; } .species-explorer .explorer-copy { font-size:12px!important; } .species-explorer > .explorer-search { min-height:57px; } .explorer-search-end { min-width:47px; padding:0 7px; font-size:9px; } }

/* Original library search mark. */
#library .record-search-mark { display:grid!important; place-items:center; width:34px!important; height:34px!important; flex:0 0 34px!important; border-radius:10px 15px 10px 15px!important; background:linear-gradient(145deg,#1b6848,#3f9165)!important; box-shadow:inset 0 0 0 2px rgba(255,255,255,.18),0 4px 10px rgba(20,77,48,.17); }
#library .record-search-mark svg { width:27px; height:27px; fill:none; stroke:#fff7d9; stroke-width:3.2; stroke-linecap:round; stroke-linejoin:round; }

/* Rank ornaments drawn as geometry rather than font symbols. */
.hero.rank-clickable > div > p::before,.friend-rank-summary > div > p::before { content:''!important; width:8px; height:8px; flex:0 0 8px; transform:rotate(45deg); border:2px solid color-mix(in srgb,var(--rank-soft) 84%,white); background:color-mix(in srgb,var(--rank-accent) 35%,transparent); box-shadow:0 2px 5px var(--rank-shadow); }
.hero.rank-clickable .rank-badge::before,.friend-rank-summary .rank-badge::before { content:''!important; width:11px; height:11px; flex:0 0 11px; margin-right:7px; background:currentColor; clip-path:polygon(50% 0,61% 36%,100% 50%,61% 64%,50% 100%,39% 64%,0 50%,39% 36%); }

/* Every species photo must remain fully visible, regardless of portrait or landscape ratio. */
.species-dialog #speciesImage { width:100%!important; height:clamp(220px,48vh,420px)!important; overflow:hidden!important; display:flex!important; align-items:center!important; justify-content:center!important; }
.species-dialog #speciesImage img { display:block!important; width:100%!important; height:100%!important; max-width:100%!important; max-height:100%!important; object-fit:contain!important; object-position:center!important; background:#e7eee8!important; }

/* Original WildDex new-entry studio. */
#add { --entry-deep:#0d4d38; --entry-green:#176a4a; --entry-gold:#e2ad3c; --entry-cream:#fffaf0; }
#add .page-heading { position:relative; overflow:hidden; margin:4px 0 18px; padding:19px 20px 18px 76px; border:3px solid #0b4935; border-radius:17px 30px 17px 30px; background:linear-gradient(135deg,#0c4936,#16704e 70%,#235f42); color:#fff9e5; box-shadow:inset 0 0 0 2px rgba(241,190,77,.58),0 10px 22px rgba(9,62,43,.2); }
#add .page-heading::before { content:''; position:absolute; left:9px; top:50%; width:61px; height:61px; border:0; background:url('assets/record-icons/record-entry-v193.png?v=193') center/contain no-repeat; filter:drop-shadow(0 4px 2px rgba(3,35,28,.38)); transform:translateY(-50%); }
#add .page-heading::after { content:''; position:absolute; right:-19px; bottom:-23px; width:105px; height:70px; border:13px solid rgba(255,231,159,.11); border-radius:50%; transform:rotate(-18deg); }
#add .page-heading .eyebrow { color:#ffd978; font-size:9px; font-weight:950; letter-spacing:.23em; }
#add .page-heading h2 { margin:3px 0!important; color:#fffdf2; font-size:26px; font-weight:950; letter-spacing:.04em; text-shadow:0 3px 0 rgba(5,45,31,.55); }
#add .page-heading > p:not(.eyebrow) { color:#d9f1df!important; font-size:12px!important; font-weight:750; }
#add #observationForm { gap:16px; }
#add .photo-picker { position:relative; height:210px; border:4px solid var(--entry-deep); border-radius:16px 30px 16px 30px; background:linear-gradient(145deg,#eef7e9,#fffaf0); color:var(--entry-deep); box-shadow:inset 0 0 0 3px #f0c761,inset 0 0 0 7px #fff8dc,0 9px 21px rgba(13,77,56,.14); }
#add .photo-picker::before,#add .photo-picker::after { content:''; position:absolute; z-index:2; width:18px; height:18px; border:3px solid #d79c27; transform:rotate(45deg); pointer-events:none; }
#add .photo-picker::before { left:10px; top:10px; border-right:0; border-bottom:0; }
#add .photo-picker::after { right:10px; bottom:10px; border-left:0; border-top:0; }
#add #photoPlaceholder { display:flex; align-items:center; gap:10px; padding:11px 17px; border:2px solid #2d7858; border-radius:10px 18px; background:rgba(255,255,255,.8); box-shadow:0 5px 13px rgba(13,77,56,.1); }
#add #photoPlaceholder b { display:grid; place-items:center; width:34px; height:34px; border:3px solid #fff1be; border-radius:50%; background:var(--entry-green); color:#fff8db; line-height:1; box-shadow:0 0 0 3px var(--entry-green); }
#add fieldset { position:relative; gap:15px; padding:19px 17px 18px; border:2px solid #9fc3a7; border-radius:14px 25px 14px 25px; background:linear-gradient(145deg,#fffef9,#f4f8ef); box-shadow:inset 0 0 0 2px rgba(255,255,255,.8),0 7px 17px rgba(18,73,48,.08); }
#add fieldset::after { content:''; position:absolute; right:12px; top:11px; width:9px; height:9px; border:2px solid #d4a438; transform:rotate(45deg); }
#add legend { padding:5px 14px 5px 11px; border-left:5px solid var(--entry-gold); border-radius:4px 13px 13px 4px; background:var(--entry-deep); color:#fff8da; font-size:15px; font-weight:950; letter-spacing:.06em; box-shadow:3px 4px 0 rgba(218,170,60,.35); }
#add fieldset label,#add .field-label { color:#194b38; font-size:12px; font-weight:900; letter-spacing:.025em; }
#add input,#add textarea,#add select { border:2px solid #b4ceb8; border-radius:10px 17px 10px 17px; background:#fffefa; color:#153d2e; box-shadow:inset 0 2px 4px rgba(20,70,43,.04); }
#add input:focus,#add textarea:focus,#add select:focus { outline:3px solid rgba(226,173,60,.25); border-color:#297655; }
#add .kind-buttons { gap:7px; }
#add .kind-buttons button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:96px; padding:8px 3px; border:3px solid #a9c5ac!important; border-radius:12px 20px 12px 20px!important; background:linear-gradient(145deg,#fffef8,#e8f2e5); color:#436456; box-shadow:inset 0 0 0 2px #fff,0 5px 11px rgba(12,70,47,.09); font-size:12px; font-weight:950; }
#add .kind-buttons .kind-icon { display:block; width:53px; height:53px; object-fit:contain; filter:drop-shadow(0 4px 2px rgba(7,44,71,.3)); }
#add .kind-buttons button.is-selected { border-color:#0d533b!important; background:linear-gradient(145deg,#0d503a,#287a56); color:#fff7dc; box-shadow:inset 0 0 0 2px #e7bb4d,0 7px 15px rgba(10,70,48,.22); transform:translateY(-1px); }
#add .kind-buttons button.is-selected .kind-icon { filter:drop-shadow(0 4px 2px rgba(0,0,0,.42)) saturate(1.12); }
#add #locationButton { border:3px solid #145b42; border-radius:11px 19px; background:linear-gradient(145deg,#fffdf3,#edf5e9); color:#14553e; box-shadow:inset 0 0 0 2px #f0d37e; }
#add .submit { min-height:58px; border:3px solid #083f2e; border-radius:12px 23px; background:linear-gradient(135deg,#0a4b36,#247654); color:#fff5d2; box-shadow:inset 0 0 0 2px #e5b94e,0 9px 19px rgba(8,66,45,.23); font-size:16px; font-weight:950; letter-spacing:.08em; }
@media(max-width:420px){#add .page-heading{padding-left:70px}#add .kind-buttons button{min-height:94px;font-size:11px}#add .kind-buttons .kind-icon{width:47px;height:47px}}

/* Rank journey: mission board, collection and next-rank motivation. */
.rank-criteria-dialog { border:3px solid #0b4935!important; border-radius:19px 34px 19px 34px!important; background:linear-gradient(150deg,#f9f8ed,#eef5e9)!important; box-shadow:inset 0 0 0 2px #e4bc51,0 24px 70px rgba(5,45,31,.42); }
.rank-criteria-dialog .rank-dialog-inner { padding:22px 18px 28px; }
.rank-dialog-hero { display:flex; align-items:center; gap:13px; margin:-2px -1px 18px; padding:18px; border:3px solid #0b4734; border-radius:14px 27px 14px 27px; background:linear-gradient(135deg,#0b4835,#176c4c); color:#fff9df; box-shadow:inset 0 0 0 2px #dcb03f,0 9px 19px rgba(9,64,43,.18); }
.rank-dialog-hero .rank-ui-icon { width:55px; height:55px; flex:0 0 55px; }
.rank-dialog-hero p,.rank-dialog-hero span { color:#d9f1df!important; font-size:11px; font-weight:750; }
.rank-dialog-hero p { color:#ffd773!important; font-size:8px; font-weight:950; letter-spacing:.2em; }
.rank-dialog-hero h2 { margin:2px 0!important; color:#fffdf1; font-size:24px; font-weight:950; letter-spacing:.05em; }
.rank-ui-icon { display:block; width:42px; height:42px; object-fit:contain; filter:drop-shadow(0 3px 2px rgba(4,32,65,.35)); }
.rank-current { display:flex!important; align-items:center; gap:13px; margin:0 0 15px!important; padding:13px 16px!important; border:3px solid #184f3c!important; border-radius:12px 22px!important; background:linear-gradient(145deg,#fff9e7,#e8f2e3)!important; box-shadow:inset 0 0 0 2px #e2b949,0 7px 15px rgba(12,69,47,.1); }
.rank-current > span { display:grid; place-items:center; width:62px; height:62px; flex:0 0 62px; }
.rank-current .rank-mark { width:58px!important; height:58px!important; }
.rank-current div { display:grid; }
.rank-current small { color:#a56e0a!important; font-size:8px!important; font-weight:950; letter-spacing:.18em; }
.rank-current b { color:#103f2f; font-size:21px; font-weight:950; }
.rank-current em { color:#527063; font-size:12px; font-style:normal; font-weight:750; }
.rank-next-panel { padding:15px; border:3px solid #174f3c; border-radius:14px 25px; background:linear-gradient(145deg,#0e4e39,#1d7351); box-shadow:inset 0 0 0 2px rgba(231,188,77,.75),0 9px 20px rgba(7,57,38,.2); }
.rank-next-panel h3,.rank-criteria-dialog summary { display:flex; align-items:center; gap:11px; color:#fff7d7; }
.rank-next-panel h3 { margin:0 0 12px; font-size:15px; }
.rank-next-panel h3 small,.rank-criteria-dialog summary small { display:block; color:#f4c75a; font-size:8px; letter-spacing:.17em; }
.rank-next-panel .rank-need-list { margin:0; }
.rank-next-panel .rank-need-list li { margin-top:7px; border:1px solid rgba(255,239,185,.34); border-radius:8px 14px; background:rgba(255,255,255,.09); color:#fffbe9; }
.rank-next-panel .rank-need-list li.done { position:relative; border:4px solid #ffffff; background:linear-gradient(105deg,#fff000 0%,#ffbf00 52%,#fff600 100%); color:#071f3c; font-weight:950; text-shadow:0 1px 0 #ffffff; box-shadow:inset 0 0 0 3px #9b5c00,0 0 0 3px #ffd000,0 0 22px 7px rgba(255,222,0,.74),0 6px 0 #704300; transform:translateY(-2px) scale(1.01); }
.rank-next-panel .rank-need-list li.done::after { content:'達成！'; float:right; margin-left:8px; padding:3px 8px; border:3px solid #ffffff; border-radius:5px 11px; background:#071f3c; color:#fff200; font-size:10px; font-weight:950; letter-spacing:.14em; box-shadow:0 2px 0 #9b5c00; }
.rank-criteria-dialog details { margin-top:13px; border:4px solid #ffd62e; border-radius:12px 22px; background:#fffef8; box-shadow:inset 0 0 0 3px #123f72,0 7px 0 #744400,0 11px 20px rgba(7,40,70,.26); overflow:hidden; }
.rank-criteria-dialog summary { padding:14px 15px; background:linear-gradient(112deg,#082d5b 0%,#126f91 46%,#079467 100%); color:#ffffff; font-size:14px; font-weight:950; list-style:none; cursor:pointer; text-shadow:0 2px 0 #021b37; }
.rank-criteria-dialog .rank-all-details summary { background:linear-gradient(112deg,#5d1900 0%,#e24b14 48%,#ffbd00 100%); color:#ffffff; }
.rank-criteria-dialog .rank-marks-details summary { background:linear-gradient(112deg,#351070 0%,#8f28b9 47%,#008da8 100%); color:#ffffff; }
.rank-criteria-dialog details[open] { border-color:#ffffff; box-shadow:inset 0 0 0 3px #ffd62e,0 7px 0 #744400,0 0 25px rgba(255,203,20,.65); }
.rank-criteria-dialog summary::-webkit-details-marker { display:none; }
.rank-criteria-dialog summary::after { content:'›'; margin-left:auto; color:#f5cd65; font-size:25px; transform:rotate(90deg); }
.rank-criteria-dialog details[open] summary::after { transform:rotate(-90deg); }
.rank-criteria-dialog summary .rank-ui-icon { width:36px; height:36px; flex:0 0 36px; }
.rank-criteria-dialog .rank-all,.rank-criteria-dialog .rank-style-list { margin:10px; }
.rank-criteria-dialog .rank-style-item { border-width:2px!important; border-radius:10px 18px!important; box-shadow:0 4px 10px rgba(15,65,45,.08); }
.rank-criteria-dialog .rank-style-list { display:grid; gap:10px; }
.rank-criteria-dialog .rank-style-item { grid-template-columns:54px 78px 1fr!important; min-height:70px; margin:0!important; padding:9px 12px!important; border:4px solid var(--row-line,#fff)!important; color:var(--row-text,#fff)!important; background:var(--row-bg)!important; box-shadow:inset 0 0 0 2px rgba(255,255,255,.42),0 5px 0 color-mix(in srgb,var(--row-line,#fff) 55%,black)!important; }
.rank-criteria-dialog .rank-style-item > span img { width:48px!important; height:48px!important; object-fit:contain; filter:drop-shadow(0 3px 2px rgba(0,0,0,.35)); }
.rank-criteria-dialog .rank-style-item b { color:inherit; font-size:14px; text-shadow:0 2px 0 rgba(0,0,0,.45); }
.rank-criteria-dialog .rank-style-item small { color:inherit!important; font-weight:900; text-shadow:0 2px 0 rgba(0,0,0,.45); }
.rank-style-item.rank-row-1{--row-bg:linear-gradient(125deg,#174c35,#4f9e65);--row-line:#ffe05d;--row-text:#fff}
.rank-style-item.rank-row-2{--row-bg:linear-gradient(125deg,#075c79,#19b2c4);--row-line:#fff06a;--row-text:#fff}
.rank-style-item.rank-row-3{--row-bg:linear-gradient(125deg,#8e2031,#d65b62);--row-line:#ffe45c;--row-text:#fff}
.rank-style-item.rank-row-4{--row-bg:linear-gradient(125deg,#54227b,#9b5bc1);--row-line:#bfffe1;--row-text:#fff}
.rank-style-item.rank-row-5{--row-bg:linear-gradient(125deg,#f0a900,#ffe66c);--row-line:#173c54;--row-text:#102f43}
.rank-style-item.rank-row-6{--row-bg:linear-gradient(125deg,#cdd8dd,#f7f1ca);--row-line:#633181;--row-text:#172f3b}
.rank-style-item.rank-row-7{--row-bg:linear-gradient(125deg,#102c70,#315ab6);--row-line:#ffcf4c;--row-text:#fff}
.rank-style-item.rank-row-8{--row-bg:linear-gradient(125deg,#5a2c13,#b06d2c);--row-line:#7de7da;--row-text:#fff}
.rank-style-item.rank-row-9{--row-bg:linear-gradient(125deg,#aebbc2,#eef2f3);--row-line:#6b237f;--row-text:#172f3b}
.rank-style-item.rank-row-10{--row-bg:linear-gradient(125deg,#d19b09,#ffe06a);--row-line:#252052;--row-text:#172d48}

/* Original WildDex profile atelier. */
#profile .back-button { margin-bottom:10px; padding:8px 13px; border:2px solid #286e50; border-radius:9px 16px; background:#fffdf3; color:#15503a; box-shadow:inset 0 0 0 2px #ead078; }
#profile .page-heading { position:relative; overflow:hidden; padding:20px 18px 19px 78px; border:3px solid #103f31; border-radius:17px 30px; background:linear-gradient(135deg,#133f34,#276e53); color:#fff9e3; box-shadow:inset 0 0 0 2px #dab148,0 10px 22px rgba(12,56,42,.19); }
#profile .page-heading::before { content:''; position:absolute; left:10px; top:50%; width:60px; height:60px; border:0; background:url('assets/profile/profile-field-journal-v193.png?v=193') center/contain no-repeat; filter:drop-shadow(0 4px 2px rgba(4,38,29,.38)); transform:translateY(-50%); }
#profile .page-heading .eyebrow { color:#f5cf69; font-size:9px; font-weight:950; letter-spacing:.2em; }
#profile .page-heading h2 { margin:3px 0!important; color:#fffdf2; font-size:25px; font-weight:950; letter-spacing:.06em; }
#profile .page-heading > p:not(.eyebrow) { color:#d9eee0!important; font-size:12px!important; font-weight:750; }
#profile .account-panel { margin:16px 0; padding:15px; border:3px solid #a6c2a8; border-radius:13px 23px; background:linear-gradient(145deg,#fffef8,#edf4e9); box-shadow:inset 0 0 0 2px #fff,0 6px 14px rgba(14,65,44,.08); }
#profile .account-panel p { color:#426254; font-size:12px; font-weight:750; line-height:1.6; }
#profile .profile-photo-picker { width:142px; height:142px; border:5px solid #124e39; outline:4px solid #e0b849; outline-offset:-9px; background:linear-gradient(145deg,#eff6e9,#fff8dd); box-shadow:inset 0 0 0 4px rgba(255,255,255,.75),0 10px 24px rgba(12,65,43,.2); }
#profile fieldset { border:3px solid #9fbea4; border-radius:14px 25px; background:linear-gradient(145deg,#fffef9,#eff5eb); box-shadow:inset 0 0 0 2px #fff,0 7px 16px rgba(15,68,47,.08); }
#profile legend { padding:5px 14px 5px 11px; border-left:5px solid #e0ac38; border-radius:4px 13px 13px 4px; background:#124936; color:#fff7d7; font-weight:950; box-shadow:3px 4px 0 rgba(218,170,60,.34); }
#profile fieldset label { color:#174a36; font-size:12px; font-weight:900; }
#profile input,#profile textarea,#profile select { border:2px solid #b2cbb5; border-radius:10px 17px; background:#fffefa; }
#profile .info-box { border:2px solid #a5c0a6; border-left:7px solid #d6a42f; border-radius:11px 21px; background:linear-gradient(145deg,#edf6e9,#fff9e7); color:#234f3d; }
#profile .submit { min-height:57px; border:3px solid #083f2e; border-radius:12px 23px; background:linear-gradient(135deg,#0b4b36,#287857); color:#fff6d6; box-shadow:inset 0 0 0 2px #e2b646,0 9px 19px rgba(8,64,44,.22); font-size:16px; font-weight:950; letter-spacing:.08em; }

/* Family premium: a collectible album cover, not a plain utility button. */
.family-premium-trigger { position:relative; display:grid!important; grid-template-columns:64px 1fr 24px; align-items:center; gap:12px; overflow:hidden; min-height:95px; margin:18px 0 0!important; padding:13px 15px!important; border:4px solid #0a4634!important; border-radius:15px 29px!important; background:linear-gradient(135deg,#0a4936 0%,#176d4d 65%,#8b6618 140%)!important; color:#fff9df!important; box-shadow:inset 0 0 0 2px #e2b743,inset 0 -20px 35px rgba(0,0,0,.08),0 11px 24px rgba(7,57,39,.23)!important; }
.family-premium-trigger::after { content:''; position:absolute; right:-24px; top:-34px; width:105px; height:105px; border:15px solid rgba(255,226,137,.11); border-radius:50%; }
.family-premium-trigger .family-trigger-icon { display:block; width:66px; height:66px; padding:0; border:0; border-radius:0; background:transparent; object-fit:contain; box-shadow:none; filter:drop-shadow(0 5px 2px rgba(4,45,31,.35)); }
.family-premium-trigger .family-icon-accent { fill:#efbb42; stroke:#9d6910; }
.family-premium-trigger span { display:block; min-width:0; }
.family-premium-trigger b { display:block; color:#fffdf1; font-size:15px; font-weight:950; letter-spacing:.035em; }
.family-premium-trigger small { color:#f5d67d; font-size:10px; font-weight:800; }
.family-premium-trigger strong { z-index:1; color:#ffe177; font-size:29px; }
.family-dialog,.growth-dialog { border:4px solid #0b4634!important; border-radius:17px 31px!important; background:linear-gradient(150deg,#fffdf3,#eef5e8)!important; box-shadow:inset 0 0 0 2px #e0b540,0 22px 70px rgba(4,42,29,.45)!important; }
.family-panel,.growth-panel { position:relative; padding:27px 22px!important; }
.family-dialog-emblem { display:grid; place-items:center; width:72px; height:72px; margin:0 0 12px; border:4px solid #0e503a; border-radius:15px 27px; background:linear-gradient(145deg,#fff8d9,#e6f1e2); box-shadow:inset 0 0 0 2px #e0b243,0 7px 16px rgba(10,61,42,.15); }
.family-dialog-emblem .family-trigger-icon { display:block; width:64px; height:64px; object-fit:contain; filter:drop-shadow(0 4px 2px rgba(7,49,39,.28)); }
.family-dialog-emblem .family-icon-accent { fill:#efbb42; stroke:#9b6812; }
.family-kicker { color:#b27609!important; font-size:9px!important; font-weight:950!important; letter-spacing:.22em!important; }
.family-panel h2,.growth-panel h2 { margin:4px 0 7px!important; color:#113f30; font-size:27px!important; font-weight:950; letter-spacing:.04em; }
.family-panel > p:not(.family-kicker):not(.family-price):not(.family-status):not(.family-note),.growth-panel > p:not(.family-kicker):not(.family-note) { color:#49685a; font-weight:700; line-height:1.7; }
.family-price { display:grid; gap:2px; margin:17px 0!important; padding:14px 16px; border:3px solid #a67412; border-radius:11px 20px; background:linear-gradient(135deg,#fff3be,#f1ca63); color:#644400!important; box-shadow:inset 0 0 0 2px #fff1b5,0 6px 14px rgba(116,75,5,.15); }
.family-price::before { content:'FAMILY PREMIUM'; color:#9c6710; font-size:8px; letter-spacing:.2em; }
.family-list li { position:relative; padding:11px 12px 11px 42px!important; border:2px solid #afc8b1; border-radius:9px 17px!important; background:linear-gradient(145deg,#fffef7,#eaf3e7)!important; color:#234f3d; font-weight:750; }
.family-list li::before { content:''!important; position:absolute; left:13px; top:50%; width:15px; height:9px; border-left:4px solid #18704d; border-bottom:4px solid #18704d; transform:translateY(-65%) rotate(-45deg); }
.family-parent-gate { border:3px solid #d29c27; border-radius:10px 19px!important; background:linear-gradient(145deg,#fff8d8,#fff0bb)!important; color:#5a4517; font-weight:750; }
.family-status { border-left:6px solid #176a4a; border-radius:8px 16px!important; background:#e8f2e5!important; color:#315747; font-weight:800; }
.family-actions .primary { border:3px solid #073e2d; border-radius:10px 19px; background:linear-gradient(135deg,#0b4b36,#267755); color:#fff6d4; box-shadow:inset 0 0 0 2px #deb343,0 7px 15px rgba(7,58,39,.2); }
.growth-grid article { border:3px solid #9fbea4; border-radius:11px 20px!important; background:linear-gradient(145deg,#fffdf3,#e7f1e4)!important; box-shadow:inset 0 0 0 2px #fff,0 6px 13px rgba(13,65,44,.09); }
.growth-grid b { color:#0e523a; font-size:27px!important; font-weight:950; }
.growth-grid small { color:#9b6a13; font-weight:850; }
.growth-records article { border:2px solid #adc6af!important; border-radius:10px 18px!important; background:#fffef8; box-shadow:0 4px 10px rgba(12,62,42,.07); }

/* Rank marks sit on high-contrast medallions instead of blending into rank backgrounds. */
.hero.rank-clickable .hero-leaf,.friend-rank-summary .hero-leaf { display:grid!important; place-items:center!important; width:104px!important; height:104px!important; flex:0 0 104px; padding:8px; border:5px solid var(--rank-mark-border)!important; border-radius:50% 43% 50% 43%!important; background:var(--rank-mark-bg)!important; opacity:1!important; box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--rank-mark-border) 28%,white),0 8px 0 color-mix(in srgb,var(--rank-accent) 72%,black),0 13px 20px var(--rank-shadow)!important; transform:rotate(3deg); }
.hero.rank-clickable .hero-leaf .rank-mark,.friend-rank-summary .hero-leaf .rank-mark { width:82px!important; height:82px!important; object-fit:contain!important; filter:drop-shadow(0 2px 1px rgba(0,0,0,.2))!important; transform:rotate(-3deg); }
.hero.rank-clickable > div > p,.friend-rank-summary > div > p { color:var(--rank-heading)!important; text-shadow:0 2px 4px var(--rank-shadow)!important; }
.hero.rank-clickable > div > strong,.friend-rank-summary > div > strong { color:var(--rank-number)!important; text-shadow:0 3px 0 color-mix(in srgb,var(--rank-accent) 72%,black),0 7px 14px var(--rank-shadow)!important; }
.hero.rank-clickable > div > strong + span,.friend-rank-summary > div > strong + span { color:var(--rank-unit)!important; border-left-color:var(--rank-unit)!important; text-shadow:0 2px 4px var(--rank-shadow); }
.hero.rank-clickable .rank-badge,.friend-rank-summary .rank-badge { border:2px solid var(--rank-badge-line)!important; background:var(--rank-badge-bg)!important; color:var(--rank-badge-text)!important; }
.hero.rank-clickable .rank-badge,.friend-rank-summary .rank-badge { clip-path:none!important; overflow:hidden; border-radius:7px 18px 18px 7px!important; }
@media(max-width:420px){.hero.rank-clickable .hero-leaf,.friend-rank-summary .hero-leaf{width:91px!important;height:91px!important;flex-basis:91px;padding:7px}.hero.rank-clickable .hero-leaf .rank-mark,.friend-rank-summary .hero-leaf .rank-mark{width:71px!important;height:71px!important}}

/* My records: river, sea, sky and planet in one high-contrast blue world. */
.records-ocean-panel { position:relative; isolation:isolate; overflow:hidden; margin:24px -7px 0; padding:22px 17px 25px; border:5px solid #082e50; border-radius:19px 36px 19px 36px; background:linear-gradient(160deg,#071e3c 0%,#0a416a 36%,#087b91 72%,#2aa7b6 100%); box-shadow:inset 0 0 0 2px #f2c957,inset 0 -45px 70px rgba(0,30,62,.25),0 14px 28px rgba(3,42,76,.23); }
.records-ocean-panel::before { content:''; position:absolute; z-index:-1; left:-8%; right:-8%; bottom:-48px; height:130px; border-radius:50% 55% 0 0; background:radial-gradient(ellipse at 20% 0,rgba(154,244,255,.32),transparent 35%),linear-gradient(170deg,rgba(69,191,209,.55),rgba(4,69,113,.72)); transform:rotate(-3deg); }
.records-ocean-panel::after { content:''; position:absolute; z-index:-1; left:-20px; right:-20px; top:108px; height:34px; background:radial-gradient(25px 12px at 25px 0,transparent 96%,rgba(180,247,255,.32) 100%) 0 0/50px 22px repeat-x; opacity:.7; }
.records-ocean-art { position:absolute; z-index:-1; right:12px; top:8px; width:88px; height:88px; opacity:.92; }
.records-ocean-art svg { width:100%; height:100%; overflow:visible; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.records-ocean-art .ocean-earth { fill:#0a3158; stroke:#f7d86d; stroke-width:4; }
.records-ocean-art .ocean-land { fill:#75d69a; stroke:#e8ffb8; stroke-width:2.5; }
.records-ocean-art .ocean-wave { stroke:#baf8ff; stroke-width:4; }
.records-ocean-art .ocean-star { fill:#ffe36e; stroke:#fff5b1; stroke-width:2; }
.records-ocean-panel .section-heading { position:relative; z-index:3; min-height:72px; margin:0 92px 13px 0!important; align-items:center; }
.records-ocean-panel .section-heading h2 { color:#ffffff!important; font-size:23px!important; font-weight:950; letter-spacing:.06em; text-shadow:0 3px 0 #052441,0 6px 12px rgba(0,0,0,.25); }
.records-ocean-panel .section-heading h2::before { content:'MY OCEAN JOURNAL'; display:block; margin-bottom:3px; color:#ffe36f; font-size:8px; font-weight:950; letter-spacing:.22em; }
.records-ocean-panel #sortButton { position:relative; z-index:4; min-height:40px; padding:8px 11px; border:3px solid #ffe477; border-radius:8px 15px; background:#fffdf1; color:#082f54; box-shadow:0 5px 0 rgba(3,31,57,.34); font-weight:950; }
.records-ocean-panel .record-search-under-title { min-height:58px!important; border:4px solid #072d50!important; border-radius:12px 22px!important; background:#fffef5!important; box-shadow:inset 0 0 0 2px #f0c954,0 7px 15px rgba(2,30,57,.24)!important; }
.records-ocean-panel .record-search-mark { background:linear-gradient(145deg,#06355d,#087d92)!important; box-shadow:inset 0 0 0 2px #8fe8ef,0 4px 9px rgba(2,42,68,.28)!important; }
.explorer-crest img,.explorer-search-mark img,.record-search-mark img { display:block; width:100%; height:100%; object-fit:contain; }
.explorer-search-mark img,.record-search-mark img { transform:scale(1.42); }
.records-ocean-panel #search { color:#082f50!important; font-weight:800; }
.records-ocean-panel .size-buttons { margin:11px 0 17px!important; gap:7px; }
.records-ocean-panel .size-buttons button { border:3px solid #dffaff!important; border-radius:8px 15px!important; background:#07385e!important; color:#ffffff!important; box-shadow:0 5px 0 rgba(2,29,55,.38); font-weight:950; }
.records-ocean-panel .size-buttons button.active { border-color:#ffe164!important; background:#ffe164!important; color:#092f50!important; box-shadow:inset 0 0 0 2px #fff2aa,0 5px 0 #9f7611; }
.records-ocean-panel .card-grid { position:relative; z-index:1; }
.records-ocean-panel .empty { position:relative; z-index:1; margin-top:10px; border:2px solid rgba(223,250,255,.7); border-radius:13px 24px; background:rgba(255,255,255,.92); color:#0b3859; }
@media(max-width:600px){.records-ocean-art{display:none!important}.records-ocean-panel .section-heading{margin-right:0!important;gap:9px;justify-content:space-between}.records-ocean-panel #sortButton{flex:0 0 auto;max-width:47%;white-space:nowrap}}
@media(max-width:420px){.records-ocean-panel{margin-left:-3px;margin-right:-3px;padding:18px 12px 22px}.records-ocean-panel .section-heading h2{font-size:20px!important}}

/* Species names become engraved field-guide plaques; rarity uses original outlined stars. */
#library .card h3,.friend-view-card h3,.species-dialog #speciesDetail > h2,.detail-content > h2,.friend-record-detail > h2 { position:relative; width:fit-content; max-width:100%; padding:5px 12px 5px 15px!important; border:3px solid #e2ad36; border-left-width:7px; border-bottom-color:#062f36; border-radius:4px 14px 4px 10px; background:#063b43!important; color:#fffdf1!important; font-weight:950!important; letter-spacing:.04em; line-height:1.35!important; text-shadow:0 2px 0 #021f25; box-shadow:inset -7px 0 0 #e2ad36,0 5px 0 rgba(2,31,37,.3); overflow-wrap:anywhere; }
#library .card h3,.friend-view-card h3 { width:100%!important; min-height:88px; margin:0!important; padding-bottom:34px!important; }
#library .card h3 > .species-alerts,.friend-view-card h3 > .species-alerts { position:absolute; left:12px; right:12px; bottom:7px; min-height:22px; margin:0!important; align-content:flex-end; }
#library .card-body,.friend-view-card .card-body { display:grid; grid-template-rows:auto auto 1fr auto; align-content:start; min-height:190px; gap:4px; }
#library .card-body > .rarity,.friend-view-card .card-body > .rarity { align-self:start; margin:7px 0 5px; }
#library .card-body > p,.friend-view-card .card-body > p { margin:0; min-height:1.35em; }
.species-dialog #speciesDetail > h2,.detail-content > h2,.friend-record-detail > h2 { margin:17px 0 10px!important; padding:8px 18px 8px 20px!important; font-size:clamp(21px,6vw,29px)!important; }
.friend-record-detail > h2 small { display:block; margin-top:5px; color:#ffe680; font-size:12px; text-shadow:none; }
.rarity { display:inline-flex!important; align-items:center; gap:3px; width:fit-content; margin:8px 0 5px; padding:5px 8px; border:3px solid #153f52; border-radius:7px 14px; background:linear-gradient(145deg,#fff9dd,#f2d57b); box-shadow:inset 0 0 0 2px #fff5c5,0 4px 0 rgba(9,47,62,.25); letter-spacing:0!important; white-space:nowrap; }
.rarity-star { display:block; width:21px; height:21px; object-fit:contain; filter:drop-shadow(0 2px 0 rgba(12,50,64,.24)); }
.card-grid.size-small .rarity,.friend-view-grid.size-small .rarity { gap:0; padding:2px 3px; border-width:2px; }
.card-grid.size-small .rarity-star,.friend-view-grid.size-small .rarity-star { width:10px; height:10px; stroke-width:3.7; }
@media(max-width:420px){#library .card h3,.friend-view-card h3{padding:4px 8px 4px 10px!important;border-left-width:4px}.rarity-star{width:18px;height:18px}}
.card-grid.size-small .card h3,.friend-view-grid.size-small .friend-view-card h3 { min-height:49px; padding-bottom:5px!important; }
.card-grid.size-small .card-body,.friend-view-grid.size-small .card-body { min-height:82px; grid-template-rows:auto auto; }

/* Approved WildDex photo frame. Nine-slice borders follow every media box
   without forcing photos into one aspect ratio or stretching corner art. */
.wilddex-photo-frame,.wilddex-framed-media,.species-dialog #speciesImage { position:relative!important; isolation:isolate; }
.wilddex-photo-frame::after,.wilddex-framed-media::after,.species-dialog #speciesImage::after {
  content:''; position:absolute; z-index:5; inset:0; pointer-events:none;
  border:18px solid transparent;
  border-image-source:url('assets/ui/wilddex-photo-frame-v193.png?v=193');
  border-image-slice:112 122 126 122;
  border-image-width:1;
  border-image-repeat:stretch;
  filter:drop-shadow(0 3px 2px rgba(2,31,42,.32));
}
.wilddex-framed-media { display:block; width:100%; overflow:hidden; background:#e6eee8; }
.wilddex-framed-media > img,.wilddex-framed-media > video { display:block; width:100%; height:100%; object-fit:cover; }
.friend-detail-frame { min-height:220px; }
.friend-detail-frame > .friend-detail-media { height:auto; max-height:440px; object-fit:contain; }
.friend-view-card > .wilddex-framed-media { height:110px; padding:0!important; }
.friend-view-grid.size-small .friend-view-card > .wilddex-framed-media { height:72px; }
.friend-view-grid.size-large .friend-view-card > .wilddex-framed-media { height:230px; }
.friend-view-grid.size-large .friend-view-card > .wilddex-framed-media > img,
.friend-view-grid.size-large .friend-view-card > .wilddex-framed-media > video { object-fit:contain; }
@media(max-width:420px){
  .wilddex-photo-frame::after,.wilddex-framed-media::after,.species-dialog #speciesImage::after { border-width:12px; }
  .card-grid.size-small .wilddex-photo-frame::after,.friend-view-grid.size-small .wilddex-framed-media::after { border-width:8px; }
}

/* v195 regression corrections: cache-safe brand, unobstructed photos and one
   deliberate scroll surface in the rank journey. */
.brand-emblem img { display:block; width:100%; height:100%; object-fit:contain; }

/* Rank 3 must not expose the pale medallion beneath the cherry blossom. */
.hero.rank-3 .hero-leaf,.friend-rank-summary.rank-3 .hero-leaf {
  --rank-mark-bg:radial-gradient(circle at 45% 38%,#711126 0 46%,#3a0717 74%,#21040d 100%);
  background:var(--rank-mark-bg)!important;
  box-shadow:inset 0 0 0 3px rgba(255,213,75,.68),0 8px 0 #4a0718,0 13px 20px rgba(49,3,18,.48)!important;
}
.hero.rank-3 .hero-leaf .rank-mark,.friend-rank-summary.rank-3 .hero-leaf .rank-mark {
  filter:drop-shadow(0 3px 2px rgba(32,0,10,.68))!important;
}

/* The frame consumes its own outer border instead of covering the photo. */
.wilddex-photo-frame,.wilddex-framed-media,.species-dialog #speciesImage {
  border:8px solid transparent!important;
  border-image-source:url('assets/ui/wilddex-photo-frame-v193.png?v=195')!important;
  border-image-slice:112 122 126 122!important;
  border-image-width:1!important;
  border-image-repeat:stretch!important;
  background-clip:padding-box!important;
}
.wilddex-photo-frame::after,.wilddex-framed-media::after,.species-dialog #speciesImage::after { display:none!important; }
.card-grid.size-small .wilddex-photo-frame,.friend-view-grid.size-small .wilddex-framed-media { border-width:4px!important; }

/* Small cards stay compact, do not create a white tail, and keep names on one line. */
.card-grid.size-small .card-body,.friend-view-grid.size-small .card-body { min-height:0!important; height:auto!important; padding:6px!important; grid-template-rows:auto auto!important; }
.card-grid.size-small .card,.friend-view-grid.size-small .friend-view-card,.card-grid.size-small .card-body,.friend-view-grid.size-small .card-body { background:#063b43!important; }
.card-grid.size-small .card h3,.friend-view-grid.size-small .friend-view-card h3 {
  min-height:31px!important; height:31px!important; padding:5px 7px!important;
  white-space:nowrap!important; overflow:hidden!important; text-overflow:ellipsis!important;
  overflow-wrap:normal!important; font-size:clamp(8px,1vw,11px)!important;
}
.card-grid.size-small .card h3 > .species-alerts,.friend-view-grid.size-small .friend-view-card h3 > .species-alerts { display:none!important; }
.card-grid.size-small .card-body > p,.friend-view-grid.size-small .card-body > p { display:none!important; }
@media(min-width:700px){
  .card-grid.size-small .card,.friend-view-grid.size-small .friend-view-card { align-self:start!important; }
}

/* All-rank missions have the same visual energy and completion feedback as NEXT MISSION. */
.rank-all-grid { display:grid; gap:12px; padding:12px; background:linear-gradient(155deg,#091f3b,#0d4964 52%,#126b58); }
.rank-criteria-dialog .rank-all { --mission:#ffd437; --mission-deep:#6f3500; margin:0!important; padding:12px!important; border:3px solid var(--mission)!important; border-radius:11px 21px!important; background:linear-gradient(135deg,#102d50,#115f72)!important; box-shadow:inset 0 0 0 2px rgba(255,255,255,.18),0 6px 0 var(--mission-deep),0 10px 18px rgba(1,16,36,.38); }
.rank-criteria-dialog .rank-all header { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.rank-criteria-dialog .rank-all header > span { display:grid; place-items:center; width:48px; height:48px; flex:0 0 48px; border:2px solid #fff3a8; border-radius:50%; background:#08233f; }
.rank-criteria-dialog .rank-all header .rank-mark { width:41px!important; height:41px!important; object-fit:contain; }
.rank-criteria-dialog .rank-all h3 { margin:0!important; color:#fff!important; font-size:14px!important; text-shadow:0 2px 0 #06182d; }
.rank-criteria-dialog .rank-all h3 small { display:block; margin-bottom:2px; color:#ffe36c; font-size:8px; letter-spacing:.17em; }
.rank-criteria-dialog .rank-all .rank-need-list li { border:2px solid rgba(255,235,145,.46); background:rgba(255,255,255,.11); color:#fffdf0; font-weight:800; }
.rank-criteria-dialog .rank-all .rank-need-list li.done { border-color:#fff; background:linear-gradient(105deg,#fff000,#ffb800 55%,#fff500); color:#071f3c; box-shadow:inset 0 0 0 2px #9b5c00,0 4px 0 #6f3f00; }
.rank-criteria-dialog .rank-all .rank-need-list li.done::after { content:'達成！'; float:right; color:#0b3153; font-weight:950; }

/* Only the inner panel scrolls; the dialog itself never adds a second bar. */
.rank-criteria-dialog { height:min(85vh,760px)!important; max-height:min(85vh,760px)!important; overflow:hidden!important; }
.rank-criteria-dialog .rank-dialog-inner { height:100%; max-height:none!important; overflow-y:auto!important; overflow-x:hidden!important; overscroll-behavior:contain; }
body:has(.rank-criteria-dialog[open]) { overflow:hidden!important; }

/* Pet names sit on dark plaques, so use a luminous contrasting label. */
.detail-content .pet-name-display,.friend-record-detail .friend-pet-name { color:#ffe879!important; text-shadow:0 2px 0 #021f25!important; }

/* Friends: a shared field-journal room matching the library and profile. */
#feed { color:#123f31; }
#feed > .page-heading { position:relative; overflow:hidden; margin:4px 0 18px; padding:21px 20px 20px 78px; border:4px solid #072f28; border-radius:17px 31px; background:radial-gradient(circle at 92% 8%,rgba(255,221,91,.24),transparent 25%),linear-gradient(135deg,#083a30,#0c6246 62%,#127861); box-shadow:inset 0 0 0 2px #e8bd49,0 11px 24px rgba(4,44,34,.28); }
#feed > .page-heading::before { content:'♧'; position:absolute; left:15px; top:50%; display:grid; place-items:center; width:49px; height:49px; transform:translateY(-50%) rotate(-4deg); border:3px solid #ffe374; border-radius:14px 22px; background:#062f2b; color:#fff3a8; font-size:31px; font-weight:950; box-shadow:inset 0 0 0 2px #1b8060,0 5px 0 #03241f; }
#feed > .page-heading .eyebrow { color:#ffdc67!important; font-size:9px; font-weight:950; letter-spacing:.2em; }
#feed > .page-heading h2 { margin:3px 0!important; color:#fffdf0; font-size:26px; font-weight:950; letter-spacing:.05em; text-shadow:0 3px 0 #042b24; }
#feed > .page-heading > p:not(.eyebrow) { color:#d8f5e4!important; font-size:12px!important; font-weight:800; }
#feed #friendTools { margin:0 0 18px; padding:18px; border:4px solid #0a3a30; border-radius:15px 28px; background:linear-gradient(145deg,#fffdf2,#e8f3e6); color:#123d31; box-shadow:inset 0 0 0 2px #e2b94c,0 10px 22px rgba(6,50,38,.2); }
#feed #friendTools > b { display:block; color:#0a4938; font-size:20px; font-weight:950; letter-spacing:.04em; }
#feed #friendTools > p { color:#46685b; font-weight:750; line-height:1.6; }
#feed .friend-search { gap:8px; margin:13px 0; padding:7px; border:3px solid #b78a22; border-radius:12px 21px; background:#fff; box-shadow:inset 0 0 0 2px #f6df91,0 5px 12px rgba(64,48,6,.12); }
#feed .friend-search input { border:0!important; background:transparent!important; color:#103e30; font-weight:850; outline:0; }
#feed #findFriend { min-width:72px; border:3px solid #073e30; border-radius:9px 16px; background:linear-gradient(145deg,#0a4d3a,#157354); color:#fff5ce; box-shadow:inset 0 0 0 2px #dbad3c,0 4px 0 #042a22; }
#feed #friendRequests,#feed #friendList,#feed #friendResult { display:grid; gap:8px; margin-top:12px; }
#feed #friendRequests > h3,#feed #friendList > h3 { margin:7px 0 2px; padding:8px 12px; border-left:7px solid #f3c74e; border-radius:5px 16px 16px 5px; background:#073d31; color:#fff7d6; font-size:16px; font-weight:950; box-shadow:0 4px 0 #b47a12; }
#feed .friend-result { min-height:66px; padding:9px 11px!important; border:3px solid #a6c4a8!important; border-radius:11px 20px; background:linear-gradient(145deg,#fffef7,#eaf3e7); color:#103f30; box-shadow:inset 0 0 0 2px #fff,0 5px 12px rgba(8,57,41,.12); }
#feed .friend-avatar { border:3px solid #0b553e; outline:2px solid #e4b744; outline-offset:1px; box-shadow:0 4px 8px rgba(4,46,33,.2); }
#feed .friend-result b,#feed .friend-result span { color:#113f31; font-weight:900; }
#feed .friend-result small { color:#5d756a; font-weight:750; }
#feed .friend-result button { border:3px solid #0a4936; border-radius:8px 15px; background:#fff8dc; color:#0b503b; box-shadow:inset 0 0 0 2px #e4bd52; font-weight:950; }
#feed .friend-view-button { width:100%; min-width:0; color:#103f30!important; }
#feed .friend-list-help { color:#fff3ad!important; font-weight:850; text-shadow:0 1px 0 #052a21; }
#feed .feed-list { gap:11px; }
#feed .feed-item { border:3px solid #0a4b39; border-left:8px solid #e6b942; border-radius:12px 23px; background:linear-gradient(145deg,#fffef5,#e7f2e5); color:#123f31; box-shadow:inset 0 0 0 2px #fff,0 7px 16px rgba(5,53,38,.15); }
#feed .feed-item p,#feed .feed-item b { color:#123f31; }
#feed .feed-item small { color:#587267; font-weight:750; }
#feed .feed-icon { border:3px solid #0b533e; background:linear-gradient(145deg,#dff1dc,#fff3bd); color:#12523c; box-shadow:inset 0 0 0 2px #e5bd52; }
#feed .feed-list .empty { margin:12px 0; border:4px solid #0a4737; border-radius:15px 28px; background:linear-gradient(145deg,#fffef6,#e8f3e5); color:#123f31; box-shadow:inset 0 0 0 2px #e2b94b,0 9px 20px rgba(6,53,39,.16); }
#feed .feed-list .empty h2 { color:#0b4937; font-weight:950; }
#feed .feed-list .empty p { color:#496a5c!important; font-weight:800; }
@media(max-width:420px){
  #feed > .page-heading{padding-left:70px}#feed > .page-heading::before{left:12px;width:45px;height:45px}
  #feed #friendTools{padding:14px}#feed .friend-result{padding:8px!important}
}

/* Friend records use the same field-guide hierarchy as the owner's library. */
.friend-view-dialog { overflow:hidden!important; background:#f7f6ec!important; }
.friend-view-body { height:100%; overflow-y:auto; overflow-x:hidden; padding:72px 18px 38px; }
.friend-view-controls { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:20px 0 10px; padding:13px 14px; border:4px solid #082f50; border-radius:12px 23px; background:linear-gradient(135deg,#07385e,#087b91); color:#fff; box-shadow:inset 0 0 0 2px #f0c954,0 7px 15px rgba(2,30,57,.24); }
.friend-view-controls b { color:#fffdf2; font-size:18px; font-weight:950; text-shadow:0 2px 0 #052441; }
.friend-view-controls select { width:auto; min-width:126px; border:3px solid #ffe477; border-radius:8px 15px; background:#fffdf1; color:#082f54; font-weight:950; }
.friend-view-body > .size-buttons { display:flex; justify-content:flex-end; gap:7px; margin:0 0 16px; }
.friend-view-body > .size-buttons button { min-width:48px; min-height:42px; border:3px solid #dffaff; border-radius:8px 15px; background:#07385e; color:#fff; box-shadow:0 5px 0 rgba(2,29,55,.38); font-weight:950; }
.friend-view-body > .size-buttons button.active { border-color:#ffe164; background:#ffe164; color:#092f50; box-shadow:inset 0 0 0 2px #fff2aa,0 5px 0 #9f7611; }
.friend-view-grid { align-items:start; }
.friend-view-grid .friend-view-card { height:auto!important; align-self:start!important; }
.friend-view-grid .friend-view-card > .wilddex-framed-media { display:grid; place-items:center; width:100%; height:auto; aspect-ratio:4/3; background:#dce8e5; }
.friend-view-grid .friend-view-card > .wilddex-framed-media > img,
.friend-view-grid .friend-view-card > .wilddex-framed-media > video { width:100%; height:100%; object-fit:contain!important; background:#dce8e5; }
.friend-view-grid.size-large .friend-view-card > .wilddex-framed-media { aspect-ratio:auto; min-height:280px; max-height:520px; }
.friend-view-grid.size-large .friend-view-card > .wilddex-framed-media > img,
.friend-view-grid.size-large .friend-view-card > .wilddex-framed-media > video { width:100%; height:auto; max-height:500px; object-fit:contain!important; }
.friend-view-grid.size-medium .rarity-star { width:13px!important; height:13px!important; }
.friend-view-grid.size-small .rarity-star { width:8px!important; height:8px!important; }
.friend-view-grid.size-medium .rarity { gap:1px!important; padding:3px 4px!important; border-width:2px!important; }

/* Friend observation details are collectible journal panels, never plain boxes. */
.friend-record-detail > .badge { display:inline-flex; margin:7px 0 13px; padding:7px 12px; border:3px solid #0b4b38; border-radius:7px 15px; background:#fff3bc; color:#0a4a37; box-shadow:inset 0 0 0 2px #e2b642,0 4px 0 #80590b; font-weight:950; }
.friend-record-detail .detail-box,.detail-content .detail-box { position:relative; overflow:hidden; padding:17px!important; border:4px solid #0a4737!important; border-left:9px solid #e3b63f!important; border-radius:12px 23px!important; background:linear-gradient(145deg,#fffef5,#e8f2e5)!important; box-shadow:inset 0 0 0 2px #fff,0 8px 17px rgba(6,55,39,.16)!important; }
.friend-record-detail .detail-box::after,.detail-content .detail-box::after { content:''; position:absolute; right:-24px; top:-30px; width:76px; height:76px; border:12px solid rgba(26,115,81,.09); border-radius:50%; pointer-events:none; }
.friend-record-detail .detail-box h3,.detail-content .detail-box h3 { display:flex; align-items:center; gap:8px; margin:0 0 9px!important; color:#0a4b38; font-size:15px!important; font-weight:950; letter-spacing:.05em; }
.friend-record-detail .detail-box h3::before,.detail-content .detail-box h3::before { content:''; width:11px; height:11px; transform:rotate(45deg); border:3px solid #0a4b38; background:#f2c84f; }
.friend-record-detail .detail-box p,.detail-content .detail-box p { position:relative; z-index:1; color:#345b4b!important; font-weight:800; line-height:1.75; }
.friend-record-detail .map-link { border:4px solid #073e2e; border-radius:11px 21px; background:linear-gradient(135deg,#0a4b36,#287858); color:#fff5d2; box-shadow:inset 0 0 0 2px #e2b646,0 8px 17px rgba(7,58,39,.2); font-weight:950; }
@media(max-width:520px){
  .friend-view-body{padding-left:12px;padding-right:12px}.friend-view-controls{align-items:stretch;flex-direction:column}.friend-view-controls select{width:100%}
  .friend-view-grid.size-medium .rarity-star{width:10px!important;height:10px!important}
}

/* v196: Show every rank mark alone, without a round plate, halo or pedestal. */
.hero.rank-clickable .hero-leaf,.friend-rank-summary .hero-leaf{display:grid!important;place-items:center!important;width:104px!important;height:104px!important;flex:0 0 104px!important;padding:0!important;border:0!important;border-radius:0!important;outline:0!important;background:none!important;box-shadow:none!important;transform:none!important}
.hero.rank-clickable .hero-leaf::before,.hero.rank-clickable .hero-leaf::after,.friend-rank-summary .hero-leaf::before,.friend-rank-summary .hero-leaf::after{content:none!important;display:none!important}
.hero.rank-clickable .hero-leaf .rank-mark,.friend-rank-summary .hero-leaf .rank-mark{width:96px!important;height:96px!important;transform:none!important;filter:drop-shadow(0 5px 3px rgba(0,0,0,.32))!important}
.rank-criteria-dialog .rank-current>span,.rank-criteria-dialog .rank-all header>span,.rank-criteria-dialog .rank-style-item>span{border:0!important;border-radius:0!important;outline:0!important;background:none!important;box-shadow:none!important}
.rank-criteria-dialog .rank-current>span::before,.rank-criteria-dialog .rank-current>span::after,.rank-criteria-dialog .rank-all header>span::before,.rank-criteria-dialog .rank-all header>span::after,.rank-criteria-dialog .rank-style-item>span::before,.rank-criteria-dialog .rank-style-item>span::after{content:none!important;display:none!important}
@media(max-width:420px){.hero.rank-clickable .hero-leaf,.friend-rank-summary .hero-leaf{width:91px!important;height:91px!important;flex-basis:91px!important;padding:0!important}.hero.rank-clickable .hero-leaf .rank-mark,.friend-rank-summary .hero-leaf .rank-mark{width:84px!important;height:84px!important}}

/* v197: Own and friend record cards share one collision-free responsive system. */
.card-grid,.friend-view-grid{align-items:stretch!important;grid-auto-rows:1fr}
.card-grid .card,.friend-view-grid .friend-view-card{display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important;height:100%!important;overflow:hidden!important}
.card-grid .card-image,.friend-view-grid .wilddex-framed-media{flex:0 0 auto!important;width:100%!important;background-color:#dce8e5!important;background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important}
.card-grid .card-body,.friend-view-grid .card-body{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;width:100%!important;min-width:0!important;overflow:visible!important}
.card-grid .card h3,.friend-view-grid .friend-view-card h3{box-sizing:border-box!important;width:100%!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;overflow-wrap:normal!important;word-break:keep-all!important}
.card-grid .rarity,.friend-view-grid .rarity{flex:0 0 auto!important;max-width:100%!important;overflow:visible!important;white-space:nowrap!important}
.card-grid.size-large .card h3,.friend-view-grid.size-large .friend-view-card h3{min-height:92px!important;font-size:20px!important;padding-bottom:36px!important}
.card-grid.size-medium .card h3,.friend-view-grid.size-medium .friend-view-card h3{min-height:78px!important;font-size:clamp(10px,2.6vw,14px)!important;padding:5px 9px 31px 11px!important}
.card-grid.size-medium .card h3>.species-alerts,.friend-view-grid.size-medium .friend-view-card h3>.species-alerts{left:8px!important;right:8px!important;bottom:6px!important;min-height:19px!important;flex-wrap:nowrap!important;overflow:hidden!important}
.card-grid.size-medium .species-alert,.friend-view-grid.size-medium .species-alert{min-height:17px!important;padding:2px 4px!important;font-size:8px!important;line-height:1.15!important;white-space:nowrap!important}
.card-grid.size-medium .rarity-star,.friend-view-grid.size-medium .rarity-star{width:clamp(10px,2.7vw,14px)!important;height:clamp(10px,2.7vw,14px)!important}
.card-grid.size-small .card h3,.friend-view-grid.size-small .friend-view-card h3{min-height:28px!important;height:28px!important;padding:4px 5px!important;border-width:2px!important;border-left-width:3px!important;border-radius:3px 7px!important;box-shadow:none!important;font-size:clamp(6px,1.75vw,9px)!important;letter-spacing:0!important;line-height:1.1!important}
.card-grid.size-small .card-body,.friend-view-grid.size-small .card-body{min-height:49px!important;padding:4px!important;gap:2px!important}
.card-grid.size-small .rarity,.friend-view-grid.size-small .rarity{max-width:100%!important;margin:3px 0 0!important;padding:1px 2px!important;border-width:1px!important;border-radius:3px 6px!important;box-shadow:none!important;gap:0!important}
.card-grid.size-small .rarity-star,.friend-view-grid.size-small .rarity-star{width:clamp(6px,1.7vw,9px)!important;height:clamp(6px,1.7vw,9px)!important}
.card-grid.size-small .species-alerts,.friend-view-grid.size-small .species-alerts{display:none!important}
@media(max-width:420px){
  .card-grid.size-medium .card-body,.friend-view-grid.size-medium .card-body{padding:6px!important}
  .card-grid.size-medium .card h3,.friend-view-grid.size-medium .friend-view-card h3{min-height:67px!important;font-size:10px!important;padding:4px 6px 27px 8px!important}
  .card-grid.size-large .card h3,.friend-view-grid.size-large .friend-view-card h3{font-size:17px!important}
}

/* v198: Literal mark-only rendering: no circle, halo, plate or cast shadow. */
.hero .hero-leaf .rank-mark,.friend-rank-summary .hero-leaf .rank-mark,.rank-criteria-dialog .rank-mark,.rank-style-item .rank-mark,.rank-current .rank-mark,.rank-all .rank-mark{filter:none!important;box-shadow:none!important;background:none!important;border:0!important;outline:0!important}

/* v235: the rank artwork stands by itself.  The older rank-3 selector above
   is more specific than the generic pedestal reset, so neutralize it here. */
.hero.rank-3 .hero-leaf,.friend-rank-summary.rank-3 .hero-leaf{
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  border-radius:0!important;
  padding:0!important;
  overflow:visible!important;
}
.hero.rank-3 .hero-leaf::before,.hero.rank-3 .hero-leaf::after,
.friend-rank-summary.rank-3 .hero-leaf::before,.friend-rank-summary.rank-3 .hero-leaf::after{
  content:none!important;
  display:none!important;
}
.hero.rank-3 .hero-leaf .rank-mark,.friend-rank-summary.rank-3 .hero-leaf .rank-mark{
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
}

/* v199: Small cards keep safety labels visible on own and friend records. */
.card-grid.size-small .card h3,.friend-view-grid.size-small .friend-view-card h3{min-height:57px!important;height:57px!important;padding:4px 4px 32px!important}
.card-grid.size-small .card h3>.species-alerts,.friend-view-grid.size-small .friend-view-card h3>.species-alerts,.card-grid.size-small .species-alerts,.friend-view-grid.size-small .species-alerts{display:flex!important;position:absolute!important;left:3px!important;right:3px!important;bottom:3px!important;min-height:25px!important;max-height:27px!important;margin:0!important;align-content:flex-end!important;align-items:flex-end!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:1px!important;overflow:hidden!important}
.card-grid.size-small .species-alert,.friend-view-grid.size-small .species-alert{display:inline-flex!important;min-width:0!important;min-height:10px!important;max-width:100%!important;padding:1px 2px!important;border-width:1px!important;border-radius:3px!important;font-size:clamp(5px,1.25vw,8px)!important;line-height:1!important;letter-spacing:-.04em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.card-grid.size-small .card-body,.friend-view-grid.size-small .card-body{min-height:78px!important}
@media(min-width:700px){.card-grid.size-small .species-alert,.friend-view-grid.size-small .species-alert{font-size:7px!important}}

/* v203: Keep conservation and poison labels crisp.  Card headings use a
   decorative text shadow, so explicitly stop that inherited effect here. */
.species-alerts,
.species-alert,
.species-alerts .species-alert,
#library .species-alert,
.friend-view-grid .species-alert,
.friend-record-detail .species-alert,
.detail-content .species-alert,
.species-dialog .species-alert {
  text-shadow:none!important;
  filter:none!important;
}

/* v204: Species names are plain, readable text rather than framed plaques.
   Medium and small mobile cards wrap full names instead of truncating them. */
#library .card h3,
.friend-view-card h3 {
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#082f39!important;
  text-shadow:none!important;
}
.card-grid.size-medium .card h3,
.friend-view-grid.size-medium .friend-view-card h3,
.card-grid.size-small .card h3,
.friend-view-grid.size-small .friend-view-card h3 {
  height:auto!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
.card-grid.size-small .card h3,
.friend-view-grid.size-small .friend-view-card h3 {
  min-height:64px!important;
  line-height:1.15!important;
}

/* v206: Detail views retain their framed name heading.  Their safety labels
   match the visual height of the rarity-star plaque on every screen size. */
.species-dialog .species-alert,
.detail-content .species-alert,
.friend-record-detail .species-alert {
  box-sizing:border-box!important;
  min-height:35px!important;
  padding:5px 11px!important;
  border-width:2px!important;
  font-size:clamp(13px,3.6vw,15px)!important;
  line-height:1.2!important;
  text-shadow:none!important;
}

/* v208: Record-detail photos show the approved illustrated frame at its
   intended visual weight, while the border consumes space outside the photo. */
#detailContent > .detail-photo.wilddex-photo-frame,
#detailContent > #multiDetailMedia {
  box-sizing:border-box!important;
  border:clamp(26px,6vw,44px) solid transparent!important;
  border-image-source:url('assets/ui/wilddex-photo-frame-v193.png?v=195')!important;
  border-image-slice:112 122 126 122!important;
  border-image-width:1!important;
  border-image-repeat:stretch!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:0 9px 20px rgba(3,38,45,.32)!important;
  background-clip:padding-box!important;
}
#detailContent > #multiDetailMedia {
  padding:0!important;
  background:#18261e!important;
}
#detailContent > #multiDetailMedia .detail-media-item {
  border-radius:0!important;
}

/* The discovery panel has one frame only.  Remove legacy inset borders and
   decorative pseudo layers that visually doubled the generated design. */
.species-explorer {
  border:4px solid #d8b54b!important;
  box-shadow:0 15px 31px rgba(12,59,41,.22)!important;
}
.species-explorer::before,
.species-explorer::after { content:none!important; display:none!important; }
.species-explorer > .explorer-search {
  box-shadow:0 8px 18px rgba(0,28,18,.25)!important;
}

/* v210: Search-result details use exactly one approved photo frame. */
.species-dialog #speciesImage {
  box-sizing:border-box!important;
  padding:0!important;
  border:clamp(26px,6vw,44px) solid transparent!important;
  border-image-source:url('assets/ui/wilddex-photo-frame-v193.png?v=195')!important;
  border-image-slice:112 122 126 122!important;
  border-image-width:1!important;
  border-image-repeat:stretch!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:0 13px 31px rgba(76,49,7,.3)!important;
  background:transparent!important;
}
.species-dialog #speciesImage::before,
.species-dialog #speciesImage::after { content:none!important; display:none!important; }
.species-dialog #speciesImage > img {
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
}
.species-dialog .species-meta-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:8px 0 10px; }
.species-dialog .species-meta-row > .rarity { margin:0!important; }
.species-dialog .species-safety-slot { display:flex; align-items:center; flex-wrap:wrap; gap:5px; }
.species-dialog .species-safety-slot:empty { display:none; }
.species-dialog .species-safety-slot .species-alert { margin:0!important; }

/* v211: One equally bold illustrated frame in search, own-record and
   friend-record details.  No legacy child frame or scrollbar may cover it. */
.species-dialog #speciesImage,
#detailContent > .detail-photo.wilddex-photo-frame,
#detailContent > #multiDetailMedia,
.friend-detail-gallery > .friend-detail-frame {
  box-sizing:border-box!important;
  border:clamp(44px,10vw,56px) solid transparent!important;
  border-image-source:url('assets/ui/wilddex-photo-frame-v193.png?v=195')!important;
  border-image-slice:112 122 126 122!important;
  border-image-width:1!important;
  border-image-repeat:stretch!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  background-clip:padding-box!important;
}
#detailContent > #multiDetailMedia { scrollbar-width:none!important; }
#detailContent > #multiDetailMedia::-webkit-scrollbar { display:none!important; width:0!important; height:0!important; }
.friend-detail-gallery > .friend-detail-frame { display:block!important; width:100%!important; padding:0!important; background:#18261e!important; }
.friend-detail-gallery > .friend-detail-frame > .friend-detail-media {
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  object-fit:contain!important;
  background:transparent!important;
}
.species-dialog #speciesImage {
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  display:block!important;
  overflow:visible!important;
}
.species-dialog #speciesImage > img {
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  background:transparent!important;
}

/* v199: Remove the decorative globe/wave mark beneath the desktop sorter. */
.records-ocean-art{display:none!important}

/* v200: Generated observation and weather artwork in own/friend record details. */
.detail-kind-badge,.detail-weather-line,.detail-date-line{display:flex!important;align-items:center!important;gap:9px!important;width:fit-content;max-width:100%}
.detail-kind-badge{min-height:58px;padding:6px 15px 6px 7px;border:3px solid #0a4333;border-radius:12px 22px;background:linear-gradient(145deg,#fff6ce,#e3efdf);color:#0b4a36;font-size:14px;font-weight:950;box-shadow:inset 0 0 0 2px #e5b844,0 6px 0 rgba(5,53,37,.22)}
.detail-kind-badge img{display:block;width:48px;height:48px;object-fit:contain}
.detail-weather-line{margin-top:9px;padding:7px 13px 7px 7px;border:3px solid #123f69;border-radius:11px 20px;background:linear-gradient(145deg,#eaf8ff,#fff2bd);color:#0b3d62;font-weight:950;box-shadow:inset 0 0 0 2px #f0c64f,0 5px 0 rgba(7,46,78,.22)}
.detail-weather-line img{display:block;width:46px;height:46px;object-fit:contain}
.detail-date-line::before{content:'';display:block;width:27px;height:27px;background:url('assets/record-icons/record-entry-v193.png?v=193') center/contain no-repeat}
.detail-date-line{color:#214f3e;font-weight:900}
@media(max-width:420px){.detail-kind-badge{min-height:52px;font-size:13px}.detail-kind-badge img{width:42px;height:42px}.detail-weather-line img{width:41px;height:41px}}

/* v200: Final shared 1/3/5 grid and uncropped media for own and friend records. */
.card-grid.size-large,.friend-view-grid.size-large{grid-template-columns:1fr!important}
.card-grid.size-medium,.friend-view-grid.size-medium{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
.card-grid.size-small,.friend-view-grid.size-small{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important}
.card-grid.size-medium .card-image,.card-grid.size-small .card-image,.friend-view-grid.size-medium .wilddex-framed-media,.friend-view-grid.size-small .wilddex-framed-media{width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:1/1!important;background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important}
.friend-view-grid.size-medium .wilddex-framed-media>img,.friend-view-grid.size-medium .wilddex-framed-media>video,.friend-view-grid.size-small .wilddex-framed-media>img,.friend-view-grid.size-small .wilddex-framed-media>video{width:100%!important;height:100%!important;object-fit:contain!important}
.card-grid.size-large .card-image{height:auto!important;min-height:280px!important;max-height:520px!important;background-size:contain!important;background-repeat:no-repeat!important}
.friend-view-grid.size-large .wilddex-framed-media{height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important}
.friend-view-grid.size-large .wilddex-framed-media>img,.friend-view-grid.size-large .wilddex-framed-media>video{display:block!important;width:100%!important;height:auto!important;max-height:520px!important;object-fit:contain!important}

/* v201: Original WildDex distribution atlas. */
#distribution{--map-deep:#052f46;--map-sea:#08758a;--map-green:#145d43;--map-gold:#e6ba48;padding-bottom:18px}
#distribution>.page-heading{position:relative;isolation:isolate;overflow:hidden;margin:4px 0 18px;padding:22px 18px 21px 82px;border:4px solid #052d28;border-radius:18px 33px;background:radial-gradient(circle at 92% 9%,rgba(255,221,91,.22),transparent 24%),linear-gradient(135deg,#062f47,#08758a 54%,#126247);color:#fff9e3;box-shadow:inset 0 0 0 2px var(--map-gold),0 12px 25px rgba(3,45,55,.28)}
#distribution>.page-heading::before{content:'';position:absolute;z-index:-1;left:12px;top:50%;width:60px;height:60px;background:url('assets/weather/weather-location-v193.png?v=193') center/contain no-repeat;filter:drop-shadow(0 5px 2px rgba(0,25,41,.42));transform:translateY(-50%)}
#distribution>.page-heading .eyebrow{color:#ffe174!important;font-size:9px!important;font-weight:950!important;letter-spacing:.19em!important}
#distribution>.page-heading h2{margin:3px 0!important;color:#fff!important;font-size:26px!important;font-weight:950!important;letter-spacing:.05em;text-shadow:0 3px 0 #03273b}
#distribution>.page-heading>p:not(.eyebrow){color:#d9f7f0!important;font-size:12px!important;font-weight:800!important;line-height:1.55}
#distributionMap{height:min(52vh,430px)!important;min-height:310px;margin:14px 0 18px!important;border:8px solid transparent!important;border-image-source:url('assets/ui/wilddex-photo-frame-v193.png?v=195')!important;border-image-slice:112 122 126 122!important;border-image-width:1!important;border-radius:15px 28px!important;background:#dcebea!important;box-shadow:0 12px 25px rgba(3,45,64,.3)!important}
#distributionMap .leaflet-control-zoom a{border:2px solid #0b4d39!important;background:#fff7d7!important;color:#0a4b37!important;font-weight:950!important}
#distributionMap .leaflet-popup-content-wrapper{border:3px solid #0b4d39;border-radius:10px 18px;background:#fffbed;color:#143f32;box-shadow:inset 0 0 0 2px #e5b745,0 7px 17px rgba(4,47,35,.22)}
#distributionList{position:relative;display:grid;gap:9px;padding:15px;border:4px solid #073d50;border-radius:15px 28px;background:linear-gradient(145deg,#072d4c,#08677a 56%,#126448);box-shadow:inset 0 0 0 2px #e2b846,0 10px 22px rgba(4,45,62,.24)}
#distributionList::before{content:'SHARED DISCOVERIES';color:#ffe171;font-size:9px;font-weight:950;letter-spacing:.19em}
#distributionList .feed-item{align-items:center;border:3px solid #d8b54b;border-radius:10px 19px;background:linear-gradient(145deg,#fffef4,#e7f2e8);color:#103f31;box-shadow:0 5px 0 rgba(2,37,45,.32)}
#distributionList .feed-icon{width:47px;height:47px;flex:0 0 47px;border:3px solid #0c513b;background:#fff4bd;color:#145b42;box-shadow:inset 0 0 0 2px #e3b642}
#distributionList .feed-item p{color:#133f32;font-weight:800}.distribution-empty{padding:27px 15px;text-align:center;color:#fff8dc;font-weight:900;line-height:1.7}
.bottom-nav button[data-view="distribution"]>span{font-size:0!important;width:27px;height:27px;margin:auto;background:url('assets/weather/weather-location-v193.png?v=193') center/contain no-repeat;filter:drop-shadow(0 2px 1px rgba(4,49,36,.25))}
@media(max-width:420px){#distribution>.page-heading{padding-left:72px}#distribution>.page-heading::before{width:52px;height:52px}#distributionMap{min-height:290px;height:46vh!important}#distributionList{padding:11px}}

/* v202: The large friend photo rule must never enlarge rarity-star images. */
.friend-view-grid.size-large .friend-view-card .rarity{display:inline-flex!important;flex-direction:row!important;align-items:center!important;align-self:flex-start!important;width:auto!important;max-width:100%!important;overflow:visible!important;flex-wrap:nowrap!important}
.friend-view-grid.size-large .friend-view-card .rarity img.rarity-star{display:block!important;flex:0 0 21px!important;width:21px!important;min-width:21px!important;max-width:21px!important;height:21px!important;min-height:21px!important;max-height:21px!important;object-fit:contain!important}
@media(max-width:420px){.friend-view-grid.size-large .friend-view-card .rarity img.rarity-star{flex-basis:18px!important;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;max-height:18px!important}}

/* v212: Friend records match the owner's searchable journal controls. */
.friend-record-search{display:flex!important;align-items:center!important;gap:9px!important;width:100%!important;margin:12px 0 9px!important;padding:8px 13px!important;border:4px solid #073d50!important;border-radius:12px 22px!important;background:#fffef5!important;box-shadow:inset 0 0 0 2px #e4ba45,0 7px 15px rgba(2,30,57,.22)!important}
.friend-record-search>span{display:grid;place-items:center;width:35px;height:35px;flex:0 0 35px;border-radius:50%;background:#073b58;color:#fff4a5;font-size:23px;font-weight:950}
.friend-record-search input{width:100%!important;min-width:0!important;border:0!important;outline:0!important;background:transparent!important;color:#082f50!important;font:inherit!important;font-weight:850!important}
.friend-record-search input::placeholder{color:#698078!important;opacity:1}

/* v213: Every observation card has a clear information panel.  The image and
   the name never share the same background, including the five-column view. */
#library .card .card-body,
.friend-view-grid .friend-view-card .card-body{
  position:relative!important;
  isolation:isolate!important;
  background:linear-gradient(145deg,#fffdf2 0%,#f4ead0 58%,#e2f0e8 100%)!important;
  color:#062f3b!important;
  box-shadow:inset 0 3px 0 #e2b94c,inset 0 5px 0 rgba(255,255,255,.82)!important;
}
#library .card .card-body::before,
.friend-view-grid .friend-view-card .card-body::before{
  content:'';
  position:absolute;
  z-index:-1;
  inset:5px;
  border:1px solid rgba(137,93,20,.3);
  border-radius:8px 15px;
  pointer-events:none;
}
#library .card .card-body h3,
.friend-view-grid .friend-view-card .card-body h3{
  color:#052f3d!important;
  text-shadow:0 1px 0 #fff!important;
}
#library .card .card-body>p,
.friend-view-grid .friend-view-card .card-body>p{
  color:#35564c!important;
}
.card-grid.size-small .card,
.friend-view-grid.size-small .friend-view-card{
  background:#fffdf2!important;
}
.card-grid.size-small .card-body,
.friend-view-grid.size-small .card-body{
  background:linear-gradient(145deg,#fffdf2,#efdca8 62%,#dcece4)!important;
}

/* v214: Own and friend details share one metadata baseline.  The top borders
   of the rarity plaque and every safety plaque start at the same coordinate. */
.record-species-meta{
  display:flex!important;
  align-items:flex-start!important;
  align-content:flex-start!important;
  flex-wrap:wrap!important;
  gap:7px!important;
}
.record-species-meta>.rarity,
.record-species-meta>.species-alert,
.record-species-meta>.species-alerts{
  align-self:flex-start!important;
  margin-top:0!important;
  margin-bottom:0!important;
}
.record-species-meta>.species-alerts{display:flex!important;align-items:flex-start!important;gap:7px!important}
.record-species-meta .species-alert{margin-top:0!important;margin-bottom:0!important}
.detail-content>.record-species-meta+.badge,
.friend-record-detail>.record-species-meta+.badge{display:block!important;width:fit-content!important;margin:16px 0 13px!important}
.detail-content .pet-name-display,.friend-record-detail .friend-pet-name{display:block!important;margin-top:7px!important;color:#ffe879!important;font-size:clamp(13px,3.6vw,15px)!important;font-weight:850!important;line-height:1.4!important;text-shadow:0 2px 0 #021f25!important}

/* Five-column cards are content-height cards, not equal-height grid rows. */
.card-grid.size-small,.friend-view-grid.size-small,.friend-view-grid.size-large{
  grid-auto-rows:auto!important;
  align-items:start!important;
}
.card-grid.size-small .card,.friend-view-grid.size-small .friend-view-card,
.friend-view-grid.size-large .friend-view-card{
  height:auto!important;
  min-height:0!important;
  align-self:start!important;
}
.card-grid.size-large .card-body,.friend-view-grid.size-large .card-body{flex:0 0 auto!important;min-height:0!important;height:auto!important}
.card-grid.size-large .card h3,.friend-view-grid.size-large .friend-view-card h3{min-height:72px!important;padding-bottom:32px!important}
.card-grid.size-small .card-body,.friend-view-grid.size-small .card-body{
  flex:0 0 auto!important;
  min-height:0!important;
  height:auto!important;
}
.card-grid.size-small .card h3,.friend-view-grid.size-small .friend-view-card h3{
  min-height:46px!important;
  height:auto!important;
  padding:4px 4px 25px!important;
}
.card-grid.size-small .card h3>.species-alerts,.friend-view-grid.size-small .friend-view-card h3>.species-alerts{
  min-height:19px!important;
  max-height:21px!important;
}

/* v215: Owner and friend record cards use the same generated frame asset and
   the same *visible* weight at every display size. The real border reserves
   space outside the media, so none of the ornament covers the animal. */
.card-grid .wilddex-photo-frame,
.friend-view-grid .wilddex-framed-media{
  box-sizing:border-box!important;
  border-style:solid!important;
  border-color:transparent!important;
  border-image-source:url('assets/ui/wilddex-photo-frame-v193.png?v=195')!important;
  border-image-slice:112 122 126 122!important;
  border-image-width:1!important;
  border-image-repeat:stretch!important;
  background-clip:padding-box!important;
}
.card-grid.size-large .wilddex-photo-frame,
.friend-view-grid.size-large .wilddex-framed-media{border-width:clamp(24px,6vw,38px)!important}
.card-grid.size-medium .wilddex-photo-frame,
.friend-view-grid.size-medium .wilddex-framed-media{border-width:clamp(10px,2.8vw,16px)!important}
.card-grid.size-small .wilddex-photo-frame,
.friend-view-grid.size-small .wilddex-framed-media{border-width:clamp(5px,1.5vw,8px)!important}

/* v216: Five-column cards have one shared outer height. Long names and safety
   labels stay inside a reserved information panel; their presence must never
   make one observation frame taller than its neighbours. */
.card-grid.size-small,
.friend-view-grid.size-small{
  align-items:stretch!important;
}
.card-grid.size-small .card,
.friend-view-grid.size-small .friend-view-card{
  height:auto!important;
  min-height:0!important;
  align-self:stretch!important;
}
.card-grid.size-small .card-body,
.friend-view-grid.size-small .friend-view-card .card-body{
  box-sizing:border-box!important;
  flex:0 0 86px!important;
  width:100%!important;
  min-height:86px!important;
  height:86px!important;
  max-height:86px!important;
  padding:4px!important;
  overflow:hidden!important;
}
.card-grid.size-small .card h3,
.friend-view-grid.size-small .friend-view-card h3{
  box-sizing:border-box!important;
  flex:0 0 62px!important;
  min-height:62px!important;
  height:62px!important;
  max-height:62px!important;
  margin:0!important;
  padding:4px 4px 24px!important;
  overflow:hidden!important;
}
.card-grid.size-small .rarity,
.friend-view-grid.size-small .rarity{
  flex:0 0 auto!important;
  margin:2px 0 0!important;
}

/* v217: Skip layout and paint for observations far outside the viewport.
   Original image files and full visual quality are preserved. */
#cardGrid>.card,
.friend-view-grid>.friend-view-card,
#feedList>.feed-item,
.growth-records>article{
  content-visibility:auto;
  contain-intrinsic-size:auto 260px;
}
.card-grid.size-large>.card,
.friend-view-grid.size-large>.friend-view-card{contain-intrinsic-size:auto 620px}
.card-grid.size-medium>.card,
.friend-view-grid.size-medium>.friend-view-card{contain-intrinsic-size:auto 300px}
.card-grid.size-small>.card,
.friend-view-grid.size-small>.friend-view-card{contain-intrinsic-size:auto 210px}

/* Generated bottom-navigation artwork; each asset has true transparency and
   no enclosing plate. */
.bottom-nav button[data-view="library"]>span,
.bottom-nav button[data-view="add"]>span,
.bottom-nav button[data-view="feed"]>span{
  display:block!important;
  width:31px!important;
  height:31px!important;
  margin:0 auto 2px!important;
  background-position:center!important;
  background-size:contain!important;
  background-repeat:no-repeat!important;
  font-size:0!important;
}
.bottom-nav button[data-view="library"]>span{background-image:url('assets/nav/nav-library-v214.png?v=214')!important}
.bottom-nav button[data-view="add"]>span{background-image:url('assets/nav/nav-record-v214.png?v=214')!important}
.bottom-nav button[data-view="feed"]>span{background-image:url('assets/nav/nav-friends-v214.png?v=214')!important}

/* v218: Mobile camera capture and explicit device-backup actions. */
.camera-capture-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:12px 0 18px;
}
.camera-capture-button,.save-captured-photo{
  min-height:54px;
  border:3px solid #0d4f3b;
  border-radius:17px;
  padding:10px 14px;
  font:900 clamp(15px,3.7vw,18px)/1.25 inherit;
  color:#fffdf3;
  background:linear-gradient(145deg,#176b50,#0d4938);
  box-shadow:0 5px 0 #072e24,0 9px 18px rgba(7,46,36,.18);
}
.save-captured-photo{color:#133f35;background:linear-gradient(145deg,#ffe788,#e8b94d);border-color:#76510b;box-shadow:0 5px 0 #76510b,0 9px 18px rgba(90,59,4,.18)}
.camera-capture-button:disabled,.save-captured-photo:disabled{opacity:.55;box-shadow:none;transform:translateY(4px)}
.camera-capture-status{grid-column:1/-1;margin:3px 2px 0;color:#345f54;font-weight:700;font-size:13px;line-height:1.65}
@media(max-width:520px){.camera-capture-actions{grid-template-columns:1fr}.camera-capture-button,.save-captured-photo{width:100%}}

/* v219: Shared compact card typography for owner and friend journals.
   Media dimensions stay untouched; only the information panel is rebalanced. */
.card-grid.size-large .card h3,
.friend-view-grid.size-large .friend-view-card h3{
  min-height:104px!important;
  padding:12px 14px 42px!important;
  font-size:clamp(24px,5.8vw,34px)!important;
  line-height:1.18!important;
  letter-spacing:.01em!important;
}
.card-grid.size-large .card h3>.species-alerts,
.friend-view-grid.size-large .friend-view-card h3>.species-alerts{
  left:14px!important;right:14px!important;bottom:8px!important;
  min-height:29px!important;max-height:none!important;gap:6px!important;
}
.card-grid.size-large .species-alert,
.friend-view-grid.size-large .species-alert{
  min-height:28px!important;padding:4px 10px!important;
  border-width:2px!important;font-size:clamp(13px,3.7vw,18px)!important;
  line-height:1.1!important;
}
.card-grid.size-medium .card-body,
.friend-view-grid.size-medium .friend-view-card .card-body{
  box-sizing:border-box!important;
  flex:0 0 148px!important;min-height:148px!important;height:148px!important;
  max-height:148px!important;padding:6px 4px!important;gap:3px!important;
  overflow:hidden!important;
}
.card-grid.size-medium .card h3,
.friend-view-grid.size-medium .friend-view-card h3{
  box-sizing:border-box!important;
  min-height:58px!important;height:58px!important;max-height:58px!important;
  padding:4px 2px 24px!important;
  font-size:clamp(9px,2.35vw,13px)!important;
  line-height:1.12!important;letter-spacing:-.08em!important;
  overflow:hidden!important;overflow-wrap:normal!important;word-break:normal!important;
}
.card-grid.size-medium .card h3>.species-alerts,
.friend-view-grid.size-medium .friend-view-card h3>.species-alerts{
  left:2px!important;right:2px!important;bottom:3px!important;
  min-height:18px!important;max-height:20px!important;gap:2px!important;
}
.card-grid.size-medium .species-alert,
.friend-view-grid.size-medium .species-alert{
  min-height:17px!important;padding:2px 3px!important;font-size:clamp(7px,1.8vw,10px)!important;
}
.card-grid.size-medium .rarity,
.friend-view-grid.size-medium .rarity{margin:2px 0 1px!important}
.card-grid.size-small .card-body,
.friend-view-grid.size-small .friend-view-card .card-body{
  flex:0 0 72px!important;min-height:72px!important;height:72px!important;max-height:72px!important;
  padding:3px 2px!important;gap:1px!important;
}
.card-grid.size-small .card h3,
.friend-view-grid.size-small .friend-view-card h3{
  flex:0 0 50px!important;min-height:50px!important;height:50px!important;max-height:50px!important;
  padding:3px 1px 21px!important;
  font-size:clamp(6px,1.45vw,8px)!important;
  line-height:1.08!important;letter-spacing:-.1em!important;
  overflow:hidden!important;overflow-wrap:normal!important;word-break:normal!important;
}
.card-grid.size-small .card h3>.species-alerts,
.friend-view-grid.size-small .friend-view-card h3>.species-alerts{
  left:1px!important;right:1px!important;bottom:2px!important;
  min-height:17px!important;max-height:19px!important;gap:1px!important;
}
.card-grid.size-small .species-alert,
.friend-view-grid.size-small .species-alert{
  min-height:9px!important;padding:1px!important;font-size:clamp(5px,1.05vw,7px)!important;
}
.card-grid.size-small .rarity,
.friend-view-grid.size-small .rarity{margin:1px 0 0!important}

/* v220: Never stretch medium/large cards to the tallest grid row. */
.card-grid.size-large,.friend-view-grid.size-large,
.card-grid.size-medium,.friend-view-grid.size-medium{
  grid-auto-rows:auto!important;
  align-items:start!important;
}
.card-grid.size-large>.card,.friend-view-grid.size-large>.friend-view-card,
.card-grid.size-medium>.card,.friend-view-grid.size-medium>.friend-view-card{
  height:auto!important;
  min-height:0!important;
  align-self:start!important;
}

/* v222: one clean outer frame and a compact shared information layout. */
#library .card .card-body::before,
.friend-view-grid .friend-view-card .card-body::before{content:none!important;display:none!important}
.card-grid .card h3,.friend-view-grid .friend-view-card h3{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.card-grid .rarity,.friend-view-grid .rarity{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
.card-grid.size-large .card h3,.friend-view-grid.size-large .friend-view-card h3{min-height:94px!important;padding:8px 8px 36px!important;font-size:clamp(27px,6.25vw,38px)!important;letter-spacing:-.015em!important}
.card-grid.size-large .card h3>.species-alerts,.friend-view-grid.size-large .friend-view-card h3>.species-alerts{left:8px!important;right:8px!important;bottom:3px!important}
.card-grid.size-medium .card-body,.friend-view-grid.size-medium .friend-view-card .card-body{flex-basis:122px!important;min-height:122px!important;height:122px!important;max-height:122px!important;padding:4px 2px!important;gap:0!important}
.card-grid.size-medium .card h3,.friend-view-grid.size-medium .friend-view-card h3{min-height:48px!important;height:48px!important;max-height:48px!important;padding:2px 0 19px!important;letter-spacing:-.11em!important}
.card-grid.size-medium .card h3>.species-alerts,.friend-view-grid.size-medium .friend-view-card h3>.species-alerts{left:0!important;right:0!important;bottom:1px!important}
.card-grid.size-medium .rarity,.friend-view-grid.size-medium .rarity{margin:0!important;transform:scale(.82);transform-origin:left top}
.card-grid.size-medium .rarity img.rarity-star,.friend-view-grid.size-medium .rarity img.rarity-star{width:15px!important;min-width:15px!important;max-width:15px!important;height:15px!important;min-height:15px!important;max-height:15px!important}
.card-grid.size-small .card-body,.friend-view-grid.size-small .friend-view-card .card-body{flex-basis:62px!important;min-height:62px!important;height:62px!important;max-height:62px!important;padding:2px 1px!important;gap:0!important}
.card-grid.size-small .card h3,.friend-view-grid.size-small .friend-view-card h3{flex-basis:42px!important;min-height:42px!important;height:42px!important;max-height:42px!important;padding:2px 0 17px!important;letter-spacing:-.13em!important}
.card-grid.size-small .card h3>.species-alerts,.friend-view-grid.size-small .friend-view-card h3>.species-alerts{left:0!important;right:0!important;bottom:0!important}
.card-grid.size-small .rarity,.friend-view-grid.size-small .rarity{margin:0!important}
.card-grid .card h3,.friend-view-grid .friend-view-card h3{white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;word-break:keep-all!important;overflow-wrap:normal!important}
.card-grid.size-large h3.name-long,.friend-view-grid.size-large h3.name-long{font-size:clamp(22px,5.3vw,33px)!important}
.card-grid.size-large h3.name-extra-long,.friend-view-grid.size-large h3.name-extra-long{font-size:clamp(20px,4.85vw,30px)!important}
.card-grid.size-medium h3.name-long,.friend-view-grid.size-medium h3.name-long{font-size:clamp(8px,2vw,11px)!important;letter-spacing:-.24em!important}
.card-grid.size-medium h3.name-extra-long,.friend-view-grid.size-medium h3.name-extra-long{font-size:clamp(7px,1.75vw,10px)!important;letter-spacing:-.16em!important}
.card-grid.size-small h3.name-long,.friend-view-grid.size-small h3.name-long{font-size:clamp(5px,1.2vw,7px)!important;letter-spacing:-.30em!important}
.card-grid.size-small h3.name-extra-long,.friend-view-grid.size-small h3.name-extra-long{font-size:clamp(4px,1vw,6px)!important;letter-spacing:-.18em!important}
.card-grid.size-large .card h3,.friend-view-grid.size-large .friend-view-card h3,
.card-grid.size-medium .card h3,.friend-view-grid.size-medium .friend-view-card h3,
.card-grid.size-small .card h3,.friend-view-grid.size-small .friend-view-card h3{white-space:nowrap!important;word-break:keep-all!important;overflow-wrap:normal!important;text-overflow:clip!important}
.card-grid .card h3.name-wrap,.friend-view-grid .friend-view-card h3.name-wrap{white-space:normal!important;word-break:break-all!important;overflow-wrap:anywhere!important;line-height:1.08!important}
@media(max-width:600px){
  .topbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center!important;column-gap:5px!important;min-height:72px!important;padding:9px 8px 12px!important}
  .topbar .brand-lockup{min-width:0!important;gap:4px!important;overflow:visible!important}
  .topbar .brand-emblem{flex:0 0 42px!important;width:42px!important;height:42px!important}
  .topbar .brand-emblem img{width:42px!important;height:42px!important}
  .topbar .brand-words{min-width:0!important;width:100%!important;overflow:visible!important}
  .topbar .brand-words h1{display:block!important;width:max-content!important;max-width:none!important;font-size:clamp(14px,4.2vw,18px)!important;line-height:1.05!important;white-space:nowrap!important;word-break:keep-all!important;overflow-wrap:normal!important;letter-spacing:-.045em!important}
  .topbar .brand-words .eyebrow{font-size:6px!important;line-height:1.1!important;letter-spacing:.1em!important;white-space:nowrap!important}
  .topbar .weather-widget{min-height:34px!important;padding:2px 3px 2px 2px!important;gap:0!important;border-width:2px!important;border-radius:11px 16px!important}
  .topbar .weather-icon,.topbar .weather-icon img{width:24px!important;height:24px!important}
  .topbar .weather-value{min-width:25px!important;padding:2px 3px!important;border-width:2px!important;border-radius:7px 11px!important}
  .topbar .weather-value strong{font-size:12px!important}.topbar .weather-value span{font-size:8px!important}
  .topbar .avatar{flex-basis:34px!important;width:34px!important;height:34px!important;border-width:2px!important}
}
@media(max-width:350px){
  .topbar{column-gap:4px!important;padding-left:6px!important;padding-right:6px!important}
  .topbar .brand-emblem{flex-basis:38px!important;width:38px!important;height:38px!important}
  .topbar .brand-emblem img{width:38px!important;height:38px!important}
  .topbar .brand-words h1{font-size:14px!important}
  .topbar .avatar{flex-basis:32px!important;width:32px!important;height:32px!important}
}
