.k3d { border: 1px solid var(--paper-edge); }
.k3d button, .k3d select, .k3d input { font: inherit; }
.k3d button { cursor: pointer; }
.k3d button:disabled { opacity: .45; cursor: default; }
.k3d :focus-visible { outline: 2px solid var(--vermillion); outline-offset: 3px; }
.k3d__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--paper-edge); }
.k3d__toolbar .kyusho__search { flex: 1 1 230px; }
.k3d__filter { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-mute); }
.k3d__filter select { max-width: 160px; min-height: 40px; background: var(--paper); color: var(--ink); border: 1px solid var(--paper-edge); padding: 6px 24px 6px 10px; border-radius: 0; }
.k3d__text-button { background: none; border: 0; padding: 8px 0; min-height: 40px; color: var(--vermillion); font-size: 12px !important; text-align: left; text-decoration: underline; text-underline-offset: 4px; }
.k3d__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.k3d__viewer { position: relative; min-width: 0; background: radial-gradient(ellipse at 50% 40%, oklch(95% .022 85 / .8), oklch(87% .033 85 / .25)); }
.k3d__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; position: relative; z-index: 3; padding: 14px 18px; border-bottom: 1px solid var(--paper-edge); }
.k3d__quick > span { margin-right: 10px; color: var(--ink-mute); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.k3d__quick button { min-height: 36px; padding: 6px 10px; background: transparent; border: 1px solid transparent; font-size: 12px; }
.k3d__quick button:hover, .k3d__quick button[aria-pressed="true"] { border-color: var(--paper-edge); background: var(--paper-deep); }
.k3d__stage { position: relative; height: 660px; width: 100%; touch-action: none; cursor: grab; overflow: hidden; }
.k3d__stage:active { cursor: grabbing; }
.k3d__stage canvas { display: block; width: 100%; height: 100%; }
.k3d__hotspots { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.k3d__point { position: absolute; width: 26px; height: 26px; transform: translate(-50%, -50%); pointer-events: auto; border: 0; background: transparent; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.k3d__point[hidden] { display: none; }
.k3d__point::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--vermillion); border: 1px solid oklch(97% .02 85); box-shadow: 0 0 0 1px oklch(35% .08 35 / .4); }
.k3d__point.is-zone::before { width: 15px; height: 15px; background: oklch(57% .065 75 / .45); border: 2px solid var(--vermillion); }
.k3d__point.is-selected::before, .k3d__point:hover::before { background: var(--vermillion); box-shadow: 0 0 0 5px oklch(55% .16 35 / .22); }
.k3d__point span { display: none; position: absolute; left: 24px; top: 3px; padding: 4px 7px; background: var(--paper); border: 1px solid var(--paper-edge); color: var(--ink); font-size: 11px; white-space: nowrap; pointer-events: none; }
.k3d__point:hover, .k3d__point:focus-visible, .k3d__point.is-selected { z-index: 100 !important; }
.k3d__point:hover span, .k3d__point:focus-visible span, .k3d__point.is-selected span, .show-labels .k3d__point span { display: block; }
.k3d__navigation { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 20px; font-size: 11px; color: var(--ink-mute); }
.k3d__navigation > div { display: flex; gap: 6px; }
.k3d__navigation button, .k3d__status button { min-width: 40px; min-height: 40px; border: 1px solid var(--paper-edge); background: var(--paper); font-size: 20px; }
.k3d__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 10px 20px 16px; font-size: 11px; color: var(--ink-mute); }
.k3d__legend span, .k3d__legend label { display: flex; align-items: center; gap: 6px; }
.k3d__legend label { margin-left: auto; min-height: 28px; cursor: pointer; }
.k3d__legend input { accent-color: var(--vermillion); }
.k3d__legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--vermillion); }
.k3d__legend i.is-zone { width: 12px; height: 12px; border: 2px solid var(--vermillion); background: none; }
.k3d__sidebar { border-left: 1px solid var(--paper-edge); min-width: 0; display: flex; flex-direction: column; max-height: 850px; }
.k3d__detail { padding: 26px 22px 20px; min-height: 226px; border-bottom: 1px solid var(--paper-edge); }
.k3d__detail h3 { font-family: var(--ff-serif); font-weight: 500; font-size: 28px; margin: 12px 0 8px; }
.k3d__detail p { font-size: 13px; line-height: 1.7; color: var(--ink-mute); margin: 0 0 8px; }
.k3d__detail .k3d__text-button { display: block; }
.k3d__index-head { display: flex; justify-content: space-between; padding: 16px 22px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.k3d__index { overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 12px; flex: 1; min-height: 100px; }
.k3d__index > button { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--paper-edge); text-align: left; padding: 12px 10px; background: transparent; font-size: 14px; }
.k3d__index > button:hover, .k3d__index > button[aria-pressed="true"] { background: var(--paper-deep); color: var(--vermillion); }
.k3d__index small { display: block; margin-top: 5px; font-size: 10px; color: var(--ink-mute); }
.k3d__index > p { padding: 10px; font-size: 13px; line-height: 1.6; }
.k3d__caption { border-top: 1px solid var(--paper-edge); margin: 0; padding: 14px 20px; font-size: 11px; color: var(--ink-mute); line-height: 1.7; }
.k3d__status { position: absolute; top: 40%; left: 10%; right: 10%; padding: 20px; background: var(--paper); text-align: center; font-size: 14px; line-height: 1.6; z-index: 4; }
.k3d__status button { font-size: 13px; padding: 8px 12px; margin: 4px; }
body.theme-ink .k3d__viewer { background: oklch(26% .014 85); }
@media (max-width: 900px) {
  .k3d__layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .k3d__stage { height: 570px; }
}
@media (max-width: 650px) {
  .k3d__layout { grid-template-columns: 1fr; }
  .k3d__toolbar { gap: 10px; padding: 12px; }
  .k3d__toolbar .kyusho__search { flex-basis: 100%; }
  .k3d__filter { flex: 1 1 40%; flex-direction: column; align-items: stretch; gap: 5px; }
  .k3d__filter select { max-width: none; width: 100%; }
  .k3d__quick { padding: 10px; }
  .k3d__quick > span { width: 100%; padding: 0 4px 4px; }
  .k3d__quick button { min-height: 40px; }
  .k3d__stage { height: 510px; }
  .k3d__sidebar { border-left: 0; border-top: 1px solid var(--paper-edge); max-height: none; }
  .k3d__detail { min-height: 0; padding: 20px; }
  .k3d__index { max-height: 320px; }
  .k3d__navigation, .k3d__legend { padding-left: 12px; padding-right: 12px; }
}
