/* きょうログ  スマホファースト。白 / 濃いグレー / 薄いグレー / アクセント 1 色 */

:root {
    --bg: #ffffff;
    --fg: #1f2326;
    --muted: #6b7075;
    --line: #e3e6e8;
    --panel: #f4f5f6;
    --accent: #2a6fdb;
    --accent-fg: #ffffff;
    --danger: #b3261e;
    --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* display を持つ要素でも hidden を効かせる */

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

button { font: inherit; color: inherit; }

/* 全体: 中央寄せ、PC でも広がりすぎない */
.app {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}

/* 1. ヘッダー */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(10px + env(safe-area-inset-top)) 0 4px;
}
.brand {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.logout-form { margin: 0; }
.logout {
    background: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.8rem;
    padding: 6px 12px;
    cursor: pointer;
}
.logout:hover, .logout:focus-visible { color: var(--fg); border-color: var(--muted); }

/* 未ログイン */
.tagline { font-size: 1.25rem; font-weight: 700; margin: 32px 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.btn-primary {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-fg);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

/* 2. 日付と現在時刻: 開いた瞬間に時刻が目に入るよう大きく太く。日付は控えめにその上 */
.today-date {
    text-align: center;
    font-size: 0.95rem;
    color: var(--muted);
    margin: 6px 0 0;
}
.clock {
    text-align: center;
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    margin: 0 0 10px;
}

/* 3. いまの活動 */
.current {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 12px 16px;
    text-align: center;
    margin-bottom: 14px;
}
.current-label { font-size: 0.8rem; color: var(--muted); }
.current-name { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.current-elapsed { font-size: 1rem; color: var(--muted); min-height: 1.5em; }
.current.is-none .current-name { color: var(--muted); font-weight: 500; }

/* 4. 活動ボタン: 2 列グリッド */
.buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}
.act {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 60px;
    padding: 8px 10px;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.08s ease, background-color 0.12s ease;
}
.act:active { transform: scale(0.96); background: var(--panel); }
.act:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.act-icon { font-size: 1.35rem; line-height: 1; flex: 0 0 auto; }
.act-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 現在の duration 活動: 色 + 「いま」の文字で区別する */
.act-now {
    display: none;
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    opacity: 0.9;
}
.act.is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); padding-right: 32px; }   /* 右上の「いま」と重ならないよう右に余白 */
.act.is-current:active { background: #245fbc; }
.act.is-current .act-now { display: block; }

/* event（起床など）: 少し控えめな破線枠 */
.act-event { border-style: dashed; font-weight: 500; }

/* 送信中 */
.act:disabled { opacity: 0.55; cursor: default; transform: none; }
.act.is-sending { opacity: 0.8; }

/* 通知 */
.toast {
    min-height: 1.6em;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
    margin: 4px 0 12px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.toast.is-visible { opacity: 1; }
.toast.is-error { color: var(--danger); }

/* 5. 今日の記録 */
.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 8px 0 6px;
}
.timeline-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

/* 各行: 普段は削除ボタンを見せない。
   スマホ = 行を左へスワイプすると、後ろに隠れている赤い「削除」が右側に現れる
   PC     = hover / focus のときだけ右端に小さく「削除」を出す */
.timeline-item {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    transition: max-height 0.2s ease, opacity 0.18s ease;
    max-height: 140px;
}
.timeline-row {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 4px;
    background: var(--bg);
    border: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y;                 /* 縦スクロールはブラウザに任せ、横だけ JS で見る */
    transition: transform 0.18s ease;
}
.timeline-row:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.timeline-main { display: flex; align-items: baseline; gap: 14px; }
.timeline-item.is-dragging .timeline-row { transition: none; }
.timeline-item.is-open .timeline-row { transform: translateX(-84px); }
.timeline-time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.2em; }
.timeline-name { font-weight: 600; }
.timeline-item.is-event .timeline-name { font-weight: 500; color: var(--muted); }
/* メモ: 活動名より小さくグレー。長くても 2 行までで省略（全文は編集画面で） */
.timeline-memo {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 2px 0 0 calc(3.2em + 14px);
    font-size: 0.85rem;
    color: var(--muted);
    white-space: pre-wrap;
    word-break: break-word;
}
.timeline-item.is-new .timeline-row { animation: fadein 0.4s ease; }
.timeline-item.is-removing { max-height: 0; opacity: 0; border-bottom-width: 0; }
.timeline-empty { color: var(--muted); font-size: 0.9rem; padding: 12px 4px; margin: 0; }

.timeline-delete {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 84px;
    border: 0;
    background: #d94c3d;                 /* 落ち着いた赤 */
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;                          /* 普段は見せない。スワイプで開いたときだけ現す */
    transition: opacity 0.12s ease;
}
.timeline-item.is-dragging .timeline-delete,
.timeline-item.is-open .timeline-delete { opacity: 1; }
.timeline-delete:active { background: #bf3f32; }
.timeline-delete:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* マウス操作できる環境: 行は動かさず、hover / focus のときだけ右端に小さく表示 */
@media (hover: hover) and (pointer: fine) {
    .timeline-item.is-open .timeline-row { transform: none; }
    .timeline-delete {
        z-index: 2;
        top: 50%;
        bottom: auto;
        right: 6px;
        transform: translateY(-50%);
        width: auto;
        padding: 4px 10px;
        border-radius: 999px;
        background: transparent;
        color: var(--danger);
        border: 1px solid transparent;
        opacity: 0;
        transition: opacity 0.12s ease;
    }
    .timeline-item .timeline-delete { opacity: 0; }
    .timeline-item:hover .timeline-delete,
    .timeline-item .timeline-delete:focus-visible { opacity: 1; border-color: var(--line); }
    .timeline-delete:hover { background: #fbe9e7; }
    .timeline-delete:focus-visible { outline-offset: 2px; }
}

/* 「削除しました 元に戻す」の通知 */
.toast-undo {
    margin-left: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 4px 12px;
    cursor: pointer;
}
.toast-undo:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@keyframes fadein { from { background: var(--panel); } to { background: transparent; } }

/* 狭い端末（〜340px）: ボタン文字を少しだけ小さく */
@media (max-width: 340px) {
    .act { font-size: 1.05rem; padding: 8px 6px; gap: 6px; }
    .act-icon { font-size: 1.2rem; }
    .clock { font-size: 46px; }
}

/* 広い画面: ボタンを少し高く、余白を広げる */
@media (min-width: 480px) {
    .app { padding-left: 24px; padding-right: 24px; }
    .act { min-height: 64px; }
    .clock { font-size: 56px; }
}

/* ------------------------------------------------------------
   編集モーダル（時刻・メモ）
   ------------------------------------------------------------ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
}
.modal {
    position: fixed;
    z-index: 101;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 460px;
    background: var(--bg);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
}
.modal form { margin: 0; }
.modal-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 2px; }
.modal-activity { color: var(--muted); font-size: 0.9rem; margin: 0 0 14px; }
.modal-label { display: block; font-size: 0.85rem; color: var(--muted); margin: 10px 0 4px; }
.modal-time {
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg);
    font-size: 1.1rem;
}
.modal-memo {
    width: 100%;
    min-height: 4.5em;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg);
    font: inherit;
    resize: vertical;
}
.modal-time:focus, .modal-memo:focus, .modal-date:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
/* 開始・終了の「日付 ＋ 時刻」を横並びに */
.modal-datetime { display: flex; gap: 8px; }
.modal-datetime .modal-date { flex: 1 1 58%; }
.modal-datetime .modal-time { flex: 1 1 42%; }
.modal-date {
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg);
    font-size: 1.05rem;
}
/* 読み取り専用（フェーズ1の終了欄）は薄く見せる */
.modal-date:read-only, .modal-time:read-only,
.modal-date:disabled, .modal-time:disabled { background: var(--row-hover, #f2f4f6); color: var(--muted); }
.modal-hint { font-size: 0.82rem; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.btn-add-inline { width: 100%; min-height: 44px; margin-top: 8px; font-size: 0.92rem; }
.modal-error { color: var(--danger); font-size: 0.85rem; margin: 8px 0 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-cancel, .modal-save {
    flex: 1;
    min-height: 48px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}
.modal-cancel { background: var(--bg); border: 1px solid var(--line); color: var(--fg); }
.modal-save { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-fg); }
.modal-save:disabled { opacity: 0.6; cursor: default; }
.modal-cancel:focus-visible, .modal-save:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 控えめな削除入口。保存より弱く見せ、かつ誤タップしにくいよう上に余白と区切り線を置く */
.modal-danger {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: center;
}
.modal-delete {
    min-height: 44px;
    padding: 0 18px;
    background: none;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.modal-delete:hover { background: rgba(179,38,30,0.06); border-color: rgba(179,38,30,0.35); }
.modal-delete:focus-visible { outline: 3px solid var(--danger); outline-offset: 2px; }
.modal-delete:disabled { opacity: 0.5; cursor: default; }

/* PC など広い画面では中央のコンパクトなダイアログにする */
@media (min-width: 480px) {
    .modal {
        bottom: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        border-radius: var(--radius);
        width: calc(100% - 48px);
        max-width: 440px;
    }
}

/* ============================================================
   ナビ（記録 / グラフ）
   ============================================================ */
.nav {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}
.nav-link {
    padding: 8px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.nav-link.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   グラフ画面
   ============================================================ */
.datenav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 4px 0 18px;
}
.datenav-label { font-size: 1.05rem; font-weight: 700; text-align: center; }
/* カレンダーアイコン。透明な date 入力を重ねてタップでネイティブのカレンダーを開く */
.datenav-cal {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    flex: 0 0 auto;
    color: var(--muted);
    cursor: pointer;
}
.datenav-cal svg { width: 22px; height: 22px; }
.datenav-cal:hover { color: var(--accent); }
.datenav-date {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    margin: 0; padding: 0; border: 0;
    opacity: 0;
    cursor: pointer;
}
.datenav-date:focus-visible + svg,
.datenav-cal:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.datenav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent);
    text-decoration: none;
    font-size: 1.3rem;
    line-height: 1;
}
.datenav-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.datenav-btn.is-disabled { color: var(--line); border-color: var(--line); cursor: default; }

.section-title { font-size: 1rem; font-weight: 700; margin: 20px 0 8px; }
.chart-empty { color: var(--muted); padding: 24px 0; text-align: center; }

/* 帯グラフ */
.band {
    display: flex;
    width: 100%;
    height: 26px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--panel);
}
.band-seg { height: 100%; }
.band-future { height: 100%; background: repeating-linear-gradient(45deg, #eef1f4, #eef1f4 6px, #f6f8fa 6px, #f6f8fa 12px); }
.band-ticks {
    position: relative;
    height: 1.4em;
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--muted);
}
.band-tick { position: absolute; transform: translateX(-50%); }
.band-tick:first-child { transform: none; }
.band-tick:last-child { transform: translateX(-100%); }

/* 円グラフ + 凡例 */
.breakdown { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.donut-wrap { position: relative; width: 200px; height: 200px; }
#donut { width: 200px; height: 200px; }
.donut-center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    pointer-events: none;
}
.donut-total-label { font-size: 0.75rem; color: var(--muted); }
.donut-total { font-size: 1.15rem; font-weight: 700; }
.legend { list-style: none; margin: 0; padding: 0; width: 100%; }
.legend-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}
.legend-dot { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto; }
.legend-name { flex: 1 1 auto; font-weight: 600; }
.legend-min { color: var(--fg); font-variant-numeric: tabular-nums; }
.legend-pct { color: var(--muted); min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }

/* 活動の詳細 */
.detail { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.detail-item { border-bottom: 1px solid var(--line); }
/* 「活動なし」（編集不可）と、編集ボタン（.detail-row）の共通レイアウト */
.detail-item.is-none,
.detail-row {
    display: grid;
    grid-template-columns: auto 14px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 2px;
}
.detail-item.is-none { color: var(--muted); }
/* 編集できる行はボタン。見た目は行のまま、押せることが伝わるように */
.detail-row {
    width: 100%;
    margin: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}
.detail-row:hover { background: var(--row-hover, rgba(0,0,0,0.03)); }
.detail-row:focus-visible { outline: 2px solid var(--brand, #2a6fdb); outline-offset: -2px; }
.detail-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }
.detail-dot { width: 12px; height: 12px; border-radius: 4px; }
.detail-name { font-weight: 600; }
.detail-min { font-variant-numeric: tabular-nums; }
.detail-cross { grid-column: 3 / 5; font-size: 0.8rem; color: var(--muted); }
.detail-memo {
    grid-column: 3 / 5;
    font-size: 0.85rem;
    color: var(--muted);
    white-space: pre-wrap;
    word-break: break-word;
}

/* 画像で保存 */
.chart-actions { margin: 22px 0 8px; }
.btn-share {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-fg);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-share:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ＋記録を追加（表示日へ後から追加） */
.chart-add { margin: 18px 0 8px; }
.btn-add {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-add:hover { background: rgba(42,111,219,0.06); }
.btn-add:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 追加モーダルの活動 select（時刻入力と揃える） */
.modal-select {
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
    box-sizing: border-box;
}
.modal-select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* シェア画像オーバーレイ */
.share-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    overflow: auto;
}
.share-box {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 14px;
    max-width: 420px;
    width: 100%;
}
.share-fields { margin: 2px 2px 12px; }
.share-label { display: block; font-size: 0.8rem; color: var(--muted); margin: 8px 0 4px; }
.share-input {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg);
    font: inherit;
    box-sizing: border-box;
}
.share-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
#share-canvas { width: 100%; height: auto; border-radius: 8px; display: block; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.share-hint { font-size: 0.82rem; color: var(--muted); margin: 10px 2px; text-align: center; }
.share-actions { display: flex; gap: 10px; }
.share-save, .share-close {
    flex: 1;
    min-height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.share-save { background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent); }
.share-close { background: var(--bg); color: var(--fg); border: 1px solid var(--line); }

/* PC: 中央寄せで広がりすぎない */
@media (min-width: 720px) {
    .chart-page .app, .app.app-chart { max-width: 760px; }
    .breakdown { flex-direction: row; align-items: flex-start; justify-content: center; gap: 32px; }
    .breakdown .legend { max-width: 380px; }
}

/* ===== ended_at（開始・終了／未記録／重複）の表示 ===== */
.modal-check { display: flex; align-items: center; gap: 8px; margin: 12px 0 2px; font-size: 0.92rem; color: var(--fg); cursor: pointer; }
.modal-check input { width: 18px; height: 18px; flex: 0 0 auto; }
/* 未記録は「活動なし」と区別（詳細行は薄字、帯は斜線ハッチ、凡例ドットもハッチ） */
.detail-item.is-unrecorded .detail-name { color: var(--muted); }
.band-seg.is-unrecorded { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.06) 0 4px, transparent 4px 8px); }
.band-seg.is-overlapped { box-shadow: inset 0 -3px 0 rgba(0,0,0,0.28); }
.legend-dot.is-unrecorded { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.13) 0 3px, transparent 3px 6px); }
/* 重複バッジ・実時間・注記 */
.detail-overlap { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 0.7rem; line-height: 1.6; border-radius: 8px; background: rgba(0,0,0,0.08); color: var(--muted); vertical-align: middle; }
.legend-real { display: inline-block; margin-left: 8px; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-note { font-size: 0.78rem; color: var(--muted); line-height: 1.6; margin: 6px 2px 0; }

/* ===== Apple Watch 連携（watch.php） ===== */
.watch-lead { font-size: 0.9rem; color: var(--muted); line-height: 1.7; margin: 4px 2px 16px; }
/* 発行直後の平文トークン表示（1回きり） */
.watch-newtoken {
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: rgba(42,111,219,0.06);
    padding: 14px;
    margin: 4px 0 18px;
}
.watch-newtoken-title { margin: 0 0 8px; font-size: 0.82rem; font-weight: 700; color: var(--accent); line-height: 1.5; }
.watch-token {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86rem;
    word-break: break-all;
    line-height: 1.5;
    box-sizing: border-box;
}
.btn-copy {
    margin-top: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-fg);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-copy:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.watch-note { font-size: 0.8rem; color: var(--muted); line-height: 1.6; margin: 10px 2px 0; }
.watch-create { margin: 4px 0 8px; }
/* 発行済み一覧 */
.watch-list { list-style: none; margin: 4px 0 8px; padding: 0; }
.watch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.watch-item.is-revoked { opacity: 0.55; }
.watch-item-main { min-width: 0; }
.watch-item-label { display: block; font-size: 0.95rem; font-weight: 700; }
.watch-item-meta { display: block; font-size: 0.76rem; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.watch-revoked { color: var(--danger); font-weight: 700; }
.watch-revoke { margin: 0; flex: 0 0 auto; }
.btn-revoke {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--danger);
    font-size: 0.82rem;
    cursor: pointer;
}
.btn-revoke:hover { background: rgba(179,38,30,0.06); }
.btn-revoke:focus-visible { outline: 3px solid var(--danger); outline-offset: 2px; }
/* ショートカット手順 */
.watch-steps { margin: 6px 0 4px; padding-left: 1.3em; font-size: 0.9rem; line-height: 1.9; color: var(--fg); }
.watch-steps li { margin: 4px 0; }
.watch-inline {
    padding: 1px 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    word-break: break-all;
}
