#start-inventory { --inventory-control-angle: 0deg; }

@property --inventory-control-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: true;
}

#start-inventory .inventory-introduction {
  padding: clamp(22px, 2.7vw, 34px) clamp(18px, 3vw, 38px) 20px;
  border-bottom: 1px solid rgba(236, 193, 101, 0.18);
  color: #d7d2c8;
}

#start-inventory .inventory-introduction > p:first-child {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.7;
}

#start-inventory .inventory-interaction-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: #bdb7ac;
  line-height: 1.55;
}

#start-inventory .inventory-hint-example {
  position: relative;
  flex: 0 0 62px;
  height: 34px;
  border: 1px solid rgba(236, 193, 101, 0.25);
  border-radius: 999px;
  background: rgba(7, 8, 12, 0.78);
}

#start-inventory .inventory-hint-example::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 2px solid transparent;
  border-top-color: #7be3ff;
  border-right-color: #ff9ecb;
  border-radius: inherit;
  filter: drop-shadow(0 0 5px rgba(123, 227, 255, 0.62));
}

#start-inventory .inventory-group-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#start-inventory .inventory-group-controls button {
  position: relative;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid rgba(236, 193, 101, 0.18);
  border-radius: 999px;
  color: #e8e2d7;
  background: rgba(7, 8, 12, 0.76);
  font: 800 0.9rem/1.2 inherit;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

#start-inventory .inventory-group-controls button::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--inventory-control-angle), transparent 0deg 276deg, #71e6ff 298deg, #ff9ecb 320deg, #ffd56a 340deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.82;
  pointer-events: none;
  filter: drop-shadow(0 0 2px rgba(113, 230, 255, 0.28));
  animation: inventory-control-edge 7s linear infinite;
}

#start-inventory .inventory-group-controls button:hover,
#start-inventory .inventory-group-controls button:focus-visible,
#start-inventory .inventory-group-controls button[aria-pressed="true"] {
  border-color: #f0cf78;
  color: #fff4d1;
  background: rgba(61, 47, 20, 0.58);
  transform: translateY(-1px);
}

#start-inventory .inventory-group-controls button:hover::before,
#start-inventory .inventory-group-controls button:focus-visible::before,
#start-inventory .inventory-group-controls button[aria-pressed="true"]::before {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(113, 230, 255, 0.64));
}

#start-inventory .inventory-selection-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 14px;
  align-items: center;
  min-height: 78px;
  margin: 22px clamp(18px, 3vw, 38px) 0;
  padding: 13px 17px;
  border: 1px solid rgba(236, 193, 101, 0.23);
  border-left: 3px solid #f0cf78;
  border-radius: 6px;
  color: #d7d2c8;
  background: rgba(8, 9, 12, 0.82);
}

#start-inventory .inventory-preview-kicker {
  grid-row: 1 / span 2;
  align-self: stretch;
  display: grid;
  place-items: center;
  padding-right: 14px;
  border-right: 1px solid rgba(236, 193, 101, 0.22);
  color: #e8c96f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#start-inventory .inventory-selection-preview strong { color: #fff7e6; font-size: 1.02rem; }
#start-inventory .inventory-selection-preview > span:last-child { color: #aaa59d; line-height: 1.45; }

#start-inventory .inventory-connection {
  opacity: 0.34;
  transition: opacity 180ms ease;
}

#start-inventory .inventory-connection:not(.is-active) .inventory-beam { opacity: 0.22 !important; animation-play-state: running; }
#start-inventory .inventory-connection:not(.is-active) .inventory-path { stroke-opacity: 0.62; }
#start-inventory .inventory-connection.is-active { opacity: 1; }
#start-inventory .inventory-connection.is-active .inventory-path { stroke-opacity: 0.8; }
#start-inventory .inventory-connection.is-active .inventory-beam { animation-play-state: running; }

#start-inventory .inventory-network-node rect:not(.inventory-node-effect) {
  fill: rgba(7, 8, 12, 0.93);
  stroke: rgba(236, 193, 101, 0.28);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.28));
}

#start-inventory .inventory-network-node .inventory-node-effect {
  stroke: url(#inventory-control-gradient);
  opacity: 0.46;
  filter: drop-shadow(0 0 3px rgba(113, 230, 255, 0.42));
  transition: opacity 180ms ease, filter 180ms ease;
}

#start-inventory .inventory-network-node:hover .inventory-node-effect,
#start-inventory .inventory-network-node:focus-visible .inventory-node-effect,
#start-inventory .inventory-network-node.is-active .inventory-node-effect {
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(255, 158, 203, 0.74));
}

#start-inventory.is-group-filtered .inventory-network-node:not(.is-group-active) { opacity: 0.25; }
#start-inventory .inventory-network-node { transition: opacity 180ms ease; }
#start-inventory .inventory-network-node:nth-of-type(18) { --node-accent:#71e6ff; --node-stroke:url(#inventory-card-gradient-17); }

@keyframes inventory-control-edge {
  to { --inventory-control-angle: 360deg; }
}

#start-inventory .inventory-mobile-groups { display: none; }
#start-inventory .inventory-mobile-group.is-hidden { display: none; }

#start-inventory .start-change-log {
  margin: 0 clamp(18px, 3vw, 38px) clamp(22px, 3vw, 34px);
  border: 1px solid rgba(236, 193, 101, 0.28);
  border-radius: 6px;
  background: rgba(7, 8, 12, 0.76);
  color: #d7d2c8;
}

#start-inventory .start-change-log summary {
  min-height: 58px;
  padding: 13px 17px;
  cursor: pointer;
  list-style: none;
}

#start-inventory .start-change-log summary::-webkit-details-marker { display: none; }
#start-inventory .start-change-log summary > span { display: grid; gap: 3px; }
#start-inventory .start-change-log summary strong { color: #f0cf78; }
#start-inventory .start-change-log summary small { color: #aaa59d; line-height: 1.4; }
#start-inventory .start-change-log summary::after { content: "+ Verlauf öffnen"; float: right; margin-top: -32px; color: #f0cf78; font-weight: 800; }
#start-inventory .start-change-log[open] summary::after { content: "− Verlauf schließen"; }

#start-inventory .start-change-log ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0 17px 17px;
  list-style: none;
}

#start-inventory .start-change-log li { padding: 14px 16px; border-top: 1px solid rgba(236, 193, 101, 0.18); }
#start-inventory .start-change-log li:nth-child(odd) { border-right: 1px solid rgba(236, 193, 101, 0.18); }
#start-inventory .start-change-log li strong { display: block; margin-bottom: 5px; color: #fff7e6; }
#start-inventory .start-change-log li span { color: #bdb7ac; line-height: 1.55; }
#start-inventory .start-change-log a { color: #f0cf78; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
#start-inventory .start-change-log a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
:root[data-theme="light"] #start-inventory .start-change-log a { color: #6b4b0d; }

:root[data-theme="light"] #start-inventory .inventory-introduction,
:root[data-theme="light"] #start-inventory .inventory-interaction-hint { color: #443d31; }
:root[data-theme="light"] #start-inventory .inventory-selection-preview { color: #443d31; background: rgba(255, 253, 247, 0.94); }
:root[data-theme="light"] #start-inventory .inventory-selection-preview strong { color: #4f370a; }
:root[data-theme="light"] #start-inventory .inventory-selection-preview > span:last-child { color: #625a4c; }
:root[data-theme="light"] #start-inventory .inventory-group-controls button { color: #5c410c; background: rgba(255, 253, 247, 0.92); }
:root[data-theme="light"] #start-inventory .start-change-log { color: #443d31; background: rgba(255, 253, 247, 0.94); }
:root[data-theme="light"] #start-inventory .start-change-log summary strong,
:root[data-theme="light"] #start-inventory .start-change-log summary::after { color: #6b4b0d; }
:root[data-theme="light"] #start-inventory .start-change-log summary small,
:root[data-theme="light"] #start-inventory .start-change-log li span { color: #625a4c; }
:root[data-theme="light"] #start-inventory .start-change-log li strong { color: #302510; }

@media (max-width: 720px) {
  #start-inventory .inventory-interaction-hint { align-items: flex-start; }
  #start-inventory .inventory-hint-example { flex-basis: 52px; height: 31px; }
  #start-inventory .inventory-group-controls { display: grid; grid-template-columns: 1fr 1fr; }
  #start-inventory .inventory-group-controls button { width: 100%; padding-inline: 10px; }
  #start-inventory .inventory-selection-preview { display: none; }
  #start-inventory .inventory-network-stage { display: none; }
  #start-inventory .inventory-mobile-groups { display: grid; gap: 22px; padding: 22px 15px 26px; }
  #start-inventory .inventory-mobile-group { display: grid; gap: 10px; }
  #start-inventory .inventory-mobile-group h4 { margin: 0; color: #edcf7c; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
  #start-inventory .inventory-mobile-list { display: grid; gap: 9px; }
  #start-inventory .inventory-mobile-link {
    position: relative;
    display: grid;
    gap: 3px;
    min-height: 64px;
    padding: 12px 15px;
    overflow: hidden;
    border: 1px solid rgba(236, 193, 101, 0.26);
    border-radius: 999px;
    color: #fff7e8;
    background: rgba(7, 8, 12, 0.91);
    text-decoration: none;
  }
  #start-inventory .inventory-mobile-link::before { content:""; position:absolute; inset:-1px; padding:1.5px; border-radius:inherit; background:conic-gradient(from var(--inventory-control-angle), transparent 0deg 276deg, #71e6ff 298deg, #ff9ecb 320deg, #ffd56a 340deg, transparent 360deg); -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude; opacity:.82; pointer-events:none; animation:inventory-control-edge 7s linear infinite; }
  #start-inventory .inventory-mobile-link strong { padding-inline: 10px; font-size: 0.95rem; }
  #start-inventory .inventory-mobile-link span { padding-inline: 10px; color: #aaa59d; font-size: 0.78rem; line-height: 1.35; }
  :root[data-theme="light"] #start-inventory .inventory-mobile-link { color:#4f370a; background:rgba(255,253,247,.96); }
  :root[data-theme="light"] #start-inventory .inventory-mobile-link span { color:#655d50; }
  #start-inventory .start-change-log { margin-inline: 15px; }
  #start-inventory .start-change-log summary { padding-right: 15px; }
  #start-inventory .start-change-log summary::after { float: none; display: block; margin-top: 8px; }
  #start-inventory .start-change-log ol { grid-template-columns: 1fr; padding-inline: 15px; }
  #start-inventory .start-change-log li { padding-inline: 0; }
  #start-inventory .start-change-log li:nth-child(odd) { border-right: 0; }
}

@media (max-width: 430px) {
  #start-inventory .inventory-group-controls { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #start-inventory .inventory-network-node .inventory-node-effect { animation: none; }
  #start-inventory .inventory-group-controls button::before { animation: none; }
  #start-inventory .inventory-mobile-link::before { animation: none; }
}
