/* zyutu 全番号の土台。手元では dev.js が /common/ として返す。公開するときは各番号の public/common/ に写す。
   黒地・効かせる色は青だけ・角丸ゼロ。面は影ではなく線で切る（zyutu4 から引き継いだ） */
:root{
  color-scheme: dark;
  --bg:      #000000;
  --card:    #0b0c0f;
  --line:    #2c3037;
  --line-in: #1a1d22;
  --ink:     #ffffff;
  --sub:     #9aa0aa;
  --faint:   #838892;
  --blue:    #2c53de;
  --blue-t:  #7290f2;   /* 黒地の小さい文字用。#2c53de は黒に対して 3.2:1 しかない */
  --done:    #2846b6;   /* 記録の塗り。強い青より一段暗くする */
  --part:    #1b2a5c;
  --fill:    #121419;
  --warm:    #e2622f;
  --jp: "Yu Gothic UI","Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;
  --en: "DM Sans", sans-serif;
  --col: 1100px;
}

*{ box-sizing:border-box; }
html,body{ margin:0; background:var(--bg); color:var(--ink); }
body{
  font-family:var(--jp); font-size:14px; line-height:1.5;
  -webkit-tap-highlight-color:transparent;
  padding-bottom:calc(96px + env(safe-area-inset-bottom));
}
button{ font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer; }
a{ color:inherit; }
.num{ font-family:var(--en); font-feature-settings:"tnum" 1; }
[hidden]{ display:none !important; }
@media (prefers-reduced-motion: reduce){ *{ transition:none !important; animation:none !important; } }

#app{ max-width:var(--col); margin:0 auto; position:relative; }

/* ── 見出し：番号の切り替え・未送信・ID ── */
/* 2026-11-18: どの画面でも上に固定（本人）。地は黒なので列の外まで敷かなくても見た目は同じ */
.top{
  display:flex; flex-wrap:nowrap; align-items:center; gap:10px;
  padding:env(safe-area-inset-top) 16px 0;
  position:sticky; top:0; z-index:8;
  background:var(--bg); border-bottom:1px solid var(--line);
}
.brand{ font-family:var(--en); font-weight:600; font-size:15px; text-decoration:none; padding:12px 6px 10px 0; flex:none; }
.apps{ display:flex; flex-shrink:0; gap:2px; margin-right:auto; overflow-x:auto; scrollbar-width:none; }
.apps a{
  text-decoration:none; font-size:13px; color:var(--sub);
  padding:12px 8px 10px; border-bottom:2px solid transparent; white-space:nowrap;
  user-select:none; -webkit-user-select:none;
}
.apps a:first-child{ padding-left:0; }
.apps a.on{ color:var(--ink); border-bottom-color:var(--blue); }
@media (hover:hover){ .apps a:not(.on):hover{ color:var(--ink); } }
.tag{ font-size:11px; color:var(--faint); border:1px solid var(--line); padding:1px 7px; white-space:nowrap; }
.sync-error{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 16px; padding:12px; border:1px solid var(--line); color:var(--sub); font-size:13px; }
.who{ font-size:13px; color:var(--sub); padding:8px 0 8px 6px; min-height:44px; }
.menu{
  position:absolute; right:16px; top:100%; z-index:6; background:var(--card); border:1px solid var(--line);
  display:flex; flex-direction:column; min-width:140px;
}
.menu button{ text-align:left; padding:12px 14px; font-size:13px; min-height:44px; }
@media (hover:hover){ .menu button:hover{ background:var(--fill); } }

.title-row{ display:flex; align-items:baseline; gap:12px; padding:14px 16px 14px; }
.title-row h1{ margin:0; font-size:20px; font-weight:700; letter-spacing:.02em; }
.title-row .side{ margin-left:auto; color:var(--faint); font-size:12px; }

.empty{ padding:40px 16px; color:var(--faint); font-size:13px; }

/* ── 部品 ────────────────────────── */
.fab{
  position:fixed; right:calc(18px + env(safe-area-inset-right)); bottom:calc(22px + env(safe-area-inset-bottom));
  width:58px; height:58px; background:var(--blue); color:#fff; font-size:26px; line-height:1;
  box-shadow:0 6px 20px rgba(44,83,222,.35);   /* 浮いているのはこのボタンだけ（UI-RULES 7 の例外） */
  z-index:5;
}
.btn{ border:1px solid var(--line); padding:10px 14px; font-size:13px; background:var(--card); min-height:44px; }
.btn.primary{ background:var(--blue); border-color:var(--blue); color:#fff; }
.btn.danger{ color:var(--warm); }
@media (hover:hover){ .btn:not(.primary):hover{ background:var(--fill); } }
.icon-btn{ width:44px; height:44px; font-size:18px; }
.field{
  width:100%; font:inherit; font-size:16px; color:var(--ink);
  background:var(--bg); border:1px solid var(--line); padding:11px 12px; border-radius:0;
}
.field:focus{ outline:none; border-color:var(--blue); }
textarea.field{ resize:vertical; line-height:1.6; }
input[type="date"].field, input[type="time"].field{ font-family:var(--en); color-scheme:dark; }
.seg{ display:flex; border:1px solid var(--line); }
.seg-b{ flex:1; padding:9px 0; font-size:13px; color:var(--sub); min-height:40px; }
.seg-b + .seg-b{ border-left:1px solid var(--line); }
.seg-b.on{ background:var(--blue); color:#fff; }
.lbl{ display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--sub); }
.row2{ display:flex; gap:10px; }
.row2 > *{ flex:1; min-width:0; }
.err{ margin:0; font-size:13px; color:var(--warm); }

/* ── 下から出る入力の幕 ─────────────── */
.sheet{
  position:fixed; inset:0; z-index:10; background:rgba(0,0,0,.6);
  display:flex; align-items:flex-end; justify-content:center;
}
.sheet-body{
  width:100%; max-width:560px; background:var(--card); border-top:1px solid var(--line);
  padding:10px 16px calc(18px + env(safe-area-inset-bottom));
  display:flex; flex-direction:column; gap:12px; max-height:92vh; overflow:auto;
}
.sheet-head{ display:flex; align-items:center; justify-content:space-between; }
.sheet-head h2{ margin:0; font-size:15px; font-weight:700; }
.sheet-actions{ display:flex; gap:8px; }
.sheet-actions .primary{ flex:1; }
@media (min-width:700px){
  .sheet{ align-items:center; }
  .sheet-body{ border:1px solid var(--line); }
}

/* ── 入る ─────────────────────────── */
.auth{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px 16px; }
.auth-body{ width:100%; max-width:360px; display:flex; flex-direction:column; gap:14px; }
.logo{ margin:0 0 4px; font-size:28px; font-weight:600; letter-spacing:.01em; }
.lead{ margin:0; font-size:13px; color:var(--sub); line-height:1.7; }
.lead strong{ color:var(--ink); }
.auth-links{ display:flex; flex-wrap:wrap; gap:4px 18px; margin-top:6px; }
.auth-links button{ font-size:12px; color:var(--blue-t); padding:10px 0; }
.code{
  display:block; border:1px solid var(--line); background:var(--bg);
  padding:16px 12px; font-size:19px; letter-spacing:.06em; text-align:center; word-break:break-all;
}

/* ── もどす ──────────────────────── */
.toast{
  position:fixed; left:50%; transform:translateX(-50%); z-index:20;
  bottom:calc(96px + env(safe-area-inset-bottom));
  display:flex; align-items:center; gap:16px;
  background:var(--card); border:1px solid var(--line); padding:10px 14px; font-size:13px;
  max-width:calc(100% - 32px);
}
.toast button{ color:var(--blue-t); font-weight:700; min-height:32px; white-space:nowrap; flex:none; }
