/* dialogs.css: ヘルプ・連絡・通知ダイアログの中身、空の状態、凡例。 */
.help h3 { margin: 0 0 4px; font-family: var(--font-title); font-size: 20px; font-weight: 400; }
.help-fig { margin: 16px 0 6px; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); }
.help-fig svg { display: block; width: 100%; height: auto; font-family: var(--font-ja); }
.help-fig figcaption { margin-top: 10px; font-family: var(--font-ja); font-size: 13px; line-height: 1.6;
  color: var(--muted); }
.help-fig figcaption b { color: var(--ink); font-weight: 700; }
.help h4 { margin: 20px 0 0; font-family: var(--font-title); font-size: 13px; font-weight: 700; color: var(--muted); }
.help ol, .help ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 12px;
  font-family: var(--font-ja); font-size: 14px; line-height: 1.6; }
.help .tips { gap: 10px; font-size: 13px; }
.help li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.help .steps .glyph { border-color: transparent; background: var(--ladder); color: var(--bg); border-radius: 50%; }
.help li > svg, .help .glyph { width: 30px; height: 30px; padding: 6px; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink); }
.help .glyph { display: grid; place-items: center; padding: 0; font: 700 13px/1 var(--font-num); }
.help li b { display: block; font-weight: 700; }
.help li span { color: var(--muted); }
.help .note { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--font-ja);
  font-size: 12px; line-height: 1.8; color: var(--muted); }
.help .note p { margin: 0 0 8px; }
.help .note p:last-child { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.help .note a, .help .note .link-btn { color: var(--accent); }
/* 案内を一度開くまで、ボタンに小さな点を付ける。 */
:root[data-help-new] #helpBtn::after { content: ""; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.contact h3 { margin: 0 0 6px; font-family: var(--font-title); font-size: 20px; font-weight: var(--title-weight); }
.contact label { display: grid; gap: 4px; margin-top: 14px; font-family: var(--font-ja); font-size: 13px;
  font-weight: 500; }
.contact label small { font-weight: 400; color: var(--muted); }
/* 16px にするのは、iOS が入力欄へズームするのを防ぐため */
.contact input, .contact textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font-ja); }
.contact textarea { min-height: 128px; resize: vertical; }
.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact .status { min-height: 1.6em; margin: 10px 0 0; font-family: var(--font-ja); font-size: 13px; }
.contact .status.ng { color: var(--ng); }
.contact .status.ok { color: var(--ok); }
/* 今日の上映回の「現在地から間に合うか」 (js/sheets.js fromHere)。 */
/* 半券の下に添える一行。.fit と同じ位置・大きさで、半券の脇の注として読める。 */
.here-ask { margin: 4px 0 0 -4px; }
.here-ask .text-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.here-ask .note { font-family: var(--font-ja); font-size: 12px; color: var(--muted); }
.notify .status { min-height: 1.6em; margin: 10px 0 0; font-family: var(--font-ja); font-size: 13px; }
.notify .status.ng { color: var(--ng); }
.notify .status.ok { color: var(--ok); }
.notify .notify-help { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted);
  font: 12px/1.7 var(--font-ja); }
.notify-opts { display: grid; gap: 2px; margin-top: 10px; }
.notify-opts[hidden] { display: none; }
.notify-opts label { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.notify-opts label:last-child { border-bottom: 1px solid var(--line); }
/* スイッチ（チェックボックスではない）: 種類ごとにすぐ入／切になる (iOS 風の設定)。行の右端に置く。 */
.notify-opts input { order: 2; flex: none; appearance: none; position: relative; width: 44px; height: 26px; margin: 0;
  border-radius: 999px; background: var(--line-strong); opacity: .35; cursor: pointer;
  transition: background var(--dur-open) var(--ease), opacity var(--dur-open) var(--ease); }
.notify-opts input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: translate var(--dur-open) var(--ease);
  }
.notify-opts input:checked { background: var(--accent); opacity: 1; }
.notify-opts input:checked::after { translate: 18px 0; }
.notify-opts input:disabled { cursor: default; }
@media (prefers-reduced-motion: reduce) { .notify-opts input, .notify-opts input::after { transition: none; } }
.notify-opts span { display: grid; gap: 3px; font-family: var(--font-ja); }
.notify-opts b { font-size: 14px; font-weight: 700; }
.notify-opts small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.contact .btn[disabled] { opacity: .6; cursor: default; }

.empty { padding: 40px 16px; color: var(--muted); text-align: center; }
.legend { padding: 12px 16px; margin: 0; color: var(--muted); font-family: var(--font-ja); font-weight: var(--ja-light);
  font-size: 12px; }
/* これまでのはしご (plan.js openLog)。空のマイ時間割の下と、その日の記録カードにあるリンク。 */
/* 「これまでのはしご」「新しいバッジ」「ほかの端末とつなぐ」が並ぶと、PC のパネルの幅では1行に入らず両端が切れていた
   （2026-12-01）。入らなければ折り返す。ボタンの中は折り返さない。 */
.plan-log { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 10px; margin: 8px 0 0; }
.plan-log button { white-space: nowrap; }
.recap .plan-log { grid-column: 1 / -1; margin: 2px 0 0; }
.recap .plan-log button { color: inherit; opacity: .85; white-space: nowrap; }
.plan-log button { padding: 4px 6px; border: 0; background: none; color: var(--muted); font: 12px var(--font-ja);
  cursor: pointer; }
.plan-log button:hover { color: var(--ink); }
.plan-log b { color: var(--ink); font-weight: 700; }
.log h3 { margin: 0 0 2px; font-family: var(--font-title); font-size: 20px; font-weight: var(--title-weight); }
.log .meta { margin: 0 0 14px; font: 12px/1.6 var(--font-ja); color: var(--muted); }
.log .stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px;
  margin: 0 0 16px; }
.log .stats div { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font: 12px var(--font-ja); color: var(--muted); }
.log .stats b { display: block; margin-top: 2px; color: var(--ink); font: 700 20px/1.1 var(--font-num); }
.log .stats b small { margin-left: 2px; color: var(--muted); font: 500 11px var(--font-ja); }
.log .stats b.fav { margin-top: 4px; font: 700 13px/1.4 var(--font-ja); overflow-wrap: anywhere; }
.log ol { list-style: none; margin: 0; padding: 0; }
.log ol > li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start;
  padding: 12px 0; border-top: 1px solid var(--line); font-family: var(--font-ja); }
.log ol > li > img { width: 40px; height: 40px; }
.log .when { color: var(--ink); font-size: 13px; font-weight: 700; }
.log .when span { margin-left: 8px; color: var(--accent); font-size: 12px; }
.log .films { margin: 4px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; line-height: 1.7; }
.log .films b { margin-right: 6px; color: var(--muted); font-family: var(--font-num); font-weight: 600; }
.log .films i { margin-right: 6px; color: var(--ink); font-style: normal; font-weight: 600; }
.log ol .btn { align-self: center; height: 32px; padding: 0 10px; font-size: 12px; }
.log .note { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted);
  font: 12px/1.7 var(--font-ja); }
.log .note .link-btn { margin-left: 8px; color: var(--accent); }
/* チェックイン (sheets.js): 済みのときは、ボタンの代わりに控えめなラベルを出す。 */
/* チェックイン: 半券の下に独立した行を置く。上映時刻の前後だけ出る (timeline.js canCheckin)。
   下の3つのボタンの行を崩さないため。 */
.sheet .checkin { margin: 12px 0 12px; }
.sheet .checkin > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
  padding: 8px 14px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--accent);
  font: 700 14px var(--font-ja); text-align: left; cursor: pointer; }
.sheet .checkin > button svg { flex: none; width: 18px; height: 18px; }
.sheet .checkin > button span { display: grid; }
.sheet .checkin small { color: var(--muted); font-size: 11px; font-weight: 500; }
.sheet .checkin-say { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--muted);
  font: 12px var(--font-ja); }
.sheet .checkin .next { display: grid; gap: 2px; margin-top: 8px; padding: 8px 12px;
  border-left: 2px solid var(--ladder); font-family: var(--font-ja); }
.sheet .checkin .next b { font-size: 14px; }
.sheet .checkin .next span { color: var(--muted); font-size: 12px; }
.sheet .checkin .next-acts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 2px; }
.sheet .checkin .next-acts a, .sheet .checkin .next-acts .link-btn { color: var(--accent); font-size: 12px; }
.sheet .checkin .next .ng { color: var(--ng); }
@media (hover: hover) { .sheet .checkin > button:hover { background: color-mix(in srgb, var(--accent) 13%, transparent);
  } }
/* バッジ (plan.js badgesHtml): 半券ちゃんを囲むメダル。縁は半券のように欠ける。通常は錆浅葱、金、
   キラ（錆浅葱から金・ピンク・青へのオーロラを金の縁で囲み、ゆっくり光らせる）。 */
.badges { margin: 0 0 16px; }
.badges h4 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font: 700 13px var(--font-title);
  color: var(--ink); }
.badges h4 small { color: var(--muted); font: 500 12px var(--font-ja); }
.badges ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 8px; }
.badges li { display: grid; justify-items: center; align-content: start; gap: 3px; text-align: center;
  color: var(--ink); font: 700 12px/1.35 var(--font-ja); }
.badges li small { color: var(--muted); font-size: 10.5px; font-weight: 500; }
.badges .medal { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle, var(--surface) 0 25px, transparent 26px), var(--ring, #2a6f77);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .12), inset 0 0 0 2px rgba(255, 255, 255, .35); }
.badges .medal::before { content: ""; position: absolute; inset: 4px; border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, .6); }
.badges .medal img { position: relative; z-index: 1; width: 46px; height: 46px; }
.badges .gold .medal { --ring: linear-gradient(145deg, #c9a24a, #f3dc8b 40%, #b8892f 70%, #e8cd7a); }
.badges .kira .medal { --ring: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .55), transparent 35%),
  conic-gradient(from var(--a, 200deg), #1d5f67, #3fa39a, #9fd8c4, #f0d98a, #e7a6b8, #8fb7e8, #2f7f86, #1d5f67);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .18), 0 0 0 2px #c9a24a, 0 0 12px rgba(240, 217, 138, .5);
  animation: badge-foil 9s linear infinite; }
.badges .kira .medal::after { content: "✦"; position: absolute; z-index: 2; right: -3px; top: -1px; color: #e9c65c;
  font-size: 14px; text-shadow: 0 0 5px rgba(255, 230, 150, .9); }
.badges .kira .medal i { position: absolute; z-index: 2; left: 2px; bottom: 9px; color: #fff4c8; font-size: 10px;
  font-style: normal; text-shadow: 0 0 4px rgba(255, 230, 150, .9); }
.badges .kira:not(.off) b::after { content: " ✦"; color: #c9a24a; font-size: 10px; vertical-align: 1px; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 200deg; }
@keyframes badge-foil { to { --a: 560deg; } }
@media (prefers-reduced-motion: reduce) { .badges .kira .medal { animation: none; } }
.badges li.off { color: var(--muted); }
.badges li.off .medal { --ring: var(--line); box-shadow: none; animation: none; }
.badges li.off .medal::before { border-color: var(--surface); }
.badges li.off .medal::after { content: none; }
.badges li.off img { filter: grayscale(1); opacity: .3; }
.badges .new-tag { margin-top: -2px; color: var(--accent); font: 700 10px var(--font-num); letter-spacing: .06em; }
.badges .badge-note { margin: 12px 0 0; color: var(--muted); font: 11px/1.6 var(--font-ja); }
.plan-log .badge-new { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 11px;
  font-weight: 700; }
.log .films li.seen b::before { content: "✓"; margin-right: 4px; color: var(--accent); }
.log .stats .seen-n { display: block; margin-top: 2px; color: var(--accent); font-size: 10.5px; }
.stubs { margin: 0 0 16px; }
.stubs h4 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font: 700 13px var(--font-title);
  color: var(--ink); }
.stubs h4 small { color: var(--muted); font: 500 12px var(--font-ja); }
.stubs ul { list-style: none; margin: 0 -2px; padding: 2px 2px 6px; display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: thin; }
.stubs li { flex: none; }
/* 右にまだあるとき (plan.js markStubsScroll): その端で行を薄くし、切れた半券で「スクロールできる」と伝える。 */
.stubs ul.more { mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.stubs li > button { display: grid; gap: 1px; width: 150px; padding: 8px 30px 8px 10px; border: 0;
  border-radius: var(--radius); text-align: left; cursor: pointer;
  background: linear-gradient(90deg, #d8ebea calc(100% - 22px), #2a6f77 calc(100% - 22px)); color: #1d5258;
  font-family: var(--font-ja); }
.stubs li > button small { font: 600 10px var(--font-num); letter-spacing: .05em; opacity: .8; }
.stubs h4 .link-btn { margin-left: auto; color: var(--accent); font: 500 12px var(--font-ja); }
.stubs .stubs-more { width: auto; height: 100%; padding: 8px 14px; background: none;
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); font-weight: 700;
  font-size: 12px; place-content: center; }
.stubs .stubs-more span { font: 500 11px var(--font-ja); color: var(--muted); }
.stubs.all h5 { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 6px; font: 700 12px var(--font-ja);
  color: var(--ink); }
.stubs.all h5 small { color: var(--muted); font-weight: 500; font-size: 11px; }
.stubs.all ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); overflow: visible; }
.stubs.all li > button { width: 100%; }
.stubs li > button b { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.stubs li > button span { overflow: hidden; font-size: 10.5px; white-space: nowrap; text-overflow: ellipsis; }
.item .item-checkin { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px;
  border: 1px dashed var(--accent); border-radius: 999px; background: none; color: var(--accent);
  font: 700 12px var(--font-ja); cursor: pointer; white-space: nowrap; }
.item .item-checkin svg { width: 13px; height: 13px; }
@media (hover: hover) { .item .item-checkin:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
  .item .item-checkin.done:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); } }
.item .item-checkin.done { border-style: solid; background: var(--accent); color: var(--bg); }
.item .item-checkin.done svg { stroke-width: 2.6; }
/* チェックイン直後 (sheets.js): 半券 / ✓ がスタンプのように一度だけ押される。 */
.sheet .stub.just, .item .item-checkin.just { animation: stamp .45s var(--ease) both; }
.sheet .stub.just ~ .checkin { animation: fade-up .3s var(--ease) .3s both; }
@keyframes stamp { 0% { opacity: 0; scale: 1.25; rotate: -4deg; } 55% { opacity: 1; scale: .96; rotate: 1deg;
  } 100% { scale: 1; rotate: 0deg; } }
@keyframes fade-up { from { opacity: 0; translate: 0 4px; } }

/* ---------- さがすの一覧 (js/sheets.js の #hsDrop) ---------- */
/* 入力欄のすぐ下に開く（日付の帯の上に重ねる）。スクロールするのは一覧だけで、入力欄はいつも使える。スマホはバーの幅
   いっぱい、PC は入力欄の行（.hsearch）の幅。高さは中身に合わせ、画面の 6割まで。 */
.hs-drop { position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 20; border-radius: var(--radius);
  border: 1px solid var(--line-strong); max-height: min(60vh, 560px); overflow-y: auto;
  overscroll-behavior: contain; padding: 4px 16px calc(16px + env(safe-area-inset-bottom)); border-bottom: 1px solid var(--line-strong);
  background: var(--bg); box-shadow: var(--shadow-2); }
.hs-drop[hidden] { display: none; }
@media (max-width: 600px) { .hs-drop { left: 12px; right: 12px; } }
@media (prefers-reduced-motion: no-preference) { .hs-drop:not([hidden]) { animation: fade-up .18s var(--ease); } }
/* 入力中の候補（#hsSug）: 一覧と同じ場所・同じ枠。1行に名前と、右に種類と回数。 */
.hs-sug { padding: 6px; }
.hs-eg { margin: 6px 10px 4px; font-family: var(--font-ui); font-size: 12px; color: var(--muted); }
.hs-opt { display: flex; align-items: baseline; gap: 12px; padding: 10px; border-radius: calc(var(--radius) - 4px);
  cursor: pointer; }
.hs-opt.on { background: var(--surface-2); }
@media (hover: hover) { .hs-opt:hover { background: var(--surface-2); } }
.hs-opt .nm { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: var(--font-title); font-size: 15px; font-weight: 600; font-feature-settings: "palt"; }
.hs-opt small { flex: none; font-family: var(--font-ja); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.search .snote { margin: 8px 2px 0; font-family: var(--font-ja); font-size: 12px; color: var(--muted); }
.sfilm { margin-top: 18px; }
.sfilm h4 { margin: 0 0 4px; font-family: var(--font-title); font-size: 15px; font-weight: 700;
  font-feature-settings: "palt"; }
.sfilm h4 small { margin-left: 8px; font-family: var(--font-ja); font-size: 12px; font-weight: var(--ja-light);
  color: var(--muted); }
.sfilm ul { margin: 0; padding: 0; list-style: none; }
.sfilm li { border-top: 1px solid var(--line); }
.sfilm li.more { display: none; }
.sfilm.all li.more { display: block; }
.sfilm li button { display: grid; grid-template-columns: 4.4em 3.2em 1fr; gap: 10px; align-items: baseline; width: 100%;
  padding: 10px 2px; border: 0; background: none; text-align: left; cursor: pointer; }
.sfilm li button:hover { background: var(--surface-2); }
.sfilm .d, .sfilm .tm { font-family: var(--font-num); font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.sfilm .d small { margin-left: 3px; font-family: var(--font-ja); font-size: 11px; font-weight: 400; color: var(--muted);
  }
.sfilm .w { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-ja);
  font-size: 13px; color: var(--muted); }
.sfilm .w::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%;
  background: var(--tc); vertical-align: 1px; }
.sfilm .smore { margin-top: 6px; }
.contact-kind { margin: 4px 0 10px; }
.contact .contact-note a { color: var(--accent); }

/* ほかの端末とつなぐ (js/sync.js)。 */
.help li .link-btn { margin-left: 4px; color: var(--accent); }
.sync h3 { margin: 0 0 6px; font-family: var(--font-title); font-size: 20px; font-weight: var(--title-weight); }
.sync h4 { margin: 18px 0 0; font: 700 13px var(--font-title); color: var(--muted); }
.sync .meta { margin: 0 0 14px; font: 13px/1.7 var(--font-ja); color: var(--muted); }
.sync .sync-start .btn { width: 100%; justify-content: center; }
.sync label { display: grid; gap: 6px; margin-top: 16px; font: 500 13px/1.6 var(--font-ja); }
.sync label small { font-weight: 400; color: var(--muted); }
.sync .row { display: flex; align-items: center; gap: 8px; }
.sync .row .btn { height: 44px; }
/* 16px にするのは、iOS が入力欄へズームするのを防ぐため */
.sync input:not([type]), .sync input[name="name"] { min-width: 0; flex: 1; padding: 9px 10px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font-ja); height: 44px; }
#syncCode { font-family: var(--font-num); letter-spacing: .08em; text-transform: uppercase; }
/* カメラで QR コードを読む（js/sync.js startScan）。 */
.sync .sync-scan-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; margin-top: 10px; }
.sync .sync-scan { margin-top: 10px; text-align: center; font: 12px/1.6 var(--font-ja); color: var(--muted); }
.sync .sync-scan[hidden], .sync .sync-scan-btn[hidden] { display: none; }
.sync .sync-scan video { display: block; width: 100%; max-height: 46vh; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius);
  background: #000; }
.sync .sync-scan p { margin: 8px 0; }
.sync .sync-intro { margin: 0 0 14px; color: var(--muted); font: 14px/1.7 var(--font-ja); }
.sync .sync-intro p { margin: 0 0 6px; }
.sync .sync-intro b { color: var(--ink); font-weight: 600; }
/* つなぐ前: PC に向かう半券ちゃん（chan-pc.svg。PC とスマホが点線でつながる）を説明の横に。 */
.sync .sync-intro.has-chan { display: flex; gap: 12px; align-items: flex-start; }
.sync .sync-intro .chan { flex: none; width: 64px; height: 64px; }
.sync .status { min-height: 1.6em; margin: 10px 0 0; font: 13px var(--font-ja); }
.sync .status.ng { color: var(--ng); }
.sync .sync-me-row { display: flex; align-items: center; gap: 12px; padding: 4px 0 14px; border-bottom: 1px solid var(--line);
  font-family: var(--font-ja); }
.sync .sync-me-row > div { flex: 1; display: grid; gap: 2px; }
.sync .sync-me-row b { font-size: 15px; }
.sync .sync-me-row small { font-size: 12px; color: var(--muted); }
/* 半券ちゃんの絵（viewBox 64）の背景の円は中心 (32, 33)・半径 30。その円がちょうど枠に収まるよう、絵を少し大きくずらす。 */
.sync-av { position: relative; display: inline-block; flex: none; border-radius: 50%; overflow: hidden; }
.sync-av img { position: absolute; left: -3.33%; top: -5%; width: 106.67%; height: 106.67%; max-width: none; }
.sync .sync-edit { margin-top: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sync fieldset { margin: 14px 0 0; padding: 0; border: 0; font: 500 13px var(--font-ja); }
.sync legend { padding: 0; }
.sync .faces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sync .faces label { display: block; margin: 0; cursor: pointer; }
.sync .faces input { position: absolute; opacity: 0; pointer-events: none; }
.sync .faces img { display: block; width: 44px; height: 44px; padding: 4px; border: 2px solid transparent;
  border-radius: var(--radius); }
.sync .faces input:checked + img { border-color: var(--accent); }
.sync .faces input:focus-visible + img { outline: 2px solid var(--accent);
  outline-offset: 2px; }
.sync .row2 { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
/* color-mix のない iOS 16.0〜16.1 では、手前の線と背景になる。 */
.sync .sync-code { margin: 16px 0 0; padding: 14px; border: 1px dashed var(--line-strong);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: var(--radius); background: var(--surface);
  background: color-mix(in srgb, var(--accent) 7%, transparent); font: 12px/1.7 var(--font-ja); color: var(--muted); }
.sync .sync-code p { margin: 0; }
.sync .sync-code .code { margin-bottom: 6px; color: var(--ink); font: 700 28px/1.2 var(--font-num); letter-spacing: .1em;
  text-align: center; user-select: all; }
.sync .sync-code .text-btn { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; }
.sync .sync-qr > svg { display: block; width: 168px; height: 168px; margin: 10px auto 6px; background: #fff; fill: #000; }
.sync .sync-qr small { display: block; text-align: center; }
.sync .sync-code .until { margin-bottom: 8px; text-align: center; }
.sync .sync-code .until b { color: var(--ink); font-family: var(--font-num); }
/* iPhone ではカメラで読むと Safari が開き、ホーム画面のはしごはつながらない。見落とされないよう枠で分ける。 */
.sync .sync-qr .home { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 8px 10px;
  border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); }
.sync .sync-qr .home .i { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.sync > div > p > .btn { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; }
.sync .sync-devs { margin: 6px 0 0; padding: 0; list-style: none; font-family: var(--font-ja); }
.sync .sync-devs li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; }
.sync .sync-devs li > span { flex: 1; display: flex; align-items: baseline; gap: 8px; }
.sync .sync-devs small { font-size: 12px; color: var(--muted); }
.sync .note { margin: 14px 0 0; color: var(--muted); font: 12px/1.7 var(--font-ja); }
.sync .note .link-btn { margin-left: 6px; color: var(--accent); }
/* 名前とアイコンを変えるボタンは、押せると分かるよう枠と鉛筆を付ける。 */
.sync .sync-edit-btn { height: 32px; padding: 0 10px; gap: 5px; font-size: 12px; }
.sync .sync-edit-btn .i { width: 14px; height: 14px; }
/* 解除は、取り消しにくい操作なので赤で。 */
.sync .sync-remove, .sync .note .sync-remove { color: var(--ng); }
/* ヘッダーの「つなぐ」。つないだあとの自分のアイコンは、ほかのボタンの絵と同じ大きさに。 */
.sync-ico { display: inline-grid; place-items: center; }
.sync-lbl { max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#syncBtn.on .sync-av { width: 18px !important; height: 18px !important; }
