/* genkawatch.shop: one stylesheet for the front page, the accounts pages and the app */
:root {
  --green: #2e7d4f;
  --green-deep: #1f5c39;
  --green-soft: #e8f2ec;
  --ink: #1c2620;
  --muted: #5a645d;
  --line: #e3e0d6;
  --paper: #fbfaf6;
  --card: #ffffff;
  --up: #b4462a;
  --up-soft: #fbece6;
  --down: #2b6cb0;
  --warn-soft: #fff6e0;
  --radius: 14px;
  --font: system-ui, -apple-system, "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.8; font-size: 16px; letter-spacing: .02em; }
img { max-width: 100%; display: block; }
a { color: var(--green-deep); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.4; letter-spacing: .01em; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1em; }
.num, td.n, .tab { font-variant-numeric: tabular-nums; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(251, 250, 246, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: .03em; white-space: nowrap; min-height: 44px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav-links a:not(.btn) { min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
.nav-links a.btn { color: #fff; }
.nav-links a:not(.btn):hover { color: var(--green); }
[hidden] { display: none !important; }
@media (max-width: 760px) { .nav-links a.hide-sm { display: none; } .nav-links { gap: 8px; } .nav .wrap { gap: 10px; } }
@media (max-width: 400px) { .brand { font-size: 16px; } .brand img { width: 30px; height: 30px; } .nav .btn { padding: 0 14px; } }
@media (max-width: 480px) { .app-nav .brand-name { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--green); background: var(--green); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; letter-spacing: .04em; }
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #9cc9ad; outline-offset: 2px; }
.btn.small-btn { min-height: 44px; padding: 0 16px; font-size: 14px; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--green-deep); }
.btn.ghost:hover { background: var(--green-soft); }
.btn.quiet { background: #fff; color: var(--ink); border-color: var(--line); font-weight: 600; }
.btn.quiet:hover { border-color: var(--green); }
.btn.danger { background: #fff; color: var(--up); border-color: #e5c2b6; }
.btn[disabled] { opacity: .55; cursor: wait; }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }

/* hero */
.hero { padding: 64px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.02fr 1fr; gap: 56px; } }
.eyebrow { display: inline-block; font-size: 13px; color: var(--green-deep); background: var(--green-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 18px; font-weight: 600; }
.hero h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.38; margin-bottom: 20px; }
.hero .sub { font-size: 17px; color: #36413a; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 26px; }
.cta-note { font-size: 13px; color: var(--muted); }

/* the product screen */
.screen { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 18px 40px -24px rgba(31, 92, 57, .35); overflow: hidden; }
.screen-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f6f5f0; font-size: 13px; }
.screen-bar b { font-size: 14px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #efede6; color: var(--muted); font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.tag.green { background: var(--green-soft); color: var(--green-deep); }
.tag.up { background: var(--up-soft); color: var(--up); }
.tag.proxy { background: #eef2f8; color: #3b5b85; }
.tag.kari { background: var(--warn-soft); color: #8a6100; }
.dish-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid #f0eee7; }
.dish-row:last-child { border-bottom: 0; }
.dish-row .name { font-weight: 700; }
.dish-row .price { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 6px; }
.dish-row .cost { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.dish-row .why { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.ratio { font-size: 13px; font-weight: 700; }
.ratio.over { color: var(--up); }
.bar { height: 6px; border-radius: 6px; background: #eeece5; position: relative; overflow: hidden; grid-column: 1 / -1; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--green); border-radius: 6px; }
.bar.over i { background: var(--up); }
.bar b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .5; }
.screen-foot { padding: 12px 16px; background: #fbfaf6; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* sections */
section { padding: 72px 0; }
section.alt { background: #fff; border-block: 1px solid var(--line); }
.sec-head { max-width: 640px; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(23px, 3.2vw, 30px); }
.sec-head p { color: var(--muted); }
.kicker { font-size: 13px; color: var(--green-deep); font-weight: 700; letter-spacing: .08em; margin-bottom: 8px; display: block; }

/* market table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #f0eee7; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f8f7f2; white-space: nowrap; }
td.n, th.n { text-align: right; white-space: nowrap; }
td:first-child { white-space: nowrap; }
/* on a phone, a table's rows become small blocks: the name and the main number on top, the rest under them */
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack td { display: block; }
  table.stack tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid #f0eee7; }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 0; }
  table.stack td.src { grid-column: 1 / -1; order: 9; }
  table.stack td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-size: 12px; font-weight: 400; }
}
.panel .table-wrap, .demo .table-wrap { border: 0; border-radius: 0; }
.panel .plan { border-width: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 18px 0 0; }
tr:last-child td { border-bottom: 0; }
.upv { color: var(--up); font-weight: 700; }
.downv { color: var(--down); font-weight: 700; }
.src { font-size: 12px; color: var(--muted); }

/* steps and features */
.steps { display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 18px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }
.features { display: grid; gap: 18px; }
@media (min-width: 820px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature { padding: 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.feature h3 { font-size: 18px; display: flex; gap: 10px; align-items: center; }
.feature h3 svg { flex: none; }
.feature p { color: #3f4943; margin: 0; font-size: 15px; }

/* demo */
.demo { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.demo form { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.demo input { flex: 1 1 260px; }
.demo-out .total { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 14px 0 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.demo-out .total div { font-size: 13px; color: var(--muted); }
.demo-out .total b { display: block; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* email sample */
.mail { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; max-width: 680px; }
.mail-head { padding: 14px 18px; border-bottom: 1px solid var(--line); background: #f6f5f0; font-size: 13px; color: var(--muted); }
.mail-head b { color: var(--ink); font-size: 15px; display: block; }
.mail-body { padding: 18px; font-size: 14px; }
.mail-body h4 { font-size: 14px; margin: 18px 0 8px; color: var(--green-deep); }
.mail-body h4:first-child { margin-top: 0; }
.mail-body ul, .mail-body ol { margin: 0; padding-left: 1.3em; }
.mail-body li { margin-bottom: 6px; }

/* shops */
.shops { display: grid; gap: 14px; }
@media (min-width: 720px) { .shops { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .shops { grid-template-columns: repeat(3, 1fr); } }
.shop { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.shop h3 { font-size: 17px; margin-bottom: 6px; }
.shop p { margin: 0; color: var(--muted); font-size: 14px; }

/* price */
.plan { background: #fff; border: 2px solid var(--green); border-radius: 20px; padding: 32px; max-width: 520px; }
.plan .amount { font-size: 44px; font-weight: 800; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.plan .amount small { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.checks { list-style: none; padding: 0; margin: 18px 0 24px; }
.checks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq details { padding: 8px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: #3f4943; }
.sources { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sources li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; }

/* band */
.band { background: var(--green); color: #fff; text-align: center; padding: 64px 0; }
.band h2 { font-size: clamp(22px, 3.2vw, 30px); }
.band p { opacity: .92; }
.band .btn { background: #fff; color: var(--green-deep); border-color: #fff; }
.band .btn:hover { background: var(--green-soft); }

/* footer */
footer.site { padding: 40px 0 48px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
footer.site .wrap { display: grid; gap: 14px; }
footer.site .brand { font-size: 15px; }
footer.site .brand img { width: 26px; height: 26px; border-radius: 7px; }
.syng-legal-links a { color: var(--muted); }

/* forms */
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid #d5d1c5; border-radius: 10px; background: #fff; color: var(--ink); min-height: 48px; }
textarea { min-height: 220px; line-height: 1.8; }
.field { margin-bottom: 18px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.msg { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.msg.err { background: var(--up-soft); color: #7d2a14; }
.msg.ok { background: var(--green-soft); color: var(--green-deep); }
.msg.info { background: #f1efe8; color: var(--ink); }
.msg:empty { display: none; }
.auth { padding: 56px 0 72px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.auth .card { max-width: 440px; margin: 0 auto; }
.auth h1 { font-size: 24px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--green-deep); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* app */
.app-main { padding: 28px 0 64px; }
.app-grid { display: grid; gap: 20px; }
@media (min-width: 980px) { .app-grid { grid-template-columns: 1fr 340px; align-items: start; } }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 720px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat span { font-size: 12px; color: var(--muted); display: block; }
.stat b { font-size: 20px; font-variant-numeric: tabular-nums; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 20px; }
.panel h2 { font-size: 19px; }
.panel h3 { font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); font-weight: 700; }
.lines { width: 100%; }
.lines td { padding: 8px 6px; }
.lines input, .lines select { min-height: 44px; padding: 8px 10px; }
.lines .qty { width: 90px; }
.lines .unit { width: 76px; }
.match { font-size: 12px; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.dish-list .dish-row { cursor: pointer; border-radius: 10px; }
.dish-list .dish-row:hover { background: #faf9f4; }
.detail-lines td { font-size: 14px; }
.detail-lines .src a { color: var(--muted); }
.own-form { background: #f8f7f2; border-radius: 12px; padding: 14px; margin-top: 8px; display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .own-form { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; } }
.own-form .field { margin: 0; }
.notice-out { white-space: pre-wrap; }
.loading { color: var(--muted); font-size: 14px; }
.empty { text-align: center; padding: 28px 10px; color: var(--muted); }
.paywall { border: 2px solid var(--green); }
pre.json { white-space: pre-wrap; font-size: 12px; background: #f6f5f0; border-radius: 10px; padding: 12px; max-height: 420px; overflow: auto; }
