/* 途中：大图 / 网格两种看法，每张照片带拍摄信息。参考 photos.ana.sh 与 neelsaswade.com/photography */
.photos-page{width:min(1160px,calc(100% - 48px))}
.photos-head{margin-bottom:40px;max-width:540px}
.photos-head h1{margin-bottom:8px}
.photos-head p{color:var(--muted);margin:0}

.photo-bar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:14px;padding:12px 0;margin-bottom:28px;background:rgba(253,253,251,.94);backdrop-filter:blur(8px)}
.view-toggle{display:inline-flex;border:1px solid #dfe2dc;border-radius:7px;padding:2px;gap:2px;background:#fff}
.view-toggle button{width:34px;height:28px;border:0;border-radius:5px;background:transparent;color:#9aa096;display:grid;place-items:center;padding:0;transition:background .2s,color .2s}
.view-toggle button svg{width:17px;height:17px}
.view-toggle button:hover{color:var(--ink)}
.view-toggle button[aria-pressed=true]{background:#eef0eb;color:var(--ink)}
.photo-search{display:flex;align-items:center;gap:8px;color:#9aa096;flex:0 1 260px;padding:0 4px}
.photo-search svg{width:15px;height:15px;flex:none}
.photo-search input{border:0;background:transparent;outline:none;width:100%;font-size:13px;color:var(--ink);padding:6px 0}
.photo-search input::placeholder{color:#a9aea6}
.photo-search:focus-within{color:var(--ink)}
.photo-count{margin-left:auto;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}

/* feed view */
.photo-feed{display:grid;gap:72px}
.photo-entry{display:flex;gap:36px;align-items:flex-start;scroll-margin-top:80px}
.photo-frame{flex:0 1 auto;min-width:0;display:block;background:none;border:0;padding:0;cursor:zoom-in}
.photo-frame img,.photo-frame video{max-width:100%;max-height:min(84vh,980px);width:auto;height:auto;border-radius:2px;background:#eef0eb}
.photo-frame video{cursor:default}

.photo-info{flex:0 0 230px;position:sticky;top:76px;font:12px/1.75 ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,"PingFang SC","Microsoft YaHei",monospace;color:#73786f;letter-spacing:.02em}
.photo-info h2{font:inherit;font-weight:600;color:var(--ink);margin:0 0 6px;font-size:13px}
.photo-info dl{margin:0;display:grid;gap:2px}
.photo-info dl>div{display:flex;gap:8px;align-items:center}
.photo-info dt{display:flex;color:#a2a79f}
.photo-info dt svg{width:13px;height:13px}
.photo-info dd{margin:0;font-size:12px}
.photo-info .settings{margin-top:12px;display:flex;flex-wrap:wrap;gap:2px 12px;text-transform:uppercase}
.photo-info .date{margin-top:12px}
.photo-info .note{margin-top:14px;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;font-size:13px;line-height:1.85;color:var(--muted);letter-spacing:0}
.photo-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}
.photo-tags button{border:1px solid #e1e4de;background:#fff;border-radius:4px;font:inherit;font-size:11px;line-height:1;padding:5px 7px;color:#73786f}
.photo-tags button:hover{border-color:#b9bfb5;color:var(--ink)}
.photo-tags button::before{content:"#";color:#b4b9b0;margin-right:1px}

/* grid view */
.photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.photo-cell{position:relative;display:block;aspect-ratio:1;border:0;padding:0;background:#eef0eb;overflow:hidden;cursor:pointer}
.photo-cell img{width:100%;height:100%;object-fit:cover;transition:transform .6s cubic-bezier(.2,.7,.2,1),opacity .3s}
.photo-cell:hover img{transform:scale(1.03)}
.photo-cell .cell-badge{position:absolute;right:8px;top:8px;width:20px;height:20px;border-radius:50%;background:rgba(0,0,0,.35);color:#fff;display:grid;place-items:center;font-size:9px}
.photo-cell .cell-cap{position:absolute;left:0;right:0;bottom:0;padding:22px 10px 8px;font:11px/1.4 ui-monospace,"SF Mono",Menlo,"PingFang SC",monospace;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.42));opacity:0;transition:opacity .25s;text-align:left}
.photo-cell:hover .cell-cap,.photo-cell:focus-visible .cell-cap{opacity:1}

.photo-empty{padding:60px 0;color:var(--muted);font-size:13px}
.photo-empty button{border:0;background:none;padding:0;text-decoration:underline;text-underline-offset:4px;text-decoration-color:#c8cec5;color:var(--ink)}

@media(max-width:760px){
  .photo-entry{flex-direction:column;gap:14px}
  .photo-info{flex-basis:auto}
  .photo-frame{width:100%}
  .photo-info{position:static}
  .photo-info .settings,.photo-info .date{margin-top:6px}
  .photo-frame img,.photo-frame video{max-height:none;width:100%}
  .photo-feed{gap:52px}
  .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .photo-search{flex:1 1 auto}
  .photo-count{display:none}
}
