:root {
  --bg: #ffffff;
  --fg: #1c1c1c;
  --muted: #8a8a8a;
  --line: #ececec;
  --soft: #f6f5f3;
  --accent: #1c1c1c;
  --heart: #d64545;
  --sans: "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gap: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 300 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--fg); font-size: 13px; letter-spacing: .08em; transition: background .2s, color .2s; }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn.ghost { border-color: var(--line); }
.btn.solid { background: var(--fg); color: var(--bg); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; transition: background .2s; }
.icon-btn:hover { background: var(--soft); }
@media (hover: none) { .btn:hover { background: none; color: inherit; } .btn.solid:hover { background: var(--fg); color: var(--bg); } .icon-btn:hover { background: none; } }

/* ---------- home ---------- */
.home-head { position: relative; text-align: center; padding: 28px 16px 8px; }
.home-head .tools { position: absolute; inset: 16px 16px auto 16px; display: flex; justify-content: space-between; }
.brand-logo { max-height: 110px; margin: 18px auto 6px; }
.brand-word { font: 400 44px/1.1 var(--serif); letter-spacing: .02em; margin: 26px 0 2px; }
.brand-sub { font-size: 11px; letter-spacing: .35em; color: var(--muted); }
.phone { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: #555; margin-top: 14px; direction: ltr; }
.search { max-width: 360px; margin: 12px auto 0; display: none; }
.search.open { display: block; }
.search input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 10px 4px; outline: none; text-align: center; background: transparent; }
.grid-home { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 28px; max-width: 1180px; margin: 40px auto 80px; padding: 0 16px; }
@media (max-width: 680px) { .grid-home { grid-template-columns: 1fr; gap: 32px; } .brand-word { font-size: 36px; } }
.card .ph { aspect-ratio: 3 / 2; background: var(--soft); overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .6s; opacity: 0; }
.card img.in { opacity: 1; }
.card:hover img { transform: scale(1.025); }
.card h3 { font-weight: 400; font-size: 16px; text-align: center; margin: 14px 0 0; }
.card time { display: block; text-align: center; font-size: 11px; letter-spacing: .18em; color: var(--muted); margin-top: 2px; }
.foot { text-align: center; font-size: 11px; letter-spacing: .25em; color: var(--muted); padding: 30px 0 40px; }
.empty { text-align: center; color: var(--muted); padding: 60px 16px; }

/* ---------- gallery hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 420px; overflow: hidden; background: #111; color: #fff; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 1.2s var(--ease), transform 2.4s var(--ease); }
.hero img.in { opacity: 1; transform: none; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%); }
.hero::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.75); z-index: 1; pointer-events: none; }
.hero .txt { position: absolute; inset: auto 0 9vh 0; text-align: center; z-index: 1; padding: 0 16px; }
.hero h1 { font-weight: 300; font-size: clamp(30px, 5vw, 54px); margin: 0; letter-spacing: .02em; }
.hero time { display: block; font-size: 12px; letter-spacing: .3em; margin: 6px 0 26px; opacity: .9; }
.hero .btn { border-color: rgba(255,255,255,.8); }
.hero .btn:hover { background: #fff; color: #111; }
.hero .by { position: absolute; top: 22px; inset-inline: 0; text-align: center; z-index: 1; font: 400 22px var(--serif); letter-spacing: .06em; }

/* ---------- gallery bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1600px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 60px; }
.bar .ttl { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.bar .ttl b { font-weight: 400; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .ttl a { font: 400 13px var(--serif); letter-spacing: .12em; color: var(--muted); }
.bar .ttl a:hover { color: var(--fg); }
.bar .acts { margin-inline-start: auto; display: flex; gap: 2px; align-items: center; }
.tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; padding: 0 16px; max-width: 1600px; margin: 0 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { white-space: nowrap; font-size: 14px; font-weight: 500; letter-spacing: .06em; color: #555; padding: 10px 0 12px; border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s; }
.tabs button.on { color: var(--fg); border-color: var(--fg); }
.tabs .lock { font-size: 11px; margin-inline-start: 4px; }

/* ---------- photo grid (justified rows) ---------- */
.photos { max-width: 1600px; margin: 10px auto 60px; padding: 0 10px; --g: 10px; }
.masonry { display: flex; gap: var(--g); align-items: flex-start; }
.masonry .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--g); }
@media (max-width: 699px) { .photos { padding: 0 6px; margin-top: 6px; --g: 6px; } }
.row { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.tile { position: relative; width: 100%; background: var(--soft); overflow: hidden; cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.tile img.in { opacity: 1; }
.tile .hov { position: absolute; inset: auto 0 0 0; display: flex; justify-content: flex-end; gap: 2px; padding: 6px; background: linear-gradient(to top, rgba(0,0,0,.35), transparent); opacity: 0; transition: opacity .2s; }
.tile:hover .hov, .tile .hov.keep { opacity: 1; }
.tile .hov button { color: #fff; width: 34px; height: 34px; display: grid; place-items: center; }
.tile .hov .icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.tile .fav-on { position: absolute; top: 8px; inset-inline-end: 8px; color: #fff; }
.tile.sel { outline: 3px solid var(--fg); outline-offset: -3px; }
.tile .chk { position: absolute; top: 8px; inset-inline-start: 8px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #fff; background: rgba(0,0,0,.2); display: none; }
.selecting .tile .chk { display: block; }
.tile.sel .chk { background: var(--fg); border-color: var(--fg); }
.tile.sel .chk::after { content: ""; position: absolute; inset: 5px 7px 7px 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); width: 9px; height: 5px; }
@media (hover: none) { .tile .hov { display: none; } }
.heart-on .icon { fill: var(--heart); stroke: var(--heart); }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 50; background: #fff; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity .25s; }
.lb.open { opacity: 1; pointer-events: auto; }
.lb-top { display: flex; align-items: center; gap: 4px; padding: 8px 10px; }
.lb-top .count { font-size: 12px; color: var(--muted); letter-spacing: .1em; margin-inline-end: auto; padding: 0 8px; direction: ltr; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; touch-action: pan-y; overflow: hidden; }
.lb-stage img { max-width: calc(100% - 32px); max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .25s; }
.lb-nav { position: absolute; top: 0; bottom: 0; width: 18%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.lb-nav:hover { color: var(--fg); }
.lb-prev { right: 0; } .lb-next { left: 0; }
@media (hover: none) { .lb-nav { display: none; } }
.lb-cap { text-align: center; font-size: 11px; color: var(--muted); padding: 8px; direction: ltr; }

/* ---------- sheets / dialogs ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 61; left: 50%; top: 50%; width: min(420px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow: auto; background: #fff; padding: 26px 24px 22px; transform: translate(-50%, -46%); opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--ease); box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.sheet.open { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
@media (max-width: 560px) {
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: 100%; transform: translateY(100%); padding-bottom: calc(22px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; }
  .sheet.open { transform: none; }
}
.sheet h2 { font-weight: 400; font-size: 19px; margin: 0 0 6px; }
.sheet p { color: #666; margin: 0 0 16px; font-size: 14px; }
.sheet input[type=text], .sheet input[type=email], .sheet input[type=password] { width: 100%; border: 1px solid var(--line); padding: 12px; outline: none; font-size: 16px; }
.sheet input:focus { border-color: var(--fg); }
.sheet .row-btns { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-start; }
.sheet .err { color: var(--heart); font-size: 13px; min-height: 20px; margin-top: 6px; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li button, .menu-list li a { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); text-align: start; }
.menu-list li:last-child button { border-bottom: 0; }
.menu-list small { color: var(--muted); margin-inline-start: auto; }
.list-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.chip { padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; }
.chip.on { border-color: var(--fg); background: var(--fg); color: #fff; }

/* selection bar */
.selbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--fg); color: #fff; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .3s var(--ease); }
.selbar.open { transform: none; }
.selbar .n { margin-inline-end: auto; font-size: 14px; }
.selbar .btn { border-color: rgba(255,255,255,.5); color: #fff; padding: 8px 14px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--fg); color: #fff; padding: 10px 18px; font-size: 13px; z-index: 80; opacity: 0; transition: opacity .2s, transform .3s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.nf { display: grid; place-items: center; height: 100vh; text-align: center; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
