/* Nextonton の見た目。画像は使わず CSS だけで描く */
:root {
  --tt-bg: #e8e8e8;
  --tt-text: #555;
  --tt-pink: #fe899c;
  --tt-pink-dark: #ec6f85;
  --tt-head: #a9a9a9;
  --tt-line: #dcdcdc;
  --tt-link: #2f72a9;
  --mk-s-bg: #3cacff; --mk-s-fg: #fff;
  --mk-o-bg: #79c6ff; --mk-o-fg: #fff;
  --mk-m-bg: #ffe07c; --mk-m-fg: #ff9900;
  --mk-x-bg: #cacaca; --mk-x-fg: #898989;
  --tt-off: #dcdcdc;
}
body { background: var(--tt-bg); color: var(--tt-text); font-size: 0.875rem; }
a { color: var(--tt-link); }
.app-container { max-width: 1000px; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ヘッダーとフッター */
.tt-header { padding: 0.9rem 0 0.6rem; }
.tt-header .container { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 0.25rem 2rem; }
.tt-logo { text-decoration: none; color: var(--tt-pink); line-height: 1.1; }
.tt-logo-main { display: block; font-size: 1.9rem; font-weight: 300; letter-spacing: 0.12em; }
.tt-logo-sub { display: block; font-size: 0.68rem; color: #666; font-weight: bold; letter-spacing: 0.02em; }
.tt-nav a { color: #666; text-decoration: none; font-size: 0.8rem; font-weight: bold; margin-right: 1.5rem; }
.tt-nav a:hover { color: var(--tt-pink-dark); }
.tt-footer { background: #c8c8c8; color: #666; font-size: 0.75rem; padding: 1rem 0; margin-top: 3rem; }

/* 白いカードと灰色の見出し帯 */
.tt-card { background: #fff; border-radius: 8px; margin-bottom: 1.25rem; }
.tt-card-body { padding: 1rem 1.25rem; }
.tt-card-head {
  background: var(--tt-head); color: #fff; border-radius: 8px 8px 0 0;
  padding: 0.55rem 1.25rem; font-size: 1.15rem; display: flex; align-items: center; gap: 0.6rem;
}
.tt-card-head .tt-step { font-weight: 300; letter-spacing: 0.04em; }
.tt-card-head .tt-arrow { font-weight: bold; }
.tt-head-icon {
  width: 1.7rem; height: 1.7rem; border-radius: 4px; background: #fff; color: var(--tt-pink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; flex: none;
}
.tt-title { border-left: 4px solid var(--tt-pink); padding-left: 0.75rem; font-size: 1.3rem; font-weight: normal; color: #444; margin: 0; }
.tt-title-line { border-bottom: 1px solid var(--tt-line); padding-bottom: 0.6rem; margin-bottom: 0.75rem; }
.tt-title .tt-accent { color: var(--tt-pink); }
.tt-badge { display: inline-block; background: var(--tt-head); color: #fff; font-size: 0.72rem; padding: 0.1rem 0.9rem; margin-right: 0.6rem; }
.tt-badge-pink { background: var(--tt-pink); }
.tt-meta-row { margin-top: 0.35rem; display: flex; align-items: baseline; flex-wrap: wrap; }
.tt-decision { font-size: 1.05rem; color: #333; font-weight: bold; }

/* ピンクのボタン（左に矢印の四角） */
.tt-btn {
  display: inline-flex; align-items: stretch; border: 0; padding: 0; border-radius: 4px; overflow: hidden;
  background: linear-gradient(#ff9fb0, var(--tt-pink-dark)); color: #fff; font-size: 0.85rem; text-decoration: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12); cursor: pointer;
}
.tt-btn::before { content: '➜'; display: flex; align-items: center; padding: 0 0.7rem; background: rgba(0, 0, 0, 0.12); }
.tt-btn > span { padding: 0.55rem 1.4rem; letter-spacing: 0.08em; white-space: nowrap; }
.tt-btn:hover { color: #fff; filter: brightness(1.05); }
.tt-btn:disabled { opacity: 0.6; cursor: default; }
.tt-btn-lg > span { padding: 0.65rem 1.6rem; font-size: 0.95rem; }
.tt-link-arrow { margin-right: 1.25rem; white-space: nowrap; }
.tt-link-arrow::before {
  content: '▸'; display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem;
  border: 1px solid #ccc; border-radius: 50%; color: #777; font-size: 0.6rem; margin-right: 0.35rem; text-decoration: none; vertical-align: 0.05em;
}
.btn-linklike { background: none; border: 0; padding: 0; color: var(--tt-link); text-decoration: underline; font-size: inherit; }

/* フォーム（左に見出し、右に入力） */
.tt-form-row { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.6rem 0; border-bottom: 1px dotted var(--tt-line); }
.tt-form-row:last-child { border-bottom: 0; }
.tt-form-label { flex: 0 0 8.5rem; padding-top: 0.3rem; font-size: 0.8rem; }
.tt-form-label::after { content: '：'; float: right; }
.tt-form-field { flex: 1; min-width: 0; }
.tt-form-field .form-control, .tt-form-field .form-select { font-size: 0.85rem; border-radius: 0; }
.tt-help { font-size: 0.75rem; color: #888; margin-top: 0.25rem; }
@media (max-width: 575.98px) {
  .tt-form-row { flex-direction: column; gap: 0.2rem; }
  .tt-form-label { flex: none; }
  .tt-form-field { width: 100%; }
  .tt-form-label::after { content: ''; }
}

/* カレンダー（2か月分を格子で） */
.calendar-wrap > input { display: none; }
.calendar-wrap .flatpickr-calendar { width: 100% !important; box-shadow: none; background: transparent; font-size: 0.8rem; }
.calendar-wrap .flatpickr-months { margin-bottom: 0.4rem; }
.calendar-wrap .flatpickr-month { height: 2rem; color: #555; }
.calendar-wrap .flatpickr-current-month { font-size: 0.85rem; padding-top: 0.4rem; }
.calendar-wrap .flatpickr-innerContainer, .calendar-wrap .flatpickr-rContainer { width: 100%; }
.calendar-wrap .flatpickr-weekdays { width: 100%; }
.calendar-wrap .flatpickr-weekdaycontainer { gap: 0; }
.calendar-wrap .flatpickr-days { width: 100% !important; border: 0; gap: 0.75rem; }
.calendar-wrap .dayContainer {
  width: auto; min-width: 0; max-width: none; flex: 1; padding: 0;
  border-top: 1px solid #c8c8c8; border-left: 1px solid #c8c8c8; justify-content: flex-start;
}
.calendar-wrap span.flatpickr-weekday { color: #555; font-size: 0.75rem; background: #f3f3f3; border: 1px solid #c8c8c8; border-width: 1px 1px 0 0; }
.calendar-wrap .flatpickr-weekdaycontainer { border-left: 1px solid #c8c8c8; }
.calendar-wrap .flatpickr-day {
  max-width: none; flex-basis: calc(100% / 7); height: 1.9rem; line-height: 1.9rem; margin: 0;
  border: 0; border-right: 1px solid #c8c8c8; border-bottom: 1px solid #c8c8c8; border-radius: 0; color: #444;
}
.calendar-wrap .dayContainer { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.calendar-wrap .flatpickr-day:not(.flatpickr-disabled) { touch-action: none; }
.calendar-wrap .flatpickr-day:hover { background: #e6f4ff; border-color: #c8c8c8; }
.calendar-wrap .flatpickr-day.today { box-shadow: inset 0 0 0 2px #e05a5a; }
.calendar-wrap .flatpickr-day.prevMonthDay, .calendar-wrap .flatpickr-day.nextMonthDay,
.calendar-wrap .flatpickr-day.flatpickr-disabled { color: #bbb; background: #fafafa; }
.calendar-wrap .flatpickr-day.selected, .calendar-wrap .flatpickr-day.selected:hover {
  background: var(--mk-o-bg); color: #fff; border-color: #c8c8c8; font-weight: bold;
}

/* タイムライン（共通） */
.tl-scroll { overflow-x: auto; overflow-y: hidden; }
.tl { border-collapse: collapse; width: 100%; min-width: 46rem; font-size: 0.75rem; table-layout: fixed; }
.tl th, .tl td { padding: 0; }
.tl-name { width: 10rem; text-align: left; font-weight: normal; padding: 0.35rem 0.8rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-datecell { background: #f3f3f3; border: 1px solid #c8c8c8; font-size: 0.85rem; color: #444; vertical-align: middle; }
.tl-hour { text-align: left; font-weight: normal; color: #666; font-size: 0.7rem; height: 1.3rem; padding-left: 2px !important; border-left: 1px solid #c8c8c8; position: relative; }
.tl-hour::after { content: ''; position: absolute; left: 50%; bottom: 0; height: 0.3rem; border-left: 1px solid #c8c8c8; }
.tl-headrow th { background: #fff; border-top: 1px solid #c8c8c8; }
.tl-headrow th:last-child { border-right: 1px solid #c8c8c8; }
.tl-candrow td { height: 1.3rem; }
.tl-gap td { height: 1.1rem; border: 0 !important; background: transparent !important; }
.tl-cell { height: 1.65rem; text-align: center; vertical-align: middle; line-height: 1; background: #fff; border-bottom: 1px solid #fff; font-size: 0.65rem; }
.tl-h1 { border-left: 1px solid #fff; }
.tl-h2 { border-left: 1px solid #fff; }
.tl-off { background: var(--tt-off); color: var(--tt-off); }
.tl-on { background: #f9f9f9; }
.tl tr > td:last-child { border-right: 1px solid #c8c8c8; }
.tl-person-row th { border: 1px solid #c8c8c8; background: #fff; }
.tl-person-row td { border-top: 1px solid #c8c8c8; border-bottom: 1px solid #c8c8c8; }
.tl-person { max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: left; font-size: 0.85rem; }
.mk-s { background: var(--mk-s-bg) !important; color: var(--mk-s-fg) !important; }
.mk-o { background: var(--mk-o-bg) !important; color: var(--mk-o-fg) !important; }
.mk-m { background: var(--mk-m-bg) !important; color: var(--mk-m-fg) !important; }
.mk-x { background: var(--mk-x-bg) !important; color: var(--mk-x-fg) !important; }
.tl-count { font-weight: bold; color: #2f72a9; background: rgba(121, 198, 255, calc(var(--lv, 0) * 0.45)); }
.tl-best { box-shadow: inset 0 0 0 2px #3cacff; }
.tl-count-row th { color: #888; font-size: 0.72rem; }
.tl-count-row th, .tl-count-row td { border-top: 1px solid #c8c8c8; }

.tl col.tl-namecol { width: 10rem; }
/* 横にスクロールしても名前と日付が見えるように固定する */
.tl th.tl-name { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 #c8c8c8; }
.tl th.tl-datecell { background: #f3f3f3; }
@media (max-width: 575.98px) { .tl col.tl-namecol { width: 6.5rem; } .tl-name { padding: 0.35rem 0.4rem !important; } }
.tl-candrow td { border-bottom: 1px solid #c8c8c8; }
.pg-blank { background: #fff; border-left: 1px solid #e6e6e6 !important; }
.pg-table .tl-candrow td.tl-cell, .pg-table .tl-person-row td.tl-cell { border-left: 1px solid #fff; }
.pg-table .tl-candrow td.pg-blank, .pg-table .tl-candrow td.tl-on { background: #fff; border-left: 1px solid #e6e6e6; }

/* 入力用（なぞって塗る） */
.pg-table td.tl-cell { cursor: pointer; height: 2.2rem; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pg-table td.tl-off { cursor: not-allowed; }
.pg-table { touch-action: pan-x pan-y; }
@media (hover: hover) { .pg-table td.tl-cell:not(.tl-off):hover { box-shadow: inset 0 0 0 2px var(--mk-o-bg); } }
.pg-dayinfo { font-size: 0.72rem; margin-top: 0.15rem; }
.pg-dayinfo .btn-linklike { margin-right: 0.15rem; }

/* 利用マークの選択 */
.mark-pick { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; }
.mark-pick label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 4px; border: 2px solid transparent; }
.mark-pick input { position: absolute; opacity: 0; pointer-events: none; }
.mark-pick input:checked + label { border-color: #3cacff; background: #eef8ff; }
.mark-pick input:focus-visible + label { outline: 2px solid #3cacff; }
.mark-chip { display: inline-flex; width: 1.4rem; height: 1.4rem; align-items: center; justify-content: center; font-size: 0.75rem; border-radius: 2px; }

/* コメント（吹き出し） */
.tt-comment { display: flex; align-items: center; gap: 0.6rem; margin: 0.6rem 0; }
.tt-comment-icon {
  flex: none; width: 2rem; height: 1.4rem; border-radius: 50% 50% 45% 45%; background: var(--tt-pink); position: relative;
}
.tt-comment-icon::after { content: ''; position: absolute; left: 0.35rem; bottom: -0.3rem; border: 0.3rem solid transparent; border-top-color: var(--tt-pink); border-bottom: 0; }
.tt-bubble { position: relative; border: 1px solid #ccc; background: #fff; padding: 0.5rem 0.9rem; font-weight: bold; color: #444; max-width: 100%; }
.tt-bubble::before { content: ''; position: absolute; left: -0.45rem; top: 50%; margin-top: -0.4rem; border: 0.4rem solid transparent; border-right-color: #ccc; border-left: 0; }
.tt-bubble .tt-bubble-text { font-weight: normal; margin-left: 0.4rem; }

.tt-pagetop { text-align: right; font-size: 0.75rem; margin: -0.5rem 0 1rem; }
.tt-url { font-size: 0.95rem; border-radius: 0; border: 2px solid var(--tt-line); padding: 0.55rem 0.6rem; }
.tt-modal .modal-content { border-radius: 8px; border: 0; }
.tt-modal .modal-header { background: var(--tt-head); color: #fff; border-radius: 8px 8px 0 0; padding: 0.6rem 1.25rem; }
.tt-modal .modal-title { font-size: 1.1rem; font-weight: normal; }
.tt-modal .btn-close { filter: invert(1) grayscale(1) brightness(2); }
.tt-modal .modal-body { font-size: 0.85rem; }
.sticky-marks { position: sticky; top: -1rem; z-index: 3; background: #fff; border-bottom: 1px solid var(--tt-line); }

/* ヘッダー右の利用規約リンク・トップのピンク帯 */
.tt-nav-right { margin-left: auto; }
.tt-nav-right a { margin-right: 0; }
.tt-header-pink { background: var(--tt-pink); padding-bottom: 0.8rem; }
.tt-header-pink .tt-logo, .tt-header-pink .tt-logo-sub, .tt-header-pink .tt-nav a { color: #fff; }

/* トップページ */
.tt-hero { background: #fff; margin-bottom: 1.5rem; }
.tt-hero .container { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 3rem; padding-top: 2rem; padding-bottom: 2rem; }
.tt-hero-copy { font-size: 1.05rem; line-height: 2.1; letter-spacing: 0.1em; color: #555; margin: 0 0 1rem; }
.tt-hero-art { flex: 0 1 380px; min-width: 0; }
.tt-hero-art .tl { min-width: 0; font-size: 0.6rem; }
.tt-hero-art .tl-cell { height: 1.2rem; }
.tt-hero-art .tl col.tl-namecol { width: 5.5rem; }
.tt-feature { background: #fff; border-radius: 8px; padding: 1.1rem 1.25rem; height: 100%; }
.tt-feature-num { display: inline-flex; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--tt-pink); color: #fff; align-items: center; justify-content: center; font-weight: bold; margin-right: 0.4rem; }
.tt-feature h2 { font-size: 0.95rem; font-weight: bold; color: #444; display: flex; align-items: center; margin-bottom: 0.5rem; }
.tt-feature p { margin: 0; line-height: 1.8; }

/* フッターのリンク */
.tt-footer .container { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; }
.tt-footer a { color: #555; text-decoration: none; }
.tt-footer a:hover { text-decoration: underline; }
.tt-footer .tt-footer-note { margin-left: auto; }

/* 文章のページ（規約など） */
.tt-doc { line-height: 1.9; }
.tt-doc h2 { font-size: 1rem; font-weight: bold; color: #444; border-left: 3px solid var(--tt-pink); padding-left: 0.5rem; margin: 1.5rem 0 0.5rem; }
.tt-doc h2:first-child { margin-top: 0; }
.tt-doc pre { white-space: pre-wrap; font-size: 0.75rem; background: #f6f6f6; padding: 0.75rem; }
.tt-unofficial { font-size: 0.8rem; color: #777; }

/* 利用マークの選択（作成画面） */
.mark-checks { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; padding-top: 0.25rem; }
.mark-checks label { display: inline-flex; align-items: center; gap: 0.3rem; }

/* スマホでの予定入力：1時間を1行にして、縦に並べる */
.pg-vday { margin-bottom: 1rem; }
.pg-vhead { display: flex; align-items: center; gap: 0.6rem; background: #f3f3f3; border: 1px solid #c8c8c8; padding: 0.35rem 0.6rem; font-size: 0.9rem; }
.pg-vlist { border: 1px solid #c8c8c8; border-top: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pg-vrow { display: grid; grid-template-columns: 4.6rem 1fr 1fr; border-top: 1px solid #e6e6e6; }
.pg-vrow:first-child { border-top: 0; }
.pg-vtime { display: flex; align-items: center; justify-content: flex-end; padding-right: 0.5rem; font-size: 0.8rem; color: #666; background: #fafafa; }
.pg-vcell { height: 2.75rem; display: flex; align-items: center; justify-content: center; font-size: 1rem; background: #fff; border-left: 1px solid #e6e6e6; cursor: pointer; }
.pg-vcell:not(.tl-off) { touch-action: none; } /* 押しながら滑らせて塗る。スクロールは時刻の列で */
.pg-vcell.tl-off { cursor: not-allowed; }
.pg-vcell .pg-vmin { font-size: 0.7rem; color: #bbb; }
.pg-vgap { height: 0.5rem; background: var(--tt-off); }
.pg-hint { font-size: 0.75rem; color: #777; margin: 0.25rem 0 0.5rem; }

/* 寄付の案内 */
.tt-donate { background: #fff7f8; border: 1px solid #f6c6cf; border-radius: 8px; padding: 1rem 1.25rem; margin: 1rem 0; }

/* カレンダーから入力 */
.cal-box { background: #f6fbff; border: 1px solid #cfe6fb; border-radius: 6px; padding: 0.6rem 0.8rem; }

/* 凡例・スマホだけの案内 */
.tt-legend { font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; }
.tt-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
@media (min-width: 576px) { .only-narrow { display: none !important; } }
.pg-vcell .pg-vmin-on { font-size: 0.65rem; opacity: 0.85; margin-left: 0.25rem; }
.tl-cell.mk-s, .tl-cell.mk-o, .tl-cell.mk-m, .tl-cell.mk-x, .pg-vcell.mk-s, .pg-vcell.mk-o, .pg-vcell.mk-m, .pg-vcell.mk-x { font-weight: bold; }
@media (max-width: 575.98px) {
  .calendar-wrap .flatpickr-day { height: 2.4rem; line-height: 2.4rem; }
  .sticky-marks .mark-pick { gap: 0.25rem 0.6rem; }
  .sticky-marks .mark-pick > .small { display: none; }
}

/* スマホでは印の名前を短くして、貼りつく帯を1行におさめる */
.lbl-short { display: none; }
@media (max-width: 575.98px) {
  .sticky-marks .lbl-long { display: none; }
  .sticky-marks .lbl-short { display: inline; }
  .sticky-marks .mark-pick label { padding: 0.15rem 0.3rem; }
}

/* 説明ページの見出し・目次・画面の画像 */
.tt-doc h3 { font-size: 0.95rem; font-weight: bold; color: #444; margin: 1.25rem 0 0.4rem; }
.tt-toc { list-style: none; padding: 0.6rem 1rem; margin-bottom: 1.5rem; background: #f6f6f6; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.tt-doc figure { margin: 0.75rem 0 1.25rem; }
.tt-doc figure img { display: block; max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 6px; }
.tt-doc figcaption { font-size: 0.8rem; color: #777; margin-top: 0.35rem; }
.tt-doc .fig-narrow img { max-width: 420px; }
.tt-doc .fig-phone img { max-width: 260px; }
.tt-doc .fig-row { display: flex; flex-wrap: wrap; gap: 0 1.5rem; align-items: flex-start; }
