:root {
  --ink: #241a1c; --wall: #2c2122; --wall-2: #3a2c2c; --brick: #4d3a36;
  --ember: #c2401c; --fire: #f07a24; --flame: #ffc04a; --spark: #fff2b0;
  --cream: #fff8ec; --paper: #e9d3a8; --paper-2: #cdb086; --wood: #8a5530;
  --night: #151827; --dusk: #1d2235; --dusk-2: #283048;
  --wrap: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--wall); color: var(--cream);
  font-family: var(--body); font-size: 17px; line-height: 1.7;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--flame); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
h1, h2, figcaption, .tagline, .brand span { font-family: var(--display); font-weight: var(--dw); }
.forge, .rack img, .smith { image-rendering: pixelated; }

html[lang="ko"] body { word-break: keep-all; overflow-wrap: break-word; }
html[lang="ja"] body, html[lang^="zh"] body { line-break: strict; }
html[lang="ja"] h1, html[lang="ja"] h2 { word-break: auto-phrase; }
body { overflow-wrap: break-word; }

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; background: rgba(36, 26, 28, .9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 8px; box-shadow: 0 0 0 2px var(--ink); flex: none; }
.brand span { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.langpick { position: relative; font-size: .85rem; flex: none; }
.langpick summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 6px; line-height: 1.3;
  border: 2px solid rgba(255, 248, 236, .35); color: var(--cream);
}
.langpick summary span { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.langpick summary::-webkit-details-marker { display: none; }
.langpick[open] summary { background: var(--flame); color: var(--ink); border-color: var(--flame); }
.langpick ul {
  position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  min-width: 13em; max-height: 70vh; overflow: auto; border-radius: 6px;
  background: var(--paper); color: var(--ink); box-shadow: 0 0 0 4px var(--ink), 0 18px 40px rgba(0, 0, 0, .5);
}
.langpick li a, .langpick li span { display: block; padding: 6px 12px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.langpick li a:hover { background: var(--paper-2); }
.langpick li [aria-current] { background: var(--flame); font-weight: 700; }

.hero {
  position: relative; overflow: hidden; padding: 52px 0 0;
  background:
    radial-gradient(70% 60% at 78% 70%, rgba(240, 122, 36, .16), transparent 70%),
    linear-gradient(var(--wall), var(--wall-2));
}
.hero .wrap { position: relative; display: grid; gap: 30px; align-items: center; padding-bottom: 60px; }
.copy { position: relative; z-index: 2; }
.hero h1 {
  margin: 0 0 6px; font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 1.08; letter-spacing: -.01em;
  color: var(--flame); text-shadow: 0 4px 0 var(--ember), 0 8px 0 var(--ink), 0 14px 30px rgba(0, 0, 0, .5);
}
.tagline { margin: 18px 0 10px; font-size: clamp(1.15rem, 2.5vw, 1.6rem); line-height: 1.35; color: var(--cream); }
.lead { margin: 0 0 26px; max-width: 34em; font-size: 1.06rem; color: var(--cream); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stores a { display: inline-block; border-radius: 10px; transition: transform .2s; }
.stores a:hover { transform: translateY(-3px); }
.stores img { display: block; height: 52px; width: auto; }
.stores > img { box-sizing: content-box; }

.stage { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 520px; padding: 0 0 10px; }
.forge {
  position: absolute; left: calc(50% - 250px); bottom: 0; width: 360px; height: 640px; max-width: none;
  box-shadow: 0 0 0 4px var(--ink), 0 30px 60px rgba(0, 0, 0, .5);
}
.sparks {
  position: absolute; left: calc(50% - 250px); bottom: 120px; width: 120px; height: 200px; pointer-events: none;
  background-image:
    radial-gradient(3px 3px at 20px 160px, var(--spark) 60%, transparent 61%),
    radial-gradient(2px 2px at 70px 120px, var(--flame) 60%, transparent 61%),
    radial-gradient(3px 3px at 100px 180px, var(--flame) 60%, transparent 61%),
    radial-gradient(2px 2px at 45px 80px, var(--spark) 60%, transparent 61%);
  animation: rise 2.8s linear infinite;
}
.phone {
  position: relative; z-index: 2; border-radius: 30px; overflow: hidden; background: var(--ink);
  border: 6px solid var(--cream); box-shadow: 0 0 0 4px var(--ink), 0 24px 60px rgba(0, 0, 0, .6), 0 0 80px rgba(240, 122, 36, .2);
}
.phone video, .phone img { display: block; width: 100%; height: auto; }
.stage .phone { width: min(270px, 62vw); margin-left: 120px; transform: rotate(2deg); }

.shelf { background: var(--wall-2); padding: 34px 0 56px; text-align: center; border-top: 4px solid var(--ink); }
.rack {
  display: grid; grid-template-columns: repeat(5, 64px); justify-content: center; gap: 4px 8px;
  padding: 10px 6px 16px; margin: 0 auto; width: max-content;
  border-bottom: 10px solid var(--wood); box-shadow: 0 4px 0 var(--ink);
}
.rack img { width: 64px; height: 64px; animation: glint 4s ease-in-out infinite; animation-delay: calc(var(--i) * .25s); }
.intro { max-width: 46em; margin-top: 22px; font-size: 1.12rem; }
.intro p { margin: .55em 0; }

.gallery { padding: 64px 0 70px; background: linear-gradient(var(--wall), var(--ink)); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(64vw, 250px); gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 22px 22px; scrollbar-width: thin;
}
.rail figure { margin: 0; scroll-snap-align: center; }
.rail figcaption {
  min-height: 3.1em; margin-bottom: 14px; text-align: center; font-size: 1.12rem; line-height: 1.3; color: var(--flame);
}
.rail .phone { border-radius: 22px; border-width: 5px; }
.rail figure:nth-child(odd) .phone { transform: rotate(-1.4deg); }
.rail figure:nth-child(even) .phone { transform: rotate(1.4deg) translateY(10px); }

.features { position: relative; padding: 70px 0 80px; background: var(--wall); }
.grid { position: relative; display: grid; gap: 22px; }
.card {
  background: var(--paper); color: var(--ink); border-radius: 4px; padding: 22px 24px 16px;
  border-top: 10px solid var(--c, var(--ember)); box-shadow: 0 0 0 4px var(--ink), 6px 6px 0 4px rgba(0, 0, 0, .35);
}
.card:nth-child(4n+2) { --c: var(--fire); } .card:nth-child(4n+3) { --c: var(--wood); } .card:nth-child(4n) { --c: var(--dusk-2); }
.card h2 { margin: 0 0 10px; font-size: clamp(1.2rem, 2.3vw, 1.5rem); line-height: 1.3; color: var(--ink); }
.card p { margin: .45em 0; }
.card ul { margin: .5em 0; padding: 0; list-style: none; }
.card li { position: relative; padding-left: 24px; margin: .35em 0; }
.card li::before {
  content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px;
  background: var(--fire); box-shadow: 0 0 0 2px var(--ink); transform: rotate(45deg);
}

.close {
  position: relative; text-align: center; padding: 70px 0 60px; border-top: 4px solid var(--ink);
  background: linear-gradient(var(--dusk-2), var(--dusk) 40%, var(--night));
}
.close .wrap { max-width: 44em; }
.duo { display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.smith { width: 128px; height: 128px; }
.app-icon { width: 112px; height: 112px; border-radius: 24px; box-shadow: 0 0 0 4px var(--ink), 0 0 60px rgba(255, 192, 74, .3); margin-bottom: 8px; }
.close h2 { margin: 18px 0 10px; font-size: clamp(2rem, 5vw, 3rem); color: var(--flame); text-shadow: 0 3px 0 var(--ember), 0 6px 0 var(--ink); }
.close p { font-size: 1.08rem; margin: .5em 0; }
.close .stores { justify-content: center; margin: 26px 0 0; }

footer { padding: 26px 22px 40px; text-align: center; font-size: .9rem; color: var(--cream); background: var(--night); }
footer a { color: var(--cream); }
.foot-langs { margin-top: 12px; line-height: 2; opacity: .85; }
.foot-langs [aria-current] { color: var(--flame); font-weight: 700; }

@media (min-width: 760px) {
  .grid { display: block; columns: 2; column-gap: 26px; }
  .card { break-inside: avoid; margin-bottom: 26px; }
  .rack { grid-template-columns: repeat(10, 64px); }
}
@media (min-width: 920px) {
  .hero { padding-top: 64px; }
  .hero .wrap { grid-template-columns: 1.1fr .9fr; padding-bottom: 70px; }
  .stage { min-height: 600px; }
  .stage .phone { width: 280px; }
}
@media (min-width: 1100px) {
  .rail { display: flex; flex-wrap: wrap; justify-content: center; gap: 46px 26px; overflow: visible;
          max-width: 1060px; margin: 0 auto; }
  .rail figure { width: 230px; }
  .rack { grid-template-columns: repeat(10, 96px); gap: 4px 6px; }
  .rack img { width: 96px; height: 96px; }
}
@media (max-width: 919px) {
  .hero .copy { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .stores { justify-content: center; }
}
@media (max-width: 520px) {
  .stage { min-height: 450px; }
  .forge { left: calc(50% - 170px); width: 180px; height: 320px; bottom: 60px; }
  .sparks { left: calc(50% - 170px); bottom: 100px; width: 90px; height: 140px; }
  .stage .phone { width: min(230px, 58vw); margin-left: 90px; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .stores img { height: 44px; }
  .brand span { max-width: 46vw; }
}

@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-120px); opacity: 0; } }
@keyframes glint { 0%, 80%, 100% { transform: translateY(0); filter: none; } 88% { transform: translateY(-6px); filter: brightness(1.35); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
