/* panel styling, made to look like dwc's own menus: blue hex background, gold framed green windows,
   green pill buttons, the metal help box with agumon, and the game's fonts converted from the rom.
   frame art is all drawn at 2x so the pixels stay sharp */
@font-face { font-family: 'DWC Text'; src: url('../assets/fonts/dwc-text.ttf') format('truetype'); }
@font-face { font-family: 'DWC Small'; src: url('../assets/fonts/dwc-small.ttf') format('truetype'); }
:root {
  --ink: #ffffff; --mute: #a9c4b6; --gold: #ffce18; --gold-hi: #ffff42; --gold-lo: #ff9c18; --brown: #5a2a00;
  --green: #5ade29; --red: #ff5a52; --pink: #ff7bc6; --blue: #52b5ff; --field: #293942; --deep: #182929;
  --shadow: 1px 1px 0 #000;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0a2a6e; color: var(--ink); overflow: hidden; }
body, button, input, select { font-family: 'DWC Text', monospace; font-size: 13px; line-height: 16px;
  -webkit-font-smoothing: none; font-smooth: never; text-shadow: var(--shadow); }
#app { position: relative; width: 100%; max-width: 318px; height: 500px; margin: 0 auto; display: flex; flex-direction: column;
  background: #1a6fd8 url('../assets/theme/bg_hex.png') center / 512px 384px; image-rendering: pixelated; overflow: hidden; }
button { color: inherit; cursor: pointer; background: none; padding: 0; }
img, canvas { image-rendering: pixelated; }
b { font-weight: normal; color: var(--gold-hi); }
.small, .chip, label, .note, .timer, .why, #dlgStep { font-family: 'DWC Small', monospace; font-size: 10px; line-height: 12px; }

/* frame pieces, 1x art drawn at 2x */
.frame-panel { border: 16px solid; border-image: url('../assets/theme/panel.png') 8 fill / 16px stretch; }
.frame-card  { border: 12px solid; border-image: url('../assets/theme/panel_flat.png') 6 fill / 12px stretch; }
.frame-btn   { border: 14px solid; border-image: url('../assets/theme/button.png') 7 fill / 14px stretch; }
.frame-field { border: 8px solid;  border-image: url('../assets/theme/field.png') 4 fill / 8px stretch; }
.frame-tag   { border: 8px solid;  border-image: url('../assets/theme/tag.png') 4 fill / 8px stretch; }

/* header, gold banner like the game's screen titles */
#top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 40px; padding: 0 6px;
  background: linear-gradient(#ffff42 0 2px, #ffce18 2px 30px, #ff9c18 30px 36px, #292929 36px 38px, #000 38px); }
.who { display: flex; align-items: center; gap: 6px; min-width: 0; }
#name { color: var(--brown); text-shadow: 1px 1px 0 #ffef7a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; margin-top: -3px; }
.chip { color: #fff; white-space: nowrap; padding: 0 2px; margin-top: -3px;
  border: 6px solid; border-image: url('../assets/theme/field.png') 4 fill / 6px stretch; }
.hearts { display: flex; align-items: center; gap: 0; flex: none; margin-top: -3px; }
.hearts img.heart { width: 18px; height: 16px; }
.hearts .hcount { color: #ff4a5a; margin-left: 3px; text-shadow: 1px 1px 0 #7b0010; }
.hearts .hcount i { font-style: normal; color: var(--brown); text-shadow: none; }

/* scene */
#scene { position: relative; height: 236px; flex: none; border-bottom: 2px solid #000;
  background: linear-gradient(#00103a66, #00103a99), url('../assets/theme/bg_hex.png') center / 512px 384px; }
#cv { width: 318px; height: 236px; display: block; touch-action: none; }
.tag { position: absolute; top: 4px; left: 4px; color: #fff; font-family: 'DWC Small', monospace; font-size: 10px; line-height: 12px;
  border: 6px solid; border-image: url('../assets/theme/field.png') 4 fill / 6px stretch; }
.tag.right { left: auto; right: 4px; }
.status { position: absolute; left: 4px; top: 30px; display: flex; gap: 2px; flex-wrap: wrap; max-width: 220px; }
.status span { font-family: 'DWC Small', monospace; font-size: 10px; line-height: 12px;
  border: 6px solid; border-image: url('../assets/theme/field.png') 4 fill / 6px stretch; }
.status .bad { color: var(--red); } .status .warn { color: var(--gold); } .status .ok { color: var(--green); }
#floaters { position: absolute; inset: 0; pointer-events: none; }
.floater { position: absolute; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000; animation: rise 1.6s ease-out forwards;
  white-space: nowrap; transform: translateX(-50%); }
.floater.up { color: var(--green); } .floater.down { color: var(--red); } .floater.info { color: var(--gold-hi); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 6px); } 15% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -34px); } }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#flash.go { animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: 0; } 20% { opacity: .95; } 100% { opacity: 0; } }
.offline { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); color: var(--red); white-space: nowrap;
  border: 6px solid; border-image: url('../assets/theme/field.png') 4 fill / 6px stretch; }
.offline.hidden { display: none; }

/* stat bars, slanted like the game's */
#meters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 4px 4px 0; padding: 2px 2px 0;
  border: 12px solid; border-image: url('../assets/theme/panel_flat.png') 6 fill / 12px stretch; }
.meter label { display: block; color: #fff; margin-bottom: 2px; white-space: nowrap; }
.meter i { display: block; height: 6px; background: #000; border-bottom: 1px solid #d6d6d6; position: relative; }
.meter b { display: block; height: 100%; width: 50%; transition: width .4s ease;
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.meter[data-k="hunger"] b { background: #ff9c18; } .meter[data-k="mood"] b { background: var(--pink); }
.meter[data-k="energy"] b { background: var(--blue); } .meter[data-k="health"] b { background: #39ce18; }
.meter[data-k="stress"] b { background: #e81818; }
.meter.warn label { color: var(--gold-hi); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { color: #fff; } }

/* action buttons, the green pills from the game's lists */
#actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px 4px 6px; margin-top: auto; }
#actions button { border: 14px solid; border-image: url('../assets/theme/button.png') 7 fill / 14px stretch;
  height: 50px; padding: 0; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
#actions button:active { border-image-source: url('../assets/theme/button_down.png'); }
#actions button:disabled { filter: grayscale(1) brightness(.6); cursor: default; }
#actions button.pulse { border-image-source: url('../assets/theme/button_on.png'); animation: pulse .5s steps(2) infinite; }
@keyframes pulse { 50% { border-image-source: url('../assets/theme/button.png'); } }
img.ico { width: 24px; height: 24px; object-fit: contain; display: block; margin: -8px auto -1px; }
#actions button[data-act="feed"] { touch-action: none; cursor: grab; }
.drag-food { position: absolute; width: 38px; height: 38px; pointer-events: none; z-index: 30;
  transform: translate(-50%, -80%); opacity: 0; filter: drop-shadow(2px 2px 0 #0008); }
.drag-food.show { opacity: 1; }

/* sheets, the big gold framed windows */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: 40px; z-index: 20; overflow-y: auto; transition: transform .28s cubic-bezier(.2,.8,.2,1); will-change: transform;
  border: 16px solid; border-image: url('../assets/theme/panel.png') 8 fill / 16px stretch; padding: 0 2px 6px; scrollbar-width: thin; scrollbar-color: #ffce18 #183129; }
.sheet.hidden { transform: translateY(105%); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; position: sticky; top: -2px; z-index: 2;
  background: #295242; padding: 2px 0 4px; }
.sheet-head h2, h3 { margin: 0; font-weight: normal; }
.sheet-head h2 { color: var(--brown); text-shadow: 1px 1px 0 #ffef7a; font-size: 13px;
  border: 8px solid; border-image: url('../assets/theme/tag.png') 4 fill / 8px stretch; padding: 0 4px; }
#sheetClose { color: var(--brown); text-shadow: none; width: 30px; height: 30px; line-height: 14px;
  border: 8px solid; border-image: url('../assets/theme/tag.png') 4 fill / 8px stretch; }
h3 { color: var(--gold-hi); margin: 10px 0 4px; }
.note { color: var(--mute); margin: 6px 0; text-shadow: none; }
.cage, .evo-opt { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; margin-bottom: 2px;
  border: 12px solid; border-image: url('../assets/theme/panel_flat.png') 6 fill / 12px stretch; padding: 0; }
.cage.on, .evo-opt.ready { border-image-source: url('../assets/theme/button_on.png'); border-image-slice: 7 fill; border-width: 14px; }
.cage img { width: 54px; height: 40px; object-fit: contain; flex: none; }
.cage .t, .evo-opt .n { color: #fff; }
.cage .s { color: var(--mute); font-family: 'DWC Small', monospace; font-size: 10px; line-height: 13px; text-shadow: none; }
.gain { display: inline-block; font-family: 'DWC Small', monospace; font-size: 10px; line-height: 12px; padding: 0 3px; margin: 1px 2px 0 0; background: #000; text-shadow: none; }
.gain.up { color: var(--green); } .gain.down { color: var(--red); }
.evo-now { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.evo-now canvas, .evo-opt canvas { background: #000; flex: none; align-self: center; width: 64px; height: 64px; border: 2px solid #ffce18; }
.timer { color: var(--mute); text-shadow: none; } .timer b { color: var(--gold-hi); }
.why { color: var(--mute); text-shadow: none; }
.req { margin-top: 3px; }
.req i, .bar { display: block; height: 5px; background: #000; border-bottom: 1px solid #d6d6d6; margin-top: 2px; }
.req b, .bar b { display: block; height: 100%; background: var(--blue); clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.kv { display: flex; justify-content: space-between; border-bottom: 1px solid #183129; padding: 1px 0; }
.kv span:last-child { color: var(--gold-hi); }
.big { width: 100%; margin: 8px 0; }

/* gold button for the main thing, green for the rest */
.primary { color: var(--brown); text-shadow: 1px 1px 0 #ffef7a; padding: 0 10px; min-height: 30px;
  border: 8px solid; border-image: url('../assets/theme/tag.png') 4 fill / 8px stretch; }
.primary:active { filter: brightness(.85); }

/* onboarding */
.overlay { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: #0a2a6ecc; }
.overlay.hidden { display: none; }
.card { text-align: center; width: 270px; padding: 8px 4px;
  border: 16px solid; border-image: url('../assets/theme/panel.png') 8 fill / 16px stretch; }
.card h1 { font-size: 13px; font-weight: normal; margin: 4px 0; color: #fff; }
.eyebrow { color: var(--gold-hi); margin: 0; }
#introEgg { display: block; margin: 6px auto; }

/* tutorial box, the game's metal help box with agumon */
.dialog { position: absolute; left: 2px; right: 2px; bottom: 4px; z-index: 50; min-height: 90px;
  border-style: solid; border-width: 12px 36px 16px 32px; border-image: url('../assets/theme/dialog_frame.png') 6 18 8 16 fill / 12px 36px 16px 32px stretch;
  padding: 0 0 0 0; }
.dialog::after { content: ''; position: absolute; right: -6px; bottom: -6px; width: 70px; height: 68px;
  background: url('../assets/theme/guide_agumon.png') 0 0 / 70px 68px; pointer-events: none; }
.dialog.top { bottom: auto; top: 42px; }
.dialog.hidden { display: none; }
.dlg-body { padding: 2px 60px 0 6px; }
.dlg-body p { margin: 0 0 4px; }
.dlg-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 52px 0 6px; }
#dlgStep { color: #9a9a9a; text-shadow: none; }
#dlgNext.hidden { visibility: hidden; }
.dlg-body input { width: 100%; color: #fff; outline: none;
  border: 8px solid; border-image: url('../assets/theme/field.png') 4 fill / 8px stretch; }
.spot { position: absolute; z-index: 45; pointer-events: none; transition: all .25s ease;
  border: 2px solid var(--gold-hi); outline: 2px solid #000; box-shadow: 0 0 0 999px #000a; }
.spot.hidden { display: none; }
.tut-on .sheet { padding-bottom: 150px; }

.toast { position: absolute; left: 50%; top: 44px; transform: translateX(-50%); z-index: 30; width: max-content; max-width: 306px; text-align: center;
  border: 12px solid; border-image: url('../assets/theme/panel_flat.png') 6 fill / 12px stretch; padding: 0 2px; }
.toast.hidden { display: none; }

/* streamer tools */
.debug-btn { position: absolute; left: 4px; top: 214px; z-index: 15; width: 34px; height: 26px; color: var(--brown); text-shadow: none;
  font-family: 'DWC Small', monospace; font-size: 10px; border: 6px solid; border-image: url('../assets/theme/tag.png') 4 fill / 6px stretch; }
.debug-btn.hidden { display: none; }
.dbg .row { display: flex; gap: 2px; flex-wrap: wrap; margin: 2px 0; }
.dbg button, .dbg select, .dbg input { color: #fff; min-height: 26px;
  border: 8px solid; border-image: url('../assets/theme/button.png') 7 fill / 8px stretch; padding: 0 2px; }
.dbg select, .dbg input { border-image-source: url('../assets/theme/field.png'); border-image-slice: 4 fill; background: none; }
.dbg select option { background: #293942; }
.dbg input { width: 70px; }
.dbg .danger { color: var(--red); }

/* log, last few entries under the bars. tap it for the full thing */
.log { display: block; flex: none; width: auto; text-align: left; margin: 2px 4px 0; height: 60px; overflow: hidden; position: relative;
  border: 12px solid; border-image: url('../assets/theme/panel_flat.png') 6 fill / 12px stretch; padding: 0 2px; }
.log-head { position: absolute; right: -2px; top: -6px; color: var(--brown); text-shadow: none; font-family: 'DWC Small', monospace; font-size: 10px;
  border: 5px solid; border-image: url('../assets/theme/tag.png') 4 fill / 5px stretch; padding: 0 2px; }
.log ul, .log-full { list-style: none; margin: 0; padding: 0; }
.log li, .log-full li { display: flex; gap: 6px; font-family: 'DWC Small', monospace; font-size: 10px; line-height: 13px; text-shadow: none; color: #e8f4ee; }
.log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log li:first-child { color: #fff; }
.log li .when, .log-full li .when { color: var(--mute); flex: none; width: 34px; }
.log li .txt { overflow: hidden; text-overflow: ellipsis; }
.log .empty { color: var(--mute); }
.log-full li { padding: 3px 0; border-bottom: 1px solid #183129; white-space: normal; }
.log-full li .when { width: 44px; }
.c-up { color: var(--green); } .c-down { color: var(--red); } .c-gold { color: var(--gold-hi); }
.log.hidden { display: none; }
.log { cursor: pointer; }

/* use the game's hand instead of the normal cursor (mirrored to a right hand, hotspots mirrored with it) */
#app, #app * { cursor: url('../assets/ui/cursor_point.png') 7 1, pointer !important; }
#app #cv { cursor: url('../assets/ui/cursor_hand.png') 11 14, grab !important; }
#app.grabbing, #app.grabbing * { cursor: url('../assets/ui/cursor_grab.png') 10 12, grabbing !important; }
#app input, #app select { cursor: text !important; }

/* meat/protein toggle on the feed button */
#actions button[data-act="feed"] { position: relative; }
#actions button .swap { position: absolute; right: -10px; top: -10px; width: 20px; height: 20px; line-height: 10px; text-align: center;
  color: var(--brown); text-shadow: none; font-family: 'DWC Small', monospace; font-size: 10px;
  border: 5px solid; border-image: url('../assets/theme/tag.png') 4 fill / 5px stretch; }
/* sound button, bottom right of the scene */
.mute-btn { position: absolute; right: 4px; top: 246px; z-index: 15; height: 26px; padding: 0 2px; color: var(--brown); text-shadow: none;
  font-family: 'DWC Small', monospace; font-size: 10px; border: 6px solid; border-image: url('../assets/theme/tag.png') 4 fill / 6px stretch; }
.mute-btn.off { filter: grayscale(1) brightness(.8); }

.colon { margin-right: 2px; }   /* the font puts the colon right up against the seconds */
.move { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid #183129; padding: 1px 0; }
.move .mi { color: var(--gold-hi); white-space: nowrap; }
/* storage button, bottom left of the scene */
.store-btn { position: absolute; left: 4px; top: 246px; z-index: 15; height: 26px; padding: 0 2px 0 0; display: flex; align-items: center; gap: 2px;
  color: var(--brown); text-shadow: none; font-family: 'DWC Small', monospace; font-size: 10px;
  border: 6px solid; border-image: url('../assets/theme/tag.png') 4 fill / 6px stretch; }
.store-btn img { width: 10px; height: 13px; image-rendering: pixelated; margin-top: -2px; }
.store-btn.hidden { display: none; }
.store-btn .badge { position: absolute; right: -12px; top: -12px; min-width: 14px; height: 14px; line-height: 14px; text-align: center;
  background: #d82020; color: #fff; border-radius: 7px; font-size: 10px; padding: 0 2px; }
.store-btn .badge.hidden { display: none; }
/* storage sheet */
.slot { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.slot canvas { background: #000; flex: none; width: 48px; height: 48px; border: 2px solid #ffce18; }
.slot .info { flex: 1; min-width: 0; }
.slot .n { color: #fff; }
.slot .primary { min-height: 26px; padding: 0 6px; flex: none; }
.slot.empty { opacity: .5; }
.slot.empty .box { width: 48px; height: 48px; border: 2px dashed #6a8a7a; flex: none; }
.viewer { display: flex; justify-content: space-between; align-items: center; gap: 6px; border-bottom: 1px solid #183129; padding: 1px 0; }
/* shop button: the DS shop's tab banner (watermelon + meat art, game font) rebuilt to say Shop.
   112x32 at 1x like the game. bits sit on the art like a price tag */
.shop-banner { position: absolute; left: 60px; top: 240px; z-index: 15; width: 112px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.shop-banner img { display: block; width: 112px; height: 32px; image-rendering: pixelated; }
.shop-banner .bits { position: absolute; left: 14px; bottom: 3px; padding: 0 3px; border-radius: 3px; background: rgba(0, 0, 0, .7);
  color: #ffe718; font-family: 'DWC Small', monospace; font-size: 10px; line-height: 12px; pointer-events: none; }
.shop-banner:hover img, .shop-banner:focus-visible img { filter: brightness(1.12); }
.shop-banner:active img { transform: translateY(1px); }
.shop-banner.hidden { display: none; }
.shop-banner.solo { left: 2px; }
/* bag counts on Feed / Heal */
#actions .cnt { font-family: 'DWC Small', monospace; font-size: 10px; color: var(--gold-hi); margin-left: 3px; }
/* shop sheet */
.bitsline { display: flex; justify-content: space-between; align-items: baseline; color: #fff; font-size: 14px; }
.bitsline b { color: var(--gold-hi); }
.tabs { display: flex; gap: 4px; margin: 4px 0 6px; }
.tabs .tab { flex: 1; min-height: 24px; }
.tabs .tab.on { filter: brightness(1.25); outline: 2px solid var(--gold-hi); }
.shoprow { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px solid #183129; }
.shoprow img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; flex: none; }
.shoprow img.cg { width: 56px; height: 32px; object-fit: cover; border: 1px solid #6a8a7a; }
.shoprow .info { flex: 1; min-width: 0; }
.shoprow .n { color: #fff; }
.shoprow .lv { color: var(--gold-hi); font-size: 11px; }
.shoprow .primary { min-height: 24px; padding: 0 6px; flex: none; }
.shoprow .primary:disabled { filter: grayscale(1) brightness(.7); }

/* small inline button, nature change on the stats sheet */
.mini { font: inherit; font-size: 10px; padding: 1px 6px; margin-left: 4px; border-radius: 4px; border: 1px solid var(--gold-hi); background: transparent; color: var(--gold-hi); cursor: pointer; }
.perks ul { margin: 4px 0 6px; padding-left: 16px; }
.perks li { margin: 3px 0; }
.feats { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.feat { display: flex; gap: 6px; align-items: flex-start; font-size: 11px; line-height: 1.3; }
.feat input { margin-top: 2px; flex: none; }
.feat i { color: var(--gold-hi); }
.cnt.hidden { display: none; }
/* back to following the digimon after dragging the cage around */
.follow-btn { position: absolute; right: 4px; top: 214px; z-index: 15; height: 26px; padding: 0 4px; color: var(--brown); text-shadow: none;
  font-family: 'DWC Small', monospace; font-size: 10px; border: 6px solid; border-image: url('../assets/theme/tag.png') 4 fill / 6px stretch; cursor: pointer; }
.follow-btn.hidden { display: none; }
/* tamer rank: the battle result screen's gold plate and "Tamer Rank" tag */
.rankcard { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 4px 0 2px; }
.rankcard .ranktag { image-rendering: pixelated; }
.rankplate { image-rendering: pixelated; display: block; }
.rankcard .rankplate { margin-left: 6px; }
.rank-up { position: absolute; left: 50%; top: 92px; z-index: 31; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 14px; background: rgba(8, 12, 40, .94); border: 2px solid #ffce18; border-radius: 6px; pointer-events: none; }
.rank-up img { image-rendering: pixelated; }
.rank-up.hidden { display: none; }
.rank-up.go { animation: rankup 4s ease both; }
.rank-up.go .rankplate { animation: rankplate .5s .35s ease-out both; }
@keyframes rankup { 0% { opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rankplate { 0% { transform: scale(2.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
/* Tamer Info: the DS screens at their real size with the values drawn on top */
.tamer-btn { position: absolute; left: 178px; top: 246px; z-index: 15; height: 26px; padding: 0 3px; color: var(--brown); text-shadow: none;
  font-family: 'DWC Small', monospace; font-size: 10px; border: 6px solid; border-image: url('../assets/theme/tag.png') 4 fill / 6px stretch; cursor: pointer; }
.tamer-btn.hidden { display: none; }
.ti { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 2px 0 6px; }
.ti-screen { position: relative; width: 256px; height: 160px; background: url('../assets/ui/tamer/ti_sub.png') no-repeat; image-rendering: pixelated; }
.ti-screen.main { height: 156px; background-image: url('../assets/ui/tamer/ti_main.png'); }
.ti-v { position: absolute; height: 11px; display: flex; align-items: flex-end; }
.ti-v.num { justify-content: flex-end; }
.ti-v.txt { justify-content: center; height: 11px; color: #fff; font-family: 'DWC Small', monospace; font-size: 10px; line-height: 11px; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
.ti-v.txt.big { height: 13px; font-family: 'DWC Text', monospace; font-size: 12px; line-height: 13px; }
.ti .dg { display: inline-block; width: 9px; height: 11px; margin-right: -1px; background: url('../assets/ui/tamer/ti_digits.png') no-repeat; image-rendering: pixelated; }
.ti .bits { display: inline-block; width: 18px; height: 11px; margin-left: 2px; background: url('../assets/ui/tamer/ti_bits.png') no-repeat; image-rendering: pixelated; }
.lic { width: 100%; border-collapse: collapse; font-size: 11px; margin: 2px 0 6px; }
.lic th, .lic td { text-align: left; padding: 2px 6px; border-bottom: 1px solid rgba(255,255,255,.12); }
.lic tr.on td { color: var(--gold); }
.warn-note { color: var(--gold-hi); }

/* Digipedia: the game's Database > Digipedia, as a sheet */
.dex-btn { position: absolute; left: 178px; top: 246px; z-index: 15; height: 26px; padding: 0 2px 0 0; display: flex; align-items: center; gap: 3px;
  color: var(--brown); text-shadow: none; font-family: 'DWC Small', monospace; font-size: 10px; cursor: pointer;
  border: 6px solid; border-image: url('../assets/theme/tag.png') 4 fill / 6px stretch; }
.dex-btn img { width: 11px; height: 15px; margin-top: -2px; }
.dex-btn.hidden { display: none; }
.dex-head { position: relative; margin: 0 0 4px; }
.dex-head img { display: block; width: 100%; image-rendering: pixelated; }
.dex-tabs .tab { padding: 0; font-size: 10px; min-height: 22px; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; }
.dex-cell { display: flex; flex-direction: column; align-items: center; padding: 3px 0 2px; background: #eef8b8; border: 2px solid #8f9a52; border-radius: 3px; cursor: pointer; }
.dex-cell canvas { width: 44px; height: 44px; image-rendering: pixelated; }
.dex-cell span { font-family: 'DWC Small', monospace; font-size: 10px; color: #4b5320; text-shadow: none; }
.dex-cell.unk { background: #c9d28f; }
.dex-cell.cur { border-color: #ffce18; box-shadow: 0 0 0 1px #c88a00; }
.dex-back { min-height: 22px; padding: 0 6px; margin-bottom: 4px; }
.dex-card { display: flex; gap: 8px; align-items: center; background: #eef8b8; border: 2px solid #8f9a52; border-radius: 3px; padding: 6px; color: #3b4210; text-shadow: none; }
.dex-card canvas { width: 96px; height: 96px; flex: none; image-rendering: pixelated; background: #dfeca0; border: 1px solid #b4bf6c; }
.dex-info { flex: 1; min-width: 0; }
.dex-info .n { font-size: 14px; color: #2c330a; margin: 1px 0 3px; overflow-wrap: anywhere; }
.dex-no, .dex-row { font-family: 'DWC Small', monospace; font-size: 10px; line-height: 14px; }
.dex-row { display: flex; align-items: center; gap: 4px; }
.dex-row .k { display: inline-block; min-width: 42px; color: #fff; background: #1f6b3a; padding: 0 3px; border-radius: 2px; }
.dex-row img { image-rendering: pixelated; height: 11px; }
.dex-text { margin: 2px 0 6px; line-height: 15px; }
.dex-links { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.dex-link { min-height: 22px; padding: 0 6px; }
.dex-link.unk { opacity: .7; }
