/* Logic Consecration: Main Reading Hall */

.lgc-consecration-screen {
  --lgc-ink: #241f2c;
  --lgc-ink-dark: #17141d;
  --lgc-paper: #f5dfbd;
  --lgc-gold: #d9a94d;
  --lgc-amber: #efc76d;
  --lgc-copper: #bd6852;
  --lgc-blue: #4e7d8c;
  --lgc-violet: #65548f;
  --lgc-green: #698a5d;
  color: var(--lgc-paper);
  overflow-y: auto;
}

.lgc-consecration-topbar {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 10px;
}

.lgc-consecration-topbar div {
  min-width: 0;
  text-align: center;
}

.lgc-consecration-topbar span {
  color: var(--text-secondary);
  display: block;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lgc-consecration-topbar strong {
  color: var(--text-primary);
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
  line-height: 1;
}

.lgc-consecration-topbar p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 900;
  margin: 0;
  text-align: right;
}

.lgc-consecration-progress {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.lgc-consecration-progress span {
  background: linear-gradient(90deg, var(--lgc-gold), var(--lgc-blue), var(--lgc-copper), var(--lgc-violet), var(--lgc-green));
  display: block;
  height: 100%;
  transition: width 420ms ease;
}

.lgc-consecration-stage {
  background:
    radial-gradient(circle at 50% 8%, rgba(239, 199, 109, 0.18), transparent 25%),
    radial-gradient(circle at 14% 36%, rgba(189, 104, 82, 0.2), transparent 27%),
    radial-gradient(circle at 86% 38%, rgba(78, 125, 140, 0.18), transparent 28%),
    repeating-linear-gradient(90deg, rgba(245, 223, 189, 0.048) 0 1px, transparent 1px 84px),
    linear-gradient(180deg, rgba(51, 42, 56, 0.78) 0%, rgba(32, 39, 55, 0.8) 54%, rgba(18, 21, 29, 0.86) 100%),
    url("../img/arena-logic-library.jpg") center center / cover no-repeat;
  border: 1px solid rgba(245, 223, 189, 0.22);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  height: min(760px, calc(100vh - 126px));
  min-height: 640px;
  overflow: hidden;
  position: relative;
}

.lgc-library-architecture {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.lgc-library-architecture::before {
  background:
    radial-gradient(ellipse at 50% -4%, rgba(239, 199, 109, 0.16) 0 28%, transparent 29%),
    linear-gradient(90deg, transparent 0 7%, rgba(245, 223, 189, 0.07) 7% 8%, transparent 8% 92%, rgba(245, 223, 189, 0.07) 92% 93%, transparent 93%);
  content: "";
  inset: 0;
  position: absolute;
}

.lgc-library-architecture span {
  background:
    repeating-linear-gradient(180deg, rgba(245, 223, 189, 0.09) 0 4px, transparent 4px 16px),
    linear-gradient(180deg, rgba(245, 223, 189, 0.16), rgba(18, 21, 29, 0.9));
  border: 1px solid rgba(245, 223, 189, 0.12);
  bottom: 0;
  position: absolute;
  top: 8%;
  width: 5px;
}

.lgc-library-architecture span:nth-child(1) { left: 10%; }
.lgc-library-architecture span:nth-child(2) { left: 28%; }
.lgc-library-architecture span:nth-child(3) { left: 50%; }
.lgc-library-architecture span:nth-child(4) { right: 28%; }
.lgc-library-architecture span:nth-child(5) { right: 10%; }

.lgc-floor-lines {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.lgc-floor-lines span {
  background: linear-gradient(90deg, transparent, rgba(239, 199, 109, 0.26), transparent);
  bottom: 8%;
  height: 1px;
  left: 8%;
  position: absolute;
  right: 8%;
  transform-origin: 50% 50%;
}

.lgc-floor-lines span:nth-child(1) { transform: rotate(0deg); }
.lgc-floor-lines span:nth-child(2) { transform: rotate(9deg); }
.lgc-floor-lines span:nth-child(3) { transform: rotate(-9deg); }
.lgc-floor-lines span:nth-child(4) { bottom: 18%; }

.lgc-reading-table {
  bottom: 0;
  height: 150px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%);
  width: min(1000px, 78%);
  z-index: 2;
}

.lgc-reading-table span {
  background:
    repeating-linear-gradient(90deg, rgba(245, 223, 189, 0.08) 0 1px, transparent 1px 82px),
    linear-gradient(180deg, #705842, #29232a);
  border: 1px solid rgba(245, 223, 189, 0.16);
  border-radius: 52% 52% 12px 12px / 15% 15% 12px 12px;
  bottom: 0;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.34);
  height: 124px;
  left: 0;
  position: absolute;
  right: 0;
}

.lgc-reading-table i {
  background: linear-gradient(90deg, var(--lgc-gold), var(--lgc-copper), var(--lgc-blue), var(--lgc-violet));
  border-radius: 999px;
  bottom: 92px;
  box-shadow: 0 0 20px rgba(239, 199, 109, 0.34);
  height: 9px;
  left: 22%;
  position: absolute;
  right: 22%;
}

.lgc-stand {
  background:
    radial-gradient(circle at 50% 46%, rgba(239, 199, 109, 0.14), transparent 34%),
    repeating-radial-gradient(circle at 50% 46%, rgba(35, 29, 38, 0.1) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, #ead1aa, #9c7d63);
  border: 10px solid rgba(42, 37, 43, 0.98);
  border-radius: 8px;
  box-shadow: inset 0 0 34px rgba(35, 29, 38, 0.25), 0 28px 50px rgba(0, 0, 0, 0.34);
  color: var(--lgc-ink);
  height: clamp(500px, 57vw, 545px);
  left: 50%;
  padding: 15px 16px 18px;
  position: absolute;
  top: 4%;
  transform: translateX(-50%);
  width: min(760px, 61%);
  z-index: 5;
}

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

.lgc-stand__title span,
.lgc-tome-group__label span,
.lgc-plaque > span {
  color: rgba(35, 29, 38, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lgc-stand__title strong {
  color: #634331;
  font-family: var(--font-display);
  font-size: 1.26rem;
}

.lgc-stand__groups {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 210px;
}

.lgc-tome-group {
  border: 1px solid rgba(35, 29, 38, 0.13);
  border-radius: 7px;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  opacity: 0.62;
  padding: 9px;
  transition: opacity 600ms ease, box-shadow 600ms ease, background 600ms ease;
}

.lgc-tome-group.is-lit {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 20px rgba(239, 199, 109, 0.18), 0 0 18px rgba(239, 199, 109, 0.18);
  opacity: 1;
}

.lgc-tome-group--solen.is-lit { border-color: rgba(216, 165, 75, 0.62); }
.lgc-tome-group--aldra.is-lit { border-color: rgba(189, 104, 82, 0.58); }
.lgc-tome-group--pellan.is-lit { border-color: rgba(78, 125, 140, 0.56); }
.lgc-tome-group--veth.is-lit { border-color: rgba(102, 84, 143, 0.56); }

.lgc-tome-group__label {
  margin-bottom: 7px;
}

.lgc-tome-group__label strong {
  color: #634331;
  display: block;
  font-size: 0.86rem;
  line-height: 1.1;
}

.lgc-tome-group__slots {
  display: grid;
  gap: 7px;
}

.lgc-artifact {
  background: linear-gradient(180deg, rgba(42, 37, 43, 0.12), rgba(42, 37, 43, 0.18));
  border: 1px dashed rgba(42, 37, 43, 0.24);
  border-radius: 5px;
  display: grid;
  gap: 4px;
  min-height: 62px;
  opacity: 0.62;
  padding: 7px;
  position: relative;
}

.lgc-artifact.is-lit {
  background: linear-gradient(90deg, rgba(87, 48, 40, 0.94), rgba(125, 78, 51, 0.92));
  border-color: rgba(255, 235, 176, 0.44);
  box-shadow: 0 0 13px rgba(239, 199, 109, 0.18);
  color: #fff3c5;
  opacity: 1;
}

.lgc-artifact.is-pinned {
  animation: lgc-pin 520ms ease both;
}

.lgc-artifact span {
  align-items: center;
  background: rgba(255, 243, 199, 0.9);
  border-radius: 50%;
  color: var(--lgc-ink);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.lgc-artifact strong {
  font-size: 0.72rem;
  line-height: 1.05;
}

.lgc-artifact i {
  background: rgba(255, 243, 199, 0.4);
  border-radius: 999px;
  height: 4px;
}

.lgc-artifact.is-missing:not(.is-lit) strong {
  color: rgba(35, 29, 38, 0.55);
}

.lgc-plaque {
  background:
    linear-gradient(180deg, rgba(55, 44, 45, 0.94), rgba(28, 24, 32, 0.96)),
    repeating-linear-gradient(0deg, rgba(245, 223, 189, 0.04) 0 1px, transparent 1px 18px);
  border: 6px solid rgba(106, 72, 46, 0.98);
  border-radius: 8px;
  bottom: 18px;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.35), 0 18px 28px rgba(0, 0, 0, 0.22);
  color: var(--lgc-paper);
  cursor: default;
  left: 18px;
  min-height: 230px;
  padding: 14px;
  position: absolute;
  right: 18px;
  text-align: left;
}

.lgc-plaque.is-target {
  cursor: pointer;
  outline: 3px solid rgba(239, 199, 109, 0.55);
  outline-offset: 4px;
}

.lgc-plaque.is-written {
  box-shadow: inset 0 0 32px rgba(239, 199, 109, 0.18), 0 0 30px rgba(239, 199, 109, 0.25);
}

.lgc-plaque > span {
  color: rgba(245, 223, 189, 0.76);
}

.lgc-plaque__lines {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.lgc-plaque__lines p {
  border-left: 3px solid rgba(239, 199, 109, 0.42);
  color: rgba(245, 223, 189, 0.34);
  font-weight: 900;
  line-height: 1.28;
  margin: 0;
  padding: 8px 10px;
  transition: color 400ms ease, transform 400ms ease, background 400ms ease;
}

.lgc-plaque__lines p.is-written {
  animation: lgc-write 650ms ease both;
  animation-delay: calc(var(--line) * 240ms);
  background: rgba(245, 223, 189, 0.06);
  color: #fff3c5;
}

.lgc-master,
.lgc-apprentice {
  background: transparent;
  border: 0;
  color: var(--lgc-paper);
  cursor: default;
  padding: 0;
  position: absolute;
  text-align: center;
  z-index: 7;
}

.lgc-master:disabled,
.lgc-apprentice:disabled,
.lgc-plaque:disabled {
  pointer-events: none;
}

.lgc-master.is-target,
.lgc-apprentice.is-target {
  cursor: pointer;
  filter: drop-shadow(0 0 18px rgba(239, 199, 109, 0.72));
}

.lgc-master--solen { left: 3%; top: 20%; }
.lgc-master--aldra { right: 3%; top: 20%; }
.lgc-master--pellan { left: 5%; bottom: 16%; }
.lgc-master--veth { right: 5%; bottom: 16%; }

.lgc-master__sprite,
.lgc-apprentice__sprite {
  display: block;
  height: 126px;
  margin: 0 auto 6px;
  position: relative;
  width: 82px;
}

.lgc-master__sprite i,
.lgc-apprentice__sprite i {
  background: linear-gradient(180deg, #f1bf93, #a86b63);
  border: 2px solid rgba(245, 223, 189, 0.16);
  border-radius: 50% 50% 42% 42%;
  height: 48px;
  left: 17px;
  position: absolute;
  top: 0;
  width: 48px;
}

.lgc-master__sprite b,
.lgc-apprentice__sprite b {
  background: linear-gradient(180deg, var(--lgc-blue), #2a4c60);
  border-radius: 24px 24px 8px 8px;
  bottom: 0;
  height: 88px;
  left: 8px;
  position: absolute;
  width: 66px;
}

.lgc-master--solen .lgc-master__sprite b { background: linear-gradient(180deg, var(--lgc-gold), #715126); }
.lgc-master--aldra .lgc-master__sprite b { background: linear-gradient(180deg, var(--lgc-copper), #6d382f); }
.lgc-master--pellan .lgc-master__sprite b { background: linear-gradient(180deg, var(--lgc-blue), #2a4c60); }
.lgc-master--veth .lgc-master__sprite b { background: linear-gradient(180deg, var(--lgc-violet), #3a3156); }

.lgc-master__sprite em,
.lgc-apprentice__sprite em {
  background: rgba(245, 223, 189, 0.82);
  border-radius: 999px;
  bottom: 22px;
  height: 6px;
  left: -1px;
  position: absolute;
  right: -1px;
}

.lgc-master__name,
.lgc-master__role,
.lgc-apprentice strong {
  display: block;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.72);
}

.lgc-master__name,
.lgc-apprentice strong {
  font-family: var(--font-display);
  font-size: 1rem;
}

.lgc-master__role {
  color: rgba(245, 223, 189, 0.78);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lgc-master__line {
  background: rgba(23, 20, 29, 0.88);
  border: 1px solid rgba(245, 223, 189, 0.2);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
  color: #fff4ca;
  display: block;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
  margin-top: 7px;
  max-width: 180px;
  padding: 8px 9px;
}

.lgc-apprentice {
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
}

.lgc-apprentice__pieces {
  background: linear-gradient(90deg, var(--lgc-violet), var(--lgc-gold));
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(239, 199, 109, 0.42);
  display: block;
  height: 9px;
  margin: 0 auto 5px;
  opacity: 1;
  width: 86px;
}

.lgc-apprentice.has-pinned .lgc-apprentice__pieces {
  opacity: 0.25;
}

.lgc-consecration-cue {
  background: rgba(23, 20, 29, 0.86);
  border: 1px solid rgba(245, 223, 189, 0.22);
  border-radius: 8px;
  bottom: 4%;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  left: 4%;
  max-width: 330px;
  padding: 15px;
  position: absolute;
  z-index: 8;
}

.lgc-consecration-cue span {
  color: var(--lgc-gold);
  display: block;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lgc-consecration-cue h1 {
  color: #fff4ca;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  line-height: 1;
  margin: 4px 0 8px;
}

.lgc-consecration-cue p {
  color: rgba(245, 223, 189, 0.9);
  font-weight: 850;
  line-height: 1.28;
  margin: 0 0 8px;
}

.lgc-consecration-cue strong,
.lgc-proof-callout {
  background: rgba(239, 199, 109, 0.14);
  border: 1px solid rgba(239, 199, 109, 0.22);
  border-radius: 999px;
  color: #fff4ca;
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 7px 10px;
}

.lgc-proof-callout {
  border-radius: 8px;
  margin-bottom: 8px;
}

.lgc-title-card {
  align-items: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(239, 199, 109, 0.24), transparent 28%),
    radial-gradient(circle at 16% 42%, rgba(78, 125, 140, 0.18), transparent 24%),
    radial-gradient(circle at 82% 42%, rgba(102, 84, 143, 0.2), transparent 26%),
    linear-gradient(180deg, #342a3d, #151722);
  border: 1px solid rgba(245, 223, 189, 0.24);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(760px, calc(100vh - 126px));
  overflow: hidden;
  padding: 34px;
  position: relative;
  text-align: center;
}

.lgc-title-card__crest {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 54px);
  margin-bottom: 20px;
}

.lgc-title-card__crest span {
  border: 3px solid rgba(245, 223, 189, 0.38);
  border-radius: 14px;
  box-shadow: 0 0 18px rgba(239, 199, 109, 0.2);
  height: 54px;
}

.lgc-title-card__crest span:nth-child(1) { background: var(--lgc-gold); }
.lgc-title-card__crest span:nth-child(2) { background: var(--lgc-blue); }
.lgc-title-card__crest span:nth-child(3) { background: var(--lgc-copper); }
.lgc-title-card__crest span:nth-child(4) { background: var(--lgc-violet); }

.lgc-title-card > span {
  color: var(--lgc-gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lgc-title-card p {
  color: rgba(245, 223, 189, 0.9);
  font-weight: 850;
  line-height: 1.28;
  margin: 8px auto 0;
  max-width: 740px;
}

.lgc-title-card h2 {
  color: #fff4ca;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  line-height: 0.96;
  margin: 24px 0 4px;
}

.lgc-title-card h1 {
  color: var(--lgc-gold);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: 0.88;
  margin: 0 0 12px;
}

.lgc-title-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 20px;
}

.lgc-title-stars span {
  color: rgba(245, 223, 189, 0.3);
  font-size: 1.6rem;
}

.lgc-title-stars span.is-filled {
  color: var(--lgc-gold);
  text-shadow: 0 0 14px rgba(239, 199, 109, 0.6);
}

@keyframes lgc-pin {
  0% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@keyframes lgc-write {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .lgc-consecration-topbar {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .lgc-consecration-topbar p {
    text-align: center;
  }

  .lgc-consecration-stage {
    height: auto;
    min-height: 980px;
    overflow: visible;
  }

  .lgc-stand {
    left: 4%;
    right: 4%;
    top: 18px;
    transform: none;
    width: auto;
  }

  .lgc-stand__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lgc-plaque {
    min-height: 280px;
  }

  .lgc-master--solen,
  .lgc-master--aldra,
  .lgc-master--pellan,
  .lgc-master--veth,
  .lgc-apprentice,
  .lgc-consecration-cue {
    position: relative;
  }

  .lgc-master--solen,
  .lgc-master--aldra,
  .lgc-master--pellan,
  .lgc-master--veth {
    left: auto;
    right: auto;
    top: 610px;
    bottom: auto;
    display: inline-block;
    margin: 8px 4%;
    width: 40%;
  }

  .lgc-apprentice {
    bottom: auto;
    display: block;
    left: auto;
    margin: 12px auto 0;
    top: 610px;
    transform: none;
    width: 180px;
  }

  .lgc-consecration-cue {
    bottom: auto;
    left: auto;
    margin: 26px auto;
    max-width: calc(100% - 36px);
    top: 620px;
  }
}
