:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --ink-rgb: 26 26 26;
  --forest: #0A5C41;
  --orange: #F07A3C;
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Quicksand", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font-sans); overflow: hidden; }

.back-home {
  position: fixed; top: 18px; left: 18px; z-index: 100;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--forest); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 11px 20px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.18);
  transition: transform .2s;
}
.back-home:hover { transform: translateX(-3px); }
.lang-pill {
  position: fixed; top: 18px; right: 18px; z-index: 100;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: #fff; color: var(--ink); font: 700 14px var(--font-sans);
  padding: 10px 16px; border-radius: 999px; border: 1px solid rgb(var(--ink-rgb) / .15); box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

#stage {
  position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(0,0,0,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  user-select: none; -webkit-user-select: none; touch-action: none;
  cursor: crosshair;
}
#wall { position: absolute; inset: 0; }

.cell {
  position: absolute; top: 0; left: 0;
  border-radius: 4px; overflow: hidden; background: #ececec;
  will-change: transform, opacity; opacity: 0;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,.35);
  pointer-events: none;
}
.cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

#vignette {
  position: absolute; inset: 0; z-index: 14; pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 0% 100%,
    rgb(255 255 255 / 1) 0%, rgb(255 255 255 / .85) 24%, rgb(255 255 255 / .5) 44%, transparent 76%);
}

/* ---------- title block ---------- */
#titleblock { position: absolute; left: 28px; bottom: 28px; z-index: 35; max-width: 30rem; pointer-events: none; transition: opacity .4s; }
#titleblock.hidden { opacity: 0; }
.eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0;
  font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: rgb(var(--ink-rgb) / .65);
  animation: rise .9s .2s both cubic-bezier(.2,.8,.2,1);
}
.eyebrow .rule { width: 32px; height: 1px; background: rgb(var(--ink-rgb) / .45); }
.title {
  margin: 12px 0 0; font-family: var(--font-display); font-weight: 500; font-variation-settings: "SOFT" 100;
  font-size: clamp(2.4rem, 6vw, 4rem); line-height: .95; letter-spacing: -.02em;
}
.title .char { display: inline-block; white-space: pre; animation: charIn .9s both cubic-bezier(.2,.8,.2,1); }
.title .accent { color: var(--forest); }
.subtitle { margin: 14px 0 0; font-size: 13.5px; line-height: 1.6; color: rgb(var(--ink-rgb) / .62); max-width: 22rem; animation: rise .9s 1s both cubic-bezier(.2,.8,.2,1); }
@keyframes charIn { from { opacity: 0; transform: translateY(22px) scale(.8); filter: blur(10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } }

#hint, #counter {
  position: absolute; z-index: 40; margin: 0; pointer-events: none;
  font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: rgb(var(--ink-rgb) / .55);
}
#hint, #counter { background: rgb(255 255 255 / .9); padding: 8px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
#hint { top: 74px; right: 22px; transition: opacity .7s; }
#counter { right: 22px; bottom: 22px; }
#counter b { color: var(--forest); font-size: 13px; }

/* ---------- featured card ---------- */
#backdrop { position: absolute; inset: 0; z-index: 20; display: none; background: rgb(255 255 255 / .6); backdrop-filter: blur(2px); }
#backdrop.show { display: block; }
#featured { position: absolute; left: 0; top: 0; z-index: 30; pointer-events: none; opacity: 0; will-change: transform, opacity; }

.fcard { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; transition: width .35s cubic-bezier(.16,1,.3,1), height .35s cubic-bezier(.16,1,.3,1); }
.fcard-media {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 8px; background: #111; cursor: pointer;
  box-shadow: 0 30px 70px -15px rgba(0,0,0,.6);
}
.expanded .fcard-media { cursor: zoom-in; background: #fff; }
.fcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fcard-caption {
  position: absolute; inset: auto 0 0 0; padding: 14px 70px 14px 14px; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.35) 55%, transparent);
}
.fcard-caption .cat { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; opacity: .8; }
.fcard-caption .ttl { margin-top: 4px; font-family: var(--font-display); font-size: 18px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard-caption .score { position: absolute; right: 12px; bottom: 12px; background: var(--orange); color: #fff; font-weight: 700; font-size: 14px; padding: 4px 10px; border-radius: 999px; }

.fc-top { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 16px; text-align: center; white-space: nowrap; }
.fc-nav { display: flex; justify-content: center; gap: 10px; margin-bottom: 8px; }
.fc-cat { font-size: 10px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: rgb(var(--ink-rgb) / .7); }
.fc-title { margin-top: 4px; font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.1; }
.fc-bottom { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 16px; width: min(460px, 92vw); text-align: center; }
.fc-meta { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: rgb(var(--ink-rgb) / .6); }
.fc-scores { display: flex; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.fc-scores span { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #f2efe8; }
.fc-scores span.total { background: var(--forest); color: #fff; }
.fc-desc { margin: 10px auto 0; font-size: 14px; line-height: 1.6; color: rgb(var(--ink-rgb) / .78); }
.fc-actions { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.fc-actions a {
  text-decoration: none; font-weight: 700; font-size: 14px; padding: 12px 24px; border-radius: 999px; white-space: nowrap; transition: transform .15s;
}
.fc-actions a:hover { transform: translateY(-2px); }
.fc-order { background: var(--orange); color: #fff; border: 2px solid #1b1b1b; box-shadow: 3px 3px 0 #1b1b1b; }
.fc-inquire { background: #fff; color: var(--ink); border: 2px solid rgb(var(--ink-rgb) / .2); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgb(var(--ink-rgb) / .15);
  background: rgb(255 255 255 / .9); color: var(--ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.08); transition: transform .15s, background .15s;
}
.icon-btn:hover { transform: scale(1.08); background: #fff; }
.fc-close { position: absolute; top: -12px; right: -12px; z-index: 2; }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; font-weight: 700; }

@media (max-width: 767px) {
  .subtitle { display: none; }
  #titleblock { left: 18px; bottom: 18px; }
  #hint { top: 78px; right: 18px; }
  #hint { top: 118px; right: 18px; font-size: 10px; }
  #counter { top: 74px; right: 18px; bottom: auto; font-size: 10px; }
  .fc-desc { display: none; }
  .fc-actions a { padding: 10px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .title .char, .eyebrow, .subtitle { animation: none; }
}
