/* style.css — tema baseado nas ilustrações: brasa carmesim, ouro, ametista e azul-gelo */

:root {
    --ink: #14080f;
    --wine: #2a0f1c;
    --plum: #2c1850;
    --ember: #e23a2e;
    --crimson: #a3121f;
    --amber: #e8872c;
    --gold: #f2b84b;
    --rose: #e0557f;
    --ice: #8fd6e6;
    --parchment: #f4efe6;
    --muted: #cba9b4;

    --panel: rgba(24, 9, 20, 0.8);
    --line: rgba(242, 184, 75, 0.28);

    --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
    --font-body: "Alegreya Sans", "Segoe UI", Tahoma, Verdana, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html {
    -webkit-text-size-adjust: 100%;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* Edge antigo */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;                /* Chrome, Safari, Edge */
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--parchment);
    min-height: 100dvh;
    background-color: var(--ink);
   
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(20, 8, 15, 0.35), rgba(20, 8, 15, 0.8)),
        url("assets/bg.png") center / contain no-repeat;
    background-color: var(--ink);
    transform: translateZ(0);
}

/* grão de tinta, como nas ilustrações */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
    z-index: 50;
}

#embers {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Layout ---------- */
.app {
    position: relative;
    z-index: 1;
    width: min(100% - 28px, 1040px);
    margin: 0 auto;
    padding: calc(20px + env(safe-area-inset-top)) 0 calc(120px + env(safe-area-inset-bottom));
    display: grid;
    gap: 16px;
}

.top { display: flex; align-items: center; gap: 14px; }
.logo { width: 56px; height: 56px; object-fit: contain; mix-blend-mode: screen; flex: none; }

.top h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.5rem, 5.5vw, 2.4rem);
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--gold), var(--amber) 55%, var(--rose));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.top p { color: var(--muted); font-style: italic; }

.rail, .stage { display: grid; gap: 16px; align-content: start; min-width: 0; }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

@media (min-width: 880px) {
    body { padding-bottom: env(safe-area-inset-bottom); }
    .app {
        grid-template-columns: 340px 1fr;
        grid-template-areas: "top top" "rail stage";
        column-gap: 24px;
        padding: calc(32px + env(safe-area-inset-top)) 0 calc(32px + env(safe-area-inset-bottom));
    }
    .top { grid-area: top; }
    .rail { grid-area: rail; position: sticky; top: 24px; align-self: start; }
    .stage { grid-area: stage; }
}

/* ---------- Personagem ---------- */
.hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 6px 14px;
    padding: 16px;
}

.portrait {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from 200deg, var(--gold), var(--ember), var(--plum), var(--gold));
    box-shadow: 0 0 22px rgba(226, 58, 46, 0.45);
}

.portrait { position: relative; border: 0; cursor: pointer; }
.portrait:hover { filter: brightness(1.12); }
.cam {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1;
    border: 2px solid var(--ink);
}

.portrait img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid var(--ink);
}

.name-btn {
    all: unset;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--parchment);
    border-bottom: 1px dashed transparent;
}
.name-btn:hover { border-bottom-color: var(--gold); }
.name-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.rank { color: var(--gold); font-size: 0.95rem; }

/* Distintivo de nível em formato de balão de impacto (como o "NO!!" da arte) */
.burst {
    background: var(--parchment);
    color: var(--ink);
    display: grid;
    place-items: center;
    text-align: center;
    font-style: italic;
    font-weight: 800;
}

.level-badge {
    width: 78px;
    height: 78px;
    line-height: 1;
    padding-top: 4px;
    filter: drop-shadow(0 0 8px rgba(242, 184, 75, 0.55));
}
.level-badge small { font-size: 0.7rem; margin-bottom: -10px; }
.level-badge b { font-size: 1.9rem; }

.xp, .hp {
    grid-column: 1 / -1;
    position: relative;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 8px;
}

.xp-fill {
    width: 0;
    height: 100%;
    background-image: linear-gradient(90deg, var(--crimson), var(--ember), var(--amber), var(--gold), var(--ice), var(--gold));
    background-size: 300% 100%;
    animation: shimmer 9s linear infinite alternate;
    transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.xp-text, .hp-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.streak { grid-column: 1 / -1; font-size: 0.95rem; color: var(--muted); }
.streak strong { color: var(--gold); }

/* ---------- Dragão ---------- */
.boss {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    padding: 14px;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.boss-img {
    width: 112px;
    height: 112px;
    border-radius: 14px 40px 14px 14px;
    object-fit: cover;
    border: 1px solid var(--boss, var(--line));
    box-shadow: 0 0 18px color-mix(in srgb, var(--boss, transparent) 45%, transparent);
}

.boss-body { min-width: 0; }

.boss h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.2;
}

.hp { height: 20px; margin-top: 6px; background: rgba(0, 0, 0, 0.5); }
.hp-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, color-mix(in srgb, var(--boss, var(--ember)) 55%, #000), var(--boss, var(--ember)));
    transition: width 0.5s ease;
}
.hp.is-hit { animation: hit 0.4s; }

.boss-info { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }

/* ---------- Abas ---------- */
.tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px;
    background: rgba(20, 8, 15, 0.92);
    border-top: 1px solid var(--line);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    z-index: 20;
}

.tab {
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.tab.is-active {

    color: var(--parchment);
    box-shadow: inset 0 0 0 1px var(--line);
}

@media (min-width: 880px) {
    .tabs {
        position: static;
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 6px;
        background: var(--panel);
    }
}

.pane { display: grid; gap: 14px; align-content: start; }

/* ---------- Botões / campos ---------- */
.btn {
    font: inherit;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--parchment);
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.14); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--ember), var(--crimson));
    border-color: rgba(255, 190, 120, 0.5);
    box-shadow: 0 4px 16px rgba(226, 58, 46, 0.35);
}
.btn-primary:hover { background: linear-gradient(135deg, #f04a3a, var(--crimson)); }

.btn-danger { color: #ff9b9b; border-color: rgba(255, 120, 120, 0.4); }

input[type="text"], input[type="number"], input[type="date"], select, textarea {
    font: inherit;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--parchment);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}
input::placeholder, textarea::placeholder { color: rgba(203, 169, 180, 0.7); }
textarea { resize: vertical; }

.quick { display: grid; gap: 10px; padding: 14px; }

.diffs { border: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.diffs label { cursor: pointer; }
.diffs input { position: absolute; opacity: 0; pointer-events: none; }
.diffs span {
    display: grid;
    place-items: center;
    min-height: 52px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}
.diffs em { font-style: normal; color: var(--gold); font-size: 0.8rem; }
.diffs input:checked + span {
    background: linear-gradient(135deg, rgba(163, 18, 31, 0.8), rgba(44, 24, 80, 0.9));
    border-color: var(--gold);
}
.diffs input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.35);
    color: var(--muted);
    cursor: pointer;
}
.chip span { color: var(--gold); margin-left: 4px; }
.chip.is-active { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.chip.is-active span { color: var(--ink); }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Listas ---------- */
.list { list-style: none; display: grid; gap: 10px; }

.mission, .note {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 4px solid var(--tone, var(--amber));
    border-radius: 6px 16px 16px 6px;
}

.mission[data-diff="facil"]   { --tone: var(--ice); }
.mission[data-diff="media"]   { --tone: var(--amber); }
.mission[data-diff="dificil"] { --tone: var(--ember); }
.mission[data-diff="epica"]   { --tone: var(--rose); }

.mission.is-new { animation: slideIn 0.35s ease-out; }

.check {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--tone);
    background: transparent;
    color: var(--tone);
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.check:hover { background: color-mix(in srgb, var(--tone) 25%, transparent); transform: scale(1.06); }
.mission.is-done .check { background: var(--tone); color: var(--ink); cursor: default; }

.m-name { font-weight: 700; overflow-wrap: anywhere; }
.m-meta { font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.m-meta .xp-tag { color: var(--gold); font-weight: 700; }
.mission.is-done .m-name { text-decoration: line-through; text-decoration-color: var(--tone); opacity: 0.65; }

.x {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.3rem;
    border-radius: 10px;
    cursor: pointer;
}
.x:hover { color: #ff8b8b; background: rgba(255, 255, 255, 0.07); }

.note { --tone: var(--plum); grid-template-columns: 1fr auto; border-left-color: #6a4bb8; }
.n-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.n-date { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 16px;
    font-style: italic;
}

/* ---------- Foco ---------- */
.focus {
    display: grid;
    gap: 20px;
    padding: 22px;
    justify-items: center;
    text-align: center;
}
.focus-side { display: grid; gap: 12px; justify-items: center; }
.focus h2, .backup h2 { font-family: var(--font-display); font-size: 1.15rem; }

.ring { position: relative; width: 190px; height: 190px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: rgba(255, 255, 255, 0.1); }
.ring-fill {
    stroke: var(--ember);
    stroke-linecap: round;
    stroke-dasharray: 351.86;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.5s linear;
    filter: drop-shadow(0 0 6px rgba(226, 58, 46, 0.8));
}
.ring-time {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.3rem;
    font-variant-numeric: tabular-nums;
}
.focus.is-running .ring-fill { stroke: var(--gold); }

@media (min-width: 560px) {
    .focus { grid-template-columns: auto 1fr; justify-items: start; text-align: left; }
    .focus-side { justify-items: start; }
}

/* ---------- Conquistas ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 14px;
    text-align: center;
}
.stats dt { font-size: 0.78rem; color: var(--muted); }
.stats dd { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--gold); }
.stats div { display: grid; gap: 2px; }

.trophies { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.trophy {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
}
.trophy h3 { font-family: var(--font-display); font-size: 0.95rem; }
.trophy p { font-size: 0.88rem; color: var(--muted); }
.trophy.is-locked { opacity: 0.45; filter: grayscale(0.8); }
.trophy.is-won { border-color: var(--gold); background: linear-gradient(135deg, rgba(163, 18, 31, 0.45), rgba(44, 24, 80, 0.7)); }
.trophy .when { color: var(--gold); font-size: 0.78rem; }

.backup { padding: 16px; display: grid; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Bestiário ---------- */
.bestiary-wrap { padding: 16px; display: grid; gap: 10px; }
.bestiary-wrap h2 { font-family: var(--font-display); font-size: 1.15rem; }
.bestiary { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.beast {
    display: grid;
    gap: 2px;
    justify-items: center;
    text-align: center;
    padding: 8px 6px 10px;
    border-radius: 12px;
    border: 1px solid var(--boss);
    background: rgba(0, 0, 0, 0.35);
}
.beast img { width: 100%; max-width: 96px; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.beast b { font-family: var(--font-display); font-size: 0.85rem; }
.beast span { font-size: 0.8rem; color: var(--muted); }
.beast small { font-size: 0.75rem; color: var(--gold); }
.beast.is-unknown { border-color: var(--line); }
.beast.is-unknown img { filter: brightness(0) contrast(1.2); opacity: 0.55; }

/* ---------- Overlay (nível / dragão) ---------- */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(circle at 50% 40%, rgba(163, 18, 31, 0.55), rgba(10, 4, 8, 0.94));
}
.overlay-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 18px;
    border: 2px solid var(--gold);
    filter: grayscale(0.7) brightness(0.8);
    animation: pop 0.5s ease-out;
}
.overlay-card { display: grid; gap: 18px; justify-items: center; text-align: center; max-width: 420px; }
.overlay-burst {
    width: min(78vw, 320px);
    aspect-ratio: 1;
    font-size: clamp(1.4rem, 6.4vw, 2.1rem);
    padding: 24px;
    line-height: 1.05;
    animation: pop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1);
    filter: drop-shadow(0 0 24px rgba(242, 184, 75, 0.7));
}
#ovSub { font-size: 1.1rem; }

/* ---------- Toasts e XP flutuante ---------- */
.toasts {
    position: fixed;
    left: 50%;
    top: calc(env(safe-area-inset-top) + 104px);
    transform: translateX(-50%);
    display: grid;
    gap: 8px;
    z-index: 90;
    width: min(92vw, 380px);
    pointer-events: none;
}
.toast {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(20, 8, 15, 0.95);
    border: 1px solid var(--gold);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    animation: toast 3.2s forwards;
}
.toast b { color: var(--gold); }

.float {
    position: fixed;
    z-index: 95;
    pointer-events: none;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--gold);
    text-shadow: 0 0 10px var(--ember), 0 2px 4px #000;
    animation: floatUp 1.3s ease-out forwards;
}

/* ---------- Alerta de conquista ---------- */
.ach {
    position: fixed;
    z-index: 120;
    left: 50%;
    top: calc(env(safe-area-inset-top) + 12px);
    width: min(92vw, 400px);
    transform: translate(-50%, -140%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px 12px 12px;
    border-radius: 16px;
    background: linear-gradient(110deg, rgba(163, 18, 31, 0.97), rgba(44, 24, 80, 0.97));
    border: 1px solid var(--gold);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6), 0 0 26px rgba(242, 184, 75, 0.45);
    overflow: visible;
    pointer-events: none;
}
.ach::after {            /* brilho que atravessa o cartão */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 235, 180, 0.45) 50%, transparent 65%);
    background-size: 250% 100%;
    background-position: 130% 0;
    pointer-events: none;
}
.ach.is-showing { animation: achIn 3.8s cubic-bezier(0.2, 0.9, 0.3, 1.1) forwards; }
.ach.is-showing::after { animation: sweep 1.1s 0.5s ease-out; }
.ach-icon {
    width: 58px;
    height: 58px;
    flex: none;
    font-size: 1.6rem;
    color: var(--crimson);
    filter: drop-shadow(0 0 8px rgba(242, 184, 75, 0.9));
}
.ach.is-showing .ach-icon { animation: spinIn 0.8s 0.15s cubic-bezier(0.2, 1.3, 0.4, 1) backwards; }
.ach-text { display: grid; line-height: 1.2; min-width: 0; }
.ach-text small { color: var(--gold); font-size: 0.78rem; font-weight: 700; }
.ach-text b { font-family: var(--font-display); font-size: 1.1rem; }
.ach-text span { font-size: 0.88rem; color: var(--muted); }

.ach-sparks { position: absolute; left: 41px; top: 50%; width: 0; height: 0; }
.ach-sparks i {
    position: absolute;
    width: 6px;
    height: 6px;
    margin: -3px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px var(--amber);
    opacity: 0;
}
.ach.is-showing .ach-sparks i { animation: spark 0.9s ease-out; }

@keyframes achIn {
    0%   { transform: translate(-50%, -140%); }
    10%  { transform: translate(-50%, 0) scale(1.05); }
    14%  { transform: translate(-50%, 0) scale(1); }
    90%  { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, -140%); opacity: 0; }
}
@keyframes spinIn { from { transform: scale(0) rotate(-200deg); } }
@keyframes sweep { to { background-position: -30% 0; } }
@keyframes spark {
    0%   { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

/* ---------- Animações ---------- */
@keyframes shimmer { to { background-position: 100% 0; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-14px); } }
@keyframes pop { from { transform: scale(0.3) rotate(-12deg); opacity: 0; } }
@keyframes hit { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes toast {
    0% { opacity: 0; transform: translateY(-10px); }
    10%, 85% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}
@keyframes floatUp {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-60px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    #embers { display: none; }
}

@media (max-width: 420px) {
    .hero { grid-template-columns: auto 1fr; }
    .level-badge { position: absolute; right: 14px; top: 12px; width: 66px; height: 66px; }
    .hero { position: relative; }
    .boss { grid-template-columns: 88px 1fr; }
    .boss-img { width: 88px; height: 88px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sincronização ---------- */
.sync code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--gold);
    overflow-wrap: anywhere;
}
.sync input[type="text"] { text-transform: uppercase; letter-spacing: 0.06em; }


/* ---------- Prazos ---------- */
.due-field { display: grid; gap: 4px; font-size: 0.92rem; color: var(--muted); }
.due-field small { opacity: 0.8; }
input[type="date"] { color-scheme: dark; }
.due-tag { font-weight: 700; }
.due-tag.soon { color: var(--amber); }
.due-tag.late { color: #ff8b8b; }
.due-tag.ok { color: #8fe3a8; }
.mission.is-late { border-color: rgba(255, 120, 120, 0.55); box-shadow: 0 0 0 1px rgba(255, 120, 120, 0.25) inset; }

/* ---------- Formulários de coleção / conquista ---------- */
.adder-wrap { padding: 16px; display: grid; gap: 10px; }
.adder-wrap h2 { font-family: var(--font-display); font-size: 1.15rem; }
.adder summary { list-style: none; cursor: pointer; display: inline-grid; }
.adder summary::-webkit-details-marker { display: none; }
.adder[open] summary { background: rgba(255, 255, 255, 0.14); }
.adder-form { display: grid; gap: 10px; margin-top: 12px; padding: 14px; border-radius: 14px; border: 1px dashed var(--line); background: rgba(0, 0, 0, 0.25); }
.adder-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 4px; font-size: 0.88rem; color: var(--muted); min-width: 0; }
select { appearance: none; -webkit-appearance: none; }
input[type="color"] { width: 100%; height: 44px; padding: 3px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(0, 0, 0, 0.4); }
input[type="file"] { font: inherit; font-size: 0.85rem; color: var(--muted); min-height: 44px; padding-top: 10px; width: 100%; }

.trophy { position: relative; }
.trophy .rm, .beast .rm {
    position: absolute; top: 4px; right: 4px; width: 32px; height: 32px;
    border: 0; border-radius: 8px; background: transparent; color: var(--muted);
    font-size: 1.1rem; cursor: pointer;
}
.trophy .rm:hover, .beast .rm:hover { color: #ff8b8b; background: rgba(255, 255, 255, 0.08); }
.beast { position: relative; }
.beast .mystery {
    width: 100%; max-width: 96px; aspect-ratio: 1; display: grid; place-items: center;
    border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px dashed var(--line);
    font-family: var(--font-display); font-size: 2rem; color: var(--muted);
}
