/* ==========================================================================
   折纸研坊 · PaperCraft Tabletop World
   Playable 3D Kraft Envelope Desk (Advisor) + 3D Pop-Up Origami Island &
   Fanned Game Card Hand (Student) + Interactive Origami Fox Companion
   ========================================================================== */

:root {
  --wood-rim: #c9a77c;
  --wood-dark: #8e6b43;
  --mat-green: #1d4e42;
  --mat-deep: #143a31;
  --mat-line: rgba(235, 244, 232, 0.11);
  --kraft: #e5cca2;
  --kraft-light: #f2dfb9;
  --kraft-dark: #c9a976;
  --kraft-shadow: #ad8b58;
  --paper: #efe6d5;
  --surface: #fffcf5;
  --card-edge: #d8cab0;
  --ink: #2a241e;
  --muted: #685d50;
  --line: #dfd3be;
  --accent: #1b4d3e;
  --accent-dark: #12372c;
  --accent-soft: #e7f1ec;
  --teal: #225e66;
  --ochre: #e4a336;
  --ochre-bright: #f7cf78;
  --ochre-soft: #fdf1d4;
  --ochre-ink: #6e480a;
  --seal: #cc3f2c;
  --seal-dark: #942618;
  --seal-soft: #fdebe7;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --paper-shadow: 0 5px 0 #d5c6ab, 0 14px 26px -10px rgba(48, 36, 20, 0.24);
}

/* Warm Wooden Craft Tabletop Canvas */
body {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 0%, #f9f2e3 0%, transparent 55%),
    repeating-linear-gradient(90deg, rgba(142, 107, 67, 0.03) 0 2px, transparent 2px 36px),
    var(--paper);
}

/* ==========================================================================
   Topbar & Origami Brand
   ========================================================================== */
.topbar {
  background: var(--surface);
  border-bottom: 2px solid var(--card-edge);
  box-shadow: 0 3px 0 rgba(213, 198, 171, 0.42);
  position: relative;
  z-index: 8;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  border-bottom: 1px dashed rgba(139, 118, 88, 0.28);
  pointer-events: none;
}

.brand { gap: 11px; }

.brand-icon.origami-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #215c4a 0%, #163f32 100%);
  border: 2px solid #fffcf5;
  box-shadow: 0 3px 0 #113026, 0 6px 12px -4px rgba(22, 63, 50, 0.4);
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--spring), box-shadow 0.25s ease;
}

.brand-icon.origami-logo svg {
  width: 28px;
  height: 28px;
  transition: transform 0.38s var(--spring);
}

.brand:hover .origami-logo {
  transform: translateY(-2px) rotate(-5deg);
}

.brand:hover .origami-logo svg {
  transform: translate(1px, -1px) rotate(7deg) scale(1.08);
}

.brand-wordmark {
  display: flex;
  align-items: baseline;
  gap: 7px;
  line-height: 1;
}

.brand-wordmark strong {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand-wordmark small {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ochre-ink);
  background: var(--ochre-soft);
  border: 1px solid #e7c47a;
  padding: 2px 6px;
  border-radius: 5px;
  transform: rotate(-2deg);
  display: inline-block;
}

.sfx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1.5px solid var(--card-edge);
  background: #fbf5e8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.2s var(--spring), background-color 0.15s ease;
}

.sfx-toggle[aria-pressed="true"] {
  background: var(--ochre-soft);
  border-color: #e4ba67;
  color: var(--ochre-ink);
}

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

.avatar {
  border: 2px solid #fffcf5;
  box-shadow: 0 2px 0 #cbbda4;
  background: linear-gradient(145deg, #f9e8be 0%, #edd08c 100%);
  color: var(--ink);
}

/* ==========================================================================
   Tactile Spring Buttons
   ========================================================================== */
.button {
  border-radius: 11px;
  transition: transform 0.22s var(--spring), box-shadow 0.16s ease, background-color 0.15s ease;
}

.button.primary {
  background: linear-gradient(180deg, #24624f 0%, #19483a 100%);
  border: 1.5px solid #13382c;
  color: #fffdf7;
  box-shadow: 0 3px 0 #0f2c23, 0 6px 12px -4px rgba(18, 55, 44, 0.35);
}

.button.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #0f2c23, 0 10px 16px -6px rgba(18, 55, 44, 0.4);
}

.button.primary:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0f2c23;
}

.button.secondary {
  background: var(--surface);
  border: 1.5px solid #d2c4aa;
  color: var(--ink);
  box-shadow: 0 3px 0 #d5c7ae;
}

.button.secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #fff9eb;
}

.button.secondary:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #cbbba0;
}

/* ==========================================================================
   Shared Cutting Mat Arena (The Playable Tabletop Surface!)
   ========================================================================== */
.tabletop-collection {
  width: min(1760px, calc(100% - 28px));
  margin-inline: auto;
  padding: 14px 0 32px;
}

.cutting-mat {
  position: relative;
  border-radius: 20px;
  padding: 20px 22px 22px;
  background:
    linear-gradient(var(--mat-line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(ellipse at 50% 0%, #276354 0%, #19453a 62%, #13372e 100%);
  border: 6px solid #fffcf5;
  outline: 2px solid #cbb99a;
  box-shadow: 0 10px 0 #cbb99a, 0 26px 48px -16px rgba(32, 26, 16, 0.36);
  color: #fffcf4;
  overflow: visible;
  animation: tabletop-enter 0.55s var(--spring) both;
}

/* Cutting Mat Ruler Markings along Top Edge */
.mat-ruler {
  position: absolute;
  top: 7px;
  left: 24px;
  right: 24px;
  height: 10px;
  background: repeating-linear-gradient(
    90deg,
    rgba(246, 238, 220, 0.35) 0 1px,
    transparent 1px 16px,
    rgba(246, 238, 220, 0.18) 16px 17px,
    transparent 17px 32px
  );
  pointer-events: none;
  opacity: 0.7;
}

/* ==========================================================================
   Interactive Origami Fox Companion (Watches Cursor + Pettable!)
   ========================================================================== */
.desk-fox-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.fox-bubble {
  position: relative;
  max-width: 260px;
  padding: 9px 13px;
  border-radius: 13px 13px 13px 4px;
  background: #fffcf5;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.5;
  font-weight: 600;
  border: 2px solid #e6d7bd;
  box-shadow: 0 4px 0 rgba(12, 34, 28, 0.32);
  animation: bubble-pop 0.35s var(--spring) both;
}

.fox-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  bottom: 10px;
  width: 12px;
  height: 12px;
  background: #fffcf5;
  border-left: 2px solid #e6d7bd;
  border-bottom: 2px solid #e6d7bd;
  transform: rotate(45deg);
}

.origami-fox {
  position: relative;
  width: 78px;
  height: 78px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex: none;
  filter: drop-shadow(0 6px 0 rgba(10, 28, 22, 0.35));
  transition: transform 0.3s var(--spring);
}

.origami-fox svg {
  width: 100%;
  height: 100%;
  display: block;
  animation: fox-breathe 3.6s ease-in-out infinite;
}

.origami-fox:hover svg {
  animation-play-state: paused;
}

.origami-fox:hover {
  transform: translateY(-4px) scale(1.06);
}

.origami-fox.happy svg {
  animation: fox-jump 0.6s var(--spring);
}

/* ==========================================================================
   ADVISOR PLAYABLE WORLD — 3D Wax-Sealed Kraft Envelope Desk!
   ========================================================================== */
.mail-desk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.mail-desk-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mail-desk-title h1 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(25px, 3vw, 34px);
  color: #fffcf4;
  text-shadow: 0 2px 0 rgba(10, 28, 22, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.desk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ochre-soft);
  color: var(--ochre-ink);
  border: 2px solid #fffcf5;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  transform: rotate(-2deg);
  box-shadow: 0 2px 0 rgba(10, 28, 22, 0.35);
}

/* Physical Wooden Stamp Tray on Advisor Cutting Mat */
.stamp-tray {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(11, 33, 27, 0.56);
  border: 1.5px solid rgba(255, 252, 245, 0.22);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.24);
  flex-wrap: wrap;
}

.stamp-tray-label {
  font-size: 11.5px;
  color: #cde0d7;
  font-weight: 600;
}

.stamp-slots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wax-slot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  border: 1.5px dashed rgba(255, 252, 245, 0.34);
  color: rgba(255, 252, 245, 0.48);
}

.wax-slot.stamped {
  background: radial-gradient(circle at 35% 30%, #e55c47 0%, #c03623 70%, #8f2213 100%);
  border: 2px solid #fffcf5;
  color: #fffcf5;
  box-shadow: 0 3px 0 rgba(10, 24, 19, 0.45);
  transform: rotate(-8deg);
}

/* 3D Kraft Paper Envelopes Grid */
.cutting-mat .collection-empty {
  color: #d7e8df;
  text-align: center;
  padding: 28px 16px;
}

.cutting-mat .deck-bar {
  margin: 0 0 6px;
}

.kraft-envelope[hidden],
.project-card[hidden] {
  display: none !important;
}

.envelope-tray {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
  padding-top: 22px;
}

.kraft-envelope {
  position: relative;
  min-width: 0;
  perspective: 1000px;
  display: flex;
  flex-direction: column;
  padding-top: 26px;
  cursor: pointer;
  animation: envelope-drop 0.52s var(--spring) both;
  animation-delay: var(--card-delay, 0ms);
}

.kraft-envelope:nth-child(odd) .envelope-body { transform: rotate(-0.9deg); }
.kraft-envelope:nth-child(even) .envelope-body { transform: rotate(0.9deg); }

.envelope-body {
  position: relative;
  min-width: 0;
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(160deg, #edd8b1 0%, #dfbf8a 58%, #d2ae75 100%);
  border: 2px solid #f7ebd2;
  box-shadow:
    0 7px 0 #9f7c4a,
    0 20px 30px -12px rgba(9, 25, 20, 0.52);
  padding: 18px 18px 16px;
  min-height: 238px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transform-style: preserve-3d;
  transition: transform 0.36s var(--spring), box-shadow 0.3s ease;
}

.kraft-envelope:hover .envelope-body {
  transform: translateY(-6px) rotate(0deg) !important;
  box-shadow: 0 11px 0 #9f7c4a, 0 28px 38px -12px rgba(9, 25, 20, 0.62);
}

/* Inner Ivory Manuscript Letter Sheet that Physically Slides OUT on Hover! */
.envelope-letter {
  position: relative;
  min-width: 0;
  z-index: 2;
  margin-top: 52px;
  margin-bottom: 14px;
  padding: 15px 16px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffefb 0%, #fbf6ea 100%);
  color: var(--ink);
  border: 1.5px solid #e6dac2;
  box-shadow: 0 4px 12px rgba(42, 32, 18, 0.16);
  transition: transform 0.38s var(--spring), box-shadow 0.3s ease;
}

.kraft-envelope:hover .envelope-letter {
  transform: translateY(-30px);
  box-shadow: 0 16px 26px -6px rgba(32, 24, 14, 0.3);
}

.letter-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  min-width: 0;
}

.letter-journal {
  min-width: 0;
  flex: 1 1 auto;
  text-align: right;
}

/* Perforated Postage Stamp on Envelope Letter */
.postage-stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--seal-soft);
  color: var(--seal-dark);
  border: 1.5px dashed #d4705e;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.postage-stamp.done {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #77a896;
}

.postage-stamp.reviewing {
  background: var(--ochre-soft);
  color: var(--ochre-ink);
  border-color: #d4a144;
}

.letter-journal {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.envelope-letter h2 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.32;
  color: var(--ink);
}

.envelope-letter h2 a {
  color: inherit;
  text-decoration: none;
}

.letter-sender {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--teal);
  font-weight: 700;
}

/* Yellow Post-It Sticky Note from Student */
.letter-sticky {
  margin: 8px 0 0;
  padding: 7px 10px;
  border-radius: 4px 4px 12px 4px;
  background: #fef4c8;
  border-left: 3px solid #e4a336;
  color: #4f4225;
  font-size: 12.5px;
  line-height: 1.48;
  box-shadow: 0 2px 5px rgba(84, 64, 24, 0.1);
}

/* 3D Hinged Triangular Envelope Flap */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: linear-gradient(180deg, #f3e2c2 0%, #dfc08c 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.42s var(--spring);
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(96, 70, 32, 0.22));
}

.kraft-envelope:hover .envelope-flap {
  transform: rotateX(-145deg);
}

/* Embossed Crimson Wax Seal Button at Flap Tip */
.envelope-seal {
  position: absolute;
  top: 38px;
  left: 50%;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e95b45 0%, #c83a26 68%, #8f2112 100%);
  border: 2.5px solid #f9ddd6;
  box-shadow: 0 4px 0 #7b1b0e, 0 8px 14px rgba(42, 14, 8, 0.35);
  color: #fffcf5;
  font-family: var(--font-title);
  font-size: 15px;
  display: grid;
  place-items: center;
  z-index: 4;
  pointer-events: none;
  transition: transform 0.35s var(--spring), opacity 0.25s ease;
}

.kraft-envelope:hover .envelope-seal {
  transform: translateY(-28px) scale(0.7) rotate(18deg);
  opacity: 0;
}

.envelope-footer {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.envelope-meta {
  font-size: 12px;
  font-weight: 700;
  color: #5e4422;
}

.kraft-envelope .envelope-open-btn {
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #256451 0%, #19483a 100%);
  color: #fffcf5;
  border: 2px solid #fffcf5;
  box-shadow: 0 3px 0 #103026;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.22s var(--spring), box-shadow 0.16s ease;
}

.kraft-envelope .envelope-open-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 5px 0 #103026;
  color: #fffcf5;
}

.kraft-envelope[data-attention="true"] .envelope-open-btn {
  background: linear-gradient(180deg, #df533b 0%, #bd3822 100%);
  box-shadow: 0 3px 0 #8a2312;
  color: #fffcf5;
}

/* ==========================================================================
   STUDENT PLAYABLE WORLD — 3D Pop-Up Origami Island Map + Fanned Card Hand!
   ========================================================================== */
.island-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.island-hud-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.quest-crest {
  position: relative;
  width: 68px;
  height: 74px;
  flex: none;
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--spring);
}

.quest-crest:hover { transform: rotate(-6deg) scale(1.08); }

.quest-crest svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 0 rgba(10, 26, 20, 0.5));
}

.quest-crest-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  line-height: 1.05;
}

.quest-crest-label {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ochre-bright);
  font-weight: 800;
}

.quest-crest-value {
  font-family: var(--font-title);
  font-size: 21px;
  color: #fffcf4;
}

.island-title-block h1 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 32px);
  color: #fffcf4;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.island-xp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.island-xp-bar {
  width: 180px;
  height: 10px;
  border-radius: 999px;
  background: rgba(10, 28, 22, 0.72);
  border: 1.5px solid rgba(255, 252, 245, 0.28);
  padding: 1.5px;
  overflow: hidden;
}

.island-xp-fill {
  height: 100%;
  min-width: 8px;
  border-radius: 999px;
  background: repeating-linear-gradient(-55deg, #f7cf78 0 9px, #e4a336 9px 18px);
  background-size: 26px 26px;
  animation: barber-slide 2.8s linear infinite;
}

.island-xp-text {
  font-size: 12px;
  color: var(--ochre-bright);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.island-hud-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.craft-gold-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 18px;
  border-radius: 12px;
  border: 2px solid #fffcf5;
  background: linear-gradient(180deg, #fae2a3 0%, #e4a336 100%);
  color: #2a2010;
  box-shadow: 0 4px 0 #9e6814, 0 10px 18px -6px rgba(10, 26, 20, 0.45);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.24s var(--spring), box-shadow 0.16s ease;
}

.craft-gold-btn:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 6px 0 #9e6814, 0 14px 22px -6px rgba(10, 26, 20, 0.5);
}

.craft-gold-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #9e6814;
}

/* 3D Pop-Up Folded Paper World Board inside Student Cutting Mat */
.world-map-board {
  position: relative;
  perspective: 1100px;
  margin-bottom: 10px;
}

.world-map-tilt {
  position: relative;
  border-radius: 16px;
  padding: 46px 20px 26px;
  background: #f8f1e1;
  border: 3px solid #fffcf5;
  box-shadow: 0 8px 0 #102f26, 0 18px 34px rgba(7, 22, 17, 0.44);
  clip-path: polygon(
    0% 6px, 25% 0%, 50% 6px, 75% 0%, 100% 6px,
    100% calc(100% - 6px), 75% 100%, 50% calc(100% - 6px), 25% 100%, 0% calc(100% - 6px)
  );
  transition: transform 0.25s ease-out;
  overflow: hidden;
}

.world-folds {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
}

.world-fold:nth-child(odd) {
  background: linear-gradient(110deg, #fffdf7 0%, #f5ebd4 100%);
}

.world-fold:nth-child(even) {
  background: linear-gradient(70deg, #e5d4b6 0%, #f7efe0 100%);
  box-shadow: inset 12px 0 18px -12px rgba(72, 54, 28, 0.26), inset -8px 0 14px -10px rgba(255, 255, 255, 0.72);
}

.world-fold + .world-fold::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: rgba(112, 88, 56, 0.18);
}

.world-scenery {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.world-scenery svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 7 Zones on the Student World Map + Live Standing Paper Pins! */
.world-zones {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  min-height: 144px;
}

.world-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.world-zone:nth-child(even) { transform: translateY(-14px); }
.world-zone:nth-child(odd) { transform: translateY(10px); }

.zone-pins {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 5;
}

.zone-paper-pin {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 120px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--seal);
  color: #fffcf5;
  border: 2px solid #fffcf5;
  box-shadow: 0 4px 0 var(--seal-dark), 0 8px 14px rgba(42, 20, 10, 0.3);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.24s var(--spring), box-shadow 0.2s ease;
}

.zone-paper-pin:hover {
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 7px 0 var(--seal-dark), 0 12px 18px rgba(42, 20, 10, 0.36);
  z-index: 8;
}

.zone-paper-pin::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  margin-left: -5px;
  width: 10px;
  height: 10px;
  background: var(--seal);
  transform: rotate(45deg);
  z-index: -1;
}

.zone-medallion {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  transform: rotate(45deg);
  display: grid;
  place-items: center;
  background: #efe4ce;
  border: 2.5px solid #fffcf5;
  box-shadow: 0 3px 0 #cbbba0;
}

.zone-medallion > span {
  transform: rotate(-45deg);
  font-size: 14px;
  font-weight: 800;
  color: #6f5f4b;
}

.world-zone.occupied .zone-medallion {
  background: linear-gradient(145deg, #256451 0%, #19483a 100%);
  box-shadow: 0 0 0 3px var(--ochre-bright), 0 4px 0 #103026;
}

.world-zone.occupied .zone-medallion > span {
  color: #fffcf5;
}

.world-zone.peak .zone-medallion {
  background: linear-gradient(145deg, #f9e1a2 0%, #e4a336 100%);
  box-shadow: 0 3px 0 #a36c13;
}

.world-zone.peak .zone-medallion > span {
  color: #2b200f;
}

.zone-label {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.zone-landmark {
  font-size: 10.5px;
  font-weight: 600;
  color: #1c4a7e;
  background: rgba(28, 74, 126, 0.08);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.campus-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #1c4a7e;
  color: #fffcf5;
  border: 1.5px solid rgba(255, 252, 245, 0.72);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(10, 24, 42, 0.4);
}

/* ==========================================================================
   Fanned Card-Game Hand for Manuscripts (Slay the Spire / Tabletop Hand!)
   ========================================================================== */
.deck-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 22px 0 12px;
  flex-wrap: wrap;
}

.deck-tabs {
  display: inline-flex;
  gap: 6px;
}

.deck-tabs button {
  padding: 6px 13px;
  border-radius: 10px 10px 4px 4px;
  border: 1.5px solid #d5c7ae;
  background: #f5ecdc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 0 #d5c7ae;
  transition: transform 0.2s var(--spring), background-color 0.15s ease;
}

.deck-tabs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.catalog-search {
  background: var(--surface);
  border: 1.5px solid var(--card-edge);
  border-radius: 10px;
  padding: 5px 10px;
  width: 220px;
  box-shadow: 0 2px 0 #ddd0b9;
}

.card-hand {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  padding: 12px 4px 16px;
}

.project-card.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 15px;
  border-radius: 16px 6px 16px 16px;
  background: linear-gradient(180deg, #fffefb 0%, #f9f2e3 100%);
  border: 3px solid #fffcf5;
  outline: 1.5px solid rgba(112, 92, 62, 0.26);
  box-shadow: 0 6px 0 #d4c4a8, 0 16px 28px -12px rgba(42, 32, 18, 0.28);
  overflow: visible;
  animation: card-unfold 0.48s var(--spring) both;
  animation-delay: var(--card-delay, 0ms);
  transition: transform 0.32s var(--spring), box-shadow 0.26s ease;
}

/* Fanned Hand Slight Angles */
.project-card.game-card:nth-child(3n+1) { transform: rotate(-1.1deg); }
.project-card.game-card:nth-child(3n+2) { transform: rotate(0.7deg); }
.project-card.game-card:nth-child(3n)   { transform: rotate(1.2deg); }

.project-card.game-card:hover {
  transform: translateY(-12px) rotate(0deg) scale(1.02) !important;
  box-shadow: 0 12px 0 #cbb99a, 0 26px 40px -12px rgba(42, 32, 18, 0.34);
  z-index: 6;
}

/* Washi Tape + Folded Dog-Ear on Game Cards */
.project-card.game-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 64px;
  height: 18px;
  margin-left: -32px;
  border-radius: 2px;
  transform: rotate(-2deg);
  background: repeating-linear-gradient(-45deg, rgba(228, 163, 54, 0.5) 0 7px, rgba(255, 248, 232, 0.82) 7px 14px);
  box-shadow: 0 2px 4px rgba(42, 36, 30, 0.14);
  pointer-events: none;
}

.project-card.game-card[data-attention="true"]::before {
  background: repeating-linear-gradient(-45deg, rgba(204, 63, 44, 0.55) 0 7px, rgba(254, 236, 230, 0.84) 7px 14px);
}

.project-card.game-card::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 24px;
  height: 24px;
  background: linear-gradient(225deg, var(--paper) 47%, #dfd1b6 48%, #f6eedc 53%, #fffcf5 100%);
  border-bottom-left-radius: 6px;
  box-shadow: -2px 2px 4px rgba(42, 36, 30, 0.12);
  pointer-events: none;
}

.project-card-top {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.project-cover {
  width: 100%;
  aspect-ratio: 1.3;
  border-radius: 8px;
  background: #ece3d1;
  border: 3px solid #fffcf5;
  box-shadow: 0 3px 0 #d5c7ae, 0 6px 12px -4px rgba(42, 36, 30, 0.22);
  transform: rotate(-1.5deg);
  transition: transform 0.3s var(--spring);
  overflow: hidden;
}

.project-card:hover .project-cover { transform: rotate(0deg) scale(1.04); }
.project-card-body { padding: 0; gap: 6px; min-width: 0; }
.project-card h2 { font-family: var(--font-title); font-weight: 400; font-size: 20px; line-height: 1.32; color: var(--ink); }
.project-byline { gap: 7px; font-size: 12px; }
.project-byline .journal-name { border-left: 1.5px solid #d2c5ae; padding-left: 8px; }

.quest-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.quest-pill.urgent { background: var(--seal); color: #fffcf5; border: 1.5px solid #fffcf5; }
.quest-pill.brass { background: var(--ochre-soft); color: var(--ochre-ink); border: 1.5px solid #e7c272; }
.quest-pill.clear { background: #e4f2eb; color: var(--accent); border: 1.5px solid #b5d5c5; }

/* Mini Accordion-Folded Strip inside Student Cards */
.stage-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  background: linear-gradient(90deg, #fffdf7 0%, #f3e8d0 24.8%, #e6d6b8 25%, #f6ecd9 49.8%, #fffdf7 50%, #f3e8d0 74.8%, #e6d6b8 75%, #f7efe0 100%);
  border: 1.5px solid #fffcf5;
  outline: 1px solid rgba(112, 92, 62, 0.22);
  box-shadow: 0 2px 0 #d5c7ad;
}

.stage-dots { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.stage-dots::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; border-top: 1.5px dashed #bcae92; }

.stage-dot {
  position: relative; z-index: 1; width: 10px; height: 10px; border-radius: 3px;
  transform: rotate(45deg); background: #ede3cf; border: 1.5px solid #fffcf5;
}
.stage-dot.done { background: var(--accent); }
.stage-dot.current { width: 13px; height: 13px; background: var(--seal); box-shadow: 0 0 0 2px var(--ochre-bright); }
.stage-track-label { font-size: 11.5px; font-weight: 700; color: #554839; white-space: nowrap; }

.project-card-footer {
  margin-top: auto;
  padding: 10px 0 0;
  min-width: 0;
  width: 100%;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1.5px dashed #dfd3be;
}

.project-card .round-shortcut {
  position: relative;
  z-index: 4;
  min-height: 36px;
  padding: 5px 13px;
  border: 1.5px solid #cfc0a5;
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 3px 0 #d5c7ae;
  font-weight: 700;
  transition: transform 0.22s var(--spring), box-shadow 0.16s ease;
}

.project-card .round-shortcut:hover { transform: translateY(-2px); text-decoration: none; }
.project-card[data-attention="true"] .round-shortcut {
  background: linear-gradient(180deg, #fae2a3 0%, #e7b14a 100%);
  border-color: #fffcf5;
  color: #2b200f;
  box-shadow: 0 3px 0 #b0791c;
}

/* ==========================================================================
   Full 3D Accordion-Folded Origami Quest Map (Project Detail Page)
   ========================================================================== */
.origami-map-section { margin: 26px 0 8px; }
.origami-map-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.origami-map-header h2 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 22px; }
.origami-map-hint { font-size: 12.5px; color: var(--muted); }

.origami-map-shell {
  position: relative;
  padding: 6px 0;
  filter: drop-shadow(0 6px 0 #d3c3a6) drop-shadow(0 16px 26px rgba(42, 32, 18, 0.16));
  animation: tabletop-enter 0.45s var(--spring) both;
}

.origami-map-tape { position: absolute; top: -4px; width: 66px; height: 18px; border-radius: 2px; z-index: 5; pointer-events: none; box-shadow: 0 2px 4px rgba(42, 36, 30, 0.12); }
.origami-map-tape.left { left: 28px; transform: rotate(-3.5deg); background: repeating-linear-gradient(-45deg, rgba(228, 163, 54, 0.52) 0 7px, rgba(255, 248, 232, 0.8) 7px 14px); }
.origami-map-tape.right { right: 32px; transform: rotate(3deg); background: repeating-linear-gradient(45deg, rgba(34, 94, 102, 0.42) 0 7px, rgba(242, 249, 248, 0.8) 7px 14px); }

.origami-map {
  position: relative;
  padding: 56px 26px 32px;
  clip-path: polygon(0% 6px, 25% 0%, 50% 7px, 75% 0%, 100% 6px, 100% calc(100% - 6px), 75% 100%, 50% calc(100% - 7px), 25% 100%, 0% calc(100% - 6px));
  background: var(--surface);
  overflow: hidden;
}

.origami-folds { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); pointer-events: none; z-index: 0; }
.origami-fold { position: relative; }
.origami-fold:nth-child(odd) { background: linear-gradient(106deg, #fffdf7 0%, #f6edd9 100%); }
.origami-fold:nth-child(even) { background: linear-gradient(74deg, #e7d8bc 0%, #f8f0df 100%); box-shadow: inset 12px 0 18px -12px rgba(72, 54, 28, 0.26), inset -8px 0 14px -10px rgba(255, 255, 255, 0.72); }
.origami-fold + .origami-fold::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: rgba(112, 88, 56, 0.18); }

.origami-map-art { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.origami-map-art svg { width: 100%; height: 100%; display: block; }

.origami-stations { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: center; gap: 6px; min-height: 126px; }
.origami-station { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 4px; border: 0; background: transparent; color: var(--ink); text-align: center; transition: transform 0.25s var(--spring); }
.origami-station:nth-child(even) { transform: translateY(-16px); }
.origami-station:nth-child(odd) { transform: translateY(12px); }
button.origami-station { cursor: pointer; }
button.origami-station:hover:not(:disabled) { transform: translateY(-20px) scale(1.07); }
button.origami-station:nth-child(odd):hover:not(:disabled) { transform: translateY(6px) scale(1.07); }

.station-node { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; transform: rotate(45deg); background: #f2e8d4; border: 2.5px solid #fffcf5; box-shadow: 0 4px 0 #d1c1a3, 0 8px 14px -6px rgba(42, 32, 18, 0.24); }
.station-node > span { transform: rotate(-45deg); font-size: 16px; line-height: 1; font-weight: 700; color: #7d6d58; }
.origami-station.done .station-node { background: linear-gradient(145deg, #256451 0%, #19483a 100%); box-shadow: 0 4px 0 #113127; }
.origami-station.done .station-node > span { color: #fffcf5; }
.origami-station.current .station-node { background: linear-gradient(145deg, #e55b42 0%, #c64129 100%); box-shadow: 0 0 0 3px var(--ochre-bright), 0 5px 0 #942c19; }
.origami-station.current .station-node > span { color: #fffcf5; }
.origami-station.peak.current .station-node, .origami-station.peak.done .station-node { background: linear-gradient(145deg, #f6cd76 0%, #db9525 100%); box-shadow: 0 0 0 3px #fffcf5, 0 5px 0 #9c6510; }
.origami-station.peak.current .station-node > span, .origami-station.peak.done .station-node > span { color: #2b200f; }

.station-pawn { position: absolute; top: -30px; left: 50%; width: 34px; height: 34px; margin-left: -17px; z-index: 4; pointer-events: none; animation: pawn-hop 2.2s ease-in-out infinite; filter: drop-shadow(0 5px 3px rgba(42, 32, 18, 0.32)); }
.station-meta { margin-top: 6px; display: grid; gap: 1px; }
.station-name { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.origami-station.current .station-name { color: var(--seal-dark); }
.station-step { font-size: 10.5px; color: var(--muted); }

/* ==========================================================================
   Reader Desk — Cutting Mat, Paper Airplane Progress, Quick-Stamp Chips
   ========================================================================== */
.reader {
  background:
    linear-gradient(rgba(27, 77, 62, 0.055) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(27, 77, 62, 0.055) 1px, transparent 1px) 0 0 / 24px 24px,
    #dde4dc;
}
.materials { background: #f7f1e5; border-right: 1.5px solid var(--card-edge); }
.feedback { background: var(--surface); border-left: 1.5px solid var(--card-edge); }
.surface { border-radius: 3px; box-shadow: 0 6px 0 rgba(27, 55, 44, 0.1), 0 14px 30px -10px rgba(24, 44, 35, 0.26); }

.reading-progress { position: relative; height: 14px; background: #eef2ec; border-bottom: 1px solid var(--line); flex: none; display: flex; align-items: center; padding-inline: 14px; }
.reading-progress-rail { position: relative; width: 100%; height: 4px; border-radius: 999px; background: #d7dfd5; }
.reading-progress-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #215e4c 0%, #e4a336 100%); transition: width 0.35s var(--spring); }
.reading-progress-plane { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; transform: translate(-50%, -50%); transition: left 0.35s var(--spring); pointer-events: none; }

.quick-stamps { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.quick-stamp { border: 1.5px solid #dfd1b8; border-radius: 999px; background: #fffaf0; color: #4f4232; padding: 3px 9px; font-size: 11.5px; font-weight: 600; box-shadow: 0 2px 0 #dfd2ba; transition: transform 0.2s var(--spring), background-color 0.15s ease; }
.quick-stamp:hover { transform: translateY(-2px) rotate(-1deg); background: var(--ochre-soft); border-color: var(--ochre); color: var(--ochre-ink); }
.quick-stamp:active { transform: translateY(1px) scale(0.95); }

.quest-clear-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ochre-soft); border: 1.5px solid #e4b85e; color: var(--ochre-ink); font-size: 11px; font-weight: 700; box-shadow: 0 2px 0 #e6cfa0; }

/* Shared Cards, Dialogs, Login Title Screen */
.project-overview, .versions-list, .submission-form, .declaration-paper { border: 2px solid #fffcf5; outline: 1.5px solid rgba(112, 92, 62, 0.22); border-radius: 16px; background: var(--surface); box-shadow: var(--paper-shadow); }
dialog[open] { border: 2.5px solid #fffcf5; outline: 1.5px solid rgba(112, 92, 62, 0.28); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 0 #cfc0a4, 0 28px 60px rgba(24, 34, 28, 0.36); animation: dialog-unfold 0.28s var(--spring) both; }
.toast { background: linear-gradient(180deg, #215747 0%, #174034 100%); border: 2px solid #fffcf5; box-shadow: 0 4px 0 #0e2820, 0 12px 24px rgba(18, 42, 34, 0.35); border-radius: 11px; font-weight: 600; animation: toast-rise 0.28s var(--spring); }

.access { border: 3px solid #fffcf5; outline: 1.5px solid rgba(112, 92, 62, 0.24); border-radius: 20px; box-shadow: 0 7px 0 #d0c1a6, 0 24px 44px -16px rgba(34, 48, 38, 0.32); overflow: hidden; animation: tabletop-enter 0.45s var(--spring) both; }
.access-cover.paper-cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 32px 28px; min-height: 410px; background: linear-gradient(155deg, #1b4d3e 0%, #246350 56%, #163d31 100%); color: #fffcf4; overflow: hidden; }
.paper-cover-art { position: absolute; inset: 0; pointer-events: none; }
.paper-cover-art svg { width: 100%; height: 100%; display: block; }
.paper-cover-copy { position: relative; z-index: 1; }
.paper-cover-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--ochre-soft); color: var(--ochre-ink); font-size: 11.5px; font-weight: 700; border: 1.5px solid #fffcf5; transform: rotate(-2deg); }
.paper-cover-copy h2 { margin: 14px 0 8px; font-family: var(--font-title); font-weight: 400; font-size: 28px; line-height: 1.28; color: #fffcf4; }
.paper-cover-copy p { margin: 0; color: #d7e8df; font-size: 13.5px; line-height: 1.6; }
.paper-cover-crane { position: relative; z-index: 1; align-self: flex-end; width: 78px; height: 78px; animation: pawn-hop 3.6s ease-in-out infinite; filter: drop-shadow(0 8px 6px rgba(10, 26, 20, 0.38)); }

/* Stamp Slam & Confetti */
.stamp-slam { position: fixed; z-index: 45; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-7deg); pointer-events: none; padding: 12px 24px; border-radius: 14px; background: var(--seal); color: #fffcf5; border: 3px solid #fffcf5; outline: 3px dashed rgba(255, 252, 245, 0.65); outline-offset: -8px; font-family: var(--font-title); font-size: 24px; letter-spacing: 0.06em; box-shadow: 0 6px 0 var(--seal-dark), 0 18px 34px rgba(110, 28, 15, 0.42); animation: stamp-slam-anim 1.25s var(--spring) forwards; }
.quest-burst { position: fixed; z-index: 44; pointer-events: none; left: 50%; top: 42%; }
.quest-spark { position: absolute; width: 11px; height: 7px; border-radius: 2px; background: var(--spark-color, #e4a336); animation: quest-pop 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes tabletop-enter { 0% { opacity: 0; transform: translateY(16px) scale(0.985); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes envelope-drop { 0% { opacity: 0; transform: translateY(22px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes card-unfold { 0% { opacity: 0; transform: perspective(700px) rotateX(-12deg) translateY(18px); } 100% { opacity: 1; transform: perspective(700px) rotateX(0) translateY(0); } }
@keyframes dialog-unfold { 0% { opacity: 0; transform: perspective(700px) rotateX(-8deg) scale(0.93); } 100% { opacity: 1; transform: perspective(700px) rotateX(0) scale(1); } }
@keyframes toast-rise { 0% { opacity: 0; transform: translate(-50%, 14px) scale(0.95); } 100% { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes fox-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes fox-jump { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-16px) scale(1.12) rotate(-6deg); } 70% { transform: translateY(2px) scale(0.96) rotate(4deg); } 100% { transform: translateY(0) scale(1); } }
@keyframes bubble-pop { 0% { opacity: 0; transform: scale(0.86) translateY(6px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pawn-hop { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
@keyframes barber-slide { 0% { background-position: 0 0; } 100% { background-position: 26px 0; } }
@keyframes stamp-slam-anim { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.1) rotate(-20deg); } 22% { opacity: 1; transform: translate(-50%, -50%) scale(0.95) rotate(-6deg); } 78% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-7deg); } 100% { opacity: 0; transform: translate(-50%, -62%) scale(0.96) rotate(-7deg); } }
@keyframes quest-pop { 0% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.45) rotate(var(--rot)); } }

@media (prefers-reduced-motion: reduce) {
  .cutting-mat, .kraft-envelope, .project-card, dialog[open], .toast, .origami-fox, .zone-paper-pin, .station-pawn, .paper-cover-crane, .island-xp-fill { animation: none !important; }
  .quest-burst, .stamp-slam { display: none !important; }
  .envelope-body, .envelope-letter, .envelope-flap, .project-card, .button { transition: none !important; }
}

/* ==========================================================================
   Responsive Mobile Breakpoints
   ========================================================================== */
@media (max-width: 820px) {
  .tabletop-collection { width: calc(100% - 24px); padding: 16px 0 42px; }
  .cutting-mat { padding: 20px 16px 22px; border-width: 4px; }
  .world-map-tilt { padding: 38px 12px 20px; }
  .world-zones { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 32px; min-height: 0; }
  .world-zone:nth-child(even), .world-zone:nth-child(odd) { transform: none; }
}

@media (max-width: 600px) {
  .brand-wordmark small { display: none; }
  .brand-wordmark strong { font-size: 19px; }
  .brand-icon.origami-logo { width: 32px; height: 32px; border-radius: 9px; }
  .brand-icon.origami-logo svg { width: 23px; height: 23px; }
  .sfx-toggle span { display: none; }
  .desk-fox-wrap { width: 100%; }
  .fox-bubble { flex: 1; max-width: none; font-size: 12px; }
  .origami-fox { width: 62px; height: 62px; }
  .deck-bar { gap: 10px; }
  .catalog-search { width: 100%; }
  .envelope-tray, .card-hand { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .letter-top-row { flex-wrap: wrap; }
  .letter-journal { text-align: left; }
  .zone-paper-pin { max-width: 74px; padding: 2px 5px; font-size: 10px; border-width: 1.5px; }
  .world-zones { padding-top: 10px; row-gap: 38px; }
  .kraft-envelope:nth-child(odd) .envelope-body, .kraft-envelope:nth-child(even) .envelope-body,
  .project-card.game-card:nth-child(n) { transform: none; }
  .project-card-top { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
  .project-byline .journal-name { border-left: 0; padding-left: 0; }
  .origami-map { padding: 38px 12px 22px; clip-path: polygon(0% 4px, 33% 0%, 66% 4px, 100% 0%, 100% calc(100% - 4px), 66% 100%, 33% calc(100% - 4px), 0% 100%); }
  .origami-folds { grid-template-columns: repeat(3, 1fr); }
  .origami-fold:nth-child(4) { display: none; }
  .origami-stations { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 20px; min-height: 0; }
  .origami-station:nth-child(even), .origami-station:nth-child(odd) { transform: none; }
  .station-node { width: 34px; height: 34px; border-radius: 9px; }
  .station-pawn { width: 26px; height: 26px; top: -22px; margin-left: -13px; }
  .access-cover.paper-cover { min-height: 0; padding: 20px 18px; }
  .paper-cover-crane { display: none; }
}

/* ==========================================================================
   3-Mode View Switcher (2D Tabletop | 2D RPG Hall | 3D Origami Gallery)
   ========================================================================== */
.view-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.view-mode-tip {
  font-size: 12px;
  color: #cde0d7;
  font-weight: 600;
}

.view-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(11, 33, 27, 0.62);
  border: 1.5px solid rgba(255, 252, 245, 0.24);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.24);
}

.view-mode-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #cde0d7;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.22s var(--spring), background-color 0.16s ease, color 0.16s ease;
}

.view-mode-switch button:hover {
  color: #fffcf5;
  transform: translateY(-1px);
}

.view-mode-switch button[aria-pressed="true"] {
  background: linear-gradient(180deg, #fae2a3 0%, #e4a336 100%);
  color: #2a2010;
  box-shadow: 0 2px 0 #9e6814;
}

.spatial-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.spatial-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.spatial-header-left h1 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  color: #fffcf4;
  display: flex;
  align-items: center;
  gap: 9px;
}

/* ==========================================================================
   Spatial Stage Container (Shared by 2D RPG Hall & 3D Three.js Gallery)
   ========================================================================== */
.spatial-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spatial-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.spatial-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(11, 33, 27, 0.56);
  border: 1px solid rgba(255, 252, 245, 0.2);
  color: #e4f0ea;
  font-size: 12px;
  font-weight: 600;
}

.spatial-chip strong {
  color: var(--ochre-bright);
}

.spatial-chip.subtle {
  color: #b7d2c6;
}

.spatial-overlay-bar {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 5;
  pointer-events: none;
}

.spatial-overlay-bar > * {
  pointer-events: auto;
}

.spatial-chip.overlay {
  background: rgba(14, 38, 31, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 252, 245, 0.24);
  box-shadow: 0 3px 10px rgba(8, 22, 17, 0.25);
}

.spatial-reset-btn {
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 252, 245, 0.45);
  background: rgba(14, 38, 31, 0.8);
  backdrop-filter: blur(6px);
  color: #fffcf5;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--spring), background-color 0.15s ease;
}

.spatial-reset-btn:hover {
  background: rgba(20, 56, 46, 0.94);
  transform: translateY(-1px);
}

.spatial-canvas-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #fffcf5;
  box-shadow: 0 6px 0 #102f26, 0 18px 34px rgba(7, 22, 17, 0.42);
  background: #173f35;
}

.spatial-canvas-wrap.three-wrap {
  background: #efe6d5;
}

.spatial-canvas {
  display: block;
  width: 100%;
  touch-action: none;
  user-select: none;
}

.spatial-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #efe6d5;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 20px;
  z-index: 4;
}

.spatial-fallback {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  color: var(--ink);
  background: #f8f1e1;
}

.spatial-fox-toast {
  position: absolute;
  left: 16px;
  top: 14px;
  max-width: min(420px, calc(100% - 32px));
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.96);
  color: var(--ink);
  border: 2px solid #e4ba67;
  box-shadow: 0 4px 16px rgba(14, 34, 28, 0.3);
  font-size: 13px;
  font-weight: 700;
  z-index: 6;
  animation: bubble-pop 0.3s var(--spring) both;
}

/* DOM-on-Demand Exhibit Inspection Card */
.spatial-inspect-card {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: min(420px, calc(100% - 32px));
  padding: 15px 16px 14px;
  border-radius: 15px;
  background: linear-gradient(180deg, #fffefb 0%, #faf3e4 100%);
  color: var(--ink);
  border: 2.5px solid #fffcf5;
  outline: 1.5px solid rgba(112, 92, 62, 0.34);
  box-shadow: 0 7px 0 #c9b798, 0 20px 38px rgba(10, 26, 20, 0.48);
  z-index: 7;
  animation: bubble-pop 0.32s var(--spring) both;
}

.spatial-inspect-card[hidden] {
  display: none !important;
}

.inspect-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.inspect-journal {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspect-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #d5c7ae;
  background: #f7efe0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

.inspect-nav {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  padding: 2px 4px;
  border-radius: 999px;
  background: #f3ead8;
  border: 1px solid #dfd1b8;
}

.inspect-step {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: #fffcf5;
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.inspect-step:hover {
  background: var(--ochre-soft);
  color: var(--ochre-ink);
}

.inspect-counter {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding-inline: 3px;
  font-variant-numeric: tabular-nums;
}

/* Reader Sidebar Visual Thread: Yellow Post-it Brief + Tactile Thread Cards */
.round-brief {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 6px 6px 14px 6px;
  background: #fef4c8;
  border: 1.5px solid #ead488;
  border-left: 4px solid #e4a336;
  box-shadow: 0 3px 0 rgba(164, 134, 62, 0.22);
}

.round-brief summary {
  color: #5e4416;
  font-weight: 700;
}

.round-brief p {
  color: #4f4225;
}

.thread {
  border: 1.5px solid #e2d7c3;
  border-radius: 12px;
  background: #fffefb;
  box-shadow: 0 2px 0 #e6dcc9;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.thread:hover {
  border-color: #cbbba0;
}

.thread.focused {
  border-color: #256451;
  background: #f8fbf9;
  box-shadow: 0 3px 0 #c5d9cf;
}

.spatial-inspect-card h3 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
}

.inspect-sender {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
}

.inspect-sticky {
  margin: 8px 0 0;
  padding: 7px 10px;
  border-radius: 4px 4px 10px 4px;
  background: #fef4c8;
  border-left: 3px solid #e4a336;
  color: #4f4225;
  font-size: 12.5px;
  line-height: 1.48;
}

.inspect-actions {
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inspect-meta {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

/* Bottom Quick-Jump Exhibit Dock */
.spatial-dock {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 2px;
  scrollbar-width: thin;
}

.spatial-dock-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 252, 245, 0.25);
  background: rgba(11, 33, 27, 0.62);
  color: #eaf4ef;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--spring), background-color 0.15s ease;
}

.spatial-dock-pill:hover {
  transform: translateY(-2px);
  background: rgba(255, 252, 245, 0.18);
}

.spatial-dock-pill[aria-pressed="true"] {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--ochre-bright);
  box-shadow: 0 3px 0 rgba(10, 26, 20, 0.4);
}

.dock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3aa585;
}

.spatial-dock-pill.urgent .dock-dot {
  background: #eb553e;
  box-shadow: 0 0 0 2px rgba(247, 207, 120, 0.6);
}

.spatial-dock-empty {
  font-size: 12.5px;
  color: #cde0d7;
}

/* Real Zijingang Campus Map Overlay Bar, Zone Chips & Compact Multi-Project 2D List */
.zju-map-topbar {
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
}

.campus-zone-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 0;
  pointer-events: auto;
  scrollbar-width: none;
}

.campus-zone-strip::-webkit-scrollbar {
  display: none;
}

.zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 252, 245, 0.28);
  background: rgba(16, 40, 56, 0.82);
  backdrop-filter: blur(8px);
  color: #eef6fa;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.zone-chip:hover {
  transform: translateY(-1px);
  background: rgba(28, 74, 126, 0.92);
}

.zone-chip.active {
  background: linear-gradient(180deg, #f7cf78 0%, #e4a336 100%);
  color: #2f2008;
  border-color: #fff6df;
  box-shadow: 0 2px 0 #9f6714;
}

.zone-chip em {
  font-style: normal;
  font-size: 10.5px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.2);
}

.zone-chip.active em {
  background: rgba(47, 32, 8, 0.16);
}

.zone-chip.has-pending::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0553e;
  box-shadow: 0 0 0 2px rgba(247, 207, 120, 0.5);
}

.campus-map-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  margin-left: auto;
  pointer-events: auto;
}

.spatial-chip.icon-only {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  font-size: 15px;
}

.dock-zone-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(28, 74, 126, 0.72);
  color: #eaf3fb;
  font-weight: 700;
}

.spatial-dock-pill[aria-pressed="true"] .dock-zone-tag {
  background: #1c4a7e;
  color: #fffcf5;
}

.inspect-zone-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e9f0f8;
  color: #1c4a7e;
  white-space: nowrap;
}

.inspect-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e9f3ee;
  color: #1f5c4a;
  white-space: nowrap;
}

.inspect-badge.urgent {
  background: #fdeae5;
  color: #b83c2b;
}

.desk-density-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(11, 32, 26, 0.45);
  border: 1px solid rgba(255, 252, 245, 0.22);
}

.desk-density-toggle button {
  border: 0;
  background: transparent;
  color: #d6e8e0;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.desk-density-toggle button[aria-pressed="true"] {
  background: #fffcf5;
  color: #1d3c32;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

/* Compact 2D List Mode for 10-30+ Advisor Manuscripts */
.envelope-tray.compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(410px, 1fr));
  gap: 11px;
}

/* Immersive Fullscreen Overlay for 2D / 3D Zijingang Campus */
.spatial-canvas-wrap.is-fullscreen {
  position: fixed;
  inset: 10px;
  z-index: 60;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(7, 20, 16, 0.72);
  display: flex;
  flex-direction: column;
}

.spatial-canvas-wrap.is-fullscreen .spatial-3d-host,
.spatial-canvas-wrap.is-fullscreen .zju-rpg-canvas {
  flex: 1 1 auto;
  height: 100% !important;
}

/* Admin Learning Analytics Export Modal */
.la-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.la-stat {
  padding: 10px 8px;
  border-radius: 10px;
  background: #f8f2e4;
  border: 1px solid #e2d5bc;
  text-align: center;
}

.la-stat strong {
  display: block;
  font-size: 18px;
  color: #1c4a7e;
  line-height: 1.2;
}

.la-stat span {
  font-size: 11px;
  color: var(--muted);
}

.la-section {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffcf5;
  border: 1px solid #e5dac5;
  font-size: 12.5px;
}

.la-section ul {
  margin: 6px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
}

.la-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .la-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Formative Feedback Uptake Disposition & Previous-Round Comparison Panel */
.resolve-disposition {
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  background: #f6efe0;
  border: 1px dashed #cbb896;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.resolve-disposition button {
  border: 1px solid #d4c3a4;
  background: #fffcf5;
  color: var(--ink);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.resolve-disposition button:hover {
  background: #e7f1ec;
  border-color: #256451;
  color: #154537;
}

.prev-round-panel {
  margin-bottom: 12px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #f3f7fa;
  border: 1.5px solid #c9dae8;
}

.prev-round-panel summary {
  font-size: 12.5px;
  font-weight: 700;
  color: #1c4a7e;
  cursor: pointer;
}

.prev-round-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.prev-round-item {
  padding: 8px 10px;
  border-radius: 9px;
  background: #fffefb;
  border: 1px solid #d7e3ed;
  font-size: 12.5px;
}

.prev-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.prev-round-item p {
  margin: 4px 0 0;
  line-height: 1.5;
}

.prev-round-reply {
  color: #225e66;
  font-size: 12px;
}

/* IRB Research Informed Consent Notice */
.irb-consent-bar {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  width: min(440px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: 14px;
  background: #fffdf7;
  border: 2px solid #1c4a7e;
  box-shadow: 0 6px 0 rgba(28, 74, 126, 0.25), 0 18px 34px rgba(15, 32, 48, 0.24);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
}

.irb-consent-bar p {
  margin: 0 0 10px;
}

.irb-consent-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.envelope-tray.compact .kraft-envelope {
  background: transparent;
  padding: 0;
  box-shadow: none;
  border: 0;
  transform: none !important;
}

.envelope-tray.compact .kraft-envelope .envelope-flap {
  display: none;
}

.envelope-tray.compact .kraft-envelope .envelope-body {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fffdf7;
  border: 1.5px solid #dfd3bd;
  box-shadow: 0 3px 0 rgba(12, 34, 27, 0.22);
}

.envelope-tray.compact .kraft-envelope[data-attention="true"] .envelope-body {
  border-left: 4px solid #c9462f;
}

.envelope-tray.compact .kraft-envelope .envelope-seal {
  position: static;
  transform: none;
  width: 34px;
  height: 34px;
  font-size: 13px;
  margin: 0;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.envelope-tray.compact .kraft-envelope .envelope-letter {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-width: 0;
}

.envelope-tray.compact .kraft-envelope .letter-top-row {
  margin-bottom: 3px;
  gap: 6px;
}

.envelope-tray.compact .kraft-envelope h2 {
  font-size: 15.5px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.envelope-tray.compact .kraft-envelope .letter-sender {
  display: inline;
  margin: 0 8px 0 0;
  font-size: 11.5px;
}

.envelope-tray.compact .kraft-envelope .letter-sticky {
  margin: 4px 0 0;
  padding: 3px 8px;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.envelope-tray.compact .kraft-envelope .envelope-footer {
  margin: 0;
  padding: 0;
  border: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.envelope-tray.compact .kraft-envelope .envelope-meta {
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .view-mode-switch { width: 100%; justify-content: space-between; }
  .view-mode-tip { display: none; }
  .view-mode-switch button { flex: 1; justify-content: center; padding: 4px 4px; font-size: 11.5px; white-space: nowrap; }
  .spatial-header-bar { margin-bottom: 10px; gap: 8px; }
  .zju-map-topbar { flex-direction: column; gap: 6px; }
  .campus-zone-strip { max-width: 100%; width: 100%; }
  .campus-map-tools { margin-left: 0; width: 100%; justify-content: flex-end; }
  .spatial-inspect-card { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 12px; }
  .spatial-inspect-card h3 { font-size: 17px; }
  .envelope-tray.compact { grid-template-columns: 1fr; }
  .envelope-tray.compact .kraft-envelope .envelope-body { grid-template-columns: 30px minmax(0, 1fr); }
  .envelope-tray.compact .kraft-envelope .envelope-footer { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; width: 100%; }
}
