
.tool-tabs {display:flex;flex-wrap:wrap;border-bottom:1px solid #536471;margin:16px 0;}
.tool-tabs button {flex:1;min-width:90px;background:transparent;color:#b8c7d4;border:0;border-bottom:3px solid transparent;padding:14px 6px;font-weight:700;cursor:pointer;}
.tool-tabs button[aria-selected="true"] {color:#9bd5fa;border-bottom-color:#58b4ef;background:#1c3245;}
[role="tabpanel"][hidden],.shared-image[hidden] {display:none;}
[role="tabpanel"] h2 {font-size:20px;color:#eff5f9;}
[role="tabpanel"]>p,.shared-image p {font-size:13px;line-height:1.7;color:#b8c7d4;}
.shared-image {background:#192734;border:1px solid #38444d;padding:14px;border-radius:10px;margin:12px 0;}
.shared-image label,.tool-fields label,.ab-grid label {display:block;font-size:14px;line-height:1.7;margin-bottom:12px;}
.shared-image input,.ab-grid input {display:block;width:100%;max-width:100%;}
.tool-fields {display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.tool-fields select,.tool-fields input,.ab-grid textarea {display:block;max-width:100%;width:100%;min-height:40px;}
.tool-fields input[type="color"] {height:44px;}
[role="tabpanel"] select,.ab-grid textarea {background:#15202b;color:#eff5f9;border:1px solid #536471;padding:8px;border-radius:6px;font:inherit;}
#padCanvas {display:block;max-width:100%;max-height:450px;width:auto;height:auto;margin:16px auto;border:1px solid #536471;}
[role="tabpanel"]:not(#tool-panel-0) button {background:#17679c;color:white;border:1px solid #479ed5;border-radius:999px;min-height:44px;padding:8px 16px;margin:4px;font:inherit;font-size:14px;cursor:pointer;}
[role="tabpanel"] button:disabled {opacity:.45;cursor:not-allowed;}
.compare-scroll {overflow-x:auto;margin:16px 0;padding-bottom:12px;}
.ab-grid {display:flex;gap:16px;align-items:start;}
.ab-grid section {flex:0 0 280px;background:#192734;border:1px solid #536471;border-radius:12px;padding:12px;}
.ab-grid img {display:block;width:100%;height:auto;}
.ab-grid img:not([src]) {display:none;}
.ab-text {white-space:pre-wrap;overflow-wrap:anywhere;}
@media(max-width:380px){.tool-fields {grid-template-columns:1fr;} }

/* タブ・入力・結果・制約の文字階層 */
.tool-tabs button {font-size:14px;font-weight:600;color:#b8cad9;}
.tool-tabs button[aria-selected="true"] {font-weight:800;color:#b4e3ff;text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:2px;}
[role="tabpanel"] h2 {font-size:22px;font-weight:750;line-height:1.45;color:#f5f8fa;}
[role="tabpanel"]:not(#tool-panel-0)>p {font-size:14px;line-height:1.85;color:#c4d2de;}
.shared-image label,.tool-fields label,.ab-grid label {font-weight:700;color:#c4e4fa;}
.shared-image p {color:#b5c6d5;}
#toolStatus,#padSize {color:#a4e5cf!important;font-weight:650;}
#padMarginValue {color:#a4e5cf;font-weight:750;}
.ab-grid h3 {font-size:19px;font-weight:800;margin:0 0 12px;color:#b4e3ff;}
.ab-grid section+section h3 {color:#b9e6d3;}
.ab-grid label textarea,.tool-fields select {font-weight:400;color:#edf3f8;}
.ab-text {color:#f0f5f9;font-size:15px;line-height:1.8;}
[role="tabpanel"] .tool-caution {color:#f2d49a;font-size:13px;line-height:1.8;}

/* 投稿の表示面はライト配色、周囲の編集操作はダーク配色 */
#timeline {color-scheme:light;background:#fff;color:#0f1419;border-color:#cfd9de;}
#timeline .tweet {background:#fff;color:#0f1419;border-bottom-color:#eff3f4;}
#timeline .tweet.mine {background:#fff;border-left-color:#1d9bf0;}
#timeline .name {color:#0f1419;}
#timeline .handle {color:#536471;}
#timeline .text {color:#0f1419;}
#timeline #myTagText {color:#0969a5;}
#timeline .img-box {background:#f7f9f9;color:#536471;border-color:#cfd9de;}
#timeline .avatar {background:#cfd9de;}
#timeline .avatar.me {background:#1d9bf0;}
#timeline .image-change {background:#fff;color:#0969a5;border-color:#a4bfd0;}
#timeline .image-change-primary {background:#0969a5;color:#fff;border-color:#0969a5;}
#timeline .image-change:hover {background:#e8f3fa;color:#075b91;}
#timeline .image-change:focus-visible {outline-color:#0969a5;}
.ab-grid .ab-post {color-scheme:light;background:#fff;color:#0f1419;border:1px solid #cfd9de;border-radius:10px;padding:12px;margin-top:16px;min-height:110px;}
.ab-post .ab-text {color:#0f1419;line-height:1.7;margin:0 0 12px;}
.ab-post img {border:1px solid #cfd9de;border-radius:8px;background:#fff;}

/* 入力と反映先のタイムラインをひとつの領域として囲む */
.post-workspace {margin:14px 0;border:1px solid #6b879b;border-radius:12px;background:#192734;overflow:hidden;}
.post-workspace > .controls {margin:0;border:0;border-radius:0;padding:16px;border-bottom:1px solid #6b879b;}
.post-workspace > .timeline-wrap {margin:0;}
.post-workspace #timeline {border:0;border-radius:0;}

/* 入力・目的・比較の見通しを揃える */
#tagText {display:block;width:100%;min-height:90px;resize:vertical;background:#15202b;color:#eff5f9;border:1px solid #6b879b;border-radius:6px;padding:10px;font:inherit;font-size:16px;line-height:1.6;}
#myTagText {white-space:pre-wrap;overflow-wrap:anywhere;}
.input-note,.tool-task-hint {font-size:13px;line-height:1.7;color:#c4d2de;margin:10px 0 0;}
.tool-task-hint {border-left:3px solid #58b4ef;padding:4px 12px;margin-bottom:12px;}
#tagText:focus-visible {outline:3px solid #8ed0fa;outline-offset:2px;}
@media(max-width:520px){
  .ab-grid {flex-direction:column;}
  .ab-grid section {flex:0 0 auto;width:100%;min-width:0;}
  .compare-scroll {max-width:100%;}
}


/* 選択中・展開中を黄色と形で示す */
:root {--active-text:#ffe082;--active-surface:#343124;}
.tool-tabs button[aria-selected="true"] {color:var(--active-text);border-bottom-color:var(--active-text);background:var(--active-surface);font-weight:800;}
.about .about-accordion[open] > summary,
.comparison details[open] > summary {color:var(--active-text);background:var(--active-surface);font-weight:750;text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:2px;box-shadow:inset 3px 0 var(--active-text);padding-left:12px;}
.comparison button[aria-pressed="true"] {color:var(--active-text);background:var(--active-surface);border-color:var(--active-text);font-weight:800;text-decoration:underline;text-underline-offset:4px;}
.tool-tabs button:focus-visible,.about summary:focus-visible,.comparison summary:focus-visible {outline:3px solid var(--active-text);outline-offset:3px;}

/* ページ冒頭も編集欄と同じ配色・余白で統一 */
.tool-header {background:#192734;border:1px solid #38444d;border-radius:12px;padding:20px;margin-bottom:16px;}
.tool-header h1 {display:block;margin:0;color:#f5f8fa;font-size:clamp(20px,4.8vw,25px);font-weight:800;line-height:1.45;letter-spacing:.01em;}
.tool-header-context {display:block;margin-bottom:6px;color:#b4d9f0;font-size:12px;font-weight:600;letter-spacing:.04em;}
.tool-header-meta {margin:16px 0 0;padding-top:12px;border-top:1px solid #38444d;display:grid;gap:8px;font-size:13px;line-height:1.7;}
.tool-header-meta > div {display:grid;grid-template-columns:3em minmax(0,1fr);gap:10px;align-items:baseline;}
.tool-header-meta dt {color:#aebfcd;font-weight:600;}
.tool-header-meta dd {margin:0;color:#e0eaf2;overflow-wrap:anywhere;}
@media(max-width:380px){.tool-header {padding:16px;}}

/* 開いている説明の始まりから終わりまでを一続きの領域にする */
.about .about-accordion,
.comparison details,
.about .about-accordion > summary,
.comparison details > summary {padding:12px;min-height:48px;cursor:pointer;margin:0;border:0;border-radius:9px;}
.about .about-accordion[open],
.comparison details[open] {background:#242b30;border-color:#bfa65f;border-left:4px solid var(--active-text);padding:0 12px 12px;}
.about .about-accordion[open] > summary,
.comparison details[open] > summary {margin:0 -12px 12px;border-radius:6px 9px 0 0;border-bottom:1px solid #bfa65f;box-shadow:none;padding:12px;background:var(--active-surface);}
.about .about-accordion[open] > :last-child,
.comparison details[open] > :last-child {margin-bottom:0;}
@media(max-width:520px){.tool-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));}.tool-tabs button {min-width:0;}}
