/* TaxAI v3120 OCR Journal Review Rebuild Foundation */

.taxai-ocr-review-v3120{
    --taxai-bg:#f6f8fb;
    --taxai-card:#ffffff;
    --taxai-border:#e5eaf2;
    --taxai-text:#0f172a;
    --taxai-muted:#64748b;
    --taxai-primary:#2563eb;
    --taxai-danger:#dc2626;
    --taxai-ok:#059669;
    background:var(--taxai-bg);
}

.taxai-ocr-review-v3120 .taxai-page-header,
.taxai-ocr-review-v3120 .taxai-hero{
    margin-bottom:14px!important;
}

.taxai-v3120-shell{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:14px;
}

.taxai-v3120-toolbar{
    position:sticky;
    top:0;
    z-index:30;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
    margin-bottom:14px;
    background:rgba(255,255,255,.92);
    backdrop-filter:blur(10px);
    border:1px solid var(--taxai-border);
    border-radius:16px;
    box-shadow:0 8px 24px rgba(15,23,42,.06);
}

.taxai-v3120-toolbar-title{
    font-weight:800;
    color:var(--taxai-text);
    letter-spacing:.02em;
}

.taxai-v3120-toolbar-sub{
    font-size:12px;
    color:var(--taxai-muted);
    margin-top:2px;
}

.taxai-v3120-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.taxai-v3120-btn{
    border:1px solid var(--taxai-border);
    background:#fff;
    color:var(--taxai-text);
    padding:8px 11px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
}

.taxai-v3120-btn-primary{
    background:var(--taxai-primary);
    border-color:var(--taxai-primary);
    color:#fff;
}

.taxai-v3120-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(360px,1fr));
    gap:14px;
}

.taxai-ocr-review-v3120 .taxai-review-card-v3008,
.taxai-ocr-review-v3120 .taxai-review-card{
    border:1px solid var(--taxai-border)!important;
    border-radius:18px!important;
    background:var(--taxai-card)!important;
    box-shadow:0 10px 28px rgba(15,23,42,.06)!important;
    overflow:hidden!important;
}

.taxai-ocr-review-v3120 .taxai-review-card-v3008:hover,
.taxai-ocr-review-v3120 .taxai-review-card:hover{
    box-shadow:0 16px 36px rgba(15,23,42,.1)!important;
    transform:translateY(-1px);
}

.taxai-v3120-compact .taxai-review-card-v3008,
.taxai-v3120-compact .taxai-review-card{
    font-size:13px!important;
}

.taxai-v3120-focus .taxai-review-card-v3008:not(.taxai-v3120-current),
.taxai-v3120-focus .taxai-review-card:not(.taxai-v3120-current){
    opacity:.38;
}

.taxai-v3120-current{
    outline:3px solid rgba(37,99,235,.22)!important;
}

@media (max-width: 900px){
    .taxai-v3120-toolbar{
        align-items:flex-start;
        flex-direction:column;
    }
    .taxai-v3120-grid{
        grid-template-columns:1fr;
    }
}

/* TaxAI v3121 OCR review dedupe and readability */
.taxai-ocr-review-v3120 .taxai-ai-card-title{
    font-size:12px!important;
    color:#64748b!important;
    margin-bottom:6px!important;
}

.taxai-ocr-review-v3120 .taxai-v2835-title,
.taxai-ocr-review-v3120 .taxai-v2848-title{
    font-size:15px!important;
    line-height:1.35!important;
    margin-bottom:8px!important;
}

.taxai-ocr-review-v3120 .taxai-review-card-v3008 [class*="reason"],
.taxai-ocr-review-v3120 .taxai-review-card [class*="reason"]{
    line-height:1.55!important;
}

.taxai-v3121-duplicate-hidden{
    display:none!important;
}

.taxai-v3121-reason-summary{
    margin-top:8px!important;
    padding:9px 10px!important;
    background:#f8fafc!important;
    border:1px solid #e5eaf2!important;
    border-radius:12px!important;
    color:#334155!important;
    font-size:12.5px!important;
    line-height:1.55!important;
    max-height:5.2em!important;
    overflow:hidden!important;
}

.taxai-v3121-reason-summary:hover{
    max-height:none!important;
}

/* TaxAI v3122 three pane visual rebuild */
.taxai-ocr-review-v3120 .taxai-review-card-v3008,
.taxai-ocr-review-v3120 .taxai-review-card{
    padding:14px!important;
}

.taxai-v3122-card-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:10px;
    padding-bottom:10px;
    border-bottom:1px solid #e5eaf2;
}

.taxai-v3122-card-title{
    font-size:14px;
    font-weight:900;
    color:#0f172a;
}

.taxai-v3122-card-meta{
    font-size:12px;
    color:#64748b;
}

.taxai-v3122-pane-grid{
    display:grid!important;
    grid-template-columns:220px minmax(0,1fr) minmax(280px,.95fr)!important;
    gap:12px!important;
    align-items:start!important;
}

.taxai-v3122-pane{
    min-width:0;
    border:1px solid #e5eaf2;
    border-radius:14px;
    background:#fff;
    padding:10px;
}

.taxai-v3122-pane-label{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:8px;
    font-size:11px;
    font-weight:900;
    color:#64748b;
    letter-spacing:.06em;
}

.taxai-v3122-pane-image{
    background:#f8fafc;
}

.taxai-v3122-pane-image img{
    width:100%!important;
    max-height:260px!important;
    object-fit:contain!important;
    border-radius:10px!important;
    background:#fff!important;
}

.taxai-v3122-pane-ocr{
    background:#ffffff;
}

.taxai-v3122-pane-ai{
    background:#fbfdff;
}

.taxai-v3122-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:10px;
    padding-top:10px;
    border-top:1px solid #e5eaf2;
}

.taxai-v3122-actions button,
.taxai-v3122-actions a{
    min-height:34px!important;
}

.taxai-v3122-hidden-source{
    display:none!important;
}

.taxai-v3122-empty{
    color:#94a3b8;
    font-size:12px;
    line-height:1.5;
}

@media (max-width: 1180px){
    .taxai-v3122-pane-grid{
        grid-template-columns:180px minmax(0,1fr)!important;
    }
    .taxai-v3122-pane-ai{
        grid-column:1 / -1;
    }
}

@media (max-width: 760px){
    .taxai-v3122-pane-grid{
        grid-template-columns:1fr!important;
    }
}

/* TaxAI v3123 keep original actions safe */
.taxai-v3123-original-actions{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:8px!important;
    margin-top:12px!important;
    padding-top:12px!important;
    border-top:1px solid #e5eaf2!important;
}

.taxai-v3123-original-actions button,
.taxai-v3123-original-actions a{
    position:relative!important;
    z-index:5!important;
    pointer-events:auto!important;
}

.taxai-v3123-source-visible{
    display:block!important;
}

.taxai-v3123-source-hidden-soft{
    display:none!important;
}

.taxai-v3123-toggle{
    margin-left:8px;
    border:1px solid #e5eaf2;
    background:#fff;
    color:#334155;
    border-radius:999px;
    padding:5px 9px;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
}

/* TaxAI v3124 decision header */
.taxai-v3124-decision{
    display:grid;
    grid-template-columns:1fr auto;
    gap:10px;
    align-items:center;
    margin:0 0 12px 0;
    padding:12px;
    border:1px solid #dbeafe;
    border-radius:14px;
    background:linear-gradient(180deg,#eff6ff 0%,#ffffff 100%);
}

.taxai-v3124-main{
    min-width:0;
}

.taxai-v3124-title{
    font-size:15px;
    font-weight:900;
    color:#0f172a;
    line-height:1.35;
}

.taxai-v3124-sub{
    margin-top:4px;
    font-size:12px;
    color:#64748b;
    line-height:1.45;
}

.taxai-v3124-score{
    min-width:74px;
    text-align:center;
    padding:8px 10px;
    border-radius:12px;
    background:#fff;
    border:1px solid #bfdbfe;
    color:#1d4ed8;
    font-weight:900;
}

.taxai-v3124-score small{
    display:block;
    font-size:10px;
    color:#64748b;
    font-weight:800;
}

@media (max-width:760px){
    .taxai-v3124-decision{
        grid-template-columns:1fr;
    }
    .taxai-v3124-score{
        width:max-content;
    }
}

/* TaxAI v3125 priority view cleanup */
.taxai-ocr-review-v3120 .taxai-v3122-pane-ai .taxai-ai-card-title{
    display:none!important;
}

.taxai-ocr-review-v3120 .taxai-v3122-pane-ai .taxai-v2835-title,
.taxai-ocr-review-v3120 .taxai-v3122-pane-ai .taxai-v2848-title{
    padding:8px 10px!important;
    border-radius:10px!important;
    background:#eff6ff!important;
    color:#1e3a8a!important;
    font-weight:900!important;
}

.taxai-v3125-mini-reason{
    margin-top:8px;
    padding:8px 10px;
    border-radius:10px;
    background:#f8fafc;
    border:1px solid #e5eaf2;
    color:#334155;
    font-size:12px;
    line-height:1.55;
}

.taxai-v3125-noise-hidden{
    display:none!important;
}

.taxai-v3125-show-more{
    display:inline-flex;
    align-items:center;
    gap:4px;
    margin-top:8px;
    border:1px solid #dbeafe;
    background:#fff;
    color:#1d4ed8;
    border-radius:999px;
    padding:5px 9px;
    font-size:11px;
    font-weight:900;
    cursor:pointer;
}

/* TaxAI v3126 header dedupe */
.taxai-ocr-review-v3120 h1 + .taxai-ocr-eyebrow-v2805 + h1,
.taxai-ocr-review-v3120 h1 + h1{
    display:none!important;
}

.taxai-v3126-page-lead{
    margin:0 0 14px 0;
    padding:12px 14px;
    border:1px solid #e5eaf2;
    border-radius:14px;
    background:#fff;
    color:#475569;
    font-size:13px;
    line-height:1.6;
}

.taxai-v3126-page-lead b{
    color:#0f172a;
}

/* TaxAI v3127 two pane workbench */
.taxai-v3127-workbench{
    display:grid;
    grid-template-columns:280px minmax(0,1fr);
    gap:14px;
    align-items:start;
}

.taxai-v3127-list{
    position:sticky;
    top:78px;
    max-height:calc(100vh - 100px);
    overflow:auto;
    padding:10px;
    border:1px solid #e5eaf2;
    border-radius:18px;
    background:#fff;
    box-shadow:0 10px 28px rgba(15,23,42,.06);
}

.taxai-v3127-list-title{
    font-size:13px;
    font-weight:900;
    color:#0f172a;
    margin:2px 2px 10px;
}

.taxai-v3127-item{
    width:100%;
    text-align:left;
    border:1px solid #e5eaf2;
    background:#fff;
    border-radius:12px;
    padding:9px 10px;
    margin-bottom:8px;
    cursor:pointer;
}

.taxai-v3127-item.is-active{
    border-color:#2563eb;
    background:#eff6ff;
}

.taxai-v3127-item-main{
    font-size:12px;
    font-weight:900;
    color:#0f172a;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.taxai-v3127-item-sub{
    margin-top:3px;
    font-size:11px;
    color:#64748b;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.taxai-v3127-detail{
    min-width:0;
}

.taxai-v3127-detail .taxai-review-card-v3008,
.taxai-v3127-detail .taxai-review-card{
    display:none!important;
}

.taxai-v3127-detail .taxai-review-card-v3008.is-active,
.taxai-v3127-detail .taxai-review-card.is-active{
    display:block!important;
}

.taxai-v3127-kbd{
    margin-top:10px;
    padding:8px 10px;
    border-radius:12px;
    background:#f8fafc;
    color:#64748b;
    font-size:11px;
    line-height:1.5;
}

@media (max-width: 900px){
    .taxai-v3127-workbench{
        grid-template-columns:1fr;
    }
    .taxai-v3127-list{
        position:relative;
        top:auto;
        max-height:220px;
    }
}

/* TaxAI v3128 runtime badge */
.taxai-v3128-runtime-badge{
    position:fixed;
    right:14px;
    bottom:14px;
    z-index:99999;
    padding:8px 11px;
    border-radius:999px;
    background:#0f172a;
    color:#fff;
    font-size:11px;
    font-weight:900;
    box-shadow:0 10px 28px rgba(15,23,42,.25);
    opacity:.86;
}

/* TaxAI v3130 OCR review Blade structure rebuild */
.taxai-v3130-shell{
    display:grid!important;
    grid-template-columns:minmax(420px,1.35fr) minmax(360px,.95fr)!important;
    gap:18px!important;
    align-items:start!important;
    padding-bottom:96px!important;
}
.taxai-v3130-image-pane{
    position:sticky!important;
    top:88px!important;
    min-height:640px!important;
}
.taxai-v3130-image-pane img,
.taxai-v3130-image-pane iframe,
.taxai-v3130-image-pane object{
    width:100%!important;
    max-height:78vh!important;
    object-fit:contain!important;
    border-radius:18px!important;
    background:#f8fafc!important;
}
.taxai-v3130-review-pane{
    display:flex!important;
    flex-direction:column!important;
    gap:14px!important;
}
.taxai-v3130-ocr-min{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
}
.taxai-v3130-field{
    padding:10px 12px!important;
    border:1px solid #e5e7eb!important;
    border-radius:14px!important;
    background:#fff!important;
}
.taxai-v3130-field b{
    display:block!important;
    font-size:11px!important;
    color:#64748b!important;
    margin-bottom:4px!important;
}
.taxai-v3130-field span{
    font-size:15px!important;
    font-weight:800!important;
    color:#0f172a!important;
}
.taxai-v3130-ai-main{
    border:2px solid #2563eb!important;
    border-radius:18px!important;
    padding:14px!important;
    background:#eff6ff!important;
}
.taxai-v3130-other-candidates{
    margin-top:10px!important;
}
.taxai-v3130-other-candidates summary{
    cursor:pointer!important;
    font-weight:800!important;
    color:#2563eb!important;
}
.taxai-v3130-fixed-footer{
    position:fixed!important;
    left:280px!important;
    right:24px!important;
    bottom:18px!important;
    z-index:9998!important;
    display:flex!important;
    justify-content:flex-end!important;
    gap:10px!important;
    padding:12px 14px!important;
    border:1px solid #e5e7eb!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.96)!important;
    box-shadow:0 18px 50px rgba(15,23,42,.18)!important;
    backdrop-filter:blur(10px)!important;
}
.taxai-v3130-fixed-footer .taxai-btn,
.taxai-v3130-fixed-footer button,
.taxai-v3130-fixed-footer a{
    min-width:108px!important;
    min-height:42px!important;
    font-weight:900!important;
}
@media(max-width:1100px){
    .taxai-v3130-shell{
        grid-template-columns:1fr!important;
    }
    .taxai-v3130-image-pane{
        position:relative!important;
        top:auto!important;
        min-height:0!important;
    }
    .taxai-v3130-fixed-footer{
        left:12px!important;
        right:12px!important;
        bottom:12px!important;
        flex-wrap:wrap!important;
    }
}

/* TaxAI v3131 image fix + candidate collapse */
.taxai-ocr-page-v2805{
    padding-bottom:104px!important;
}

.taxai-review-card-v3008,
.taxai-v2835-card,
.taxai-v2838-card{
    display:grid!important;
    grid-template-columns:minmax(440px,1.35fr) minmax(360px,.9fr)!important;
    gap:18px!important;
    align-items:start!important;
}

.taxai-review-card-v3008 img,
.taxai-v2835-card img,
.taxai-v2838-card img,
.taxai-review-card-v3008 iframe,
.taxai-v2835-card iframe,
.taxai-v2838-card iframe{
    width:100%!important;
    max-height:78vh!important;
    object-fit:contain!important;
    border-radius:18px!important;
    background:#f8fafc!important;
}

.taxai-review-card-v3008 > *:has(img),
.taxai-v2835-card > *:has(img),
.taxai-v2838-card > *:has(img){
    position:sticky!important;
    top:88px!important;
}

/* OCR結果は作業に必要な5項目を主役化 */
.taxai-v3130-ocr-min-marker ~ div,
.taxai-review-card-v3008 div:has(> b),
.taxai-v2835-card div:has(> b),
.taxai-v2838-card div:has(> b){
    border-radius:12px!important;
}

/* AI候補は1件目を標準表示、後続候補は圧縮 */
.taxai-review-card-v3008 .taxai-candidate-card:nth-of-type(n+2),
.taxai-review-card-v3008 .taxai-ai-candidate:nth-of-type(n+2),
.taxai-review-card-v3008 .taxai-v2835-candidate:nth-of-type(n+2),
.taxai-review-card-v3008 .taxai-v2838-candidate:nth-of-type(n+2){
    max-height:44px!important;
    overflow:hidden!important;
    opacity:.72!important;
    cursor:pointer!important;
    position:relative!important;
}

.taxai-review-card-v3008 .taxai-candidate-card:nth-of-type(n+2)::before,
.taxai-review-card-v3008 .taxai-ai-candidate:nth-of-type(n+2)::before,
.taxai-review-card-v3008 .taxai-v2835-candidate:nth-of-type(n+2)::before,
.taxai-review-card-v3008 .taxai-v2838-candidate:nth-of-type(n+2)::before{
    content:"他候補を見る";
    display:inline-flex;
    margin:0 0 8px 0;
    padding:5px 10px;
    border-radius:999px;
    background:#eef2ff;
    color:#2563eb;
    font-size:12px;
    font-weight:900;
}

/* ホバー時だけ中身を確認 */
.taxai-review-card-v3008 .taxai-candidate-card:nth-of-type(n+2):hover,
.taxai-review-card-v3008 .taxai-ai-candidate:nth-of-type(n+2):hover,
.taxai-review-card-v3008 .taxai-v2835-candidate:nth-of-type(n+2):hover,
.taxai-review-card-v3008 .taxai-v2838-candidate:nth-of-type(n+2):hover{
    max-height:520px!important;
    opacity:1!important;
    background:#fff!important;
    z-index:5!important;
}

/* 固定フッターの左位置補正 */
.taxai-v3130-fixed-footer{
    left:260px!important;
    right:20px!important;
}

@media(max-width:1100px){
    .taxai-review-card-v3008,
    .taxai-v2835-card,
    .taxai-v2838-card{
        grid-template-columns:1fr!important;
    }
    .taxai-v3130-fixed-footer{
        left:12px!important;
        right:12px!important;
    }
}


/* TaxAI v3132 force AI candidates compact */
.taxai-review-v2829 .taxai-review-card-v3008{
    grid-template-columns:minmax(480px,1.45fr) minmax(340px,.85fr)!important;
}

.taxai-review-v2829 .taxai-review-card-v3008 img,
.taxai-review-v2829 .taxai-review-card-v3008 iframe{
    width:100%!important;
    max-height:82vh!important;
    object-fit:contain!important;
}

/* 候補本文の長文を標準では隠す */
.taxai-review-v2829 .taxai-ai-reason,
.taxai-review-v2829 .taxai-reason,
.taxai-review-v2829 [class*="reason"]{
    max-height:38px!important;
    overflow:hidden!important;
    color:#475569!important;
    font-size:12px!important;
    line-height:1.5!important;
}

/* 候補カードらしき連続ブロックは2件目以降を圧縮 */
.taxai-review-v2829 [class*="candidate"]:nth-of-type(n+2),
.taxai-review-v2829 [class*="proposal"]:nth-of-type(n+2),
.taxai-review-v2829 [class*="suggest"]:nth-of-type(n+2){
    max-height:56px!important;
    overflow:hidden!important;
    opacity:.68!important;
    border-style:dashed!important;
}

.taxai-review-v2829 [class*="candidate"]:nth-of-type(n+2)::before,
.taxai-review-v2829 [class*="proposal"]:nth-of-type(n+2)::before,
.taxai-review-v2829 [class*="suggest"]:nth-of-type(n+2)::before{
    content:"他候補を見る";
    display:inline-flex!important;
    padding:5px 10px!important;
    margin-bottom:6px!important;
    border-radius:999px!important;
    background:#eef2ff!important;
    color:#2563eb!important;
    font-size:12px!important;
    font-weight:900!important;
}

.taxai-review-v2829 [class*="candidate"]:nth-of-type(n+2):hover,
.taxai-review-v2829 [class*="proposal"]:nth-of-type(n+2):hover,
.taxai-review-v2829 [class*="suggest"]:nth-of-type(n+2):hover{
    max-height:620px!important;
    opacity:1!important;
}

/* OCR項目は5項目を読みやすく */
.taxai-review-v2829 div:has(> b):has(+ span),
.taxai-review-v2829 div:has(> b){
    min-height:auto!important;
}

/* 重複した理由文は視覚的に弱める */
.taxai-review-v2829 [class*="reason"] + [class*="reason"]{
    display:none!important;
}


/* TaxAI v3133 Blade candidate details rebuild */
.taxai-v3133-other-candidate{
    margin-top:10px!important;
    border:1px dashed #cbd5e1!important;
    border-radius:14px!important;
    background:#f8fafc!important;
    overflow:hidden!important;
}
.taxai-v3133-other-candidate summary{
    cursor:pointer!important;
    padding:10px 12px!important;
    font-weight:900!important;
    color:#2563eb!important;
    background:#eef2ff!important;
}
.taxai-v3133-other-candidate[open]{
    background:#fff!important;
}
.taxai-v3133-other-candidate .taxai-v2835-body{
    padding:12px!important;
}

/* v3133: 理由文は標準で読み切れる範囲へ */
.taxai-v2835-body [class*="reason"],
.taxai-v2835-body .taxai-ai-value{
    line-height:1.55!important;
}

/* v3133: 画像・OCR・AI比率をさらにレビュー向けに */
.taxai-review-card-v3008{
    grid-template-columns:minmax(520px,1.55fr) minmax(340px,.85fr)!important;
}
.taxai-review-card-v3008 img,
.taxai-review-card-v3008 iframe{
    max-height:84vh!important;
}


/* TaxAI v3134 Blade counter candidate details */
.taxai-v3134-other-candidate{
    margin-top:10px!important;
    border:1px dashed #cbd5e1!important;
    border-radius:14px!important;
    background:#f8fafc!important;
    overflow:hidden!important;
}
.taxai-v3134-other-candidate summary{
    cursor:pointer!important;
    padding:10px 12px!important;
    font-weight:900!important;
    color:#2563eb!important;
    background:#eef2ff!important;
}
.taxai-v3134-other-candidate[open]{
    background:#fff!important;
}
.taxai-v3134-other-candidate .taxai-v2835-body{
    padding:12px!important;
}
.taxai-review-card-v3008{
    grid-template-columns:minmax(540px,1.6fr) minmax(330px,.8fr)!important;
}
.taxai-review-card-v3008 img,
.taxai-review-card-v3008 iframe{
    max-height:84vh!important;
}


/* TaxAI v3135 safe compact: do not collapse whole review bodies */
.taxai-v2835-body{
    max-height:none!important;
    overflow:visible!important;
}
.taxai-v2835-body [class*="reason"],
.taxai-v2835-body .taxai-ai-value{
    max-height:72px!important;
    overflow:hidden!important;
    line-height:1.55!important;
}
.taxai-v2835-body:hover [class*="reason"],
.taxai-v2835-body:hover .taxai-ai-value{
    max-height:420px!important;
}

/* keep image large */
.taxai-review-card-v3008{
    grid-template-columns:minmax(540px,1.6fr) minmax(330px,.8fr)!important;
}
.taxai-review-card-v3008 img,
.taxai-review-card-v3008 iframe{
    max-height:84vh!important;
}


/* TaxAI v3137 real other candidates details */
.taxai-v3137-other-candidates{
    margin-top:10px!important;
    border:1px solid #dbeafe!important;
    border-radius:14px!important;
    background:#f8fafc!important;
    overflow:hidden!important;
}
.taxai-v3137-other-candidates summary{
    cursor:pointer!important;
    padding:10px 12px!important;
    font-weight:900!important;
    color:#2563eb!important;
    background:#eff6ff!important;
}
.taxai-v3137-candidate-row{
    padding:10px 12px!important;
    border-top:1px solid #e5e7eb!important;
    background:#fff!important;
}
.taxai-v3137-candidate-main{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    font-size:13px!important;
}
.taxai-v3137-candidate-main b{
    font-size:14px!important;
    color:#0f172a!important;
}
.taxai-v3137-candidate-main em{
    margin-left:auto!important;
    font-style:normal!important;
    font-weight:900!important;
    color:#2563eb!important;
}
.taxai-v3137-candidate-reason{
    margin-top:6px!important;
    color:#64748b!important;
    font-size:12px!important;
    line-height:1.45!important;
    max-height:52px!important;
    overflow:hidden!important;
}
.taxai-v3137-candidate-row:hover .taxai-v3137-candidate-reason{
    max-height:240px!important;
}

/* OCRは5項目優先、仕訳はAI側に寄せる */
.taxai-v2835-ocr-grid > div:nth-child(6){
    display:none!important;
}

/* TaxAI v3138 finish review layout */
.taxai-v2835-ocr-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
}
.taxai-v2835-ocr-grid > div:nth-child(n+6){
    display:none!important;
}
.taxai-v2835-ai-panel{
    gap:10px!important;
}
.taxai-v2835-reason{
    max-height:64px!important;
    overflow:hidden!important;
    color:#475569!important;
}
.taxai-v2835-reason:hover{
    max-height:320px!important;
}
.taxai-v3130-fixed-footer{
    left:260px!important;
    right:20px!important;
    bottom:16px!important;
}
.taxai-v3130-fixed-footer button{
    box-shadow:none!important;
}
.taxai-v3130-fixed-footer button[data-taxai-action="approve"]{
    min-width:132px!important;
}
@media(max-width:1100px){
    .taxai-v3130-fixed-footer{
        left:12px!important;
        right:12px!important;
    }
}

/* TaxAI v3139 review button / visual micro adjust */
.taxai-v3138-review-footer,
.taxai-review-fixed-footer,
.taxai-v3128-review-footer{
    z-index:2147483000!important;
}

.taxai-v3138-review-footer button,
.taxai-v3138-review-footer a,
.taxai-review-fixed-footer button,
.taxai-review-fixed-footer a{
    min-height:42px!important;
    cursor:pointer!important;
    pointer-events:auto!important;
}

.taxai-review-card-v3008{
    scroll-margin-bottom:120px!important;
}

.taxai-v2835-ocr-grid{
    align-items:stretch!important;
}

.taxai-v2835-ocr-grid > div{
    min-width:0!important;
}

.taxai-review-card-v3008 img,
.taxai-review-card-v3008 iframe,
.taxai-review-card-v3008 embed{
    max-width:100%!important;
}

.taxai-v3139-screen-audit-badge{
    position:fixed;
    left:10px;
    bottom:10px;
    z-index:2147483001;
    font-size:11px;
    line-height:1;
    padding:6px 8px;
    border-radius:999px;
    background:rgba(15,23,42,.82);
    color:#fff;
    pointer-events:none;
}

/* TaxAI v3140 production finish */
.taxai-v3139-screen-audit-badge{
    display:none!important;
}

.taxai-review-card-v3008{
    margin-bottom:18px!important;
}

.taxai-review-card-v3008 details summary{
    cursor:pointer!important;
    user-select:none!important;
}

.taxai-review-card-v3008 details[open]{
    padding-bottom:8px!important;
}

.taxai-v3138-review-footer,
.taxai-review-fixed-footer,
.taxai-v3128-review-footer{
    backdrop-filter:blur(10px);
}

/* TaxAI v3141 review density final polish */
.taxai-review-shell,
.taxai-v2835-review-shell,
.taxai-v3120-review-shell{
    gap:14px!important;
}

.taxai-review-list,
.taxai-v2835-review-list,
.taxai-v3120-review-list{
    width:320px!important;
    min-width:320px!important;
}

.taxai-review-main,
.taxai-v2835-review-main,
.taxai-v3120-review-main{
    min-width:0!important;
}

.taxai-review-card-v3008{
    padding:14px!important;
}

.taxai-review-card-v3008 .taxai-v2835-ocr-grid{
    grid-template-columns:1.05fr .95fr 1.05fr!important;
    gap:10px!important;
}

.taxai-review-card-v3008 .taxai-v2835-ocr-grid > div{
    padding:12px!important;
}

.taxai-review-card-v3008 details{
    margin-top:8px!important;
}

.taxai-review-card-v3008 summary{
    padding:9px 12px!important;
    border-radius:10px!important;
    background:#eef5ff!important;
    color:#155eef!important;
    font-weight:700!important;
}

.taxai-review-card-v3008 details[open] summary{
    margin-bottom:8px!important;
}

.taxai-review-card-v3008 .taxai-ai-reason,
.taxai-review-card-v3008 .taxai-v2835-ai-reason,
.taxai-review-card-v3008 .taxai-v3122-ai-reason{
    max-height:92px!important;
    overflow:auto!important;
    font-size:12px!important;
    line-height:1.55!important;
}

.taxai-review-card-v3008 .taxai-ai-panel,
.taxai-review-card-v3008 .taxai-v2835-ai-panel,
.taxai-review-card-v3008 .taxai-v3122-ai-panel{
    max-height:360px!important;
    overflow:auto!important;
}

.taxai-review-card-v3008 .taxai-detail-row,
.taxai-review-card-v3008 .taxai-v2835-detail-row{
    gap:6px!important;
    flex-wrap:wrap!important;
}

.taxai-review-card-v3008 .taxai-detail-row button,
.taxai-review-card-v3008 .taxai-v2835-detail-row button{
    font-size:0!important;
    min-width:38px!important;
    height:32px!important;
    padding:0 10px!important;
}

.taxai-review-card-v3008 .taxai-detail-row button::after,
.taxai-review-card-v3008 .taxai-v2835-detail-row button::after{
    content:"詳細";
    font-size:12px!important;
}

.taxai-review-card-v3008 .taxai-detail-row button:nth-child(n+5),
.taxai-review-card-v3008 .taxai-v2835-detail-row button:nth-child(n+5){
    display:none!important;
}

.taxai-review-kpi,
.taxai-v2835-kpi,
.taxai-v3120-kpi{
    padding:12px 18px!important;
    min-height:0!important;
}

.taxai-review-kpi *{
    line-height:1.35!important;
}

.taxai-review-fixed-footer,
.taxai-v3138-review-footer,
.taxai-v3128-review-footer{
    height:64px!important;
    padding:10px 22px!important;
}

/* ==========================================================
   TaxAI v3142 Blade cleanup
   ========================================================== */

.taxai-v3142-ai-reason{
    max-height:88px;
    overflow:auto;
}

.taxai-v3142-history{
    margin-top:8px;
}

.taxai-v3142-hidden{
    display:none!important;
}

.taxai-v3142-detail-row button:nth-child(n+5){
    display:none!important;
}


/* TaxAI v3160 review card blade-structure rebuild */
.taxai-v3160-card{
    display:grid!important;
    grid-template-rows:auto auto auto!important;
    gap:10px!important;
    padding:12px!important;
    border-radius:16px!important;
}
.taxai-v3160-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
}
.taxai-v3160-title{
    font-size:18px!important;
    font-weight:900!important;
    color:#0f172a!important;
}
.taxai-v3160-conf{
    font-size:13px!important;
    font-weight:900!important;
    padding:5px 9px!important;
    border-radius:999px!important;
    background:#ecfdf5!important;
    color:#047857!important;
}
.taxai-v3160-body{
    display:grid!important;
    grid-template-columns:minmax(220px,34%) minmax(0,1fr)!important;
    gap:12px!important;
    align-items:stretch!important;
}
.taxai-v3160-image{
    min-height:170px!important;
    max-height:260px!important;
    overflow:hidden!important;
    border-radius:14px!important;
    background:#f8fafc!important;
}
.taxai-v3160-image img,
.taxai-v3160-image canvas,
.taxai-v3160-image iframe{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
}
.taxai-v3160-ai{
    min-height:170px!important;
    border:2px solid #dbeafe!important;
    background:linear-gradient(180deg,#eff6ff,#ffffff)!important;
    border-radius:14px!important;
    padding:12px!important;
}
.taxai-v3160-ai-main{
    font-size:22px!important;
    line-height:1.25!important;
    font-weight:950!important;
    color:#1e3a8a!important;
    margin-bottom:8px!important;
}
.taxai-v3160-ai-sub{
    font-size:13px!important;
    color:#334155!important;
    line-height:1.55!important;
}
.taxai-v3160-ocr{
    max-height:96px!important;
    overflow:hidden!important;
    border-top:1px solid #e5e7eb!important;
    padding-top:8px!important;
    font-size:12px!important;
    color:#475569!important;
}
.taxai-v3160-ocr.is-open{
    max-height:none!important;
}
.taxai-v3160-ocr-toggle{
    margin-top:6px!important;
    border:0!important;
    background:#f1f5f9!important;
    border-radius:999px!important;
    padding:4px 10px!important;
    font-size:12px!important;
    font-weight:800!important;
    cursor:pointer!important;
}
.taxai-v3160-menu{
    border:0!important;
    background:#f8fafc!important;
    border-radius:999px!important;
    width:34px!important;
    height:34px!important;
    font-size:20px!important;
    cursor:pointer!important;
}
.taxai-v3160-menu-panel{
    display:none;
    position:absolute;
    right:12px;
    top:48px;
    z-index:30;
    min-width:180px;
    padding:8px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#fff;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
}
.taxai-v3160-menu-panel.is-open{
    display:block!important;
}
.taxai-v3160-menu-panel button,
.taxai-v3160-menu-panel a{
    display:block!important;
    width:100%!important;
    text-align:left!important;
    padding:8px 10px!important;
    border-radius:8px!important;
    color:#0f172a!important;
    background:transparent!important;
}
.taxai-review-card-v3008.taxai-v3160-ready{
    position:relative!important;
}
.taxai-review-card-v3008.taxai-v3160-ready > *:not(.taxai-v3160-card){
    display:none!important;
}
@media(max-width:900px){
    .taxai-v3160-body{
        grid-template-columns:1fr!important;
    }
}

/* TaxAI v3174-v3178 review UI final polish */

/* v3174 card height / spacing unify */
.taxai-ocr-card-v2800.taxai-v2835-card{
    min-height:430px!important;
    padding:16px!important;
    gap:14px!important;
    align-items:stretch!important;
}

.taxai-v2835-card > *,
.taxai-v3160-card > *,
.taxai-v3173-review-card > *{
    min-height:0!important;
}

/* main review area height balance */
.taxai-v2835-main,
.taxai-v3160-main,
.taxai-review-main,
.taxai-v3173-main{
    min-height:390px!important;
    align-items:stretch!important;
}

.taxai-v2835-ocr-panel,
.taxai-v2835-ai-panel,
.taxai-v3160-ocr-panel,
.taxai-v3160-ai-panel{
    height:100%!important;
    min-height:360px!important;
}

/* v3175 OCR image enlargement */
.taxai-v2835-ocr-image,
.taxai-v2835-image-box,
.taxai-v3160-ocr-image,
.taxai-v3160-image-box,
.taxai-review-image-box{
    min-height:260px!important;
    height:100%!important;
}

.taxai-v2835-ocr-image img,
.taxai-v2835-image-box img,
.taxai-v3160-ocr-image img,
.taxai-v3160-image-box img,
.taxai-review-image-box img{
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
}

/* if grid exists, give OCR more width */
.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    grid-template-columns:minmax(180px,.9fr) minmax(280px,1.25fr) minmax(260px,1fr)!important;
    gap:14px!important;
}

/* v3176 AI proposal card polish */
.taxai-v2835-ai-card,
.taxai-v3160-ai-card,
.taxai-ai-proposal-card,
.taxai-review-ai-proposal{
    padding:20px 22px!important;
    line-height:1.62!important;
    border-radius:16px!important;
}

.taxai-v2835-ai-card h3,
.taxai-v3160-ai-card h3,
.taxai-ai-proposal-card h3,
.taxai-review-ai-proposal h3{
    font-size:22px!important;
    line-height:1.28!important;
    margin:0 0 14px!important;
    letter-spacing:-.02em!important;
}

.taxai-v2835-ai-card p,
.taxai-v3160-ai-card p,
.taxai-ai-proposal-card p,
.taxai-review-ai-proposal p{
    margin:5px 0!important;
}

/* OCR summary compact + full button alignment */
.taxai-v2835-ocr-summary,
.taxai-v3160-ocr-summary,
.taxai-ocr-summary{
    margin-top:12px!important;
    line-height:1.55!important;
}

.taxai-v2835-ocr-summary button,
.taxai-v3160-ocr-summary button,
.taxai-ocr-summary button,
.taxai-v2835-ocr-summary a,
.taxai-v3160-ocr-summary a,
.taxai-ocr-summary a{
    margin-top:6px!important;
    align-self:flex-end!important;
}

/* v3177 KPI height compression */
.taxai-kpi-grid,
.taxai-v2835-kpi-grid,
.taxai-review-kpi-grid{
    min-height:0!important;
}

.taxai-kpi-card,
.taxai-v2835-kpi,
.taxai-review-kpi,
.taxai-v3173-kpi{
    min-height:78px!important;
    padding:14px 18px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
}

.taxai-kpi-card strong,
.taxai-v2835-kpi strong,
.taxai-review-kpi strong,
.taxai-v3173-kpi strong{
    font-size:20px!important;
    line-height:1.2!important;
}

/* v3178 left review list density */
.taxai-v2835-list,
.taxai-v3160-list,
.taxai-review-list{
    padding:10px!important;
}

.taxai-v2835-list-item,
.taxai-v3160-list-item,
.taxai-review-list-item,
.taxai-review-case-item{
    padding:9px 10px!important;
    margin-bottom:6px!important;
    min-height:0!important;
    border-radius:12px!important;
    line-height:1.35!important;
}

.taxai-v2835-list-item strong,
.taxai-v3160-list-item strong,
.taxai-review-list-item strong,
.taxai-review-case-item strong{
    font-size:12px!important;
    line-height:1.25!important;
}

.taxai-v2835-list-item small,
.taxai-v3160-list-item small,
.taxai-review-list-item small,
.taxai-review-case-item small{
    font-size:11px!important;
    line-height:1.25!important;
}

/* bottom fixed actions slightly more tactile */
.taxai-review-fixed-footer button,
.taxai-v2835-fixed-footer button,
.taxai-v3173-footer button{
    min-height:44px!important;
    min-width:108px!important;
    border-radius:12px!important;
}

/* mobile safety */
@media (max-width: 980px){
    .taxai-v2835-body,
    .taxai-v3160-body,
    .taxai-review-card-body{
        grid-template-columns:1fr!important;
    }
    .taxai-ocr-card-v2800.taxai-v2835-card{
        min-height:0!important;
    }
}

/* TaxAI v3181 rendered duplicate h1 safe hide */
/* Keep first visible OCR review h1, hide later duplicated rendered h1 only */
main h1 + h1,
.taxai-main h1 + h1,
.taxai-content h1 + h1,
.taxai-os-main h1 + h1{
    display:none!important;
}

/* If duplicated h1 is separated only by whitespace/block wrappers */
.taxai-page-header h1:nth-of-type(n+2),
.taxai-hero h1:nth-of-type(n+2),
.taxai-os-hero h1:nth-of-type(n+2){
    display:none!important;
}

/* TaxAI v3183 review final visual tighten */

/* lower summary card: remove title duplication feel */
.taxai-v3182-hero-title{
    font-size:20px!important;
    margin:0!important;
}
.taxai-ocr-eyebrow-v2805{
    margin-bottom:8px!important;
}

/* KPI: tighter 70-80px band */
.taxai-ocr-hero-kpis-v2805,
.taxai-ocr-hero-kpis-v2811,
.taxai-v3145-kpi-row{
    min-height:74px!important;
    padding:10px 14px!important;
    gap:10px!important;
}
.taxai-ocr-hero-kpis-v2805 > div,
.taxai-ocr-hero-kpis-v2811 > div,
.taxai-v3145-kpi-row > div{
    min-height:54px!important;
    padding:8px 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
}
.taxai-ocr-hero-kpis-v2805 strong,
.taxai-ocr-hero-kpis-v2811 strong,
.taxai-v3145-kpi-row strong{
    font-size:19px!important;
}

/* summary card vertical compression */
.taxai-ocr-hero-v2805{
    padding:16px 18px!important;
    gap:12px!important;
}
.taxai-ocr-hero-v2805 p{
    margin:8px 0 0!important;
    font-size:13px!important;
}

/* OCR review body: give image more room */
.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    grid-template-columns:minmax(170px,.82fr) minmax(330px,1.42fr) minmax(260px,1fr)!important;
    gap:12px!important;
}

.taxai-v2835-ocr-image,
.taxai-v2835-image-box,
.taxai-v3160-ocr-image,
.taxai-v3160-image-box,
.taxai-review-image-box{
    min-height:290px!important;
}

/* AI card: calmer top spacing */
.taxai-v2835-ai-card,
.taxai-v3160-ai-card,
.taxai-ai-proposal-card,
.taxai-review-ai-proposal{
    padding-top:28px!important;
}

/* left list: denser, more visible rows */
.taxai-v2835-list-item,
.taxai-v3160-list-item,
.taxai-review-list-item,
.taxai-review-case-item{
    padding:7px 9px!important;
    margin-bottom:4px!important;
}
.taxai-v2835-list-item strong,
.taxai-v3160-list-item strong,
.taxai-review-list-item strong,
.taxai-review-case-item strong{
    font-size:11.5px!important;
}
.taxai-v2835-list-item small,
.taxai-v3160-list-item small,
.taxai-review-list-item small,
.taxai-review-case-item small{
    font-size:10.5px!important;
}

/* keep footer clean and usable */
.taxai-review-fixed-footer,
.taxai-v2835-fixed-footer,
.taxai-v3173-footer{
    min-height:58px!important;
}
.taxai-review-fixed-footer button,
.taxai-v2835-fixed-footer button,
.taxai-v3173-footer button{
    min-height:42px!important;
}

/* ==========================================================
   TaxAI v3184
   AI proposal overflow fix
   ========================================================== */

/* Grid/Flex shrink fix */
.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    grid-template-columns:
        minmax(170px,.80fr)
        minmax(330px,1.30fr)
        minmax(280px,1.15fr)!important;
}

.taxai-v2835-ai-panel,
.taxai-v3160-ai-panel,
.taxai-review-ai-panel,
.taxai-ai-proposal-card,
.taxai-v2835-ai-card{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
}

/* Card contents */
.taxai-v2835-ai-card *,
.taxai-v3160-ai-card *,
.taxai-ai-proposal-card *{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
}

/* Title wrapping */
.taxai-v2835-ai-card h1,
.taxai-v2835-ai-card h2,
.taxai-v2835-ai-card h3,
.taxai-v2835-ai-card h4,
.taxai-v3160-ai-card h1,
.taxai-v3160-ai-card h2,
.taxai-v3160-ai-card h3,
.taxai-v3160-ai-card h4,
.taxai-ai-proposal-card h1,
.taxai-ai-proposal-card h2,
.taxai-ai-proposal-card h3,
.taxai-ai-proposal-card h4{

    white-space:normal!important;
    word-break:break-word!important;
    overflow-wrap:anywhere!important;
    line-height:1.32!important;
}

/* Body wrapping */
.taxai-v2835-ai-card p,
.taxai-v3160-ai-card p,
.taxai-ai-proposal-card p,
.taxai-v2835-ai-card div,
.taxai-v3160-ai-card div,
.taxai-ai-proposal-card div,
.taxai-v2835-ai-card span,
.taxai-v3160-ai-card span,
.taxai-ai-proposal-card span{

    white-space:normal!important;
    word-break:break-word!important;
    overflow-wrap:anywhere!important;
}

/* Prevent long text from escaping */
.taxai-v2835-ai-card,
.taxai-v3160-ai-card,
.taxai-ai-proposal-card{
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
}

/* Long OCR strings */
.taxai-v2835-ai-card code,
.taxai-v3160-ai-card code,
.taxai-ai-proposal-card code{
    white-space:pre-wrap!important;
    word-break:break-all!important;
}

/* Safety */
.taxai-v2835-ai-card img,
.taxai-v3160-ai-card img,
.taxai-ai-proposal-card img{
    max-width:100%!important;
    height:auto!important;
}

/* ==========================================================
   TaxAI v3185
   Force AI proposal title/body inside card
   ========================================================== */

/* The actual overflowing title class */
.taxai-v2835-title.taxai-v2848-title,
.taxai-v2835-title,
.taxai-v2848-title{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    line-break:anywhere!important;
    box-sizing:border-box!important;
}

/* AI proposal right card container hard lock */
.taxai-v2835-ai,
.taxai-v2848-ai,
.taxai-v3164-ai,
.taxai-ai-card,
.taxai-ai-card-body,
.taxai-ai-card-title,
.taxai-v2835-ai-card,
.taxai-v3160-ai-card,
.taxai-ai-proposal-card,
.taxai-review-ai-proposal{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
}

/* All text inside AI card must wrap */
.taxai-ai-card *,
.taxai-v2835-ai-card *,
.taxai-v3160-ai-card *,
.taxai-ai-proposal-card *,
.taxai-review-ai-proposal *{
    max-width:100%!important;
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    box-sizing:border-box!important;
}

/* Prevent the right column itself from escaping */
.taxai-v2835-body > *:last-child,
.taxai-v3160-body > *:last-child,
.taxai-review-card-body > *:last-child{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
}

/* Slightly reduce AI title size so long account names fit naturally */
.taxai-v2835-title.taxai-v2848-title{
    font-size:18px!important;
    line-height:1.32!important;
    letter-spacing:-.02em!important;
}

/* If an inner AI card has fixed width from old CSS, neutralize it */
[class*="ai"][class*="card"],
[class*="ai"][class*="panel"]{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
}

/* ==========================================================
   TaxAI v3185
   Force AI proposal title/body inside card
   ========================================================== */

/* The actual overflowing title class */
.taxai-v2835-title.taxai-v2848-title,
.taxai-v2835-title,
.taxai-v2848-title{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    line-break:anywhere!important;
    box-sizing:border-box!important;
}

/* AI proposal right card container hard lock */
.taxai-v2835-ai,
.taxai-v2848-ai,
.taxai-v3164-ai,
.taxai-ai-card,
.taxai-ai-card-body,
.taxai-ai-card-title,
.taxai-v2835-ai-card,
.taxai-v3160-ai-card,
.taxai-ai-proposal-card,
.taxai-review-ai-proposal{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
}

/* All text inside AI card must wrap */
.taxai-ai-card *,
.taxai-v2835-ai-card *,
.taxai-v3160-ai-card *,
.taxai-ai-proposal-card *,
.taxai-review-ai-proposal *{
    max-width:100%!important;
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    box-sizing:border-box!important;
}

/* Prevent the right column itself from escaping */
.taxai-v2835-body > *:last-child,
.taxai-v3160-body > *:last-child,
.taxai-review-card-body > *:last-child{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
}

/* Slightly reduce AI title size so long account names fit naturally */
.taxai-v2835-title.taxai-v2848-title{
    font-size:18px!important;
    line-height:1.32!important;
    letter-spacing:-.02em!important;
}

/* If an inner AI card has fixed width from old CSS, neutralize it */
[class*="ai"][class*="card"],
[class*="ai"][class*="panel"]{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
}

/* ==========================================================
   TaxAI v3186
   Force AI proposal card inside review frame
   ========================================================== */

/* Parent frame must clip accidental right overflow */
.taxai-ocr-card-v2800.taxai-v2835-card,
.taxai-v2835-card,
.taxai-v3160-card,
.taxai-review-card-body{
    overflow:hidden!important;
    box-sizing:border-box!important;
}

/* Actual AI card/panel: cancel old right-floating / absolute positioning */
.taxai-v2835-ai-card,
.taxai-v3160-ai-card,
.taxai-ai-proposal-card,
.taxai-review-ai-proposal,
.taxai-ai-card,
.taxai-ai-card-body,
.taxai-v2835-ai,
.taxai-v3164-ai,
.taxai-v2848-ai{
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    transform:none!important;
    translate:none!important;

    display:block!important;
    justify-self:stretch!important;
    align-self:stretch!important;

    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;

    box-sizing:border-box!important;
    overflow:hidden!important;
}

/* Right column itself must not exceed the review card */
.taxai-v2835-body > :last-child,
.taxai-v3160-body > :last-child,
.taxai-review-card-body > :last-child{
    position:relative!important;
    right:auto!important;
    transform:none!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
}

/* Make 3-column grid safer: reduce OCR slightly, secure AI width */
.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    grid-template-columns:
        minmax(160px,.78fr)
        minmax(300px,1.18fr)
        minmax(300px,1.22fr)!important;
    column-gap:12px!important;
}

/* Text safety */
.taxai-v2835-title.taxai-v2848-title,
.taxai-v2835-title,
.taxai-v2848-title,
.taxai-ai-card-title,
.taxai-ai-card-body,
.taxai-v2835-ai-card *,
.taxai-v3160-ai-card *,
.taxai-ai-proposal-card *,
.taxai-review-ai-proposal *{
    max-width:100%!important;
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    box-sizing:border-box!important;
}

/* ==========================================================
   TaxAI v3188
   Rebalance review columns for wider AI proposal
   ========================================================== */

/* The main selected review card should prioritize OCR + AI readability */
.taxai-ocr-card-v2800.taxai-v2835-card{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
}

/* Current inner body: left/meta + OCR + AI */
.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    display:grid!important;
    grid-template-columns:
        minmax(160px, .72fr)
        minmax(300px, 1.18fr)
        minmax(360px, 1.45fr)!important;
    gap:12px!important;
    align-items:stretch!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
}

/* Let every column shrink safely */
.taxai-v2835-body > *,
.taxai-v3160-body > *,
.taxai-review-card-body > *{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
}

/* AI column: wider but still contained */
.taxai-v2835-body > *:last-child,
.taxai-v3160-body > *:last-child,
.taxai-review-card-body > *:last-child{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
}

/* AI card visual: readable width */
.taxai-ai-card,
.taxai-ai-card-body,
.taxai-v2835-ai-card,
.taxai-v3160-ai-card,
.taxai-ai-proposal-card,
.taxai-review-ai-proposal{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:18px 18px!important;
    box-sizing:border-box!important;
}

/* AI title/body: readable but compact */
.taxai-ai-card-title{
    font-size:18px!important;
    line-height:1.28!important;
    margin-bottom:10px!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
}

.taxai-ai-card-body,
.taxai-ai-card-body *,
.taxai-ai-proposal-card *,
.taxai-review-ai-proposal *{
    font-size:12.5px!important;
    line-height:1.55!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
}

/* OCR image column: keep useful size without starving AI */
.taxai-v2835-image-box,
.taxai-v3160-image-box,
.taxai-review-image-box,
.taxai-v2835-ocr-image,
.taxai-v3160-ocr-image{
    min-height:280px!important;
}

/* Left list: slightly narrower-friendly */
.taxai-v3162-left-index,
.taxai-v3168-server-left-index,
.taxai-v2835-ocr-grid{
    min-width:0!important;
    max-width:100%!important;
}

/* Desktop narrow safety */
@media (max-width: 1180px){
    .taxai-v2835-body,
    .taxai-v3160-body,
    .taxai-review-card-body{
        grid-template-columns:
            minmax(140px,.65fr)
            minmax(260px,1fr)
            minmax(320px,1.35fr)!important;
    }
}

/* Tablet/mobile safety */
@media (max-width: 980px){
    .taxai-v2835-body,
    .taxai-v3160-body,
    .taxai-review-card-body{
        grid-template-columns:1fr!important;
    }
}

/* TaxAI v3189 fix AI compact card width */
.taxai-v3145-ai-compact,
.taxai-ai-proposal-card-v3043,
.taxai-ai-card-v3040{
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    justify-self:stretch!important;
    align-self:stretch!important;
}

.taxai-v3145-ai-compact{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    padding:14px!important;
}

.taxai-v3145-ai-compact .taxai-ai-card-title,
.taxai-v3145-ai-compact .taxai-v2835-title,
.taxai-v3145-ai-compact .taxai-v2848-title,
.taxai-v3145-ai-compact .taxai-ai-card-body,
.taxai-v3145-ai-compact .taxai-ai-card-body *,
.taxai-ai-proposal-card-v3043 *,
.taxai-ai-card-v3040 *{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
}

.taxai-v3145-ai-compact .taxai-v2835-title,
.taxai-v3145-ai-compact .taxai-v2848-title{
    overflow:visible!important;
    text-overflow:clip!important;
}

.taxai-v2835-body > .taxai-v3145-ai-compact,
.taxai-v3160-body > .taxai-v3145-ai-compact,
.taxai-review-card-body > .taxai-v3145-ai-compact{
    width:100%!important;
    max-width:100%!important;
}

/* TaxAI v3190 fix body actual 2-column layout */
.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    display:grid!important;
    grid-template-columns:minmax(0,1.35fr) minmax(320px,.95fr)!important;
    gap:14px!important;
    align-items:stretch!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
}

.taxai-v2835-body > *,
.taxai-v3160-body > *,
.taxai-review-card-body > *{
    min-width:0!important;
    max-width:100%!important;
    width:100%!important;
    box-sizing:border-box!important;
}

.taxai-v2835-ocr-grid.taxai-v3145-ocr-two-column{
    grid-column:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
}

.taxai-v2835-ai-panel.taxai-v3145-ai-compact{
    grid-column:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
}

.taxai-v3145-ai-compact .taxai-ai-card-v3040,
.taxai-v3145-ai-compact .taxai-ai-proposal-card-v3043{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
}

@media (max-width:980px){
    .taxai-v2835-body,
    .taxai-v3160-body,
    .taxai-review-card-body{
        grid-template-columns:1fr!important;
    }
}

/* TaxAI v3191 balance OCR / AI columns */
.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    grid-template-columns:minmax(0,1.04fr) minmax(360px,.96fr)!important;
    gap:16px!important;
}

.taxai-v2835-ai-panel.taxai-v3145-ai-compact{
    padding:16px!important;
}

.taxai-ai-card-title{
    font-size:19px!important;
    line-height:1.3!important;
}

.taxai-ai-card-body,
.taxai-ai-card-body *{
    font-size:13px!important;
    line-height:1.58!important;
}

.taxai-v2835-ocr-grid.taxai-v3145-ocr-two-column{
    gap:10px!important;
}

/* TaxAI v3222 ReviewCard Figma speed UI */
.taxai-review-card-v3008,
.taxai-v3160-card,
.taxai-ocr-card-v2800{
    position:relative!important;
    overflow:hidden!important;
    border-left:6px solid #f59e0b!important;
}

.taxai-review-card-v3008[data-confidence^="9"],
.taxai-v3160-card[data-confidence^="9"]{
    border-left-color:#22c55e!important;
}

.taxai-review-card-v3008[data-confidence="80"],
.taxai-review-card-v3008[data-confidence="81"],
.taxai-review-card-v3008[data-confidence="82"],
.taxai-review-card-v3008[data-confidence="83"],
.taxai-review-card-v3008[data-confidence="84"],
.taxai-review-card-v3008[data-confidence="85"],
.taxai-review-card-v3008[data-confidence="86"],
.taxai-review-card-v3008[data-confidence="87"],
.taxai-review-card-v3008[data-confidence="88"],
.taxai-review-card-v3008[data-confidence="89"]{
    border-left-color:#f59e0b!important;
}

.taxai-review-card-v3008[data-confidence^="7"],
.taxai-review-card-v3008[data-confidence^="6"],
.taxai-review-card-v3008[data-confidence^="5"],
.taxai-review-card-v3008[data-confidence^="4"],
.taxai-review-card-v3008[data-confidence^="3"],
.taxai-review-card-v3008[data-confidence^="2"],
.taxai-review-card-v3008[data-confidence^="1"],
.taxai-review-card-v3008[data-confidence^="0"]{
    border-left-color:#ef4444!important;
}

/* ① OCR画像を大きく */
.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    grid-template-columns:minmax(300px,340px) minmax(0,1fr)!important;
    gap:16px!important;
}

.taxai-v2835-image,
.taxai-v3160-image,
.taxai-review-image,
.taxai-ocr-image,
.taxai-review-card-v3008 img,
.taxai-v3160-card img{
    max-width:340px!important;
}

.taxai-v2835-image img,
.taxai-v3160-image img,
.taxai-review-image img,
.taxai-ocr-image img{
    width:100%!important;
    max-height:420px!important;
    object-fit:contain!important;
}

/* ③ OCR項目カード化 */
.taxai-v2835-ocr-grid,
.taxai-v3160-ocr-grid,
.taxai-ocr-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
}

.taxai-v2835-ocr-grid > *,
.taxai-v3160-ocr-grid > *,
.taxai-ocr-grid > *,
.taxai-ocr-field,
.taxai-review-field{
    background:#fff!important;
    border:1px solid #e5e7eb!important;
    border-radius:12px!important;
    padding:10px 12px!important;
    box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}

.taxai-v2835-ocr-grid label,
.taxai-v3160-ocr-grid label,
.taxai-ocr-field label,
.taxai-review-field label{
    display:block!important;
    font-size:11px!important;
    color:#64748b!important;
    margin-bottom:4px!important;
    font-weight:700!important;
}

.taxai-v2835-ocr-grid input,
.taxai-v3160-ocr-grid input,
.taxai-v2835-ocr-grid select,
.taxai-v3160-ocr-grid select{
    border:0!important;
    padding:0!important;
    background:transparent!important;
    font-size:15px!important;
    font-weight:800!important;
    color:#0f172a!important;
}

/* ② AI理由を読みやすく */
.taxai-v3222-reason-list{
    margin:8px 0 0!important;
    padding:0!important;
    display:grid!important;
    gap:6px!important;
}

.taxai-v3222-reason-list li{
    list-style:none!important;
    background:#f8fafc!important;
    border:1px solid #e2e8f0!important;
    border-radius:999px!important;
    padding:6px 10px!important;
    font-size:12px!important;
    font-weight:800!important;
    color:#334155!important;
}

.taxai-v3222-reason-list li::before{
    content:"✓";
    color:#16a34a;
    font-weight:900;
    margin-right:6px;
}

/* 信頼度リング */
.taxai-v3222-ring{
    position:absolute!important;
    top:12px!important;
    right:12px!important;
    width:54px!important;
    height:54px!important;
    border-radius:999px!important;
    display:grid!important;
    place-items:center!important;
    background:conic-gradient(#22c55e calc(var(--p,80)*1%), #e5e7eb 0)!important;
    color:#0f172a!important;
    font-size:13px!important;
    font-weight:900!important;
    z-index:5!important;
}

.taxai-v3222-ring::after{
    content:"";
    position:absolute;
    inset:6px;
    border-radius:999px;
    background:#fff;
    z-index:-1;
}

/* ④ 承認後フェードアウト */
.taxai-v3222-approved-out{
    opacity:0!important;
    transform:translateY(-8px) scale(.985)!important;
    max-height:0!important;
    margin:0!important;
    padding-top:0!important;
    padding-bottom:0!important;
    border-width:0!important;
    transition:opacity .22s ease, transform .22s ease, max-height .28s ease, margin .28s ease, padding .28s ease!important;
    pointer-events:none!important;
}

@media (max-width:900px){
    .taxai-v2835-body,
    .taxai-v3160-body,
    .taxai-review-card-body{
        grid-template-columns:1fr!important;
    }
    .taxai-v2835-image,
    .taxai-v3160-image,
    .taxai-review-image,
    .taxai-ocr-image{
        max-width:100%!important;
    }
}

/* TaxAI v3223 OCR image fixed + right detail modal + compact review */
.taxai-review-card-v3008,
.taxai-v3160-card,
.taxai-ocr-card-v2800,
.taxai-v2835-card{
    min-height:220px!important;
}

.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    display:grid!important;
    grid-template-columns:340px minmax(220px,1fr) minmax(260px,320px)!important;
    gap:12px!important;
    align-items:start!important;
}

.taxai-v2835-image,
.taxai-v3160-image,
.taxai-review-image,
.taxai-ocr-image,
.taxai-v2835-card figure,
.taxai-v3160-card figure{
    width:340px!important;
    min-width:340px!important;
    max-width:340px!important;
}

.taxai-v2835-image img,
.taxai-v3160-image img,
.taxai-review-image img,
.taxai-ocr-image img,
.taxai-v2835-card figure img,
.taxai-v3160-card figure img,
.taxai-review-card-v3008 img{
    width:340px!important;
    max-width:340px!important;
    max-height:360px!important;
    object-fit:contain!important;
    object-position:center!important;
    border-radius:12px!important;
    background:#f8fafc!important;
    border:1px solid #e5e7eb!important;
}

.taxai-review-card-v3008 [class*="reason"],
.taxai-v3160-card [class*="reason"],
.taxai-v2835-card [class*="reason"]{
    max-height:96px!important;
    overflow:hidden!important;
}

.taxai-v3223-reason-mini{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
    margin-top:6px!important;
}

.taxai-v3223-reason-mini span{
    display:inline-flex!important;
    align-items:center!important;
    gap:4px!important;
    border-radius:999px!important;
    background:#ecfdf5!important;
    color:#166534!important;
    border:1px solid #bbf7d0!important;
    padding:5px 8px!important;
    font-size:11px!important;
    font-weight:800!important;
}

.taxai-v3223-reason-mini span::before{
    content:"✓";
    font-weight:900;
}

.taxai-v3223-detail-drawer{
    position:fixed!important;
    top:0!important;
    right:0!important;
    width:min(560px,92vw)!important;
    height:100vh!important;
    background:#fff!important;
    box-shadow:-24px 0 60px rgba(15,23,42,.22)!important;
    z-index:99999!important;
    transform:translateX(110%)!important;
    transition:transform .22s ease!important;
    display:flex!important;
    flex-direction:column!important;
}

.taxai-v3223-detail-drawer.is-open{
    transform:translateX(0)!important;
}

.taxai-v3223-drawer-head{
    padding:18px 20px!important;
    border-bottom:1px solid #e5e7eb!important;
    display:flex!important;
    justify-content:space-between!important;
    gap:12px!important;
    align-items:center!important;
}

.taxai-v3223-drawer-title{
    font-size:16px!important;
    font-weight:900!important;
    color:#0f172a!important;
}

.taxai-v3223-drawer-close{
    border:0!important;
    background:#f1f5f9!important;
    color:#0f172a!important;
    border-radius:999px!important;
    width:36px!important;
    height:36px!important;
    font-weight:900!important;
    cursor:pointer!important;
}

.taxai-v3223-drawer-body{
    padding:18px 20px 28px!important;
    overflow:auto!important;
    display:grid!important;
    gap:14px!important;
}

.taxai-v3223-section{
    border:1px solid #e5e7eb!important;
    background:#f8fafc!important;
    border-radius:14px!important;
    padding:14px!important;
}

.taxai-v3223-section h3{
    margin:0 0 8px!important;
    font-size:12px!important;
    font-weight:900!important;
    color:#475569!important;
}

.taxai-v3223-section pre{
    white-space:pre-wrap!important;
    word-break:break-word!important;
    margin:0!important;
    font-size:12px!important;
    line-height:1.65!important;
    color:#0f172a!important;
}

.taxai-v3223-section img{
    max-width:100%!important;
    height:auto!important;
    border-radius:12px!important;
    border:1px solid #e5e7eb!important;
    background:#fff!important;
}

.taxai-v3223-backdrop{
    position:fixed!important;
    inset:0!important;
    background:rgba(15,23,42,.28)!important;
    z-index:99998!important;
    opacity:0!important;
    pointer-events:none!important;
    transition:opacity .18s ease!important;
}

.taxai-v3223-backdrop.is-open{
    opacity:1!important;
    pointer-events:auto!important;
}

.taxai-v3223-detail-btn{
    border:0!important;
    border-radius:999px!important;
    background:#eef2ff!important;
    color:#4338ca!important;
    font-weight:900!important;
    font-size:12px!important;
    padding:9px 14px!important;
    cursor:pointer!important;
}

@media (max-width:1100px){
    .taxai-v2835-body,
    .taxai-v3160-body,
    .taxai-review-card-body{
        grid-template-columns:300px minmax(0,1fr)!important;
    }
    .taxai-v2835-image,
    .taxai-v3160-image,
    .taxai-review-image,
    .taxai-ocr-image,
    .taxai-v2835-card figure,
    .taxai-v3160-card figure,
    .taxai-v2835-image img,
    .taxai-v3160-image img,
    .taxai-review-image img,
    .taxai-ocr-image img,
    .taxai-v2835-card figure img,
    .taxai-v3160-card figure img,
    .taxai-review-card-v3008 img{
        width:300px!important;
        min-width:300px!important;
        max-width:300px!important;
    }
}
/* TaxAI v3224 disabled: broken runtime detect */

/* TaxAI v3226 actual RCV2 card targeted layout */
/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-card{
    position:relative!important;
    display:grid!important;
    grid-template-columns:340px minmax(260px,1fr) minmax(300px,360px)!important;
    gap:14px!important;
    align-items:start!important;
    padding:18px!important;
    border-left:6px solid #f59e0b!important;
}
*/

.taxai-rcv2-card > *{
    min-width:0!important;
}

.taxai-rcv2-card img{
    width:100%!important;
    max-width:340px!important;
    max-height:390px!important;
    object-fit:contain!important;
    border-radius:14px!important;
    border:1px solid #e5e7eb!important;
    background:#f8fafc!important;
}

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-label{
    font-size:12px!important;
    font-weight:900!important;
    color:#64748b!important;
    margin-bottom:8px!important;
}
*/

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-reason-chipline{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
    margin-top:8px!important;
}
*/

.taxai-rcv2-reason-chipline span{
    display:inline-flex!important;
    align-items:center!important;
    border-radius:999px!important;
    background:#ecfdf5!important;
    color:#166534!important;
    border:1px solid #bbf7d0!important;
    padding:5px 8px!important;
    font-size:11px!important;
    font-weight:800!important;
}

.taxai-rcv2-reason-chipline span::before{
    content:"✓";
    margin-right:4px;
    font-weight:900;
}

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-detail-drawer{
    position:fixed!important;
    top:0!important;
    right:0!important;
    width:min(560px,92vw)!important;
    height:100vh!important;
    background:#fff!important;
    z-index:99999!important;
    box-shadow:-24px 0 60px rgba(15,23,42,.24)!important;
    transform:translateX(110%)!important;
    transition:transform .22s ease!important;
    display:flex!important;
    flex-direction:column!important;
}
*/

.taxai-rcv2-detail-drawer.is-open{
    transform:translateX(0)!important;
}

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-detail-backdrop{
    position:fixed!important;
    inset:0!important;
    background:rgba(15,23,42,.28)!important;
    z-index:99998!important;
    opacity:0!important;
    pointer-events:none!important;
    transition:opacity .18s ease!important;
}
*/

.taxai-rcv2-detail-backdrop.is-open{
    opacity:1!important;
    pointer-events:auto!important;
}

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-detail-head{
    padding:18px 20px!important;
    border-bottom:1px solid #e5e7eb!important;
    display:flex!important;
    justify-content:space-between!important;
    align-items:center!important;
}
*/

.taxai-rcv2-detail-head strong{
    font-size:16px!important;
    font-weight:900!important;
}

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-detail-close{
    border:0!important;
    background:#f1f5f9!important;
    border-radius:999px!important;
    width:36px!important;
    height:36px!important;
    cursor:pointer!important;
    font-weight:900!important;
}
*/

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-detail-body{
    padding:18px 20px 28px!important;
    overflow:auto!important;
    display:grid!important;
    gap:14px!important;
}
*/

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-detail-section{
    border:1px solid #e5e7eb!important;
    background:#f8fafc!important;
    border-radius:14px!important;
    padding:14px!important;
}
*/

.taxai-rcv2-detail-section h3{
    margin:0 0 8px!important;
    font-size:12px!important;
    font-weight:900!important;
    color:#475569!important;
}

.taxai-rcv2-detail-section pre{
    white-space:pre-wrap!important;
    word-break:break-word!important;
    margin:0!important;
    font-size:12px!important;
    line-height:1.65!important;
}

.taxai-rcv2-detail-section img{
    max-width:100%!important;
    height:auto!important;
    border-radius:12px!important;
    border:1px solid #e5e7eb!important;
}

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-approved-out{
    opacity:0!important;
    transform:translateY(-8px) scale(.985)!important;
    max-height:0!important;
    margin:0!important;
    padding-top:0!important;
    padding-bottom:0!important;
    transition:opacity .22s ease, transform .22s ease, max-height .28s ease, margin .28s ease, padding .28s ease!important;
    pointer-events:none!important;
}
*/

@media(max-width:1100px){
    /* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rcv2-card{
        grid-template-columns:300px minmax(0,1fr)!important;
    }
*/
    .taxai-rcv2-card img{
        max-width:300px!important;
    }
}

/* TaxAI v3230 HTML refactor review card */
.taxai-v3230-card{
    display:grid!important;
    grid-template-columns:340px minmax(0,1fr) 116px!important;
    gap:16px!important;
    align-items:start!important;
    padding:16px!important;
    margin-bottom:14px!important;
    border:1px solid #e5e7eb!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 10px 24px rgba(15,23,42,.06)!important;
    transition:opacity .25s ease, transform .25s ease!important;
}
.taxai-v3230-card.is-approved{
    opacity:0!important;
    transform:translateY(8px)!important;
    pointer-events:none!important;
}
.taxai-v3230-image{
    width:340px!important;
    min-height:220px!important;
}
.taxai-v3230-image img{
    width:340px!important;
    max-height:360px!important;
    object-fit:contain!important;
    border-radius:14px!important;
    background:#f8fafc!important;
    border:1px solid #e5e7eb!important;
}
.taxai-v3230-noimage{
    height:220px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:14px!important;
    background:#f8fafc!important;
    color:#94a3b8!important;
    border:1px dashed #cbd5e1!important;
}
.taxai-v3230-main{
    min-width:0!important;
}
.taxai-v3230-head{
    display:flex!important;
    justify-content:space-between!important;
    gap:12px!important;
    margin-bottom:12px!important;
}
.taxai-v3230-title{
    font-size:17px!important;
    font-weight:800!important;
    color:#0f172a!important;
}
.taxai-v3230-sub{
    font-size:12px!important;
    color:#64748b!important;
    margin-top:4px!important;
}
.taxai-v3230-score{
    min-width:56px!important;
    height:32px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:999px!important;
    background:#ecfdf5!important;
    color:#047857!important;
    font-weight:800!important;
}
.taxai-v3230-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
}
.taxai-v3230-field{
    padding:10px 12px!important;
    border-radius:12px!important;
    background:#f8fafc!important;
    border:1px solid #e5e7eb!important;
}
.taxai-v3230-field span{
    display:block!important;
    font-size:11px!important;
    color:#64748b!important;
    margin-bottom:4px!important;
}
.taxai-v3230-field strong{
    display:block!important;
    font-size:14px!important;
    color:#111827!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
}
.taxai-v3230-reasons{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
    margin-top:12px!important;
}
.taxai-v3230-reasons span{
    padding:5px 9px!important;
    border-radius:999px!important;
    background:#eef2ff!important;
    color:#3730a3!important;
    font-size:12px!important;
    font-weight:700!important;
}
.taxai-v3230-actions{
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
}
.taxai-v3230-detail-btn,
.taxai-v3230-approve-btn{
    width:100%!important;
    border:0!important;
    border-radius:12px!important;
    padding:10px 12px!important;
    font-weight:800!important;
    cursor:pointer!important;
}
.taxai-v3230-detail-btn{background:#f1f5f9!important;color:#0f172a!important;}
.taxai-v3230-approve-btn{background:#2563eb!important;color:white!important;}
.taxai-v3230-modal{
    position:fixed!important;
    inset:0!important;
    z-index:9999!important;
    display:none!important;
}
.taxai-v3230-modal.is-open{display:block!important;}
.taxai-v3230-modal-bg{
    position:absolute!important;
    inset:0!important;
    background:rgba(15,23,42,.32)!important;
}
.taxai-v3230-panel{
    position:absolute!important;
    top:0!important;
    right:0!important;
    width:min(460px,92vw)!important;
    height:100%!important;
    background:white!important;
    padding:24px!important;
    box-shadow:-20px 0 40px rgba(15,23,42,.18)!important;
    overflow:auto!important;
}
.taxai-v3230-close{
    position:absolute!important;
    top:14px!important;
    right:14px!important;
    border:0!important;
    background:#f1f5f9!important;
    border-radius:999px!important;
    width:34px!important;
    height:34px!important;
    cursor:pointer!important;
}
.taxai-v3230-panel dl{
    display:grid!important;
    grid-template-columns:90px minmax(0,1fr)!important;
    gap:10px 14px!important;
}
.taxai-v3230-panel dt{
    color:#64748b!important;
    font-size:12px!important;
}
.taxai-v3230-panel dd{
    margin:0!important;
    color:#0f172a!important;
    font-weight:700!important;
}
@media(max-width:980px){
    .taxai-v3230-card{
        grid-template-columns:1fr!important;
    }
    .taxai-v3230-image,
    .taxai-v3230-image img{
        width:100%!important;
    }
    .taxai-v3230-actions{
        flex-direction:row!important;
    }
}


/* TaxAI v3234 prevent approved blank gap */
.taxai-v3230-card.is-approved{
    opacity:1!important;
    transform:none!important;
}

/* TaxAI v3240 review density + right detail panel */
.taxai-review-card-v3008,
.taxai-v2835-card,
.taxai-v3160-card,
.taxai-review-card{
    padding:10px 12px!important;
    margin-bottom:8px!important;
    min-height:0!important;
    border-radius:14px!important;
}

.taxai-v2835-head,
.taxai-v3160-head,
.taxai-review-card-head{
    padding:0!important;
    margin-bottom:6px!important;
    min-height:0!important;
}

.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    gap:8px!important;
    padding:0!important;
    grid-template-columns:minmax(0,1fr) minmax(300px,.72fr)!important;
}

.taxai-v2835-ocr-grid,
.taxai-v3160-ocr-grid{
    gap:6px!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

.taxai-v2835-ocr-grid > div,
.taxai-v3160-ocr-grid > div,
.taxai-review-mini-field{
    padding:6px 8px!important;
    min-height:0!important;
    line-height:1.25!important;
}

.taxai-v2835-ocr-grid small,
.taxai-v3160-ocr-grid small{
    font-size:10px!important;
    margin-bottom:2px!important;
}

.taxai-v2835-ocr-grid strong,
.taxai-v3160-ocr-grid strong{
    font-size:12px!important;
}

.taxai-v2835-reason,
.taxai-v3160-reason,
.taxai-ai-reason,
.taxai-review-ai-reason{
    max-height:62px!important;
    overflow:hidden!important;
    font-size:11px!important;
    line-height:1.35!important;
}

.taxai-v3240-hidden-reason{
    display:none!important;
}

.taxai-v3240-more-reasons{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    height:22px!important;
    padding:0 8px!important;
    border-radius:999px!important;
    background:#eef2ff!important;
    color:#3730a3!important;
    font-size:11px!important;
    font-weight:700!important;
    cursor:pointer!important;
    margin-top:4px!important;
}

.taxai-v2835-actions,
.taxai-v3160-actions,
.taxai-review-card-actions,
.taxai-v2835-footer,
.taxai-v3160-footer{
    gap:6px!important;
    padding-top:6px!important;
    margin-top:6px!important;
}

.taxai-v2835-actions button,
.taxai-v2835-actions a,
.taxai-v3160-actions button,
.taxai-v3160-actions a,
.taxai-review-card-actions button,
.taxai-review-card-actions a{
    min-height:30px!important;
    height:30px!important;
    padding:0 10px!important;
    font-size:12px!important;
    border-radius:9px!important;
    line-height:1!important;
}

.taxai-v3240-detail-source{
    display:none!important;
}

.taxai-v3240-detail-btn{
    min-height:30px!important;
    height:30px!important;
    padding:0 10px!important;
    border-radius:9px!important;
    border:1px solid #d7deea!important;
    background:#fff!important;
    color:#334155!important;
    font-size:12px!important;
    font-weight:700!important;
    cursor:pointer!important;
}

.taxai-v3240-panel{
    position:fixed!important;
    inset:0!important;
    z-index:9999!important;
    opacity:0!important;
    pointer-events:none!important;
    transition:opacity .16s ease!important;
}

.taxai-v3240-panel.is-open{
    opacity:1!important;
    pointer-events:auto!important;
}

.taxai-v3240-panel-backdrop{
    position:absolute!important;
    inset:0!important;
    background:rgba(15,23,42,.32)!important;
}

.taxai-v3240-panel-body{
    position:absolute!important;
    top:0!important;
    right:0!important;
    width:min(560px,92vw)!important;
    height:100vh!important;
    background:#fff!important;
    box-shadow:-18px 0 40px rgba(15,23,42,.22)!important;
    transform:translateX(102%)!important;
    transition:transform .2s ease!important;
    display:flex!important;
    flex-direction:column!important;
}

.taxai-v3240-panel.is-open .taxai-v3240-panel-body{
    transform:translateX(0)!important;
}

.taxai-v3240-panel-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
    padding:16px 18px!important;
    border-bottom:1px solid #e5e7eb!important;
}

.taxai-v3240-panel-kicker{
    font-size:11px!important;
    color:#64748b!important;
    font-weight:800!important;
}

.taxai-v3240-panel-head h3{
    margin:2px 0 0!important;
    font-size:18px!important;
}

.taxai-v3240-panel-close{
    width:34px!important;
    height:34px!important;
    border-radius:999px!important;
    border:1px solid #e5e7eb!important;
    background:#fff!important;
    font-size:22px!important;
    cursor:pointer!important;
}

.taxai-v3240-panel-content{
    padding:16px 18px 28px!important;
    overflow:auto!important;
    font-size:13px!important;
    line-height:1.55!important;
}

.taxai-v3240-panel-content table{
    width:100%!important;
}

.taxai-v3240-panel-content .taxai-v3240-section{
    border:1px solid #e5e7eb!important;
    border-radius:12px!important;
    padding:12px!important;
    margin-bottom:12px!important;
}

/* TaxAI v3241 review density 5-point compact */
.taxai-review-card-v3008,
.taxai-v2835-card,
.taxai-v3160-card,
.taxai-review-card{
    padding:8px 10px!important;
    margin-bottom:8px!important;
    border-radius:12px!important;
}

/* 1) image about 30% smaller */
.taxai-review-card img,
.taxai-v2835-card img,
.taxai-v3160-card img,
.taxai-v3240-card img,
.taxai-review-card-v3008 img{
    max-height:118px!important;
    object-fit:contain!important;
}
.taxai-v2835-image,
.taxai-v3160-image,
.taxai-ocr-image,
.taxai-receipt-image,
.taxai-review-image{
    max-height:126px!important;
    min-height:0!important;
    overflow:hidden!important;
}

/* 2) hide empty dash fields */
.taxai-v3241-empty,
.taxai-v3241-dash-empty{
    display:none!important;
}

/* 3) AI reasons fixed to 3 + +n */
.taxai-v3241-ai-extra{
    display:none!important;
}
.taxai-v3241-ai-more{
    display:inline-flex!important;
    align-items:center!important;
    padding:1px 7px!important;
    border-radius:999px!important;
    font-size:11px!important;
    font-weight:700!important;
    background:#eef2ff!important;
    color:#3730a3!important;
    margin-left:4px!important;
}

/* 4) OCR info box more compact */
.taxai-v2835-ocr-grid,
.taxai-v3160-ocr-grid,
.taxai-ocr-grid,
.taxai-review-ocr-grid{
    gap:4px 6px!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.taxai-v2835-ocr-grid > *,
.taxai-v3160-ocr-grid > *,
.taxai-ocr-grid > *,
.taxai-review-ocr-grid > *,
.taxai-ocr-box,
.taxai-info-box{
    padding:4px 6px!important;
    min-height:0!important;
    line-height:1.18!important;
    font-size:12px!important;
}
.taxai-v2835-ocr-grid small,
.taxai-v3160-ocr-grid small,
.taxai-ocr-grid small{
    font-size:10px!important;
    line-height:1.05!important;
    margin-bottom:1px!important;
}

/* 5) one-line card header */
.taxai-v2835-head,
.taxai-v3160-head,
.taxai-review-card-head,
.taxai-card-header,
.taxai-v3240-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    flex-wrap:nowrap!important;
    min-height:0!important;
    padding:0 0 5px 0!important;
}
.taxai-v2835-head *,
.taxai-v3160-head *,
.taxai-review-card-head *,
.taxai-card-header *,
.taxai-v3240-head *{
    white-space:nowrap!important;
}
.taxai-v2835-title,
.taxai-v3160-title,
.taxai-review-card-title,
.taxai-card-title{
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    font-size:13px!important;
    line-height:1.15!important;
}
.taxai-v2835-body,
.taxai-v3160-body,
.taxai-review-card-body{
    gap:8px!important;
}

/* TaxAI v3242 actual DOM compact override */
.taxai-review-card-v3008,
.taxai-v2835-card,
.taxai-v3160-card,
.taxai-ocr-card-v2800,
.taxai-review-card{
    display:grid!important;
    grid-template-columns:180px minmax(0,1fr) 88px!important;
    gap:8px!important;
    padding:8px 10px!important;
    margin-bottom:8px!important;
    min-height:0!important;
}

.taxai-review-card-v3008 img,
.taxai-v2835-card img,
.taxai-v3160-card img,
.taxai-ocr-card-v2800 img,
.taxai-review-card img{
    width:160px!important;
    max-width:160px!important;
    height:150px!important;
    max-height:150px!important;
    object-fit:contain!important;
}

.taxai-v2835-image,
.taxai-v3160-image,
.taxai-review-image,
.taxai-ocr-image,
.taxai-receipt-image,
.taxai-v3240-image{
    width:170px!important;
    max-width:170px!important;
    height:156px!important;
    max-height:156px!important;
    min-height:0!important;
    overflow:hidden!important;
}

.taxai-v2835-head,
.taxai-v3160-head,
.taxai-review-card-head,
.taxai-v3240-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    padding:0!important;
    margin:0 0 4px 0!important;
    min-height:0!important;
}

.taxai-v2835-title,
.taxai-v3160-title,
.taxai-review-card-title,
.taxai-v3240-title{
    font-size:13px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    margin:0!important;
}

.taxai-v2835-ocr-grid,
.taxai-v3160-ocr-grid,
.taxai-review-ocr-grid,
.taxai-ocr-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:4px!important;
    margin:0!important;
}

.taxai-v2835-ocr-grid > *,
.taxai-v3160-ocr-grid > *,
.taxai-review-ocr-grid > *,
.taxai-ocr-grid > *,
.taxai-ocr-box,
.taxai-info-box{
    padding:4px 6px!important;
    min-height:34px!important;
    height:auto!important;
    line-height:1.08!important;
    font-size:11px!important;
}

.taxai-v2835-ocr-grid small,
.taxai-v3160-ocr-grid small,
.taxai-review-ocr-grid small,
.taxai-ocr-grid small{
    display:block!important;
    font-size:9px!important;
    line-height:1!important;
    margin:0 0 1px 0!important;
}

.taxai-v2835-ocr-grid b,
.taxai-v3160-ocr-grid b,
.taxai-review-ocr-grid b,
.taxai-ocr-grid b{
    display:block!important;
    font-size:12px!important;
    line-height:1.05!important;
}

.taxai-v3242-empty{
    display:none!important;
}

.taxai-v3242-ai-extra{
    display:none!important;
}

.taxai-v3242-ai-more{
    display:inline-flex!important;
    align-items:center!important;
    border-radius:999px!important;
    padding:1px 6px!important;
    font-size:10px!important;
    font-weight:700!important;
    background:#eef2ff!important;
    color:#3730a3!important;
}

.taxai-v3242-action-col,
.taxai-review-actions,
.taxai-v2835-actions,
.taxai-v3160-actions{
    width:82px!important;
    min-width:82px!important;
}

.taxai-v3242-action-col button,
.taxai-review-actions button,
.taxai-v2835-actions button,
.taxai-v3160-actions button,
.taxai-review-card-v3008 button{
    padding:5px 8px!important;
    font-size:11px!important;
    line-height:1.05!important;
    border-radius:9px!important;
}


/* TaxAI v3251 review card compact moved from partial to css */
.taxai-v3250-compact-card{
    padding:8px 10px!important;
    margin-bottom:7px!important;
    border-radius:12px!important;
    min-height:0!important;
}
.taxai-v3250-compact-card .taxai-rv2-top{
    padding:6px 8px!important;
    gap:6px!important;
}
.taxai-v3250-compact-card .taxai-rv2-body{
    display:grid!important;
    grid-template-columns:84px minmax(0,1fr) 190px!important;
    gap:8px!important;
    align-items:start!important;
}
.taxai-v3250-compact-card .taxai-rv2-img,
.taxai-v3250-compact-card img{
    max-height:64px!important;
    object-fit:cover!important;
}
.taxai-v3250-compact-card .taxai-rv2-title{
    font-size:12px!important;
    line-height:1.25!important;
}
.taxai-v3250-compact-card .taxai-rv2-meta,
.taxai-v3250-compact-card .taxai-rv2-ocr,
.taxai-v3250-compact-card /* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rv2-ai{
    font-size:11px!important;
    line-height:1.3!important;
}
*/
.taxai-v3250-compact-card /* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rv2-ai{
    max-height:36px!important;
    overflow:hidden!important;
}
*/
.taxai-v3250-compact-card /* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rv2-actions{
    gap:5px!important;
    margin-top:5px!important;
}
*/
.taxai-v3250-compact-card .taxai-rv2-btn,
.taxai-v3250-compact-card button,
.taxai-v3250-compact-card .taxai-btn{
    min-height:26px!important;
    padding:4px 8px!important;
    font-size:11px!important;
}
@media (max-width:1100px){
    .taxai-v3250-compact-card .taxai-rv2-body{
        grid-template-columns:76px minmax(0,1fr)!important;
    }
}


/* TaxAI v3260 review card HTML compact summary */
.taxai-v3260-mini-card{
    min-height:0!important;
    padding:7px 9px!important;
    margin-bottom:7px!important;
    border-radius:12px!important;
}
.taxai-v3260-mini-card .taxai-rv2-body{
    display:grid!important;
    grid-template-columns:132px minmax(0,1fr) 132px!important;
    gap:8px!important;
    align-items:start!important;
}
.taxai-v3260-mini-card img,
.taxai-v3260-mini-card .taxai-rv2-img{
    width:132px!important;
    max-width:132px!important;
    height:54px!important;
    max-height:54px!important;
    object-fit:cover!important;
    border-radius:8px!important;
}
.taxai-v3260-mini-card .taxai-rv2-main,
.taxai-v3260-mini-card .taxai-rv2-content{
    min-width:0!important;
}
.taxai-v3260-mini-card .taxai-rv2-title{
    font-size:12px!important;
    line-height:1.2!important;
    margin-bottom:2px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
}
.taxai-v3260-mini-card .taxai-rv2-meta{
    font-size:10px!important;
    line-height:1.2!important;
    margin-bottom:3px!important;
}
.taxai-v3260-mini-card .taxai-rv2-grid,
.taxai-v3260-mini-card .taxai-rv2-fields{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:4px!important;
    margin:3px 0!important;
}
.taxai-v3260-mini-card .taxai-rv2-field,
.taxai-v3260-mini-card .taxai-rv2-kv{
    min-height:0!important;
    padding:4px 6px!important;
    border-radius:8px!important;
}
.taxai-v3260-mini-card .taxai-rv2-field label,
.taxai-v3260-mini-card .taxai-rv2-kv label,
.taxai-v3260-mini-card .taxai-rv2-field small{
    font-size:9px!important;
    line-height:1.1!important;
    margin:0!important;
}
.taxai-v3260-mini-card .taxai-rv2-field strong,
.taxai-v3260-mini-card .taxai-rv2-kv strong{
    font-size:11px!important;
    line-height:1.15!important;
}
.taxai-v3260-ai-one-line,
.taxai-v3260-mini-card /* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rv2-ai{
    max-height:20px!important;
    overflow:hidden!important;
    font-size:10px!important;
    line-height:1.35!important;
    margin-top:3px!important;
}
*/
.taxai-v3260-ai-one-line span:nth-child(n+2),
.taxai-v3260-mini-card .taxai-rv2-ai span:nth-child(n+2){
    display:none!important;
}
.taxai-v3260-mini-card .taxai-rv2-tags,
.taxai-v3260-mini-card .taxai-rv2-reasons{
    max-height:18px!important;
    overflow:hidden!important;
    display:flex!important;
    gap:4px!important;
    flex-wrap:nowrap!important;
}
.taxai-v3260-mini-card .taxai-rv2-tag,
.taxai-v3260-mini-card .taxai-rv2-badge{
    font-size:9px!important;
    line-height:1!important;
    padding:3px 5px!important;
    white-space:nowrap!important;
}
.taxai-v3260-mini-card .taxai-rv2-side{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:5px!important;
}
.taxai-v3260-mini-card .taxai-rv2-score,
.taxai-v3260-mini-card [class*="confidence"]{
    align-self:flex-end!important;
}
.taxai-v3260-actions,
.taxai-v3260-mini-card /* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rv2-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:5px!important;
    margin:0!important;
}
*/
.taxai-v3260-mini-card .taxai-rv2-btn,
.taxai-v3260-mini-card button,
.taxai-v3260-mini-card .taxai-btn{
    min-height:24px!important;
    height:24px!important;
    padding:3px 8px!important;
    font-size:10px!important;
    line-height:1!important;
    border-radius:999px!important;
}
.taxai-v3260-mini-card h3,
.taxai-v3260-mini-card dl{
    display:none!important;
}
@media (max-width:1200px){
    .taxai-v3260-mini-card .taxai-rv2-body{
        grid-template-columns:112px minmax(0,1fr) 112px!important;
    }
    .taxai-v3260-mini-card img,
    .taxai-v3260-mini-card .taxai-rv2-img{
        width:112px!important;
        max-width:112px!important;
    }
}


/* TaxAI v3261 actual DOM force compact */
.taxai-v3261-actual-compact,
.taxai-v3260-mini-card,
.taxai-v3250-compact-card.taxai-review-card-v2{
    display:grid!important;
    grid-template-columns:150px minmax(0,1fr) 110px!important;
    column-gap:10px!important;
    row-gap:4px!important;
    align-items:start!important;
    padding:7px 9px!important;
    margin-bottom:6px!important;
    min-height:0!important;
    border-radius:12px!important;
}

/* 画像は左固定 */
.taxai-v3261-actual-compact img,
.taxai-v3260-mini-card img,
.taxai-v3250-compact-card.taxai-review-card-v2 img{
    grid-column:1!important;
    grid-row:1 / span 5!important;
    width:150px!important;
    max-width:150px!important;
    height:54px!important;
    max-height:54px!important;
    object-fit:cover!important;
    border-radius:8px!important;
}

/* 中央本文 */
.taxai-v3261-actual-compact > *:not(img):not(button):not(a),
.taxai-v3260-mini-card > *:not(img):not(button):not(a){
    min-width:0!important;
}

/* タイトル・日付 */
.taxai-v3261-actual-compact h1,
.taxai-v3261-actual-compact h2,
.taxai-v3261-actual-compact h3,
.taxai-v3261-actual-compact h4,
.taxai-v3261-actual-compact strong,
.taxai-v3260-mini-card h1,
.taxai-v3260-mini-card h2,
.taxai-v3260-mini-card h3,
.taxai-v3260-mini-card h4,
.taxai-v3260-mini-card strong{
    font-size:12px!important;
    line-height:1.2!important;
    margin:0!important;
}

/* 金額などの箱を薄く低く */
.taxai-v3261-actual-compact div,
.taxai-v3261-actual-compact span,
.taxai-v3261-actual-compact p,
.taxai-v3261-actual-compact dd,
.taxai-v3261-actual-compact dt,
.taxai-v3260-mini-card div,
.taxai-v3260-mini-card span,
.taxai-v3260-mini-card p,
.taxai-v3260-mini-card dd,
.taxai-v3260-mini-card dt{
    font-size:10px!important;
    line-height:1.25!important;
}

.taxai-v3261-actual-compact [class*="field"],
.taxai-v3261-actual-compact [class*="box"],
.taxai-v3261-actual-compact [class*="kv"],
.taxai-v3260-mini-card [class*="field"],
.taxai-v3260-mini-card [class*="box"],
.taxai-v3260-mini-card [class*="kv"]{
    min-height:0!important;
    padding:4px 6px!important;
    border-radius:8px!important;
}

/* AI理由・根拠は1行だけ */
.taxai-v3261-actual-compact dd,
.taxai-v3261-actual-compact p,
.taxai-v3261-actual-compact [class*="reason"],
.taxai-v3261-actual-compact [class*="ai"],
.taxai-v3260-mini-card dd,
.taxai-v3260-mini-card p,
.taxai-v3260-mini-card [class*="reason"],
.taxai-v3260-mini-card [class*="ai"]{
    max-height:18px!important;
    overflow:hidden!important;
}

/* タグは1行 */
.taxai-v3261-actual-compact [class*="tag"],
.taxai-v3261-actual-compact [class*="badge"],
.taxai-v3260-mini-card [class*="tag"],
.taxai-v3260-mini-card [class*="badge"]{
    font-size:9px!important;
    padding:2px 5px!important;
    line-height:1!important;
    white-space:nowrap!important;
}

/* ボタンは右列 */
.taxai-v3261-actual-compact button,
.taxai-v3261-actual-compact a.taxai-btn,
.taxai-v3261-actual-compact .taxai-btn,
.taxai-v3260-mini-card button,
.taxai-v3260-mini-card a.taxai-btn,
.taxai-v3260-mini-card .taxai-btn{
    grid-column:3!important;
    min-height:23px!important;
    height:23px!important;
    padding:3px 8px!important;
    font-size:10px!important;
    line-height:1!important;
    border-radius:999px!important;
    margin:0!important;
}

/* 詳細内のdlが一覧高さを食う場合は一覧上では畳む */
.taxai-v3261-actual-compact dl,
.taxai-v3260-mini-card dl{
    display:none!important;
}

/* 既存の大きな余白を潰す */
.taxai-v3261-actual-compact *{
    margin-top:0!important;
    margin-bottom:2px!important;
}

@media (max-width:1200px){
    .taxai-v3261-actual-compact,
    .taxai-v3260-mini-card,
    .taxai-v3250-compact-card.taxai-review-card-v2{
        grid-template-columns:120px minmax(0,1fr) 100px!important;
    }
    .taxai-v3261-actual-compact img,
    .taxai-v3260-mini-card img,
    .taxai-v3250-compact-card.taxai-review-card-v2 img{
        width:120px!important;
        max-width:120px!important;
    }
}






/* TaxAI v3267: restore review card content after bad v3265/v3266 */
.taxai-review-card-v3008 *,
.taxai-v3160-card *,
.taxai-v2835-card *,
.taxai-ocr-card-v2800 *{
    visibility:visible!important;
}

.taxai-review-card-v3008 dl,
.taxai-review-card-v3008 dt,
.taxai-review-card-v3008 dd,
.taxai-v3160-card dl,
.taxai-v3160-card dt,
.taxai-v3160-card dd,
.taxai-v2835-card dl,
.taxai-v2835-card dt,
.taxai-v2835-card dd,
.taxai-ocr-card-v2800 dl,
.taxai-ocr-card-v2800 dt,
.taxai-ocr-card-v2800 dd{
    display:revert!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    opacity:1!important;
}

.taxai-review-card-v3008,
.taxai-v3160-card,
.taxai-v2835-card,
.taxai-ocr-card-v2800{
    height:auto!important;
    min-height:120px!important;
    padding:10px 12px!important;
    margin-bottom:10px!important;
}

.taxai-v3265-density-badge,
.taxai-v3266-density-badge{
    display:none!important;
}

.taxai-v3267-density-badge{
    position:fixed;
    right:12px;
    bottom:12px;
    z-index:9999;
    background:#1d4ed8;
    color:#fff;
    font-size:11px;
    padding:6px 9px;
    border-radius:999px;
    opacity:.84;
}


/* TaxAI v3268: restore original card visibility */
.taxai-review-card-v3008,
.taxai-review-card,
.taxai-v2835-card,
.taxai-v3160-card,
.taxai-ocr-card-v2800{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
}

.taxai-review-card-v3008 *,
.taxai-review-card *,
.taxai-v2835-card *,
.taxai-v3160-card *,
.taxai-ocr-card-v2800 *{
    visibility:visible!important;
    opacity:1!important;
}

.taxai-v3268-density-badge{
    position:fixed;
    right:12px;
    bottom:12px;
    z-index:9999;
    background:#7c2d12;
    color:#fff;
    font-size:11px;
    padding:6px 9px;
    border-radius:999px;
    opacity:.84;
}

/* TaxAI v3270: restore actual Review v2 card body */
/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rv2-card{
    min-height:0!important;
    height:auto!important;
    padding:10px 12px!important;
}
*/

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rv2-card-head{
    margin-bottom:6px!important;
}
*/

/* TaxAI v3279 disabled v3120 rv2 conflict
.taxai-rv2-grid{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    overflow:visible!important;
    opacity:1!important;
    visibility:visible!important;
    margin-top:6px!important;
}
*/

.taxai-rv2-grid section,
.taxai-rv2-box,
.taxai-rv2-journal{
    display:block!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    opacity:1!important;
    visibility:visible!important;
}

.taxai-rv2-grid h3{
    display:block!important;
    margin:0 0 4px!important;
    font-size:11px!important;
    line-height:1.2!important;
}

.taxai-rv2-box > div,
.taxai-rv2-journal > div{
    display:flex!important;
    justify-content:space-between!important;
    gap:8px!important;
    padding:3px 0!important;
    font-size:12px!important;
    line-height:1.25!important;
}

.taxai-rv2-footer{
    margin-top:8px!important;
    padding-top:6px!important;
}

.taxai-v3270-density-badge{
    position:fixed;
    right:12px;
    bottom:12px;
    z-index:9999;
    background:#15803d;
    color:#fff;
    font-size:11px;
    padding:6px 9px;
    border-radius:999px;
    opacity:.84;
}


/* TaxAI v3279 ReviewCard complete priority layout */
.taxai-rcv2-card,
.taxai-rcv2-complete-card{
    display:grid!important;
    grid-template-columns:220px minmax(0,1fr) 260px!important;
    gap:12px!important;
    align-items:stretch!important;
    min-height:190px!important;
    padding:14px!important;
}
.taxai-rcv2-image,
.taxai-rcv2-ocr-image,
.taxai-rcv2-proof{
    min-height:160px!important;
}
.taxai-rcv2-image img,
.taxai-rcv2-ocr-image img,
.taxai-rcv2-proof img{
    width:100%!important;
    height:160px!important;
    object-fit:contain!important;
    border-radius:12px!important;
    background:#f8fafc!important;
}
.taxai-rcv2-main,
.taxai-rcv2-ai,
.taxai-rcv2-body{
    min-width:0!important;
}
.taxai-rcv2-actions{
    display:flex!important;
    justify-content:flex-end!important;
    align-items:flex-end!important;
    gap:8px!important;
}
.taxai-rcv2-label{
    font-size:11px!important;
    font-weight:800!important;
    color:#64748b!important;
    margin-bottom:6px!important;
}
