/* The field terminal has one chassis. Only the glass's page can scroll. */
#shade:has(.pdaDeck) {
  overflow: hidden;
  grid-template: minmax(0,1fr) / minmax(0,1fr);
}
#panel:has(.pdaDeck) {
  --pda-ink: #e6f0db;
  --pda-muted: #aac4bc;
  --pda-line: #365651;
  --pda-mint: #9de5cf;
  --pda-amber: #f4bf7b;
  --frame-x: 48px;
  --frame-y: 31px;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  width: min(660px,100%);
  height: min(486px,100%);
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 23px 28px 26px;
  overflow: hidden;
  color: var(--pda-ink);
  border: 0;
  background: transparent;
  isolation: isolate;
  box-shadow: none;
  filter: drop-shadow(0 4px 0 #020b0e) drop-shadow(0 12px 18px #010610b0);
}
#panel:has(.pdaDeck)::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 9px;
  border-radius: 6px;
  background-color: #0b1c20;
  background-image: linear-gradient(to right,#46796318 1px,transparent 1px),linear-gradient(#46796318 1px,transparent 1px),linear-gradient(150deg,#13292c,#08191d 80%);
  background-size: 8px 8px,8px 8px,100% 100%;
  box-shadow: inset 0 0 22px #081116;
}
#panel:has(.pdaDeck)::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: 0 solid transparent;
  border-image: url(art/field-kit/tablet.png) 38 65 / var(--frame-y) var(--frame-x) stretch;
  image-rendering: pixelated;
}
#panel:has(.pdaDeck) > .panelHead {
  display: grid;
  grid-template-columns: minmax(0,auto) minmax(0,1fr);
  align-items: baseline;
  column-gap: 12px;
  padding: 6px 50px 10px 5px;
  margin: 0;
  border-bottom: 1px solid var(--pda-line);
}
#panel:has(.pdaDeck) > .panelHead h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  color: var(--pda-ink);
  font: 34px/1 Tiny, monospace;
  letter-spacing: .01em;
}
#panel:has(.pdaDeck) > .panelHead small {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #98b8ad;
  font: 11px/1.4 Plex, monospace;
}
#panel:has(.pdaDeck) .x {
  position: absolute;
  top: 0;
  right: 3px;
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid #587269;
  border-radius: 2px;
  background: #142d30;
  color: var(--pda-ink);
  font: 24px/1 Rubik,sans-serif;
}
.pdaDeck {
  min-height: 0; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
  font: 14px/1.35 Rubik, sans-serif;
  font-variant-numeric: tabular-nums;
}
.pdaScroll {
  flex: 1 1 0; min-height: 0; min-width: 0;
  padding: 12px 8px 8px;
  overflow: auto; overflow-x: hidden;
  scrollbar-color: #57766c #102425; scrollbar-width: thin;
  overscroll-behavior: contain; touch-action: pan-y;
}
.pdaScroll:focus-visible { outline: 1px solid #80bda9; outline-offset: -2px; }
.pdaIcon { width: 18px; height: 18px; vertical-align: middle; flex: none; }
.pdaDeck small { display: flex; align-items: center; gap: 6px; color: var(--pda-muted); font: 12px/1.2 Plex,monospace; }
.pdaDeck h3 { margin: 0; font: 600 23px/1.2 Rubik,sans-serif; color: var(--pda-ink); }
.pdaDeck h4 { margin: 15px 0 5px; font: 600 15px/1.3 Rubik,sans-serif; color:var(--pda-ink); }
.pdaVitals { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; }
.pdaVitals > div { padding: 7px 9px 8px; border-left: 2px solid var(--pda-line); }
.pdaVitals b,.pdaEquipment h3 { display: block; margin: 3px 0; font: 700 clamp(23px,3.7vw,32px)/1.1 Rubik,sans-serif; }
.pdaVitals em,.pdaEquipment h3 em { color: var(--pda-muted); font: 500 14px/1.1 Plex,monospace; }
.pdaTrack { max-width: 210px; height: 7px; padding: 1px; margin-top: 6px; background: #091417; border: 1px solid #395454; }
.pdaTrack i { display: block; height: 100%; max-width: 100%; background: repeating-linear-gradient(to right,#d48e8c 0 7px,#965f62 7px 8px); }
.pdaTrack-cargo { height: 10px; }
.pdaTrack-cargo i { background: repeating-linear-gradient(to right,#78caba 0 7px,#447b74 7px 8px); }
.pdaContract { margin: 14px 0 10px; padding: 12px 14px; border: 1px solid #645f49; border-left: 3px solid #d49c63; background: #23312e; }
.pdaContract small { color: #e7bf87; }
.pdaContract h3 { margin: 5px 0; color: #ffdc9d; }
.pdaContractAmounts { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 9px; }
.pdaContractAmounts > span { display: inline-flex; align-items: center; gap: 5px; font: 13px/1.3 Plex,monospace; }
.pdaContractAmounts .pdaIcon { width: 15px; height: 15px; }
.pdaTypeLine { position: relative; display: flex; gap: 5px; min-height: 1.45em; margin: 8px 0; color: #add0bf; font: 13px/1.45 Plex,monospace; }
.pdaPrompt { color: #d8b382; }
.pdaTypeBody { display: grid; min-width: 0; }
.pdaTypeBody > span { grid-area: 1 / 1; }
.pdaTypeMeasure { opacity: 0; pointer-events: none; user-select: none; }
.pdaTyping { min-width: 0; }
.pdaTyping.typing::after { content: '▍'; color: #b5d7ac; }
.pdaEquipment { display: grid; grid-template-columns: 98px minmax(0,1fr); align-items: center; min-height: 93px; gap: 16px; }
.pdaBlueprint {
  display: grid; place-items: center; align-self: stretch;
  border: 1px solid #385954; background-color: #10262a;
  background-image: linear-gradient(#76c5ad12 1px,transparent 1px),linear-gradient(90deg,#76c5ad12 1px,transparent 1px);
  background-size: 10px 10px;
}
.pdaArt { width: 76px; height: 76px; object-fit: contain; image-rendering: pixelated; }
.pdaEquipment h3 { color: #e9f3de; margin-block: 4px; }
.pdaAvailable,.pdaBearing { margin-top: 3px; color: var(--pda-muted); font-size: 12px; }
.pdaBearing { color: var(--pda-mint); font-weight: 600; }
.pdaOreSlots { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 9px 0; }
.pdaOreSlot { display: flex; align-items: center; gap: 4px; padding: 7px; min-width: 0; border: 1px solid var(--pda-line); background: #102526; }
.pdaOreSlot span { color: #c8d9ca; font-size: 12px; }
.pdaOreSlot b { margin-left: auto; }
.pdaOreSlot b span { color: var(--pda-ink); font: 700 17px/1 Rubik,sans-serif; }
.pdaFacts { margin: 7px 0; }
.pdaFact { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); align-items: baseline; gap: 7px; padding: 6px 2px; border-bottom: 1px solid #44605970; }
.pdaFact dt { display: flex; align-items: center; gap: 6px; color: var(--pda-muted); font-size: 13px; }
.pdaFact dt .pdaIcon { width: 15px; height: 15px; }
.pdaFact dd { margin: 0; color: var(--pda-ink); font-size: 14px; overflow-wrap: anywhere; }
.pdaLog { margin: 11px 0 0; padding: 0; list-style: none; }
.pdaLog li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 7px 2px; border-bottom: 1px dashed var(--pda-line); font-size: 12px; }
.pdaLog li b { margin-left: auto; }
.pdaActions,.pdaLocker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.pdaAction,.pdaLocker button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border: 1px solid #56786d; border-radius: 2px; padding: 6px 12px; background: #173532; color: #e6f0da; font: 500 13px/1.2 Rubik,sans-serif; }
.pdaAction[data-do=recall] { border-color: #8d785d; background: #39362b; color: #f6d39b; }
.pdaAction:disabled { color: #9daba3; background: #19292a; border-color: #43524e; }
.pdaLocker button[aria-pressed=true] { border-color:#9dbda0; color:#e0eccb; background:#344c3f; }
.pdaLocker button[aria-pressed=true]::before { content: '✓'; }
.pdaNav { display: grid; grid-template-columns: 38px minmax(0,1fr) 38px; gap: 5px; padding-top: 6px; border-top: 1px solid var(--pda-line); }
.pdaNav [role=tablist] { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.pdaNav button { min-height: 42px; border: 1px solid #34524c; border-radius: 1px; color: #a7c3b8; background: #14282b; }
.pdaNav [role=tab] { display: flex; justify-content: center; align-items: center; gap: 5px; border-width: 1px 0 1px 1px; padding: 2px; font: 500 12px/1.2 Rubik,sans-serif; }
.pdaNav [role=tab]:last-child { border-right-width: 1px; }
.pdaNav [aria-selected=true] { background: #26483e; color: #ecf5d9; box-shadow: inset 0 -3px #a5dbb9; }
.pdaArrow { display: grid; place-items: center; }
.pdaArrow i { width: 9px; height: 9px; border: solid #b9d5c2; border-width: 2px 2px 0 0; transform: rotate(45deg); }
.pdaArrow[data-pda-step="-1"] i { transform: rotate(225deg); }
.pdaDeck button:focus-visible { outline: 2px solid #f1c47d; outline-offset: -2px; }
@media(hover:hover) {
  .pdaDeck button:hover:not(:disabled) { background-color: #2b4941; }
  .pdaTypeLine:has(.typing) { cursor: pointer; }
}
@media(pointer:coarse) {
  .pdaNav button,.pdaAction,.pdaLocker button { min-height:44px; }
  #panel:has(.pdaDeck) .x { min-width:44px; min-height:44px; }
}
@media(max-width:550px) {
  #panel:has(.pdaDeck) { --frame-x:36px; --frame-y:24px; padding:19px 19px 20px; height:min(500px,100%); }
  #panel:has(.pdaDeck) > .panelHead { display:block; padding:0 48px 7px 4px; }
  #panel:has(.pdaDeck) > .panelHead h2 { font-size:26px; }
  #panel:has(.pdaDeck) > .panelHead small { display:block; font-size:10px; }
  .pdaScroll { padding:8px 3px; }
  .pdaNav { grid-template-columns:32px minmax(0,1fr) 32px; gap:3px; }
  .pdaNav [role=tab] { flex-direction:column; gap:2px; font-size:11px; }
  .pdaNav .pdaIcon { width:15px;height:15px; }
  .pdaEquipment { grid-template-columns:76px minmax(0,1fr); min-height:76px;gap:10px; }
  .pdaArt { width:60px;height:60px; }
  .pdaVitals { gap:5px; }
  .pdaOreSlot { flex-wrap:wrap;padding:5px;gap:2px; }
  .pdaOreSlot > .pdaIcon { width:13px;height:13px; }
}
@media(max-width:360px) {
  #panel:has(.pdaDeck) { --frame-x:31px; --frame-y:22px; padding-inline:16px; }
  .pdaNav { grid-template-columns:28px minmax(0,1fr) 28px; }
  .pdaOreSlot { display:grid; grid-template-columns:15px 1fr; }
  .pdaOreSlot > span { grid-column:1/-1; grid-row:2; font-size:11px; }
  .pdaOreSlot b { grid-column:2; grid-row:1; margin:0; }
  .pdaContract { padding:9px; }
  .pdaFact dt { font-size:12px; }
}
@media(max-height:465px) {
  #panel:has(.pdaDeck) { --frame-x:35px; --frame-y:20px; padding-block:13px 15px; }
  #panel:has(.pdaDeck) > .panelHead { padding-top:0; padding-bottom:5px; min-height:34px; }
  #panel:has(.pdaDeck) > .panelHead h2 { font-size:25px; }
  #panel:has(.pdaDeck) .x { min-height:32px; }
  .pdaNav { padding-top:3px; }
  .pdaNav button { min-height:34px; }
  .pdaDeck {gap:3px;}
  .pdaScroll {padding-block:6px;}
}
