@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&display=swap');

/* Dragon Egg Wars: documento descrittivo, capitoli fluidi, niente card. */
.dew-doc {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px 70px;
    position: relative;
}
.dew-doc-inner {
    max-width: 760px;
    width: 100%;
    position: relative;
}

/* --- Titolo --- */
.dew-titleblock { text-align: center; padding: 60px 0 10px; }
.dew-titleblock .hero-eyebrow {
    display: inline-block;
    font-family: 'Caveat', cursive;
    font-size: 1.35rem; font-weight: 700; color: #ff8a8a;
    transform: rotate(-0.8deg); margin-bottom: 10px;
}
.dew-titleblock h1 {
    font-size: 3rem; font-weight: 900; letter-spacing: -1.2px;
    line-height: 1.05; color: #fff; margin-bottom: 0;
    position: relative; display: inline-block;
}
.dew-titleblock h1 .scribble {
    position: absolute; left: -8px; right: -8px; bottom: -14px; height: 16px;
    pointer-events: none; opacity: 0.9;
}
.dew-titleblock h1 .scribble path {
    stroke: #e60000; stroke-width: 2.2; stroke-linecap: round; fill: none;
    stroke-dasharray: 280; stroke-dashoffset: 280;
    animation: scribble 1.1s ease 0.8s forwards;
}
.dew-titleblock .dew-sub {
    max-width: 600px; margin: 22px auto 0;
    font-size: 1rem; color: #b4b4bf; line-height: 1.8;
}
@keyframes scribble { to { stroke-dashoffset: 0 } }

/* --- Indice --- */
.dew-index { margin: 30px 0 10px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,0.07); border-bottom: 1px solid rgba(255,255,255,0.07); }
.dew-index p { font-size: 0.78rem; font-weight: 800; letter-spacing: 2px; color: #e74c3c; margin-bottom: 12px; }
.dew-index ol { list-style: none; margin: 0; padding: 0; }
.dew-index li { margin: 0; padding: 0; }
.dew-index a {
    display: flex; align-items: baseline; gap: 12px;
    padding: 7px 2px; text-decoration: none;
    font-size: 0.92rem; font-weight: 700; color: #cfc6ba;
    border-bottom: 1px dotted rgba(255,255,255,0.08);
}
.dew-index a:last-child { border-bottom: none; }
.dew-index a:hover { color: #fff; }
.dew-index a .n { font-size: 0.78rem; font-weight: 900; color: #e74c3c; min-width: 26px; }

/* --- Capitoli --- */
.dew-chapter { padding: 38px 0 6px; }
.dew-chapter + .dew-chapter { border-top: 1px solid rgba(255,255,255,0.06); }
.dew-chapter .chap-no {
    font-size: 0.8rem; font-weight: 900; letter-spacing: 2.5px;
    color: #e74c3c; margin-bottom: 8px;
}
.dew-chapter h2 {
    font-size: 1.75rem; font-weight: 900; letter-spacing: -0.5px;
    color: #fff; line-height: 1.2; margin-bottom: 14px;
}
.dew-chapter h3 {
    font-size: 1.08rem; font-weight: 800; color: #ffd1d1;
    margin: 22px 0 8px; letter-spacing: -0.2px;
}
.dew-chapter p {
    font-size: 0.97rem; color: #b4b4bf; line-height: 1.85;
    margin-bottom: 13px;
}
.dew-chapter p strong { color: #ff8080; }
.dew-chapter a.inline { color: #ff6b6b; text-decoration: none; border-bottom: 1px dotted rgba(255,107,107,0.5); }
.dew-chapter a.inline:hover { color: #ff8a8a; }
.dew-chapter ul { margin: 6px 0 14px 4px; padding: 0; list-style: none; }
.dew-chapter ul li {
    font-size: 0.94rem; color: #b4b4bf; line-height: 1.75;
    padding-left: 20px; position: relative; margin-bottom: 6px;
}
.dew-chapter ul li::before {
    content: ""; position: absolute; left: 2px; top: 12px;
    width: 8px; height: 2px; background: #e74c3c; border-radius: 2px;
}
.dew-chapter code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.85rem; font-weight: 700; color: #ffd1d1;
}
.dew-cmdlist { margin: 14px 0 6px; }
.dew-cmdlist dt {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.9rem; font-weight: 700; color: #ffd1d1; margin-top: 12px;
}
.dew-cmdlist dd {
    margin: 2px 0 0; font-size: 0.92rem; color: #a0a0a8; line-height: 1.7;
}

/* --- FAQ --- */
.dew-faq details { border-bottom: 1px solid rgba(255,255,255,0.06); }
.dew-faq details:first-of-type { border-top: 1px solid rgba(255,255,255,0.06); }
.dew-faq summary {
    cursor: pointer; list-style: none;
    font-size: 0.95rem; font-weight: 800; color: #eee6da;
    padding: 12px 30px 12px 2px; position: relative;
}
.dew-faq summary::-webkit-details-marker { display: none; }
.dew-faq summary::after {
    content: "+"; position: absolute; right: 4px; top: 10px;
    color: #ff8a8a; font-weight: 900; font-size: 1.05rem;
}
.dew-faq details[open] summary::after { content: "–"; }
.dew-faq details p { font-size: 0.9rem; padding: 0 2px 13px; margin: 0; }

/* --- Chiusura --- */
.dew-close { text-align: center; padding: 52px 0 8px; }
.dew-close .fin-eyebrow {
    font-family: 'Caveat', cursive; font-size: 1.3rem; font-weight: 700;
    color: #ff8a8a; transform: rotate(-0.8deg); display: inline-block; margin-bottom: 8px;
}
.dew-close h2 { font-size: 1.9rem; font-weight: 900; letter-spacing: -0.5px; color: #fff; margin-bottom: 12px; }
.dew-close p { font-size: 0.94rem; color: #b0b0c0; line-height: 1.8; max-width: 560px; margin: 0 auto 22px; }
.dew-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.dew-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 24px; border-radius: 10px;
    font-size: 0.88rem; font-weight: 800; text-decoration: none;
    cursor: pointer; border: 1px solid transparent; transition: all 0.2s;
}
.dew-btn.red { background: #800c0c; color: #fff; box-shadow: 0 4px 14px rgba(128,12,12,0.4); }
.dew-btn.red:hover { background: #a00e0e; transform: translateY(-1px); }
.dew-btn.ghost { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.10); color: #e8e0d4; }
.dew-btn.ghost:hover { border-color: rgba(255,46,46,0.30); color: #fff; transform: translateY(-1px); }
.dew-ip-ok { display: none; color: #7dff9b; font-size: 0.8rem; font-weight: 700; width: 100%; text-align: center; }
.dew-ip-ok.mostra { display: block; }
/* footer centralizzato in global.css */

/* =========================================================================
   COMPONENTI GUIDA (aggiornamento 2026)
   ========================================================================= */

/* Paragrafo di apertura */
.dew-lead { font-size: 1.06rem !important; color: #cbc2b6 !important; line-height: 1.9 !important; }

/* Evidenziatore inline per i comandi dentro i paragrafi */
.dew-chapter p code, .dew-chapter li code, .dew-note code, .dew-faq code,
.dew-cmd .d code {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 5px; padding: 1px 6px;
    color: #ffd1d1;
}

/* Richiami / note */
.dew-note {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; margin: 16px 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 3px solid #e74c3c;
    border-radius: 10px;
    font-size: 0.9rem; color: #b9b3ab; line-height: 1.75;
}
.dew-note .ico { font-weight: 900; color: #e74c3c; font-size: 1rem; line-height: 1.4; }
.dew-note p { margin: 0; font-size: 0.9rem; color: inherit; line-height: inherit; }
.dew-note strong { color: #ffb3b3; }
.dew-note.tip { border-left-color: #4caf7d; }
.dew-note.tip .ico { color: #4caf7d; }
.dew-note.warn { border-left-color: #e0a63a; }
.dew-note.warn .ico { color: #e0a63a; }

/* Tabelle (shop, punti, ecc.) */
.dew-tablewrap { overflow-x: auto; margin: 16px 0; border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; }
.dew-table { width: 100%; border-collapse: collapse; min-width: 420px; }
.dew-table th {
    text-align: left; font-size: 0.7rem; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
    color: #e74c3c; padding: 11px 14px;
    background: rgba(255,46,46,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dew-table td {
    padding: 10px 14px; font-size: 0.9rem; color: #c3bcb2;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dew-table tr:last-child td { border-bottom: none; }
.dew-table td:first-child { color: #eee6da; font-weight: 700; }
.dew-table .price { color: #7dff9b; font-weight: 800; white-space: nowrap; }
.dew-table .amount { color: #ffd1d1; font-weight: 700; white-space: nowrap; }
.dew-table code { background: none !important; border: none !important; padding: 0 !important; }

/* Blocchi comando con pulsante copia */
.dew-cmds { display: grid; gap: 8px; margin: 16px 0; }
.dew-cmd {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 9px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
}
.dew-cmd .c {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.86rem; font-weight: 700; color: #ffd1d1;
    white-space: nowrap;
}
.dew-cmd .d { flex: 1; font-size: 0.82rem; color: #9a9aa4; line-height: 1.5; }
.dew-copy {
    flex-shrink: 0;
    font-family: inherit; font-size: 0.72rem; font-weight: 800;
    letter-spacing: 0.4px; text-transform: uppercase;
    color: #ffb3b3; background: rgba(255,46,46,0.08);
    border: 1px solid rgba(255,46,46,0.22);
    border-radius: 7px; padding: 6px 10px; cursor: pointer;
    transition: all 0.18s;
}
.dew-copy:hover { background: rgba(255,46,46,0.18); color: #fff; border-color: #ff2e2e; }
.dew-copy.ok { color: #7dff9b; border-color: rgba(125,255,155,0.5); background: rgba(125,255,155,0.10); }

/* Passi numerati */
.dew-steps { list-style: none; counter-reset: step; margin: 16px 0; padding: 0; }
.dew-steps li {
    position: relative; counter-increment: step;
    padding: 4px 0 14px 46px;
    font-size: 0.94rem; color: #b4b4bf; line-height: 1.7;
}
.dew-steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 0;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,46,46,0.10); border: 1px solid rgba(255,46,46,0.35);
    color: #ff8a8a; font-weight: 900; font-size: 0.85rem;
}
.dew-steps li strong { color: #ffb3b3; }

/* Griglia di sintesi (fase / obiettivo) */
.dew-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
.dew-fact {
    padding: 14px 16px; border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
}
.dew-fact .k { font-size: 0.68rem; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: #e74c3c; margin-bottom: 6px; }
.dew-fact .v { font-size: 1.02rem; font-weight: 800; color: #fff; }
.dew-fact .s { font-size: 0.78rem; color: #9a9aa4; margin-top: 3px; }

/* Tag piccoli */
.dew-tag {
    display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.6px;
    text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
    background: rgba(255,46,46,0.10); border: 1px solid rgba(255,46,46,0.25); color: #ff9d9d;
}
.dew-tag.green { background: rgba(125,255,155,0.08); border-color: rgba(125,255,155,0.30); color: #7dff9b; }
.dew-tag.amber { background: rgba(224,166,58,0.10); border-color: rgba(224,166,58,0.30); color: #e6b45a; }

@media (max-width: 768px) {
    .dew-doc { padding: 0 16px 50px; }
    .dew-titleblock { padding: 42px 0 6px; }
    .dew-titleblock h1 { font-size: 2rem; letter-spacing: -0.7px; }
    .dew-chapter { padding: 30px 0 4px; }
    .dew-chapter h2 { font-size: 1.4rem; }
    .dew-chapter p { font-size: 0.9rem; }
    .dew-close h2 { font-size: 1.5rem; }
    .dew-facts { grid-template-columns: 1fr; }
    .dew-cmd { flex-wrap: wrap; }
    .dew-cmd .d { flex-basis: 100%; order: 3; }
}
