/* ==========================================================================
   wordRPG dictionary — Artifact / Spacedruid Theme
   Refined obsidian-moss, oxidized brass, celestial geometry, readable stone.
   ========================================================================== */

:root {
  --bg-void: #0a0f11;
  --bg-deep: #0e1518;
  --surface-1: rgba(18, 27, 30, 0.88);
  --surface-2: rgba(24, 35, 39, 0.92);
  --surface-hover: rgba(30, 44, 48, 0.96);

  --border-subtle: rgba(196, 172, 124, 0.14);
  --border-brass: rgba(204, 178, 124, 0.32);
  --border-verdant: rgba(126, 194, 150, 0.36);

  --text-primary: #eae4d6;
  --text-secondary: #a8b5b2;
  --text-muted: #6e7d7b;

  --brass: #cfb279;
  --brass-soft: rgba(207, 178, 121, 0.14);
  --verdant: #7ec296;
  --verdant-soft: rgba(126, 194, 150, 0.12);
  --rose-miss: #c9867d;
  --rose-soft: rgba(201, 134, 125, 0.1);

  /* Mineral aspect tones (WUBRG + Neutral) */
  --aspect-W: #e2d8bc;
  --aspect-U: #7cb6d8;
  --aspect-B: #ad90c8;
  --aspect-R: #d98671;
  --aspect-G: #7ec296;
  --aspect-N: #98a7ab;

  --font-display: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 10px 30px -16px rgba(0, 0, 0, 0.72);
  --shadow-modal: 0 28px 80px -20px rgba(0, 0, 0, 0.88);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background-color: var(--bg-void);
  background-image:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(74, 126, 108, 0.17), transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 95%, rgba(164, 134, 82, 0.08), transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none'%3E%3Crect x='2' y='2' width='44' height='44' rx='3' fill='%23121c1e' fill-opacity='0.48' stroke='%23cfb279' stroke-opacity='0.075' stroke-width='0.9'/%3E%3Crect x='50' y='50' width='44' height='44' rx='3' fill='%23121c1e' fill-opacity='0.48' stroke='%23cfb279' stroke-opacity='0.075' stroke-width='0.9'/%3E%3Crect x='50' y='2' width='44' height='44' rx='3' fill='%230d1517' fill-opacity='0.52' stroke='%237ec296' stroke-opacity='0.065' stroke-width='0.9'/%3E%3Crect x='2' y='50' width='44' height='44' rx='3' fill='%230d1517' fill-opacity='0.52' stroke='%237ec296' stroke-opacity='0.065' stroke-width='0.9'/%3E%3Cpath d='M48 39 L53 48 L48 57 L43 48 Z' fill='%230a0f11' stroke='%23cfb279' stroke-opacity='0.14' stroke-width='0.8'/%3E%3Cpath d='M39 48 L48 43 L57 48 L48 53 Z' stroke='%237ec296' stroke-opacity='0.11' stroke-width='0.75'/%3E%3Ccircle cx='48' cy='48' r='1.5' fill='%237ec296' fill-opacity='0.22'/%3E%3Cpath d='M24 14 C26.5 19.5 28.5 21.5 34 24 C28.5 26.5 26.5 28.5 24 34 C21.5 28.5 19.5 26.5 14 24 C19.5 21.5 21.5 19.5 24 14 Z' stroke='%23cfb279' stroke-opacity='0.07' stroke-width='0.75'/%3E%3Cpath d='M72 62 C74.5 67.5 76.5 69.5 82 72 C76.5 74.5 74.5 76.5 72 82 C69.5 76.5 67.5 74.5 62 72 C67.5 69.5 69.5 67.5 72 62 Z' stroke='%23cfb279' stroke-opacity='0.07' stroke-width='0.75'/%3E%3Ccircle cx='72' cy='24' r='9' stroke='%237ec296' stroke-opacity='0.065' stroke-width='0.75' stroke-dasharray='2 3'/%3E%3Ccircle cx='24' cy='72' r='9' stroke='%237ec296' stroke-opacity='0.065' stroke-width='0.75' stroke-dasharray='2 3'/%3E%3Cpath d='M0 0 L5 0 L0 5 Z M96 0 L91 0 L96 5 Z M0 96 L5 96 L0 91 Z M96 96 L91 96 L96 91 Z' fill='%23cfb279' fill-opacity='0.08'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #0b1113 0%, #090d0f 100%);
  background-size: auto, auto, 96px 96px, auto;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient celestial astrolabe watermark */
.cosmos-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.astrolabe-bg {
  width: min(115vmax, 980px);
  height: min(115vmax, 980px);
  color: rgba(207, 178, 121, 0.055);
  transform: translateY(-6%);
}

/* Main layout */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.site-header h1 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Console / Input Panel */
.console-panel {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 22px 18px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
}

/* Subtle corner relic brackets */
.console-panel::before,
.console-panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(207, 178, 121, 0.34);
  border-style: solid;
  pointer-events: none;
}

.console-panel::before {
  top: -1px;
  left: -1px;
  border-width: 1.5px 0 0 1.5px;
  border-top-left-radius: var(--radius-lg);
}

.console-panel::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1.5px 1.5px 0;
  border-bottom-right-radius: var(--radius-lg);
}

.field-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.field-header label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.mono-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.textarea-frame {
  position: relative;
  border-radius: var(--radius-md);
  background: rgba(8, 13, 15, 0.78);
  border: 1px solid rgba(196, 172, 124, 0.16);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.textarea-frame:focus-within {
  border-color: var(--border-verdant);
  box-shadow: 0 0 0 3px rgba(126, 194, 150, 0.08);
}

#words-input {
  display: block;
  width: 100%;
  min-height: 92px;
  max-height: 280px;
  resize: vertical;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 13px 15px;
  outline: none;
}

#words-input::placeholder {
  color: rgba(168, 181, 178, 0.36);
}

.console-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.hint-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(207, 178, 121, 0.2);
  color: var(--text-secondary);
}

.button-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-radius: 9px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, rgba(44, 78, 66, 0.92), rgba(30, 56, 48, 0.96));
  border: 1px solid rgba(126, 194, 150, 0.42);
  color: #edf5ef;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(53, 94, 79, 0.96), rgba(36, 67, 57, 0.98));
  border-color: rgba(154, 214, 175, 0.62);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  border-color: var(--border-brass);
  color: var(--text-primary);
  background: rgba(207, 178, 121, 0.06);
}

.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 1.8px solid rgba(237, 245, 239, 0.28);
  border-top-color: #a9e0bc;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-primary.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Results Section */
.results-section {
  margin-top: 26px;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 2px;
  flex-wrap: wrap;
}

.status-counts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}

.stat-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.stat-pill.valid .dot { background: var(--verdant); }
.stat-pill.invalid .dot { background: var(--rose-miss); }
.stat-pill.pending .dot { background: var(--brass); animation: pulse 1s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.btn-inline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 5px 11px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.btn-inline:hover {
  border-color: var(--border-brass);
  color: var(--text-primary);
}

/* Misses / Unrecognized strip */
.misses-tray {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 15px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: rgba(24, 18, 20, 0.56);
  border: 1px solid rgba(201, 134, 125, 0.18);
}

.bare-valid-tray {
  background: rgba(18, 28, 25, 0.56);
  border-color: rgba(126, 194, 150, 0.22);
}

.tray-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-miss);
  flex-shrink: 0;
}

.bare-valid-tray .tray-label {
  color: var(--verdant);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.miss-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--rose-soft);
  border: 1px solid rgba(201, 134, 125, 0.22);
  color: #d6a49d;
  text-decoration: line-through;
  text-decoration-color: rgba(201, 134, 125, 0.5);
}

.miss-chip.is-error {
  text-decoration: none;
  color: #d9b589;
  border-color: rgba(217, 181, 137, 0.26);
  background: rgba(217, 181, 137, 0.08);
}

.bare-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--verdant-soft);
  border: 1px solid rgba(126, 194, 150, 0.26);
  color: #b5ddc3;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.cards-grid.single-card {
  grid-template-columns: minmax(0, 1fr);
}

/* Artifact Word Card */
.word-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  padding: 18px 19px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  color: inherit;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.16s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  animation: cardReveal 0.28s ease both;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle mineral left accent */
.word-card::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--card-accent, var(--brass));
  opacity: 0.72;
  transition: opacity 0.18s ease, top 0.18s ease, bottom 0.18s ease;
}

.word-card:hover,
.word-card:focus-visible {
  background: var(--surface-hover);
  border-color: var(--border-brass);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.85);
  outline: none;
}

.word-card:hover::before,
.word-card:focus-visible::before {
  opacity: 1;
  top: 8px;
  bottom: 8px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.aspect-gem {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  transform: rotate(45deg);
  flex-shrink: 0;
  background: var(--gem-color, var(--aspect-N));
  box-shadow: 0 0 10px -1px var(--gem-color, var(--aspect-N));
}

.card-word {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  word-break: break-word;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sense-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(196, 172, 124, 0.12);
}

.wubrg-pill {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 999px;
  color: #f3ecd9;
  background: linear-gradient(90deg, rgba(226, 216, 188, 0.2), rgba(124, 182, 216, 0.2), rgba(173, 144, 200, 0.2), rgba(217, 134, 113, 0.2), rgba(126, 194, 150, 0.2));
  border: 1px solid rgba(207, 178, 121, 0.4);
}

.pos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 11px;
}

.pos-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--brass);
  background: var(--brass-soft);
  border: 1px solid rgba(207, 178, 121, 0.2);
  padding: 1px 7px;
  border-radius: 5px;
}

.card-senses {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-sense-item {
  font-size: 0.87rem;
  line-height: 1.48;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cards-grid.single-card .card-sense-item {
  -webkit-line-clamp: 4;
}

.card-sense-pos {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-right: 6px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(196, 172, 124, 0.09);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.card-footer-cta {
  color: var(--verdant);
  opacity: 0.82;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.word-card:hover .card-footer-cta {
  opacity: 1;
  transform: translateX(2px);
}

/* Loading skeleton card */
.word-card.skeleton {
  cursor: default;
  pointer-events: none;
  min-height: 148px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(207, 178, 121, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  margin-bottom: 10px;
}

.skeleton-line.title { width: 42%; height: 18px; margin-bottom: 14px; }
.skeleton-line.short { width: 68%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 9, 11, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.16s ease;
}

.modal-backdrop[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-panel {
  width: 100%;
  max-width: 680px;
  max-height: min(84vh, 760px);
  display: flex;
  flex-direction: column;
  background: #111a1d;
  border: 1px solid var(--border-brass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  outline: none;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid rgba(196, 172, 124, 0.14);
  background: linear-gradient(180deg, rgba(28, 42, 46, 0.55), transparent);
}

.modal-word-row {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.modal-word-row h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.modal-meta {
  margin-top: 5px;
  color: var(--text-muted);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover:not(:disabled) {
  border-color: var(--border-brass);
  color: var(--text-primary);
  background: rgba(207, 178, 121, 0.08);
}

.icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.pos-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-bottom: 1px solid rgba(196, 172, 124, 0.1);
  overflow-x: auto;
  flex-shrink: 0;
}

.pos-tab {
  background: transparent;
  border: 1px solid rgba(196, 172, 124, 0.14);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pos-tab:hover {
  border-color: var(--border-brass);
  color: var(--text-primary);
}

.pos-tab[aria-selected="true"] {
  background: var(--verdant-soft);
  border-color: var(--border-verdant);
  color: #dff3e6;
}

.modal-senses {
  padding: 16px 22px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.sense-entry {
  padding: 13px 15px;
  border-radius: 10px;
  background: rgba(9, 14, 16, 0.62);
  border: 1px solid rgba(196, 172, 124, 0.11);
}

.sense-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.sense-tags {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.sense-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.aspect-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.aspect-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.rarity-badge {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.rarity-badge.rar-COMMON { color: #b8c2be; border-color: rgba(184, 194, 190, 0.22); }
.rarity-badge.rar-UNCOMMON { color: #8fd1a6; border-color: rgba(126, 194, 150, 0.3); background: rgba(126, 194, 150, 0.08); }
.rarity-badge.rar-RARE { color: #dec183; border-color: rgba(207, 178, 121, 0.36); background: rgba(207, 178, 121, 0.1); }
.rarity-badge.rar-MYTHIC { color: #e29980; border-color: rgba(217, 134, 113, 0.42); background: rgba(217, 134, 113, 0.12); }

.sense-conf {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sense-def {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.56;
  color: var(--text-primary);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 8px 16px;
  border-radius: 999px;
  background: #172427;
  border: 1px solid var(--border-verdant);
  color: #e4f3e9;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

@media (max-width: 600px) {
  .app-shell {
    padding: 22px 14px 56px;
  }

  .console-panel {
    padding: 16px;
  }

  .hint-text {
    display: none;
  }

  .modal-panel {
    max-height: 88vh;
  }
}
