/* The armoury (Rüstungsschmied, js/armory.js): forge-lit shop over the town. Terra palette:
   Waldgrün #243A32 · Gold #C49A52 · Pergament #E7D9BC. */

.armory {
	position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
	color: #f3e7cc; font-family: 'Alegreya', Georgia, serif;
	background: radial-gradient(900px 520px at 22% 40%, rgba(255, 128, 40, .2), transparent 62%), linear-gradient(180deg, #1d1610, #0c0906);
}
.ar-head {
	display: flex; align-items: center; gap: 18px; padding: 12px 22px; flex-wrap: wrap;
	border-bottom: 1px solid rgba(196, 154, 82, .35); background: linear-gradient(180deg, #2a2016, #18120c); box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}
.ar-head h1 { margin: 0; font: 800 22px 'Cinzel', serif; letter-spacing: 3px; color: #ffd76a; text-shadow: 0 2px 4px #000; }
.ar-smith { color: #cdbb94; font-style: italic; }
.ar-purse { margin-left: auto; font-weight: 700; }
.ar-purse b { color: #ffd76a; font-size: 18px; }
.ar-close { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(196, 154, 82, .6); background: rgba(0, 0, 0, .3); color: #f1dfb4; font-size: 18px; cursor: pointer; }

.ar-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 340px) 1fr; }
.ar-side { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-right: 1px solid rgba(196, 154, 82, .2); overflow-y: auto; }
.ar-stage { width: 100%; height: 340px; display: block; cursor: grab; border-radius: 14px; background: radial-gradient(circle at 50% 70%, rgba(255, 150, 60, .22), rgba(0, 0, 0, .25) 70%); }
.ar-set { display: grid; gap: 4px; }
.ar-set div { display: flex; gap: 8px; align-items: center; }
.ar-set b { color: #f1dfb4; }
.ar-bars { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.ar-bar { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; font-size: 13px; color: #d8cbaa; }
.ar-bar i { position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: visible; }
.ar-bar b { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #b8863e, #ffd76a); transition: width .25s; }
.ar-bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #fff; opacity: .75; }
.ar-bar.up b { background: linear-gradient(90deg, #3e8a3a, #8fdc6a); }
.ar-bar.down b { background: linear-gradient(90deg, #8a2a1d, #e0664a); }
.ar-note { margin: 0; font-size: 13px; color: #a8987a; }

.ar-main { display: flex; flex-direction: column; min-height: 0; }
.ar-tabs { display: flex; gap: 6px; padding: 14px 18px 0; flex-wrap: wrap; }
.ar-tabs button {
	font: 700 14px 'Cinzel', serif; letter-spacing: 1px; color: #d8c9a4; cursor: pointer;
	background: none; border: 1px solid transparent; border-radius: 8px; padding: 7px 14px;
}
.ar-tabs button.on { color: #ffd76a; border-color: rgba(196, 154, 82, .6); background: rgba(196, 154, 82, .12); }
.ar-grid { flex: 1; overflow-y: auto; padding: 14px 18px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-content: start; }
.ar-item {
	display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px;
	background: linear-gradient(180deg, rgba(36, 58, 50, .9), rgba(22, 34, 30, .95)); border: 1px solid rgba(196, 154, 82, .4);
	transition: transform .12s, border-color .12s;
}
.ar-item:hover { transform: translateY(-2px); border-color: #c49a52; }
.ar-item.worn { border: 2px solid #ffd76a; box-shadow: 0 0 18px rgba(255, 215, 106, .2); }
.ar-item.legend { background: linear-gradient(180deg, rgba(74, 34, 20, .92), rgba(36, 18, 12, .96)); }
.ar-top { display: flex; align-items: center; gap: 8px; }
.ar-top h3 { margin: 0; font: 700 17px 'Cinzel', serif; color: #f1dfb4; flex: 1; }
.ar-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #a8432a; color: #fff; }
.ar-tag.own { background: #3e6e3a; }
.ar-item p { margin: 0; font-size: 14px; color: #d8cbaa; }
.ar-item ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ar-item li { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .3); color: #e8dcc0; }
.ar-foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: flex-end; }
.ar-btn {
	padding: 8px 14px; border-radius: 10px; cursor: pointer; font: 700 14px 'Cinzel', serif;
	border: 1px solid #c49a52; background: rgba(0, 0, 0, .25); color: #f1dfb4;
}
.ar-btn.buy { background: linear-gradient(180deg, #e0b866, #b8863e); color: #1d1608; }
.ar-btn:disabled { opacity: .45; cursor: default; }
.ar-on { font: 700 14px 'Cinzel', serif; color: #ffd76a; }

@media (max-width: 760px) {
	.ar-body { grid-template-columns: 1fr; overflow-y: auto; }
	.ar-side { border-right: 0; overflow: visible; }
	.ar-stage { height: 260px; }
	.ar-main { min-height: auto; }
	.ar-grid { overflow: visible; }
	.ar-smith { display: none; }
}
