/* Layout: one narrow column like a pocket notebook; the answer grid scrolls sideways inside its own box. */
:root {
  --bg: #F4F7F6;
  --dot: #DCE6E3;
  --paper: #ffffff;
  --ink: #1F2A28;
  --muted: #66736F;
  --line: #E1E8E6;
  --accent: #0F9B8E;
  --accent-ink: #ffffff;
  --warm: #FF8A3D;
  --warm-soft: #FFEEE0;
  --ok: #0F9B8E;
  --maybe: #D98A1C;
  --no: #D9534F;
  --ok-soft: #E2F5F2;
  --maybe-soft: #FDF1DE;
  --no-soft: #FBE7E6;
  --best: #FFF4EA;
  --h0: #EEF3F2; --h1: #CDEDE8; --h2: #9EDBD2; --h3: #5FC2B5; --h4: #1FA595; --h5: #0B786F;
  --shadow: 0 1px 2px rgba(31, 42, 40, .05), 0 6px 18px rgba(31, 42, 40, .06);
  --font-display: "Zen Maru Gothic", "Be Vietnam Pro", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Be Vietnam Pro", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  color-scheme: light;
}
:root[lang="vi"], :root[lang="en"] {
  --font-display: "Be Vietnam Pro", "Zen Maru Gothic", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", "Zen Kaku Gothic New", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111716; --dot: #1E2826; --paper: #1A2321; --ink: #EEF4F2; --muted: #A5B3AF; --line: #2D3A37;
    --accent: #3CC3B4; --accent-ink: #06201D; --warm: #FF9E5C; --warm-soft: #3A2617;
    --ok: #3CC3B4; --maybe: #E9AB52; --no: #F07B76;
    --ok-soft: #173B37; --maybe-soft: #3A2C17; --no-soft: #3A1E1D; --best: #2A2119;
    --h0: #1E2826; --h1: #173B37; --h2: #1A5550; --h3: #1E716A; --h4: #26948A; --h5: #3CC3B4;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background-color: var(--bg); background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px); background-size: 22px 22px; color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.7; }
.wrap { max-width: 760px; margin: 0 auto; padding-block: max(20px, env(safe-area-inset-top, 0px)) max(40px, env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 20px; }
.top { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--ink); text-decoration: none; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 10px; }
.logo { width: 36px; height: 36px; flex: none; }
.brand b { color: var(--accent); font-weight: 700; }
.langs { display: flex; gap: 4px; margin-left: auto; }
.langs button { padding: 4px 10px; font-size: .8rem; border-radius: 99px; }
.langs button[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tag { color: var(--muted); font-size: .85rem; flex-basis: 100%; }
main { display: flex; flex-direction: column; gap: 20px; }
h1, h2 { font-family: var(--font-display); font-weight: 700; text-wrap: balance; margin: 0; line-height: 1.35; }
h1 { font-size: 1.35rem; overflow-wrap: anywhere; }
h2 { font-size: 1.05rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
label, .label { font-weight: 700; font-size: .85rem; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
input, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; cursor: pointer; border-radius: 10px; padding: 10px 16px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 700; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.big { padding: 13px 22px; font-size: 1.05rem; border-radius: 14px; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.big:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.danger { color: var(--no); border-color: var(--no); background: transparent; }
.ghost { background: transparent; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }
.err { color: var(--no); font-size: .9rem; margin: 0; font-weight: 700; }
.notice { background: var(--paper); border: 1px dashed var(--line); border-radius: 14px; padding: 16px 20px; color: var(--muted); margin: 0; }
.list { display: flex; flex-direction: column; gap: 8px; }
.section { display: flex; flex-direction: column; gap: 10px; }
.ev { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.ev:hover { border-color: var(--accent); }
.ev strong { font-size: 1rem; min-width: 0; overflow-wrap: anywhere; }
.ev .go { color: var(--accent); font-weight: 700; font-size: .85rem; }
.back { color: var(--accent); text-decoration: none; font-weight: 700; font-size: .9rem; align-self: flex-start; }
.memo { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.meta { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; margin: 0; }
.sharebox { display: flex; flex-direction: column; gap: 6px; background: var(--bg); border-radius: 12px; padding: 12px; }
.sharebox .url { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.sharebox input { background: var(--paper); font-size: .85rem; }
.sharebox button { padding: 8px 12px; }
@media (max-width: 480px) { .sharebox .url { grid-template-columns: 1fr 1fr; } .sharebox .url input { grid-column: 1 / -1; } }
.tablewrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
tr:last-child > * { border-bottom: none; }
th { font-size: .82rem; color: var(--muted); font-weight: 700; }
th.date, td.date { text-align: left; position: sticky; left: 0; background: var(--paper); z-index: 1; border-right: 1px solid var(--line); }
td.date { font-weight: 700; color: var(--ink); white-space: normal; min-width: 9em; max-width: 14em; }
tr.best td, tr.best td.date { background: var(--best); }
.pill { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; font-weight: 700; color: #fff; background: var(--warm); border-radius: 99px; padding: 1px 8px 1px 5px; margin-left: 6px; vertical-align: 2px; }
.pill .ic { width: 12px; height: 12px; }
.n { font-weight: 700; }
.n.o { color: var(--ok); } .n.t { color: var(--maybe); } .n.x { color: var(--no); }
.m { font-size: 1.1rem; font-weight: 700; }
.m.o { color: var(--ok); } .m.t { color: var(--maybe); } .m.x { color: var(--no); } .m.none { color: var(--muted); }
.who { background: none; border: none; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; font-size: .85rem; max-width: 8em; overflow: hidden; text-overflow: ellipsis; }
td.cm { font-size: .8rem; color: var(--muted); white-space: normal; min-width: 6em; max-width: 10em; overflow-wrap: anywhere; text-align: left; vertical-align: top; }
.choices { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.choice { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.choice:last-child { border-bottom: none; }
.choice .d { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.seg { display: flex; gap: 6px; }
.seg button { width: 58px; height: 54px; padding: 4px 0 2px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--muted); }
.seg button small { font-size: .66rem; line-height: 1.2; font-weight: 700; }
.seg button .mk { width: 22px; height: 22px; }
.seg button.o .mk { color: var(--ok); } .seg button.t .mk { color: var(--maybe); } .seg button.x .mk { color: var(--no); }
.seg button[aria-pressed="true"] .mk, .seg button[aria-pressed="true"] small { color: var(--paper); }
.seg button[aria-pressed="true"].o { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.seg button[aria-pressed="true"].t { background: var(--maybe); border-color: var(--maybe); color: var(--paper); }
.seg button[aria-pressed="true"].x { background: var(--no); border-color: var(--no); color: var(--paper); }
.cal { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-head strong { font-family: var(--font-display); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.cal-head button { padding: 6px 12px; font-size: .85rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .wd { text-align: center; font-size: .75rem; color: var(--muted); font-weight: 700; }
.cal-grid .wd.sun, .day.sun { color: var(--no); }
.cal-grid .wd.sat, .day.sat { color: var(--accent); }
.day { height: 44px; min-width: 0; padding: 0; border-radius: 10px; font-size: .95rem; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; }
.day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day.today { box-shadow: inset 0 0 0 2px var(--line); }
.day:disabled { border-color: transparent; background: transparent; }
.cands { display: flex; flex-direction: column; gap: 6px; }
.cand { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.cand button { padding: 6px 12px; color: var(--no); }
.addfree { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.confirm { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.foot { color: var(--muted); font-size: .8rem; display: flex; flex-direction: column; gap: 6px; }
.foot p { margin: 0; }
.foot summary { cursor: pointer; font-weight: 700; }
.foot details p { margin-top: 6px; }
.foot a { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { button, .ev { transition: border-color .15s, background-color .15s; } }
.decided { display: flex; flex-direction: column; gap: 8px; background: var(--best); border: 2px solid var(--warm); border-radius: 14px; padding: 14px; }
.decided strong { font-family: var(--font-display); font-size: 1.1rem; display: flex; align-items: center; gap: 6px; }
.decided strong .ic { color: var(--warm); width: 22px; height: 22px; }
.decide { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.decide #dc-undo { grid-column: 1 / -1; justify-self: start; }
select { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.btnlink { display: inline-block; border-radius: 10px; padding: 10px 16px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 700; text-decoration: none; }
.btnlink:hover { border-color: var(--accent); }
.linkish { background: none; border: none; padding: 4px 0; color: var(--muted); font-weight: 400; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
.hid { opacity: .45; }

/* 飾り：アイコン・トップの絵・数のチップ・○△× */
.ic { width: 20px; height: 20px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 6px 0 4px; }
.hero-art { width: min(240px, 70%); height: auto; }
.hero-art .paper { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.hero-art .head { fill: var(--warm); }
.hero-art .pin { fill: var(--ink); }
.hero-art .ring { fill: none; stroke: var(--warm); stroke-width: 3; }
.hero-art .h0 { fill: var(--h0); } .hero-art .h1 { fill: var(--h1); } .hero-art .h2 { fill: var(--h2); }
.hero-art .h3 { fill: var(--h3); } .hero-art .h4 { fill: var(--h4); } .hero-art .h5 { fill: var(--h5); }
.hero-h { font-size: 1.15rem; }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.how li { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: var(--shadow); min-width: 0; }
.how strong { font-size: .9rem; line-height: 1.4; }
.how span:last-child { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.how-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--ok-soft); color: var(--accent); }
.how-ic .ic { width: 24px; height: 24px; }
.how-n { position: absolute; top: -8px; left: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--warm); color: #fff; font-weight: 700; font-size: .8rem; display: grid; place-items: center; font-family: var(--font-display); }
@media (max-width: 520px) {
  .how { grid-template-columns: 1fr; }
  .how li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; text-align: left; column-gap: 12px; row-gap: 0; padding: 12px 14px; align-items: center; }
  .how-ic { grid-row: 1 / 3; }
}
.create { gap: 18px; border-top: 5px solid var(--accent); }
.part { display: flex; flex-direction: column; gap: 10px; }
.part + .part { border-top: 1px dashed var(--line); padding-top: 16px; }
.part-h { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1rem; }
.part-h .ic { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--ok-soft); color: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 700; padding: 4px 12px 4px 9px; border-radius: 99px; background: var(--ok-soft); color: var(--accent); }
.chip .ic { width: 16px; height: 16px; }
.chip.warm { background: var(--warm-soft); color: color-mix(in srgb, var(--warm) 75%, var(--ink)); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.mk { width: 20px; height: 20px; vertical-align: middle; }
.mk.o { color: var(--ok); } .mk.t { color: var(--maybe); } .mk.x { color: var(--no); }
.legend .mk { width: 16px; height: 16px; }
.cnt-h .mk { width: 16px; height: 16px; }
td.m.o { background: var(--ok-soft); } td.m.t { background: var(--maybe-soft); } td.m.x { background: var(--no-soft); }
td.m { border-left: 2px solid var(--paper); }
.dash { color: var(--line); }
th.person { vertical-align: bottom; }
th.person .who { display: block; margin: 4px auto 0; }
.av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; font-family: var(--font-display); }
td.date .dl { display: inline; }
.bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--h0); margin-top: 6px; }
.bar i { display: block; height: 100%; }
.bar i.o { background: var(--ok); } .bar i.t { background: var(--maybe); } .bar i.x { background: var(--no); }
tr.best td.date { box-shadow: inset 4px 0 0 var(--warm); }
tr.best td.n.o { color: #fff; background: var(--ok); border-radius: 0; }
.cmrow td { background: var(--bg); }
.av1 { background: #FF8A3D; } .av2 { background: #5B7BD5; } .av3 { background: #C2569B; }
.av4 { background: #3E9B4F; } .av5 { background: #B8862B; } .av6 { background: #7A5BC7; } .av7 { background: #D9534F; }
.av0 { background: #0F9B8E; }
.big .ic { width: 26px; height: 26px; }
td.cm { text-align: center; }
/* iPhone の Safari は日付欄が独自の幅を持ってはみ出すので、ふつうの入力欄にそろえる */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; max-width: 100%; min-height: 46px; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.by { display: flex; align-items: center; gap: 6px; }
.by a { display: inline-flex; border-radius: 8px; }
.by img { display: block; height: 28px; width: auto; }
@media (prefers-color-scheme: dark) { .by img { background: #fff; border-radius: 8px; padding: 2px 6px; box-sizing: content-box; } }
/* Clomli のほかのアプリの案内（公式サイトへ） */
.apps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.apps h2 { font-size: .9rem; color: var(--ink); }
.apps-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .apps-list { grid-template-columns: 1fr; } }
.appbn { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.foot .appbn { color: var(--ink); }
.appbn.yukemuri { background: linear-gradient(135deg, #FFF3E8, #FDE7EF); }
.appbn.hamigaki { background: linear-gradient(135deg, #E6F6FC, #E9F7EE); }
@media (prefers-color-scheme: dark) { .appbn.yukemuri { background: linear-gradient(135deg, #3A2617, #3A1E2A); } .appbn.hamigaki { background: linear-gradient(135deg, #15303A, #173B2A); } }
.appbn img { width: 56px; height: 56px; border-radius: 14px; display: block; }
.appbn > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.appbn strong { font-family: var(--font-display); font-size: .98rem; }
.appbn span span { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.appbn em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--accent); }
.appbn:hover { border-color: var(--accent); }
/* 幹事用のリンク（幹事の端末にだけ出す） */
.ownerbox { border: 1px dashed var(--warm); border-radius: 12px; padding: 10px 12px; background: var(--warm-soft); }
.ownerbox summary { cursor: pointer; font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 6px; list-style: none; }
.ownerbox summary::-webkit-details-marker { display: none; }
.ownerbox summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.ownerbox[open] summary::after { content: '▴'; }
.ownerbox summary .ic { width: 18px; height: 18px; color: var(--warm); }
.ownerbox .hint { margin: 8px 0; }
.ownerbox .url { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.ownerbox input { background: var(--paper); font-size: .85rem; }
.ownerbox button { padding: 8px 12px; }
/* 暗証番号 */
input.pin { max-width: 9em; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.claim { border-top: 1px dashed var(--line); padding-top: 10px; }
.claim summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.claim summary::-webkit-details-marker { display: none; }
.claim summary .ic { width: 16px; height: 16px; }
.claim-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.claim .err { margin-top: 8px; }

/* プライバシー・サポートのページ */
main > .doc + .doc { margin-top: 20px; }
.doc h2 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; }
.doc h3 { margin: 8px 0 0; font-size: 1rem; }
.doc ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; line-height: 1.7; }
.doc p { margin: 0; line-height: 1.7; }
.doc a { color: var(--accent); }
.doc-langs a { padding: 4px 10px; font-size: .8rem; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.doc-links { display: flex; gap: 14px; flex-wrap: wrap; }
