/* Lilambd apps site — 紙と墨、黄土と弁柄、丸い書体、手描きの線。
   ui-kit/src/theme.ts と同じ色。外部への通信なし（書体は同梱の部分集合）。 */

@font-face {
  font-family: "Zen Maru Gothic";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/ZenMaruGothic-400-subset.woff2") format("woff2");
}
@font-face {
  font-family: "Zen Maru Gothic";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/ZenMaruGothic-700-subset.woff2") format("woff2");
}

:root {
  --paper: #fbf7ef;
  --paper-deep: #f3ecdf;
  --ink: #1f1b18;
  --ink-soft: #5a524b;
  --ink-faint: #9a918a;
  --line: #d9cfc2;
  --ochre: #c8902e;
  --ochre-soft: #f3e3c3;
  --bengara: #b9543b;
  --white: #ffffff;
  --stroke: 2.5px;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", "BIZ UDPGothic", "Meiryo", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--ochre); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--bengara); text-decoration-color: var(--bengara); }
h1, h2, h3 { line-height: 1.3; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
ul { padding-left: 1.3em; }
li { margin: .2em 0; }
small, .note { color: var(--ink-soft); font-size: .9rem; }
.faint { color: var(--ink-faint); }
hr { border: 0; height: 0; margin: 2.4rem 0; border-top: var(--stroke) dashed var(--line); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--paper-deep); padding: .1em .35em; border-radius: 6px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* 上の帯 */
.top { padding: 18px 0 8px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 44px; height: 44px; }
.nav { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .95rem; }
.nav a { text-decoration: none; padding: 4px 2px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ochre); color: var(--ink); }

/* 毛のもこもこの区切り（羊の輪郭） */
.wool {
  height: 16px;
  margin: 8px 0 20px;
  background:
    radial-gradient(circle at 8px 8px, var(--paper-deep) 7px, transparent 7.6px) 0 0 / 16px 16px repeat-x;
}
.wool.ink {
  height: 12px;
  background: radial-gradient(circle at 6px 6px, transparent 3.6px, var(--ink) 4px, var(--ink) 5px, transparent 5.6px) 0 0 / 12px 12px repeat-x;
  opacity: .8;
}

main { padding-bottom: 40px; }

/* 見出しの帯（ページ先頭） */
.hero { padding: 24px 0 8px; }
.hero .mark { width: 128px; height: 128px; margin: 0 auto 12px; }
.hero h1 { text-align: center; font-size: 2.2rem; letter-spacing: .02em; }
.hero .lead { text-align: center; color: var(--ink-soft); font-size: 1.05rem; max-width: 560px; margin: 0 auto 1.2em; }
.hero .tag { display: block; text-align: center; color: var(--ochre); font-weight: 700; letter-spacing: .08em; font-size: .9rem; }

/* 手描きの札（少し歪んだ角） */
.card {
  background: var(--white);
  border: var(--stroke) solid var(--ink);
  border-radius: 24px 18px 26px 16px / 18px 26px 16px 24px;
  padding: 20px 22px;
  margin: 18px 0;
  box-shadow: 4px 5px 0 var(--ochre-soft);
}
.card h2, .card h3 { margin-top: 0; }
.card.soft { background: var(--paper-deep); border-style: dashed; box-shadow: none; }
.card .kicker { color: var(--bengara); font-weight: 700; font-size: .85rem; letter-spacing: .08em; }

.apps { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .apps { grid-template-columns: 1fr 1fr; } }
.app-card { display: flex; flex-direction: column; }
.app-card img { width: 72px; height: 72px; margin-bottom: 8px; }
.app-card p { flex: 1; }
.app-card .more { font-weight: 700; text-decoration: none; }
.app-card .more::after { content: " →"; color: var(--ochre); }

.status {
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 1px 12px;
  font-size: .82rem;
  font-weight: 700;
  background: var(--ochre-soft);
  vertical-align: middle;
}

/* ブラウザで試す（アプリの web 版への札） */
.card.play { background: var(--ochre-soft); }
.card.play .go {
  display: inline-block; margin: 4px 12px 4px 0;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700;
  padding: 8px 18px; border-radius: 999px; border: 2px solid var(--ink);
}
.card.play .go:hover { background: var(--bengara); border-color: var(--bengara); color: var(--white); }
.card.play .note { margin: .6em 0 0; }

/* 単元の一覧（黄土の丸） */
.units { list-style: none; padding: 0; margin: 0 0 1em; }
.units li { padding-left: 1.6em; position: relative; margin: .5em 0; }
.units li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: .9em; height: .9em;
  border-radius: 50% 45% 55% 50%; background: var(--ochre); border: 2px solid var(--ink);
}

/* 画面写真の置き場（まだ無い） */
.shots { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 8px; }
.shot {
  flex: 0 0 auto; width: 160px; height: 320px;
  border: var(--stroke) dashed var(--ink-faint);
  border-radius: 22px;
  background: repeating-linear-gradient(135deg, var(--paper-deep) 0 8px, var(--paper) 8px 16px);
  color: var(--ink-faint); font-size: .8rem; text-align: center;
  display: flex; align-items: center; justify-content: center;
}

/* 言語の切替（同じ頁の中で日本語→英語） */
.lang-jump { text-align: right; font-size: .9rem; margin: -4px 0 8px; }
.lang-jump a { text-decoration: none; border: 2px solid var(--line); border-radius: 999px; padding: 2px 12px; }
.lang-jump a:hover { border-color: var(--ochre); }
section[lang] { scroll-margin-top: 12px; }

/* よくある質問 */
.faq dt { font-weight: 700; margin-top: 1.1em; }
.faq dt::before { content: "Q "; color: var(--ochre); }
.faq dd { margin: .2em 0 0; }

.contact { font-size: 1.15rem; font-weight: 700; }

/* 下の帯 */
footer { border-top: var(--stroke) solid var(--ink); padding: 20px 0 40px; color: var(--ink-soft); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
