/* Extracted from styles.css during client modularization. */
/* Load order matters; keep this file in the same relative position. */

/* MyClasses render styles, mapped onto Spellbook palette */
.wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 2.25rem;
}

.sheet{
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 176, 138, 0.92);
  box-shadow: var(--shadow-deep), var(--shadow-tint);
  overflow:hidden;
}

.sheet::before,
.sheet::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
}

.sheet::before{
  background:
    radial-gradient(1200px 420px at 40% 0%, rgba(255, 255, 255, 0.20), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(31, 77, 122, 0.06), transparent 65%),
    radial-gradient(840px 620px at 20% 70%, rgba(140, 47, 42, 0.05), transparent 66%),
    linear-gradient(to bottom, rgba(246, 237, 216, 0.18), rgba(242, 227, 198, 0.12));
  opacity: 0.28;
}


.sheet::after{
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.055) 0px, rgba(0,0,0,0.055) 1px, transparent 1px, transparent 9px);
  opacity: 0.04;
  mix-blend-mode: multiply;
}

.sheetHeader{
  position: relative;
  padding: 1rem 1.05rem 0.85rem;
  border-bottom: 1px solid rgba(201, 176, 138, 0.75);
  display:flex;
  gap: 0.85rem 1rem;
  align-items:flex-start;
  justify-content: space-between;
  flex-wrap:wrap;
}

.sheetHeader h1{
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

.metaRow{
  display:flex;
  flex-wrap:wrap;
  gap:0.35rem 0.45rem;
  margin-top: 0.45rem;
}

.tabs{
  display:flex;
  flex-wrap:wrap;
  gap:0.35rem;
  align-items:center;
}

.tabBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 176, 138, 0.92);
  background: rgba(255, 255, 255, 0.30);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor:pointer;
  user-select:none;
}

.tabBtn[data-active="true"]{
  border-color: rgba(122, 78, 42, 0.95);
  background: rgba(255, 255, 255, 0.52);
}

.tabBtn:hover{
  transform: translateY(-1px);
}

.content{
  position: relative;
  padding: 0.95rem 1.05rem 1.15rem;
}

.section{
  margin-top: 0.95rem;
}

.inlineTitle{
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dividerBig{
  height: 1px;
  background: rgba(201, 176, 138, 0.78);
  margin: 1rem 0;
}

.tableCard{
  border: 1px solid rgba(201, 176, 138, 0.80);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.26);
  overflow:hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14), 0 16px 40px rgba(31, 77, 122, 0.05);
}

.tableWrap{
  overflow:auto;
}

.tableCard table{
  width:100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tableCard th,
.tableCard td{
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(201, 176, 138, 0.55);
  vertical-align: top;
}

.tableCard th{
  text-align:left;
  color: rgba(47, 42, 34, 0.85);
  background: rgba(255, 255, 255, 0.24);
}

.error{
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(140, 47, 42, 0.65);
  border-radius: var(--radius-md);
  background: rgba(140, 47, 42, 0.08);
}


/* Header actions */
.summary-dot.summary-dot-class{
  background: rgba(31, 77, 122, 0.92);
  box-shadow: 0 0 0 3px rgba(31, 77, 122, 0.16);
}

/* Classes sheet: more paper and scroll-like */
.sheet{
  background-image:
    var(--noise-coarse),
    var(--noise-fine),
    radial-gradient(1200px 520px at 40% 0%, rgba(255, 255, 255, 0.38), transparent 60%),
    radial-gradient(980px 520px at 92% 20%, rgba(31, 77, 122, 0.10), transparent 64%),
    radial-gradient(900px 640px at 18% 75%, rgba(140, 47, 42, 0.09), transparent 66%),
    linear-gradient(to bottom, rgba(246, 237, 216, 0.96), rgba(234, 214, 178, 0.90));
  background-size:
    220px 220px,
    140px 140px,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

.sheetHeader{
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.00));
}

.sheetHeader::after{
  content:"";
  position:absolute;
  left: 1.05rem;
  right: 1.05rem;
  bottom: -1px;
  height: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(122, 78, 42, 0.35), transparent 62%),
    radial-gradient(circle at 20% 0%, rgba(122, 78, 42, 0.22), transparent 60%),
    radial-gradient(circle at 80% 0%, rgba(122, 78, 42, 0.22), transparent 60%);
  opacity: 0.55;
  pointer-events:none;
}

.sheetTitle h1{
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}

.legacyTag{
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.64;
}

.intro p:first-child::first-letter{
  float:left;
  font-size: 2.75rem;
  line-height: 0.95;
  padding: 0.05rem 0.35rem 0 0;
  color: rgba(122, 78, 42, 0.95);
}

/* Clearer feature headers and section separation */
.section{
  margin-top: 0.65rem;
}

.h2{
  margin: 1.15rem 0 0.55rem;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(47, 42, 34, 0.88);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(201, 176, 138, 0.72);
}

.h3{
  margin: 0.95rem 0 0.5rem;
  padding: 0.62rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(201, 176, 138, 0.82);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12), 0 14px 30px rgba(31, 77, 122, 0.05);
  font-weight: 720;
}

.h4{
  margin: 0.75rem 0 0.4rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.secMark{
  display:inline-flex;
  width: 1.35rem;
  justify-content:center;
  opacity: 0.62;
  margin-right: 0.2rem;
}

.secTitle{
  display:inline;
}

.section-depth-3 .body,
.section-depth-4 .body{
  padding-left: 0.25rem;
  border-left: 2px solid rgba(201, 176, 138, 0.55);
  margin-left: 0.2rem;
}

/* Better tables */
.tableFancy{
  background: rgba(255, 255, 255, 0.24);
}

.progressTable{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
}

.progressTable thead th{
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(47, 42, 34, 0.86);
  background: rgba(255, 255, 255, 0.34);
  border-bottom: 1px solid rgba(201, 176, 138, 0.68);
}

.progressTable thead tr:first-child th{
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.22));
}

.progressTable th,
.progressTable td{
  padding: 0.58rem 0.66rem;
  border-bottom: 1px solid rgba(201, 176, 138, 0.48);
}

.progressTable tbody tr:nth-child(odd){
  background: rgba(255, 255, 255, 0.16);
}

.progressTable tbody tr:hover{
  background: rgba(122, 78, 42, 0.12);
}

.slotGroup{
  text-align:center;
}

.slotSub{
  text-align:center;
  letter-spacing: 0.18em;
}

.numCol{
  text-align:center;
  white-space:nowrap;
}

.levelCol{
  font-weight: 740;
}

.featuresList{
  display:flex;
  flex-direction:column;
  gap: 0.24rem;
}

.featuresItem{
  position:relative;
  padding-left: 0.85rem;
}

.featuresItem::before{
  content:"\2022";
  position:absolute;
  left:0;
  opacity: 0.65;
}

/* Feats placeholder */
.placeholder{
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.25rem;
}

    

/* Feats */
.summary-dot-feat{
  background: rgba(91, 47, 122, 0.95);
  box-shadow: 0 0 0 2px rgba(91, 47, 122, 0.25);
}

.pill-req{
  border-color: rgba(91, 47, 122, 0.45);
  background: linear-gradient(to bottom, rgba(240, 231, 246, 0.95), rgba(225, 207, 240, 0.88));
  color: rgba(91, 47, 122, 0.95);
}


.pill-demi{
  border-color: rgba(44, 102, 88, 0.45);
  background: linear-gradient(to bottom, rgba(226, 246, 240, 0.95), rgba(196, 233, 222, 0.88));
  color: rgba(28, 84, 72, 0.98);
}

.feat-card-actions{
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  margin-top: 0.1rem;
  z-index: 2;
  margin-left: auto;
}

.spell-meta{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  width: 100%;
}

.feat-meta-left{
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.feat-action-btn{
  width: 26px;
  height: 26px;
  border-radius: 0.45rem;
  border: 1px solid rgba(201, 176, 138, 0.92);
  background: rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.feat-action-btn:hover{
  border-color: rgba(122, 78, 42, 0.98);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.feat-action-btn:focus-visible{
  outline: 2px solid rgba(122, 78, 42, 0.6);
  outline-offset: 2px;
}

.feat-action-btn::before{
  content: "";
  width: 14px;
  height: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.feat-action-delete::before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='rgba(140,47,42,0.9)' stroke-width='2.6' stroke-linecap='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E");
}

.feat-action-edit::before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='rgba(31,77,122,0.9)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l4.5-1 9-9-3.5-3.5-9 9L4 20z'/%3E%3Cpath d='M13.5 6.5l3.5 3.5'/%3E%3C/svg%3E");
}
.race-card{
  position: relative;
}
.race-card::before{
  content: "";
  position: absolute;
  inset: 0.35rem;
  background: var(--race-bg, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.05) brightness(0.78);
  mix-blend-mode: multiply;
  opacity: 0;
  display: none;
  transition: opacity 0.12s ease;
  pointer-events: none;
  border-radius: inherit;
}
.race-card.expanded::before{
  display: block;
  opacity: 0.28;
}
.feat-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin-top: 0.25rem;
  color: rgba(47, 42, 34, 0.85);
  font-size: 0.95rem;
}

.feat-meta strong{
  color: rgba(27, 26, 23, 0.92);
  font-weight: 700;
}
#view-feats .spell-card{
  height: 12.5rem;
  overflow: hidden;
}
#view-feats .spell-card.expanded{
  height: auto;
  overflow: visible;
}
#view-feats .spell-description{
  max-height: none;
}

#view-feats .feat-preview-card{
  height: auto;
  overflow: visible;
}

/* races */
.race-top{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 0.85rem;
  align-items: start;
}
.race-card.no-media .race-top{
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 760px){
  .race-top{ grid-template-columns: minmax(0, 1fr); }
  .race-media{ order: -1; }
}

.race-source{
  font-weight: 600;
  font-size: 0.78rem;
  color: rgba(106, 91, 73, 0.92);
  margin-left: 0.5rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.race-kv{
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  margin-top: 0.35rem;
}

.race-media{
  position: relative;
  align-self: stretch;
  background: rgba(0,0,0,0.10);
  border-radius: 0.75rem;
}

.race-media img{
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid rgba(181, 146, 99, 0.65);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  background: rgba(0,0,0,0.08);
  filter: grayscale(1) contrast(1.05) brightness(0.94);
  opacity: 0.46;
  transition: opacity 0.12s ease, filter 0.12s ease;
}

.race-media::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  pointer-events: none;
  background:
    radial-gradient(520px 220px at 50% 0%, rgba(255,255,255,0.25), transparent 60%),
    radial-gradient(420px 240px at 30% 100%, rgba(0,0,0,0.18), transparent 62%);
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.race-card:hover .race-media img{
  opacity: 0.58;
  filter: grayscale(1) contrast(1.1) brightness(0.9);
}
.race-card.expanded .race-media img{
  opacity: 0.64;
  filter: grayscale(1) contrast(1.12) brightness(0.86);
}


.race-hint{
  margin-top: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(47, 42, 34, 0.72);
}
.race-card.expanded .race-hint{ display: none; }

.race-details{
  display: none;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(181, 146, 99, 0.65);
  font-size: 0.9rem;
  color: rgba(27, 26, 23, 0.92);
}
.race-card.expanded .race-details{ display: block; }

.race-details-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem 1rem;
  margin-top: 0.35rem;
}
@media (max-width: 760px){
  .race-details-grid{ grid-template-columns: minmax(0, 1fr); }
}

.race-details h4{
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(47, 42, 34, 0.78);
}

.race-mini{
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}
.race-mini li{ margin: 0.15rem 0; }

.race-ability{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.race-ability .pill{
  text-transform: none;
  letter-spacing: 0.02em;
}
.pill-move{
  border-color: rgba(122, 78, 42, 0.62);
  background: rgba(122, 78, 42, 0.08);
  color: rgba(122, 78, 42, 0.98);
  text-transform: none;
  letter-spacing: 0.02em;
}

.pill-sense{
  border-color: rgba(31, 77, 122, 0.55);
  background: rgba(31, 77, 122, 0.08);
  color: rgba(31, 77, 122, 0.92);
  text-transform: none;
  letter-spacing: 0.02em;
}

.pill-trait{
  border-color: rgba(43, 106, 74, 0.55);
  background: rgba(43, 106, 74, 0.08);
  color: rgba(43, 106, 74, 0.92);
  text-transform: none;
  letter-spacing: 0.02em;
}

/* items */
.item-top{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 0.85rem;
  align-items: start;
}
@media (max-width: 760px){
  .item-top{ grid-template-columns: minmax(0, 1fr); }
  .item-media{ order: -1; }
}
.item-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.item-meta-row{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem 0.6rem;
  margin-top: 0.35rem;
}
.item-meta-row .item-meta{
  flex: 1 1 240px;
  margin-top: 0;
}
.item-meta-row .feat-card-actions{
  margin-left: auto;
}
.item-source{
  font-weight: 600;
  font-size: 0.78rem;
  color: rgba(106, 91, 73, 0.85);
  margin-left: 0.45rem;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
}
.item-media{
  position: relative;
  align-self: stretch;
}
.item-media img{
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid rgba(181, 146, 99, 0.65);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  background: rgba(0,0,0,0.08);
  filter: grayscale(1) contrast(1.08) brightness(0.9);
  opacity: 0.64;
}
.item-card .spell-description{
  max-height: 8.6em;
  overflow: hidden;
}
.item-card.no-media .spell-description{
  max-height: 11em;
}
.item-card{
  height: 15.5rem;
  min-height: 15.5rem;
}
.item-card.expanded{
  height: auto;
  min-height: 15.5rem;
}
.item-card.expanded .spell-description{
  max-height: none;
}
.item-card.no-media .item-top{
  grid-template-columns: minmax(0,1fr);
}
.item-preview-card.item-card{
  height: auto;
  min-height: 0;
  overflow: visible;
  content-visibility: visible;
  contain-intrinsic-size: auto;
}
.item-preview-card.item-card .spell-description{
  max-height: none;
  overflow: visible;
}
.items-sentinel{
  width: 100%;
  height: 2px;
}
.pill-rarity{
  border-color: rgba(31, 77, 122, 0.55);
  background: rgba(31, 77, 122, 0.08);
  color: rgba(31, 77, 122, 0.92);
}
.pill-type{
  border-color: rgba(122, 78, 42, 0.55);
  background: rgba(122, 78, 42, 0.08);
  color: rgba(122, 78, 42, 0.96);
  text-transform: none;
  letter-spacing: 0.02em;
}
.pill-homebrew{
  border-color: rgba(140, 47, 42, 0.55);
  background: rgba(140, 47, 42, 0.10);
  color: rgba(140, 47, 42, 0.92);
}
.pill-price{
  border-color: rgba(43, 106, 74, 0.45);
  background: rgba(43, 106, 74, 0.06);
  color: rgba(43, 106, 74, 0.92);
}
.pill-attune{
  border-color: rgba(91, 47, 122, 0.45);
  background: rgba(91, 47, 122, 0.08);
  color: rgba(91, 47, 122, 0.95);
}
.count-pill{
  background: rgba(255, 255, 255, 0.30);
}
#view-feats .filters-panel,
#view-items .filters-panel,
#view-races .filters-panel{
  align-self: flex-start;
  height: fit-content;
}

/* Keep the catalog views from collapsing too aggressively when a filter leaves only a few results.
   The earlier stretch-to-fill approach clipped the parchment panel, so this version only gives the
   main area and the rendered list a stable minimum height without forcing panel children to flex. */
#view-spells > main,
#view-feats > main,
#view-items > main{
  min-height: calc(100dvh - 8rem);
}

#view-spells .spell-list,
#view-feats .spell-list,
#view-items .spell-list{
  min-height: clamp(16rem, 36dvh, 28rem);
}

.results-panel .panel-header{
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.range-row{
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.range-label{
  font-size: 0.86rem;
  color: rgba(47, 42, 34, 0.85);
}
.range-inline{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.range-inputs{
  flex: 1 1 180px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.range-check{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: rgba(47, 42, 34, 0.82);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.range-check input{
  margin: 0;
  accent-color: rgba(122, 78, 42, 0.98);
}
.range-inputs input[type="number"]{
  width: 100%;
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
}

/* login screen */
body.login-locked {
  overflow: hidden;
}

body.login-locked header,
body.login-locked .view {
  display: none;
}

#login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #221e1a var(--ns-stage-bg-image) center / cover no-repeat;
}

#login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ns-stage-overlay);
}

#login-screen .login-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  margin: 0;
  text-align: center;
  padding: 1.7rem 2rem 1.9rem;
  min-height: 0;
  border-radius: 1.3rem;
  border: 1px solid rgba(201, 176, 138, 0.92);
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.45), 0 18px 50px rgba(0, 0, 0, 0.25);
}

#login-screen .login-title {
  margin: 0 0 0.75rem;
  font-family: "Cinzel Decorative", "Cinzel", "Marcellus", ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: clamp(2.4rem, 3.6vw + 1.3rem, 3.8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2a251d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  line-height: 0.95;
  text-wrap: balance;
}

#login-screen .login-form {
  display: grid;
  gap: 0.6rem;
}

#login-screen .field label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(60, 52, 40, 0.85);
}

#login-screen input[type="text"],
#login-screen input[type="password"] {
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.65rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(146, 125, 93, 0.75);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

#login-screen input[type="text"]:focus,
#login-screen input[type="password"]:focus {
  border-color: rgba(122, 78, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(122, 78, 42, 0.18), inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

#login-screen .login-actions {
  margin-top: 0.2rem;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
}

#login-screen .login-btn {
  border-radius: 999px;
  border: 1px solid rgba(122, 78, 42, 0.78);
  background: linear-gradient(to bottom, rgba(246, 237, 216, 0.96), rgba(234, 214, 178, 0.90));
  color: var(--ink);
  padding: 0.42rem 0.95rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  width: min(230px, 70%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16), 0 14px 30px rgba(31, 77, 122, 0.06);
  transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

#login-screen .login-btn:hover {
  border-color: rgba(122, 78, 42, 0.98);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2), 0 18px 40px rgba(31, 77, 122, 0.08);
  transform: translateY(-1px);
}

#login-screen .login-error {
  font-size: 0.82rem;
  color: var(--red-ink);
  margin-top: 0.25rem;
}

#login-screen .login-error[data-tone="success"]{
  color: var(--green-ink);
}

body:not(.login-locked) #login-screen {
  display: none;
}

body.auth-checking #login-screen {
  display: none;
}

/* loading overlay */
#loading-screen{
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 900px at 50% 18%, rgba(255, 255, 255, 0.26), rgba(0, 0, 0, 0.35) 70%),
    rgba(20, 15, 10, 0.55);
  backdrop-filter: blur(2px);
}

body.app-loading #loading-screen{
  display: flex;
}

.loading-panel{
  width: min(92vw, 360px);
  padding: 1.5rem 1.4rem 1.6rem;
  border-radius: 1rem;
  border: 1px solid rgba(201, 176, 138, 0.92);
  background-image:
    var(--noise-coarse),
    var(--noise-fine),
    radial-gradient(980px 320px at 18% 0%, rgba(255, 255, 255, 0.62), transparent 64%),
    radial-gradient(880px 560px at 86% 18%, rgba(154, 106, 56, 0.22), transparent 66%),
    radial-gradient(680px 520px at 26% 92%, rgba(122, 78, 42, 0.16), transparent 70%),
    linear-gradient(to bottom, rgba(246, 237, 216, 0.96), rgba(234, 214, 178, 0.92));
  background-size: 560px 560px, 260px 260px, auto, auto, auto, auto;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-blend-mode: multiply, overlay, normal, normal, normal, normal;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  text-align: center;
}

.loading-icon{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(201, 176, 138, 0.9);
  border-top-color: rgba(122, 78, 42, 0.95);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.15);
  animation: loading-spin 1s linear infinite;
}

.loading-text{
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(47, 42, 34, 0.82);
}

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

