:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #101725; color: #f5f7fb; }
* { box-sizing: border-box; }
body { margin: 0; }
header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem 1rem; background: #1d293b; }
h1 { margin: 0; font-size: 1.15rem; }
h1 small { font-size: .75rem; font-weight: normal; }
select, button { font: inherit; color: inherit; background: #33465e; border: 1px solid #8da1b7; border-radius: .45rem; min-height: 44px; padding: .45rem .7rem; cursor: pointer; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #ffda70; outline-offset: 2px; }
main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); height: calc(100dvh - 65px); }
.viewer { position: relative; overflow: hidden; min-height: 300px; background: #1d2735; }
#canvas, #markers { position: absolute; inset: 0; }
#canvas canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#markers { pointer-events: none; overflow: hidden; }
.marker { position: absolute; pointer-events: auto; transform: translate(-50%, -50%); width: 44px; height: 44px; padding: 0; border: 0; background: transparent; border-radius: 50%; font-size: 11px; font-weight: bold; isolation: isolate; }
.marker::before { content: ""; position: absolute; width: 22px; height: 22px; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; background: rgba(var(--marker-rgb, 0, 93, 155), .7); z-index: -1; }
.marker[aria-pressed="true"]::before { background: rgba(170, 82, 0, .7); }
.marker.has-custom-color[aria-pressed="true"]::before { background: rgba(var(--marker-rgb), .7); border-color: #ffda70; }
#reset { position: absolute; right: .6rem; bottom: .6rem; }
#status { position: absolute; left: .6rem; top: .6rem; max-width: 90%; padding: .45rem; background: #111d; border-radius: .4rem; pointer-events: none; }
#status:empty { display: none; }
.sidebar { overflow-y: auto; padding: .8rem 1rem; }
.sidebar h2 { font-size: 1.05rem; }
.hint { font-size: .9rem; }
#card { padding: .8rem; border: 1px solid #8da1b7; border-radius: .5rem; background: #24354b; }
#close { float: right; }
#detail img { max-width: 100%; height: auto; }
a { color: #a4d8ff; }
#list { padding: 0; list-style: none; }
#list button { width: 100%; text-align: left; margin-bottom: .35rem; }
@media (max-width: 700px) {
  header { padding: .4rem; }
  main { display: flex; flex-direction: column; height: calc(100dvh - 58px); }
  .viewer { flex: 1 1 58%; min-height: 220px; }
  .sidebar { flex: 1 1 42%; min-height: 130px; }
}
