/* (thinking) のホームページの見た目。アプリの世界観（紙の地・Instrument Serif・暗号の字・銀色の UFO）に合わせる */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Thinking Cipher";
  src: url("../fonts/ThinkingCipher-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --paper: #F6F1E7;
  --paper-deep: #EEE8DC;
  --card: #FFFFFF;
  --ink: #423E3D;
  --ink-soft: rgba(66, 62, 61, 0.72);
  --ink-faint: rgba(66, 62, 61, 0.48);
  --line: rgba(66, 62, 61, 0.16);
  --accent: #1228C2;
  --accent-soft: rgba(18, 40, 194, 0.10);
  --undo: #7C1736;
  --board-top: #FAFBFB;
  --board-bottom: #BCD6FF;
  --board-ink: #423E3D;
  --shadow: 0 18px 44px rgba(66, 62, 61, 0.16);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --cipher: "Thinking Cipher", "Instrument Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", system-ui, sans-serif;
  --wrap: 1040px;
  --gutter: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #2D2E2D;
    --paper-deep: #262726;
    --card: #333333;
    --ink: #F2EDE3;
    --ink-soft: rgba(242, 237, 227, 0.74);
    --ink-faint: rgba(242, 237, 227, 0.5);
    --line: rgba(242, 237, 227, 0.16);
    --accent: #9FB0FF;
    --accent-soft: rgba(159, 176, 255, 0.14);
    --undo: #AE3658;
    --board-top: #232423;
    --board-bottom: #444442;
    --board-ink: #F2EDE3;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* 紙の粒 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.26 0 0 0 0 0.24 0 0 0 0 0.24 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
  background-size: 180px 180px;
}
@media (prefers-color-scheme: dark) { body::before { opacity: 0.07; } }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, video { max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }
strong, b { font-weight: 600; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); position: relative; z-index: 1; }
@media (max-width: 480px) { :root { --gutter: 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }

/* 上の段 */
.site-header { position: relative; z-index: 2; padding: 26px 0 8px; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { position: relative; display: inline-block; line-height: 0; }
.wordmark-img {
  display: inline-block;
  width: 124px;
  height: 39px;
  background-color: var(--ink);
  -webkit-mask: url("../img/wordmark.png") left center / contain no-repeat;
  mask: url("../img/wordmark.png") left center / contain no-repeat;
  transition: opacity 0.45s ease;
}
@media (max-width: 480px) { .wordmark-img { width: 104px; height: 33px; } }
/* 煙 → ロゴの動き（アプリの起動の絵と同じ動画）。器はロゴの四角を基準に置く = 切り抜き 1000×600 の中のロゴ x 179〜821（幅 642）・y 311〜509 */
.wordmark-anim {
  position: absolute; pointer-events: none;
  left: -27.9%; top: -157%;
  width: 155.8%; aspect-ratio: 1000 / 600;
  opacity: 1; transition: opacity 0.45s ease;
}
.wordmark-anim video, .wordmark-anim img { display: block; width: 100%; height: 100%; object-fit: fill; }
.smoke-pending .wordmark-img, .wordmark.anim .wordmark-img { opacity: 0; }
.wordmark.settled .wordmark-anim { opacity: 0; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; font-size: 14px; }
.site-nav a { color: var(--ink-soft); text-decoration: none; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }

/* 見出し */
.headline, .headline-sm, .page-title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.005em;
  margin: 0;
  color: var(--ink);
}
.headline { font-size: clamp(38px, 7vw, 66px); line-height: 1.05; }
.headline-sm { font-size: clamp(32px, 5vw, 46px); line-height: 1.1; }
.page-title { font-size: clamp(40px, 7vw, 64px); line-height: 1.05; }
.sub { font-size: 17px; color: var(--ink-soft); margin: 10px 0 0; }
.eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; }
.lead { font-size: 18px; line-height: 1.8; margin: 20px 0 24px; max-width: 34em; }
.fine { font-size: 13px; color: var(--ink-faint); line-height: 1.7; }
.fine a { color: inherit; }
.js [data-decode]:not(.ready) { visibility: hidden; }
.dw { display: inline-block; white-space: nowrap; }
.dc { display: inline-block; text-align: center; }
.dc.cipher { font-family: var(--cipher); color: var(--ink-soft); overflow: hidden; vertical-align: bottom; }
/* 点字のマス（site.js が SVG で描く。下の端を字の基準線に置き、語の中で同じ間隔になるよう left でずらす）と、まだ出さない記号 */
.dc.braille-cell { color: var(--ink-soft); overflow: visible; }
.dc .braille { position: relative; vertical-align: baseline; fill: currentColor; overflow: visible; }
.dc.hold { visibility: hidden; }

/* 液体のガラスの空（アプリの LiquidSky を WebGL に移したもの。上の段と入口の後ろに敷く。liquid.js が <canvas class="sky-canvas"> を body の先頭に置く） */
.sky-canvas, .sky-static {
  position: absolute; left: 0; top: 0; width: 100%; height: 0;
  z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, #252525, #444442);
}
.sky-static {
  background-image: url("../img/cloud-near.webp"), url("../img/cloud-mid.webp"), url("../img/cloud-far.webp"), linear-gradient(180deg, #252525, #444442);
  background-repeat: repeat-x, repeat-x, repeat-x, no-repeat;
  background-size: auto 100%, auto 100%, auto 100%, 100% 100%;
  background-position: 30% 0, 60% 0, 0 0, 0 0;
  filter: grayscale(1) brightness(0.78);
}
.sky-static::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.4));
}
.has-sky .site-header, .has-sky .hero { color: #F2EDE3; }
.has-sky .site-nav a { color: rgba(242, 237, 227, 0.78); }
.has-sky .site-nav a:hover, .has-sky .site-nav a[aria-current="page"] { color: #F2EDE3; }
.has-sky .wordmark-img { background-color: #F2EDE3; }
.has-sky .headline, .has-sky .hero .lead { color: #F2EDE3; }
.has-sky .hero .eyebrow, .has-sky .hero .fine { color: rgba(242, 237, 227, 0.62); }
.has-sky .badge-soon { border-color: rgba(242, 237, 227, 0.9); color: #F2EDE3; }
.has-sky .badge-soon::before { background: #F2EDE3; }
.has-sky .button-ghost { background: rgba(242, 237, 227, 0.12); border-color: rgba(242, 237, 227, 0.35); color: #F2EDE3; }
.has-sky .button-ghost:hover { border-color: #F2EDE3; }
.has-sky .ufo-shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); }
.has-sky .hero { padding-bottom: 56px; }
.sky-hint { margin-top: 2px; }
.sky-hint::before { content: "〰 "; }
.has-sky:not(.sky-live) .sky-hint { display: none; }
.has-sky .concept { padding-top: 32px; }

/* 入口 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 40px 0 28px;
}
.hero-art { position: relative; display: flex; justify-content: center; }
.ufo { width: min(100%, 440px); height: auto; display: block; position: relative; z-index: 1; animation: bob 3.2s ease-in-out infinite; }
.ufo-shadow {
  position: absolute; left: 50%; bottom: -6%; width: 50%; height: 14%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(66, 62, 61, 0.22), rgba(66, 62, 61, 0));
}
@media (prefers-color-scheme: dark) { .ufo-shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); } }
@keyframes bob { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .ufo, .board-ufo img { animation: none !important; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 18px; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--ink); border-radius: 999px; padding: 10px 18px;
  font-family: var(--serif); font-size: 19px; line-height: 1; color: var(--ink);
}
.badge-soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: 0.55; }
.button-ghost {
  display: inline-block; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; background: var(--card);
}
.button-ghost:hover { border-color: var(--ink); text-decoration: none; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 8px; padding-top: 12px; }
  .hero-art { order: -1; }
  .ufo { width: min(78%, 360px); }
}

/* コンセプト動画（入口のすぐ下。オーナーの動画 1280×720・28 秒・音なし） */
.concept { padding: 8px 0 56px; }
.concept-frame {
  border-radius: 24px; overflow: hidden;
  background: #EFF0EE;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.concept-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
@media (max-width: 760px) {
  .concept { padding-top: 0; }
  .concept-frame { border-radius: 16px; }
}

/* 段 */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 28px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.features { list-style: none; padding: 0; margin: 0; }
.features li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.features li:last-child { border-bottom: 0; }
.features b { display: block; font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.3; margin-bottom: 2px; }
.callout {
  margin-top: 32px; padding: 20px 22px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow);
}
.callout h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 6px; }
.callout p:last-child { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: 18px; padding: 20px 20px 16px; box-shadow: var(--shadow); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.2; margin: 0 0 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.card .fine { margin-top: 10px; }

/* 盤面の絵 */
.board {
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 9 / 15.2;
  margin: 0 auto;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--board-top), var(--board-bottom));
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 12% 6% 0;
  color: var(--board-ink);
}
.board-ufos { display: flex; justify-content: space-between; align-items: flex-start; }
.board-ufo { width: 22%; text-align: center; font-family: var(--serif); font-size: clamp(10px, 3.4vw, 13px); line-height: 1.2; }
.board-ufo:nth-child(odd) { transform: translateY(10px); }
.board-ufo img { width: 100%; height: auto; display: block; animation: bob 3.2s ease-in-out infinite; }
.board-ufo:nth-child(2) img { animation-delay: -0.8s; }
.board-ufo:nth-child(3) img { animation-delay: -1.6s; }
.board-ufo:nth-child(4) img { animation-delay: -2.4s; }
.board-ufo span { display: block; margin-top: 2px; }
.board-mid { display: grid; grid-template-columns: 1fr minmax(0, 46%) 1fr; align-items: center; margin-top: 4%; }
.board-side { font-family: var(--serif); font-size: clamp(16px, 5vw, 22px); text-align: center; }
.board-card {
  position: relative; width: 100%; aspect-ratio: 9 / 19.5;
  background: #FFFFFF; border-radius: 10px; padding: 9% 9% 0;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  transform: rotate(-2deg);
}
.board-card i { display: block; height: 4.5%; border-radius: 3px; background: #E7E1D6; margin-bottom: 7%; }
.board-card i:nth-child(1) { width: 60%; background: #D9D2C6; }
.board-card i:nth-child(3) { width: 85%; }
.board-card i:nth-child(4) { width: 50%; height: 26%; border-radius: 8px; background: #EFEAE0; }
.board-card i:nth-child(5) { width: 75%; }
.board-card i:nth-child(6) { width: 40%; }
.hint { position: absolute; font-size: 16px; color: var(--board-ink); opacity: 0.55; line-height: 1; }
.hint-up { top: -24px; left: 50%; transform: translateX(-50%); }
.hint-down { bottom: -24px; left: 50%; transform: translateX(-50%); }
.hint-left { left: -22px; top: 50%; transform: translateY(-50%); }
.hint-right { right: -22px; top: 50%; transform: translateY(-50%); }
.board-trash { display: flex; justify-content: center; margin-top: 2%; }
.board-trash img { width: 42%; height: auto; display: block; transform: translateY(34%); }

/* 料金 */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); border-radius: 18px; padding: 22px 22px 18px; box-shadow: var(--shadow); }
.plan h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 4px; }
.plan .price { color: var(--ink-soft); margin: 0 0 12px; font-size: 15px; }
.plan ul { padding-left: 1.2em; margin: 0; }
.plan.pro { outline: 2px solid var(--ink); outline-offset: -2px; }

/* コツ */
.tip { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: start; padding: 36px 0; border-top: 1px solid var(--line); }
.tip:first-of-type { border-top: 0; }
@media (max-width: 700px) { .tip { grid-template-columns: 1fr; } .tip-video { max-width: 260px; } }
.tip-video { position: relative; }
.tip-video video {
  display: block; width: 100%; height: auto; aspect-ratio: 804 / 1748;
  border-radius: 28px; background: #000; box-shadow: var(--shadow);
}
.tip h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
.tip ol li { margin-bottom: 0.5em; }
.steps b { font-weight: 600; }

/* サポート・ポリシー */
.prose { max-width: 42em; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; margin: 36px 0 10px; }
.prose h3 { font-size: 17px; margin: 24px 0 6px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-family: var(--serif); font-size: 22px; color: var(--ink-faint); }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 14px; color: var(--ink-soft); }
.contact { margin-top: 28px; padding: 16px 18px; border-radius: 14px; background: var(--accent-soft); }
.contact span { font-weight: 600; margin-right: 6px; }
.updated { font-size: 13px; color: var(--ink-faint); margin: 8px 0 24px; }

/* 下の段 */
.site-footer { margin-top: 48px; padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-faint); }
.footer-row p { margin: 0 0 8px; }
.lang-switch { font-size: 14px; color: var(--ink-soft); }
.lang-switch span[aria-current] { color: var(--ink); font-weight: 600; }
.footer-fine a { color: inherit; }
.footer-copy { margin-top: 14px; font-family: var(--serif); font-size: 15px; color: var(--ink-soft); }

/* 404 */
.notfound { padding: 80px 0; text-align: center; }
