.claude-hook-lab {
  position: relative;
  min-width: 100vw;
  min-height: 100vh;
  overflow: hidden;
  color: #161616;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 242, 244, 0.94)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.035) 0 1px, transparent 1px 80px);
}

.claude-hook-lab__stage {
  position: fixed;
  inset: 0;
}

.claude-hook-lab__panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(360px, 1fr) minmax(260px, 340px);
  gap: 10px;
  align-items: start;
  z-index: 10000;
  width: auto;
  max-height: min(500px, 50vh);
  padding: 12px;
  box-sizing: border-box;
  overflow: auto;
  border: 1px solid rgba(20, 20, 20, 0.13);
  border-radius: 8px;
  background: rgba(252, 252, 252, 0.86);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(18px);
}

.claude-hook-lab__panel[data-collapsed="true"] {
  top: auto;
  right: 16px;
  bottom: 16px;
  left: auto;
  display: block;
  width: min(260px, calc(100vw - 32px));
  max-height: none;
  padding: 10px;
  overflow: hidden;
}

.claude-hook-lab__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-bottom: 0;
}

.claude-hook-lab__panel[data-collapsed="true"] .claude-hook-lab__header {
  align-items: center;
  margin-bottom: 8px;
}

.claude-hook-lab__eyebrow {
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  color: #6a6a6a;
  text-transform: uppercase;
}

.claude-hook-lab__header h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: 0;
}

.claude-hook-lab__panel[data-collapsed="true"] .claude-hook-lab__header h1 {
  max-width: 150px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claude-hook-lab__reset,
.claude-hook-lab__scenario,
.claude-hook-lab__modes button {
  font: inherit;
}

.claude-hook-lab__header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.claude-hook-lab__reset {
  min-width: 52px;
  height: 30px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 6px;
  color: #1d1d1f;
  background: #fff;
  cursor: pointer;
}

.claude-hook-lab__reset:disabled {
  color: #9a9a9d;
  background: rgba(255, 255, 255, 0.55);
  cursor: default;
}

.claude-hook-lab__scenario-grid {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  max-height: 180px;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 6px;
  padding-right: 2px;
  overflow: auto;
}

.claude-hook-lab__scenario {
  display: flex;
  min-width: 0;
  min-height: 52px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: 6px;
  color: #232326;
  background: rgba(255, 255, 255, 0.74);
  text-align: left;
  cursor: pointer;
}

.claude-hook-lab__scenario[data-active="true"] {
  color: #fff;
  border-color: rgba(20, 20, 20, 0.72);
  background: #17171a;
}

.claude-hook-lab__scenario-title {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claude-hook-lab__scenario-hook {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.2;
  color: #777;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claude-hook-lab__scenario[data-active="true"] .claude-hook-lab__scenario-hook {
  color: rgba(255, 255, 255, 0.68);
}

.claude-hook-lab__modes {
  display: grid;
  grid-column: 3;
  grid-row: 1;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 4px;
  margin-top: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.04);
}

.claude-hook-lab__modes button {
  height: 30px;
  border: 0;
  border-radius: 5px;
  color: #444;
  background: transparent;
  cursor: pointer;
}

.claude-hook-lab__modes button[data-active="true"] {
  color: #111;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}

.claude-hook-lab__island-themes {
  grid-column: 3;
  grid-row: 2;
  min-width: 0;
  margin-top: 0;
}

.claude-hook-lab__section-label {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  color: #666;
  text-transform: uppercase;
}

.claude-hook-lab__island-theme-grid {
  display: grid;
  max-height: 180px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(245, 246, 249, 0.74);
}

.claude-hook-lab__island-theme {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: 12px;
  color: #232326;
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.claude-hook-lab__island-theme:hover {
  border-color: rgba(0, 122, 255, 0.42);
}

.claude-hook-lab__island-theme[data-active="true"] {
  border-color: #007aff;
  background: rgba(0, 122, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.66);
}

.claude-hook-lab__island-theme-swatch {
  position: relative;
  width: 100%;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}

.claude-hook-lab__island-theme-notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(76%, 130px);
  height: 19px;
  transform: translateX(-50%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0 0 12px 12px;
}

.claude-hook-lab__island-theme-dot {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.claude-hook-lab__island-theme-name {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claude-hook-lab__island-theme-tag {
  display: block;
  margin-top: -5px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.1;
  color: #85858d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claude-hook-lab__prompts {
  display: block;
  grid-column: 1 / -1;
  margin-top: 0;
}

.claude-hook-lab__prompts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.claude-hook-lab__prompts-header p {
  margin: -2px 0 7px;
  font-size: 11px;
  line-height: 1.35;
  color: #777;
}

.claude-hook-lab__prompts-header code {
  display: inline-block;
  max-width: min(520px, 52vw);
  margin-left: 4px;
  overflow: hidden;
  color: #2f2a1f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.claude-hook-lab__prompts-header > span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.055);
  color: #666;
  font-size: 11px;
  line-height: 1.2;
}

.claude-hook-lab__prompt-list {
  display: grid;
  max-height: 190px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 6px;
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(245, 246, 249, 0.74);
}

.claude-hook-lab__prompt {
  display: flex;
  min-width: 0;
  min-height: 120px;
  flex-direction: column;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.74);
}

.claude-hook-lab__prompt-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.claude-hook-lab__prompt-meta h2 {
  margin: 0 0 3px;
  font-size: 13px;
  line-height: 1.15;
  letter-spacing: 0;
}

.claude-hook-lab__prompt-meta span {
  display: block;
  overflow: hidden;
  color: #777;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claude-hook-lab__prompt-meta button {
  flex: 0 0 auto;
  min-width: 54px;
  height: 27px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 6px;
  color: #1d1d1f;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.claude-hook-lab__prompt-meta button:hover {
  border-color: rgba(0, 122, 255, 0.42);
}

.claude-hook-lab__prompt pre {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 96px;
  padding: 8px;
  margin: 0;
  overflow: auto;
  border-radius: 6px;
  color: #242426;
  background: rgba(0, 0, 0, 0.045);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.claude-hook-lab__status {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 0;
  font-size: 11px;
  line-height: 1.2;
  color: #666;
}

.claude-hook-lab__status span {
  min-width: 0;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.055);
}

.claude-hook-lab__mini-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #666;
  font-size: 11px;
  line-height: 1.2;
}

.claude-hook-lab__mini-status span {
  min-width: 0;
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.055);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .claude-hook-lab__panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: 1fr;
    width: calc(100vw - 20px);
    max-height: 48vh;
  }

  .claude-hook-lab__panel[data-collapsed="true"] {
    left: auto;
    width: min(260px, calc(100vw - 20px));
  }

  .claude-hook-lab__scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claude-hook-lab__island-theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claude-hook-lab__prompt-list {
    grid-template-columns: 1fr;
  }
}
