/* Shared comparison dock. Brand tokens come from style.css. */
.distro-compare-tray.lp-compare-dock {
  --dock-brand: var(--guide-accent, #ff5b00);
  --dock-pop: var(--kabocy-color-site-brand-pop, #f29a22);
  --dock-pink: var(--kabocy-color-km-brand, #ff7bac);
  --dock-cream: var(--guide-bg, #fff4e1);
  --dock-ink: #33291f;
  position: fixed;
  inset: auto 20px max(14px, env(safe-area-inset-bottom));
  width: min(940px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px 16px 8px;
  box-sizing: border-box;
  border: 1px solid #e8dcca;
  border-top: 3px solid var(--dock-brand);
  border-radius: var(--guide-radius-lg, 16px);
  background: #fffdf9;
  color: var(--dock-ink);
  box-shadow:
    0 8px 36px #48300e26,
    0 2px 8px #48300e0d;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  z-index: 8500;
}
.lp-compare-dock *,
.lp-compare-dock *::before,
.lp-compare-dock *::after {
  box-sizing: border-box;
}
.lp-compare-dock [hidden],
.lp-compare-dock[hidden] {
  display: none !important;
}
.lp-compare-dock button,
.lp-compare-dock a {
  font: inherit;
}
.lp-compare-dock button {
  cursor: pointer;
}
.lp-compare-dock :is(button, a):focus-visible {
  outline: 3px solid #8f3a00;
  outline-offset: 3px;
}
.lp-dock-header {
  display: flex;
  gap: 12px;
  align-items: center;
}
.lp-dock-toggle {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 0 6px 0 0;
  min-height: 46px;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  border-radius: 10px;
}
.lp-dock-icon {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 42px;
  height: 42px;
  padding: 11px;
  border-radius: 13px;
  background: var(--dock-cream);
  flex-shrink: 0;
}
.lp-dock-icon i {
  display: block;
  width: 5px;
  height: 14px;
  border-radius: 3px;
  background: var(--dock-brand);
}
.lp-dock-icon i:nth-child(2) {
  height: 21px;
  background: var(--dock-pop);
}
.lp-dock-icon i:nth-child(3) {
  height: 17px;
  background: var(--dock-pink);
}
.lp-dock-heading {
  display: block;
  font-size: 15px;
  font-weight: 800;
}
.lp-dock-caption {
  display: block;
  color: #74604c;
  font-size: 12px;
}
.lp-dock-count {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-shrink: 0;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--dock-cream);
}
.lp-dock-count b {
  font-size: 17px;
  margin-right: 3px;
}
.lp-dock-chevron {
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(225deg);
  margin: 0 4px;
  transition: transform 0.2s ease;
}
.lp-compare-dock.is-collapsed .lp-dock-chevron {
  transform: rotate(45deg);
}
.lp-dock-go {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 13px;
  text-decoration: none;
  font-weight: 800 !important;
  color: #301807 !important;
  background: var(--dock-brand);
  white-space: nowrap;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
.lp-dock-go[aria-disabled="true"] {
  background: #f3ede4;
  border-color: #e8dcca;
  color: #7b7062 !important;
  cursor: default;
}
.lp-dock-go:not([aria-disabled="true"]):hover {
  box-shadow: 0 3px 12px #ff5b0033;
  transform: translateY(-1px);
}
.lp-dock-go:not([aria-disabled="true"]):active,
.lp-dock-toggle:active {
  transform: scale(0.98);
}
.lp-dock-items {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
}
.lp-dock-item {
  --item-color: var(--dock-brand);
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  background: #fff7ef;
  border: 1px solid #eddccb;
  border-left: 3px solid var(--item-color);
  border-radius: 12px;
  padding: 6px 4px 6px 10px;
  min-height: 57px;
}
.lp-dock-item:nth-child(2) {
  --item-color: var(--dock-pop);
  background: #fff9e9;
}
.lp-dock-item:nth-child(3) {
  --item-color: var(--dock-pink);
  background: #fff4f8;
}
.lp-dock-number {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  color: #77604b;
}
.lp-dock-name {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lp-dock-remove {
  border: 0;
  background: transparent;
  color: #695442;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 9px;
  font-size: 22px !important;
  line-height: 1;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.lp-dock-remove:hover {
  background: #fff;
}
.lp-dock-remove:active {
  transform: scale(0.88);
}
.lp-dock-placeholder {
  background: transparent !important;
  border: 1px dashed #dfd4c4;
  color: #87715a;
  padding: 10px;
  font-size: 12px;
}
.lp-dock-footer {
  display: flex;
  gap: 6px 12px;
  align-items: center;
  min-height: 38px;
  margin-top: 5px;
}
.lp-dock-status {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  color: #74604c;
  overflow-wrap: anywhere;
}
.lp-dock-footer button {
  min-height: 38px;
  border: 0;
  background: none;
  padding: 4px 8px;
  color: #705139;
  border-radius: 7px;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
  white-space: nowrap;
}
.lp-dock-footer [data-tray-undo] {
  font-weight: 800;
  background: var(--dock-cream);
  text-decoration: none;
}
.lp-compare-dock.is-collapsed {
  padding-bottom: 12px;
}
.lp-compare-dock.is-collapsed .lp-dock-footer {
  display: none;
}
.lp-compare-dock.is-collapsed.has-undo .lp-dock-footer {
  display: flex;
}
/* A status remains available to assistive technology while the dock is compact. */
.lp-compare-dock.is-collapsed:not(.has-undo) .lp-dock-footer {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  min-height: 0;
  margin: 0;
}
.lp-compare-dock.is-collapsed:not(.has-undo) .lp-dock-footer button {
  display: none;
}
.lp-compare-dock-spacer {
  height: var(--lp-compare-dock-space, 0px);
  pointer-events: none;
}
html {
  scroll-padding-bottom: var(--lp-compare-dock-space, 0px);
}
body :focus {
  scroll-margin-bottom: var(--lp-compare-dock-space, 0px);
}
body .dr-toast {
  bottom: calc(var(--lp-compare-dock-space, 0px) + 18px);
}
@media (max-width: 600px) {
  .distro-compare-tray.lp-compare-dock {
    inset-inline: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    padding: 10px 10px 5px;
    border-radius: 18px;
  }
  .lp-dock-header {
    gap: 8px;
  }
  .lp-dock-icon {
    display: none;
  }
  .lp-dock-toggle {
    gap: 7px;
    min-height: 44px;
  }
  .lp-dock-heading {
    font-size: 14px;
  }
  .lp-dock-caption {
    font-size: 10px;
  }
  .lp-dock-count {
    min-width: 39px;
    padding: 3px 6px;
    font-size: 10px;
  }
  .lp-dock-count b {
    font-size: 15px;
  }
  .lp-dock-chevron {
    margin-inline: 1px;
  }
  .lp-dock-go {
    min-height: 44px;
    gap: 5px;
    padding: 9px 13px;
    font-size: 13px !important;
  }
  .lp-dock-items {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    margin-top: 8px;
    padding: 0 1px 5px;
  }
  .lp-dock-item {
    flex: 0 0 168px;
    scroll-snap-align: start;
    min-height: 58px;
  }
  .lp-dock-placeholder {
    flex-basis: 132px;
  }
  .lp-dock-footer {
    gap: 4px;
    margin-top: 0;
  }
  .lp-dock-status {
    font-size: 11px;
  }
  .lp-dock-footer button {
    font-size: 11px;
  }
  .lp-compare-dock.is-collapsed {
    padding-bottom: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lp-compare-dock *,
  .lp-compare-dock *::before,
  .lp-compare-dock *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .lp-dock-go,
  .lp-dock-item,
  .lp-dock-count,
  .lp-dock-toggle {
    border: 1px solid ButtonText;
  }
  .lp-dock-go[aria-disabled="true"] {
    color: GrayText !important;
  }
}
@media print {
  .lp-compare-dock,
  .lp-compare-dock-spacer {
    display: none !important;
  }
}

/* Compact Linux terminal, with the site's warm brand accents. */
.distro-compare-tray.lp-compare-dock {
  --dock-ink: #f0f5ec;
  background: #20332d;
  border-color: #354c40;
  border-top-color: var(--dock-brand);
  box-shadow:
    0 12px 38px #15271a38,
    0 0 0 1px #ffffff18 inset;
}
.lp-dock-icon {
  display: grid;
  place-items: center;
  padding: 0;
  background: #334a3d;
  border: 1px solid #55725c;
  color: #ffb376;
  font:
    800 21px ui-monospace,
    monospace;
  letter-spacing: -3px;
}
.lp-dock-prompt {
  color: #ffb376;
  font:
    700 13px ui-monospace,
    monospace;
  letter-spacing: -1px;
}
.lp-dock-caption,
.lp-dock-status {
  color: #c0d3c4;
}
.lp-dock-count {
  color: #fff0d9;
  background: #3a4c3c;
  border: 1px solid #566b51;
  font-family: ui-monospace, monospace;
}
.lp-dock-go {
  box-shadow: 0 3px 0 #0a160f4d;
}
.lp-dock-go[aria-disabled="true"] {
  color: #c0c8be !important;
  background: #35473c;
  border-color: #4b6050;
  box-shadow: none;
}
.lp-dock-item {
  background: #2d4136;
  border-color: #52604b;
  border-left-color: var(--item-color);
}
.lp-dock-item:nth-child(2) {
  background: #374332;
}
.lp-dock-item:nth-child(3) {
  background: #3e3d3c;
}
.lp-dock-number {
  color: #ffcca1;
  font-family: ui-monospace, monospace;
}
.lp-dock-remove {
  color: #d1ddd0;
}
.lp-dock-remove:hover {
  color: #fff;
  background: #ffffff14;
}
.lp-dock-placeholder {
  color: #b2c5b6;
  border-color: #63806a;
}
.lp-dock-footer button {
  color: #d9e5d9;
}
.lp-dock-footer [data-tray-undo] {
  color: #301807;
  background: var(--guide-accent-soft, #ffedca);
}
.lp-compare-dock :is(button, a):focus-visible {
  outline-color: #ffcca1;
}
.lp-dock-go,
.lp-dock-remove,
.lp-dock-footer button,
.cw-button,
.cw-filters button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.lp-tap-wave {
  position: absolute;
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  background: currentColor;
  opacity: 0;
  z-index: -1;
}
.lp-compare-dock :focus {
  scroll-margin-bottom: 0;
}
@media (max-width: 600px) {
  .lp-dock-icon {
    display: none;
  }
  .lp-dock-prompt {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lp-tap-wave {
    display: none;
  }
}
@media (forced-colors: active) {
  .lp-compare-dock .lp-dock-go,
  .lp-compare-dock .lp-dock-count,
  .lp-compare-dock .lp-dock-item {
    color: ButtonText !important;
  }
  .lp-compare-dock .lp-dock-go[aria-disabled="true"] {
    color: GrayText !important;
  }
}

/* フッターがドックの分だけ伸びるテーマでは、フッターの下の空白を足さない（style.css の末尾）。 */
.goodly-footer-inset .lp-compare-dock-spacer {
  display: none;
}
