/* NoxBot · roadmap 2 (Mudae a fondo, comunidad y dinámicas). Usa los tokens de app.css. */

/* Sin sesión: solo la pantalla de entrada */
.guest .tabbar, .guest .topbar { display: none !important; }
.guest .app { display: block; }
.guest .view { min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter); }
.gate { display: grid; justify-items: center; gap: 18px; width: min(360px, 100%); text-align: center; }
.gate__moon { width: 96px; height: 96px; filter: drop-shadow(0 0 28px rgba(232, 184, 101, .45)); }
.gate__name { font: 800 clamp(40px, 12vw, 56px)/1 var(--font-display); letter-spacing: .01em; }
.gate__btn { min-height: 50px; font-size: 16px; }
/* Instancias de Mudae */
.segmented--inst { display: inline-grid; max-width: 260px; grid-auto-columns: 1fr; }
.segmented--inst button { height: 32px; padding: 0 14px; font-size: 13.5px; }
.segmented--inst button.is-on[data-inst="mudae"] { color: var(--accent); }
.segmented--inst button.is-on[data-inst="remudae"] { color: #4fb3c8; }
.inst-tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 10px; font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: 1px; white-space: nowrap; }
.inst-tag--mudae { background: var(--accent-soft); color: var(--accent); }
.inst-tag--remudae { background: color-mix(in srgb, #3aa3ba 18%, transparent); color: #3f9fb5; }
.inst-blocks { display: grid; gap: 12px; }
@media (min-width: 700px) { .inst-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inst-block { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--raised); min-width: 0; }
.inst-block__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.char__title .segmented--inst { margin-top: 6px; }

/* Campanita */
.bell { position: relative; }
.bell__count { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; }
.notices { display: grid; gap: 6px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.notice:hover { border-color: var(--line-strong); }
.notice__dot { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: transparent; }
.notice.is-unread { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.notice.is-unread .notice__dot { background: var(--accent); }
.notice__text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }

.link--plain { color: var(--text); }

/* Comentarios: respuestas y menciones */
.mention { color: var(--accent); font-weight: 500; }
.comment--child { margin-left: 38px; }
.comment-form .reply-to { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.mention-box { position: relative; min-width: 0; }
.mention-list { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 5; display: grid; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.mention-list button { display: flex; align-items: center; gap: 8px; padding: 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; }
.mention-list button:hover { background: var(--tone); }
.mention-list img { width: 22px; height: 22px; border-radius: 50%; }

/* Perfil */
.profile-hero { position: relative; display: grid; gap: 0; }
.profile-hero.has-banner { border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.profile-hero__banner { height: clamp(120px, 26vw, 220px); background-size: cover; background-position: center 25%; }
.profile-hero.has-banner .profile-head { padding: 0 16px 16px; margin-top: -38px; align-items: flex-end; }
.profile-hero.has-banner .avatar--lg { border: 4px solid var(--surface); }
.profile-head { flex-wrap: wrap; }
.profile-head__text { flex: 1; min-width: 200px; }
.profile-head__actions { display: flex; gap: 8px; }
.profile-bio { margin-top: 4px; overflow-wrap: anywhere; }
.fav-card { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.fav-card img { width: 64px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--stage); }
.fav-card > span { display: grid; gap: 2px; min-width: 0; }
.fav-card b { font: 700 18px/1.25 var(--font-display); }
.intro dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.intro dt { color: var(--muted); font-size: 13.5px; }
.intro dd { margin: 0; overflow-wrap: anywhere; }
.banner-pick { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.banner-opt { flex: none; width: 64px; height: 64px; padding: 0; border-radius: 10px; border: 2px solid var(--line); background: var(--raised); cursor: pointer; overflow: hidden; font-size: 11px; color: var(--muted); }
.banner-opt img { width: 100%; height: 100%; object-fit: cover; }
.banner-opt.is-on { border-color: var(--accent); }

/* Ficha de Mudae */
.mudae-portrait { width: 100%; max-width: 320px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 16px; background: var(--stage); margin-inline: auto; }
.mudae-portrait--empty { display: grid; place-items: center; background: var(--raised); }
.mudae-portrait--empty svg { width: 64px; height: 64px; opacity: .3; }
@media (max-width: 699px) { .mudae-portrait { max-width: 220px; } }

/* Importar historial */
.import-status { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--raised); }
.import-form { display: grid; gap: 8px; }
@media (min-width: 600px) { .import-form { grid-template-columns: 1fr 1fr auto; } }

/* Propuestas de intercambio */
.offer { display: grid; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.offer--accepted { border-color: var(--ok); }
.offer--rejected, .offer--cancelled { opacity: .65; }
.offer__sides { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; }
.offer__arrow { align-self: center; font-size: 20px; color: var(--accent); }
.offer__list { display: grid; gap: 6px; margin-top: 4px; }
.offer-char { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.offer-char .mini { width: 28px; height: 42px; border-radius: 5px; }
.offer-char--ka { padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); justify-content: center; }
.picker { display: grid; gap: 6px; }
.input--sm { min-height: 38px; font-size: 14px; }
.picker__list { display: grid; gap: 2px; max-height: 210px; overflow-y: auto; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); }
.picker__item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; min-width: 0; }
.picker__item:hover { background: var(--tone); }
.picker__item input { accent-color: var(--accent); flex: none; }
.picker__item span:nth-of-type(2) { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }

/* Sugerencias */
.sugs { display: grid; gap: 8px; }
.sug { display: flex; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.sug__vote { flex: none; display: grid; justify-items: center; width: 50px; padding: 6px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); color: var(--muted); cursor: pointer; font-size: 12px; }
.sug__vote b { font: 700 17px/1.1 var(--font-display); color: var(--text); }
.sug__vote.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.sug__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sug__text b { font: 700 16px/1.3 var(--font-display); overflow-wrap: anywhere; }
.badge--sug-nueva { background: var(--tone); }
.badge--sug-estudio { background: color-mix(in srgb, #5b8def 18%, transparent); color: #6f9df2; }
.badge--sug-aceptada { background: var(--accent-soft); color: var(--accent); }
.badge--sug-hecha { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge--sug-descartada { background: var(--ng-soft); color: var(--ng); }
@media (max-width: 599px) { .sug { flex-wrap: wrap; } .sug .badge { margin-left: 62px; } }

/* Objetos, preguntas, sorteos y pagos */
.objects, .questions, .draws { display: grid; gap: 8px; }
.object, .question, .draw { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.object.is-off { opacity: .6; }
.object__text, .question__text, .draw__text { flex: 1; min-width: 180px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.round details summary { cursor: pointer; margin-bottom: 8px; }
.q-form { display: grid; gap: 8px; }
@media (min-width: 800px) { .q-form { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; } }
.debt-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.debt-summary > div { display: grid; gap: 2px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.debt-summary b { font: 700 22px/1.2 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; }

/* Temporadas */
.season-person summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.season-person summary::-webkit-details-marker { display: none; }
.season-person summary .small { margin-left: auto; }
.season-person[open] summary { margin-bottom: 12px; }
.grid--sm { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
