#lists-count { background: var(--primary-soft); padding: 2px 7px; border-radius: 20px; }
.lists-workspace,.lists-help { margin-top: 2rem; }
.lists-workspace > select { max-width: 100%; width: 28rem; margin-top: .4rem; }
.research-items { list-style: none; padding: 0; }
.research-items li { margin: 1rem 0; }
.research-card { border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; background: var(--surface); }
.research-card h4 { font-size: 1.3rem; margin: 0 0 .7rem; }
.research-notes { white-space: pre-wrap; }
.research-card dd { margin: 0 0 .5rem; }
.lists-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.lists-fields label { display: flex; flex-direction: column; gap: .4rem; }
.lists-fields .wide { grid-column: 1/-1; }
#item-editor,#list-name { width: min(640px,calc(100% - 2rem)); max-height: 85vh; border: 1px solid var(--border-strong); border-radius: 16px; padding: 1.5rem; overflow: auto; color: var(--ink); background: var(--surface); }
#item-editor::backdrop,#list-name::backdrop { background: #172b4d66; }
#item-editor .actions,#list-name .actions { position: sticky; bottom: -1.5rem; padding: .8rem 0; background: var(--surface); }
#saved-criteria { overflow-wrap: anywhere; }
.restore-label { display: flex; flex-wrap: wrap; gap: .5rem; cursor: pointer; }
.restore-label input { max-width: 100%; font: inherit; padding: .3rem; }
.lists-entry { margin: 1rem 0 2rem; }
.lists-entry p { margin-top: .6rem; }
@media(max-width:600px){.lists-fields {grid-template-columns: minmax(0,1fr);} .research-card{padding:1rem;} .research-card .actions{gap:.6rem;} }
.lists-fields input,.lists-fields select,.lists-fields textarea,#list-name-input,.lists-workspace > select { box-sizing: border-box; min-width: 0; width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--border-strong); border-radius: 8px; }
.lists-fields textarea { resize: vertical; }
.research-rail { min-width: 0; position: sticky; top: 1rem; align-self: start; z-index: 5; }
.research-drawer { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; max-height: calc(100dvh - 2rem); overflow: auto; }
.research-drawer > summary { cursor: pointer; padding: 1rem; font-weight: 700; color: var(--primary); min-height: 48px; }
.research-count { border-radius: 20px; background: var(--primary-soft); padding: 2px 7px; }
.research-panel { padding: 0 1rem 1rem; font-size: 14px; }
.travel-site .research-panel h2 { font-size: 20px; margin: .2rem 0 .5rem; }
.travel-site .research-panel h3 { font-size: 17px; margin: 1.2rem 0 .5rem; }
.research-field { display: flex; flex-direction: column; gap: .4rem; margin: .8rem 0; }
.research-field input,.research-field select,.research-field textarea { box-sizing: border-box; min-width: 0; width: 100%; min-height: 44px; font: inherit; padding: .6rem; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--ink); background: var(--surface-soft); }
.research-field textarea { resize: vertical; }
.research-field[hidden],.research-rail [hidden] { display: none; }
.travel-site .research-panel .button { display: inline-flex; justify-content: center; width: 100%; font-size: 14px; padding: .65rem .9rem; margin: .3rem 0; min-height: 44px; }
.research-message { min-height: 1.5em; }
.research-preview ul { padding-left: 1.2rem; }
.research-preview li { margin: .6rem 0; }
.research-preview a { display: inline-block; padding: .25rem 0; }
.research-draft { font-size: 12px; }
.travel-main.research-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 1.5rem; }
.research-layout > #travel-app { min-width: 0; grid-column: 1; grid-row: 2; }
.research-layout > .research-rail { grid-column: 1; grid-row: 1; }
.research-layout > #status { grid-column: 1; grid-row: 3; }
@media (min-width:1280px) {
  .travel-main.research-layout { max-width: 1600px; grid-template-columns: minmax(0,1fr) 320px; }
  .research-layout > #travel-app { grid-row: 1; }
  .research-layout > .research-rail { position: fixed; top: 110px; right: max(24px,calc((100vw - 1600px) / 2)); width: 320px; }
  .research-drawer { max-height: calc(100dvh - 126px); }
  .research-layout > #status { grid-row: 2; }
  .travel-site:has(.research-layout) .travel-footer { padding-right: 344px; }
}
@media (max-width:1279px) {
  .research-drawer[open] { max-height: min(75dvh,700px); }
}
