/* angle（角・分度器・垂直と平行）。0の線・もとの へん＝青、まわす へん・2本の 線＝オレンジ、はば＝みどり */
.ag-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ag-tabs[hidden], .ag-guess[hidden], .ag-ctl[hidden], .ag [hidden] { display: none; }
.ag-guess { background: #fff8e6; border: 2px solid var(--orange, #f59e0b); border-radius: 12px; padding: 8px 12px 10px; margin-bottom: 8px; }
.ag-ask { font-weight: 700; margin: 0 0 6px; }
.ag-gb, .ag-pick, .ag-q { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-g, .ag-b { min-height: 48px; padding: 4px 16px; border: 2px solid var(--ink, #1f2937); background: #fff; border-radius: 12px; font-weight: 700; font-size: 1rem; color: var(--ink, #1f2937); cursor: pointer; }
.ag-g:disabled { opacity: .45; cursor: default; }
.ag-g[aria-pressed="true"] { opacity: 1; background: #eaf1ff; border-color: #2563eb; }
.ag-b[aria-pressed="true"] { background: #fff4dc; border-color: #b45309; }
.ag-pick .ag-g { min-width: 96px; font-size: 1.15rem; }
.ag-pill { min-height: 44px; padding: 2px 14px; border: 2px solid var(--line, #e5e7eb); background: #fff; border-radius: 999px; font-weight: 700; font-size: .95rem; color: var(--ink, #1f2937); cursor: pointer; }
.ag-pill[aria-pressed="true"] { background: var(--ink, #1f2937); color: #fff; border-color: var(--ink, #1f2937); }
.ag-pill:disabled { opacity: .45; }
.ag-svg { width: 100%; height: auto; display: block; margin: 4px 0; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.ag-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 10px; }
.ag-go { min-height: 52px; padding: 6px 22px; border: 0; border-radius: 14px; background: var(--teal-d, #0f8a72); color: #fff; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.ag-go:disabled { background: #9ca3af; }
.ag-read { background: #f3f6ff; border-radius: 12px; padding: 8px 14px; min-height: 56px; }
.ag-read p { margin: 4px 0; }
.ag-res { font-weight: 700; color: var(--teal-d, #0f8a72); }
.ag-res.ng { color: #c2410c; }
.ag-note { font-size: .9rem; color: var(--sub, #4b5563); }
.ag-bl { color: #1d4ed8; } .ag-or { color: #b45309; } .ag-gr { color: #047857; }
.ag-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ag-dim { display: flex; align-items: center; gap: 6px; background: #f6f7f4; border-radius: 12px; padding: 4px 6px 4px 12px; }
.ag-dl { font-size: .9rem; font-weight: 700; margin-right: 2px; }
.ag-pm { min-width: 52px; height: 46px; border: 2px solid var(--line, #e5e7eb); background: #fff; border-radius: 23px; font-size: 1rem; font-weight: 700; color: var(--ink, #1f2937); padding: 0 8px; cursor: pointer; }
.ag-pm:disabled { opacity: .35; }
/* SVG */
.ag-t { font-size: 22px; font-weight: 700; fill: var(--ink, #1f2937); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.ag-sm { font-size: 19px; fill: #4b5563; }
.ag-tb { fill: #1d4ed8; } .ag-to { fill: #9a4a06; } .ag-tg { fill: #047857; } .ag-tr { fill: #b91c1c; font-size: 19px; }
.ag-ray { stroke: #374151; stroke-width: 5; stroke-linecap: round; }
.ag-r0 { stroke: #2563eb; stroke-width: 6; }
.ag-r1 { stroke: var(--orange, #f59e0b); stroke-width: 6; }
.ag-v { fill: #1f2937; }
.ag-sec { fill: #fde7c2; stroke: none; }
.ag-s180 { fill: #dbe7ff; stroke: none; }
.ag-s360 { fill: #c9f0dc; stroke: #059669; stroke-width: 3; }
.ag-arc { fill: none; stroke: var(--orange, #f59e0b); stroke-width: 4; }
.ag-ra { fill: none; stroke: #9a4a06; stroke-width: 2.5; }
.ag-ext { stroke: #2563eb; stroke-width: 3; stroke-dasharray: 8 6; }
.ag-ring { fill: none; stroke: #d1d5db; stroke-width: 2; }
/* 分度器 */
.ag-pf { fill: rgba(236, 244, 255, .82); stroke: #64748b; stroke-width: 2; }
.ag-pl { fill: none; stroke: #94a3b8; stroke-width: 1.5; }
.ag-pb { stroke: #475569; stroke-width: 2.5; }
.ag-tk { stroke: #64748b; stroke-width: 1; }
.ag-tk10 { stroke-width: 2; }
.ag-n { font-size: 18px; font-weight: 700; fill: #334155; text-anchor: middle; }
.ag-ni { font-size: 18px; fill: #475569; }
.ag-n.ag-use { fill: #1d4ed8; }
.ag-n.ag-dim { fill: #b6bec9; }
.ag-bub rect { fill: #fff; stroke: #1f2937; stroke-width: 2.5; }
.ag-bub text { font-size: 22px; font-weight: 700; fill: #1f2937; text-anchor: middle; }
.ag-bub.ag-use rect { fill: #dbe7ff; stroke: #2563eb; stroke-width: 3.5; }
.ag-bub.ag-use text { fill: #1d4ed8; }
.ag-bub.ag-dim rect { stroke: #cbd5e1; }
.ag-bub.ag-dim text { fill: #9ca3af; text-decoration: line-through; }
.ag-cnt { fill: none; stroke: #2563eb; stroke-width: 7; stroke-linecap: round; opacity: .85; }
.ag-cdot { fill: #2563eb; }
.ag-zero { fill: none; stroke: #2563eb; stroke-width: 3.5; }
.ag-in { animation: ag-in .6s ease-out both; }
@keyframes ag-in { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
/* つかむ 丸 */
.ag-hd { cursor: grab; touch-action: none; }
.ag-hdb { fill: rgba(245, 158, 11, .14); stroke: var(--orange, #f59e0b); stroke-width: 2; stroke-dasharray: 5 4; }
.ag-hdc { fill: var(--orange, #f59e0b); stroke: #fff; stroke-width: 3; }
/* 垂直・平行 */
.ag-lA { stroke: #2563eb; stroke-width: 5; stroke-linecap: round; }
.ag-lB { stroke: var(--orange, #f59e0b); stroke-width: 6; stroke-linecap: round; }
.ag-lext { stroke: var(--orange, #f59e0b); stroke-width: 4; stroke-dasharray: 9 7; }
.ag-x { fill: #dc2626; stroke: #fff; stroke-width: 2; }
.ag-w { stroke: #059669; stroke-width: 5; }
.ag-wd { fill: #059669; }
@media (prefers-reduced-motion: reduce) { .ag-in { animation: none !important; } }
/* quad：方眼の 四角形。平行な へんの 組＝むらさき・みどり */
.ag-grid { stroke: #dfe5ec; stroke-width: 1.2; }
.ag-qf { fill: #eef2ff; fill-opacity: .8; stroke: none; }
.ag-qs { stroke: #374151; stroke-width: 4; stroke-linecap: round; }
.ag-qs.ag-p1 { stroke: #7c3aed; stroke-width: 6; }
.ag-qs.ag-p2 { stroke: #059669; stroke-width: 6; }
.ag-tick { stroke: #1f2937; stroke-width: 2.5; }
.ag-qh { fill: rgba(0, 0, 0, 0); stroke: none; }
.ag-qv { fill: #fff; stroke: #374151; stroke-width: 3; }
.ag-qv.on { fill: var(--orange, #f59e0b); stroke: #9a4a06; }
.ag-ul { margin: 4px 0; padding-left: 1.2em; }
.ag-qn { font-size: 1.15rem; color: #6d28d9; }
.ag-pad .ag-pm { min-width: 46px; }
.ag-gb:empty { display: none; }
