/* Embedded Vazirmatn font; licensed under the SIL Open Font License.
Copyright 2015 The Vazirmatn Project Authors (https://github.com/rastikerdar/vazirmatn)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

*/
@font-face{font-family:Vazirmatn;font-style:normal;font-weight:400;font-display:swap;src:url(assets/vazirmatn-400.woff) format("woff")}
@font-face{font-family:Vazirmatn;font-style:normal;font-weight:600;font-display:swap;src:url(assets/vazirmatn-600.woff) format("woff")}
@font-face{font-family:Vazirmatn;font-style:normal;font-weight:800;font-display:swap;src:url(assets/vazirmatn-800.woff) format("woff")}

/* ===== ماجراجویی غذایی — FFQ Game ===== */
:root{
  --h:32;
  --accent:hsl(var(--h) 92% 52%);
  --accent-d:hsl(var(--h) 80% 36%);
  --accent-s:hsl(var(--h) 100% 95%);
  --accent-m:hsl(var(--h) 90% 86%);
  --bg1:hsl(var(--h) 100% 97%);
  --bg2:hsl(calc(var(--h) + 45) 95% 93%);
  --ink:#2a2233;
  --muted:#7b7189;
  --card:#ffffff;
  --line:#ece6f2;
  --line-d:#d9d0e4;
  --ok:#2fb86a;
  --font:"Vazirmatn","Vazir","Segoe UI",Tahoma,"Noto Naskh Arabic",system-ui,sans-serif;
  --r:22px;
}
@media (prefers-color-scheme:dark){
  :root{
    --accent:hsl(var(--h) 85% 58%);
    --accent-d:hsl(var(--h) 70% 30%);
    --accent-s:hsl(var(--h) 30% 20%);
    --accent-m:hsl(var(--h) 35% 28%);
    --bg1:hsl(var(--h) 30% 9%);
    --bg2:hsl(calc(var(--h) + 45) 28% 12%);
    --ink:#f6f0fc;
    --muted:#b7aec6;
    --card:hsl(var(--h) 18% 16%);
    --line:#3a3347;
    --line-d:#4a4258;
  }
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%}
body{
  font-family:var(--font);color:var(--ink);line-height:1.8;
  background:linear-gradient(160deg,var(--bg1),var(--bg2));
  background-attachment:fixed;min-height:100vh;
  padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  transition:background .6s;
}
body.lock{overflow:hidden}
button,input{font-family:inherit}
[hidden]{display:none!important}

/* پس‌زمینهٔ زنده */
.bg{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.bg i{position:absolute;width:46vmax;height:46vmax;border-radius:50%;filter:blur(70px);opacity:.35;background:var(--accent-m);transition:background .8s}
.bg i:nth-child(1){top:-18vmax;right:-14vmax}
.bg i:nth-child(2){bottom:-20vmax;left:-12vmax;background:var(--accent)}
.bg i:nth-child(3){top:35%;left:30%;width:22vmax;height:22vmax;opacity:.18}
#confetti{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:60}

#app{max-width:560px;margin:0 auto;padding:14px 16px 40px}
.screen{animation:fadeUp .45s ease both}
@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* ===== دکمه‌ها ===== */
.btn{
  --sh:var(--line-d);
  border:0;border-radius:18px;padding:14px 18px;font-weight:800;font-size:1.05rem;cursor:pointer;
  background:var(--card);color:var(--ink);
  box-shadow:0 5px 0 var(--sh),0 8px 18px rgba(0,0,0,.06);
  transition:transform .08s,box-shadow .08s,filter .2s;
}
.btn:hover{filter:brightness(1.04)}
.btn:active{transform:translateY(4px);box-shadow:0 1px 0 var(--sh)}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none;box-shadow:0 5px 0 var(--sh)}
.btn-yes{--sh:var(--accent-d);background:var(--accent);color:#fff}
.btn-go{--sh:#1f8f50;background:var(--ok);color:#fff}
.btn-no{border:2px solid var(--line-d)}
.btn.big{width:100%;padding:16px;font-size:1.15rem;margin-top:14px}
.btn:focus-visible,.link-btn:focus-visible,.icon-btn:focus-visible,.node:focus-visible,.chip-btn:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.link-btn{background:none;border:0;color:var(--muted);font-size:.92rem;cursor:pointer;padding:8px 10px;border-radius:12px}
.link-btn:hover:not(:disabled){color:var(--ink);background:var(--accent-s)}
.link-btn:disabled{opacity:.35;cursor:default}
.icon-btn{width:42px;height:42px;border-radius:14px;border:2px solid var(--line);background:var(--card);color:var(--ink);font-size:1.2rem;cursor:pointer}

/* ===== خوش‌آمدگویی ===== */
.hero{position:relative;height:150px;margin:6px 0 0}
.hero span{position:absolute;right:var(--x);top:var(--y);font-size:2rem;animation:float 3.6s ease-in-out var(--d) infinite;opacity:.9}
.hero-main{position:absolute;inset:0;display:grid;place-items:center;font-size:5.4rem;animation:bob 2.8s ease-in-out infinite;filter:drop-shadow(0 10px 14px rgba(0,0,0,.15))}
@keyframes float{50%{transform:translateY(-10px) rotate(8deg)}}
@keyframes bob{50%{transform:translateY(-6px) scale(1.04)}}
h1{margin:4px 0 4px;text-align:center;font-size:2rem;font-weight:800;color:var(--accent-d)}
@media (prefers-color-scheme:dark){h1{color:var(--accent)}}
.lead{text-align:center;margin:0 0 16px;color:var(--muted)}
.lead b{color:var(--ink)}
.panel{background:var(--card);border-radius:var(--r);padding:16px;box-shadow:0 10px 30px rgba(0,0,0,.07);display:grid;gap:12px}
.field{display:grid;gap:4px;font-weight:600;font-size:.92rem}
.field em{font-style:normal;color:var(--muted);font-weight:400}
.field input,.stepper input,.txt{
  width:100%;border:2px solid var(--line);background:transparent;color:var(--ink);
  border-radius:14px;padding:11px 13px;font-size:1rem;outline:none;transition:border-color .2s,box-shadow .2s
}
.field input:focus,.stepper input:focus,.txt:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-s)}
.switch{display:flex;align-items:center;gap:10px;cursor:pointer;font-weight:600;font-size:.95rem}
.switch input{position:absolute;opacity:0}
.switch .track{width:46px;height:26px;border-radius:99px;background:var(--line-d);position:relative;transition:background .2s;flex:none}
.switch .track::after{content:"";position:absolute;top:3px;right:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 2px 5px rgba(0,0,0,.25)}
.switch input:checked+.track{background:var(--ok)}
.switch input:checked+.track::after{transform:translateX(-20px)}
.switch input:focus-visible+.track{outline:3px solid var(--accent);outline-offset:2px}
.promise{margin:14px 2px 0;display:grid;gap:6px;font-size:.9rem;color:var(--muted)}
.promise b{margin-inline-end:6px}

/* ===== HUD ===== */
.hud{display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:5;padding:8px 0;backdrop-filter:blur(10px);background:linear-gradient(var(--bg1),transparent)}
.bar-wrap{flex:1;min-width:0}
.bar{height:16px;background:var(--line);border-radius:99px;overflow:hidden;box-shadow:inset 0 2px 4px rgba(0,0,0,.08)}
.bar-fill{height:100%;width:0;border-radius:99px;transition:width .6s cubic-bezier(.2,.9,.3,1.2);
  background:repeating-linear-gradient(-45deg,var(--accent) 0 12px,hsl(var(--h) 95% 60%) 12px 24px);background-size:34px 34px;animation:stripes 1.2s linear infinite}
@keyframes stripes{to{background-position:34px 0}}
.bar-text{display:flex;justify-content:space-between;font-size:.76rem;color:var(--muted);margin-top:3px}
.stat{background:var(--card);border:2px solid var(--line);border-radius:14px;padding:4px 10px;font-weight:800;white-space:nowrap;display:flex;gap:4px;align-items:center}
.stat.pop{animation:pop .45s}
@keyframes pop{40%{transform:scale(1.25)}}
.level-row{display:flex;align-items:center;gap:10px;font-size:.8rem;color:var(--muted);margin:2px 2px 8px}
.lv-bar{flex:1;height:6px;background:var(--line);border-radius:9px;overflow:hidden}
#lvFill{height:100%;width:0;background:var(--ok);border-radius:9px;transition:width .5s}

/* نوار مرحله‌ها */
.strip{display:flex;align-items:center;gap:0;overflow-x:auto;padding:6px 2px 10px;scrollbar-width:none}
.strip::-webkit-scrollbar{display:none}
.strip .link{flex:0 0 10px;height:4px;background:var(--line-d);border-radius:4px}
.node{flex:none;width:40px;height:40px;border-radius:50%;border:3px solid var(--line-d);background:var(--card);font-size:1.15rem;cursor:pointer;display:grid;place-items:center;position:relative;transition:transform .2s}
.node.todo{filter:grayscale(1);opacity:.5;cursor:default}
.node.open{border-color:var(--accent-m)}
.node.cur{border-color:var(--accent);transform:scale(1.18);box-shadow:0 0 0 5px var(--accent-s)}
.node.done{border-color:var(--ok);background:var(--accent-s)}
.node.done::after{content:"✓";position:absolute;bottom:-5px;left:-4px;width:17px;height:17px;border-radius:50%;background:var(--ok);color:#fff;font-size:.65rem;line-height:17px;font-weight:800}

/* ===== شخصیت ===== */
.mascot-row{display:flex;align-items:center;gap:10px;margin:2px 0 10px;min-height:56px}
.mascot{font-size:2.6rem;flex:none;animation:bob 3s ease-in-out infinite}
.mascot.hop{animation:hop .5s}
@keyframes hop{30%{transform:translateY(-16px) rotate(-8deg) scale(1.15)}60%{transform:translateY(0) rotate(6deg)}}
.bubble{position:relative;background:var(--card);border-radius:18px;padding:9px 14px;font-weight:600;font-size:.93rem;box-shadow:0 6px 18px rgba(0,0,0,.07);border:2px solid var(--accent-m)}
.bubble::before{content:"";position:absolute;right:-9px;top:50%;margin-top:-8px;border:8px solid transparent;border-left-color:var(--accent-m);border-right:0}

/* ===== کارت سؤال ===== */
.card{position:relative;background:var(--card);border-radius:28px;padding:20px 18px 18px;box-shadow:0 14px 40px rgba(0,0,0,.10),0 0 0 3px var(--accent-s);text-align:center}
.card.enter{animation:cardIn .42s cubic-bezier(.2,.9,.3,1.15)}
@keyframes cardIn{from{opacity:0;transform:translateX(-40px) scale(.95)}to{opacity:1;transform:none}}
.card-top{display:flex;justify-content:space-between;gap:8px;font-size:.8rem;margin-bottom:6px}
.chip{background:var(--accent-s);color:var(--accent-d);padding:3px 12px;border-radius:99px;font-weight:800}
@media (prefers-color-scheme:dark){.chip{color:var(--accent)}}
.chip.ghost{background:transparent;color:var(--muted);font-weight:600}
.emoji{font-size:5.2rem;line-height:1.2;margin:2px 0;animation:emojiIn .6s cubic-bezier(.2,1.4,.4,1) both;filter:drop-shadow(0 10px 10px rgba(0,0,0,.14))}
@keyframes emojiIn{from{transform:scale(.3) rotate(-20deg);opacity:0}}
.food{margin:0;font-size:1.65rem;line-height:1.5;font-weight:800}
.food.long{font-size:1.25rem}
.unit{display:inline-flex;flex-wrap:wrap;gap:4px 8px;justify-content:center;align-items:center;background:var(--accent-s);border-radius:16px;padding:6px 14px;margin:8px 0 4px;font-size:.95rem}
.unit b{color:var(--accent-d)}
@media (prefers-color-scheme:dark){.unit b{color:var(--accent)}}
.unit small{color:var(--muted)}
.hint{margin:2px 0;color:var(--muted);font-size:.85rem}
.q{font-size:1.12rem;font-weight:800;margin:14px 0 12px}
.yn{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.yn .btn.sel{outline:4px solid var(--accent-s);filter:brightness(1.05)}

/* پنل بسامد */
.freq{text-align:right;margin-top:16px;padding-top:14px;border-top:2px dashed var(--line);animation:fadeUp .35s both}
.step{margin-bottom:14px}
.step-title{font-weight:800;font-size:.95rem;margin-bottom:8px;display:flex;gap:8px;align-items:flex-start}
.step-title i{flex:none;width:24px;height:24px;border-radius:50%;background:var(--accent);color:#fff;font-style:normal;display:grid;place-items:center;font-size:.8rem;margin-top:3px}
.seg{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.seg button,.chip-btn{border:2px solid var(--line-d);background:var(--card);color:var(--ink);border-radius:14px;padding:9px 4px;font-weight:700;font-size:.95rem;cursor:pointer;transition:all .15s}
.seg button:hover,.chip-btn:hover{border-color:var(--accent)}
.seg button.on,.chip-btn.on{background:var(--accent);border-color:var(--accent);color:#fff;transform:translateY(-2px);box-shadow:0 5px 0 var(--accent-d)}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.chips .chip-btn{min-width:52px;padding:8px 14px}
.stepper{display:flex;align-items:center;gap:8px}
.stepper .sbtn{flex:none;width:48px;height:48px;border-radius:16px;border:2px solid var(--line-d);background:var(--card);color:var(--ink);font-size:1.5rem;font-weight:800;cursor:pointer}
.stepper .sbtn:active{transform:scale(.92)}
.stepper input{text-align:center;font-size:1.3rem;font-weight:800;padding:8px}
.stepper .ul{font-size:.85rem;color:var(--muted);flex:none}
.preview{margin:10px 0 0;padding:8px 12px;border-radius:14px;background:var(--accent-s);font-size:.9rem;font-weight:600;min-height:40px}
.preview.warn{background:#fff1d6;color:#8a5a00}
@media (prefers-color-scheme:dark){.preview.warn{background:#4a3a14;color:#ffd98a}}
.extras{display:grid;gap:10px;margin:4px 0 14px}
.extras label{font-size:.88rem;font-weight:600;color:var(--muted)}
.opt-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.freq .btn-go{width:100%;margin-top:4px}

/* XP شناور */
.xp-float{position:absolute;left:50%;top:12px;transform:translateX(-50%);background:var(--ok);color:#fff;font-weight:800;border-radius:99px;padding:4px 16px;pointer-events:none;animation:floatUp .95s ease forwards;white-space:nowrap;z-index:3;box-shadow:0 6px 16px rgba(47,184,106,.4)}
@keyframes floatUp{0%{opacity:0;transform:translate(-50%,10px) scale(.6)}20%{opacity:1;transform:translate(-50%,-6px) scale(1.1)}100%{opacity:0;transform:translate(-50%,-70px)}}

.foot{display:flex;justify-content:space-between;margin-top:10px}

/* ===== Toast ===== */
#toast{position:fixed;top:calc(14px + env(safe-area-inset-top));left:50%;transform:translate(-50%,-140%);background:var(--ink);color:var(--bg1);padding:10px 18px;border-radius:99px;font-weight:700;font-size:.92rem;z-index:80;max-width:92vw;text-align:center;transition:transform .45s cubic-bezier(.2,1.3,.4,1);box-shadow:0 10px 30px rgba(0,0,0,.3)}
#toast.show{transform:translate(-50%,0)}

/* ===== مودال ===== */
.modal{position:fixed;inset:0;z-index:70;background:rgba(20,12,30,.55);backdrop-filter:blur(4px);display:grid;place-items:center;padding:16px;animation:fade .25s}
@keyframes fade{from{opacity:0}}
.modal-box{background:var(--card);border-radius:28px;max-width:440px;width:100%;max-height:88vh;overflow:auto;padding:24px 20px 20px;text-align:center;box-shadow:0 30px 80px rgba(0,0,0,.4);animation:boxIn .5s cubic-bezier(.2,1.3,.4,1)}
@keyframes boxIn{from{transform:scale(.7) translateY(30px);opacity:0}}
.m-big{font-size:5rem;line-height:1.1;animation:emojiIn .7s cubic-bezier(.2,1.4,.4,1) both}
.m-big.shake{animation:shake .8s infinite}
@keyframes shake{0%,100%{transform:rotate(0)}20%{transform:rotate(-12deg)}40%{transform:rotate(10deg)}60%{transform:rotate(-8deg)}80%{transform:rotate(6deg)}}
.modal h3{margin:6px 0;font-size:1.4rem;font-weight:800}
.modal p{margin:6px 0;color:var(--muted)}
.m-pills{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:12px 0}
.m-pills span{background:var(--accent-s);color:var(--accent-d);padding:4px 14px;border-radius:99px;font-weight:800}
@media (prefers-color-scheme:dark){.m-pills span{color:var(--accent)}}
.m-tip{background:var(--accent-s);border-radius:16px;padding:10px 14px;font-size:.92rem;text-align:right;color:var(--ink)!important}
.m-next{display:flex;align-items:center;gap:10px;justify-content:center;border:2px dashed var(--line-d);border-radius:16px;padding:8px 12px;margin:12px 0;font-weight:700;color:var(--ink)}
.m-next span:first-child{font-size:1.8rem}
.menu-list{display:grid;gap:10px;margin-top:12px}
.menu-list .btn{text-align:right}
.rev-search{margin:10px 0}
.rev-list{display:grid;gap:6px;text-align:right}
.rev-item{display:flex;gap:10px;align-items:center;border:2px solid var(--line);background:transparent;color:var(--ink);border-radius:14px;padding:8px 12px;cursor:pointer;width:100%;font-size:.9rem}
.rev-item:hover{border-color:var(--accent)}
.rev-item .em{font-size:1.4rem}
.rev-item .nm{flex:1;font-weight:700}
.rev-item .st{font-size:.78rem;color:var(--muted);white-space:nowrap}
.rev-item .st.ok{color:var(--ok);font-weight:700}

/* ===== پایان ===== */
.final-top{text-align:center}
.trophy{font-size:6rem;animation:emojiIn .8s cubic-bezier(.2,1.4,.4,1) both,bob 3s 1s ease-in-out infinite}
.grid-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:16px 0}
.gs{background:var(--card);border-radius:18px;padding:12px;text-align:center;box-shadow:0 6px 18px rgba(0,0,0,.06)}
.gs b{display:block;font-size:1.5rem}
.gs span{font-size:.82rem;color:var(--muted)}
.shelf{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:8px 0 16px}
.shelf .bd{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-size:1.5rem;background:var(--accent-s);border:3px solid var(--ok)}
.shelf .bd.off{filter:grayscale(1);opacity:.4;border-color:var(--line-d)}
.top3{background:var(--card);border-radius:18px;padding:12px 16px;margin:8px 0;box-shadow:0 6px 18px rgba(0,0,0,.06)}
.top3 h3{margin:0 0 6px;font-size:1rem}
.top3 div{display:flex;gap:8px;align-items:center}
.final .note{color:var(--muted);font-size:.85rem;text-align:center;margin-top:12px}

@media (max-width:380px){
  .food{font-size:1.4rem}.emoji{font-size:4.4rem}.yn .btn{font-size:.95rem;padding:12px 8px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* آیکون‌های سه‌بعدی */
.icon3d{width:150px;height:150px;margin:0 auto 2px;animation:emojiIn .6s cubic-bezier(.2,1.4,.4,1) both}
.icon3d svg{width:100%;height:100%;display:block;overflow:hidden;filter:none}
@keyframes icoFloat{50%{transform:translateY(-5px) rotate(1.5deg)}}
.mini{width:34px;height:34px;flex:none;display:inline-block}
.mini svg{width:100%;height:100%;display:block}
@media (max-width:380px){.icon3d{width:124px;height:124px}}

/* SVG icons on the welcome screen */
#welcome .hero > span{width:44px;height:44px;font-size:0;line-height:0;pointer-events:none}
#welcome .hero > span > svg{width:100%;height:100%;display:block}
#welcome .hero-main{filter:none;pointer-events:none}
#welcome .hero-main > svg{width:116px;height:116px;display:block}
#welcome .welcome-icon{display:inline-block;width:1.3em;height:1.3em;vertical-align:-.27em;flex:none}
#welcome .lead .welcome-icon{color:var(--accent-d)}
#welcome .promise > div{display:flex;align-items:flex-start;gap:6px}
#welcome .promise b{display:inline-flex;margin:0;color:var(--accent-d);padding-top:2px;flex:none}
#welcome .switch .welcome-icon{margin-inline-end:4px}
#welcome .btn .welcome-icon{margin-inline:4px}
@media(max-width:380px){#welcome .hero > span{width:36px;height:36px}#welcome .hero-main > svg{width:104px;height:104px}}

/* ShaFA workspace — matched to the questionnaire's warm orange and soft green palette. */
body.analysis-mode{--h:32;background:#faf9f5;color:#2b302c}
.sa{--sa-orange:#e67d24;--sa-orange-dark:#a95112;--sa-green:#3e735d;--sa-ink:#28332e;--sa-muted:#7f867e;--sa-line:#e9ebe3;--sa-soft:#f4f5ef;color:var(--sa-ink);font-size:14px;line-height:1.85;display:flex;min-height:100vh;background:#faf9f5}
.sa button,.sa input,.sa select,.sa-ffq-header button{font-family:inherit}
.sa button{cursor:pointer}.sa button:disabled{cursor:not-allowed;opacity:.6}
.sa button:focus-visible,.sa a:focus-visible,.sa input:focus-visible,.sa select:focus-visible,.sa summary:focus-visible{outline:3px solid #e8a55e;outline-offset:3px}
.sa svg,.sa-ffq-header svg{display:inline-block;width:21px;height:21px;vertical-align:middle;flex:none}
.sa-sidebar{width:246px;flex:none;background:#fffefa;border-left:1px solid var(--sa-line);padding:32px 22px 22px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.sa-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--sa-ink);font-size:29px;font-weight:800;line-height:1.4;margin-bottom:47px}
.sa-brand-mark{width:47px;height:55px;background:#fff2df;border-radius:17px;display:grid;place-items:center;color:var(--sa-orange)}.sa-brand-mark svg{width:35px;height:40px}
.sa-brand-en{display:block;font:10px/2.2 'Segoe UI',sans-serif;letter-spacing:.5px;color:#8c928a;font-weight:500;direction:ltr}
.sa-side-label{font-size:11px;color:#a0a699;padding:0 12px;margin-bottom:13px}
.sa-nav{display:grid;gap:8px}.sa-nav button{display:flex;align-items:center;gap:12px;padding:13px 15px;border:0;border-radius:13px;background:transparent;color:#81877e;text-align:right;font-size:13px;font-weight:600}
.sa-nav button.active{color:#b9631d;background:#fff1df}.sa-nav button.active:after{content:"";width:5px;height:5px;background:#e98635;border-radius:50%;margin-inline-start:auto}
.sa-nav button:hover{background:#f6f5ef}.sa-nav button.active:hover{background:#ffebd1}
.sa-side-divider{height:1px;background:var(--sa-line);margin:27px 9px}
.sa-questionnaire{position:relative;border:1px solid #e0e8da;background:#f4f8ef;border-radius:15px;padding:17px 14px;text-align:right;color:#497055;display:grid;grid-template-columns:26px 1fr;column-gap:7px}
.sa-questionnaire b{font-size:12px}.sa-questionnaire small{grid-column:2;font-size:10px;color:#89967f}.sa-go{position:absolute;left:12px;top:20px;font-size:17px}
.sa-side-bottom{margin-top:auto;padding:25px 8px 0;font-size:11px;color:#677961}.sa-side-bottom small{display:block;font-size:10px;color:#a1a59b;margin:3px 13px}
.sa-local-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#7c9b66;margin-inline-end:6px}
.sa-workspace{min-width:0;flex:1}.sa-topbar{height:111px;padding:25px 45px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--sa-line);background:#fffefa}
.sa-breadcrumb{font-size:10px;color:#989e92;display:flex;gap:12px;align-items:center}.sa-breadcrumb span{color:#cccfc5}
.sa-topbar h1{font-size:21px;line-height:1.4;margin:5px 0 0;text-align:right;color:var(--sa-ink)}
.sa-top-actions{display:flex;align-items:center;gap:11px}.sa-db-ready{font-size:10px;color:#8b9485;margin-inline-end:10px}
.sa-btn,.sa-ffq-header .sa-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:11px;padding:10px 17px;font-size:12px;font-weight:600;text-decoration:none;line-height:1.8;transition:background .15s,transform .15s;white-space:nowrap}
.sa-btn:hover{transform:translateY(-1px)}.sa-btn-primary{background:var(--sa-orange,#e67d24);color:white;box-shadow:0 4px 9px #bc63201a}.sa-btn-primary:hover{background:#d87322}
.sa-btn-white{background:#fffefa;color:#5f6c60;border-color:#e4e8de}.sa-btn-soft{background:#fff0dc;color:#a96024}.sa-btn-green{background:#eaf2e6;color:#4c7454}.sa-btn-danger{color:#a45547;background:#fff6f1;border-color:#f0dfd5}.sa-btn-sm{padding:5px 10px;font-size:11px}.sa-help{padding:9px}
.sa-main{max-width:1510px;padding:32px 45px 22px;margin:auto;min-height:calc(100vh - 169px)}.sa-footer{padding:14px 45px 25px;display:flex;justify-content:space-between;gap:16px;color:#a1a699;font-size:10px}
.sa-hero{background:#fff0dc;border:1px solid #f3e5ce;border-radius:24px;min-height:225px;display:flex;position:relative;overflow:hidden;padding:31px 35px;margin-bottom:26px;gap:20px;align-items:center}
.sa-hero-content{flex:1;z-index:1}.sa-kicker{font-size:10px;color:#ac7c48;display:flex;align-items:center;gap:7px;letter-spacing:.1px}.sa-kicker:before{content:"";display:block;width:16px;height:1px;background:#c58a4e}
.sa-hero h2{font-size:28px;line-height:1.8;margin:9px 0 6px;letter-spacing:-.5px;color:#5c422c}.sa-hero h2 span{color:#c87225}.sa-hero p{font-size:12px;color:#9c8265;margin:0 0 20px;max-width:440px;line-height:2.2}
.sa-hero-actions{display:flex;gap:9px;flex-wrap:wrap}.sa-hero-art{width:230px;flex:none;position:relative;align-self:stretch;display:grid;place-items:center}.sa-hero-art:before{content:"";position:absolute;width:190px;height:190px;border:1px solid #e4cfaa;border-radius:50%;opacity:.5}.sa-hero-art:after{content:"";position:absolute;width:240px;height:240px;border:1px solid #ead9bb;border-radius:50%;opacity:.5}.sa-hero-art > svg{width:160px;height:160px;z-index:1;transform:rotate(-11deg)}.sa-hero-art .sa-floating-food{position:absolute;width:62px;height:62px;z-index:2;left:-5px;top:2px;transform:rotate(13deg)}.sa-hero-art .sa-floating-food.second{width:64px;height:64px;right:0;bottom:-8px;top:auto;left:auto;transform:rotate(-12deg)}
.sa-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}.sa-section-heading h2,.sa-panel h2{font-size:15px;font-weight:800;line-height:1.6;margin:0}.sa-section-heading p,.sa-panel-sub{font-size:11px;color:#969e91;margin:3px 0 0}.sa-section-heading .sa-hint{font-size:10px;color:#929c8a}
.sa-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:26px}
.sa-stat{background:#fffefa;border:1px solid var(--sa-line);border-radius:18px;padding:18px;position:relative;overflow:hidden}.sa-stat-head{display:flex;align-items:center;gap:9px;font-size:11px;color:#8c9487}.sa-stat-icon{display:grid;place-items:center;width:33px;height:33px;background:#fff0da;border-radius:10px;color:#cf883d}.sa-stat:nth-child(2) .sa-stat-icon{background:#edf3e7;color:#719556}.sa-stat:nth-child(3) .sa-stat-icon{background:#f5ede8;color:#b79076}.sa-stat:nth-child(4) .sa-stat-icon{background:#edeff8;color:#8a90b3}.sa-stat-value{font:700 31px/1.7 'Segoe UI',Tahoma,sans-serif;margin:12px 0 2px;direction:ltr;text-align:right;color:#384332}.sa-stat-value small{font:10px var(--font);color:#979f91;margin-left:6px}.sa-stat-foot{font-size:9px;color:#a4ac9b}
.sa-columns{display:grid;grid-template-columns:1.18fr 1fr;gap:20px;margin-bottom:20px}.sa-panel{background:#fffefa;border:1px solid var(--sa-line);border-radius:19px;padding:23px;min-width:0}
.sa-dropzone{border:1.5px dashed #dcd8c6;border-radius:15px;background:#fcfbf6;padding:22px 16px;text-align:center;transition:background .2s}.sa-dropzone.dragging{background:#fff1dc;border-color:#c47e38}.sa-drop-icon{width:46px;height:46px;border:1px solid #eadfc9;border-radius:14px;display:grid;place-items:center;color:#c09154;background:#fff6e7;margin:0 auto 9px}.sa-drop-icon svg{width:24px;height:24px}.sa-dropzone h3{font-size:12px;font-weight:600;margin:7px 0}.sa-dropzone p{font-size:10px;color:#a1a493;margin:5px 0 15px}.sa-upload-note{font-size:10px;color:#9b9e91;text-align:center;margin:12px 0 0}
.sa-steps{display:grid;gap:15px;margin-top:19px}.sa-step{display:flex;align-items:center;gap:13px}.sa-step-num{border:1px solid #dfe5d7;color:#7e9871;background:#f5f8ef;width:29px;height:29px;border-radius:10px;display:grid;place-items:center;font:600 11px 'Segoe UI',sans-serif;flex:none}.sa-step b{font-size:11px;font-weight:600}.sa-step p{font-size:10px;color:#a1a797;line-height:1.7;margin:1px 0}.sa-privacy{display:flex;align-items:center;gap:8px;border-top:1px solid var(--sa-line);padding-top:15px;margin-top:18px;color:#78916d;font-size:10px}
.sa-info-strip{border:1px solid #e4eadc;background:#f0f5e9;border-radius:14px;display:flex;align-items:flex-start;gap:12px;padding:15px 19px;font-size:11px;color:#7e9271}.sa-info-strip svg{color:#82a264}.sa-info-strip b{color:#647c55;font-weight:600}
.sa-personbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:13px;background:#fffefa;border:1px solid var(--sa-line);border-radius:16px;padding:14px 18px;margin-bottom:20px}.sa-person-info{display:flex;align-items:center;gap:12px;min-width:0}.sa-avatar{display:grid;place-items:center;background:#eaf0e1;width:39px;height:39px;border-radius:13px;color:#789165;font-weight:800;font-size:16px;flex:none}.sa-select{border:0;background:transparent;color:#42563e;max-width:250px;font-size:12px;font-weight:600}.sa-subline{font-size:9px;color:#a0a898}.sa-person-actions{display:flex;gap:8px}.sa-badge{display:inline-block;padding:3px 9px;border-radius:7px;background:#edf3e8;color:#6d8a5b;font-size:9px;white-space:nowrap}.sa-badge.warn{background:#fff0db;color:#b47b30}.sa-badge.demo{background:#eeedf8;color:#8d80ac}
.sa-warning{background:#fff3df;border:1px solid #f1dfbd;border-radius:13px;color:#9e783e;font-size:11px;padding:12px 15px;margin-bottom:19px;display:flex;align-items:flex-start;gap:10px}.sa-warning b{font-weight:600}.sa-warning .sa-btn{margin-inline-start:auto;flex:none}
.sa-chart-row{display:flex;align-items:center;gap:28px;margin:23px 0 5px}.sa-donut{width:138px;height:138px;border-radius:50%;flex:none;display:grid;place-items:center}.sa-donut-inner{width:104px;height:104px;border-radius:50%;background:#fffefa;display:grid;align-content:center;justify-items:center}.sa-donut-inner b{font-size:13px;color:#536247}.sa-donut-inner span{font-size:9px;color:#a3aa98}.sa-legend{display:grid;gap:11px;flex:1}.sa-legend-row{display:flex;gap:8px;align-items:center;font-size:11px;color:#8d9684}.sa-legend-row i{width:7px;height:7px;border-radius:3px}.sa-legend-row b{margin-inline-start:auto;color:#5c6b51;font:600 13px 'Segoe UI',sans-serif}.sa-chart-note{font-size:9px;color:#a2a895;margin:15px 0 0}
.sa-food-rank{display:flex;align-items:center;gap:10px;margin-top:13px}.sa-food-rank .sa-mini{width:37px;height:37px;flex:none}.sa-food-rank .sa-mini svg{width:100%;height:100%}.sa-rank-text{flex:1;min-width:0}.sa-rank-label{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#798771;margin-bottom:5px}.sa-rank-label span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sa-rank-label b{font:11px 'Segoe UI',sans-serif;flex:none}.sa-rank-track{height:5px;border-radius:5px;background:#f0f1e7;overflow:hidden}.sa-rank-fill{display:block;height:100%;background:#d9a463;border-radius:5px}
.sa-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.sa-search{display:flex;align-items:center;gap:8px;border:1px solid #e1e5d9;border-radius:11px;background:#fffefa;padding:8px 12px;min-width:240px;flex:1;max-width:430px;color:#a1aa98}.sa-search input{border:0;outline:0;background:transparent;color:var(--sa-ink);width:100%;font-size:11px;padding:0;min-width:0}.sa-search input::placeholder{color:#a7ad9f}.sa-filters{display:flex;gap:6px;flex-wrap:wrap}.sa-filter{padding:6px 12px;border-radius:9px;border:1px solid #e5e8dd;background:#fffefa;color:#8a9582;font-size:10px}.sa-filter.active{background:#fff0db;border-color:#edcfaa;color:#b77832}
.sa-table-wrap{overflow:auto;border:1px solid var(--sa-line);border-radius:14px;background:#fffefa;max-height:660px}.sa-table{width:100%;border-collapse:collapse;font-size:11px;white-space:nowrap}.sa-table th{font-size:10px;color:#7f8d74;background:#f6f7ef;font-weight:600;text-align:right;padding:12px 14px;position:sticky;top:0;z-index:1;border-bottom:1px solid #e5e9db}.sa-table td{padding:12px 14px;border-bottom:1px solid #edf0e5;color:#78846e;max-width:290px;overflow:hidden;text-overflow:ellipsis}.sa-table tbody tr:last-child td{border-bottom:0}.sa-table tr:hover td{background:#fafbf5}.sa-table td.num{font:12px 'Segoe UI',Tahoma,sans-serif;direction:ltr;text-align:right;color:#57684e;font-variant-numeric:tabular-nums}.sa-table .sa-table-name{font-weight:600;color:#53614b}.sa-table small{display:block;font-weight:400;color:#a1aa96;font-size:9px;max-width:260px;overflow:hidden;text-overflow:ellipsis;direction:ltr;text-align:right}.sa-table .sa-recipe{font-size:9px;color:#a77c47}.sa-empty{padding:45px 20px;text-align:center;color:#9ba88e;font-size:12px}.sa-empty svg{display:block;width:40px;height:40px;margin:0 auto 15px;color:#c6d0b9}.sa-empty .sa-btn{margin-top:16px}.sa-table-caption{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:15px 2px;color:#a0aa94;font-size:10px}
.sa-nutrient-groups{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px}.sa-coverage{font:10px 'Segoe UI',sans-serif;color:#a0a88f}.sa-bank-note{font-size:10px;color:#a3a991;margin:10px 2px 17px}.sa-database-banner{background:#edf3e7;border:1px solid #dee7d4;border-radius:18px;padding:22px 26px;margin-bottom:23px;display:flex;align-items:center;gap:18px}.sa-database-banner > svg{width:36px;height:36px;color:#8aab73}.sa-database-banner h2{font-size:18px;margin:0;color:#627a51}.sa-database-banner p{font-size:11px;color:#8b9a7f;margin:4px 0 0}.sa-database-count{margin-inline-start:auto;font:700 35px 'Segoe UI',sans-serif;color:#829c6b}.sa-database-count small{display:block;font:10px var(--font);text-align:center;color:#9cac8f}
.sa-method{max-width:940px;margin:auto}.sa-method .sa-panel{margin-bottom:18px}.sa-method p,.sa-method li{font-size:12px;color:#8a9680;line-height:2.3}.sa-method h2{color:#677d55}.sa-equation{padding:19px;border:1px solid #e4e7d8;border-radius:13px;background:#f5f7ed;text-align:center;font-size:13px;line-height:2.5;color:#81966a;margin:20px 0}.sa-details{margin-top:15px;border-top:1px solid #e8ecdf;padding-top:12px}.sa-details summary{cursor:pointer;color:#7d9169;font-size:11px}
.sa-notice{position:fixed;bottom:23px;left:23px;z-index:1000;max-width:min(480px,90vw);border:1px solid #e2e7d8;border-radius:13px;background:#fffefa;box-shadow:0 10px 40px #33452b21;padding:15px 21px;font-size:12px;color:#6c805b;white-space:pre-line}.sa-notice.error{background:#fff5ed;color:#a56343;border-color:#eed7c2}
.sa-dialog{border:1px solid #e5e6d9;border-radius:23px;padding:0;max-width:600px;width:calc(100% - 32px);max-height:90vh;color:#4f6147;background:#fffefa;box-shadow:0 30px 110px #26382040}.sa-dialog::backdrop{background:#26332577;backdrop-filter:blur(3px)}.sa-dialog-body{padding:27px}.sa-dialog h2{font-size:19px;margin:0 0 6px}.sa-dialog p{font-size:11px;color:#95a088;margin:3px 0 18px}.sa-dialog label{display:grid;gap:6px;font-size:11px;color:#7d8d70;margin-top:16px}.sa-dialog input{width:100%;padding:11px 13px;border:1px solid #dfe6d5;background:#fafcf5;border-radius:11px;font-size:12px;color:#5a6e4a;outline:none}.sa-dialog-actions{display:flex;gap:9px;margin-top:24px}.sa-dialog-actions .sa-btn{flex:1}.sa-dialog-food{font-size:12px;color:#9caa90;direction:ltr;margin-top:7px}.sa-dialog-error{font-size:11px;color:#b16c45;min-height:20px;margin-top:10px}.sa-loading{padding:90px 20px;text-align:center;color:#9aa58e}.sa-ffq-header{max-width:600px;margin:15px auto 0;padding:0 16px;display:flex;justify-content:space-between;gap:10px}.sa-ffq-header .sa-btn{font-family:var(--font);font-size:11px}
@media(min-width:1600px){.sa-main{padding-top:40px}.sa-hero{min-height:260px}.sa-hero h2{font-size:32px}.sa-hero-art{width:280px}}
@media(max-width:1150px){.sa-sidebar{width:210px;padding:27px 14px}.sa-topbar{padding-inline:25px}.sa-main{padding-inline:25px}.sa-footer{padding-inline:25px}.sa-db-ready{display:none}.sa-hero{padding:25px}.sa-hero-art{width:170px}.sa-hero-art:after{width:190px;height:190px}.sa-hero-art:before{width:145px;height:145px}.sa-hero h2{font-size:24px}.sa-stat{padding:14px}.sa-chart-row{gap:17px}.sa-donut{width:115px;height:115px}.sa-donut-inner{width:87px;height:87px}.sa-stat-value{font-size:27px}}
@media(max-width:850px){.sa-sidebar{width:178px;padding:22px 11px}.sa-brand{font-size:24px;gap:8px;margin-bottom:30px}.sa-brand-mark{width:39px;height:46px}.sa-brand-en{font-size:8px}.sa-nav button{font-size:11px;padding:12px;gap:8px}.sa-questionnaire{padding:13px 8px;grid-template-columns:20px 1fr}.sa-questionnaire b{font-size:10px}.sa-questionnaire small{font-size:8px}.sa-go{display:none}.sa-main{padding:23px 19px}.sa-topbar{padding-inline:19px}.sa-columns{grid-template-columns:1fr}.sa-hero-art{width:115px}.sa-hero-art>svg{width:110px;height:110px}.sa-hero-art:before{width:120px;height:120px}.sa-hero-art:after{width:155px;height:155px}.sa-floating-food{display:none!important}.sa-hero h2{font-size:21px}.sa-hero{padding:23px 20px}.sa-stats{grid-template-columns:repeat(2,1fr)}.sa-hero p{font-size:11px}.sa-stat-value{margin:4px 0}.sa-person-actions{flex-wrap:wrap}.sa-footer{font-size:9px}.sa-side-bottom{font-size:10px}}
@media(max-width:600px){.sa{display:block}.sa-sidebar{width:100%;height:auto;position:static;border:0;border-bottom:1px solid var(--sa-line);padding:14px 17px 0;background:#fffefa;display:block}.sa-brand{font-size:23px;margin:0 0 12px;gap:10px}.sa-brand-mark{width:32px;height:39px;border-radius:12px}.sa-brand-mark svg{width:28px;height:32px}.sa-brand-en{font-size:8px;line-height:1.3}.sa-side-label,.sa-side-divider,.sa-side-bottom,.sa-questionnaire{display:none}.sa-nav{display:flex;gap:4px;overflow-x:auto;padding-bottom:10px}.sa-nav button{padding:8px 11px;font-size:10px;gap:6px;flex:none}.sa-nav button svg{width:17px;height:17px}.sa-nav button.active:after{display:none}.sa-topbar{height:86px;padding:16px 18px;background:transparent;border:0;gap:8px}.sa-topbar h1{font-size:19px}.sa-top-actions{gap:6px}.sa-top-actions>.sa-btn{padding:8px 10px;font-size:10px}.sa-top-actions .sa-help{padding:7px}.sa-breadcrumb{font-size:9px;gap:8px}.sa-main{padding:7px 16px 20px}.sa-hero{padding:21px 18px;min-height:220px;border-radius:18px;margin-bottom:22px;gap:7px}.sa-hero-art{width:85px}.sa-hero-art>svg{width:98px;height:98px}.sa-hero-art:before{width:100px;height:100px}.sa-hero-art:after{width:128px;height:128px}.sa-kicker{font-size:8px}.sa-hero h2{font-size:20px;line-height:1.8;letter-spacing:-.8px}.sa-hero p{font-size:10px;line-height:2.1;margin-bottom:14px}.sa-hero-actions{gap:6px}.sa-hero-actions .sa-btn{font-size:9px;padding:8px 10px;gap:5px}.sa-hero-actions .sa-btn svg{width:16px;height:16px}.sa-section-heading h2{font-size:13px}.sa-section-heading .sa-hint{font-size:8px}.sa-stats{gap:10px;margin-bottom:20px}.sa-stat{border-radius:14px;padding:12px}.sa-stat-head{font-size:10px;gap:7px}.sa-stat-icon{width:27px;height:27px;border-radius:8px}.sa-stat-icon svg{width:17px;height:17px}.sa-stat-value{font-size:26px}.sa-stat-value small{font-size:8px}.sa-stat-foot{font-size:8px}.sa-panel{padding:19px;border-radius:16px}.sa-panel h2{font-size:13px}.sa-columns{gap:15px}.sa-dropzone{padding:18px 10px}.sa-personbar{padding:12px;margin-bottom:15px}.sa-person-info{width:100%}.sa-select{font-size:11px;max-width:240px}.sa-person-actions{width:100%;justify-content:flex-end}.sa-person-actions .sa-btn{font-size:10px}.sa-warning{font-size:10px;flex-wrap:wrap}.sa-warning .sa-btn{font-size:9px}.sa-chart-row{justify-content:center}.sa-footer{padding:0 19px 22px;font-size:8px;display:block}.sa-footer span{display:block}.sa-search{min-width:0;max-width:none}.sa-database-banner{padding:17px;gap:10px}.sa-database-banner h2{font-size:15px}.sa-database-banner p{font-size:9px}.sa-database-count{font-size:25px}.sa-database-count small{font-size:8px}.sa-table td{padding:11px}.sa-table th{padding:10px}.sa-bank-note{font-size:9px}.sa-info-strip{font-size:10px}.sa-info-strip svg{width:17px;height:17px}.sa-method p,.sa-method li{font-size:11px}.sa-equation{font-size:11px}.sa-dialog-body{padding:22px}.sa-notice{bottom:15px;left:15px;font-size:11px}.sa-ffq-header .sa-btn{font-size:10px;padding:9px 10px}}
@media(prefers-reduced-motion:reduce){.sa *, .sa *:before,.sa *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{.sa-sidebar,.sa-top-actions,.sa-person-actions,.sa-footer,.sa-dialog,.sa-notice{display:none!important}.sa,.sa-workspace{display:block}.sa-topbar{height:auto;padding:15px;border:0}.sa-main{padding:0}.sa-panel,.sa-stat{break-inside:avoid}.sa-table-wrap{max-height:none;overflow:visible}.sa{background:white}}

.sa-floating-food>svg{width:100%;height:100%}
@media(max-width:600px){.sa-sidebar{position:relative}.sa .sa-questionnaire{display:flex;align-items:center;gap:6px;position:absolute;top:17px;left:17px;padding:7px 9px;border-radius:10px}.sa-questionnaire small{display:none}.sa-questionnaire svg{width:16px;height:16px}.sa-questionnaire b{font-size:9px}.sa-questionnaire .sa-go{display:none}}
.sa-aggregate-note{margin-bottom:20px}.sa-members{margin-bottom:22px}

.sa .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* وضعیت ثبت روی سرور */
.srv-status{margin:10px auto 6px;padding:10px 14px;border-radius:14px;font-size:.92rem;line-height:1.7;text-align:center;max-width:520px;background:rgba(255,255,255,.7);color:#5b4a2e}
.srv-status:empty{display:none}
.srv-status.ok{background:#e6f7ec;color:#14683a}
.srv-status.err{background:#fff0e0;color:#9a4a00}
.srv-status.busy{background:#fff7e0;color:#7a5a00}

/* ورود با گوگل */
.auth-gate{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(40,30,10,.45);backdrop-filter:blur(4px);font-family:inherit}
.auth-gate[hidden]{display:none}
.auth-card{position:relative;width:100%;max-width:400px;background:#fff;border-radius:26px;box-shadow:0 18px 50px rgba(120,90,20,.18);padding:32px 24px;text-align:center}
.auth-logo{width:64px;height:64px;margin:0 auto 6px;color:#ff9f1c}
.auth-logo svg{width:100%;height:100%}
.auth-card h1{margin:0 0 8px;font-size:1.7rem;color:#3b2f17}
.auth-sub{margin:0 0 18px;line-height:1.9;color:#6b5a3a;font-size:.95rem}
.auth-gbtn{display:flex;justify-content:center;min-height:44px}
.auth-err{margin:14px 0 0;padding:10px 12px;border-radius:12px;background:#fff0e0;color:#9a4a00;font-size:.9rem;line-height:1.7}
.auth-btn{margin-top:10px;padding:10px 20px;border:0;border-radius:14px;background:#ff9f1c;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.auth-chip{position:fixed;left:10px;bottom:10px;z-index:900;display:flex;align-items:center;gap:8px;max-width:calc(100vw - 20px);padding:5px 6px 5px 12px;border-radius:999px;background:rgba(255,255,255,.92);box-shadow:0 4px 16px rgba(0,0,0,.12);font-size:.74rem;color:#5b4a2e;backdrop-filter:blur(6px)}
.auth-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:46vw}
.auth-chip button{border:0;border-radius:999px;padding:5px 12px;background:#ffe9c4;color:#7a4a00;font:inherit;font-weight:700;cursor:pointer}

.auth-close{position:absolute;top:10px;left:12px;width:34px;height:34px;border:0;border-radius:50%;background:#f4efe4;color:#6b5a3a;font-size:1.4rem;line-height:1;cursor:pointer}


/* اطلاعات تکمیلی اختیاری در صفحهٔ شروع پرسشنامه (مینیمال) */
.more{margin:2px 0;border:1px solid var(--line);border-radius:16px;background:transparent;transition:border-color .2s,box-shadow .2s}
.more[open]{border-color:var(--accent);box-shadow:0 6px 22px var(--accent-s)}
.more>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;padding:13px 16px;font-weight:700;font-size:.92rem;user-select:none}
.more>summary::-webkit-details-marker{display:none}
.more>summary::after{content:"";width:7px;height:7px;margin-inline-start:auto;margin-top:-3px;border-inline-end:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .2s;flex:none}
.more[open]>summary::after{transform:rotate(-135deg);margin-top:3px}
.more>summary em{font-style:normal;color:var(--muted);font-weight:400;font-size:.78rem}
.more-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;padding:2px 16px 4px}
.more-h{grid-column:1/-1;margin:10px 0 0;display:flex;align-items:center;gap:8px;font-size:.72rem;font-weight:700;color:var(--muted);letter-spacing:.2px}
.more-h:first-child{margin-top:0}
.more-h::after{content:"";flex:1;height:1px;background:var(--line)}
.more-grid .field{grid-column:span 3;gap:3px;font-size:.78rem;font-weight:600;color:var(--muted)}
.more-grid .field em{font-size:.7rem}
.more-grid .field.f2{grid-column:span 2}
.more-grid .field.f6{grid-column:span 6}
.more-grid .field input,.more-grid .field select{width:100%;box-sizing:border-box;border:1.5px solid var(--line);background:transparent;color:var(--ink);border-radius:11px;padding:9px 11px;font:inherit;font-size:.92rem;font-weight:400;outline:none;transition:border-color .2s,box-shadow .2s}
.more-grid .field input::placeholder{color:var(--muted);opacity:.55;font-size:.82rem}
.more-grid .field input:focus,.more-grid .field select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-s)}
.field select option{color:#222;background:#fff}
.more-note{margin:8px 16px 14px;font-size:.72rem;color:var(--muted);line-height:1.8}
@media (max-width:520px){.more-grid .field{grid-column:span 6}.more-grid .field.f2{grid-column:span 2}}

.ref-note{margin:12px 0 0;padding:10px 14px;border-radius:14px;background:#fff4e0;color:#7a5a1a;font-size:.82rem;line-height:1.9;text-align:center}
.ref-note[hidden]{display:none}

.sa-nav[hidden]{display:none}
.sa-nav-admin{margin-top:8px}
