/* modern-normalize.css */
*, ::before, ::after { box-sizing: border-box; }
html {
  font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
}
body { margin: 0; }
b, strong { font-weight: bolder; }
code, pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;
  font-size: 1em;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

/* style.css variables */
:root {
  --color-dark: #181818;
  --color-light: #f5f5f4;
  --color-stone400: #a3a3a3;
  --color-stone600: #525252;
  --color-stone800: #262626;
  --color-stone900: #181818;
  --color-rose: #eab308;
  --color-indigo: #4ade80;
  --color-danger: #ef4444;

  --size-xxs: 0.5rem;
  --size-xs: 0.75rem;
  --size-sm: 0.875rem;
  --size-base: 1rem;
  --size-lg: 1.125rem;
  --size-xl: 1.25rem;
  --size-xxl: 1.5rem;
  --size-3xl: 1.875rem;
  --size-4xl: 2.25rem;
  --size-5xl: 3rem;
  --size-6xl: 3.75rem;
  --size-7xl: 4.5rem;
}

* {
  margin: 0;
  line-height: calc(1em + 0.5rem);
}

.light-mode {
  --color-light: #0c0a09;
  --color-dark: #f5f5f4;
  --color-stone400: #262626;
  --color-stone600: #525252;
  --color-stone800: #d6d3d1;
}

.light-mode strong { color: var(--color-light); }
.light-mode a { color: var(--color-stone400); font-weight: bold; }

body {
  font-family: 'Alpino', sans-serif;
  background-color: var(--color-dark);
  color: var(--color-light);
  padding-bottom: 5rem;
}

svg { display: block; max-width: 100%; user-select: none; }
button { cursor: pointer; display: inline-block; padding: 0; border: none; background: none; color: inherit; }
a { color: var(--color-rose); }
strong { color: var(--color-indigo); }

body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-thumb { background-color: var(--color-rose); outline: 1px solid var(--color-rose); }
body::-webkit-scrollbar-thumb:hover { background-color: var(--color-indigo); outline: 1px solid var(--color-indigo); }

/* utils.css */
.btn {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.05em;
  background-color: var(--color-rose);
  color: #0c0a09;
  padding: 0.5em 1em;
  border-radius: 7px;
  box-shadow: 0 8px 15px rgba(234, 179, 8, 0.45), 0 5px 5px rgba(234, 179, 8, 0.35),
              0 0 90px -12px var(--color-rose);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn:hover {
  background-color: var(--color-indigo);
  color: #0c0a09;
  transform: translateY(-6px) scale(1.04) rotate(-2deg);
  box-shadow: 0 2px 3px rgba(74, 222, 128, 0.1),
              0 6px 8px rgba(74, 222, 128, 0.15),
              0 12px 20px rgba(74, 222, 128, 0.2),
              0 20px 35px rgba(74, 222, 128, 0.25),
              0 0 120px -5px var(--color-indigo);
}

.btn:active {
  background-color: var(--color-indigo);
  transform: translateY(-2px) scale(0.97) rotate(1deg);
  transition-duration: 0.1s;
}

.btn--secondary {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.05em;
  padding: 0.45em 0.9em;
  border-radius: 7px;
  border: 2px solid var(--color-stone800);
  color: var(--color-stone400);
  background: var(--color-dark);
  transition: all 0.25s ease;
}

.btn--secondary:hover {
  border-color: var(--color-rose);
  color: var(--color-rose);
  transform: translateY(-2px);
}

.btn--green {
  border-color: var(--color-indigo);
  color: var(--color-indigo);
}

.btn--danger {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.section { margin-top: 3rem; }

/* header.css */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
  position: relative;
  z-index: 999;
}

.header__brand {
  font-weight: 700;
  font-size: var(--size-base);
  letter-spacing: -0.05em;
  color: var(--color-light);
  text-decoration: none;
}

.header__menu { display: none; }

.header__bars {
  color: var(--color-light);
  width: var(--size-xxl);
  height: var(--size-xxl);
  display: block;
}

.header__link {
  color: var(--color-stone600);
  text-decoration: none;
  font-size: var(--size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  position: relative;
  padding-bottom: 0.3em;
  transition: color 0.2s ease-in-out;
}

.header__link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-rose);
  transition: width 0.3s ease-in-out;
}

.header__link:hover::after,
.header__link.active-link::after { width: 100%; }

.header__link:hover,
.header__link.active-link { color: var(--color-rose); }

.header__line {
  border: 1px solid var(--color-stone800);
  padding-top: 1.5em;
}

.header__sun {
  display: block;
  width: var(--size-base);
  height: var(--size-base);
  color: var(--color-stone600);
  transition: color 0.2s;
}
.header__sun:hover { color: var(--color-rose); }

/* mobile-nav.css */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 998;
  width: 100%;
  height: 100%;
  background-color: var(--color-dark);
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.mobile-nav.is-open { display: flex; }

.mobile-nav__menu {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav__link {
  font-size: var(--size-lg);
  text-decoration: none;
  font-weight: 600;
  color: var(--color-stone600);
  letter-spacing: -0.05em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.mobile-nav__link:hover { color: var(--color-rose); }

.mobile-nav__link-line {
  border: 1px solid var(--color-stone800);
  padding-right: 1.5em;
}

.mobile-nav__sun {
  width: var(--size-xl);
  height: var(--size-xl);
  color: var(--color-stone600);
  margin: 0 auto;
}

.mobile-nav.is-open .mobile-nav__link {
  animation: slideInFromRight 0.45s ease-out forwards;
  opacity: 0;
}
.mobile-nav.is-open li:nth-child(1) .mobile-nav__link { animation-delay: 0.08s; }
.mobile-nav.is-open li:nth-child(2) .mobile-nav__link { animation-delay: 0.16s; }
.mobile-nav.is-open li:nth-child(3) .mobile-nav__link { animation-delay: 0.24s; }
.mobile-nav.is-open li:nth-child(4) .mobile-nav__link { animation-delay: 0.32s; }

@keyframes slideInFromRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* hero.css */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.hero__subtitle {
  color: var(--color-stone600);
  font-size: var(--size-base);
  font-weight: 600;
  line-height: 0.9;
}

.hero__title {
  color: var(--color-stone400);
  font-size: var(--size-4xl);
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-weight: 600;
  text-transform: uppercase;
}

.hero__description {
  max-width: 60ch;
  font-size: var(--size-sm);
  color: var(--color-stone600);
}

.hero__button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* featured.css & books.css panels */
.featured__title {
  font-size: var(--size-xxl);
  color: var(--color-light);
  font-weight: 600;
  line-height: 0.9;
  text-transform: uppercase;
}

.featured__subtitle {
  font-size: var(--size-sm);
  color: var(--color-rose);
  margin-top: 0.25rem;
}

.panel-box {
  margin: 1.25rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-stone800);
}

.light-mode .panel-box { background: rgba(0, 0, 0, 0.04); }

.login-card {
  max-width: 440px;
  margin: 2rem auto;
}

.mango-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 16px; /* Prevents iOS Safari zoom on focus */
  font-weight: 500;
  background: var(--color-dark);
  color: var(--color-light);
  border: 2px solid var(--color-stone800);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.25s ease;
}

.mango-input:focus { border-color: var(--color-rose); }

.field-label {
  display: block;
  font-size: var(--size-xs);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--color-stone400);
  margin: 1rem 0 0.35rem 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.dropzone {
  border: 2px dashed var(--color-rose);
  border-radius: 10px;
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  background: rgba(234, 179, 8, 0.04);
  transition: background 0.2s, border-color 0.2s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--color-indigo);
  background: rgba(74, 222, 128, 0.08);
}

/* Queue cards & tags */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-pill {
  padding: 0.35em 0.85em;
  border-radius: 7px;
  border: 2px solid var(--color-stone800);
  color: var(--color-stone400);
  font-size: var(--size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
.filter-pill.active {
  border-color: var(--color-rose);
  color: #0c0a09;
  background: var(--color-rose);
}

.job-card {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-stone800);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}
.job-card:hover { border-color: var(--color-rose); }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.tag {
  display: inline-block;
  font-size: var(--size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  padding: 0.15rem 0.55rem;
  border-radius: 5px;
  background: var(--color-stone800);
  color: var(--color-stone400);
}
.tag--pending { background: rgba(234, 179, 8, 0.2); color: var(--color-rose); }
.tag--approved { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.tag--printing { background: rgba(74, 222, 128, 0.2); color: var(--color-indigo); }
.tag--completed { background: rgba(74, 222, 128, 0.12); color: var(--color-indigo); }
.tag--rejected { background: rgba(239, 68, 68, 0.2); color: var(--color-danger); }

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: var(--size-sm);
  color: var(--color-stone400);
  margin-bottom: 0.75rem;
}

.job-notes {
  font-size: var(--size-sm);
  color: var(--color-light);
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--color-rose);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0 6px 6px 0;
  margin-bottom: 0.85rem;
}

.job-admin-note {
  font-size: var(--size-sm);
  color: var(--color-indigo);
  padding: 0.55rem 0.85rem;
  border-left: 3px solid var(--color-indigo);
  background: rgba(74, 222, 128, 0.06);
  border-radius: 0 6px 6px 0;
  margin-bottom: 0.85rem;
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.admin-bar {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-stone800);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* 3D Viewer Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}
.modal-backdrop.is-open { display: flex; }

.modal-box {
  width: 100%;
  max-width: 820px;
  background: var(--color-dark);
  border: 2px solid var(--color-rose);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

#viewer-canvas-wrap {
  width: 100%;
  height: 420px;
  background: #0c0a09;
  border-radius: 8px;
  border: 1px solid var(--color-stone800);
  overflow: hidden;
  position: relative;
  margin: 0.85rem 0;
}

#toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  background: var(--color-dark);
  color: var(--color-light);
  border: 2px solid var(--color-rose);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.25s ease;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateY(0); }

/* Responsive Breakpoints */
@media (min-width: 475px) {
  .container { max-width: 475px; }
  .hero__subtitle { font-size: var(--size-xxl); }
  .featured__title { font-size: var(--size-3xl); }
}
@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) {
  .container { max-width: 768px; }
  .header__menu { display: flex; align-items: center; list-style: none; padding: 0; gap: 2em; }
  .header__bars { display: none; }
}
@media (min-width: 1024px) {
  .container { max-width: 1024px; }
  .header__link { font-size: var(--size-sm); }
  .header__sun { width: var(--size-xl); height: var(--size-xl); }
  .hero__title { font-size: var(--size-6xl); }
  .hero__description { font-size: var(--size-lg); }
  .featured__title { font-size: var(--size-4xl); }
}
@media (min-width: 1280px) {
  .container { max-width: 1280px; }
  .hero__title { font-size: var(--size-7xl); }
}
