/*
 * 忍びの密書 web site. Same palette as the app (src/styles.css): the top page is the night courtyard,
 * the policy and support pages are cream washi paper, like the app's sheets.
 */
:root {
  --night: #121829;
  --night-2: #1b2340;
  --night-3: #262f52;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-line: rgba(255, 255, 255, 0.14);
  --moon: #f6e7b8;
  --text: #f2ead6;
  --text-2: #c2b9a3;
  --text-3: #8d8676;
  --desk: #f1eadc;
  --card: #fbf7ee;
  --ink: #24211d;
  --ink-2: #57504a;
  --muted: #8f867b;
  --line: #d9cfbf;
  --ai: #3d64ad;
  --shu: #cf5236;
  --gold: #e0b44c;
  --gold-d: #9a7420;
  --accent: #c0442c;
  --accent-d: #7f2a19;
  --mincho: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', 'Noto Serif CJK JP', serif;
  --sans: system-ui, -apple-system, 'Hiragino Sans', 'Noto Sans JP', 'Noto Sans CJK JP', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 16px/1.8 var(--sans);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------------------------------ night (top page) */
body.night {
  background: radial-gradient(120% 60% at 50% 0%, #2a3563 0%, var(--night-2) 40%, var(--night) 100%) fixed var(--night);
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.topbar nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--text-2);
}

.topbar nav a {
  text-decoration: none;
}

.topbar nav a:hover {
  color: var(--moon);
}

/* hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding: 40px 0 72px;
}

.hero::before {
  /* the moon */
  content: '';
  position: absolute;
  top: -10px;
  right: 6%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff6d6, var(--moon) 60%, #e9d394);
  box-shadow: 0 0 60px 20px rgba(246, 231, 184, 0.25);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.2em;
}

.hero h1 {
  margin: 0;
  font-family: var(--mincho);
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1.15;
  letter-spacing: 0.06em;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.catch span {
  display: inline-block;
}

.catch {
  margin: 18px 0 0;
  font-family: var(--mincho);
  font-size: clamp(19px, 2.6vw, 24px);
  color: var(--moon);
}

.lead {
  margin: 18px 0 0;
  color: var(--text-2);
  max-width: 34em;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 176px;
  padding: 10px 20px;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  text-decoration: none;
  line-height: 1.3;
}

.store small {
  color: var(--text-3);
  font-size: 12px;
}

.store b {
  font-size: 18px;
}

.store[href]:not([href='']):hover {
  border-color: var(--gold);
}

.store.soon {
  cursor: default;
}

.store.soon small {
  font-size: 0;
}

.store.soon small::after {
  content: '近日公開';
  font-size: 12px;
  color: var(--gold);
}

.note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.phone {
  justify-self: center;
  width: min(300px, 78vw);
  padding: 10px;
  border-radius: 44px;
  background: linear-gradient(160deg, #3a3f55, #14161f);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.phone img {
  border-radius: 34px;
  aspect-ratio: 585 / 1266;
  width: 100%;
  height: auto;
}

/* sections */
section.band {
  padding: 72px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.band h2 {
  margin: 0 0 8px;
  font-family: var(--mincho);
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: 0.08em;
}

.band .sub {
  margin: 0 0 36px;
  color: var(--text-2);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  padding: 24px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
}

.card h3 {
  margin: 14px 0 6px;
  font-size: 19px;
}

.card p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

/* the lacquered seal used for 門・密・囮 and the arts */
.seal {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 24px;
  color: #2a1d05;
  background: linear-gradient(160deg, #f0cd72, var(--gold) 55%, #b88a2c);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.seal.ai {
  color: #fff;
  background: linear-gradient(160deg, #6a8fd4, var(--ai) 55%, #22396b);
}

.seal.shu {
  color: #fff;
  background: linear-gradient(160deg, #ee7e62, var(--shu) 55%, #82291a);
}

.seal.paper {
  color: var(--ink);
  background: linear-gradient(160deg, #fffaf0, #e9e0cf);
}

/* the three ways to win */
.wins {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: win;
}

.win {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: linear-gradient(170deg, rgba(224, 180, 76, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(224, 180, 76, 0.35);
}

.win::before {
  counter-increment: win;
  content: counter(win, cjk-ideographic);
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--mincho);
  color: var(--gold);
  opacity: 0.55;
  font-size: 22px;
}

.win h3 {
  margin: 14px 0 6px;
  font-size: 19px;
}

.win p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

/* arts */
.arts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.art {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 22px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
}

.art h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.art h3 small {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--gold);
}

.art p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

/* screenshots */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shots figure {
  margin: 0;
}

.shots img {
  width: 100%;
  height: auto;
  aspect-ratio: 585 / 1266;
  border-radius: 26px;
  border: 1px solid var(--glass-line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.shots figcaption {
  margin-top: 14px;
  text-align: center;
  color: var(--text-2);
  font-size: 15px;
}

/* modes */
.modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.mode {
  padding: 26px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
}

.mode h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.mode ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--text-2);
  font-size: 15px;
}

.levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.levels li {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: var(--text);
}

.levels li span {
  color: var(--gold);
  margin-right: 4px;
}

/* price */
.price {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.price .card b {
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

/* closing call */
.closing {
  text-align: center;
}

.closing .stores {
  justify-content: center;
}

/* footer (both themes) */
.site-foot {
  padding: 36px 0 48px;
  font-size: 14px;
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

body.night .site-foot {
  color: var(--text-3);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ------------------------------------------------------------------ paper (policy, support) */
body.paper {
  background: var(--desk);
  color: var(--ink);
}

.paper-head {
  background: var(--night);
  color: var(--text);
}

.paper-head .topbar nav {
  color: var(--text-2);
}

.doc {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 36px 40px 48px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.doc h1 {
  margin: 0 0 6px;
  font-family: var(--mincho);
  font-size: 30px;
  letter-spacing: 0.06em;
}

.doc h2 {
  margin: 36px 0 8px;
  font-size: 19px;
  color: var(--accent-d);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.doc h3 {
  margin: 22px 0 4px;
  font-size: 16px;
}

.doc p,
.doc li {
  color: var(--ink-2);
}

.doc a {
  color: var(--accent);
}

.doc .meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.doc ul {
  padding-left: 1.3em;
}

.table-scroll {
  overflow-x: auto;
  margin: 12px 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.doc th {
  background: var(--desk);
  color: var(--ink);
  white-space: nowrap;
}

.doc .todo {
  background: #fff1c2;
  border-radius: 4px;
  padding: 0 4px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 10px 0;
  background: #fff;
}

.faq summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--ink);
}

.faq details > div {
  padding: 0 16px 6px;
}

.contact {
  margin-top: 12px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--desk);
}

body.paper .site-foot {
  color: var(--muted);
}

/* ------------------------------------------------------------------ narrow screens */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 24px;
  }
  .hero::before {
    top: -34px;
    right: -18px;
    width: 88px;
    height: 88px;
  }
  .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .stores {
    justify-content: center;
  }
  .cards,
  .wins,
  .price {
    grid-template-columns: 1fr;
  }
  .arts,
  .modes {
    grid-template-columns: 1fr;
  }
  .shots {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }
  .shots li {
    scroll-snap-align: center;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }
  .topbar nav {
    display: none;
  }
  section.band {
    padding: 56px 0;
  }
  .doc {
    margin-top: 16px;
    padding: 24px 18px 32px;
    border-radius: 14px;
  }
  .doc h1 {
    font-size: 25px;
  }
  .store {
    min-width: 0;
    flex: 1 1 150px;
  }
}
