/* Paijin — paper calendar, ink, amber shift light */
:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --ink: #1f1a16;
  --muted: #6b6258;
  --line: #d8d0c4;
  --accent: #c45c26;
  --accent-2: #1f4d43;
  --card: #fffaf3;
  --shadow: 0 18px 40px rgba(31, 26, 22, 0.08);
  --radius: 18px;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
body { min-height: 100vh; }
a { color: var(--accent-2); }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 8px; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: inherit; }
.brand strong { font-size: 1.45rem; letter-spacing: 0.04em; }
.brand em { font-style: normal; color: var(--muted); font-size: 0.92rem; }
nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav a, .ghost, .chip, button, .btn {
  font: inherit;
}
.nav a { color: var(--ink); text-decoration: none; padding: 6px 8px; }
.badge { border-radius: 999px; padding: 3px 9px; font-size: 0.75rem; border: 1px solid var(--line); }
.badge-free { background: #efe8dc; }
.badge-pro { background: #1f4d43; color: #f4efe6; border-color: #1f4d43; }
.hero { padding: 12px 0 28px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: end; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; margin: 0 0 10px; font-weight: 650; letter-spacing: -0.02em; }
.lead { margin: 0; color: var(--muted); line-height: 1.6; max-width: 52ch; }
.hero-next {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); min-height: 96px;
  display: flex; flex-direction: column; gap: 6px; justify-content: center;
}
.hero-next .kicker { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-next strong { font-size: 1.5rem; color: var(--c, var(--accent)); }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 22px; padding-bottom: 48px; }
.panel, .board {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.panel h2, .board-head h2 { font-size: 0.95rem; margin: 0 0 10px; }
label.field { display: block; font-size: 0.8rem; color: var(--muted); margin: 12px 0 6px; }
input[type="text"], input[type="date"], input[type="time"], input[type="password"], select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 8px 10px; font: inherit;
}
.chips, .presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .btn, .ghost, .pattern-cell, .day, .icon-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; cursor: pointer; color: var(--ink);
}
.chip-on, .btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary { border-radius: 12px; padding: 10px 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ghost { background: transparent; border-radius: 12px; }
.shift-row { display: grid; grid-template-columns: 14px 1fr 76px 12px 76px; gap: 6px; align-items: center; margin-bottom: 8px; }
.shift-row .add-to-pattern { grid-column: 1 / -1; justify-self: start; font-size: 0.8rem; }
.swatch { width: 12px; height: 12px; border-radius: 99px; display: inline-block; }
.pattern-cell { border-radius: 12px; background: color-mix(in srgb, var(--c, #eee) 28%, white); }
.pattern-off { border-style: dashed; }
#patternList { display: flex; flex-wrap: wrap; gap: 6px; }
.muted { color: var(--muted); font-size: 0.85rem; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.month-nav { display: flex; gap: 6px; align-items: center; }
.weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.weekdays span { text-align: center; color: var(--muted); font-size: 0.78rem; padding: 4px 0; }
.weekdays .wknd { color: var(--accent); }
.day {
  min-height: 78px; border-radius: 14px; text-align: left; padding: 8px;
  background: color-mix(in srgb, var(--c) 22%, var(--card)); display: flex; flex-direction: column; gap: 8px;
}
.day.empty { background: transparent; border: 0; box-shadow: none; cursor: default; }
.day.off { background: #f6f3ee; color: var(--muted); }
.day.today { outline: 2px solid var(--ink); }
.day.ex { box-shadow: inset 0 0 0 2px var(--accent); }
.day .num { font-weight: 650; }
.day .lab { font-size: 0.78rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stats div { background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.stats .k { display: block; color: var(--muted); font-size: 0.75rem; }
.stats strong { font-size: 1.25rem; }
.subscribe { margin-top: 14px; }
.subscribe input { margin: 8px 0; }
footer.site { padding: 12px 0 40px; color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.legal { max-width: 75ch; }
.pop {
  position: fixed; inset: 0; background: rgba(31, 26, 22, 0.35);
  display: grid; place-items: center; padding: 20px; z-index: 20;
}
.pop[hidden] { display: none; }
.pop-card { background: var(--card); border-radius: 18px; padding: 18px; width: min(420px, 100%); border: 1px solid var(--line); }
.pop-card h3 { margin-top: 0; }
.how, .prose { padding: 8px 0 48px; }
.prose { max-width: 70ch; line-height: 1.65; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.price-card.featured { border-color: var(--ink); }
.price { font-size: 2rem; margin: 8px 0; }
.note { background: #efe8dc; border-radius: 12px; padding: 12px 14px; }

@media (max-width: 860px) {
  .hero, .layout, .price-grid { grid-template-columns: 1fr; }
  .shift-row { grid-template-columns: 14px 1fr 72px 12px 72px; }
  .day { min-height: 64px; padding: 6px; }
}

@media print {
  header.site nav, .panel, .btn-row, .subscribe, footer.site, .hero, #exceptionHint { display: none !important; }
  body { background: white; }
  .wrap { width: 100%; }
  .layout { display: block; }
  .board { box-shadow: none; border: 0; }
  .day { break-inside: avoid; }
}
