:root {
  font-family:
    "Paperlogy", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
  color: #16323c;
  background: #edf1ef;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 88px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #dce3df;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}
.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: white;
  background: #176b60;
  border-radius: 13px;
  font-size: 27px;
  font-weight: 900;
}
.brand b {
  display: block;
  font-size: 19px;
  letter-spacing: 1px;
}
.brand div > span {
  display: block;
  font-size: 12px;
  color: #657875;
  margin-top: 5px;
}
i {
  font-style: normal;
  background: #e8f2ed;
  color: #166d5f;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
}
.local {
  font-size: 12px;
  color: #667875;
}
.local > span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #329d70;
  margin-right: 7px;
}
main {
  height: calc(100dvh - 88px);
  position: relative;
  overflow: hidden;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
canvas:focus-visible {
  outline: 3px solid #158978;
  outline-offset: -3px;
}
.intro {
  position: absolute;
  left: 36px;
  top: 32px;
  pointer-events: none;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #36746b;
}
h1 {
  font-size: 27px;
  line-height: 1.4;
  letter-spacing: -1px;
  margin: 12px 0;
}
p {
  font-size: 12px;
  color: #63766f;
  line-height: 1.8;
}
.intro label {
  display: block;
  font-size: 11px;
  margin: 22px 0 8px;
  color: #4e655f;
}
.intro select,
.intro button {
  pointer-events: auto;
}
select,
button {
  font: inherit;
  font-size: 12px;
  border: 1px solid #d6dfd9;
  background: #fff;
  color: #274c43;
  border-radius: 9px;
  padding: 11px 13px;
  cursor: pointer;
}
select {
  display: block;
  width: 245px;
  text-overflow: ellipsis;
  box-shadow: 0 3px 12px #23453308;
}
.intro > button {
  margin-top: 9px;
}
button:hover {
  background: #e7f2ec;
  border-color: #6a9f8e;
}
button:focus-visible,
select:focus-visible {
  outline: 3px solid #62bba3;
  outline-offset: 3px;
}
button:disabled,
select:disabled {
  cursor: wait;
  opacity: 0.45;
}
button[aria-pressed="true"] {
  background: #176b60;
  color: white;
}
.toolbar {
  position: absolute;
  bottom: 63px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px;
  background: #ffffffed;
  border: 1px solid white;
  border-radius: 15px;
  box-shadow: 0 10px 40px #21402b1a;
  white-space: nowrap;
}
.toolbar button {
  border: 0;
  background: transparent;
  font-size: 20px;
  padding: 9px 12px;
}
.toolbar button span {
  font-size: 12px;
  margin-left: 4px;
}
.toolbar button:hover {
  background: #e7f2ec;
}
.toolbar button[aria-pressed="true"] {
  background: #176b60;
}
.divider {
  width: 1px;
  height: 22px;
  background: #dde5df;
  margin: 0 4px;
}
footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 28px;
  font-size: 11px;
  color: #60776d;
  background: #ffffff90;
  border-top: 1px solid #ffffff;
}
.axis {
  font-weight: 700;
  color: #176b60;
}
.axis span {
  font-weight: 400;
  margin-left: 10px;
}
.selection,
.instructions {
  position: absolute;
  right: 28px;
  top: 30px;
  width: 290px;
  background: #fffffff2;
  border: 1px solid white;
  padding: 22px;
  border-radius: 15px;
  box-shadow: 0 12px 36px #102e2412;
}
.selection h2 {
  font-size: 19px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.selection small {
  display: block;
  font-size: 11px;
  line-height: 1.8;
  color: #71837a;
}
.selection > div:last-child {
  display: flex;
  gap: 7px;
  margin-top: 18px;
}
.instructions {
  top: auto;
  bottom: 125px;
}
.loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, 90%);
  background: #fff;
  padding: 30px;
  text-align: center;
  border-radius: 18px;
  box-shadow: 0 20px 70px #183d3020;
}
.loading h2 {
  font-size: 16px;
}
.spinner {
  height: 28px;
  width: 28px;
  border: 2px solid #deebe3;
  border-top-color: #176b60;
  border-radius: 50%;
  margin: auto;
  animation: spin 1s linear infinite;
}
progress {
  height: 6px;
  width: 100%;
  accent-color: #176b60;
}
#retry {
  margin-top: 15px;
}
[hidden] {
  display: none !important;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 700px) {
  header {
    height: 68px;
    padding: 0 18px;
  }
  .brand b {
    font-size: 16px;
  }
  .mark {
    width: 36px;
    height: 36px;
    font-size: 23px;
  }
  .local {
    font-size: 0;
  }
  .local > span {
    width: 8px;
    height: 8px;
  }
  main {
    height: calc(100dvh - 68px);
  }
  .intro {
    left: 18px;
    top: 20px;
  }
  .eyebrow {
    font-size: 9px;
  }
  h1 {
    font-size: 19px;
    margin: 7px 0;
  }
  .intro p {
    font-size: 10px;
    margin: 6px 0;
  }
  .intro label {
    margin-top: 12px;
  }
  .intro select {
    width: 210px;
    padding: 9px;
  }
  .intro > button {
    padding: 8px;
  }
  .toolbar {
    bottom: 51px;
    gap: 1px;
    padding: 5px;
    max-width: calc(100% - 20px);
  }
  .toolbar button {
    padding: 9px 10px;
    font-size: 18px;
  }
  .toolbar button span {
    display: none;
  }
  .divider {
    margin: 0;
  }
  footer {
    padding: 13px 17px;
    font-size: 10px;
  }
  .hint {
    display: none;
  }
  .selection {
    top: auto;
    bottom: 112px;
    left: 15px;
    right: 15px;
    width: auto;
    padding: 16px;
  }
  .selection h2 {
    font-size: 16px;
    margin: 10px 0;
  }
  .selection small {
    font-size: 10px;
  }
  .instructions {
    bottom: 110px;
    right: 15px;
    width: calc(100% - 30px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

.selection h2 {
  word-break: keep-all;
}
/* YBM viewer additions; kept separate from the proven responsive viewer base. */
:root {
  color: #17243a;
  background: #eef1f5;
}
.mark {
  background: #263858;
}
.brand em {
  font-style: normal;
  color: #7784ad;
  font-weight: 400;
}
.intro {
  z-index: 3;
}
.intro h1 {
  font-size: 25px;
}
.intro p {
  max-width: 280px;
}
.quick {
  display: flex;
  gap: 5px;
  margin-top: 9px;
  pointer-events: auto;
}
.quick button {
  padding: 9px 10px;
}
.audience {
  margin-top: 22px;
  max-width: 280px;
  pointer-events: auto;
  background: #ffffffdc;
  padding: 14px;
  border: 1px solid #fff;
  border-radius: 12px;
}
.audience .eyebrow {
  margin-bottom: 9px;
}
.audience > div {
  display: flex;
  gap: 6px;
}
.audience small {
  display: block;
  font-size: 10px;
  color: #71808d;
  line-height: 1.6;
  margin-top: 10px;
}
button[aria-pressed="true"] {
  background: #344666;
  border-color: #344666;
  color: white;
}
.toolbar {
  z-index: 6;
}
.toolbar button[aria-pressed="true"] {
  background: #344666;
}
.selection {
  z-index: 7;
}
.instructions {
  z-index: 9;
}
.loading {
  z-index: 10;
}
#labelsLayer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.zone-label {
  position: absolute;
  transform: translate(-50%, -100%);
  border-radius: 6px;
  padding: 5px 8px;
  background: #ffffffec;
  border: 1px solid #c7d0dd;
  color: #344666;
  font-size: 10px;
  box-shadow: 0 2px 6px #16304b15;
  white-space: nowrap;
  pointer-events: auto;
}
.zone-label.active {
  background: #344666;
  color: white;
}
.intro select {
  width: 280px;
}
.selection small + small {
  border-top: 1px solid #e6e9ee;
  margin-top: 10px;
  padding-top: 10px;
}
.eyebrow {
  color: #526d91;
}
.toolbar button:hover {
  background: #e5eaf1;
}
.local i {
  background: #edf0f6;
  color: #50617a;
}
@media (max-width: 700px) {
  .intro {
    top: 12px;
    left: 12px;
    right: 12px;
  }
  .intro h1,
  .intro > p,
  .intro > .eyebrow {
    display: none;
  }
  .intro label {
    margin: 0 0 6px;
  }
  .intro select {
    width: 100%;
    max-width: 290px;
  }
  .quick {
    margin-top: 6px;
  }
  .quick button {
    font-size: 10px;
    padding: 8px;
  }
  .audience {
    position: absolute;
    right: 0;
    top: 0;
    margin: 0;
    padding: 8px;
    max-width: 140px;
  }
  .audience .eyebrow {
    display: none;
  }
  .audience button {
    font-size: 9px;
    padding: 7px 6px;
  }
  .audience small {
    font-size: 8px;
    margin-top: 5px;
  }
  .intro select {
    max-width: calc(100% - 151px);
    font-size: 10px;
  }
  .intro label {
    font-size: 10px;
  }
  .zone-label {
    font-size: 8px;
    padding: 4px 5px;
  }
  .selection {
    bottom: 108px;
  }
  .selection small {
    font-size: 10px;
  }
  .brand b {
    font-size: 15px;
  }
  .toolbar button {
    padding: 10px;
  }
  .local {
    font-size: 0;
  }
  .local i {
    font-size: 9px;
  }
}
