.lb-tools, .lb-panel {
  --lb-line: #2a6940;
  --lb-ink: #70f995;
  --lb-bright: #9affb1;
  color: var(--lb-ink);
  font: 400 16px/1.4 "Obcoro Display Pixel", monospace;
  font-synthesis: none;
}
.lb-tools {
  display: flex;
  letter-spacing: normal;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.lb-tools :is([data-lb-open], .ob-bgm-toggle), .lb-panel button {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 5px 12px;
  border: 1px solid #52805f;
  border-radius: 0;
  background: #07100c;
  color: var(--lb-ink);
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.lb-tools [data-lb-status] {
  color: #79b38a;
  font-size: 14px;
}
.lb-tools [data-lb-status]:empty { display: none; }
.lb-tools:has(.ob-bgm-toggle) [data-lb-status] { order: 1; }
.lb-tools :is([data-lb-open], .ob-bgm-toggle):focus-visible, .lb-panel button:focus-visible {
  outline: 2px solid var(--lb-bright);
  outline-offset: 2px;
}
@media (hover: hover) {
  .lb-tools :is([data-lb-open], .ob-bgm-toggle):hover, .lb-panel button:hover {
    border-color: var(--lb-ink);
    background-color: #11271b;
  }
}
.lb-panel {
  position: fixed;
  inset: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
         max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
  width: min(420px, calc(100% - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right))));
  max-width: none;
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #52805f;
  border-radius: 0;
  background: #040b09f7;
  color-scheme: dark;
  text-align: left;
}
.lb-panel:not([open]) { display: none; }
.lb-panel::backdrop { background: rgb(1 7 7 / 80%); }
.lb-inner { padding: clamp(18px, 5vw, 26px); }
.lb-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--lb-line);
}
.lb-path, .lb-metric, .lb-note {
  color: #79b38a;
  font-size: 14px;
  font-weight: 400;
}
.lb-heading h2 {
  margin: 4px 0 0;
  color: var(--lb-bright);
  font: inherit;
  font-size: 26px;
  line-height: 1.3;
}
.lb-result, .lb-result > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.lb-result {
  justify-content: space-between;
  margin: 16px 0;
}
.lb-score {
  color: var(--lb-bright);
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}
.lb-rank { font-size: 16px; }
.lb-wheels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.lb-wheel {
  display: grid;
  border: 1px solid var(--lb-line);
  background: #0a1810;
  text-align: center;
}
.lb-wheel:focus-within { border-color: #70b385; }
.lb-panel .lb-wheel button {
  padding: 0;
  border: 0;
  font-size: 24px;
  line-height: 1;
}
.lb-panel .lb-wheel button:focus-visible { outline-offset: -3px; }
.lb-wheel output {
  padding: 4px 0;
  border-block: 1px solid var(--lb-line);
  color: var(--lb-bright);
  font-size: clamp(40px, 11vw, 54px);
  line-height: 1.25;
}
.lb-note { margin: 14px 0 0; }
.lb-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--lb-line);
}
.lb-actions button { flex: 1; }
.lb-actions .lb-primary {
  position: relative;
  isolation: isolate;
  flex: 1.6;
  border: none;
  background: transparent;
  color: #fa785c;
  font-size: 18px;
}
.lb-primary::before, .lb-primary::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  background: #fa785c;
}
.lb-primary::after { inset: 1px; background: #26130e; }
.lb-panel button:disabled { opacity: .6; cursor: default; }
@media (hover: hover) {
  .lb-primary:hover::after { background: #402019; }
}
.lb-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  color: var(--lb-ink);
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.lb-table :is(th, td) { padding: 5px 6px; }
.lb-table th { color: #79b38a; font-size: 14px; font-weight: 400; }
.lb-table td { border-top: 1px solid #1d432b; }
.lb-table :first-child:is(th, td) { width: 24%; padding-left: 0; }
.lb-table :last-child:is(th, td) { padding-right: 0; text-align: right; }
.lb-table tbody td:nth-child(2) { letter-spacing: .1em; }
.lb-table tbody tr:first-child { color: var(--lb-bright); background: #102417; }
.lb-table tbody tr:first-child td:first-child { box-shadow: inset 2px 0 #70f995; padding-left: 8px; }
@media (max-width: 480px) {
  .lb-tools { gap: 4px; font-size: 14px; }
  .lb-tools [data-lb-status]:not(:empty) { order: 1; flex-basis: 100%; text-align: right; }
}
