:root {
  --paper: #f8f5f2;
  --paper-2: #efe7df;
  --ink: #2c2825;
  --muted: #847872;
  --line: rgba(44, 40, 37, .13);
  --accent: #a66f55;
  --charcoal: #181615;
  font-family: "Songti SC", "Noto Serif SC", serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 34px; border-bottom: 1px solid var(--line); background: rgba(248,245,242,.88); backdrop-filter: blur(18px);
}
.brand { font-size: 22px; letter-spacing: .08em; }
.nav { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--muted); }
.nav a.active { color: var(--ink); }
.hero {
  min-height: 78vh; display: flex; align-items: flex-end; padding: 8vw; color: white; background: var(--charcoal) center/cover no-repeat; position: relative;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(15deg, rgba(0,0,0,.65), rgba(0,0,0,.16)); }
.hero > div { position: relative; max-width: 760px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; }
.hero .eyebrow { color: rgba(255,255,255,.78); }
h1 { font-size: clamp(36px, 7vw, 92px); line-height: 1.04; font-weight: 400; margin: 12px 0 22px; letter-spacing: 0; }
h2 { font-size: clamp(28px, 4vw, 54px); line-height: 1.1; font-weight: 400; margin: 8px 0 20px; }
.section { max-width: 1220px; margin: 0 auto; padding: 86px 24px; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 28px; }
.section-head p { max-width: 460px; color: var(--muted); line-height: 1.8; }
.btn, .primary {
  border: 1px solid var(--ink); background: var(--ink); color: white; min-height: 42px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--ink); }
.grid { columns: 3 260px; column-gap: 18px; }
.work-card {
  width: 100%; break-inside: avoid; margin: 0 0 18px; border: 0; padding: 0 0 15px; text-align: left; background: white; border-radius: 8px; overflow: hidden; cursor: pointer; box-shadow: 0 12px 38px rgba(44,40,37,.06);
}
.work-card img { width: 100%; display: block; background: var(--paper-2); }
.work-card strong { display: block; padding: 8px 14px 0; line-height: 1.45; font-weight: 500; }
.meta { display: block; padding: 14px 14px 0; color: var(--muted); font-size: 12px; }
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.package, .panel { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.package ul { padding-left: 1.2em; line-height: 1.9; color: var(--muted); }
.form { display: grid; gap: 14px; max-width: 620px; }
.form input, .form textarea, .form select {
  width: 100%; border: 1px solid var(--line); background: white; border-radius: 6px; padding: 13px 14px; color: var(--ink);
}
.form textarea { min-height: 120px; resize: vertical; }
.detail { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.detail-bg { position: absolute; inset: 0; border: 0; background: rgba(18,16,15,.68); }
.detail-card { position: relative; background: var(--paper); width: min(1120px, 100%); max-height: calc(100vh - 48px); display: grid; grid-template-columns: minmax(0, 1fr) 360px; border-radius: 8px; overflow: hidden; }
.detail-img { background: #111; height: min(620px, calc(100vh - 48px)); min-height: 520px; display: grid; place-items: center; position: relative; overflow: hidden; touch-action: pan-y; user-select: none; }
.detail-img img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.detail-side { padding: 32px; overflow: auto; }
.close { float: right; border: 0; background: none; font-size: 30px; cursor: pointer; }
.gallery-nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(0,0,0,.42); color: white; font-size: 34px; line-height: 1; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(12px); }
.gallery-nav.prev { left: 18px; }
.gallery-nav.next { right: 18px; }
.gallery-count { position: absolute; z-index: 2; right: 18px; bottom: 16px; min-width: 64px; border-radius: 999px; background: rgba(0,0,0,.52); color: white; font-size: 13px; text-align: center; padding: 7px 10px; backdrop-filter: blur(12px); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; margin: 20px 0; padding-bottom: 8px; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.thumbs button { flex: 0 0 auto; width: 58px; height: 76px; border: 2px solid transparent; border-radius: 4px; padding: 0; background: none; cursor: pointer; scroll-snap-align: center; }
.thumbs button.active { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 65px); }
.admin aside { background: var(--charcoal); color: white; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.admin main { padding: 30px; }
.row { display: grid; grid-template-columns: 68px minmax(180px, 1fr) repeat(5, auto); gap: 12px; align-items: center; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.row img { width: 54px; height: 72px; object-fit: cover; border-radius: 4px; }
.row button { border: 1px solid var(--line); border-radius: 999px; background: white; min-height: 34px; padding: 0 12px; cursor: pointer; }
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 24px 0; }
.stat { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.stat b { font-size: 32px; font-weight: 400; }
.notice { color: var(--accent); line-height: 1.8; }
.footer { text-align: center; padding: 42px; color: var(--muted); }
@media (max-width: 840px) {
  .topbar { padding: 14px 18px; align-items: flex-start; gap: 12px; }
  .nav { flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
  .section { padding: 58px 18px; }
  .section-head { display: block; }
  .detail { padding: 0; }
  .detail-card { grid-template-columns: 1fr; grid-template-rows: 58vh minmax(0, 42vh); max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .detail-img { height: 58vh; min-height: 0; }
  .detail-side { padding: 18px; overflow: auto; }
  .gallery-nav { width: 42px; height: 42px; font-size: 30px; }
  .gallery-nav.prev { left: 12px; }
  .gallery-nav.next { right: 12px; }
  .gallery-count { right: 12px; bottom: 12px; }
  .thumbs { margin: 14px 0 18px; }
  .thumbs button { width: 64px; height: 82px; }
  .admin { grid-template-columns: 1fr; }
  .admin aside { flex-direction: row; overflow: auto; }
  .row { grid-template-columns: 1fr; }
  .row img { width: 100%; height: auto; max-height: 260px; }
}
