/* Diário dos sonhos (/app/diario/): prefixo .dd- */
.dd-topo { position: relative; padding: 6px 0 4px; }
.dd-topo::before { content: ""; position: absolute; inset: -10px -16px auto; height: 180px; pointer-events: none; z-index: -1; opacity: .8;
  background: radial-gradient(1.5px 1.5px at 12% 30%, #fff8, transparent), radial-gradient(1px 1px at 30% 70%, #fff6, transparent), radial-gradient(1.5px 1.5px at 55% 20%, #f1dfae99, transparent),
    radial-gradient(1px 1px at 72% 60%, #fff7, transparent), radial-gradient(1.5px 1.5px at 88% 28%, #fff8, transparent), radial-gradient(1px 1px at 45% 50%, #fff5, transparent);
  animation: dd-brilho 4s ease-in-out infinite alternate; }
@keyframes dd-brilho { from { opacity: .45; } to { opacity: .95; } }
.dd-titulo { font-family: var(--display); margin: 4px 0 6px; }
.dd-privado { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); margin: 4px 0 0; }
.dd-seq { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(216,181,106,.16), rgba(155,132,242,.1)); border: 1px solid rgba(216,181,106,.35); color: var(--gold-soft); }

.dd-abas { display: flex; gap: 4px; margin: 18px 0 14px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.dd-abas button { flex: 1; border: 0; background: transparent; color: var(--muted); font: 500 13.5px var(--body); padding: 9px 6px; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s; }
.dd-abas button[aria-selected="true"] { background: linear-gradient(180deg, rgba(216,181,106,.22), rgba(216,181,106,.08)); color: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(216,181,106,.4); }
.dd-cont { opacity: .7; font-size: 12px; }

.dd-form { display: grid; gap: 8px; }
.dd-lua-hoje { display: flex; gap: 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; line-height: 1.35; }
.dd-luasvg { flex: none; filter: drop-shadow(0 0 6px rgba(241,223,174,.35)); }
.dd-rot { font-weight: 600; margin: 10px 0 2px; color: var(--fg); }
.dd-campo { position: relative; }
.dd-campo textarea { width: 100%; box-sizing: border-box; min-height: 140px; resize: vertical; padding: 12px 56px 12px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: 16px/1.5 var(--body); }
.dd-campo textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216,181,106,.15); }
.dd-mic { position: absolute; right: 8px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(216,181,106,.6); background: radial-gradient(circle at 35% 30%, #3a2d74, #1a1438); color: var(--gold); display: grid; place-items: center; cursor: pointer; }
.dd-mic svg { width: 22px; height: 22px; fill: currentColor; }
.dd-mic.on { background: radial-gradient(circle, #d8b56a, #a07a32); color: #1a1438; animation: dd-pulso 1.4s ease-out infinite; }
@keyframes dd-pulso { 0% { box-shadow: 0 0 0 0 rgba(216,181,106,.55); } 100% { box-shadow: 0 0 0 16px rgba(216,181,106,0); } }
.dd-onda { display: flex; gap: 4px; align-items: center; justify-content: center; height: 34px; }
.dd-onda i { width: 4px; height: 6px; border-radius: 3px; background: linear-gradient(var(--gold), var(--violet)); animation: dd-onda 1s ease-in-out infinite; }
.dd-onda i:nth-child(2n) { animation-delay: -.3s; } .dd-onda i:nth-child(3n) { animation-delay: -.6s; } .dd-onda i:nth-child(5n) { animation-delay: -.15s; }
.dd-onda.falando i { animation-duration: .55s; }
@keyframes dd-onda { 0%, 100% { height: 6px; } 50% { height: 28px; } }
.dd-mic-msg { margin: 0; min-height: 1em; }

.dd-emocoes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dd-emocoes button { display: grid; gap: 2px; justify-items: center; padding: 8px 2px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: 12px var(--body); cursor: pointer; transition: transform .2s, border-color .2s, background .2s; }
.dd-emo-i { font-size: 24px; line-height: 1.1; }
.dd-emocoes button[aria-checked="true"] { border-color: var(--gold); background: rgba(216,181,106,.12); color: var(--gold-soft); transform: translateY(-2px); box-shadow: 0 6px 18px -8px rgba(216,181,106,.6); }

.dd-dica { margin: 0; }
.dd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dd-chip { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 13.5px var(--body); text-decoration: none; cursor: pointer; transition: all .2s; }
.dd-chip.on { border-color: rgba(216,181,106,.7); color: var(--gold-soft); background: rgba(216,181,106,.1); }
a.dd-chip:hover { color: var(--gold); border-color: var(--gold); }
.dd-add { display: flex; gap: 6px; }
.dd-add input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: 15px var(--body); }
.dd-erro { color: var(--hot); margin: 0; min-height: 1em; }
.dd-salvar { width: 100%; margin-top: 4px; }
.dd-livres { text-align: center; margin: 0; }

.dd-salvo { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; border-color: rgba(216,181,106,.45); }
.dd-salvo h3 { margin: 0 0 4px; font-family: var(--display); font-size: 24px; color: var(--gold-soft); }
.dd-faisca { position: fixed; z-index: 99; pointer-events: none; color: var(--gold); font-size: 14px; animation: dd-faisca .9s ease-out forwards; }
@keyframes dd-faisca { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.4); opacity: 0; } }

.dd-item { display: flex; gap: 12px; margin-bottom: 10px; }
.dd-item-lua { flex: none; padding-top: 2px; }
.dd-item-corpo { min-width: 0; flex: 1; }
.dd-item-corpo p { margin: 0 0 8px; overflow-wrap: anywhere; }
.dd-item-cab { font-size: 14px; }
.dd-item-emo { font-size: 18px; margin-left: 4px; }
.dd-item details summary { cursor: pointer; list-style: none; color: var(--fg); margin-bottom: 6px; }
.dd-item details summary::-webkit-details-marker { display: none; }
.dd-item details[open] .dd-mais { display: none; }
.dd-mais { color: var(--gold); font-size: 13px; }
.dd-apagar { margin-top: 8px; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }
.dd-vazio p { margin: 0; color: var(--muted); }

.dd-resumo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.dd-resumo div { text-align: center; padding: 12px 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.dd-resumo b { display: block; font-family: var(--display); font-size: 32px; color: var(--gold); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.dd-resumo span { font-size: 12.5px; color: var(--muted); }
.dd-bloco { margin-bottom: 12px; }
.dd-barras { list-style: none; padding: 0; margin: 10px 0 8px; display: grid; gap: 9px; }
.dd-barras li { display: grid; grid-template-columns: 96px 1fr 26px; gap: 8px; align-items: center; }
.dd-barra-nome { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-barra-nome a { color: var(--gold-soft); }
.dd-barra { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.dd-barra i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--violet), var(--gold)); box-shadow: 0 0 10px rgba(216,181,106,.45); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.dd-barra-n { text-align: right; font-size: 14px; color: var(--gold); }
.dd-emo-top { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.dd-emo-top span { font-size: 40px; }
.dd-emo-top b { font-family: var(--display); font-size: 24px; color: var(--gold-soft); }
.dd-luapad { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.dd-luapad li { padding: 10px 12px; border-radius: 12px; background: rgba(155,132,242,.1); border: 1px solid rgba(155,132,242,.3); }
.dd-obs { margin: 6px 0 0; }
.dd-mail { margin-top: 22px; }
.dd-mail h2 { font-family: var(--display); margin: 4px 0 6px; }

@media (prefers-reduced-motion: no-preference) {
  .dd-in { animation: dd-entra .5s ease both; animation-delay: calc(var(--i, 0) * 70ms); }
  @keyframes dd-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .dd-topo::before, .dd-onda i, .dd-mic.on { animation: none; } .dd-barra i { transition: none; } }
@media (max-width: 380px) { .dd-barras li { grid-template-columns: 78px 1fr 22px; } .dd-abas button { font-size: 12.5px; } }
