/* Recently viewed: 06-recent.png. Images and timestamps come from browsing history. */
body[data-tab=recent] { --gutter: 48px; --w: 1920px; background: var(--bg); }
html:not([data-theme=dark]) body[data-tab=recent] { --bg: #f8f9fc; --mu: #7d8290; --line: #e9ebf0; }
html[data-lang] body[data-tab=recent] .collection-head h1::after { content: none; }
body[data-tab=recent] :is(#bar,#filters,#bbar) { display: none; }
#recentActions { display: none; }
body[data-tab=recent] .gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 34px var(--gutter) 41px; }
body[data-tab=recent] .collection-head h1 { font-size: 42px; line-height: 56px; font-weight: 700; letter-spacing: -.03em; }
body[data-tab=recent] #recentActions { display: flex; flex: none; }
body[data-tab=recent] #clrRec { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--tx); font-size: 16px; line-height: 22px; font-weight: 500; white-space: nowrap; }
body[data-tab=recent] #clrRec:hover { background: var(--sf2); }
body[data-tab=recent] #clrRec:disabled { opacity: .45; cursor: default; }
body[data-tab=recent] #clrRec svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body[data-tab=recent] #grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 26px 24px; padding: 0 var(--gutter) 44px; min-height: 0; align-items: start; }
body[data-tab=recent] .card { position: relative; border: 1px solid var(--line); border-radius: 17px; background: var(--bg2); box-shadow: none; }
body[data-tab=recent] .card:has(.recent-menu[open]) { z-index: 5; }
body[data-tab=recent] .card .ph { width: 100%; aspect-ratio: 375 / 268; border: 0; border-radius: 16px 16px 0 0; box-shadow: none; transform: none; }
body[data-tab=recent] .card .ph img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center 30%; padding: 0; transform: none; }
body[data-tab=recent] .card .ph:is(.pose,.depth) img { object-fit: contain; object-position: center; }
body[data-tab=recent] .card.sel { border-color: var(--ac); box-shadow: 0 0 0 1px var(--ac); }
body[data-tab=recent] .card.sel .ph { box-shadow: none; }
body[data-tab=recent] .card .info { display: grid; grid-template-columns: minmax(0,1fr) auto 32px; align-items: center; gap: 8px 12px; min-height: 62px; padding: 10px 16px 10px 18px; }
.recent-kind { display: inline-flex; align-items: center; gap: 9px; min-width: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.recent-kind svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.recent-info time { margin-left: auto; color: var(--mu); font-size: 16px; line-height: 24px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recent-menu { position: relative; min-width: 0; }
.recent-menu summary { display: flex; align-items: center; justify-content: center; width: 32px; height: 36px; border-radius: 8px; color: var(--tx2); cursor: pointer; list-style: none; }
.recent-menu summary::-webkit-details-marker { display: none; }
.recent-menu summary:hover, .recent-menu[open] summary { background: var(--sf); }
.recent-menu summary svg { width: 21px; height: 21px; fill: currentColor; stroke: currentColor; }
.recent-menu-panel { position: absolute; z-index: 10; top: calc(100% + 6px); right: 0; min-width: 180px; max-width: calc(100vw - 40px); padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); box-shadow: var(--sh2); }
.recent-menu-panel button { display: block; width: 100%; min-height: 38px; padding: 8px 12px; border-radius: 7px; background: transparent; color: var(--tx); font-size: 14px; line-height: 22px; text-align: left; white-space: normal; }
.recent-menu-panel button:hover { background: var(--sf); }
.recent-menu-panel [data-a=unrec] { color: var(--ac); }
body[data-tab=recent] .card .cbtns, body[data-tab=recent] .card .badge, body[data-tab=recent] .card .angs, body[data-tab=recent] .card .try { opacity: 0; pointer-events: none; }
body[data-tab=recent] .card:is(:hover,:focus-within) :is(.cbtns,.badge,.angs,.try) { opacity: 1; pointer-events: auto; }
body[data-tab=recent] .card .cbtns { top: 12px; right: 12px; }
body[data-tab=recent] .card .angs { bottom: 8px; }
body[data-tab=recent] .card .try { bottom: 50px; }
body[data-tab=recent].none0 #empty { padding-top: 80px; }
.recent-language-icon { display: none; }

@media (min-width: 1280px) {
  body[data-tab=recent] #top { grid-template: "brand nav context search tools" 85px / auto auto auto minmax(120px,1fr) auto; gap: 0; padding-inline: 48px; background: var(--bg2); }
  body[data-tab=recent] .brand { gap: 10px; }
  body[data-tab=recent] .mark { width: 36px; height: 36px; background: none; box-shadow: none; }
  body[data-tab=recent] .mark svg,
  body[data-tab=recent] .mark .pose-brand { display: none; }
  body[data-tab=recent] .mark .costume-brand { display: block; width: 36px; height: 36px; object-fit: contain; }
  body[data-tab=recent] .wm { display: flex; flex-direction: row; align-items: baseline; gap: 6px; }
  body[data-tab=recent] .wm b,
  body[data-tab=recent] .wm small { color: var(--tx); font-size: 18px; line-height: 26px; font-weight: 550; letter-spacing: 0; }
  body[data-tab=recent] .wm small::before { content: '/ '; }
  body[data-tab=recent] .tabs { margin-left: 64px; gap: 42px; align-self: stretch; }
  body[data-tab=recent] .tabs .shell-menu { height: 100%; }
  body[data-tab=recent] .tabs .nav-trigger { height: 100%; min-height: 0; padding: 0; border-radius: 0; background: none; color: var(--tx2); font-size: 20px; font-weight: 500; }
  body[data-tab=recent] .tabs .nav-trigger > svg, body[data-tab=recent] .tabs .current > .nav-trigger::after { display: none; }
  body[data-tab=recent] .shell-context { min-height: 28px; height: 28px; margin-left: 42px; padding-left: 40px; gap: 42px; border-color: var(--line2); font-size: 20px; }
  body[data-tab=recent] .shell-context span { color: var(--tx); }
  body[data-tab=recent] #shellPage { position: relative; padding: 0 28px 0 0; border-right: 1px solid var(--line); font-size: 20px; line-height: 28px; font-weight: 650; }
  body[data-tab=recent] #shellPage::after { content: ""; position: absolute; bottom: -29px; left: -17px; width: 74px; height: 2px; background: var(--ac); }
  body[data-tab=recent] .top .search { width: calc(100% - 40px); max-width: 474px; margin-left: 40px; justify-self: start; }
  body[data-tab=recent] #q { min-height: 48px; padding-left: 54px; border: 0; border-radius: 999px; background: var(--sf); font-size: 18px; }
  body[data-tab=recent] #q:not(:focus)::placeholder { color: transparent; }
  body[data-tab=recent] .sic { left: 19px; width: 22px; height: 22px; stroke: var(--mu); }
  body[data-tab=recent] .q-kbd { left: 52px; right: auto; border: 0; background: none; color: var(--mu); box-shadow: none; font: 500 18px/1 var(--sans); }
  body[data-tab=recent] .search:focus-within .q-kbd, body[data-tab=recent] .search:has(#q:not(:placeholder-shown)) .q-kbd { display: none; }
  body[data-tab=recent] .tools { margin-left: 58px; gap: 36px; }
  body[data-tab=recent] .tools > :is(#adultSw,#languageMenu,#themeMenu) { display: flex; }
  body[data-tab=recent] .tools :is(#trayFab,.settings-label) { display: none; }
  body[data-tab=recent] .tools .icon { width: 28px; height: 30px; padding: 0; border: 0; border-radius: 0; background: none; }
  body[data-tab=recent] .tools .icon svg { width: 26px; height: 26px; }
  body[data-tab=recent] #languageMenu summary > svg:not(.recent-language-icon) { display: none; }
  body[data-tab=recent] #languageMenu summary > .recent-language-icon { display: block; }
  body[data-tab=recent] #recentActions { margin-top: 12px; }
  body[data-tab=recent] .tools > :is(#languageMenu,#themeMenu) { padding-left: 36px; border-left: 1px solid var(--line2); }
  body[data-tab=recent] .asw { height: 42px; margin: 0; padding: 4px 7px 4px 14px; gap: 8px; border: 1px solid var(--line2); border-radius: 999px; font-size: 18px; }
  body[data-tab=recent] .asw b { order: -1; color: var(--mu); font-weight: 400; }
  body[data-tab=recent] .asw .trk { width: 42px; height: 26px; background: var(--line2); }
  body[data-tab=recent] .asw .kn { width: 20px; height: 20px; top: 3px; left: 3px; }
  body[data-tab=recent] .asw[aria-checked=true] .trk { background: var(--ac); }
  body[data-tab=recent] .asw[aria-checked=true] .kn { transform: translateX(16px); }
}
@media (min-width: 1280px) and (max-width: 1500px) {
  body[data-tab=recent] .tabs { margin-left: 40px; gap: 28px; }
  body[data-tab=recent] .shell-context { margin-left: 28px; padding-left: 28px; gap: 26px; }
  body[data-tab=recent] .tools { margin-left: 28px; gap: 24px; }
  body[data-tab=recent] .tools > :is(#languageMenu,#themeMenu) { padding-left: 24px; }
}
@media (min-width: 1280px) {
  html:not(:lang(zh-CN)) body[data-tab=recent] .tabs { margin-left: 32px; gap: 22px; }
  html:not(:lang(zh-CN)) body[data-tab=recent] .shell-context { margin-left: 24px; padding-left: 24px; gap: 24px; }
  html:not(:lang(zh-CN)) body[data-tab=recent] :is(.nav-trigger,.shell-context,#shellPage) { font-size: 16px; }
}
@media (max-width: 1279px) {
  body[data-tab=recent] { --gutter: 24px; }
  body[data-tab=recent] .gallery-heading { padding-top: 26px; padding-bottom: 28px; }
  body[data-tab=recent] .collection-head h1 { font-size: 34px; line-height: 46px; }
  body[data-tab=recent] #grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
  body[data-tab=recent] .card .info { padding-inline: 12px; gap: 6px; }
  .recent-info time, .recent-kind { font-size: 14px; }
  .recent-menu { margin-left: 0; }
}
@media (max-width: 767px) {
  body[data-tab=recent] { --gutter: 16px; }
  body[data-tab=recent] .gallery-heading { padding-top: 22px; padding-bottom: 24px; gap: 12px; }
  body[data-tab=recent] .collection-head h1 { font-size: 30px; line-height: 42px; }
  body[data-tab=recent] #clrRec { min-height: 38px; padding: 7px 11px; font-size: 13px; gap: 5px; }
  body[data-tab=recent] #grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 12px; }
  body[data-tab=recent] .card { border-radius: 12px; }
  body[data-tab=recent] .card .ph { border-radius: 11px 11px 0 0; }
  body[data-tab=recent] .card .info { grid-template-columns: minmax(0,1fr) 34px; gap: 2px 6px; min-height: 70px; padding: 8px 1px 8px 10px; }
  .recent-kind { gap: 5px; font-size: 13px; line-height: 22px; }
  .recent-kind svg { width: 16px; height: 16px; }
  .recent-info time { grid-area: 2 / 1; margin: 0; font-size: 11px; line-height: 18px; white-space: normal; }
  .recent-menu { grid-area: 1 / 2 / 3 / 3; }
  .recent-menu summary { width: 34px; height: 44px; }
  .recent-menu-panel { top: 46px; min-width: 170px; }
  body[data-tab=recent] .card:nth-child(2n+1) .recent-menu-panel { left: -100px; right: auto; }
  body[data-tab=recent] .card .try { display: none; }
}
@media (pointer: coarse) {
  .recent-menu-panel button { min-height: 44px; }
  body[data-tab=recent] .card .badge.age { opacity: 1; }
}
