/* シロヌキ top page (F1-T4 #7). Carried over from docs/design/mock/Main.dc.html and Mobile.dc.html:
   one light design, system Japanese fonts (no font request leaves the page), 6 tiles per row on PC,
   3 on phones with the zip button in a sticky bottom bar. */
:root {
  --fg: #1a1a1a;
  --muted: #4a4a46;
  --bg: #ffffff;
  --panel: #fafaf8;
  --line: #e3e3df;
  --line-strong: #c9c9c4;
  --dash: #8a8a84;
  --accent: #0b57d0;
  --accent-soft: #eef3fc;
  --ok: #1b7f3b;
  --bad: #b23b3b;
  --bad-line: #d9a3a3;
  --grey-box: #f3f3f1;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; }
a:hover { color: var(--accent); }
h1, h2 { letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: 26px; margin: 0 0 20px; }
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 900px) { .wrap { padding-left: 32px; padding-right: 32px; } }
.muted { color: var(--muted); }
.mono { font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--fg); background: var(--bg);
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn-ghost { border-color: var(--line-strong); }
.btn:disabled { opacity: .4; cursor: default; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; }
.logo-mark { display: inline-block; width: 22px; height: 22px; border-radius: 6px; background: #ffffff; border: 3px solid var(--fg); }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { text-decoration: none; font-weight: 500; padding: 8px 4px; }
.nav .lang { font-size: 14px; color: var(--muted); }

/* hero with the drop zone */
.hero { padding-top: 32px; padding-bottom: 8px; }
.hero h1 { font-size: 28px; line-height: 1.3; margin: 0 0 10px; }
@media (min-width: 900px) { .phone-br { display: none; } }
.hero .lead { font-size: 16px; color: var(--muted); margin: 0 0 20px; max-width: 760px; }
@media (min-width: 900px) {
  .hero { padding-top: 56px; }
  .hero h1 { font-size: 44px; line-height: 1.25; }
  .hero .lead { font-size: 18px; margin-bottom: 28px; }
}
.drop {
  border: 2px dashed var(--dash); border-radius: 18px; background: var(--panel);
  padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
@media (min-width: 900px) { .drop { padding: 44px 32px; gap: 14px; } }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-title { font-size: 20px; font-weight: 700; display: none; }
@media (min-width: 900px) { .drop-title { display: block; } }
.drop .btn-primary { font-size: 17px; width: 100%; min-height: 48px; }
@media (min-width: 900px) { .drop .btn-primary { width: auto; padding: 0 28px; } }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.limits { font-size: 14px; color: var(--muted); }
.formats { margin-top: -6px; }
.notes { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.notes li { display: flex; align-items: flex-start; gap: 8px; }
.notes svg { flex: none; margin-top: 2px; }

/* results */
.results { padding-top: 24px; padding-bottom: 24px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.results-head h2 { margin: 0; font-size: 22px; }
.results-head .count { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.remaining { font-size: 14px; color: var(--muted); }
.results-tools { display: flex; align-items: center; gap: 12px; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; }
.notice { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fbeaea; color: var(--bad); font-size: 14px; font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@media (min-width: 900px) { .tile { padding: 10px; gap: 8px; border-radius: 14px; } }
.tile[data-box="error"] { border-color: var(--bad-line); }
.box { aspect-ratio: 1; border-radius: 8px; background: var(--grey-box); overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.tile[data-box="result"] .box {
  background-color: var(--grey-box);
  background-image: linear-gradient(45deg, #dcdcd8 25%, transparent 25%), linear-gradient(-45deg, #dcdcd8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dcdcd8 75%), linear-gradient(-45deg, transparent 75%, #dcdcd8 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.box .bar { position: absolute; left: 10%; right: 10%; bottom: 10px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.box .bar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 3px; background: var(--accent); animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { left: -40%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .box .bar::after { animation: none; left: 30%; } }
.tile .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.tile .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 24px; }
.state { font-size: 12px; font-weight: 500; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) { .state, .tile .name { font-size: 13px; } }
.tile[data-box="result"] .state { color: var(--ok); }
/* error tiles: the reason is a sentence, so it gets the whole row and the retry button goes under it */
.tile[data-box="error"] .row { flex-direction: column; align-items: stretch; gap: 6px; }
.tile[data-box="error"] .state { color: var(--bad); white-space: normal; line-height: 1.4; }
.tile .retry { min-height: 32px; padding: 0 8px; font-size: 12px; font-weight: 500; }

/* zip bar: under the grid on PC, sticky at the bottom on phones */
.zipbar { position: sticky; bottom: 0; z-index: 2; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 0 max(12px, env(safe-area-inset-bottom, 0px)); margin-top: 12px; }
.zipbar .btn-primary { width: 100%; font-size: 17px; min-height: 52px; }
@media (min-width: 900px) {
  .zipbar { position: static; border-top: 0; padding: 0; margin-top: 20px; }
  .zipbar .btn-primary { width: auto; font-size: 18px; padding: 0 32px; }
}

/* below the fold */
.steps { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps .wrap { padding-top: 28px; padding-bottom: 28px; display: grid; gap: 16px; }
@media (min-width: 900px) { .steps .wrap { padding-top: 48px; padding-bottom: 48px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.step-no { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.step-title { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
/* pricing (F5-T4 #32): three cards, one column on phones; the soon-badge is shared with legal.css */
.pricing { padding-top: 28px; padding-bottom: 8px; }
@media (min-width: 900px) { .pricing { padding-top: 40px; padding-bottom: 16px; } }
.pricing-lead { margin: -8px 0 20px; color: var(--muted); font-size: 15px; max-width: 760px; }
.plans { display: grid; gap: 14px; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.plan { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--panel); min-width: 0; }
.plan-name { font-weight: 700; font-size: 16px; }
.plan-price { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 2px; }
.plan-unit { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.plan-cap { font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.plan ul { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: 14px; }
.plan li { margin-bottom: 2px; }
.soon-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 8px; vertical-align: middle; margin-left: 6px; }
.pricing-note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }

.faq { padding-top: 28px; padding-bottom: 40px; }
@media (min-width: 900px) { .faq { padding-top: 40px; padding-bottom: 56px; } }
.faq-list { display: grid; gap: 14px; }
@media (min-width: 900px) { .faq-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; } }
.faq-list dt { font-weight: 700; margin-bottom: 4px; }
.faq-list dd { margin: 0; color: var(--muted); font-size: 15px; }
.site-footer { background: var(--fg); color: var(--line); font-size: 14px; }
.site-footer .wrap { padding-top: 24px; padding-bottom: max(24px, env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer .legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer .legal-links a { color: var(--line); text-decoration: none; }
.site-footer .legal-links a:hover { color: #ffffff; text-decoration: underline; }
