* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
}

.app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.panel {
  width: min(720px, 90vw);
  background: #ffffff;
  color: #1b1b1b;
  border: 1px solid #333333;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.panel h1,
.panel h2 {
  margin-top: 0;
}

.hidden {
  display: none;
}

#panel-test.hidden {
  display: none;
}

.field {
  display: grid;
  gap: 8px;
  margin: 16px 0 24px;
}

.field input {
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #cfcfcf;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  background: #efefef;
  color: #1b1b1b;
}

button.primary {
  background: #00ada1;
  color: #ffffff;
}

button.danger {
  background: #d0302f;
  color: #ffffff;
}

.stage {
  width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0 0;
  border: 1px dashed #dadada;
  border-radius: 16px;
  background: #ffffff;
  flex-shrink: 0;
}

.shape {
  width: 120px;
  height: 120px;
  background: #1f5eff;
}

.shape.circle {
  border-radius: 50%;
}

.status {
  display: none;
}

.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.result-card {
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.result-card h3 {
  margin: 0 0 8px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.result-grid div {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f7f7;
}

.share-link {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f4f4;
  font-size: 14px;
  word-break: break-all;
  display: none;
}

.share-link.visible {
  display: block;
}

body.fullscreen-test {
  background: #ffffff;
}

body.fullscreen-test .app {
  padding: 0;
}

body.fullscreen-test #panel-test {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

body.fullscreen-test #panel-test .test-header,
body.fullscreen-test #panel-test .status {
  display: none;
}

body.fullscreen-test #panel-test .stage {
  width: 100vw;
  height: 100vh;
  margin: 0;
  border: none;
  border-radius: 0;
}

#panel-test {
  display: flex;
  flex-direction: column;
}

.stage {
  margin: 24px 0 0;
}

.test-credit {
  font-size: 12px;
  color: #6b6b6b;
  margin: auto 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  padding: 16px 0 4px;
}

.test-credit-icon {
  width: 14px;
  height: 14px;
  fill: #000000;
}

.test-credit a {
  color: inherit;
  text-decoration: underline;
}

body.fullscreen-test #panel-test .test-credit {
  display: none;
}

.rt-graph {
  width: 100%;
  height: auto;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  background: #ffffff;
  display: block;
}

.graph-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 12px;
  color: #666666;
  margin: 8px 0 0;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot,
.legend-square,
.legend-tick {
  display: inline-block;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f9d55;
}

.legend-square {
  width: 8px;
  height: 8px;
  background: #d94a38;
}

.legend-tick {
  width: 2px;
  height: 10px;
  background: #111111;
}

.json-export .json-output {
  width: 100%;
  min-height: 220px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d7d7d7;
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  background: #fafafa;
  color: #1b1b1b;
  resize: vertical;
}
