:root {
    --ink: #1c1c1c;
    --paper: #faf6ee;
    --paper-dark: #f0e9d8;
    --accent: #a8323b;
    --border: #cfc4a8;
    --muted: #7a7266;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif; background: var(--paper); color: var(--ink); }

header.site-header {
    background: var(--ink);
    color: var(--paper);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header.site-header a.brand { color: var(--paper); text-decoration: none; font-size: 20px; font-weight: 700; }
header.site-header a.login-link { color: var(--paper); text-decoration: none; font-size: 14px; border: 1px solid var(--paper); padding: 6px 14px; border-radius: 4px; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }

.album-grid, .photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.tile { text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: block; }
.tile img { width: 100%; height: 160px; object-fit: cover; background: var(--paper-dark); }
.tile .tile-body { padding: 10px 12px; }
.tile h3 { margin: 0 0 4px; font-size: 15px; }
.tile .meta { font-size: 12px; color: var(--muted); }

.photo-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.photo-card img { width: 100%; height: 200px; object-fit: cover; cursor: zoom-in; }
.photo-card .body { padding: 10px 12px; }
.photo-card .likes { font-size: 13px; color: var(--accent); }

.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 6, 0.92);
    display: none;
    z-index: 1000;
}
.lightbox-backdrop.open { display: block; }

.lightbox-viewport {
    position: absolute;
    top: 60px;
    bottom: 90px;
    left: 70px;
    right: 70px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: auto;
    user-select: none;
}
.lightbox-img.zoomed {
    max-width: none;
    max-height: none;
    cursor: grab;
}

.lightbox-btn {
    position: absolute;
    background: rgba(255,255,255,0.12);
    color: var(--paper);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.25); }

.lightbox-close { top: 14px; right: 18px; }
.lightbox-prev { top: 50%; left: 14px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 14px; transform: translateY(-50%); }

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 70px;
    right: 70px;
    text-align: center;
    color: var(--paper);
    font-size: 14px;
}
.lightbox-caption .arrangement-name { font-weight: 700; font-size: 16px; }
.lightbox-caption .meta { color: #cfc4a8; font-size: 12px; margin-top: 2px; }

.lightbox-zoom-controls {
    position: absolute;
    bottom: 30px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 4px 10px;
}
.lightbox-zoom-controls .lightbox-btn {
    position: static;
    width: 32px;
    height: 32px;
    font-size: 18px;
}
.lightbox-zoom-level { color: var(--paper); font-size: 12px; min-width: 40px; text-align: center; }
