.collection-hero, .has-items .collection-hero {
  height: clamp(230px, 31vw, 350px);
}
.collection-hero .pokemon-scene {
  inset: 0;
  margin-inline: auto;
  width: min(100%, 740px);
  height: 100%;
}
.collection-head .tools { --collection-control-height: 42px; }
.collection-head .search { height: var(--collection-control-height); min-width: 0; }
.layout-picker { position: relative; flex: none; }
.collection-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--collection-control-height);
  min-width: 142px;
  padding: 0 12px;
  border: 1px solid #dce3df;
  border-radius: 9px;
  background: #fff;
  color: #30493e;
  font: 700 12px Manrope, Arial, sans-serif;
  white-space: nowrap;
}
.layout-chevron {
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  rotate: 45deg;
  margin: -3px 1px 0 0;
}
.collection-layout[aria-expanded="true"] .layout-chevron { rotate: 225deg; margin-top: 3px; }
.layout-options {
  position: absolute;
  z-index: 10;
  inset: calc(100% + 6px) auto auto 0;
  min-width: 100%;
  padding: 4px;
  border: 1px solid #dce3df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px #163d3226;
}
.layout-options[hidden] { display: none; }
.layout-options [role="option"] {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #30493e;
  text-align: left;
  white-space: nowrap;
}
.layout-options [aria-selected="true"] { background: #e4f1e9; font-weight: 800; }
.layout-options [role="option"]:is(:hover,:focus-visible) { background: #f1f6f3; }
#items { position: relative; }

.item-grid:is([data-layout="list"], [data-layout="compact"]) {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
[data-layout="list"] .collection-entry { grid-template-columns: 144px minmax(0, 1fr); min-height: 132px; }
[data-layout="list"] .entry-photo { min-height: 132px; padding: 8px; }
[data-layout="list"] .entry-photo img { height: 116px; }
[data-layout="list"] .entry-content { padding: 13px 90px 13px 14px; }
[data-layout="list"] .entry-kind { margin-bottom: 4px; }
[data-layout="list"] .entry-content h3 { font-size: 17px; }
[data-layout="list"] .entry-meta { padding-top: 8px; }

[data-layout="compact"] .collection-entry { grid-template-columns: 60px minmax(0, 1fr); min-height: 62px; border-radius: 10px; }
[data-layout="compact"] .entry-photo { min-height: 60px; padding: 4px; }
[data-layout="compact"] .entry-photo img { height: 52px; }
[data-layout="compact"] .entry-photo > .icon { width: 26px; height: 26px; }
[data-layout="compact"] .entry-content { justify-content: center; padding: 6px 84px 6px 8px; }
[data-layout="compact"] .entry-content h3 { font-size: 14px; letter-spacing: 0; }
[data-layout="compact"] .entry-series { display: none; }
[data-layout="compact"] .entry-kind { margin: 0 0 2px; padding: 0; }
[data-layout="compact"] .entry-kind .icon { width: 12px; height: 12px; }
[data-layout="compact"] .entry-meta { margin: 1px 0 0; padding: 0; }

.entry-drag {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 9px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #dce3df;
  border-radius: 9px;
  background: #fff;
  color: #587266;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.entry-drag svg { width: 15px; height: 15px; pointer-events: none; }
.entry-drag:hover, .entry-drag:focus-visible { color: #175338; border-color: #587266; }
[data-layout="list"] .entry-drag, [data-layout="compact"] .entry-drag { left: auto; right: 45px; top: 50%; translate: 0 -50%; }
[data-layout="list"] .entry-favorite, [data-layout="compact"] .entry-favorite { right: 8px; top: 50%; translate: 0 -50%; }
.item-grid[aria-busy="true"] .entry-drag { cursor: progress; }
.item-grid.is-reordering .collection-entry { transition: none; }
.item-grid.is-reordering .collection-entry:hover { transform: none; }
.item-grid.is-reordering .entry-photo img { transform: none; }
.collection-entry.is-drag-source { opacity: .28; outline: 2px dashed var(--entry-accent); outline-offset: -2px; }
.collection-drag-preview {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 9999;
  pointer-events: none;
  will-change: transform;
}
.collection-drag-preview .collection-entry { height: 100%; box-shadow: 0 16px 36px #163d3240; transition: none; }
html.gv2-reordering { cursor: grabbing; user-select: none; }
@media (max-width: 760px) {
  .collection-hero .pokemon-scene { max-width: 520px; }
  .collection-head .tools { --collection-control-height: 43px; }
  [data-layout="list"] .collection-entry { grid-template-columns: 86px minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .collection-head .tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .layout-picker { grid-column: 1 / -1; }
  .collection-layout { width: 100%; font-size: 16px; }
  .collection-head .search { width: 100%; }
}

#item-form { --collection-control-height: 42px; }
#item-form .form-grid input:not([type="checkbox"],[type="file"],[type="hidden"]) {
  height: var(--collection-control-height);
}
#filters { --collection-control-height: 36px; }
.field-picker { display: block; min-width: 0; }
.field-picker-button { width: 100%; min-width: 0; font-size: 13px; }
.field-picker-button > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.field-picker-button .layout-chevron { flex: none; }
.field-picker-options[popover] {
  position: fixed;
  inset: auto;
  min-width: 0;
  margin: 0;
  overflow: auto;
}
.field-picker-options [role="option"] { white-space: normal; }
@media (max-width: 760px) {
  #item-form .field-picker-button { font-size: 16px; }
}
@media (max-width: 580px) {
  #item-form { --collection-control-height: 44px; }
}
