/* WoOOL Portal Armory — character sheet layout (mir-theme aligned) */

.user-table a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.user-table a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.armory-root {
  max-width: 980px;
  margin: 0 auto;
}

.armory-login {
  max-width: 420px;
  margin: 24px auto;
}

.armory-login label {
  display: block;
  margin: 10px 0 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.armory-login input {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.armory-login input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.armory-char-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.armory-char-tab {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--panel);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: border-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    background var(--duration) var(--ease);
}

.armory-char-tab.active,
.armory-char-tab:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--panel-hover);
}

.armory-char-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
}

.armory-sheet {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 30% 20%, var(--accent-glow), transparent 55%),
    linear-gradient(180deg, var(--panel) 0%, var(--bg-elevated) 100%);
  box-shadow: var(--shadow-md), inset 0 0 60px rgba(0, 0, 0, 0.35);
  min-height: 520px;
}

.armory-left {
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent);
}

.armory-tab-label {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 12px;
  background: var(--surface);
}

.armory-stat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.armory-stat-row label {
  color: var(--text-secondary);
}

.armory-stat-row .val {
  min-width: 88px;
  padding: 3px 8px;
  text-align: center;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.armory-exp-bar {
  height: 8px;
  margin: 4px 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  overflow: hidden;
}

.armory-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-solid), var(--accent));
}

.armory-right {
  position: relative;
  padding: 12px 16px 16px;
}

.armory-name {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.armory-guild {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  min-height: 16px;
}

.armory-doll-wrap {
  position: relative;
  /* CharacterPanel (339x373) plus room for body anchor at (-123, -28). */
  width: 462px;
  height: 401px;
  margin: 0 auto 12px;
  background:
    radial-gradient(circle at 50% 45%, var(--accent-dim), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.35));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.armory-panel {
  position: absolute;
  left: 44px;
  top: 5px;
  width: 339px;
  height: 373px;
}

.armory-paperdoll {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.armory-paperdoll img {
  position: absolute;
  left: 0;
  top: 0;
  image-rendering: pixelated;
  max-width: none;
}

.armory-slots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.armory-doll-hits {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.armory-doll-hit {
  position: absolute;
  pointer-events: auto;
  cursor: default;
}

.armory-slot {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 2px solid var(--border-bright);
  border-radius: var(--radius-xs);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elevated) 100%);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: default;
}

.armory-slot img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.armory-slot.empty::after {
  content: '';
  width: 18px;
  height: 18px;
  opacity: 0.2;
  border: 1px dashed var(--muted);
  border-radius: 2px;
}

.armory-item-tip {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  min-width: 160px;
  max-width: 320px;
  padding: 8px 10px;
  background: rgba(10, 15, 30, 0.96);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  line-height: 1.45;
}

.armory-tip-name {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 2px;
}

.armory-tip-type {
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.armory-tip-line {
  color: var(--text-secondary);
}

.armory-tip-stat {
  color: var(--text);
}

.armory-combat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  max-width: 420px;
  margin: 0 auto;
}

.armory-combat-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.armory-combat-row label {
  color: var(--text-secondary);
}

.armory-combat-row .val {
  padding: 4px 8px;
  text-align: center;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
}

.armory-error {
  color: var(--danger);
  padding: 12px;
  text-align: center;
}

.armory-loading {
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

@media (max-width: 760px) {
  .armory-sheet {
    grid-template-columns: 1fr;
  }
  .armory-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .armory-doll-wrap {
    width: 100%;
    max-width: 462px;
  }
}
