/* LSKS ARK Crafting Guide — estilos con alcance .acg (sin tocar el tema). */
.acg {
	--acg-bg: #0d1226;
	--acg-panel: #141a33;
	--acg-panel-2: #1b2244;
	--acg-line: #2b3462;
	--acg-text: #eef0f7;
	--acg-muted: #a9b0cf;
	--acg-gold: #d9b45a;
	--acg-gold-hi: #f2cf6b;
	--acg-violet: #8a6cc8;
	--acg-cyan: #7fd3e6;
	--acg-warn: #f0a35e;
	--acg-radius: 12px;
	--acg-focus: 0 0 0 3px rgba(242, 207, 107, .55);
	color: var(--acg-text);
	background: var(--acg-bg);
	border: 1px solid var(--acg-line);
	border-radius: 16px;
	padding: clamp(14px, 3vw, 28px);
	margin: 1.5em 0;
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.acg *, .acg *::before, .acg *::after { box-sizing: border-box; }
.acg a { color: var(--acg-gold-hi); text-decoration: underline; text-underline-offset: 2px; }
.acg a:hover { color: #fff; }
.acg a:focus-visible, .acg button:focus-visible, .acg input:focus-visible, .acg select:focus-visible, .acg summary:focus-visible {
	outline: none; box-shadow: var(--acg-focus); border-radius: 6px;
}
.acg h2 { color: var(--acg-text); font-size: 1.25rem; margin: 1.6em 0 .7em; line-height: 1.25; }
.acg h3 { margin: 0; }
.acg img { max-width: 100%; height: auto; }

/* Barra de edición */
.acg-edition { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.acg-edition__badge { font-weight: 800; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; background: var(--acg-gold); color: #1a1407; font-size: .85rem; }
.acg-edition__badge--asa { background: var(--acg-cyan); color: #07171c; }
.acg-edition__text { margin: 0; color: var(--acg-muted); }
.acg-edition__text strong { color: var(--acg-text); }

/* Filtros */
.acg-filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr) auto; gap: 10px; align-items: end; background: var(--acg-panel); padding: 14px; border-radius: var(--acg-radius); border: 1px solid var(--acg-line); }
.acg-filters__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acg-filters label { font-size: .8rem; color: var(--acg-muted); }
.acg-filters input, .acg-filters select {
	width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--acg-line);
	background: var(--acg-bg); color: var(--acg-text); font: inherit;
}
.acg-filters__actions { display: flex; gap: 8px; }
.acg-btn { min-height: 44px; padding: 8px 16px; border-radius: 8px; border: 0; background: var(--acg-gold); color: #1a1407; font-weight: 700; cursor: pointer; font: inherit; text-decoration: none; display: inline-flex; align-items: center; }
.acg .acg-btn--ghost { background: transparent; color: var(--acg-text); border: 1px solid var(--acg-line); }
.acg--js .acg-filters__actions .acg-btn[type="submit"] { display: none; }
.acg-count { color: var(--acg-muted); margin: 12px 2px; font-size: .95rem; }

/* Grupos y grilla */
.acg-group__title { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--acg-line); padding-bottom: 6px; }
.acg-group__icon { width: 28px; height: 28px; }
.acg-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }

/* Tarjeta */
.acg-card { position: relative; background: linear-gradient(180deg, var(--acg-panel-2), var(--acg-panel)); border: 1px solid var(--acg-line); border-radius: var(--acg-radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 90px; }
.acg-card:target { border-color: var(--acg-gold-hi); box-shadow: 0 0 0 2px rgba(242, 207, 107, .35); }
.acg-card__top { display: flex; gap: 10px; align-items: center; }
.acg-card__icon { width: 48px; height: 48px; flex: none; background: var(--acg-bg); border-radius: 10px; padding: 4px; border: 1px solid var(--acg-line); }
.acg-card__names { min-width: 0; }
.acg-card__title { font-size: 1rem; line-height: 1.25; }
.acg-card__title a { color: var(--acg-text); text-decoration: none; }
.acg-card__title a:hover, .acg-card__title a:focus-visible { color: var(--acg-gold-hi); text-decoration: underline; }
.acg-card__en { margin: 2px 0 0; color: var(--acg-muted); font-size: .82rem; }

.acg-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.acg-chip { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--acg-line); color: var(--acg-muted); }
.acg-chip--st { color: var(--acg-gold-hi); border-color: rgba(217, 180, 90, .45); }
.acg-chip--warn { color: var(--acg-warn); border-color: rgba(240, 163, 94, .5); }
.acg-chip--src { color: var(--acg-cyan); border-color: rgba(127, 211, 230, .4); cursor: help; }
.acg-chip--dlc { color: #cdbaf2; border-color: rgba(138, 108, 200, .5); }
.acg-chip--ed { font-weight: 700; color: #1a1407; background: var(--acg-gold); border-color: transparent; }
.acg-chip--asa.acg-chip--ed { background: var(--acg-cyan); color: #07171c; }

.acg-card__toggle { align-self: flex-start; min-height: 36px; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--acg-line); background: transparent; color: var(--acg-text); cursor: pointer; font: inherit; font-size: .85rem; }
.acg-card__pop-title { margin: 0 0 6px; font-weight: 700; font-size: .85rem; }
.acg-card__pop-title span { font-weight: 400; color: var(--acg-muted); }
.acg-mats { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.acg-mats li { display: flex; align-items: center; gap: 6px; font-size: .88rem; }
.acg-mats__icon { width: 24px; height: 24px; flex: none; }
.acg-mats__qty { font-weight: 800; color: var(--acg-gold-hi); min-width: 3.2ch; text-align: right; }
.acg-mats__alt { color: var(--acg-muted); font-size: .75rem; }
.acg-card__time { margin: 6px 0 0; color: var(--acg-muted); font-size: .8rem; }

/* Sin JS: materiales siempre visibles en la tarjeta. Con JS: popover. */
.acg--js .acg-card__pop {
	display: none; position: absolute; z-index: 20; left: 8px; right: 8px; top: calc(100% - 6px);
	background: var(--acg-bg); border: 1px solid var(--acg-gold); border-radius: 10px; padding: 10px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.acg--js .acg-card.is-open .acg-card__pop { display: block; }
@media (hover: hover) and (pointer: fine) {
	.acg--js .acg-card:hover .acg-card__pop, .acg--js .acg-card:focus-within .acg-card__pop { display: block; }
	.acg--js .acg-card:hover, .acg--js .acg-card:focus-within { z-index: 21; }
}

/* Paginación */
.acg-pagination ul { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.acg-pagination a, .acg-pagination span, .acg-pagination__btn {
	display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px;
	border-radius: 8px; border: 1px solid var(--acg-line); color: var(--acg-text); text-decoration: none; background: var(--acg-panel); font: inherit; cursor: pointer;
}
.acg-pagination span[aria-current] { background: var(--acg-gold); color: #1a1407; font-weight: 800; border-color: transparent; }

/* Cobertura y fuentes */
.acg-coverage { margin-top: 24px; border: 1px solid var(--acg-line); border-radius: var(--acg-radius); background: var(--acg-panel); }
.acg-coverage summary { cursor: pointer; padding: 12px 14px; font-weight: 700; min-height: 44px; }
.acg-coverage__body { padding: 0 14px 12px; color: var(--acg-muted); font-size: .9rem; }
.acg-sources { padding-left: 18px; }
.acg-sources__meta { color: var(--acg-muted); font-size: .82rem; }
.acg-notice { padding: 10px 14px; border-left: 4px solid var(--acg-warn); background: #fff6ec; color: #4a2a06; }

/* Ficha */
.acg-item__back { margin-bottom: 14px; }
.acg-item__panel { display: grid; grid-template-columns: auto 1fr; gap: 16px 20px; align-items: center; background: radial-gradient(120% 140% at 0% 0%, rgba(138, 108, 200, .22), transparent 60%), var(--acg-panel); border: 1px solid var(--acg-line); border-radius: 16px; padding: 18px; }
.acg-item__icon { width: 72px; height: 72px; background: var(--acg-bg); border: 1px solid var(--acg-gold); border-radius: 16px; padding: 8px; }
.acg-item__en { margin: 0 0 8px; color: var(--acg-muted); font-size: .9rem; }
.acg-item__en span { color: var(--acg-text); }
.acg-chip--ev { color: #b7f0c6; border-color: rgba(120, 214, 150, .45); cursor: help; }
.acg img.acg-img--item { image-rendering: auto; object-fit: contain; }

/* Dentro de Guide System (.lsk-guide-article ya es oscuro): sin caja extra. */
.lsk-guide-article .acg { background: transparent; border: 0; padding: 0; margin: 1em 0; }
.acg-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin: 0; justify-self: stretch; }
.acg-facts__row { background: var(--acg-bg); border: 1px solid var(--acg-line); border-radius: 10px; padding: 8px 10px; }
.acg-facts dt { font-size: .75rem; color: var(--acg-muted); text-transform: uppercase; letter-spacing: .05em; }
.acg-facts dd { margin: 2px 0 0; font-weight: 700; }

.acg-item { container-type: inline-size; }
.acg-flow { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; background: var(--acg-panel); border: 1px solid var(--acg-line); border-radius: 16px; padding: 16px; }
.acg-flow__station { display: flex; flex-direction: column; gap: 8px; }
.acg-flow__st { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--acg-gold-hi); }
.acg-flow__st-icon { width: 40px; height: 40px; background: var(--acg-bg); border-radius: 10px; padding: 4px; border: 1px solid var(--acg-line); }
.acg-flow__arrow { font-size: 1.6rem; color: var(--acg-gold); }
.acg-flow__slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.acg-slot { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: var(--acg-bg); border: 1px solid var(--acg-line); border-radius: 12px; padding: 10px 8px; }
.acg-slot__icon { width: 48px; height: 48px; }
.acg-slot__qty { position: absolute; top: 6px; right: 8px; font-weight: 800; color: var(--acg-gold-hi); font-size: 1rem; }
.acg-slot__name { font-size: .85rem; }
.acg-slot__alt { font-size: .72rem; color: var(--acg-muted); }
.acg-flow__result { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; text-align: center; max-width: 160px; }
.acg-flow__result-icon { width: 56px; height: 56px; background: var(--acg-bg); border: 1px solid var(--acg-gold); border-radius: 12px; padding: 6px; }
.acg-steps { padding-left: 22px; }
.acg-steps li { margin: 6px 0; }
.acg-note { color: var(--acg-muted); font-size: .85rem; }
.acg-table { width: 100%; border-collapse: collapse; background: var(--acg-panel); border-radius: 12px; overflow: hidden; }
.acg-table th, .acg-table td { padding: 8px 12px; border-bottom: 1px solid var(--acg-line); text-align: left; color: var(--acg-text); }
.acg-table thead th { color: var(--acg-muted); font-size: .8rem; text-transform: uppercase; }
.acg-table td { text-align: right; font-weight: 700; color: var(--acg-gold-hi); }
.acg-table th span { color: var(--acg-muted); font-weight: 400; font-size: .85em; }
.acg-variants code { color: var(--acg-cyan); background: var(--acg-bg); padding: 1px 6px; border-radius: 4px; }

@media (max-width: 860px) {
	.acg-filters { grid-template-columns: 1fr 1fr; }
	.acg-filters__field--q { grid-column: 1 / -1; }
	.acg-filters__actions { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
	.acg-filters { grid-template-columns: 1fr; }
}
@container (max-width: 680px) {
	.acg-flow { grid-template-columns: 1fr; justify-items: center; }
	.acg-flow__slots { width: 100%; }
	.acg-flow__station { flex-direction: row; flex-wrap: wrap; justify-content: center; }
	.acg-flow__arrow { transform: rotate(90deg); }
}
@container (max-width: 460px) {
	.acg-item__panel { grid-template-columns: 1fr; justify-items: start; }
}
@media (prefers-reduced-motion: reduce) { .acg * { scroll-behavior: auto !important; transition: none !important; } }

/* 0.1.2: avisos */
.acg .acg-note,
.acg .acg-empty { margin: .75em 0; padding: .6em .85em; border-left: 3px solid var(--acg-warn, #d9a441); background: rgba(217, 164, 65, .08); border-radius: 6px; font-size: .95em; }
.acg .acg-disclaimer { margin: 1.25em 0 0; font-size: .8em; opacity: .75; line-height: 1.45; }
