.detail {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 15;
  width: 268px;
  /* ending above the corner's widgets */
  max-height: calc(100% - 20px - var(--corner-foot) - var(--corner-h));
  overflow-y: auto;
  background: #171d2bf7;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 12.5px;
}
.detail h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  font-size: 14px;
}
.detail h3 .icon {
  flex: 0 0 26px;
  margin: -6px 0;
}
.detail .sub {
  color: var(--dim);
  font-size: 11.5px;
  margin-bottom: 8px;
}
.detail table {
  width: 100%;
  border-collapse: collapse;
}
.detail td {
  padding: 1px 0;
  vertical-align: top;
}
.detail th {
  padding: 6px 0 1px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: normal;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail td:first-child {
  color: var(--dim);
  padding-right: 8px;
  white-space: nowrap;
}
.detail .x {
  position: absolute;
  right: 8px;
  top: 6px;
  background: none;
  border: 0;
  color: var(--dim);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.detail .field-name,
.detail .goto .face {
  font-size: 11px;
  opacity: 0.7;
}
.detail .field-name {
  margin-left: 3px;
}
.detail .unnamed {
  color: var(--dim);
  font-style: italic;
}
.detail .fold {
  position: absolute;
  right: 30px;
  top: 3px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--dim);
  cursor: pointer;
}
.detail .fold svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.detail .x:hover,
.detail .fold:hover {
  color: var(--ink);
}
.detail.folded .fold svg {
  transform: rotate(-90deg);
}
.detail.folded .sub {
  margin-bottom: 0;
}
.detail .fold + h3 {
  padding-right: 50px;
}
.detail .press,
.detail .put {
  margin: 0 0 8px;
}
.detail .press button,
.detail .put button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 9px;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
}
.detail .press button:hover,
.detail .put button:hover {
  border-color: var(--accent-dim);
}
.detail .lamp,
.yours .card .lamp {
  width: 9px;
  height: 9px;
  box-sizing: border-box;
  border: 1.5px solid var(--lamp);
  border-radius: 50%;
  background: var(--lamp);
}
.detail .lamp.off {
  background: none;
}
.detail .goto {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.detail .goto span {
  white-space: nowrap;
}
.detail .goto .at {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.detail .goto .face {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}
.tag {
  display: inline-block;
  color: var(--warn);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 16px;
}
.detail .tag {
  margin-left: auto;
}
.chip .tag {
  margin-left: 6px;
  vertical-align: 1px;
}

/* the panel's edit form: the block, the chosen face and its circuit */
.detail .form {
  margin: 0 0 10px;
}
.detail .form h4 {
  margin: 10px 0 4px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail .form .faces {
  display: flex;
  gap: 4px;
  margin: 2px 0 6px;
}
.detail .form .faces button {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 5px;
  padding: 3px 0;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.detail .form .faces button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.detail .form .faces button:disabled {
  opacity: 0.35;
  cursor: default;
}
.detail .form .faces .dot {
  position: absolute;
  top: 2px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.detail .form .field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px 0;
}
.detail .form .field > span:first-child {
  flex: 0 0 56px;
  color: var(--dim);
}
.detail .form .field .value {
  color: var(--ink);
}
.detail .form select,
.detail .form input[type="number"] {
  flex: 1;
  min-width: 0;
  background: #0e1320;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
  font: inherit;
  font-size: 12px;
}
.detail .form input[type="number"] {
  flex: 0 0 64px;
}
.detail .form select:focus-visible,
.detail .form input:focus-visible,
.detail .form button:focus-visible {
  outline: 2px solid var(--accent-dim);
  outline-offset: -1px;
}
.detail .form .swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.detail .form .swatches button {
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  background: var(--swatch, var(--panel-2));
  border: 2px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.detail .form .swatches button[aria-pressed="true"] {
  border-color: var(--ink);
}
.detail .form .facing button,
.detail .form .swatches button[style*="transparent"] {
  background: var(--panel-2);
}
.detail .form .facing button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.detail .form .row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.detail .form .row button,
.detail .form .circuit button {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 5px;
  padding: 2px 8px;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.detail .form .row button:hover,
.detail .form .circuit button:hover {
  border-color: var(--accent-dim);
}
.detail .form .row button[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
  border-color: var(--line);
}
.detail .form .circuit {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
.detail .form .circuit button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.detail .form .circuit .members {
  flex: 1;
  min-width: 0;
  color: var(--dim);
  font-size: 11px;
}
.detail .raw > summary {
  cursor: pointer;
  margin: 6px 0;
  color: var(--dim);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
