/* Conquistas: painel de vidro no estilo do Painel de Controle do Windows Vista */
.ach-board,.ach-gallery-root{--ach-ink:#173f5a;--ach-soft:#4b6c80;--ach-line:#a9c9dc;--ach-glass:linear-gradient(#ffffffeb,#eef8fdd9);
  --bronze-a:#f7d9b8;--bronze-b:#c98546;--bronze-c:#8d5325;--prata-a:#f4f8fb;--prata-b:#aebdca;--prata-c:#61727f;--ouro-a:#fff4bf;--ouro-b:#e2b52f;--ouro-c:#8a6508;
  text-align:left;font:14px/1.45 'Segoe UI',Tahoma,Arial,sans-serif;color:var(--ach-ink)}
.ach-shell{position:relative;border:1px solid #7fa9c2;border-radius:10px;background:linear-gradient(#f7fcffee,#dff1fbe6);box-shadow:0 8px 26px #0b3b5c2e,inset 0 1px #fff,inset 0 0 0 1px #ffffff80;overflow:hidden}
/* cabeçalho */
.ach-head{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:14px 18px;border-bottom:1px solid #9fc4d9;background:linear-gradient(#fdfeff,#e3f3fc 48%,#cfe9f7 50%,#e9f7fe)}
.ach-head-icon{width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 2px 3px #0003)}
.ach-head h3{margin:0;font:600 20px/1.2 'Segoe UI',Tahoma,sans-serif;color:#0f4a73;text-shadow:0 1px #fff}
.ach-head .achievement-note{margin:3px 0 0;padding:0;font-size:12.5px;color:var(--ach-soft);text-align:left}
.ach-meter{display:grid;gap:5px;min-width:210px;justify-items:end}
.ach-meter-count{font:700 15px 'Segoe UI',sans-serif;color:#0f4a73}
.ach-meter-bar{position:relative;width:100%;height:16px;border:1px solid #6e9bb4;border-radius:4px;background:linear-gradient(#e6eef3,#fdfeff);box-shadow:inset 0 1px 3px #0b3b5c33;overflow:hidden}
.ach-meter-bar i{display:block;height:100%;min-width:2px;background:linear-gradient(#d4f7b0,#86d64a 45%,#4fae1f 50%,#8fdc55);box-shadow:inset 0 1px #ffffffb0;transition:width .6s ease}
.ach-meter-bar i::after{content:"";display:block;height:100%;background:linear-gradient(90deg,transparent,#ffffff8c,transparent);background-size:60px 100%;background-repeat:no-repeat;animation:ach-shine 2.6s linear infinite}
@keyframes ach-shine{from{background-position:-60px 0}to{background-position:calc(100% + 60px) 0}}
.ach-tiers{display:flex;gap:6px;margin:0;padding:0;list-style:none;font-size:11.5px;color:var(--ach-soft)}
.ach-tiers li{padding:1px 8px;border-radius:9px;border:1px solid var(--line,#c6d7e1);background:linear-gradient(#fff,var(--bg,#eef4f7))}
.ach-tiers li b{color:var(--ach-ink)}
.ach-tiers [data-tier=ouro]{--line:var(--ouro-b);--bg:var(--ouro-a)}
.ach-tiers [data-tier=prata]{--line:var(--prata-b);--bg:#e6edf2}
.ach-tiers [data-tier=bronze]{--line:var(--bronze-b);--bg:var(--bronze-a)}
/* corpo: menu lateral + lista rolável */
.ach-body{display:grid;grid-template-columns:200px minmax(0,1fr);min-height:0}
.ach-side,.ach-scroll,.ach-card,.ach-row-info{min-width:0}
.ach-side{padding:12px 10px;border-right:1px solid #b9d5e5;background:linear-gradient(90deg,#e4f2fb,#f2f9fd)}
.ach-side-title{margin:4px 6px 6px;font:600 11px 'Segoe UI',sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#3d7196}
.ach-side-title:not(:first-child){margin-top:14px}
.ach-cats{display:grid;gap:2px}
.ach-cat{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border:1px solid transparent;border-radius:4px;background:none;color:#1a5584;font:13px 'Segoe UI',Tahoma,sans-serif;text-align:left;cursor:pointer}
.ach-cat:hover{border-color:#a8d8f4;background:linear-gradient(#f5fbff,#dcf1fd)}
.ach-cat[aria-pressed=true]{border-color:#7cc0e8;background:linear-gradient(#e8f6fe,#c4e6fa);box-shadow:inset 0 1px #fff;color:#0b3a5c;font-weight:600}
.ach-cat-icon{width:20px;height:20px;object-fit:contain;flex:none}
.ach-cat-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ach-cat-count{font-size:11px;color:var(--ach-soft)}
.ach-show{display:flex;border:1px solid #8fb4ca;border-radius:5px;overflow:hidden;margin:0 4px}
.ach-show button{flex:1;padding:5px 4px;border:0;border-left:1px solid #8fb4ca;background:linear-gradient(#fff,#e8f4fb 48%,#d3e9f6 50%,#eff8fd);color:#18486a;font:12px 'Segoe UI',sans-serif;cursor:pointer}
.ach-show button:first-child{border-left:0}
.ach-show button[aria-pressed=true]{background:linear-gradient(#d9f1ff,#9fd5f3 48%,#6cbde9 50%,#b3e2f8);color:#07314f;font-weight:600}
.ach-side-note{margin:14px 6px 0;font-size:12px;color:var(--ach-soft)}
/* sub-painel rolável com barra de rolagem de vidro */
.ach-scroll{max-height:560px;overflow-y:auto;overscroll-behavior:contain;padding:14px;background:linear-gradient(#ffffffa6,#f3faffa6);scrollbar-width:thin;scrollbar-color:#7fb8da #e3f1f9}
.ach-scroll:focus-visible{outline:3px solid #2a8fd0;outline-offset:-3px}
.ach-scroll::-webkit-scrollbar{width:14px}
.ach-scroll::-webkit-scrollbar-track{background:linear-gradient(90deg,#dcebf4,#f6fbfe);border-left:1px solid #c3dbe9}
.ach-scroll::-webkit-scrollbar-thumb{border:1px solid #5d9cc3;border-radius:7px;background:linear-gradient(90deg,#eaf7ff,#b4dcf3 45%,#7cc1e8 55%,#cdebfb);box-shadow:inset 0 1px #fff}
.ach-scroll::-webkit-scrollbar-thumb:hover{background:linear-gradient(90deg,#f2fbff,#9fd6f5 45%,#4fb0e6 55%,#bde6fb)}
.ach-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:12px;align-items:start}
.ach-empty{grid-column:1/-1;margin:24px 0;text-align:center;color:var(--ach-soft);font-style:italic}
/* cartões por nível */
.ach-card{--t-a:#fff;--t-b:#bcd3e0;--t-c:#5f7f92;position:relative;display:grid;gap:7px;padding:12px;border:1px solid var(--t-b);border-radius:9px;background:var(--ach-glass);box-shadow:0 2px 6px #0b3b5c14,inset 0 1px #fff;transition:transform .15s,box-shadow .15s}
.ach-card:hover{transform:translateY(-1px);box-shadow:0 5px 14px #0b3b5c24,inset 0 1px #fff}
.ach-card[data-tier=bronze]{--t-a:var(--bronze-a);--t-b:var(--bronze-b);--t-c:var(--bronze-c)}
.ach-card[data-tier=prata]{--t-a:var(--prata-a);--t-b:var(--prata-b);--t-c:var(--prata-c)}
.ach-card[data-tier=ouro]{--t-a:var(--ouro-a);--t-b:var(--ouro-b);--t-c:var(--ouro-c)}
.ach-card.ach-unlocked{border-width:2px;padding:11px;background:linear-gradient(160deg,#fffffff2,var(--t-a) 130%);box-shadow:0 3px 10px #0b3b5c1f,inset 0 1px #fff,inset 0 0 0 1px #ffffffa0}
.ach-card.ach-unlocked::before{content:"";position:absolute;inset:0 0 55% 0;border-radius:8px 8px 40% 40%/8px 8px 18px 18px;background:linear-gradient(#ffffffb8,#ffffff00);pointer-events:none}
.ach-card-top{position:relative;display:flex;gap:10px;align-items:center}
.ach-medal{display:grid;place-items:center;flex:none;width:48px;height:48px;border-radius:50%;border:1px solid var(--t-b);background:radial-gradient(circle at 35% 30%,#fff,var(--t-a) 60%,var(--t-b));box-shadow:inset 0 -3px 6px #0000001a,0 2px 4px #0b3b5c26}
.ach-medal img{width:34px;height:34px;object-fit:contain;image-rendering:pixelated}
.ach-card-head{min-width:0}
.ach-card h4{margin:2px 0 0;font:600 15.5px/1.25 'Segoe UI',Tahoma,sans-serif;color:var(--ach-ink);overflow-wrap:anywhere}
.ach-tier{display:inline-block;padding:1px 7px;border-radius:8px;border:1px solid var(--t-b);background:linear-gradient(#fff,var(--t-a));font:700 10px/1.5 'Segoe UI',sans-serif;letter-spacing:.05em;text-transform:uppercase;color:var(--t-c)}
.ach-desc{margin:0;font-size:12.5px;color:#34566b}
.ach-progress{display:flex;align-items:center;gap:8px}
.ach-progress progress{flex:1;height:10px;-webkit-appearance:none;appearance:none;border:1px solid #9dbfd2;border-radius:5px;background:#e4f0f6;overflow:hidden}
.ach-progress progress::-webkit-progress-bar{background:#e4f0f6}
.ach-progress progress::-webkit-progress-value{background:linear-gradient(#c7f39d,#78c93f 48%,#55ad29 50%,#9adf66)}
.ach-progress progress::-moz-progress-bar{background:linear-gradient(#c7f39d,#78c93f 48%,#55ad29 50%,#9adf66)}
.ach-progress small{font-size:11px;color:var(--ach-soft);white-space:nowrap}
.ach-date{font-size:11.5px;color:#2e6d1d}
.ach-rarity{font-size:11.5px;color:var(--ach-soft)}
/* bloqueadas em cinza; secretas apagadas com estrela */
.ach-locked .ach-medal img{filter:grayscale(1) opacity(.55)}
.ach-locked h4{color:#4c6474}
.ach-secret{border-style:dashed;background:linear-gradient(#f4f7f9e6,#e6edf2e6)}
.ach-secret .ach-medal{background:radial-gradient(circle at 35% 30%,#fff,#dde6ec 60%,#b9c7d1)}
.ach-secret .ach-medal img{filter:grayscale(.3) brightness(1.05);opacity:.75}
.ach-secret h4{color:#5d6f7b;letter-spacing:.02em}
.ach-secret .ach-desc{font-style:italic;color:#627786}
/* ações e quem já tem */
.ach-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.ach-who,.ach-diploma,.ach-more,.ach-holder{font:600 12px 'Segoe UI',Tahoma,sans-serif;cursor:pointer}
.ach-who,.ach-more{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border:1px solid #6c9dbb;border-radius:4px;background:linear-gradient(#fff,#e7f4fc 48%,#cde7f6 50%,#eef8fe);box-shadow:inset 0 1px #fff;color:#18486a}
.ach-who:hover,.ach-more:hover{background:linear-gradient(#f4fdff,#bfe8fd 48%,#7dc9ef 50%,#c6ecfc)}
.ach-who[aria-expanded=true]{background:linear-gradient(#d9f1ff,#a8d9f4 48%,#7cc4ec 50%,#c3e9fb);color:#07314f}
.ach-who img{width:16px;height:16px}
.ach-diploma{padding:5px 10px;border:1px solid #a88a3d;border-radius:4px;background:linear-gradient(#fffbea,#f3e3a7 48%,#e3cc7a 50%,#f7ecc0);box-shadow:inset 0 1px #fff;color:#5a4214}
.ach-diploma:hover{background:linear-gradient(#fffdf2,#f7e6a3 48%,#e7c85a 50%,#faeeb9)}
.ach-holders{padding:8px;border:1px solid #c3dbe9;border-radius:7px;background:#ffffffc9;box-shadow:inset 0 1px 3px #0b3b5c14}
.ach-holder-list{display:flex;flex-wrap:wrap;gap:6px}
.ach-holder{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:3px 9px 3px 3px;border:1px solid #b9d4e4;border-radius:18px;background:linear-gradient(#fff,#eaf5fc);color:var(--ach-ink);text-align:left}
button.ach-holder:hover{border-color:#6fb5e0;background:linear-gradient(#f5fcff,#cdeafb)}
.ach-holder-text{display:grid;min-width:0;line-height:1.15}
.ach-holder-text b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px}
.ach-holder-text small{font:400 10.5px 'Segoe UI',sans-serif;color:var(--ach-soft)}
.ach-avatar{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;overflow:hidden;border:1px solid #9cc5dd;background:radial-gradient(circle at 40% 30%,#fff,#cbeaf9)}
.ach-avatar canvas{width:28px;height:35px;margin-top:4px}
.ach-avatar-letter{font:700 13px 'Segoe UI',sans-serif;color:#1d628e}
.ach-holders-empty{margin:0;font-size:12px;color:var(--ach-soft);font-style:italic}
.ach-more{margin-top:8px}
/* galeria */
.ach-gallery .ach-head{grid-template-columns:auto 1fr}
.ach-collectors{padding:10px 16px 12px;border-bottom:1px solid #b9d5e5;background:linear-gradient(#f3faff,#e6f3fb)}
.ach-collector-list{display:flex;gap:8px;margin:0;padding:2px 0 4px;list-style:none;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#7fb8da transparent}
.ach-collector-list li{display:flex;align-items:center;gap:5px;flex:none;padding:4px 10px 4px 6px;border:1px solid #b9d4e4;border-radius:20px;background:#ffffffd0}
.ach-collector-list li[data-place="1"]{border-color:var(--ouro-b);background:linear-gradient(#fffdf0,var(--ouro-a))}
.ach-collector-list li[data-place="2"]{border-color:var(--prata-b);background:linear-gradient(#fff,#e9eff3)}
.ach-collector-list li[data-place="3"]{border-color:var(--bronze-b);background:linear-gradient(#fffaf4,var(--bronze-a))}
.ach-collector-list .ach-holder{border:0;background:none;padding:0}
.ach-place{font:700 12px 'Segoe UI',sans-serif;color:#3d7196}
.ach-collector-count{font-size:11.5px;color:var(--ach-soft);white-space:nowrap}
.ach-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid #c7dde9;background:#f7fbfe}
.ach-cats-row{display:flex;flex-wrap:wrap;gap:4px}
.ach-cats-row .ach-cat{width:auto;padding:4px 9px;border-color:#c3dbe9;border-radius:14px;background:linear-gradient(#fff,#edf6fb)}
.ach-cats-row .ach-cat[aria-pressed=true]{border-color:#5fb1e2;background:linear-gradient(#e8f6fe,#bfe4fa);color:#0b3a5c;font-weight:600}
.ach-sort{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ach-soft)}
.ach-sort select{font:13px 'Segoe UI',sans-serif;padding:4px 8px;border:1px solid #8fb4ca;border-radius:4px;background:linear-gradient(#fff,#e9f4fa);color:var(--ach-ink)}
.ach-rows{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.ach-row{--t-a:#fff;--t-b:#bcd3e0;--t-c:#5f7f92;display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start;padding:10px 12px;border:1px solid var(--t-b);border-left-width:4px;border-radius:8px;background:var(--ach-glass);box-shadow:inset 0 1px #fff}
.ach-row[data-tier=bronze]{--t-a:var(--bronze-a);--t-b:var(--bronze-b);--t-c:var(--bronze-c)}
.ach-row[data-tier=prata]{--t-a:var(--prata-a);--t-b:var(--prata-b);--t-c:var(--prata-c)}
.ach-row[data-tier=ouro]{--t-a:var(--ouro-a);--t-b:var(--ouro-b);--t-c:var(--ouro-c)}
.ach-row .ach-medal{width:42px;height:42px}
.ach-row .ach-medal img{width:30px;height:30px}
.ach-row.ach-secret .ach-medal img{filter:grayscale(.3);opacity:.75}
.ach-row-info{display:grid;gap:5px;min-width:0}
.ach-row-title{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.ach-row-title b{font:600 15px 'Segoe UI',sans-serif;color:var(--ach-ink)}
.ach-tier-pill,.ach-mine-pill{padding:0 7px;border-radius:8px;font:700 10px/1.6 'Segoe UI',sans-serif;letter-spacing:.04em;text-transform:uppercase}
.ach-tier-pill{border:1px solid var(--t-b);background:linear-gradient(#fff,var(--t-a));color:var(--t-c)}
.ach-mine-pill{border:1px solid #6aad3d;background:linear-gradient(#f2ffe6,#c9eea6);color:#2c5d12}
.ach-rarity-line{display:flex;align-items:center;gap:8px}
.ach-rarity-bar{flex:0 1 180px;height:8px;border:1px solid #9dbfd2;border-radius:4px;background:#e4f0f6;overflow:hidden}
.ach-rarity-bar i{display:block;height:100%;background:linear-gradient(#bfe6ff,#4aa9e0 50%,#2d8fcd 51%,#8fd0f5)}
.ach-rarity-line small{font-size:11.5px;color:var(--ach-soft)}
.ach-faces{display:inline-flex}
.ach-faces .ach-avatar{width:24px;height:24px;margin-left:-6px;border-color:#fff;box-shadow:0 0 0 1px #9cc5dd}
.ach-faces .ach-avatar:first-child{margin-left:0}
.ach-faces .ach-avatar canvas{width:24px;height:30px}
/* perfil de outra pessoa (aba Perfis dos leitores e praça) */
.user-achievements{margin:18px 0;padding:16px;border:1px solid #9fc4d9;border-radius:10px;background:linear-gradient(#f9fdffee,#e4f3fbe6);box-shadow:0 4px 14px #0b3b5c1c,inset 0 1px #fff;color:#173f5a;text-align:left;font:14px/1.45 'Segoe UI',Tahoma,Arial,sans-serif}
.user-achievements h3{margin:0 0 4px;font:600 19px 'Segoe UI',sans-serif;color:#0f4a73}
.user-achievements .ua-status{margin:0 0 8px;font-size:13px;color:#4b6c80}
.user-achievements .ach-meter-bar{margin-bottom:10px;height:12px}
.user-achievements .ach-scroll-small{max-height:380px;padding:10px;border:1px solid #c3dbe9;border-radius:8px}
.user-achievements .ua-retry{padding:8px 12px;border:1px solid #7aa2b6;border-radius:5px;background:linear-gradient(#fff,#e0f2ff 48%,#b6dced 50%,#f3fcff);color:#204c62;font:600 13px 'Segoe UI',Arial;cursor:pointer}
.ach-board :focus-visible,.ach-gallery-root :focus-visible,.user-achievements :focus-visible{outline:3px solid #177fae;outline-offset:2px}
@media (prefers-reduced-motion:reduce){.ach-meter-bar i::after{animation:none}.ach-card{transition:none}.ach-card:hover{transform:none}}
/* celular: categorias viram fichas roláveis no topo */
@media(max-width:700px){
  .ach-head{grid-template-columns:auto 1fr;padding:12px}
  .ach-meter{grid-column:1/-1;justify-items:stretch;min-width:0}
  .ach-meter-count{justify-self:start}
  .ach-body{grid-template-columns:minmax(0,1fr)}
  .ach-side{border-right:0;border-bottom:1px solid #b9d5e5;padding:8px 10px;background:linear-gradient(#eaf5fc,#f4fafe)}
  .ach-side .ach-side-title,.ach-side-note{display:none}
  .ach-side .ach-cats{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}
  .ach-side .ach-cat{flex:none;width:auto;padding:5px 10px;border-color:#c3dbe9;border-radius:14px;background:linear-gradient(#fff,#edf6fb)}
  .ach-side .ach-cat[aria-pressed=true]{border-color:#5fb1e2;background:linear-gradient(#e8f6fe,#bfe4fa)}
  .ach-side .ach-show{margin:4px 0 0}
  .ach-scroll{max-height:65vh;padding:10px}
  .ach-grid{grid-template-columns:minmax(0,1fr)}
  .ach-tools{padding:8px 10px}
  .ach-cats-row{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:4px}
  .ach-cats-row .ach-cat{flex:none}
  .ach-row{padding:9px;gap:9px}
  .ach-holder-text b{max-width:100px}
}
