:root {
  --paper: #f4f1ea;
  --paper-2: #ffffff;
  --ink: #111111;
  --muted: #3a3834;
  --line: #1f1f1f;
  --line-soft: #b7b1a6;
  --accent: #0a5c4e;
  --accent-dark: #063f35;
  --accent-soft: #d4efe7;
  --best: #f5c518;
  --yes: #0a6b38;
  --maybe: #a15c00;
  --no: #b42318;
  --focus: #0b57d0;
}
* { box-sizing: border-box; }
html { background: var(--paper); overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  font-weight: 500;
  background: var(--paper);
  overflow-x: hidden;
  max-width: 100%;
}
.wrap { max-width: 72rem; width: 100%; margin: 0 auto; min-height: 100vh; padding: 1.25rem 1rem 2.75rem; display: flex; flex-direction: column; overflow-x: hidden; }
main { flex: 1; padding: 1.5rem 0; display: flex; flex-direction: column; gap: 1.6rem; }
.site-header, .site-footer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.site-header { flex-wrap: nowrap; }
.site-footer { border-top: 2px solid var(--line-soft); padding-top: 1.25rem; font-size: 16px; color: var(--muted); flex-wrap: wrap; }
.site-footer a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.brand { display: flex; gap: .75rem; align-items: center; color: inherit; text-decoration: none; min-width: 0; }
.brand strong { font-size: 1.35rem; }
.brand small { display: block; font-size: 15px; color: var(--muted); font-weight: 700; }
.logo-mark { width: 3rem; height: 3rem; border-radius: .9rem; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; flex-shrink: 0; }
nav { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }
nav a { color: var(--ink); text-decoration: none; font-weight: 800; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; border-radius: 999px; padding: .7rem 1.2rem;
  border: 2px solid var(--line); background: var(--paper-2); color: var(--ink);
  text-decoration: none; cursor: pointer; font: inherit; font-weight: 800; white-space: nowrap;
}
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent-dark); }
.btn-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-lg { width: 100%; min-height: 56px; padding: 1rem; font-size: 1.2rem; }
.btn:disabled { opacity: .55; }
.btn:focus-visible, .chip:focus-visible, .day:focus-visible, .vote-mark:focus-within, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.card { background: var(--paper-2); border: 2px solid var(--line-soft); border-radius: 1.25rem; padding: 1.35rem; min-width: 0; max-width: 100%; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.35; margin: .35rem 0; }
.eyebrow { color: var(--accent-dark); font-weight: 800; font-size: 16px; }
.muted { color: var(--muted); }
.mini { font-size: 15px; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 1.5rem; }
.grid-2 { display: grid; gap: 1rem; min-width: 0; }
.grid-2 > * { min-width: 0; max-width: 100%; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
label, h3 { display: block; font-size: 17px; color: var(--ink); font-weight: 800; margin: .85rem 0 .35rem; }
input, textarea, select {
  width: 100%; max-width: 100%; min-width: 0; min-height: 52px; padding: .85rem 1rem; border-radius: .9rem;
  border: 2px solid #4a4742; background: #fff; font: inherit; color: inherit;
}
input[type="date"], input[type="time"], input[type="datetime-local"] {
  max-width: 100%;
  min-width: 0;
}
.deadline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: .75rem;
  min-width: 0;
}
@media (max-width: 520px) {
  .deadline-fields { grid-template-columns: 1fr; }
}
textarea { min-height: 6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin: .75rem 0; }
.chip {
  border-radius: 999px; min-height: 48px; padding: .65rem 1.1rem;
  border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; font-weight: 800;
}
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent-dark); }
.chip span { font-size: 15px; font-weight: 700; }
.calendars { display: flex; flex-direction: column; gap: 1rem; }
.calendars-grid { display: grid; gap: 1rem; }
@media (min-width: 800px) { .calendars-grid { grid-template-columns: 1fr 1fr; } }
.month { padding: 1rem; }
.month h3 { text-align: center; font-size: 1.2rem; margin-top: 0; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 15px; color: var(--muted); font-weight: 800; }
.day {
  min-height: 48px; border: 2px solid var(--line-soft); border-radius: .75rem;
  background: #fff; font: inherit; font-size: 1.05rem; font-weight: 800; cursor: pointer; color: var(--ink);
}
.day.on { background: var(--accent); color: #fff; border-color: var(--accent-dark); }
.day.today { background: var(--accent-soft); border-color: var(--accent); }
.day:disabled { color: #9a958c; background: #eee; border-color: #ddd; cursor: not-allowed; }
.list { list-style: none; padding: 1rem; margin: 1rem 0 0; }
.list li { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: .5rem 0; font-weight: 700; }
.time-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
}
.time-bar-main { min-width: 0; flex: 1 1 10rem; }
.time-bar-main label { margin-top: 0; }
.time-bar input[type="time"] {
  width: 10.5rem;
  max-width: 100%;
}
.time-bar .check { margin: 0; min-height: 52px; }
.picked-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .6rem;
  margin: .65rem 0 !important;
}
.list li.picked-row { display: flex; flex-wrap: nowrap; }
.picked-date { flex: 1; min-width: 0; }
#selected-list input[type="time"] {
  width: 8.8rem;
  max-width: 42%;
  flex-shrink: 0;
}
#selected-list button[data-remove] { flex-shrink: 0; }
@media (max-width: 520px) {
  .list li.picked-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .picked-date { grid-column: 1; }
  #selected-list button[data-remove] { grid-column: 2; grid-row: 1; }
  #selected-list input[type="time"] {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }
}
.split { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: start; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.badge { display: inline-flex; background: var(--best); color: #111; border: 2px solid #111; border-radius: 999px; padding: .35rem .9rem; font-weight: 800; font-size: 16px; }
.vote-row {
  display: flex; justify-content: space-between; gap: .85rem; flex-wrap: wrap; align-items: center;
  background: #f7f5f0; border: 2px solid var(--line-soft); border-radius: 1rem; padding: .9rem 1rem; margin: .7rem 0;
}
@media (max-width: 640px) {
  .vote-row { flex-direction: column; align-items: stretch; }
  .marks { width: 100%; justify-content: space-between; }
  .vote-mark { flex: 1; min-height: 56px; font-size: 1.6rem; }
}
.vote-date { margin: 0; font-size: 1.1rem; font-weight: 800; }
.marks { display: flex; gap: .5rem; }
.vote-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 52px;
  border-radius: 999px;
  padding: .45rem .8rem;
  font: inherit;
  font-size: 1.45rem;
  font-weight: 800;
  border: 3px solid #4a4742;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}
.vote-mark input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0.02;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.vote-mark.on,
.vote-mark:has(input:checked) {
  color: #fff;
  border-color: #111;
}
.vote-mark.on:has(input[value="yes"]),
.vote-mark.on:has(input[value="best"]),
.vote-mark:has(input[value="yes"]:checked),
.vote-mark:has(input[value="best"]:checked) { background: var(--yes); }
.vote-mark.on:has(input[value="maybe"]),
.vote-mark:has(input[value="maybe"]:checked) { background: var(--maybe); }
.vote-mark.on:has(input[value="no"]),
.vote-mark:has(input[value="no"]:checked) { background: var(--no); }
.result-cards { display: grid; gap: 1rem; }
.result-card {
  background: var(--paper-2);
  border: 2px solid var(--line-soft);
  border-radius: 1.15rem;
  padding: 1rem 1.1rem;
  min-width: 0;
}
.result-card h3 { margin: 0 0 .35rem; font-size: 1.2rem; }
.result-count { margin: 0 0 .65rem; font-weight: 800; font-size: 1.05rem; }
.result-card.is-best-card { border-color: #111; background: #fff8d6; }
.result-people { list-style: none; margin: .5rem 0 0; padding: 0; }
.result-people li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.1rem;
  font-weight: 700;
}
.result-people li:last-child { border-bottom: 0; }
.result-people li.me { background: #d9f3ea; margin: 0 -.4rem; padding-left: .4rem; padding-right: .4rem; border-radius: .6rem; }
.result-people .muted.mini {
  text-align: right;
  white-space: normal;
  max-width: 58%;
  font-size: 16px;
  font-weight: 700;
}
.result-people .mark-maybe { color: var(--maybe); }
.result-people .mark-no { color: var(--no); }
.grid-scroll { display: none; overflow: auto; max-height: min(75vh, 820px); border: 2px solid var(--line); border-radius: 1rem; background: #fff; }
@media (min-width: 900px) {
  .result-cards { display: none; }
  .grid-scroll { display: block; }
}
.grid-scroll table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 17px; }
.grid-scroll th, .grid-scroll td { border-bottom: 2px solid var(--line-soft); border-right: 2px solid var(--line-soft); padding: .75rem .85rem; white-space: nowrap; }
.grid-scroll thead th { position: sticky; top: 0; z-index: 3; background: #ece7dc; font-size: 16px; font-weight: 800; }
.sticky-col { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 8rem; font-weight: 800; }
.grid-scroll thead .sticky-col { z-index: 4; background: #ece7dc; }
tr.me .sticky-col, tr.me td { background: #d9f3ea; }
.is-best { background: #ffe566 !important; }
.is-best-cell { background: #fff4b8; }
.center, .mark-cell { text-align: center; font-size: 1.55rem; font-weight: 800; }
.pill { background: var(--accent); color: #fff; border-radius: 999px; font-size: 14px; font-weight: 800; padding: .15rem .5rem; }
.alert { background: #fde8e6; color: #7a160f; border: 2px solid var(--no); padding: .9rem 1rem; border-radius: 1rem; font-weight: 700; }
.notice { background: var(--accent-soft); border: 2px solid var(--accent); border-radius: 1.15rem; padding: 1rem 1.25rem; font-weight: 700; }
.box { background: #f7f5f0; border: 2px solid var(--line-soft); border-radius: 1rem; padding: 1rem; margin: .75rem 0; }
.box h3 { margin-top: 0; }
.box-keep { background: var(--accent-soft); border-color: var(--accent); }
.box .btn { margin-top: .5rem; }
.break { word-break: break-all; font-weight: 700; }
.inline { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: #f7f5f0; border: 2px solid var(--line-soft); border-radius: 1rem; padding: .75rem .9rem; margin: .45rem 0; }
.linkish, .danger { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; color: var(--accent-dark); text-decoration: underline; }
.danger { color: var(--no); }
.danger-box { background: #fde8e6; border-color: #efc4bc; }
.pre { white-space: pre-wrap; }
.center-box { text-align: center; padding: 2rem; }
.strong { font-weight: 800; color: var(--accent-dark); }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 700; }
.check input { width: auto; min-height: 24px; }
.month-nav { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.month-nav button, #selected-list button[data-remove] {
  width: auto; min-height: 44px; border-radius: 999px; padding: .55rem 1rem; border: 2px solid var(--line);
  background: #fff; cursor: pointer; font: inherit; font-weight: 800;
}
.slim { max-width: 32rem; margin: 0 auto; }
.prose { font-size: 18px; }
.prose h2 { margin-top: 1.4rem; }
.list-head { font-weight: 800; color: var(--ink); margin-bottom: .5rem !important; }
.share-box { margin-top: .25rem; }
.share-box summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  padding: .2rem 0;
}
.share-box[open] summary { margin-bottom: .6rem; }
em { color: var(--accent-dark); font-style: normal; font-weight: 800; font-size: 16px; }
a { color: var(--accent-dark); }
h1, h2 { line-height: 1.4; }
h2 { font-size: 1.4rem; }
@media (max-width: 700px) {
  .wrap { padding: 1rem .9rem 2.25rem; }
  .wide-only { display: none; }
  .brand { gap: .55rem; }
  .brand small { display: none; }
  .brand strong { font-size: 1.15rem; }
  .logo-mark { width: 2.4rem; height: 2.4rem; border-radius: .75rem; font-size: 1.05rem; }
  nav { gap: .4rem; }
  nav .btn {
    min-height: 44px;
    padding: .4rem .8rem;
    font-size: 16px;
  }
  .site-footer { align-items: flex-start; gap: .5rem; }
}
