:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --ink: #15171c;
  --muted: #6a6e77;
  --line: #dddbd4;
  --accent: #23515f;
  --display: "Inter Tight", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}

:lang(ko) { --text: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; }
:lang(zh-Hans) { --text: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
}

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 244, 240, 0.9);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark span { font-weight: 400; color: var(--muted); }

.nav { display: flex; gap: 24px; margin-right: auto; }
.nav a {
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}
.nav a:hover { color: var(--ink); }

.lang { display: flex; gap: 2px; }
.lang button {
  font: inherit;
  font-size: 0.75rem;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- intro ---------- */
.intro { padding-top: clamp(72px, 12vw, 140px); padding-bottom: clamp(56px, 8vw, 96px); }
.eyebrow {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 24px;
}
.intro-mark {
  font-family: var(--display);
  font-size: clamp(3.2rem, 11vw, 7.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 40px;
}
.intro-mark span { font-weight: 400; color: var(--muted); }

.now {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.now:hover { border-color: var(--ink); }
.now-label {
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.now-title { font-weight: 500; }
.now-arrow { color: var(--muted); }

/* ---------- sections ---------- */
.section { padding-top: clamp(64px, 9vw, 112px); padding-bottom: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 40px; }
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-head p { margin: 0; color: var(--muted); font-size: 0.875rem; }

/* ---------- work ---------- */
.work {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.work-key { margin: 0; background: #0b0e16; }
.work-key img { width: 100%; height: 100%; aspect-ratio: 728 / 1080; object-fit: cover; }

.work-body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: clamp(24px, 4vw, 48px);
}
.tag {
  display: inline-block;
  margin: 0 0 16px;
  padding: 2px 10px;
  font-size: 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
}
.work-title { font-size: 2rem; font-weight: 600; margin: 0 0 32px; line-height: 1.3; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.875rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border: 1px solid var(--ink);
}
.btn-ghost { background: none; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn.is-disabled { background: none; color: var(--muted); border-color: var(--line); cursor: default; }
.btn-dl:hover { background: var(--accent); border-color: var(--accent); }
.dl-note { margin: 12px 0 0; font-size: 0.75rem; color: var(--muted); }

.spec { margin: 0; font-size: 0.875rem; }
.spec div {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.spec div:first-child { border-top: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }

/* ---------- update log / bug report (below the work) ---------- */
.work-more {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(24px, 4vw, 40px);
}
.panel-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 20px; line-height: 1.4; }
.panel-lead { margin: -8px 0 24px; font-size: 0.875rem; color: var(--muted); }

.log { list-style: none; margin: 0; padding: 0; }
.log > li { padding: 14px 0; border-top: 1px solid var(--line); }
.log > li:last-child { border-bottom: 1px solid var(--line); }
.log-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
}
.log-ver { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.log-new {
  font-family: var(--text);
  font-size: 0.7rem;
  line-height: 1.6;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.log ul { margin: 0; padding-left: 1.2em; font-size: 0.875rem; }
.log ul li { margin: 2px 0; }

.report-form { display: none; gap: 16px; }
.js .report-form { display: grid; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; font-size: 0.8rem; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 12px;
}
.field textarea { resize: vertical; min-height: 9em; line-height: 1.7; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
  background: var(--surface);
}
.field ::placeholder { color: #a3a6ad; }
.field-hint { font-size: 0.72rem; line-height: 1.5; }
.req { font-style: normal; font-size: 0.7rem; color: var(--accent); margin-left: 8px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.report-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.report-foot .btn { font: inherit; font-size: 0.875rem; cursor: pointer; }
.report-foot .btn:hover { background: var(--accent); border-color: var(--accent); }
.report-foot .btn:disabled { opacity: 0.5; cursor: default; }
.report-status { margin: 0; font-size: 0.85rem; }
.report-status[data-kind="ok"] { color: var(--accent); }
.report-status[data-kind="error"] { color: #a33a2a; }
.report-note { margin: 0; font-size: 0.75rem; color: var(--muted); }

/* ---------- report page (report.html) ---------- */
.report-page { max-width: 860px; border-top: 0; padding-top: clamp(40px, 6vw, 72px); }
.back { margin: 0 0 32px; font-size: 0.875rem; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--ink); }


/* ---------- studio ---------- */
.studio-text { margin: 0; max-width: 40em; }

/* ---------- company ---------- */
.table { margin: 0; max-width: 820px; }
.table div {
  display: grid;
  grid-template-columns: 10em 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.table div:first-child { border-top: 1px solid var(--line); }
.table dt { color: var(--muted); font-size: 0.9rem; }
.table dd { margin: 0; }

/* ---------- contact ---------- */
.contact-text { margin: 0 0 24px; color: var(--muted); }
.mail {
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  word-break: break-all;
}
.mail:hover { color: var(--accent); border-color: var(--accent); }

.social { margin: 32px 0 0; }
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: border-color 0.15s;
}
.social a:hover { border-color: var(--ink); }
.social svg { width: 16px; height: 16px; fill: currentColor; }
.social:not(:has(a[href^="http"])) { display: none; }

/* ---------- footer ---------- */
.footer { padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--line); }
.footer p { margin: 0; font-size: 0.8rem; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .work { grid-template-columns: 1fr; }
  .work-key img { max-height: 70vh; object-position: 50% 30%; }
  .work-more { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .header-inner { gap: 12px; }
  .lang button { padding: 4px 6px; }
  .spec div, .table div { grid-template-columns: 1fr; gap: 2px; }
  .field-row { grid-template-columns: 1fr; }
}
