@font-face {
  font-family: Condensed;
  src: url("./assets/fonts/BarlowCondensed-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}
@font-face {
  font-family: Wordmark;
  src: url("./assets/fonts/BarlowCondensed-BlackItalic.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("./assets/fonts/Barlow-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --ink: #172829;
  --deep: #132425;
  --panel: #1d3030;
  --edge: #42534e;
  --gold: #ffca66;
  --paper: #f0eddd;
  --dim: #b3c0b5;
  --mute: #8d9f96;
  --red: #f18a77;
  --mint: #a4d5ba;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --u: clamp(0.83px, min(0.0775vw, 0.147vh), 1.18px);
  font-size: calc(16 * var(--u));
  font-family: Barlow, Arial, sans-serif;
  color: var(--paper);
  background: var(--ink);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  user-select: none;
  -webkit-user-select: none;
}
button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
button:hover {
  color: #fff3d4;
}
button[hidden],
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
i {
  font-style: normal;
}
button svg,
i svg,
span svg {
  display: block;
}
.ic {
  height: 1.2em;
  width: 1.2em;
  display: inline-block;
  flex: none;
  vertical-align: middle;
}
kbd {
  min-width: 1.45em;
  height: 1.43em;
  padding: 0.1em 0.33em;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid #6b7970;
  color: #d4d8c8;
  background: #213332;
  border-radius: 2px;
}
#app {
  display: grid;
  grid-template-rows: 3.85rem minmax(0, 1fr) 8.95rem 1.65rem;
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}
#topbar {
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1.15rem 0 1.12rem;
  background: linear-gradient(104deg, #263a38, #192a2b 61%);
  border-bottom: 2px solid #6b796b;
  box-shadow: 0 2px 6px #0e292c88;
}
#topbar:before,
#deck:before {
  display: block;
  position: absolute;
  content: "";
  height: 2px;
  background: #d5a74d;
  pointer-events: none;
}
#topbar:before {
  left: 0;
  top: 0;
  width: 10.7rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--paper);
  font:
    900 2.45rem/0.95 Wordmark,
    "Arial Narrow",
    sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transform: translateY(-0.04rem);
}
.brandmark {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.5rem;
  color: var(--gold);
}
.brandmark svg {
  width: 2.65rem;
  height: 2.65rem;
}
.chartlink {
  margin-left: 1.35rem;
  padding-left: 1.28rem;
  height: 2.14rem;
  border-left: 1px solid #52615b;
  display: flex;
  align-items: center;
  gap: 0.66rem;
  text-align: left;
}
.chartlink:hover .charttext strong {
  color: var(--gold);
}
.chartstamp {
  display: none;
  color: var(--dim);
}
.charttext {
  display: flex;
  flex-direction: column;
  gap: 0.13rem;
}
.charttext small,
.readout small,
.micro {
  font: 600 0.61rem/1.1 var(--mono);
  letter-spacing: 0.115em;
  text-transform: uppercase;
}
.charttext small {
  color: #c3b991;
  font-size: 0.57rem;
}
.charttext strong {
  font:
    700 1.23rem/1 Condensed,
    sans-serif;
  letter-spacing: 0.01em;
}
.chartlink > i {
  color: #9eafa2;
  margin-left: 0.2rem;
  font-size: 0.68rem;
}
.topspace {
  flex: 1;
  min-width: 0.5rem;
}
.readout {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-right: 1px solid #42544e;
  padding: 0 1.2rem;
  height: 2.05rem;
}
.readout > i {
  font-size: 1.31rem;
  color: #c5d5c9;
}
.readout.gold > i,
.readout.gold strong {
  color: var(--gold);
}
.readout > span {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.readout small {
  color: #acb9ae;
  font-size: 0.57rem;
}
.readout strong {
  font:
    700 1.52rem/0.98 Condensed,
    sans-serif;
  font-variant-numeric: tabular-nums;
}
.readout em,
.readout b {
  font-style: normal;
  font-weight: 600;
  font-size: 1.06rem;
  color: #b8c5b9;
}
.time {
  display: flex;
  align-items: center;
  gap: 0.37rem;
  font: 600 0.9rem var(--mono);
  padding: 0 1.1rem;
  font-variant-numeric: tabular-nums;
  color: #dddcc8;
}
.time > i {
  color: #9eafa2;
  font-size: 0.85rem;
}
.tools {
  display: flex;
  align-items: center;
  gap: 0.27rem;
}
.iconbtn {
  display: grid;
  place-items: center;
  width: 1.96rem;
  height: 1.96rem;
  color: #afc0b4;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.iconbtn:hover,
.viewtools button:hover,
.minibox:hover {
  background: #30423c;
  color: var(--gold);
}
.iconbtn svg {
  width: 1.12rem;
  height: 1.12rem;
}
.pausebtn {
  margin-left: 0.22rem;
  border-color: #53615a;
  background: #34443e;
  color: #f5e8c9;
  box-shadow: inset 0 0 0 2px #203331;
}
.pausebtn:hover {
  border-color: var(--gold);
}
#water {
  position: relative;
  min-height: 0;
  min-width: 0;
  background: #387675;
  overflow: hidden;
  isolation: isolate;
}
#battle {
  width: 100%;
  height: 100%;
  display: block;
  outline: none !important;
  touch-action: none;
  cursor: crosshair;
}
#water:after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 2.3rem #142f313b;
  z-index: 0;
}
.panel {
  background: linear-gradient(
    130deg,
    rgba(29, 48, 46, 0.97),
    rgba(22, 39, 39, 0.94)
  );
  border: 1px solid #7d8c78;
  box-shadow:
    0 0.2rem 0.55rem #142b2e55,
    inset 0 0 0 2px #182b2b;
}
.objective {
  position: absolute;
  top: 1.12rem;
  left: 1.12rem;
  width: 14.45rem;
  padding: 0.83rem 0.95rem 0.87rem;
  border-left: 3px solid #e6b968;
  z-index: 1;
  pointer-events: none;
}
.objective-head {
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.43rem;
  font-size: 0.59rem;
}
.objective-head > .ic,
.objective-head > i {
  margin-left: auto;
  color: #b6b28b;
  font-size: 0.76rem;
}
.little-diamond {
  display: block;
  background: var(--gold);
  width: 0.36rem;
  height: 0.36rem;
  transform: rotate(45deg);
}
.objective h1 {
  font:
    700 1.56rem/1.03 Condensed,
    sans-serif;
  margin: 0.46rem 0 0.22rem;
}
.objective p {
  font-size: 0.77rem;
  line-height: 1.1;
  color: #c7cdbc;
  margin-bottom: 0.75rem;
}
.sigrow {
  display: flex;
  align-items: center;
  gap: 0.37rem;
  height: 1rem;
  font-size: 0.68rem;
  color: #dadfce;
}
.sigrow label {
  min-width: 3.65rem;
}
.sigrow strong {
  min-width: 1.82rem;
  text-align: right;
  font: 500 0.64rem var(--mono);
  color: #e5e3cf;
}
.side-dot {
  width: 0.32rem;
  height: 0.32rem;
  display: block;
  background: var(--red);
  transform: rotate(45deg);
}
.side-dot.friendly {
  background: var(--gold);
}
.track {
  height: 0.25rem;
  background: #3e5048;
  position: relative;
  flex: 1;
}
.track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 0.25s;
}
.rival .track i {
  background: var(--red);
}
.minibox {
  position: absolute;
  right: 1.1rem;
  top: 1.12rem;
  width: 10.65rem;
  padding: 0.38rem 0.4rem 0.42rem;
  z-index: 1;
}
.minihead {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #d5d9c6;
  font-size: 0.52rem;
  letter-spacing: 0.09em;
  padding: 0.02rem 0.08rem 0.36rem;
}
.minihead .ic {
  width: 0.77rem;
  height: 0.77rem;
}
.minihead span {
  margin-left: auto;
  font-size: 0.55rem;
  color: var(--dim);
}
#mini {
  display: block;
  width: 100%;
  aspect-ratio: 1.96;
  border: 1px solid #52685d;
  cursor: crosshair;
  touch-action: none;
}
.viewtools {
  position: absolute;
  bottom: 0.86rem;
  right: 1.13rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  background: rgba(22, 40, 40, 0.92);
  border: 1px solid #7d8b75;
  box-shadow: 0 2px 4px #203c3b66;
  color: #dee2cc;
  z-index: 1;
}
.viewtools button {
  width: 1.82rem;
  height: 100%;
  display: grid;
  place-items: center;
}
.viewtools svg {
  width: 0.95rem;
  height: 0.95rem;
}
.viewtools span:not(.vdivide) {
  font: 0.64rem var(--mono);
  min-width: 2.1rem;
  text-align: center;
}
.vdivide {
  width: 1px;
  height: 0.9rem;
  background: #637263;
}
.radio {
  position: absolute;
  z-index: 1;
  left: 1.12rem;
  bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  max-width: min(36rem, calc(100% - 13rem));
  background: rgba(22, 40, 39, 0.95);
  border: 1px solid #7b8976;
  box-shadow: 0 2px 5px #172e2d60;
  padding: 0.55rem 2rem 0.62rem 0.73rem;
  border-left: 3px solid var(--gold);
}
.radio-glyph {
  display: grid;
  place-items: center;
  color: #e5c27b;
  font-size: 1.2rem;
  padding: 0.25rem 0.55rem 0.25rem 0;
  border-right: 1px solid #556354;
}
.radio .micro {
  color: #f3c775;
  font-size: 0.55rem;
  margin-bottom: 0.22rem;
}
.radio > #radio-close {
  position: absolute;
  right: 0.3rem;
  top: 0.28rem;
  display: grid;
  place-items: center;
  color: #96a79a;
  padding: 0.15rem;
}
.radio > #radio-close svg {
  width: 0.7rem;
  height: 0.7rem;
}
#radio-text {
  color: #e5e8d7;
  font-size: 0.84rem;
  line-height: 1.16;
}
#radio-text b {
  font-weight: bold;
  color: #ffda8f;
}
#notice {
  position: absolute;
  left: 50%;
  top: 0.8rem;
  transform: translate(-50%, -6px);
  pointer-events: none;
  background: #203530f0;
  color: #f7e5b7;
  padding: 0.45rem 0.8rem;
  border: 1px solid #b1aa7a;
  border-left: 3px solid var(--gold);
  font-size: 0.8rem;
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.15s;
  text-align: center;
  max-width: 31rem;
  z-index: 2;
  box-shadow: 0 2px 6px #17332d55;
}
#notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#notice.error {
  border-left-color: var(--red);
  color: #ffcbba;
}
#modebar {
  position: absolute;
  left: 50%;
  bottom: 0.88rem;
  transform: translateX(-50%);
  background: var(--gold);
  border: 1px solid #e7b152;
  color: #1c3130;
  box-shadow: 0 2px 8px #1e3a3580;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.5rem 0.7rem;
  font-size: 0.84rem;
  z-index: 2;
}
#modebar button {
  font: 500 0.67rem var(--mono);
  border-left: 1px solid #746a48;
  padding-left: 0.6rem;
  color: #32413a;
}
#modebar .ic {
  width: 1rem;
  height: 1rem;
}
.loadscrim {
  position: absolute;
  z-index: 5;
  inset: 0;
  background: #284e4c;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
}
.loadscrim .brand {
  font-size: 3.5rem;
}
.loadscrim .brand i {
  font-size: 2.5rem;
  color: var(--gold);
}
.loadscrim > span {
  font-size: 0.8rem;
  color: var(--dim);
}
#deck {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 16.5rem minmax(0, 1fr) 7.1rem;
  gap: 1.1rem;
  padding: 0.77rem 1.15rem 0.65rem;
  background: linear-gradient(110deg, #233634, #1c2e2f 70%, #243735);
  border-top: 2px solid #acaa86;
  box-shadow: 0 -0.2rem 0.6rem #10282b44;
}
#deck:before {
  left: 0;
  top: -2px;
  width: 7rem;
  background: repeating-linear-gradient(
    130deg,
    #d9af66 0 6px,
    #35473d 6px 11px
  );
}
.bridge {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.83rem;
  border-right: 1px solid #45564f;
  padding-right: 1rem;
}
.portrait {
  position: relative;
  width: 5.45rem;
  height: 6.42rem;
  flex: none;
  padding: 2px;
  border: 1px solid #8e917a;
  background: #142b2a;
  box-shadow: 0 0 0 1px #112524;
  overflow: hidden;
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 44% 50%;
}
.portrait:after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -0.5rem 1rem #172a2640;
  pointer-events: none;
}
.portrait-bars {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  height: 0.7rem;
  background: linear-gradient(0deg, #1d342e, #1b312acc);
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 0.3rem;
}
.portrait-bars b {
  width: 0.55rem;
  height: 0.17rem;
  background: #ded594;
  transform: skew(-25deg);
}
.bridge-info {
  min-width: 0;
}
.bridge-info > .micro {
  display: flex;
  align-items: center;
  gap: 0.37rem;
  color: #b9c3aa;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}
.statuslamp {
  width: 0.33rem;
  height: 0.33rem;
  display: inline-block;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 4px #9dc9a43c;
}
.bridge-info h2 {
  margin: 0.33rem 0 0.18rem;
  font:
    700 1.58rem/1.02 Condensed,
    sans-serif;
  white-space: nowrap;
}
.bridge-info p {
  color: #b4c0b3;
  font-size: 0.72rem;
  line-height: 1.15;
  min-height: 0.87rem;
}
.bridge-info button {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin-top: 0.7rem;
  color: #e2d7b4;
  border: 1px solid #667264;
  background: #30423b;
  font:
    600 0.7rem/1 Barlow,
    sans-serif;
  padding: 0.29rem 0.35rem;
  white-space: nowrap;
}
.bridge-info button:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.bridge-info button .ic {
  width: 0.85rem;
  height: 0.85rem;
}
.bridge-info button kbd {
  font-size: 0.53rem;
  background: #22342f;
  margin-left: 0.22rem;
}
.production,
.support {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: 1.85rem;
  border-bottom: 1px solid #46574f;
  margin-bottom: 0.6rem;
}
.tabs {
  display: flex;
  align-self: stretch;
  gap: 0.45rem;
}
.tabs button {
  padding: 0 0.7rem 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font:
    700 0.95rem/1 Condensed,
    sans-serif;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: #b3bfb0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button:first-child {
  padding-left: 0.2rem;
}
.tabs button .ic {
  width: 0.99rem;
  height: 0.99rem;
}
.tabs button.active {
  border-bottom-color: var(--gold);
  color: var(--gold);
}
.tabs button:hover {
  color: var(--gold);
}
.queue {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.22rem;
  padding-bottom: 0.3rem;
  font: 500 0.55rem var(--mono);
  color: #a7b6a9;
  letter-spacing: 0.05em;
}
.queue .qname {
  margin-right: 0.2rem;
  white-space: nowrap;
}
.queue button {
  display: flex;
  align-items: center;
  gap: 1px;
  background: #31443a;
  border: 1px solid #5b6b58;
  padding: 0 0.23rem;
  font: 0.61rem var(--mono);
  color: var(--gold);
}
.queue button:hover {
  border-color: var(--red);
  color: var(--red);
}
.queue img {
  width: 1.2rem;
  height: 0.95rem;
  object-fit: contain;
}
#cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}
.action-card {
  position: relative;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #58675c;
  background-color: #344943;
  background-image:
    repeating-linear-gradient(120deg, transparent 0 9px, #687b6811 9px 10px),
    radial-gradient(ellipse at 75% 30%, #52685977, transparent 80%),
    linear-gradient(105deg, #34463f, #2c403e);
  color: var(--paper);
  box-shadow: inset 0 0 0 2px #283b363f;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.action-card:hover,
.action-card.chosen {
  border-color: var(--gold);
  background-color: #465a48;
  box-shadow: inset 0 -2px #e6b957;
}
.action-card:active,
.flare-card:active,
.bridge-info button:active {
  transform: translateY(1px);
}
.action-card > img {
  position: absolute;
  right: 9%;
  top: 6%;
  width: 57%;
  height: 75%;
  object-fit: contain;
  filter: drop-shadow(1px 3px 1px #0c21288c);
  z-index: -1;
  transition: transform 0.15s;
}
.action-card:hover > img {
  transform: translateY(-1px) scale(1.035);
}
.action-card:after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 46% 0 0;
  background: linear-gradient(transparent, rgba(19, 38, 34, 0.83));
  z-index: -1;
}
.action-card kbd,
.flare-card kbd {
  position: absolute;
  right: 0.32rem;
  top: 0.28rem;
  font-size: 0.54rem;
  color: #c9d1c1;
  background: #1f332ec9;
  border-color: #657366;
}
.action-card .price {
  position: absolute;
  top: 0.38rem;
  left: 0.42rem;
  display: flex;
  align-items: center;
  gap: 0.18rem;
  color: #f9cd76;
  font: 600 0.69rem var(--mono);
  text-shadow: 0 1px 2px #26352b;
}
.price svg {
  width: 0.85rem;
  height: 0.85rem;
}
.action-card strong {
  position: absolute;
  left: 0.51rem;
  bottom: 0.4rem;
  line-height: 1;
  font:
    700 1.08rem/1 Condensed,
    sans-serif;
  text-shadow: 0 1px 3px #16241e;
}
.action-card.locked {
  background-color: #2b3d39;
  border-color: #45594f;
}
.action-card.locked img {
  filter: saturate(0.6) brightness(0.8) drop-shadow(1px 2px 1px #0d2121aa);
}
.action-card.locked strong {
  color: #c1cbbd;
}
.action-card .need {
  position: absolute;
  left: 0.42rem;
  top: 1.52rem;
  color: #d0d5bf;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.12rem;
}
.action-card .need svg {
  width: 0.69rem;
  height: 0.69rem;
}
.action-card.poor .price {
  color: #eaa18c;
}
.action-card .gear-art {
  position: absolute;
  right: 15%;
  top: 0.64rem;
  transform: rotate(-12deg);
  color: #deb66e;
  filter: drop-shadow(2px 2px #1e322f);
}
.gear-art svg {
  width: 2.8rem;
  height: 2.8rem;
}
.support {
  border-left: 1px solid #46564f;
  padding-left: 1.03rem;
}
.support > .micro {
  display: flex;
  gap: 0.33rem;
  align-items: center;
  height: 1.85rem;
  color: #bac6b4;
  margin-bottom: 0.6rem;
  font-size: 0.55rem;
}
.support > .micro span {
  width: 0.8rem;
  height: 0.12rem;
  background: #accab2;
}
.flare-card {
  position: relative;
  flex: 1;
  overflow: hidden;
  border: 1px solid #6c806b;
  background: radial-gradient(ellipse at 50% 35%, #435b4c, #2e443b 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 0.37rem;
  isolation: isolate;
}
.flare-card:hover,
.flare-card.chosen {
  border-color: var(--mint);
}
.flare-art {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 60%;
  z-index: -1;
}
.flare-art svg {
  width: 100%;
  height: 100%;
}
.flare-card strong {
  font:
    700 0.99rem/1 Condensed,
    sans-serif;
}
.flare-card small {
  margin-top: 0.21rem;
  color: #b8e3c2;
  font: 600 0.51rem/1 var(--mono);
  letter-spacing: 0.1em;
}
#flare-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: #a6c8a9;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  background: #152727;
  border-top: 1px solid #3d5148;
  color: #9bad9e;
  gap: 0.8rem;
}
.keyhelp {
  display: flex;
  align-items: center;
  gap: 1.12rem;
}
.keyhelp span,
.keyhelp button {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.63rem;
  white-space: nowrap;
}
.keyhelp b {
  color: #d1d6c6;
  font-weight: 600;
}
.keyhelp .ic {
  height: 0.78rem;
  width: 0.78rem;
}
.keyhelp button {
  color: #c4cbb8;
}
.keyhelp button:hover {
  color: var(--gold);
}
#save-status {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: #aec4af;
  font: 500 0.54rem var(--mono);
  letter-spacing: 0.09em;
  white-space: nowrap;
}
#save-status .statuslamp {
  height: 0.28rem;
  width: 0.28rem;
}
#tip {
  position: fixed;
  z-index: 12;
  max-width: 18.5rem;
  padding: 0.65rem 0.77rem;
  background: #162a29f7;
  border: 1px solid #8b967b;
  border-left: 3px solid #dcb569;
  box-shadow: 0 0.2rem 0.75rem #0b211f66;
  pointer-events: none;
  color: #ecead6;
  line-height: 1.25;
}
#tip strong {
  font:
    700 1.12rem/1.1 Condensed,
    sans-serif;
  display: block;
  margin-bottom: 0.2rem;
}
#tip small {
  display: block;
  color: #aabdaf;
  font: 0.6rem var(--mono);
  letter-spacing: 0.03em;
  margin-bottom: 0.28rem;
  text-transform: uppercase;
}
#tip p {
  font-size: 0.77rem;
}
#tip em {
  display: block;
  font:
    normal 0.69rem Barlow,
    sans-serif;
  color: #f5ce83;
  margin-top: 0.4rem;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(12, 30, 30, 0.7);
  backdrop-filter: blur(3px);
  padding: 1rem;
}
.overlay > section {
  position: relative;
  max-height: calc(100vh - 2rem);
  width: min(43rem, 90vw);
  overflow: auto;
  background: linear-gradient(130deg, #263c39, #1b302f);
  border: 1px solid #99a086;
  box-shadow:
    0 0.8rem 3rem #0a1c1d99,
    inset 0 0 0 3px #1b312e;
  outline: none;
}
.modalhead {
  position: relative;
  padding: 1.3rem 1.65rem 1.1rem;
  border-bottom: 1px solid #637463;
  background:
    linear-gradient(90deg, #263f3a 13%, #223d38de 50%, #1d373360),
    url("./assets/cover.webp") 65% 42% / cover;
}
.modalhead .micro {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold);
  font-size: 0.65rem;
}
.modalhead h2 {
  position: relative;
  font:
    700 2.48rem/1.04 Condensed,
    sans-serif;
  margin: 0.3rem 0 0.22rem;
}
.modalhead p {
  font-size: 0.89rem;
  max-width: 31rem;
  color: #d4ddc9;
  line-height: 1.35;
}
.modalx {
  position: absolute;
  right: 0.7rem;
  top: 0.65rem;
  display: grid;
  place-items: center;
  border: 1px solid #798b78;
  background: #243c34cc;
  width: 1.77rem;
  height: 1.77rem;
}
.modalx svg {
  width: 0.97rem;
  height: 0.97rem;
}
.modalbody {
  padding: 1.15rem 1.55rem 1.38rem;
}
.dialogfoot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.15rem;
}
.goldbtn,
.linebtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.52rem;
  padding: 0.54rem 0.95rem;
  font:
    700 0.96rem/1.15 Condensed,
    sans-serif;
  letter-spacing: 0.025em;
  border: 1px solid #7a8975;
  background: #34473f;
}
.goldbtn {
  background: var(--gold);
  color: #20312b;
  border: 1px solid #ffdc92;
  box-shadow: inset 0 -2px #b58b47;
}
.goldbtn:hover {
  background: #ffdb8d;
  color: #182a26;
}
.linebtn:hover,
.chartrow:hover:not(:disabled) {
  background: #415448;
  border-color: #a1ad90;
}
.dialogfoot .ic,
.linebtn .ic,
.goldbtn .ic {
  height: 1rem;
  width: 1rem;
}
.dialogfoot.split {
  justify-content: space-between;
}
.section-title {
  font: 700 0.66rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b9c9b8;
  margin: 0 0 0.65rem;
}
.chartlist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.61rem;
}
.chartrow {
  position: relative;
  display: grid;
  align-content: center;
  text-align: left;
  min-height: 5rem;
  border: 1px solid #63735f;
  background: linear-gradient(115deg, #344b41, #2b403b);
  padding: 0.66rem 0.8rem 0.75rem 3.2rem;
}
.chartrow .chart-no {
  position: absolute;
  left: 0.72rem;
  top: 50%;
  transform: translateY(-50%);
  font:
    900 1.7rem Wordmark,
    sans-serif;
  color: #d7bc7a;
}
.chartrow .micro {
  font-size: 0.5rem;
  color: #d8c58f;
}
.chartrow strong {
  font:
    700 1.35rem Condensed,
    sans-serif;
}
.chartrow small {
  font-size: 0.71rem;
  color: #c5d0bd;
}
.chartrow:disabled {
  opacity: 0.55;
  cursor: default;
  background: #293b35;
}
.chartrow:disabled .chart-no {
  color: #9aa994;
}
.dailyrow {
  margin-top: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid #8a8b62;
  background: linear-gradient(110deg, #424c38, #2a4038);
  width: 100%;
  padding: 0.75rem 0.85rem;
  text-align: left;
}
.dailyrow > .ic {
  color: var(--gold);
  width: 1.7rem;
  height: 1.7rem;
}
.dailyrow strong {
  display: block;
  font:
    700 1.34rem/1.1 Condensed,
    sans-serif;
}
.dailyrow small {
  font-size: 0.73rem;
  color: #cbd2b9;
}
.dailyrow .dailydate {
  margin-left: auto;
  font: 0.65rem var(--mono);
  color: var(--gold);
}
.pausemenu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.pausemenu .goldbtn {
  grid-column: span 2;
}
.guide-tabs {
  display: flex;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid #536858;
}
.guide-tabs button {
  font:
    700 0.98rem Condensed,
    sans-serif;
  color: #bac7b8;
  border-bottom: 2px solid transparent;
  padding: 0.3rem 0.6rem;
}
.guide-tabs button.on {
  color: var(--gold);
  border-color: var(--gold);
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}
.guide-grid h3 {
  display: flex;
  align-items: center;
  gap: 0.43rem;
  font:
    700 1.15rem Condensed,
    sans-serif;
  color: #f2e3be;
}
.guide-grid h3 .ic {
  width: 1.1rem;
  height: 1.1rem;
  color: #e7b966;
}
.guide-grid p,
.dialog-copy {
  font-size: 0.86rem;
  color: #c6d1c2;
  line-height: 1.43;
  margin-top: 0.2rem;
}
.bindings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
.binding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid #42584a;
  padding: 0.47rem 0;
  font-size: 0.78rem;
}
.binding kbd {
  white-space: nowrap;
}
.unitguide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.unitguide > div {
  display: grid;
  grid-template-columns: 3.3rem 1fr;
  gap: 0.65rem;
  align-items: center;
}
.unitguide img {
  width: 3.3rem;
  height: 3.3rem;
  object-fit: contain;
}
.unitguide strong {
  font:
    700 1.11rem Condensed,
    sans-serif;
}
.unitguide p {
  font-size: 0.75rem;
  line-height: 1.3;
  color: #bccbbb;
}
.resultstats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid #61715c;
  border-bottom: 1px solid #61715c;
}
.resultstats div {
  text-align: center;
  border-right: 1px solid #4d634f;
}
.resultstats div:last-child {
  border: 0;
}
.resultstats strong {
  font:
    700 1.6rem Condensed,
    sans-serif;
  display: block;
  color: var(--paper);
}
.resultstats small {
  font: 0.55rem var(--mono);
  color: #bac9b7;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ribbons {
  display: flex;
  gap: 0.6rem;
}
.ribbon {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0.43rem;
  padding: 0.52rem 0.45rem;
  background: #293f35;
  border: 1px solid #445d47;
  color: #93a390;
}
.ribbon.has {
  color: #efd18c;
  border-color: #948d60;
  background: #454b35;
}
.ribbon .ic {
  width: 1.35rem;
  height: 1.35rem;
}
.ribbon strong {
  display: block;
  font:
    700 0.96rem Condensed,
    sans-serif;
}
.ribbon small {
  display: block;
  font-size: 0.63rem;
  color: #b5c3b0;
}
.log-description {
  color: #c6d1bf;
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
}
@media (min-width: 1500px) {
  #deck {
    grid-template-columns: 18.4rem minmax(0, 1fr) 8.1rem;
  }
  .action-card img {
    height: 85%;
    top: 0;
  }
  .bridge {
    gap: 1.05rem;
  }
  .portrait {
    width: 6.2rem;
  }
}
@media (max-width: 1050px) {
  #deck {
    grid-template-columns: 15.4rem minmax(0, 1fr) 6.7rem;
    gap: 0.83rem;
  }
  .readout {
    padding: 0 0.83rem;
  }
  .time {
    padding: 0 0.8rem;
  }
  .chartlink {
    margin-left: 1rem;
    padding-left: 1rem;
  }
  .portrait {
    width: 4.7rem;
  }
  .keyhelp {
    gap: 0.82rem;
  }
  .queue .qname {
    display: none;
  }
}
@media (max-height: 600px) {
  #app {
    grid-template-rows: 3.38rem minmax(0, 1fr) 8.42rem 1.47rem;
  }
  .objective {
    top: 0.82rem;
    left: 0.89rem;
    padding: 0.64rem 0.8rem 0.63rem;
  }
  .objective p {
    margin-bottom: 0.49rem;
  }
  .minibox {
    top: 0.82rem;
    right: 0.9rem;
    width: 9.55rem;
  }
  .radio {
    bottom: 0.68rem;
    left: 0.89rem;
    padding-top: 0.45rem;
    padding-bottom: 0.48rem;
  }
  .modalhead {
    padding: 0.86rem 1.25rem;
  }
  .modalbody {
    padding: 0.88rem 1.25rem;
  }
  .modalhead h2 {
    font-size: 2.12rem;
  }
  .dialogfoot {
    margin-top: 0.9rem;
  }
}
@media (max-width: 800px) {
  :root {
    --u: 0.72px;
  }
  .time {
    display: none;
  }
  .portrait {
    width: 4.2rem;
  }
  #deck {
    grid-template-columns: 14.2rem minmax(0, 1fr) 6.3rem;
    gap: 0.7rem;
  }
  .keyhelp {
    gap: 0.65rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
#relay-keys {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  margin-left: auto;
}
#relay-keys button {
  pointer-events: auto;
  font:
    700 0.61rem/1 Condensed,
    sans-serif;
  letter-spacing: 0;
  border: 1px solid #718276;
  color: #d9dfcf;
  width: 0.96rem;
  height: 0.94rem;
  background: #3a4e47;
  transition: background 0.15s;
}
#relay-keys button:hover {
  border-color: var(--gold);
  color: var(--gold);
}
#relay-keys button.ours {
  color: #243b31;
  border-color: #ffc969;
  background: var(--gold);
}
#relay-keys button.theirs {
  color: #3e3029;
  background: var(--red);
  border-color: #f5a491;
}
#relay-keys button.contested {
  outline: 1px dashed #e8e7c8;
  outline-offset: 1px;
}
.objective p.broadcast {
  color: #f6d590;
}
.objective p.danger {
  color: #f4ad96;
}
.tabs button.suggested {
  color: #f3cd81;
  background: linear-gradient(0deg, #d9ac4424, transparent);
}
.flag-choice {
  margin: 0.86rem 0;
}
.flags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.flag-option {
  position: relative;
  text-align: left;
  padding: 0.6rem 0.65rem;
  background: #2c4239;
  border: 1px solid #62765f;
}
.flag-option strong {
  display: block;
  font:
    700 1.05rem Condensed,
    sans-serif;
  margin: 0.26rem 0 0.11rem;
}
.flag-option small {
  display: block;
  font-size: 0.73rem;
  line-height: 1.26;
  color: #c5cfbd;
}
.flag-option.on {
  border-color: var(--gold);
  box-shadow: inset 0 -2px #e8be6c;
  background: #3e4938;
}
.flag-option.on:after {
  content: "✓";
  position: absolute;
  right: 0.55rem;
  top: 0.3rem;
  color: var(--gold);
}
.pennant {
  display: inline-block;
  width: 2.35rem;
  height: 1.12rem;
  clip-path: polygon(0 0, 100% 0, 72% 50%, 100% 100%, 0 100%);
  background: repeating-linear-gradient(
    124deg,
    #dfb758 0 6px,
    #263d37 6px 12px
  );
  vertical-align: middle;
}
.pennant.merchant {
  background: linear-gradient(
    0deg,
    #ede3bf 0 24%,
    #ae7652 24% 43%,
    #f0dfa4 43% 59%,
    #ae7652 59% 77%,
    #ece2c0 77%
  );
}
.pennant.rescue {
  background:
    linear-gradient(90deg, transparent 0 27%, #e0e7ce 27% 44%, transparent 44%),
    linear-gradient(0deg, #658d7e 0 37%, #e0e7ce 37% 62%, #658d7e 62%);
}
.flag-summary {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: #d5ddc8;
}
.flag-summary .pennant {
  width: 1.8rem;
  height: 0.88rem;
}
.daily-history {
  border-top: 1px solid #536858;
  margin-top: 0.85rem;
  padding-top: 0.7rem;
}
.daily-history > div {
  display: flex;
  align-items: center;
  gap: 1rem;
  font: 0.71rem var(--mono);
  padding: 0.21rem 0;
  color: #d4dec9;
}
.daily-history b {
  color: var(--gold);
}
.daily-history small {
  margin-left: auto;
  font:
    0.71rem Barlow,
    sans-serif;
  color: #b1bfac;
}
