/* EatShare v4: v3 art direction with the more compact readability of v2 */
.mode-control{margin:14px 0 18px;padding:14px;border:1px solid #e5e5e0;border-radius:12px;background:#fafaf8;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.mode-control[hidden]{display:none!important}.mode-copy{display:flex;flex-direction:column;gap:5px}.mode-copy strong{font-size:12px}.mode-copy small{font-size:10px;color:#8a8d87;max-width:215px;line-height:1.4}.mode-choices{display:flex;gap:5px;background:#e9eae5;padding:4px;border-radius:10px}.mode-choice{border:0;background:transparent;color:#545954;border-radius:7px;padding:8px 11px;font-size:12px;font-weight:800}.mode-choice.active{background:#fff;color:#222;box-shadow:0 1px 4px #0002}
/* Restore the v2 hierarchy: names and categories distinct, details comfortably compact. */
.eat-card,.eat-card.playful{min-height:536px;border-radius:28px}
.eat-card .card-top{min-height:86px;padding:23px 24px 12px}
.card-front,.card-back{min-height:430px;padding:0 24px 18px}
.card-logo .wordmark{font-size:22px}.card-type{font-size:16px;padding-left:13px}
.periodic-logo.small-logo{width:36px;height:39px}.periodic-logo.small-logo b{font-size:27px}
.card-front .identity{margin:8px 0 15px;gap:16px}
.eat-card .avatar,.eat-card.playful .avatar{width:105px;height:111px;border-radius:17px;font-size:42px}
.identity-text h3,.eat-card.playful .identity-text h3{font-size:clamp(27px,3vw,35px);letter-spacing:-1.1px;margin-bottom:8px}
.identity-text>span:last-child{font-size:11px;letter-spacing:2.2px}
.card-diet,.eat-card.playful .card-diet{min-height:56px;border-radius:28px;margin-bottom:15px;padding:11px}
.card-diet h4,.eat-card.playful .card-diet h4{font-size:clamp(17px,2vw,21px);letter-spacing:1.5px}.diet-symbol{font-size:22px}
.card-warning,.eat-card.playful .card-warning{min-height:78px}.warning-label,.eat-card.playful .warning-label{font-size:11px;letter-spacing:1.15px}
.card-badges,.eat-card.playful .card-badges{margin:9px 0 0;gap:6px}
.card-badges span,.eat-card.playful .card-badges span{font-size:11px;padding:8px 10px}
.card-cautions,.eat-card.playful .card-cautions{gap:8px;margin:11px 0 13px}
.caution,.eat-card.playful .caution{font-size:11px;padding:10px 8px;min-height:44px}
.card-footer{font-size:12px;margin-top:0;padding:14px 0;letter-spacing:1.5px}
.eat-card.playful .card-footer{font-size:12px;margin-top:8px;padding:12px 6px}
/* Safety semantics are fixed independently of theme and user accent. */
.eat-card .severe-caution,.eat-card.playful .severe-caution{background:#ffe0dd!important;color:#9b1717!important;border:2px solid #c52828!important;box-shadow:none}
.eat-card .cross-caution,.eat-card.playful .cross-caution{background:#fff0c4!important;color:#724600!important;border:1px solid #cd931e!important}
.eat-card .warning-label{color:#ffaaa6}
.eat-card.playful .warning-label{color:#aa2020}
/* V2 inspired back hierarchy: clear labels, readable values; v3 ivory back retained. */
.card-back .back-panel{padding:8px 13px;margin:0 -12px;border-radius:21px}
.back-row,.eat-card.playful .back-row{grid-template-columns:22px 116px minmax(0,1fr);gap:8px;align-items:start;padding:10px 0;min-height:0}
.back-icon{font-size:17px}.back-row .row-label,.eat-card.playful .back-row .row-label{font-size:12px;letter-spacing:0}
.back-row strong,.eat-card.playful .back-row strong{font-size:12px;line-height:1.4;font-weight:600}
.emergency-row{padding:10px 7px!important}.back-lower{margin-top:9px;font-size:11px}
.back-alert{font-size:11px;margin-top:8px}
/* Day / night Classic: same silhouette, content, accent; only neutral surfaces invert. */
.eat-card.classic-light{background:linear-gradient(140deg,#fffefb,#ededea 80%);color:#25282b;border:1px solid #bfc1c1;box-shadow:0 24px 55px #17191b2b}
.eat-card.classic-light .card-top,.eat-card.classic-light .identity-text h3{color:#25282b}
.eat-card.classic-light .card-type{color:#34383b;border-left-color:#787c7f}
.eat-card.classic-light .identity-text>span:last-child{color:#44494c;opacity:1}
.eat-card.classic-light .card-badges span{background:#e5e5e3;color:#282b2d;border-color:#c8c9c8}
.eat-card.classic-light .card-footer{color:#202428;border-top-color:#8e9294}
.eat-card.classic-light .warning-label{color:#991d1d}
.eat-card.classic-light .back-alert{color:#8c1616}
.eat-card.classic-light .back-footer{color:#424548}
.eat-card.classic-light .back-panel{background:#fff;color:#222}
.eat-card.classic-light .back-row .row-label,.eat-card.classic-light .back-row strong{color:#242424}
.eat-card.classic-light .back-lower{color:#303438}
.eat-card.classic-light .card-diet{color:#171717}
/* Preserve illustrated Playful theme and its original palette. */
.eat-card.playful .card-warning{min-height:98px;padding:12px}
.eat-card.playful .card-back .back-panel{padding:8px 12px}
.eat-card.playful .back-row{grid-template-columns:21px 108px minmax(0,1fr)}
@media(max-width:550px){
 .eat-card,.eat-card.playful{min-height:475px}
 .eat-card .card-top{min-height:68px;padding:18px 13px 11px}
 .card-front,.card-back{padding:0 14px 15px;min-height:390px}
 .card-logo .wordmark{font-size:19px}.card-type{font-size:13px}
 .eat-card .avatar,.eat-card.playful .avatar{width:92px;height:99px}
 .identity-text h3,.eat-card.playful .identity-text h3{font-size:26px}
 .card-diet,.eat-card.playful .card-diet{min-height:52px;margin-bottom:13px}
 .card-diet h4,.eat-card.playful .card-diet h4{font-size:17px}
 .card-warning,.eat-card.playful .card-warning{min-height:72px}
 .back-row,.eat-card.playful .back-row{grid-template-columns:18px 88px minmax(0,1fr);gap:5px;padding:8px 0}
 .back-row .row-label,.eat-card.playful .back-row .row-label{font-size:10px}
 .back-row strong,.eat-card.playful .back-row strong{font-size:10px}
 .eat-card.playful .card-back .back-panel{padding:8px}
 .caution,.eat-card.playful .caution{font-size:10px;padding:7px 5px}
}
@media print{.eat-card,.eat-card.playful{min-height:115mm!important}.card-front,.card-back{min-height:100mm!important}}
