/* soc-timeline（年表）。えらんだ＝オレンジ、正かい＝みどり、まちがい＝赤。時代の 色は 部品の PAL。字は 16px 以上（ものさしの 小さい 字を のぞく） */
.tl { --o: #f59e0b; --ok: #10b981; --okd: #047857; --ng: #ef4444; --ngd: #b91c1c; font-size: 1.05rem; position: relative; }
.tl [hidden] { display: none !important; }
.tl rt { font-size: .5em; font-weight: 500; }
.tl-wait { color: var(--sub, #4b5563); padding: 40px 0; text-align: center; }
.tl-qbox { background: linear-gradient(180deg, #fff8e6, #fffdf6); border: 2px solid var(--o); border-radius: 16px; padding: 8px 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(245, 158, 11, .12); }
.tl-q { margin: 0; font-weight: 700; font-size: 1.08rem; line-height: 1.75; }

/* よそう */
.tl-guess { margin-bottom: 10px; padding: 8px 12px 10px; border-radius: 16px; background: linear-gradient(180deg, #eef6ff, #fff); border: 2px solid #bcd0ff; }
.tl-gq { margin: 0 0 6px; font-weight: 700; line-height: 1.7; }
.tl-tag { display: inline-block; margin-right: 6px; padding: 0 10px; border-radius: 999px; background: #2563eb; color: #fff; font-size: .85rem; vertical-align: 2px; }
.tl-gch { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-gb { flex: 1 1 110px; }
.tl-wait .tl-pool { display: none; }
.tl-wait .tl-stage { opacity: .4; pointer-events: none; filter: saturate(.6); }
.tl-gr { margin: 6px 0 0; padding: 4px 10px; border-radius: 10px; font-weight: 700; }
.tl-gr.hit { background: #e3f8ef; color: var(--okd); }
.tl-gr.miss { background: #fff3dc; color: #92400e; }

/* ボタン */
.tl-b { min-height: 48px; padding: 4px 16px; border-radius: 14px; border: 2px solid #1e5b80; background: #fff; color: #1e5b80; font: inherit; font-weight: 800; line-height: 1.35; cursor: pointer; box-shadow: 0 3px 0 #b6cfe0; transition: transform .1s; }
.tl-b:active { transform: translateY(2px); box-shadow: 0 1px 0 #b6cfe0; }
.tl-b:disabled { opacity: .45; cursor: default; }
.tl-b.on, .tl-b[aria-pressed="true"] { background: var(--o); border-color: #d97706; color: #fff; box-shadow: 0 3px 0 #b45309; opacity: 1; }
.tl-b.on rt, .tl-b[aria-pressed="true"] rt { color: #fff7e6; }
.tl-go { background: linear-gradient(180deg, #2f7fb0, #1e5b80); color: #fff; box-shadow: 0 3px 0 #123c56; }
.tl-re { border-color: #6b7280; color: #374151; box-shadow: 0 3px 0 #d1d5db; }
.tl-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.tl-acts .tl-b { flex: 1 1 140px; max-width: 280px; }
.tl-sm { min-width: 52px; padding: 4px 8px; font-size: .95rem; }

/* カード */
.tl-card { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-height: 48px; max-width: 100%; padding: 6px 12px; box-sizing: border-box; border-radius: 14px; cursor: grab; touch-action: none;
  background: linear-gradient(180deg, #fff 0%, #fffdf7 60%, #f6f0e0 100%); border: 2px solid #d9d2bf; box-shadow: 0 3px 0 #e3dbc6, 0 5px 12px rgba(80, 60, 20, .12);
  color: var(--ink, #1f2937); font-weight: 700; font-size: .95rem; line-height: 1.5; text-align: left; user-select: none; -webkit-user-select: none; transition: transform .15s, box-shadow .15s, border-color .15s, background .2s; outline: none; }
.tl-card:focus-visible { box-shadow: 0 0 0 4px #bfdbfe, 0 3px 0 #e3dbc6; }
.tl-t { word-break: keep-all; overflow-wrap: anywhere; }
.tl-yr { font-size: .9rem; color: #1e5b80; font-weight: 800; }
.tl-yr:empty { display: none; }
.tl-sel { border-color: var(--o); background: linear-gradient(180deg, #fffaf0, #ffefc9); transform: translateY(-3px) rotate(-1deg); box-shadow: 0 0 0 4px rgba(245, 158, 11, .3), 0 8px 16px rgba(180, 83, 9, .22); }
.tl-lift { opacity: .35; }
.tl-ghost { position: fixed; z-index: 9999; pointer-events: none; margin: 0; transform: rotate(-3deg) scale(1.05); opacity: .96; box-shadow: 0 14px 28px rgba(0, 0, 0, .25); border-color: var(--o); }
.tl-mark { position: absolute; top: -10px; right: -8px; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: .95rem; font-style: normal; line-height: 24px; text-align: center; pointer-events: none; }
.tl-mark:empty { display: none; }
.tl-card.tl-ok { border-color: var(--ok); background: linear-gradient(180deg, #f3fdf8, #dcf7ea); box-shadow: 0 3px 0 #a7e9cc; }
.tl-ok .tl-mark { background: var(--ok); }
.tl-card.tl-ng { border-color: var(--ng); background: linear-gradient(180deg, #fff6f6, #ffe1e1); box-shadow: 0 3px 0 #fbb4b4; }
.tl-ng .tl-mark { background: var(--ng); }
.tl-shk { animation: tl-shake .35s 2; }
.tl-done .tl-card { cursor: default; }
@keyframes tl-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* 人物カード（顔なし：名ふだ） */
.tl-pc { padding-left: 8px; }
.tl-badge { width: 34px; height: 34px; flex: 0 0 auto; }
.tl-badge circle { fill: #f3e8d2; stroke: #b08a52; stroke-width: 2; }
.tl-badge path { fill: none; stroke: #8a6a3a; stroke-width: 2.2; stroke-linecap: round; }
.tl-pc .tl-t { display: flex; flex-direction: column; }
.tl-pn2 { font-size: 1.05rem; }
.tl-pd { font-size: .85rem; font-weight: 500; color: #4b5563; }

/* おき場 */
.tl-pool { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 8px; min-height: 60px; padding: 12px 8px; margin-top: 12px; border-radius: 18px;
  background: linear-gradient(180deg, #f6e7c8 0%, #efd9ad 100%); box-shadow: inset 0 2px 6px rgba(120, 80, 20, .25), 0 1px 0 #fff; border: 1px solid #e0c48e; }
.tl-pool.tl-empty { min-height: 0; padding: 4px; opacity: .5; }
.tl-done .tl-pool.tl-empty { display: none; }
.tl-picking .tl-pool { outline: 2px dashed rgba(180, 83, 9, .35); outline-offset: -6px; }
.tl-stage { position: relative; }

/* order：上が むかし */
.tl-seq { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 10px 30px; border-radius: 18px; background: linear-gradient(180deg, #f6efe2, #f2f8ff); border: 2px solid #e2d6bd; }
.tl-seq::before { content: ""; position: absolute; left: 14px; top: 36px; bottom: 36px; width: 6px; border-radius: 3px; background: linear-gradient(180deg, #b08a52, #5b87b8); }
.tl-end { font-size: .9rem; font-weight: 800; color: #8a6a3a; margin-left: -18px; }
.tl-end.bot { color: #1e5b80; }
.tl-slot { position: relative; display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 4px 4px 4px 34px; border-radius: 14px; border: 2.5px dashed #9db4cf; background: rgba(255, 255, 255, .75); cursor: pointer; }
.tl-slot > .tl-card { width: 100%; }
.tl-slot.tl-full { border-style: solid; border-color: #c9d8ea; }
.tl-picking .tl-slot, .tl-picking .tl-era { box-shadow: 0 0 0 3px rgba(245, 158, 11, .4); }
.tl-no { position: absolute; top: 50%; left: 6px; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; background: #1f4f87; color: #fff; font-weight: 800; font-size: .9rem; line-height: 24px; text-align: center; }

/* 年の ものさし */
.tl-rul { position: relative; margin-top: 12px; border-radius: 14px; background: linear-gradient(180deg, #fffdf6, #f3f8fc); border: 1px solid #dbe7f5; overflow: hidden; }
.tl-rsvg, .tl-csvg { display: block; width: 100%; height: auto; }
.tl-band { stroke: #fff; stroke-width: 1; cursor: pointer; }
.tl-band:hover { filter: brightness(1.06); }
.tl-axis { stroke: #374151; stroke-width: 1.6; }
.tl-pin { stroke: #b45309; stroke-width: 2; stroke-dasharray: 3 2; }
.tl-pt { fill: #f59e0b; stroke: #fff; stroke-width: 2; }
.tl-life { fill: #1e5b80; opacity: .8; }
.tl-rlabs { position: absolute; inset: 0; pointer-events: none; }
.tl-rlabs > span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; line-height: 1.2; }
.tl-bl { font-size: 12px; font-weight: 800; color: #3b2f1a; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.tl-tk { font-size: 11px; color: #374151; font-weight: 700; }
.tl-tk rt { font-size: 6px; }
.tl-pn { font-size: 12px; font-weight: 800; color: #fff; }

/* century */
.tl-cbig { text-align: center; font-size: 1.25rem; font-weight: 800; margin: 4px 0 6px; }
.tl-cy { color: #1e5b80; font-size: 1.5rem; }
.tl-cc { color: #b45309; font-size: 1.5rem; padding: 0 8px; border-radius: 10px; background: #fff3dc; }
.tl-cbox { position: relative; border-radius: 14px; background: linear-gradient(180deg, #fffdf6, #f3f8fc); border: 1px solid #dbe7f5; overflow: hidden; }
.tl-cband { fill: #e6edf5; stroke: #fff; stroke-width: 2; }
.tl-cband.on { fill: #fde9b8; stroke: var(--o); stroke-width: 2.5; }
.tl-cpin { stroke: #c0392b; stroke-width: 3; }
.tl-cl { font-size: 13px; font-weight: 800; color: #6b7280; text-align: center; }
.tl-cl small { display: block; font-size: 10px; font-weight: 700; }
.tl-cl.on { color: #b45309; font-size: 15px; }
.tl-ctl { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.tl-range { flex: 1 1 auto; min-width: 60px; height: 40px; accent-color: #f59e0b; }
.tl-sub { font-size: .95rem; color: var(--sub, #4b5563); }

/* zoom */
.tl-ztabs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.tl-tab { flex: 0 0 auto; min-height: 46px; border-radius: 999px; font-size: .95rem; }
.tl-zoom .tl-rsvg { min-height: 90px; }
.tl-zinfo { margin-top: 8px; padding: 8px 14px; border-radius: 14px; background: #f3f8fc; min-height: 52px; }
.tl-zinfo p { margin: 3px 0; }
.tl-zn { font-size: 1.3rem; font-weight: 800; color: #1e5b80; }
.tl-zn i { display: inline-block; width: 18px; height: 18px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }

/* person・sort：時代の おび */
.tl-eras { display: flex; flex-direction: column; gap: 8px; }
.tl-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.tl-era { border-radius: 16px; border: 2.5px dashed color-mix(in srgb, var(--ec) 70%, #555); background: linear-gradient(180deg, color-mix(in srgb, var(--ec) 35%, #fff), #fff); padding: 6px 8px 8px; cursor: pointer; min-height: 70px; }
.tl-eh { font-weight: 800; font-size: 1.05rem; color: #3b2f1a; }
.tl-eh small { margin-left: 8px; font-size: .8rem; color: #4b5563; font-weight: 700; }
.tl-ehold { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; min-height: 30px; }

/* 文・出典 */
.tl-msg { margin-top: 10px; padding: 8px 14px; border-radius: 14px; background: #f3f8fc; min-height: 44px; }
.tl-msg:empty { display: none; }
.tl-msg p { margin: 4px 0; }
.tl-ok.tl-msg { background: #e9f9f1; }
.tl-ng.tl-msg { background: #fff1f1; }
.tl-big { font-weight: 800; font-size: 1.1rem; }
.tl-msg.tl-ok .tl-big { color: var(--okd); } .tl-msg.tl-ng .tl-big { color: var(--ngd); }
.tl-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin: 6px 4px 0; font-size: 11px; line-height: 1.4; color: #4b6b80; }
.tl-cred { margin-left: auto; text-align: right; }
@media (prefers-reduced-motion: reduce) { .tl-card, .tl-b { transition: none !important; } .tl-shk { animation: none; } }
.tl-rlabs > .tl-ln { transform: translate(4px, -50%); font-size: 10px; font-weight: 700; color: #1e5b80; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.tl-rlabs > .tl-ln.lf { transform: translate(calc(-100% - 4px), -50%); }
.tl-ln rt { font-size: 6px; }
