/* App shell. Phones: top bar, one view at a time, bottom tab bar.
   Desktop (960px+): sidebar navigation, wide views, a table for the attic, and item details docked on the right. */

.shell { min-height: 100vh; }
.main { max-width: 680px; margin: 0 auto; padding: 12px 20px calc(env(safe-area-inset-bottom, 0px) + 110px); }
.view { display: flex; flex-direction: column; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.lede-sm { color: var(--ink-2); margin-top: 6px; max-width: 52ch; }

/* Top bar (phones) */
.topbar { position: sticky; top: 0; z-index: 15; display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 10px; background: var(--drawer); border-bottom: 2px solid var(--ink); }
.topbar .wordmark, .side .wordmark { color: inherit; text-decoration: none; }
.avatar-btn { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--card); border: 2px solid var(--ink); }
.avatar-btn img, .me-ni img { width: 100%; height: 100%; object-fit: cover; }
.avatar-btn svg, .me-ni svg { width: 100%; height: 100%; }

/* View header */
.viewhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding-top: 8px; }
.viewhead .big { font-size: clamp(40px, 10vw, 60px); line-height: 0.95; }
.viewhead .sub { font-family: var(--type); font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.headtools { display: flex; gap: 16px; align-items: center; }

/* Toolbar: search, group, sort */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.toolbar input[type="search"] { flex: 1 1 200px; width: auto; background: var(--card); border: 1.5px solid var(--line); padding: 10px 12px; }
.tool { display: flex; flex-direction: column; gap: 2px; font-family: var(--type); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.tool select { width: auto; min-width: 120px; padding: 9px 10px; }

/* Grouped list */
.gsec { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.gsec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.gsec-h h3 { font-size: 15px; display: flex; gap: 8px; align-items: center; }
.gsec-h h3 svg { width: 18px; height: 18px; color: var(--ink-2); }
.gsec-h .num { font-family: var(--type); font-size: 13px; color: var(--muted); }
.gsec-tools { display: flex; gap: 12px; align-items: baseline; }

.nudges { display: flex; flex-direction: column; gap: 8px; }
.nudges:empty { display: none; }
.nudge-row { display: flex; flex-direction: row; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Bulk actions (desktop) */
.bulkbar { position: sticky; top: 8px; z-index: 5; background: var(--ink); color: var(--on-ink); padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bulkbar .btn { background: var(--card); color: var(--ink); padding: 8px 12px; min-height: 0; font-size: 13px; }
.bulkbar .btn.link { background: none; color: var(--on-ink); }

/* Bottom tab bar (phones) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--card); border-top: 2px solid var(--ink); display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 8px calc(env(safe-area-inset-bottom, 0px) + 10px); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 4px 0; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar .ni { width: 24px; height: 24px; display: flex; }
.tabbar .ni svg { width: 24px; height: 24px; }
.tabbar .tab-add { justify-self: center; width: 60px; height: 60px; margin-top: -26px; background: var(--ink); color: var(--on-ink); justify-content: center; padding: 0; }
.tabbar .tab-add[aria-current="page"] { background: var(--red); color: var(--on-ink); }
.tabbar .tab-add .ni, .tabbar .tab-add .ni svg { width: 28px; height: 28px; }
.me-ni { width: 24px; height: 24px; overflow: hidden; background: var(--drawer); border: 1.5px solid currentColor; }

/* Sidebar (desktop) */
.side { display: none; }

/* Me / Play */
.profile-card { background: var(--card); border-top: 4px solid var(--red); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); padding: 18px; display: flex; gap: 16px; align-items: flex-start; }
.profile-card .pic { width: 84px; height: 84px; flex: none; overflow: hidden; background: var(--drawer); display: flex; align-items: center; justify-content: center; }
.profile-card .pic img, .profile-card .pic svg { width: 100%; height: 100%; object-fit: cover; }
.profile-card h1 { font-size: clamp(30px, 8vw, 44px); line-height: 1; }
.profile-card .bio { color: var(--ink-2); white-space: pre-wrap; margin-top: 6px; }
.section-card { background: var(--card); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.section-card > h2 { font-size: 18px; }
.menu { display: flex; flex-direction: column; background: var(--card); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); }
.menu a, .menu button { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font-size: 15px; color: var(--ink); text-decoration: none; width: 100%; }
.menu > :first-child { border-top: 0; }
.menu .chev { font-family: var(--type); color: var(--muted); }

/* Attic table (desktop) */
.atable { width: 100%; border-collapse: collapse; background: var(--card); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); font-size: 14px; }
.atable th { font-family: var(--type); font-size: 11px; font-weight: 400; color: var(--muted); text-transform: uppercase; text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap; cursor: pointer; user-select: none; }
.atable th[aria-sort] { color: var(--ink); }
.atable td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atable tr { cursor: pointer; }
.atable tbody tr:hover { background: color-mix(in srgb, var(--card) 92%, var(--ink)); }
.atable tr[aria-selected="true"] { background: color-mix(in srgb, var(--card) 85%, var(--blue)); }
.atable .vrule { width: 4px; padding: 0; }
.atable tr[data-verdict="collector"] .vrule { background: var(--v-collector); }
.atable tr[data-verdict="closer_look"] .vrule { background: var(--v-closer_look); }
.atable tr[data-verdict="bottom_line"] .vrule { background: var(--v-bottom_line); }
.atable tr[data-verdict="sentimental"] .vrule { background: var(--v-sentimental); }
.atable .ticon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--drawer); overflow: hidden; }
.atable .ticon img { width: 100%; height: 100%; object-fit: cover; }
.atable .ticon svg { width: 20px; height: 20px; }
.atable .tname { font-weight: 700; }
.atable .tsub { font-family: var(--type); font-size: 12px; color: var(--muted); }
.atable .num { text-align: right; white-space: nowrap; }
.atable .vlabel { font-family: var(--type); font-size: 12px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.atable tr[data-verdict="collector"] .vlabel { color: var(--v-collector); }
.atable tr[data-verdict="closer_look"] .vlabel { color: var(--v-closer_look); }
.atable tr[data-verdict="bottom_line"] .vlabel { color: var(--ink-2); }
.atable tr[data-verdict="sentimental"] .vlabel { color: var(--v-sentimental); }
.atable input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ink); }
.atable .grouprow td { background: var(--drawer); font-weight: 700; cursor: default; }
.tablewrap { overflow-x: auto; }
.atable.plain tr, .atable.plain th { cursor: default; }
.atable.plain td:first-child { white-space: nowrap; }

.detailpane { background: var(--card); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); border-top: 4px solid var(--vline, var(--ink)); }
.detailpane[data-verdict="collector"] { --vline: var(--v-collector); }
.detailpane[data-verdict="closer_look"] { --vline: var(--v-closer_look); }
.detailpane[data-verdict="bottom_line"] { --vline: var(--v-bottom_line); }
.detailpane[data-verdict="sentimental"] { --vline: var(--v-sentimental); }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
  .topbar, .tabbar { display: none; }
  .side { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; padding: 22px 16px; border-right: 2px solid var(--ink); background: var(--drawer); }
  .sidenav { display: flex; flex-direction: column; gap: 2px; }
  .sidenav a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
  .sidenav a:hover { background: var(--card); }
  .sidenav a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); }
  .sidenav .ni, .sidenav .ni svg { width: 20px; height: 20px; display: flex; }
  .sidenav .addlink { background: var(--ink); color: var(--on-ink); margin: 8px 0; }
  .sidenav .addlink:hover, .sidenav .addlink[aria-current="page"] { background: var(--red); color: var(--on-ink); }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
  .side-foot a { color: var(--muted); }
  .main { max-width: 1400px; padding: 24px 32px 48px; margin: 0; }
  #view-add, #view-wanted, #view-me, #view-play { max-width: 860px; }
  .split-pane.has-detail { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 20px; align-items: start; }
  .split-pane.has-detail .detailpane { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
  .me-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
}
@media (max-width: 959px) {
  .detailpane { display: none !important; }
}
.sets { display: flex; flex-wrap: wrap; gap: 10px; }
.ci { display: inline-flex; }
.icon .ci svg, .icon > svg { width: 26px; height: 26px; }
@media (min-width: 960px) {
  .split-pane.has-detail .atable .opt { display: none; }
  .atable td:nth-child(4) { min-width: 200px; }
}
@media (min-width: 960px) and (max-width: 1199px) { .atable .opt { display: none; } }
@media (max-width: 959px) {
  .toolbar input[type="search"] { flex-basis: 100%; }
  .toolbar .tool { flex: 1; }
  .toolbar .tool select { width: 100%; min-width: 0; }
}
/* Category chips */
.catbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.catchip { flex: none; display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid transparent; padding: 7px 12px 7px 9px; box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.catchip .cicon, .catchip .cicon svg { width: 22px; height: 22px; display: flex; }
.catchip .n { font-family: var(--type); font-size: 12px; color: var(--muted); }
.catchip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.catchip[aria-pressed="true"] .cicon { color: var(--red); }
@media (max-width: 959px) {
  .catchip { flex-direction: column; gap: 3px; padding: 8px 10px; min-width: 68px; font-size: 11px; }
  .catchip .clabel { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.badge-n:not(:empty) { margin-left: auto; background: var(--red); color: var(--on-ink); font-family: var(--type); font-size: 11px; font-weight: 700; padding: 1px 6px; }
.topright { display: flex; align-items: center; gap: 10px; }
.admin-btn { display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: 13px; color: var(--ink); text-decoration: none; border: 2px solid var(--ink); padding: 6px 10px; background: var(--card); }
.admin-btn .badge-n:not(:empty) { margin-left: 0; }
.sidenav .adminlink { margin-top: 14px; border-top: 1px solid var(--line); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pack { background: var(--drawer); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.pack .cond { font-size: 24px; }
.copyrow-in { display: flex; gap: 8px; align-items: stretch; }
.copyrow-in > input, .copyrow-in > .handle { flex: 1; }
#creditLine .textbtn { padding: 0; color: var(--ink); text-decoration: underline; }
/* Profile picture picker */
.picker { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border: 1.5px solid var(--line); padding: 0; cursor: pointer; }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.pic-empty { outline: 2px dashed var(--red); outline-offset: 2px; }
.photostrip { display: flex; gap: 8px; overflow-x: auto; }
.photostrip .ph { position: relative; flex: none; width: 72px; height: 72px; padding: 0; border: 2px solid transparent; background: var(--drawer); }
.photostrip .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photostrip .ph[aria-pressed="true"] { border-color: var(--ink); }
.covertag { position: absolute; left: 0; bottom: 0; background: var(--ink); color: var(--on-ink); font-family: var(--type); font-size: 10px; text-transform: uppercase; padding: 1px 5px; }
/* Explore */
.seg a { padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; flex: 1; text-align: center; }
.seg a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
@media (min-width: 960px) { .mobile-only { display: none !important; } }
.icon-btn { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.icon-btn .ni, .icon-btn svg { width: 24px; height: 24px; display: flex; }
.exgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.excard { background: var(--card); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); border-top: 4px solid var(--vline, var(--ink)); display: flex; flex-direction: column; min-width: 0; }
.excard[data-verdict="collector"] { --vline: var(--v-collector); }
.excard[data-verdict="closer_look"] { --vline: var(--v-closer_look); }
.excard[data-verdict="bottom_line"] { --vline: var(--v-bottom_line); }
.excard[data-verdict="sentimental"] { --vline: var(--v-sentimental); }
.excard .exphoto { aspect-ratio: 1; background: var(--drawer); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--ink-2); }
.excard .exphoto img { width: 100%; height: 100%; object-fit: contain; }
.excard .exphoto svg { width: 40%; height: 40%; }
.excard .exbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.excard .exbody b { font-size: 14px; line-height: 1.2; }
.excard .who { font-size: 13px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.excard .who a { color: var(--ink); font-weight: 700; }
.spotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.spotcard { background: var(--card); border-top: 4px solid #A9802A; padding: 14px; display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); }
.spotcard .pic { width: 52px; height: 52px; }
.others { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.raretag { background: #A9802A; color: #fff; font-family: var(--type); font-weight: 700; font-size: 12px; letter-spacing: .06em; padding: 2px 8px; }
.foundin { display: inline-block; align-self: flex-start; margin-top: 4px; font-family: var(--type); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--blue); border: 1.5px solid var(--blue); padding: 0 6px; cursor: help; }
.raretag.small { display: inline-block; align-self: flex-start; margin-top: 4px; font-size: 11px; padding: 0 6px; cursor: help; }
.card .row .body { display: flex; flex-direction: column; }
.kitparts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.kitparts input { width: 140px; padding: 6px 8px; }
.titlechip[aria-pressed="true"] { border: 2px solid var(--ink); color: var(--ink); background: var(--drawer); }

/* Pages outside the app (the game, public attic pages) for signed-in members: same sidebar on desktop, same tab bar on phones. */
@media (min-width: 960px) {
  body.member { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-items: start; }
  body.member > .side { grid-column: 1; grid-row: 1; }
  body.member > main { grid-column: 2; grid-row: 1; width: 100%; }
  body.member .pnav, body.member .top .wordmark { display: none !important; }
}
/* Lookups balance: a counter, not a sentence */
.balance { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--card); border: 1.5px solid var(--line); padding: 8px 10px; text-align: left; color: var(--ink); cursor: pointer; box-shadow: 0 1px 2px rgba(34, 35, 38, 0.12); }
.balance:hover { border-color: var(--ink); }
.balance .bicon, .balance .bicon svg { width: 22px; height: 22px; display: flex; color: var(--red); flex: none; }
.balance .bnum { font-family: var(--sans); font-stretch: 75%; font-weight: 800; font-size: 26px; line-height: 1; }
.balance .blabel { font-family: var(--type); font-size: 11px; text-transform: uppercase; color: var(--muted); line-height: 1.1; }
.balance .bmore { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink); text-decoration: underline; white-space: nowrap; }
.balance.low { border-color: var(--red); }
.balance.mini { width: auto; padding: 4px 8px; gap: 4px; }
.balance.mini .bnum { font-size: 20px; }
.balance.mini .bicon, .balance.mini .bicon svg { width: 18px; height: 18px; }
.balance.inline { width: auto; align-self: flex-start; }
.bigbalance { display: flex; align-items: center; gap: 14px; background: var(--drawer); padding: 14px 16px; }
.bigbalance .bicon, .bigbalance .bicon svg { width: 34px; height: 34px; display: flex; color: var(--red); }
.bigbalance .cond { font-size: 56px; line-height: 0.9; }
.bigbalance b { display: block; font-size: 16px; }

/* Offline: a small tag while showing the last attic seen, and lookups waiting for signal. */
.offline-tag { font-family: var(--type); font-size: 12px; text-transform: uppercase; color: var(--ink-2); border: 1.5px solid var(--line); padding: 2px 6px; align-self: flex-start; }
#queueCards .row .btn.link { flex: none; padding: 8px 4px; min-height: 0; }
#queueCards .status { padding: 0 14px 12px; }
.admintabs { flex-wrap: wrap; margin-bottom: 4px; }
.cta.newfb { border-left: 4px solid var(--red); }
.submitted { display: flex; gap: 10px; align-items: center; }
.submitted img { width: 56px; height: 56px; object-fit: cover; background: var(--drawer); }
.icon img[src*="/stock"], .ticon img[src*="/stock"] { object-fit: contain; }
/* Collections and other foldable sections */
.gsec-h.foldable { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; color: inherit; padding: 0 0 6px; }
.gsec-h .chev, .grouprow .chev { display: inline-block; width: 14px; color: var(--muted); font-size: 12px; }
.gsec.folded { background: var(--card); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); padding: 12px 14px; gap: 10px; }
.gsec.folded .gsec-h { border-bottom: 0; padding: 0; }
.setbars { display: grid; grid-template-columns: minmax(0, 640px); gap: 6px; align-items: center; } /* one set per line */
.setbars.one { grid-template-columns: minmax(0, 560px); }
.setbar { display: grid; grid-template-columns: minmax(0, 1fr) 90px 6ch; gap: 8px; align-items: center; background: none; border: 0; padding: 2px 0; text-align: left; color: var(--ink-2); font-size: 13px; cursor: pointer; min-width: 0; }
.setbar .sbname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setbar .bar { height: 6px; background: var(--drawer); display: block; }
.setbar .bar span { display: block; height: 100%; background: var(--red); }
.setbar .sbnum { font-family: var(--type); font-size: 12px; color: var(--muted); text-align: right; }
.subsec { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.grouprow.foldable { cursor: pointer; }
.grouprow.foldable:hover td { background: color-mix(in srgb, var(--drawer) 85%, var(--ink)); }
.grouprow.sub td { background: transparent; font-family: var(--type); font-size: 12px; text-transform: uppercase; color: var(--muted); padding-left: 32px; }
.grouprow .setbars { margin-top: 8px; font-weight: 400; }
.grouprow td > div > span svg, .grouprow .ci svg { width: 20px; height: 20px; flex: none; }
.grouprow td > div > span { white-space: nowrap; }
.gsec-h h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 959px) {
  .gsec-h.foldable { flex-direction: column; align-items: flex-start; gap: 2px; }
  .gsec-h.foldable h3 { max-width: 100%; }
  .gsec-h.foldable .num { padding-left: 22px; }
}

/* Nested attic: each level indents a little and folds to a summary card. */
.gsec.nest { margin-bottom: 10px; }
.gsec.nest .gsec.nest { margin: 6px 0 4px 14px; }
.gsec.nest.d1.folded, .gsec.nest.d2.folded, .gsec.nest.d3.folded { box-shadow: none; border-left: 2px solid var(--line); background: transparent; padding: 8px 10px; }
.nestpic { width: 28px; height: 28px; object-fit: cover; flex: none; }
.nesttitle { overflow: hidden; text-overflow: ellipsis; }
.gsec.nest .tablewrap { margin: 0; }
.nudge.coverage { display: flex; flex-direction: column; gap: 6px; }
.countfix { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nodeacts { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }

/* Lookup results to add: a checkbox, then the find (tap for details). Names wrap instead of cutting off. */
.picklist { display: flex; align-items: center; gap: 10px; padding-left: 12px; }
.picklist > input { flex: none; width: 20px; height: 20px; }
.picklist > .row { flex: 1; min-width: 0; }
.picklist .name { white-space: normal; overflow: visible; }

/* Select mode on phones: a tick box on each find. Desktop picks with the table's checkboxes instead. */
.pickbox { flex: none; width: 22px; height: 22px; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; align-self: center; }
.card.picked { outline: 2px solid var(--ink); outline-offset: -2px; }
.card.picked .pickbox { background: var(--ink); color: var(--on-ink); }
.bulkbar .bulkrow { display: flex; gap: 8px; flex: 1 1 100%; }
.bulkbar .bulkrow select { flex: 1; min-width: 0; }
.atable .tclamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.editpanel { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); background: var(--card); }
.covfold > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.covfold > .nudge { margin-top: 6px; }

/* An open section is one card; its finds are rows inside it (a stripe for the verdict, a line between), not cards of their own. */
.gsec.open { background: var(--card); box-shadow: 0 1px 2px rgba(34, 35, 38, 0.15); padding: 12px 14px; }
.gsec.open .cards { gap: 0; }
.gsec.open .cards .card { box-shadow: none; border-top: 0; border-left: 4px solid var(--vline, var(--ink)); border-bottom: 1px solid var(--line); }
.gsec.open .subsec { margin-top: 12px; }
/* Desktop table: section rows are headers; the finds under an open one sit indented. */
.atable tr.grouprow > td { background: var(--drawer); font-weight: 700; font-size: 15px; }
.atable tr.grouprow.sub > td { background: var(--card); font-weight: 400; font-size: 13px; padding-left: 28px; }
.atable tr.inset > td:first-child { padding-left: 28px; }
/* Swipe on phones: what's underneath shows as the row slides. */
.card.swipe { position: relative; overflow: hidden; }
.card.swipe > .row { position: relative; background: var(--card); transition: transform .2s ease; }
.swipebg { position: absolute; inset: 0; display: none; justify-content: space-between; align-items: center; padding: 0 18px; font-weight: 800; color: #fff; }
.card[data-swipe] > .swipebg { display: flex; }
.card[data-swipe="delete"] > .swipebg { background: var(--red); }
.card[data-swipe="delete"] > .swipebg span:last-child, .card[data-swipe="select"] > .swipebg span:first-child { visibility: hidden; }
.card[data-swipe="select"] > .swipebg { background: var(--ink); }
.collset { display: flex; flex-direction: column; gap: 2px; width: 100%; background: none; border: 0; padding: 4px 0; text-align: left; color: inherit; cursor: pointer; }
.reviewpic { width: 100%; max-height: 42vh; object-fit: contain; background: var(--drawer); }
.reviewbar { position: sticky; top: 0; z-index: 2; background: var(--card); display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.reviewbar .decide { display: flex; flex-wrap: nowrap; gap: 6px; }
.reviewbar .decide button { flex: 1 1 0; min-width: 0; padding: 8px 4px; font-size: 13px; line-height: 1.2; white-space: normal; }
.duperow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px; background: none; border: 2px solid transparent; text-align: left; color: inherit; cursor: pointer; }
.duperow img, .duperow .nopic { width: 56px; height: 56px; object-fit: cover; flex: none; background: var(--drawer); display: grid; place-items: center; font-size: 10px; }
.duperow.picked { border-color: var(--ink); }
.duperow > .label:first-of-type { flex: 1; }

/* Flag / reviewed star on someone else's shared find: faint, in the corner, there if you need it. */
.excard { position: relative; }
.flagside { position: absolute; top: 6px; right: 6px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.flagbtn { background: none; border: 0; padding: 2px 4px; cursor: pointer; color: var(--ink); opacity: .3; font-size: 13px; line-height: 1; }
.flagbtn:hover, .flagbtn:focus-visible { opacity: .8; }
.flagpop { background: var(--card); border: 2px solid var(--ink); padding: 4px 8px; font-size: 12px; white-space: nowrap; }
