/* Painel do Minha História no Verdão */
:root {
  --noite: #06120b; --mata: #0b2215; --mata-2: #133524; --verde: #2f7f48; --verde-claro: #e3efe5;
  --giz: #f3efe5; --giz-2: #e6dfcd; --papel: #fbf9f3; --branco: #fff;
  --tinta: #101912; --tinta-2: #4a564e; --tinta-3: #7d877f; --ouro: #dcc437; --perigo: #b23a26;
  --linha: rgba(16, 25, 18, .12);
  --display: "Archivo", system-ui, sans-serif; --serif: "Newsreader", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--giz); color: var(--tinta); font-family: var(--display); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ouro); outline-offset: 2px; }
img { display: block; max-width: 100%; }
a { color: inherit; }

.rotulo { margin: 0; font-stretch: 125%; font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--verde); }

/* botões */
.bt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border: 1.5px solid var(--tinta); background: transparent; cursor: pointer; font-stretch: 110%; font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; border-radius: 3px; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.bt:hover { background: var(--tinta); color: var(--giz); }
.bt--ouro { background: var(--ouro); border-color: var(--ouro); color: var(--tinta); }
.bt--ouro:hover { background: var(--tinta); border-color: var(--tinta); color: var(--ouro); }
.bt--perigo { border-color: var(--perigo); color: var(--perigo); }
.bt--perigo:hover { background: var(--perigo); color: #fff; }
.bt--p { height: 34px; padding: 0 12px; font-size: 11px; }
.bt[disabled] { opacity: .5; pointer-events: none; }
.bt-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--verde); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

/* entrada */
.entrada { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--mata) repeating-linear-gradient(90deg, transparent 0 80px, rgba(255, 255, 255, .025) 80px 160px); }
.entrada__caixa { width: min(100%, 400px); background: var(--papel); padding: 40px 34px 30px; border-radius: 6px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); display: grid; gap: 14px; }
.entrada__caixa img { margin: 0 auto 4px; }
.entrada h1 { margin: 0; text-align: center; font-stretch: 70%; font-weight: 900; font-size: 40px; line-height: 1; }
.entrada p { margin: 0 0 6px; text-align: center; color: var(--tinta-2); font-family: var(--serif); font-size: 17px; }
.entrada label { display: grid; gap: 6px; font-weight: 650; font-size: 13px; }
.entrada input { height: 46px; padding: 0 14px; border: 1px solid var(--linha); background: #fff; border-radius: 3px; }
.entrada__erro { min-height: 1em; color: var(--perigo) !important; font-family: var(--display) !important; font-size: 13.5px !important; }
.entrada .bt-link { justify-self: center; font-size: 13px; }

/* estrutura */
.painel { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.lado { position: sticky; top: 0; height: 100vh; background: var(--noite); color: var(--giz); display: flex; flex-direction: column; padding: 22px 16px; }
.lado__marca { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; text-decoration: none; border-bottom: 1px solid rgba(243, 239, 229, .12); }
.lado__marca span { font-stretch: 75%; font-weight: 850; font-size: 21px; line-height: 1; }
.lado__marca small { display: block; margin-top: 4px; font-stretch: 115%; font-weight: 600; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ouro); }
.lado__nav { display: grid; gap: 4px; margin-top: 18px; }
.lado__nav button, .lado__acao { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; background: none; border-radius: 4px; cursor: pointer; text-align: left; font-weight: 600; font-size: 14.5px; color: rgba(243, 239, 229, .74); text-decoration: none; }
.lado__nav svg, .lado__acao svg { width: 19px; height: 19px; flex: none; }
.lado__nav button:hover, .lado__acao:hover { background: rgba(243, 239, 229, .06); color: var(--giz); }
.lado__nav button[aria-current="page"] { background: var(--mata-2); color: var(--giz); box-shadow: inset 3px 0 0 var(--ouro); }
.lado__pe { margin-top: auto; display: grid; gap: 2px; }
.lado__usuario { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 10px; padding: 12px 12px 0; border-top: 1px solid rgba(243, 239, 229, .12); font-size: 12.5px; color: rgba(243, 239, 229, .6); }
.lado__usuario span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lado__usuario .bt-link { color: var(--ouro); }

.area { padding: 34px clamp(20px, 3.5vw, 48px) 80px; min-width: 0; }
.area__cabeca { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 24px; border-bottom: 3px double var(--tinta); }
.area__cabeca h1 { margin: 4px 0 0; font-stretch: 68%; font-weight: 900; font-size: 52px; line-height: .95; }
.area__acoes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.voltar { font-size: 13px; text-decoration: none; }
.busca { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid var(--linha); background: var(--papel); border-radius: 3px; }
.busca svg { width: 16px; height: 16px; color: var(--tinta-3); }
.busca input { border: 0; background: none; outline: 0; width: 180px; }
.dica { margin: -6px 0 22px; max-width: 70ch; color: var(--tinta-2); font-family: var(--serif); font-size: 17px; }

.aviso { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 22px; padding: 14px 18px; background: var(--verde-claro); border-left: 4px solid var(--verde); border-radius: 3px; font-size: 14px; }
.aviso--ouro { background: #f7f0c6; border-color: var(--ouro); }

/* lista de histórias */
.lista { display: grid; gap: 10px; }
.linha { display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center; padding: 12px; background: var(--papel); border: 1px solid var(--linha); border-radius: 4px; transition: border-color .2s, box-shadow .2s; }
.linha:hover { border-color: rgba(16, 25, 18, .3); box-shadow: 0 8px 20px -14px rgba(16, 25, 18, .4); }
.linha__foto { width: 92px; aspect-ratio: 4 / 3; border-radius: 3px; overflow: hidden; background: var(--verde) repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 255, 255, .1) 10px 20px); display: grid; place-items: center; }
.linha__foto img { width: 100%; height: 100%; object-fit: cover; }
.linha__foto .escudo { width: 26px; height: auto; }
.linha h3 { margin: 4px 0 0; font-stretch: 80%; font-weight: 800; font-size: 20px; line-height: 1.1; cursor: pointer; }
.linha h3:hover { color: var(--verde); }
.linha__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12.5px; color: var(--tinta-3); }
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 99px; font-stretch: 110%; font-weight: 700; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.selo--pub { background: var(--verde-claro); color: var(--verde); }
.selo--rasc { background: #f2e3df; color: var(--perigo); }
.selo--dest { background: #f7f0c6; color: #7a6a10; }
.linha__acoes { display: flex; gap: 6px; }
.linha__acoes .bt { height: 36px; padding: 0 12px; font-size: 11px; }
.vazio { padding: 48px 20px; text-align: center; color: var(--tinta-2); font-family: var(--serif); font-size: 19px; background: var(--papel); border: 1px dashed var(--linha); border-radius: 4px; }

/* editor */
.editor__grade { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.campo { display: grid; gap: 7px; font-weight: 650; font-size: 13px; margin-bottom: 18px; position: relative; }
.campo input, .campo select, .campo textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--linha); background: #fff; border-radius: 3px; font-weight: 400; font-size: 15px; }
.campo textarea { resize: vertical; font-family: var(--serif); font-size: 17px; line-height: 1.45; }
.campo--titulo textarea { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 34px; line-height: 1.02; padding: 14px; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .texto:focus { outline: 2px solid var(--ouro); outline-offset: -1px; border-color: transparent; }
.conta { position: absolute; right: 0; top: 0; font-weight: 500; font-size: 12px; color: var(--tinta-3); }
.barra { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--mata); border-radius: 3px 3px 0 0; position: sticky; top: 0; z-index: 2; }
.barra button { height: 32px; padding: 0 11px; border: 0; border-radius: 3px; background: transparent; color: var(--giz); cursor: pointer; font-size: 13px; font-weight: 600; }
.barra button:hover { background: rgba(243, 239, 229, .12); }
.texto { min-height: 420px; padding: 26px 30px; background: #fff; border: 1px solid var(--linha); border-top: 0; border-radius: 0 0 3px 3px; font-family: var(--serif); font-size: 19px; line-height: 1.65; font-weight: 400; }
.texto:empty::before { content: "Escreva a história aqui. Use “Intertítulo” para dividir em partes e “Foto” para colocar imagens no meio do texto."; color: var(--tinta-3); }
.texto p { margin: 0 0 1em; }
.texto h2 { font-family: var(--display); font-stretch: 74%; font-weight: 850; font-size: 30px; line-height: 1.05; margin: 1.4em 0 .4em; }
.texto blockquote { margin: 1.4em 0; padding-left: 22px; border-left: 4px solid var(--ouro); font-style: italic; font-size: 1.12em; }
.texto figure { margin: 1.4em 0; }
.texto figure img { width: 100%; border-radius: 2px; }
.texto figcaption { margin-top: 8px; font-family: var(--display); font-size: 13px; color: var(--tinta-3); }
.texto a { color: var(--verde); }

.cartao-ed { background: var(--papel); border: 1px solid var(--linha); border-radius: 4px; padding: 18px 18px 2px; margin-bottom: 16px; }
.cartao-ed h2 { margin: 0 0 14px; font-stretch: 125%; font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-2); }
.chave { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 650; cursor: pointer; }
.chave input { position: absolute; opacity: 0; pointer-events: none; }
.chave span { width: 40px; height: 23px; border-radius: 99px; background: #cfc8b6; position: relative; transition: background .2s; flex: none; }
.chave span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.chave input:checked + span { background: var(--verde); }
.chave input:checked + span::after { transform: translateX(17px); }
.chave input:focus-visible + span { outline: 2px solid var(--ouro); outline-offset: 2px; }
.endereco { display: flex; align-items: center; border: 1px solid var(--linha); background: #fff; border-radius: 3px; overflow: hidden; }
.endereco small { padding: 0 0 0 10px; color: var(--tinta-3); font-weight: 500; font-size: 12px; white-space: nowrap; }
.endereco input { border: 0 !important; padding-left: 2px !important; min-width: 0; }

.capa { position: relative; aspect-ratio: 16 / 10; border: 1.5px dashed rgba(16, 25, 18, .25); border-radius: 4px; overflow: hidden; background: #fff; margin-bottom: 8px; transition: border-color .2s, background .2s; }
.capa.is-arrastando { border-color: var(--verde); background: var(--verde-claro); }
.capa__vazia { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 16px; text-align: center; font-weight: 650; font-size: 13px; color: var(--tinta-2); }
.capa__vazia svg { width: 30px; height: 30px; color: var(--tinta-3); }
.capa__vazia small { font-weight: 400; color: var(--tinta-3); }
.capa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.capa input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.capa__acoes { min-height: 20px; margin-bottom: 12px; font-size: 13px; }
.editor__lado .bt--perigo { width: 100%; }

/* marcos e curiosidades */
.itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.item { background: var(--papel); border: 1px solid var(--linha); border-radius: 4px; padding: 16px; display: grid; gap: 2px; }
.item__topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.item__num { font-stretch: 64%; font-weight: 900; font-size: 30px; line-height: 1; color: var(--verde); }
.item__ord { display: flex; gap: 4px; }
.item__ord button { width: 32px; height: 32px; border: 1px solid var(--linha); background: #fff; border-radius: 3px; cursor: pointer; }
.item__ord button:hover { border-color: var(--tinta); }
.item .campo { margin-bottom: 12px; }
.item .campo textarea { font-size: 16px; }
.duas { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.item__foto { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; margin-bottom: 12px; font-size: 13px; }
.item__foto .mini { width: 96px; aspect-ratio: 16 / 10; border-radius: 3px; overflow: hidden; background: var(--verde) repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 255, 255, .1) 10px 20px); position: relative; }
.item__foto .mini img { width: 100%; height: 100%; object-fit: cover; }
.item__foto .mini input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.item__foto div:last-child { display: grid; gap: 4px; justify-items: start; }
.item__rodape { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--linha); }
.item__rodape .salvo { font-size: 12px; color: var(--tinta-3); }

/* diálogo e avisos */
.dialogo { border: 0; border-radius: 6px; padding: 26px 26px 20px; width: min(92vw, 420px); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6); background: var(--papel); }
.dialogo::backdrop { background: rgba(6, 18, 11, .55); }
.dialogo h2 { margin: 0 0 8px; font-stretch: 74%; font-weight: 850; font-size: 28px; line-height: 1.05; }
.dialogo p { margin: 0 0 20px; color: var(--tinta-2); font-family: var(--serif); font-size: 17px; }
.dialogo__acoes { display: flex; justify-content: flex-end; gap: 8px; }
.avisos { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; }
.toast { padding: 12px 18px; background: var(--noite); color: var(--giz); border-radius: 4px; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .6); font-weight: 600; font-size: 14px; animation: toast .35s var(--ease); border-left: 4px solid var(--ouro); }
.toast--erro { border-color: var(--perigo); }
@keyframes toast { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1100px) { .editor__grade { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .painel { grid-template-columns: minmax(0, 1fr); }
  .lado, .lado__nav, .area { min-width: 0; }
  .aviso { font-size: 13px; }
  .linha h3 { overflow-wrap: anywhere; }
  .area__acoes { width: 100%; }
  .busca { flex: 1; }
  .busca input { width: 100%; }
  .lado { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; }
  .lado__marca { border: 0; padding: 0; margin-right: auto; }
  .lado__nav { display: flex; order: 3; width: 100%; margin: 6px 0 0; overflow-x: auto; }
  .lado__nav button { white-space: nowrap; width: auto; }
  .lado__pe { margin: 0; display: flex; align-items: center; }
  .lado__acao { width: auto; padding: 8px; font-size: 0; gap: 0; }
  .lado__usuario { margin: 0; padding: 0 0 0 8px; border: 0; }
  .lado__usuario span { display: none; }
  .area__cabeca h1 { font-size: 40px; }
  .linha { grid-template-columns: 72px 1fr; }
  .linha__foto { width: 72px; }
  .linha__acoes { grid-column: 1 / -1; }
  .busca input { width: 120px; }
  .texto { padding: 18px; font-size: 18px; }
}
