/* MAPLE_BUTTONS_V7: action labels and field values remain distinct on all 8 themes. */
html[data-maple-ambient]{
 --tag-contact:#087f5b;--tag-channel:#1765c0;--tag-bilateral:#087a86;
 --tag-favorite:#bc1d68;--tag-gift:#b6400c;--tag-report:#713bd0;
 --tag-read:#075b83;--tag-detail:#5046c8;--tag-six:#8431cc;--tag-single:#08796f;
 --tag-on:#ffffff;--field-label:#6847b2;--field-value:#154f70;
}
html[data-maple-ambient="ambient-sage"]{--field-label:#6940a3;--field-value:#086348}
html[data-maple-ambient="ambient-blue"]{--field-label:#6940a3;--field-value:#17588b}
html[data-maple-ambient="ambient-rose"]{--field-label:#a22663;--field-value:#175c71}
html[data-maple-ambient="ambient-purple"]{--field-label:#7839a3;--field-value:#175c71}
html:is([data-maple-ambient="hero-purple"],[data-maple-ambient="hero-black"],[data-maple-ambient="hero-green"]){
 --tag-contact:#34d399;--tag-channel:#60a5fa;--tag-bilateral:#5eead4;
 --tag-favorite:#f472b6;--tag-gift:#fb923c;--tag-report:#b79bff;
 --tag-read:#38bdf8;--tag-detail:#a5b4fc;--tag-six:#c4a0ff;--tag-single:#5eead4;
 --tag-on:#101828;--field-label:#e1b9ff;--field-value:#7ee4dd;
}
html[data-maple-ambient="hero-black"]{--field-label:#f5c68a;--field-value:#8cd8ff}
html[data-maple-ambient="hero-green"]{--field-label:#f5b6d8;--field-value:#9fe1ff}
html[data-maple-ambient] #contactBtn{--tag-bg:var(--tag-contact)}
html[data-maple-ambient] #channelBtn{--tag-bg:var(--tag-channel)}
html[data-maple-ambient] #bilateralBtn{--tag-bg:var(--tag-bilateral)}
html[data-maple-ambient] :is(#favoriteBtn,.maple-save){--tag-bg:var(--tag-favorite)}
html[data-maple-ambient] :is(#giftBtn,.gift-confirm-btn,[data-action="gifts"],[data-action="giftHistory"]){--tag-bg:var(--tag-gift)}
html[data-maple-ambient] :is(#reportBtn,[data-action="report"]){--tag-bg:var(--tag-report)}
html[data-maple-ambient] :is(#reportListBtn,[data-action="reports"]){--tag-bg:var(--tag-read)}
html[data-maple-ambient] :is(.card-detail-btn,.detail-section-label){--tag-bg:var(--tag-detail)}
html[data-maple-ambient] #sixModeBtn{--tag-bg:var(--tag-six)}
html[data-maple-ambient] #singleModeBtn{--tag-bg:var(--tag-single)}
html[data-maple-ambient] body :is(.app-shell,.modal) :is(
 #contactBtn,#channelBtn,#bilateralBtn,#favoriteBtn,#giftBtn,#reportBtn,
 #reportListBtn,#sixModeBtn,#singleModeBtn,.maple-save,.card-detail-btn,
 .detail-section-label,.gift-confirm-btn,[data-action="gifts"],
 [data-action="giftHistory"],[data-action="report"],[data-action="reports"]
){
 background:var(--tag-bg)!important;color:var(--tag-on)!important;
 border:1px solid var(--tag-bg)!important;border-radius:12px;
 font-weight:750;box-shadow:0 3px 9px rgb(0 0 0 / 16%);text-shadow:none;
}
html[data-maple-ambient] body :is(.app-shell,.modal) button:is(
 #contactBtn,#channelBtn,#bilateralBtn,#favoriteBtn,#giftBtn,#reportBtn,
 #reportListBtn,#sixModeBtn,#singleModeBtn,.card-detail-btn,
 .gift-confirm-btn,[data-action="gifts"],[data-action="giftHistory"],
 [data-action="report"],[data-action="reports"]
){min-height:44px;padding:10px 12px;line-height:1.35;white-space:normal}
/* The V6 theme assigns colors directly to nested strong/small/span nodes. */
html[data-maple-ambient] body #teacherModal .detail-sheet #reportListBtn :is(div,strong,small,b,span){
 color:var(--tag-on)!important;background:transparent!important;opacity:1;
}
html[data-maple-ambient] body .app-shell .flip-switch button.active{
 outline:3px solid var(--ui-text);outline-offset:2px;box-shadow:0 0 0 5px var(--ui-panel);
}
html[data-maple-ambient] .flip-switch button.active::after{content:" ✓";font-weight:900}
html[data-maple-ambient] .flip-switch{gap:10px;flex-wrap:wrap;background:var(--ui-field)!important}
html[data-maple-ambient] .flip-switch>span{color:var(--ui-text)!important}
html[data-maple-ambient] body .app-shell .maple-save{width:38px;height:38px;border-radius:50%;font-size:20px}
html[data-maple-ambient] body .modal .detail-section-label{
 display:table;margin:16px 0 8px;padding:7px 12px;font-size:14px;line-height:1.4;
}
html[data-maple-ambient] body :is(.app-shell,.modal) .teacher-field-label{
 color:var(--field-label)!important;font-weight:750;
}
html[data-maple-ambient] body :is(.app-shell,.modal) .teacher-field-value{
 color:var(--field-value)!important;font-weight:600;overflow-wrap:anywhere;
}
html[data-maple-ambient] .teacher-detail-row{
 display:flex;align-items:baseline;gap:3px;line-height:1.65;margin:9px 0;
}
html[data-maple-ambient] .teacher-detail-row .teacher-field-label{flex:none}
html[data-maple-ambient] .teacher-detail-row .teacher-field-value{min-width:0}
/* Longer named/value rows remain reachable on narrow, fixed-height six-card backs. */
html[data-maple-ambient] .card-back{justify-content:flex-start;overflow-y:auto;padding:14px;overscroll-behavior:contain}
html[data-maple-ambient] .card-back p{flex:none;margin:4px 0;line-height:1.5;font-size:13px}
html[data-maple-ambient] .card-back .card-detail-btn{flex:none;margin-top:8px}
html[data-maple-ambient] body :is(.teacher-tags,.detail-tags) span{
 background:var(--tag-report)!important;color:var(--tag-on)!important;
 border:1px solid var(--tag-report)!important;font-weight:700;border-radius:9px;
}
html[data-maple-ambient] body :is(.teacher-tags,.detail-tags) span:nth-child(3n+2){
 background:var(--tag-contact)!important;border-color:var(--tag-contact)!important;
}
html[data-maple-ambient] body :is(.teacher-tags,.detail-tags) span:nth-child(3n){
 background:var(--tag-channel)!important;border-color:var(--tag-channel)!important;
}
html[data-maple-ambient] body :is(#teacherModal,.app-shell) button:focus-visible{outline:3px solid var(--ui-text);outline-offset:3px}
html[data-maple-ambient] :is(#teacherModal,.app-shell) button:disabled{opacity:.55;box-shadow:none;cursor:default}
@media(max-width:380px){
 html[data-maple-ambient] :is(#sixModeBtn,#singleModeBtn){font-size:12px;padding:9px 10px!important}
 html[data-maple-ambient] .teacher-detail-row{display:block}
}
