/* Porsche configurator — 2-column frame (visual left, config right) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

/* Page scroll — hide track while keeping scroll (Porsche-style) */
html,
body,
.pc-scroll,
.pc-frame {
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-color: transparent transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.pc-scroll::-webkit-scrollbar,
.pc-frame::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
  background: transparent;
}

.pc-frame {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* ── Centered shell — config + summary share one max width ── */
.pc-shell {
  width: 100%;
  max-width: calc(var(--pc-col-left-max) + var(--pc-layout-gap) + var(--pc-col-right-fixed));
  margin-left: auto;
  margin-right: auto;
  --pc-col-left-max: 780px;
  --pc-col-right-fixed: 720px;
  --pc-layout-gap: 28px;
  --pc-layout-padding-x: 32px;
}

/* WordPress iframe embed — same centered width as summary block */
.pc-frame--embed .pc-shell,
.pc-shell--embed {
  width: 100%;
  max-width: calc(var(--pc-col-left-max) + var(--pc-layout-gap) + var(--pc-col-right-fixed));
}

.pc-frame--embed .pc-page {
  justify-content: center;
  min-width: 0;
  box-sizing: border-box;
}

html.pc-frame--embed .pc-visual,
.pc-frame--embed .pc-visual {
  flex: 0 1 var(--pc-col-left-max);
  width: auto;
  max-width: var(--pc-col-left-max);
  min-width: 0;
}

.pc-frame--embed .pc-config {
  flex: 0 0 var(--pc-col-right-fixed);
  width: var(--pc-col-right-fixed);
  max-width: var(--pc-col-right-fixed);
  min-width: 0;
}

.pc-frame--embed .pc-page {
  min-height: auto;
}

.pc-frame--embed .pc-summary {
  min-height: auto;
  margin-top: 40px;
  padding-top: 24px;
  padding-bottom: 40px;
  box-sizing: border-box;
}

html.pc-frame--embed .pc-visual__frame,
.pc-frame--embed .pc-visual__frame {
  max-height: 480px;
  width: min(100%, 720px);
  min-height: 0;
}

@supports (aspect-ratio: 3 / 2) {
  html.pc-frame--embed .pc-visual__frame,
  .pc-frame--embed .pc-visual__frame {
    width: min(100%, calc(480px * 1.5));
  }
}

.pc-frame--embed,
.pc-frame--embed .pc-scroll {
  height: auto;
  min-height: 0;
  background: #fff;
}

.pc-frame--embed .pc-shell,
.pc-frame--embed .pc-page {
  background: #fff;
}

html:has(.pc-frame--embed) {
  background: #fff;
}

/* Keep two-column layout inside WordPress iframe on narrow viewports */
@media (max-width: 960px) {
  .pc-frame--embed .pc-page {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    min-height: auto;
    height: auto;
    padding: 16px 20px;
    gap: 16px;
  }

  .pc-frame--embed .pc-visual {
    flex: 1 1 42%;
    max-width: 48%;
    width: auto;
    min-width: 0;
  }

  .pc-frame--embed .pc-visual__frame {
    max-height: min(36vh, 360px);
    width: 100%;
  }

  .pc-frame--embed .pc-config {
    flex: 1 1 52%;
    width: auto;
    max-width: 52%;
    min-width: 0;
    min-height: 360px;
  }
}

/* ── Slim top links (Change model / Summary) ── */
.pc-toplinks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  height: 44px;
  padding: 0 24px;
  border-bottom: 1px solid #ececec;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
}

.pc-toplinks a {
  font: inherit;
  font-size: inherit;
  font-weight: 400;
  color: #111;
  text-decoration: underline;
}

.pc-toplinks__end {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pc-toplinks .pc-config__spec-link {
  margin-top: 0;
}

/* ── Scrollable page (configurator + summary on one page) ── */
.pc-scroll {
  width: 100%;
}

/* ── Main 2-column shell (780px visual + 720px config, centered) ── */
.pc-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--pc-layout-gap);
  width: 100%;
  margin: 0;
  min-height: calc(100vh - 44px);
  padding: 20px var(--pc-layout-padding-x) 32px;
}

/* ══════════════════════════════════════
   LEFT — visual / hero (1200×800 = 3:2)
   ══════════════════════════════════════ */
.pc-visual {
  display: flex;
  flex: 1 1 var(--pc-col-left-max);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 0;
  min-width: 0;
  max-width: var(--pc-col-left-max);
  position: sticky;
  top: var(--pc-sticky-top, 44px);
  align-self: flex-start;
  z-index: 5;
}

.pc-visual--released {
  position: relative;
  top: auto;
}

.pc-visual__frame {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  max-width: var(--pc-col-left-max);
  aspect-ratio: 3 / 2;
  max-height: min(52vh, 520px);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

/* When height is the limiting axis, shrink width to keep 3:2 */
@supports (aspect-ratio: 3 / 2) {
  .pc-visual__frame {
    width: min(100%, calc(min(52vh, 520px) * 1.5));
  }
}

.pc-visual__media {
  position: relative;
  width: 100%;
  height: 100%;
}

.pc-visual__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 48px 16px rgba(0, 0, 0, 0.1),
    inset 0 0 12px 4px rgba(0, 0, 0, 0.04);
}

.pc-visual__hero {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pc-visual__hero.is-ready {
  opacity: 1;
}

.pc-visual__hero[hidden] {
  display: none;
}

.pc-visual__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16px;
  color: #999;
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}

.pc-visual__empty[hidden] {
  display: none;
}

.pc-visual__expand {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: #333;
}

.pc-visual__controls {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
}

.pc-visual__control {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 13px;
  color: #333;
}

.pc-visual__thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pc-visual__thumbs::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
}

.pc-visual__thumb {
  flex: 0 0 auto;
  width: 84px;
  aspect-ratio: 3 / 2;
  height: auto;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #e0e0e0 center / cover no-repeat;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.pc-visual__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-visual__thumb.is-active {
  border-color: #111;
}

/* ══════════════════════════════════════
   RIGHT — config panel
   ══════════════════════════════════════ */
.pc-config {
  display: flex;
  flex: 0 0 var(--pc-col-right-fixed);
  flex-direction: column;
  width: var(--pc-col-right-fixed);
  max-width: var(--pc-col-right-fixed);
  min-width: 0;
  min-height: 0;
}

.pc-config__head {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.pc-config__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.pc-config__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.pc-config__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0f0f0;
  font-size: 12px;
  font-weight: 500;
  color: #555;
}

.pc-config__spec-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: #111;
  text-decoration: underline;
}

/* Search */
.pc-config__search {
  flex: 0 0 auto;
  position: relative;
  margin-bottom: 12px;
}

.pc-config__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #888;
  pointer-events: none;
}

.pc-config__search input {
  width: 100%;
  padding: 11px 12px 11px 38px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: #111;
}

.pc-config__search input::placeholder {
  color: #999;
}

/* Nested scroll regions — hide track (modals, legacy hooks) */
.pc-scroll-hidden,
.pc-config__scroll,
.pc-arr-modal__body {
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-color: transparent transparent;
}

.pc-scroll-hidden::-webkit-scrollbar,
.pc-config__scroll::-webkit-scrollbar,
.pc-arr-modal__body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
  background: transparent;
}

/* Accordion list — grows with page scroll (no inner scroll pane) */
.pc-config__scroll {
  flex: 0 0 auto;
  overflow: visible;
  min-height: 0;
  padding-right: 0;
  padding-bottom: 8px;
}

/* Each category = rounded card */
.pc-acc {
  margin-bottom: 8px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.pc-acc.is-open {
  border-color: #e0e0e0;
}

.pc-acc__head {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  color: #111;
  cursor: pointer;
}

.pc-acc__head:hover {
  background: transparent;
}

.pc-acc__chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #666;
  border-bottom: 1.5px solid #666;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -2px;
}

.pc-acc.is-open > .pc-acc__head .pc-acc__chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.pc-acc__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f0f0f0;
  font-size: 12px;
  font-weight: 500;
  color: #555;
}

.pc-acc__body {
  display: none;
  padding: 0 14px 12px;
  border-top: 1px solid #f0f0f0;
}

.pc-acc.is-open > .pc-acc__body {
  display: block;
}

/* Nested sub-accordions inside expanded section */
.pc-subacc {
  margin-top: 0;
  border-top: 1px solid #f0f0f0;
}

.pc-subacc:first-child {
  border-top: 0;
}

.pc-subacc__head {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: #111;
  cursor: pointer;
}

.pc-subacc__head:hover {
  color: #111;
}

.pc-subacc__chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #888;
  border-bottom: 1.5px solid #888;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -2px;
}

.pc-subacc.is-open > .pc-subacc__head .pc-subacc__chevron {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.pc-subacc__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f0f0f0;
  font-size: 11px;
  font-weight: 500;
  color: #555;
}

.pc-subacc.is-open > .pc-subacc__head {
  color: #111;
}

.pc-subacc__body {
  display: none;
  padding: 0 0 12px 24px;
}

.pc-subacc.is-open > .pc-subacc__body {
  display: block;
}

/* Placeholder content inside accordion */
.pc-placeholder {
  min-height: 64px;
  padding: 14px;
  border: 1px dashed #ccc;
  border-radius: 6px;
  background: #fafafa;
  color: #999;
  font-size: 12px;
  line-height: 1.5;
}

.pc-acc[data-section="grip"] .pc-placeholder {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.pc-grip-group {
  margin-bottom: 14px;
}

.pc-grip-group:last-child {
  margin-bottom: 0;
}

.pc-grip-group__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

.pc-grip-group__zh {
  font-weight: 500;
  color: #666;
}

.pc-grip-group__selection {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: #111;
}

.pc-grip-group__selection[hidden] {
  display: none;
}

.pc-grip-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
}

.pc-grip-swatch {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: visible;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.pc-grip-swatch:hover {
  border-color: #bbb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.pc-grip-swatch.is-selected {
  border-color: #111;
  box-shadow: 0 0 0 1px #111;
}

.pc-grip-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pc-grip-swatch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.14)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.08));
}

.pc-grip-hover-preview {
  position: fixed;
  z-index: 200;
  width: 220px;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.pc-grip-hover-preview[hidden] {
  display: none;
}

.pc-grip-hover-preview img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.16)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

.pc-grip-hover-preview__code {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: #111;
}

.pc-grip-swatch__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 9px;
  font-weight: 600;
  color: #888;
  text-align: center;
  line-height: 1.1;
  padding: 2px;
}

.pc-grip-empty {
  margin: 0;
  padding: 12px 0;
  font-size: 13px;
  color: #888;
}

/* Config subsections inside Axis 1 */
.pc-config-subsection {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.pc-config-subsection:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.pc-config-subsection__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
}

.pc-config-subsection__selection {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: #111;
}

.pc-config-subsection__selection[hidden] {
  display: none;
}

.pc-gate-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.pc-gate-tile {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  padding: 4px 4px 6px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.pc-gate-tile:hover {
  border-color: #bbb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pc-gate-tile.is-selected {
  border-color: #111;
  box-shadow: 0 0 0 1px #111;
}

.pc-gate-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pc-gate-tile__diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 4px;
  overflow: hidden;
}

.pc-gate-tile__diagram img {
  display: block;
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.pc-gate-tile__code {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  color: #111;
}

.pc-gate-tile__label {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.3;
  color: #444;
  white-space: nowrap;
}

/* Switch close position — wider tiles, clearer hierarchy */
.pc-switch-close__intro {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: #555;
}

.pc-switch-close__legend {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #666;
}

.pc-switch-close__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 3px;
  margin-left: 8px;
  border-radius: 1px;
  vertical-align: -1px;
}

.pc-switch-close__swatch:first-child {
  margin-left: 0;
}

.pc-switch-close__swatch--closed {
  background: #111;
  border: 1px solid #111;
}

.pc-switch-close__swatch--open {
  background: #fff;
  border: 1px solid #bbb;
}

.pc-gate-tile-grid--switch-close {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pc-gate-tile--switch-close {
  padding: 8px 6px 10px;
  border-width: 2px;
}

.pc-gate-tile--switch-close::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 6px 6px 0 0;
  background: #d8d8d8;
}

.pc-gate-tile--switch-close.pc-gate-tile--k1::before {
  background: #4a6fa5;
}

.pc-gate-tile--switch-close.pc-gate-tile--k2::before {
  background: #3d8b6e;
}

.pc-gate-tile--switch-close.pc-gate-tile--k3::before {
  background: linear-gradient(90deg, #4a6fa5 0 50%, #3d8b6e 50% 100%);
}

.pc-gate-tile--switch-close.is-selected {
  border-color: #111;
  box-shadow: 0 0 0 1px #111;
}

.pc-gate-tile--switch-close .pc-gate-tile__code {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.pc-gate-tile__title {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #111;
}

.pc-gate-tile__hint {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: #555;
}

.pc-gate-tile--switch-close .pc-gate-tile__diagram {
  margin-bottom: 6px;
  min-height: 34px;
}

.pc-gate-tile--switch-close.pc-gate-tile--k2 .pc-gate-tile__diagram,
.pc-gate-tile--switch-close.pc-gate-tile--k3 .pc-gate-tile__diagram {
  min-height: 58px;
}

.pc-option-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}

.pc-option-tile {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  padding: 10px 6px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.pc-option-tile:hover {
  border-color: #bbb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pc-option-tile.is-selected {
  border-color: #111;
  box-shadow: 0 0 0 1px #111;
}

.pc-option-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pc-option-tile__code {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  color: #111;
}

.pc-option-tile--compact .pc-option-tile__code {
  font-size: 12px;
}

.pc-option-tile__label {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.3;
  color: #666;
  white-space: nowrap;
}

.pc-grip-group--compact {
  margin-bottom: 16px;
}

.pc-grip-group--compact .pc-grip-group__title {
  font-size: 12px;
  margin-bottom: 10px;
}

.pc-region-tag {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #bbb;
}

/* Arrangement — paper-form cross + drum contact grids */
.pc-arrangement {
  --arr-closed-bg: #fde8ec;
  --arr-closed-bg-hover: #f9d4dc;
  --arr-closed-mark: #c41e3a;
  --arr-open-hover: #fdf0f2;
  --arr-cell-size: 20px;
  --arr-row-label-w: 34px;
  --arr-cross-cols: 13;
  --arr-band-cols: 13;
  --arr-cross-align-start: 0;
}

.pc-arrangement__intro {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: #555;
}

.pc-arrangement__intro strong {
  font-weight: 700;
  color: #c41e3a;
}

.pc-arrangement__layout-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Unified paper sheet — 5×5 grid: drums on odd tracks, direction labels in gap bands */
.pc-arrangement--blank-drums {
  --arr-grid-outer-size: calc(var(--arr-band-cols) * var(--arr-cell-size) + 2px);
  --arr-grid-gap: 16px;
}

.pc-arr-sheet {
  display: grid;
  grid-template-columns:
    var(--arr-grid-outer-size)
    var(--arr-grid-gap)
    var(--arr-grid-outer-size)
    var(--arr-grid-gap)
    var(--arr-grid-outer-size);
  grid-template-rows:
    var(--arr-grid-outer-size)
    var(--arr-grid-gap)
    var(--arr-grid-outer-size)
    var(--arr-grid-gap)
    var(--arr-grid-outer-size);
  gap: 0;
  width: fit-content;
  margin: 0 auto;
  padding: 0;
}

.pc-arr-sheet__band,
.pc-arr-sheet__middle,
.pc-arr-sheet__side {
  display: contents;
}

.pc-arr-sheet__band-title {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  text-align: center;
}

.pc-arr-sheet__drum-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.pc-arr-sheet__drum-head--left,
.pc-arr-sheet__drum-head--right {
  flex-direction: column;
  align-items: center;
  margin-bottom: 4px;
}

.pc-arr-sheet__band--top .pc-arr-sheet__band-table {
  grid-column: 3;
  grid-row: 1;
}

.pc-arr-sheet__band--bottom .pc-arr-sheet__band-table {
  grid-column: 3;
  grid-row: 5;
}

.pc-arr-sheet__side--left .pc-arr-sheet__side-table {
  grid-column: 1;
  grid-row: 3;
}

.pc-arr-sheet__side--right .pc-arr-sheet__side-table {
  grid-column: 5;
  grid-row: 3;
}

.pc-arr-sheet__side--right .pc-arr-grid__col-data {
  width: var(--arr-cell-size);
}

.pc-arr-sheet__side-title {
  margin-bottom: 4px;
  text-align: center;
}

.pc-arr-sheet__cross {
  grid-column: 3;
  grid-row: 3;
}

.pc-arr-sheet__dir {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111;
  white-space: nowrap;
}

.pc-arr-sheet__dir--lower {
  grid-column: 3;
  grid-row: 2;
}

.pc-arr-sheet__dir--raise {
  grid-column: 3;
  grid-row: 4;
}

.pc-arr-sheet__dir--left {
  grid-column: 2;
  grid-row: 3;
}

.pc-arr-sheet__dir--right {
  grid-column: 4;
  grid-row: 3;
}

.pc-arrangement--blank-drums .pc-arr-sheet__band-table,
.pc-arrangement--blank-drums .pc-arr-sheet__side-table,
.pc-arrangement--blank-drums .pc-arr-sheet__cross {
  width: var(--arr-grid-outer-size);
  height: var(--arr-grid-outer-size);
}

.pc-arrangement--blank-drums .pc-arr-drum,
.pc-arrangement--blank-drums .pc-arr-drum__scroll {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pc-arrangement--blank-drums .pc-arr-cross {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}

.pc-arr-sheet .pc-arr-drum {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pc-arr-sheet .pc-arr-drum__head {
  display: none;
}

.pc-arr-sheet .pc-arr-section-title {
  font-size: 11px;
}

.pc-arr-sheet .pc-arr-drum__direction {
  font-size: 10px;
}

.pc-arr-sheet .pc-arr-grid {
  font-size: 8px;
}

.pc-arr-sheet .pc-arr-grid th {
  padding: 2px 0;
  font-size: 7px;
  height: var(--arr-cell-size);
  line-height: var(--arr-cell-size);
}

.pc-arr-sheet .pc-arr-grid tbody th {
  font-size: 7px;
  width: var(--arr-row-label-w);
  max-width: var(--arr-row-label-w);
}

.pc-arr-sheet .pc-arr-grid__col-label {
  width: var(--arr-row-label-w);
}

.pc-arr-sheet .pc-arr-grid__col-data {
  width: var(--arr-cell-size);
}

.pc-arr-sheet .pc-arr-grid__corner {
  width: var(--arr-row-label-w);
}

.pc-arr-sheet .pc-arr-cell {
  width: var(--arr-cell-size);
  min-width: var(--arr-cell-size);
  max-width: var(--arr-cell-size);
  height: var(--arr-cell-size);
  min-height: var(--arr-cell-size);
}

.pc-arr-sheet .pc-arr-cell__mark {
  font-size: 11px;
}

/* Central cross — 13×13 cells aligned with drum data columns */
.pc-arr-cross-wrap {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0;
}

.pc-arr-cross {
  display: grid;
  grid-template-columns: repeat(var(--arr-cross-size, 13), var(--arr-cell-size));
  grid-template-rows: repeat(var(--arr-cross-size, 13), var(--arr-cell-size));
  gap: 0;
  box-sizing: border-box;
  border: 1px solid #333;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.pc-gate-tile__diagram .step-illus-svg {
  width: 100%;
  height: auto;
  display: block;
  color: #333;
}

.pc-gate-tile__diagram .step-illus-hint {
  fill: #666;
  font-family: system-ui, sans-serif;
  font-size: 9px;
}

.pc-gate-tile-grid--contact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

/* Contact arrangement — same tile hierarchy as switch close */
.pc-contact-group__intro {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: #555;
}

.pc-contact-group__legend {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #666;
}

.pc-contact-group__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 3px;
  margin-left: 8px;
  border-radius: 1px;
  vertical-align: -1px;
}

.pc-contact-group__swatch:first-child {
  margin-left: 0;
}

.pc-contact-group__swatch--closed {
  background: #111;
  border: 1px solid #111;
}

.pc-contact-group__swatch--open {
  background: #fff;
  border: 1px solid #bbb;
}

.pc-gate-tile--contact {
  padding: 8px 6px 10px;
  border-width: 2px;
}

.pc-gate-tile--contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 6px 6px 0 0;
  background: #d8d8d8;
}

.pc-gate-tile--contact.pc-gate-tile--cg-03::before {
  background: #4a6fa5;
}

.pc-gate-tile--contact.pc-gate-tile--cg-02::before {
  background: #3d8b6e;
}

.pc-gate-tile--contact.pc-gate-tile--cg-01::before {
  background: #8b6e3d;
}

.pc-gate-tile--contact.pc-gate-tile--cg-x::before {
  background: #7a5c8b;
}

.pc-gate-tile--contact.is-selected {
  border-color: #111;
  box-shadow: 0 0 0 1px #111;
}

.pc-gate-tile--contact .pc-gate-tile__code {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.pc-gate-tile--contact .pc-gate-tile__diagram {
  margin-bottom: 6px;
  min-height: 40px;
}

.pc-gate-tile--contact.pc-gate-tile--cg-02 .pc-gate-tile__diagram {
  min-height: 52px;
}

.pc-gate-tile--contact.pc-gate-tile--cg-03 .pc-gate-tile__diagram {
  min-height: 64px;
}

.pc-gate-tile--contact.pc-gate-tile--cg-x .pc-gate-tile__diagram {
  min-height: 34px;
}

.pc-gate-tile--contact .pc-gate-tile__diagram img {
  width: 100%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
}

.pc-gate-tile__diagram .step-illus-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.pc-arr-cross__cell {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--arr-cell-size);
  height: var(--arr-cell-size);
  margin: 0;
  font-size: 7px;
  font-weight: 600;
  color: #333;
  border: 1px solid #bbb;
  background: #fff;
}

.pc-arr-cross__cell.is-blank {
  background: #fff;
}

.pc-arr-cross__cell:not(.is-blank):not(.is-hub) {
  background: #f5f5f5;
}

.pc-arr-cross__cell.is-hub {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 9px;
  color: #111;
  border-width: 2px;
  border-color: #333;
  background: #fff;
}

/* Interactive blank drum cells — same grid cell box as central cross */
.pc-arr-cross__cell.pc-arr-cell {
  padding: 0;
  margin: 0;
  border: 1px solid #bbb;
  font-family: inherit;
  cursor: pointer;
  touch-action: none;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.1s ease;
}

.pc-arr-cross__cell.pc-arr-cell:hover {
  background: var(--arr-open-hover);
}

.pc-arr-cross__cell.pc-arr-cell.is-closed {
  background: var(--arr-closed-bg);
}

.pc-arr-cross__cell.pc-arr-cell.is-closed:hover {
  background: var(--arr-closed-bg-hover);
}

.pc-arr-cross__cell .pc-arr-cell__mark {
  font-size: 11px;
}

.pc-arrangement__layout {
  display: none;
}

.pc-arrangement__drums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pc-arr-drum {
  min-width: 0;
  padding: 12px;
  border: 1px solid #ececec;
  border-radius: 8px;
  background: #fafafa;
}

.pc-arr-drum__head {
  margin-bottom: 10px;
}

.pc-arr-section-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

.pc-arr-drum__direction {
  margin-left: 6px;
  font-weight: 500;
  color: #666;
}

.pc-arr-drum__hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: #888;
}

.pc-arr-drum__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pc-arrangement.is-painting,
.pc-arrangement.is-painting .pc-arr-cell {
  user-select: none;
}

.pc-arr-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
}

.pc-arr-grid th,
.pc-arr-grid td {
  border: 1px solid #bbb;
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

.pc-arr-grid__corner {
  width: 36px;
  background: #f0f0f0;
}

.pc-arr-grid th {
  padding: 4px 2px;
  font-size: 9px;
  font-weight: 600;
  color: #555;
  background: #f0f0f0;
}

.pc-arr-grid tbody th {
  font-size: 9px;
  font-weight: 600;
  color: #333;
  background: #f5f5f5;
}

.pc-arr-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 26px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: pointer;
  touch-action: none;
  transition: background 0.1s ease;
}

.pc-arr-cell:hover {
  background: var(--arr-open-hover);
}

.pc-arr-cell.is-closed {
  background: var(--arr-closed-bg);
}

.pc-arr-cell.is-closed:hover {
  background: var(--arr-closed-bg-hover);
}

.pc-arr-cell__mark {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--arr-closed-mark);
}

/* Arrangement modal — paper form in dialog */
.pc-arr-modal {
  padding: 0;
  border: none;
  background: transparent;
  margin: 0;
}

.pc-arr-modal:not([open]) {
  display: none;
}

.pc-arr-modal[open] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  border: none;
}

.pc-arr-modal::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

html.pc-arr-modal-open,
body.pc-arr-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.pc-arr-modal-open {
  touch-action: none;
}

body.pc-arr-modal-open .pc-scroll,
body.pc-arr-modal-open .pc-shell {
  overflow: hidden;
}

/* WordPress iframe embed — native dialog top layer + 100vh break inside iframe */
.pc-arr-modal.pc-arr-modal--embed[open] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  border: none;
  z-index: 2147483646;
  box-sizing: border-box;
}

.pc-arr-modal.pc-arr-modal--embed[open]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.pc-arr-modal.pc-arr-modal--embed::backdrop {
  display: none;
  background: transparent;
}

.pc-arr-modal.pc-arr-modal--embed .pc-arr-modal__panel {
  position: relative;
  z-index: 1;
  flex-shrink: 1;
  align-self: center;
  width: min(900px, calc(100% - 32px));
  max-width: 900px;
  max-height: min(85vh, calc(100% - 32px));
}

.pc-arr-modal__panel {
  display: flex;
  flex-direction: column;
  align-self: center;
  width: fit-content;
  max-width: min(900px, calc(100% - 32px));
  max-height: min(85vh, calc(100% - 32px));
  height: auto;
  min-height: 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.pc-arr-modal__header {
  flex-shrink: 0;
  padding: 18px 22px 12px;
  border-bottom: 1px solid #ececec;
}

.pc-arr-modal__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #111;
}

.pc-arr-modal__optional {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.pc-arr-modal__body {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(85vh - 110px);
  overflow: auto;
  padding: 12px 18px 16px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.pc-arr-modal__body .pc-arrangement__intro {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 11px;
  color: #555;
}

.pc-arr-modal__body .pc-arrangement__intro strong {
  color: #c41e3a;
}

.pc-arr-modal__body .pc-arrangement__optional {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
  background: #f0f0f0;
  border-radius: 4px;
}

.pc-arr-modal__footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 22px 18px;
  border-top: 1px solid #ececec;
}

.pc-arr-modal__btn {
  min-width: 92px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #111;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.pc-arr-modal__btn:hover {
  background: #f5f5f5;
}

.pc-arr-modal__btn--confirm {
  color: #fff;
  background: #111;
  border-color: #111;
}

.pc-arr-modal__btn--confirm:hover {
  background: #333;
  border-color: #333;
}

.pc-acc--modal-trigger > .pc-acc__head .pc-acc__chevron {
  transform: rotate(-90deg);
}

/* Arrangement accordion bar — dark trigger, light modal */
.pc-acc.pc-acc--modal-trigger {
  border-color: #111;
  background: #111;
}

.pc-acc.pc-acc--modal-trigger > .pc-acc__head {
  grid-template-columns: 18px 1fr auto auto;
  color: #fff;
}

.pc-acc.pc-acc--modal-trigger > .pc-acc__head:hover {
  background: #1a1a1a;
}

.pc-acc.pc-acc--modal-trigger > .pc-acc__head .pc-acc__chevron {
  border-color: #ccc;
}

.pc-acc.pc-acc--modal-trigger > .pc-acc__head .pc-acc__badge {
  background: #333;
  color: #f0f0f0;
}

.pc-acc__optional {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.pc-acc.pc-acc--modal-trigger > .pc-acc__head .pc-acc__optional {
  color: #aaa;
}

@media (max-width: 720px) {
  .pc-arrangement--blank-drums {
    --arr-grid-gap: 12px;
  }
}

/* ══════════════════════════════════════
   Summary view (Porsche-style)
   ══════════════════════════════════════ */
.pc-config__summary-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 48px 16px 12px;
  background: transparent;
}

.pc-summary-scroll-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 180px;
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  background: #e8e8e8;
  color: #111;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
}

.pc-summary-scroll-btn:hover {
  background: #dcdcdc;
}

.pc-summary-scroll-btn:focus-visible {
  outline: 2px solid #888;
  outline-offset: 2px;
}

.pc-summary-scroll-btn__chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex-shrink: 0;
}

.pc-summary-scroll-btn__chevron {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #111;
  border-bottom: 1.5px solid #111;
  transform: rotate(45deg);
  margin: 0;
}

.pc-summary {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--pc-layout-gap);
  width: 100%;
  min-height: calc(100vh - 44px);
  margin-top: 120px;
  padding: 28px var(--pc-layout-padding-x) 64px;
  border-top: 1px solid #ececec;
  scroll-margin-top: 12px;
}

.pc-summary__heading {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pc-summary__equipment {
  flex: 0 1 var(--pc-col-left-max);
  width: 100%;
  max-width: var(--pc-col-left-max);
  min-width: 0;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04);
}

.pc-summary__empty {
  margin: 0;
  color: #888;
  font-size: 14px;
}

.pc-summary__aside {
  flex: 0 0 var(--pc-col-right-fixed);
  width: var(--pc-col-right-fixed);
  max-width: var(--pc-col-right-fixed);
  min-width: 0;
  padding-left: 0;
}

.pc-summary-group + .pc-summary-group {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #ececec;
}

.pc-summary-group__title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

.pc-summary-group__count {
  font-weight: 400;
  color: #888;
}

.pc-summary-group__rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pc-summary-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.pc-summary-row__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #f5f5f5;
  overflow: hidden;
}

.pc-summary-row__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pc-summary-row__thumb--code {
  font-size: 11px;
  font-weight: 600;
  color: #666;
}

.pc-summary-row__body {
  min-width: 0;
}

.pc-summary-row__label {
  display: block;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pc-summary-row__desc {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: #111;
}

.pc-summary-row__code {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  font-variant-numeric: tabular-nums;
}

.pc-summary-row__change {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: #111;
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

.pc-summary-aside__head {
  margin-bottom: 28px;
}

.pc-summary-aside__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pc-summary-aside__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pc-summary-aside__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f0f0f0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pc-summary-aside__spec {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: #111;
  text-decoration: underline;
}

.pc-summary-aside__code-block {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #ececec;
}

.pc-summary-aside__code-label {
  margin: 0 0 6px;
  font-size: 12px;
  color: #888;
}

.pc-summary-aside__code {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-all;
  color: #111;
}

.pc-summary-aside__copy {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: #111;
  text-decoration: underline;
  cursor: pointer;
}

.pc-summary-aside__copy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pc-summary-aside__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pc-summary-btn {
  display: block;
  width: 100%;
  padding: 16px 18px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pc-summary-btn--primary {
  border: 0;
  background: #111;
  color: #fff;
}

.pc-summary-btn--primary:hover {
  background: #333;
}

.pc-summary-btn--primary[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.pc-summary-btn--secondary {
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #111;
}

.pc-summary-btn--secondary:hover:not(:disabled) {
  background: #ececec;
}

.pc-summary-btn--secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pc-summary-aside__status {
  margin: 14px 0 0;
  font-size: 13px;
  color: #444;
}

.pc-summary-aside__status[hidden] {
  display: none;
}

.pc-summary-aside__status.is-success {
  color: #0a7a3f;
}

.pc-summary-aside__status.is-error {
  color: #b42318;
}

.pc-summary-aside__note {
  margin: 20px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #999;
}

.pc-toplinks a[aria-current="page"] {
  font-weight: 600;
}

@media (max-width: 960px) {
  .pc-summary {
    flex-direction: column;
    padding: 20px;
  }

  .pc-summary__equipment {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    padding: 20px;
    margin-bottom: 28px;
  }

  .pc-summary__aside {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: 0;
  }

  .pc-summary-row {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
      "thumb body"
      "thumb meta";
    gap: 8px 12px;
  }

  .pc-summary-row__code,
  .pc-summary-row__change {
    grid-column: 2;
  }

  .pc-summary-row__code {
    justify-self: start;
  }

  .pc-summary-row__change {
    justify-self: end;
    grid-row: 2;
  }
}

@media (max-width: 960px) {
  .pc-shell {
    width: 100%;
  }

  .pc-page {
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: calc(100vh - 44px);
    padding: 16px 20px;
    gap: 20px;
  }

  .pc-visual {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    margin-right: 0;
    align-items: center;
    position: static;
    top: auto;
  }

  .pc-visual__frame {
    max-width: 100%;
    max-height: min(38vh, 400px);
    width: min(100%, calc(min(38vh, 400px) * 1.5));
  }

  .pc-config {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-height: 0;
  }

  .pc-frame--embed .pc-visual,
  .pc-frame--embed .pc-config {
    max-width: 100%;
    width: 100%;
    min-width: 0;
  }

  .pc-gate-tile-grid--switch-close {
    grid-template-columns: 1fr;
  }

  .pc-gate-tile-grid--contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
