/* --- css/00-tokens.css --- */
/* ==========================================================================
     01. DESIGN TOKENS & RESET
     ========================================================================== */
  :root {
    --red: #AE4041;
    --deep: #842A38;
    --burgundy-dark: #6E1F2D;
    --gold: #E9B47C;
    --gold-bright: #F6C587;
    --gold-deep: #C98653;
    --cream: #FFF1EB;
    --paper: #FFF9F2;
    --rose: #F4DEDA;
    --ink: #81303C;
    --ink-muted: #9E5963;
    --header-height: 82px;
    --footer-height: 0px;
    /* Shared checkerboard palette. The opening screen and homepage now match. */
    --checker-light: #FFF1EB;
    --checker-pink: #F4DEDA;
    --checker-zoom: 1;
    --checker-tile-size: calc(164px * var(--checker-zoom));
    --checker-drift-duration: 28s;
  }

  * {
    box-sizing: border-box;
  }

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

  body {
    background: var(--cream);
    color: var(--ink);
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    overflow-x: hidden;
  }

  button, a {
    font: inherit;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
  }

/* Route titles remain available to assistive technology without occupying
   the approved portal artboard. A focused route heading is an announced
   landmark following internal single-page navigation. */
.ak-visually-hidden {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
  clip-path: inset(50%) !important;
}
.ak-route-heading:focus { outline: none; }

/* --- css/01-header.css --- */
/* ==========================================================================
     02. SITE HEADER & NAVIGATION (TRUE-ANGLE, NON-STRETCHED)
     ========================================================================== */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 1.8vw, 24px);
    padding: 0 clamp(58px, 5.2vw, 92px);
    background:
      repeating-conic-gradient(from 45deg, rgba(255, 214, 204, 0.05) 0 25%, transparent 0 50%) 0 0 / 48px 48px,
      linear-gradient(180deg, #7D2333 0%, #9E3744 50%, #7A2232 100%);
    border-top: 3px solid #F6C992;
    border-bottom: 4px solid #EAB277;
    box-shadow:
      0 3px 0 #FFF5E8,
      0 8px 20px rgba(84, 22, 34, 0.16);
  }

  /* Left & Right 1:1 Faceted Gems (Never stretched or clipped) */
  .ak-end-gem {
    position: absolute;
    width: 42px;
    height: 42px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(64, 15, 25, 0.35));
  }

  .ak-end-gem svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .ak-end-gem-left { left: clamp(10px, 1.4vw, 24px); }
  .ak-end-gem-right { right: clamp(10px, 1.4vw, 24px); }

  .site-header .brand {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: clamp(160px, 16vw, 224px);
    min-height: 44px;
    padding: 0;
    background: none;
    border: none;
    z-index: 1;
  }

  .header-nav {
    position: relative;
    display: flex;
    gap: clamp(8px, 0.85vw, 13px);
    align-items: center;
    margin-left: auto;
    white-space: nowrap;
  }

  .nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 clamp(13px, 1.15vw, 17px);
    border: 1.5px solid #DFAA75;
    border-radius: 999px;
    background: linear-gradient(180deg, #FFF9F0 0%, #FCE6CF 100%);
    box-shadow: 0 2px 0 #C27E4E, 0 4px 8px rgba(68, 17, 29, 0.14);
    color: #842A38;
    font-size: clamp(12.5px, 0.9vw, 14px);
    font-weight: 800;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }

  .nav-pill:hover,
  .nav-pill:focus-visible {
    transform: translateY(-1.5px);
    border-color: #FFE7B9;
    background: linear-gradient(180deg, #FFFDF9 0%, #FFEEDB 100%);
    box-shadow: 0 3px 0 #C27E4E, 0 0 0 3px rgba(255, 232, 192, 0.24);
    outline: none;
  }

  .nav-pill.current {
    color: #FFF8F0;
    background: linear-gradient(180deg, #C8434E 0%, #8E2A3A 100%);
    border-color: #F6CA94;
    box-shadow: 0 2px 0 #641B27, 0 0 0 2px rgba(255, 233, 196, 0.22);
  }

  /* Keep the active route readable when the pointer remains over it. */
  .nav-pill.current:hover,
  .nav-pill.current:focus-visible {
    color: #FFF8F0;
    background: linear-gradient(180deg, #C8434E 0%, #8E2A3A 100%);
    border-color: #F6CA94;
    box-shadow: 0 2px 0 #641B27, 0 0 0 3px rgba(255, 233, 196, 0.35);
  }

  .ak-nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: block;
  }

  .menu-trigger {
    display: none;
  }

  /* Header Minimal Style Option (Toggled in Layout Lab) */
  .site-header[data-header-style="minimal"] .nav-pill:not(.current) {
    background: rgba(105, 25, 38, 0.28);
    color: #FFF5EB;
    box-shadow: none;
    border-color: rgba(238, 185, 133, 0.65);
  }

  .site-header[data-header-style="minimal"] .nav-pill.current {
    color: #842A38;
    background: #FFF6EC;
    border-color: #EAB781;
  }

/* --- css/02-portal-stage.css --- */
/* ==========================================================================
     03. ANIMATED CHECKERBOARD & 16:9 PORTAL STAGE
     ========================================================================== */
  /* One EXACT tile diagonally up-left per cycle: end and start are identical.
     The CSS pseudo-element is the sole visible homepage checker painter. */
  @keyframes checker-drift-up-left {
    from { background-position: 0 0; }
    to { background-position: calc(-1 * var(--checker-tile-size)) calc(-1 * var(--checker-tile-size)); }
  }
  /* The smaller loading-card pattern is also exactly one tile per cycle. */
  @keyframes checker-loader-drift-up-left {
    from { background-position: 0 0; }
    to { background-position: -96px -96px; }
  }

  @keyframes svg-checker-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(164px, 164px); }
  }

  .viewport {
    position: relative;
    min-height: calc(100svh - var(--header-height));
    overflow: hidden;
    background: repeating-conic-gradient(from 45deg, var(--checker-pink) 0 25%, var(--checker-light) 0 50%) 0 0 / var(--checker-tile-size) var(--checker-tile-size);
    /* For routed subpages. Homepage uses only its ::before painter below. */
    animation: checker-drift-up-left var(--checker-drift-duration) linear infinite;
  }

  .viewport.is-subpage {
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 64px) 64px;
  }

  .page-view[hidden] {
    display: none !important;
  }

  /* Uniform 16:9 stage scaling */
  .portal-stage {
    position: absolute;
    left: 50%;
    top: 50%;
    /* The artboard is 16:9, but an especially tall desktop window would
       otherwise enlarge it far beyond the visible sides. Cap this overscan so
       the illustrated welcome paper is never pushed off the right edge. */
    width: min(max(100%, calc((100svh - var(--header-height)) * 16 / 9)), 110vw);
    aspect-ratio: 16 / 9;
    transform: translate(-50%, -50%);
  }

  /* Mid-width desktop screens can be taller than 16:9. Overscanning the
     portal to fill their height cuts off the welcoming hand and note. Keep
     the entire SVG camera in view here without changing any SVG paths. */
  @media (min-width: 1131px) and (max-width: 1370px) {
    .portal-stage { width: 100%; }
  }

  .desktop-art {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
  }

  .portal-stage svg {
    max-width: none;
  }

  .portal-stage .buttonText {
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    user-select: none;
  }

  /* Camera zoom-out inspection mode */
  .viewport.artboard-view {
    background: #EBC1B9;
  }

  .viewport.artboard-view::after {
    content: 'OFFSCREEN ART PREVIEW — CAMERA ZOOMED OUT';
    position: absolute;
    right: 13px;
    top: 12px;
    z-index: 3;
    background: rgba(255, 249, 240, 0.92);
    color: #873040;
    border: 1px solid #D9AC7E;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    pointer-events: none;
  }

/* --- css/03-portal-interactions.css --- */
/* ==========================================================================
     04. SVG PORTAL ANIMATIONS & INTERACTIVE DIAMOND TILES
     ========================================================================== */
  #checker-anim-group {
    animation: svg-checker-drift 20s linear infinite;
  }

  .svg-nav-tile {
    cursor: pointer;
  }

  .portal-nav-link:focus-visible {
    outline: none; /* Focus is drawn on the gold diamond below. */
  }

  .svg-nav-tile .tile-inner {
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), filter 0.26s ease;
    transform-box: fill-box;
    transform-origin: center;
  }
  /* During frame-controlled entrance, do not interpolate the JS-computed scale
     a second time. The old 260ms CSS transition lagged behind every frame,
     then snapped when the animator restored the settled scene. Hover effects
     automatically return when the entrance ends. */
  body.ak-debug-active .svg-nav-tile .tile-inner {
    transition: none !important;
  }
  body.ak-debug-active #welcome-note-entrance {
    transform-box: fill-box;
    transform-origin: center;
  }

  .svg-nav-tile:hover .tile-inner,
  .portal-nav-link:focus-visible .svg-nav-tile .tile-inner {
    transform: translateY(-6px) scale(1.045);
    filter: drop-shadow(0 10px 14px rgba(130, 39, 49, 0.25));
  }

  .portal-nav-link:focus-visible .svg-nav-tile .tile-bg {
    stroke: #FFDDA8;
    stroke-width: 5;
  }

  .svg-nav-tile:active .tile-inner {
    transform: translateY(-2px) scale(0.99);
  }

  .svg-nav-tile.is-disabled {
    cursor: not-allowed;
  }

  .svg-nav-tile.is-disabled:hover .tile-inner {
    transform: translateY(-2px) scale(1.01);
    filter: none;
  }

  @keyframes locked-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
  }

  .svg-nav-tile.shake .tile-inner {
    animation: locked-shake 0.35s ease;
  }

  @keyframes portal-selected-breathe {
    0%, 100% { filter: drop-shadow(0 1px 2px rgba(111, 34, 45, 0.12)); }
    50% { filter: drop-shadow(0 2px 10px rgba(239, 174, 126, 0.36)); }
  }

  #nav-videos .tile-bg {
    animation: portal-selected-breathe 5.5s ease-in-out infinite;
  }

  @keyframes sparkle-twinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.82); }
    50% { opacity: 1; transform: scale(1.16); }
  }

  @keyframes float-gentle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
  }

  @keyframes arrow-nudge-left {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
  }

  @keyframes arrow-nudge-right {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
  }

  @keyframes glow-breathe {
    0%, 100% { opacity: 0.92; }
    50% { opacity: 0.78; }
  }

  #portal-center-glow {
    animation: glow-breathe 7s ease-in-out infinite;
  }

  .sparkle-item {
    transform-box: fill-box;
    transform-origin: center;
    animation: sparkle-twinkle 3.2s ease-in-out infinite;
  }

  .sparkle-item:nth-child(2n) {
    animation-delay: 1.1s;
    animation-duration: 3.8s;
  }

  .sparkle-item:nth-child(3n) {
    animation-delay: 2.1s;
    animation-duration: 2.9s;
  }

  .compass-float {
    animation: float-gentle 4.5s ease-in-out infinite;
  }

  .compass-float.delay {
    animation-delay: 2.25s;
  }

  .note-float {
    animation: float-gentle 5.2s ease-in-out infinite;
  }

  #welcome-note {
    filter: drop-shadow(0 6px 12px rgba(124, 47, 58, 0.12));
  }

  /* In the opening, each decorative arrow grows at its FINAL anchor.
     transform-box is essential for SVG paths: their fill-box origins are
     independent of the full artboard and of responsive camera changes. */
  .arrow-left, .arrow-right {
    transform-box: fill-box;
    transform-origin: center;
  }
  .arrow-left {
    animation: arrow-nudge-left 2.4s ease-in-out infinite;
  }

  .arrow-right {
    animation: arrow-nudge-right 2.4s ease-in-out infinite;
  }

/* --- css/04-inner-pages.css --- */
/* ==========================================================================
     05. INNER PAGES LAYOUT (VIDEOS, ABOUT, WORKSHOP, GALLERY)
     ========================================================================== */
  .subpage-shell {
    max-width: 1120px;
    margin: 0 auto;
    background: rgba(255, 249, 242, 0.95);
    border: 4px solid var(--gold);
    outline: 3px solid #FFF8EE;
    outline-offset: -12px;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(94, 28, 40, 0.16);
    padding: clamp(22px, 4vw, 44px);
    position: relative;
    animation: subpage-enter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  @keyframes subpage-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .subpage-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 2px dashed #E8B888;
  }

  .subpage-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .subpage-diamond-badge {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #CC444E, #822934);
    border: 3px solid var(--gold);
    transform: rotate(45deg);
    display: grid;
    place-items: center;
    color: #FFF8F0;
    box-shadow: none;
    flex-shrink: 0;
  }

  .subpage-diamond-badge svg {
    width: 24px;
    height: 24px;
    transform: rotate(-45deg);
  }

  .subpage-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    color: var(--deep);
    letter-spacing: -0.02em;
  }

  .subpage-subtitle {
    margin: 4px 0 0;
    font-size: 15px;
    color: var(--ink-muted);
    font-weight: 700;
  }

  .back-portal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 40px;
    border: 2px solid #B87476;
    background: #FFF9F2;
    color: var(--deep);
    font-weight: 800;
    font-size: 14px;
    box-shadow: none;
    transition: background-color 0.18s ease, color 0.18s ease;
  }

  .back-portal-btn:hover {
    background: #F5E1DC;
    color: #762332;
    border-color: #9B4F59;
  }


  /* SHARED TEMPORARY DESTINATIONS — used for Videos / About / Workshop / Gallery.
     Consistent with the approved portal, no fictional biographies or demo content. */
  .coming-soon-section {
    min-height: clamp(340px, 46vh, 490px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(30px, 5vw, 60px) clamp(14px, 4vw, 44px);
    border: 2px solid rgba(220, 161, 106, 0.65);
    border-radius: 16px;
    background: radial-gradient(ellipse at 50% 25%, #FFFDF8 0%, #FFF5ED 63%, #FBE7E0 100%);
  }
  .coming-soon-gem {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 6px 0 27px;
    transform: rotate(45deg);
    border: 2px solid #9B3948;
    border-radius: 9px;
    background: linear-gradient(145deg, #BE4350, #7F2938);
    box-shadow: none;
    color: #FFF8F1;
  }
  .coming-soon-gem svg {
    width: 30px;
    height: 30px;
    transform: rotate(-45deg);
    fill: none;
    stroke: currentColor;
  }
  /* The play icon is a filled icon; preserve its established rendering. */
  #page-videos .coming-soon-gem svg { fill: currentColor; stroke: none; }
  .coming-soon-section h2 {
    margin: 0 0 13px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--deep);
  }
  .coming-soon-section p {
    margin: 0 0 28px;
    max-width: 470px;
    font-size: clamp(15px, 1.55vw, 18px);
    font-weight: 600;
    line-height: 1.6;
    color: var(--ink-muted);
  }
  .coming-soon-back {
    min-height: 46px;
    padding-inline: 22px;
  }
  /* A matching SVG arrow replaces the platform-dependent text glyph. */
  .coming-soon-back .back-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.4;
    stroke-linejoin: round;
    stroke-linecap: round;
  }
  .coming-soon-back:hover .back-icon { transform: translateX(-2px); }
  @media (prefers-reduced-motion: reduce) {
    .back-portal-btn { transition: none; }
    .coming-soon-back:hover .back-icon { transform: none; }
  }
  .coming-soon-back:focus-visible {
    outline: 3px solid #732333;
    outline-offset: 4px;
  }
  @media (max-width: 700px) {
    .page-view .subpage-shell { padding: 20px 14px; }
    .page-view .subpage-top { margin-bottom: 18px; }
    .coming-soon-section { min-height: 330px; }
  }

  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
  }

  .portal-card {
    background: #FFFDF9;
    border: 2px solid #E9BE91;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(129, 48, 60, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    display: flex;
    flex-direction: column;
  }

  .portal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(129, 48, 60, 0.15);
  }

  .card-thumb {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #F9E0D8, #F4C6C2);
    border-bottom: 2px solid #E9BE91;
    position: relative;
    display: grid;
    place-items: center;
    color: var(--deep);
  }

  .card-thumb-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(132, 42, 56, 0.9);
    color: #FFF8F0;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 20px;
  }

  .card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
  }

  .card-tag {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #B4434D;
  }

  .card-title {
    margin: 0;
    font-size: 18px;
    color: var(--deep);
  }

  .card-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink-muted);
    flex: 1;
  }

  .about-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    gap: 28px;
    align-items: start;
  }

  .about-portrait-box {
    aspect-ratio: 1;
    border: 3px dashed #B2525C;
    border-radius: 16px;
    background: repeating-conic-gradient(from 45deg, #FBE6E2 0 25%, #FFF8F2 0 50%) 0 0 / 48px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: var(--deep);
    font-weight: 800;
  }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 18px;
  }

  .stat-box {
    background: #FFF6EC;
    border: 2px solid #EBB986;
    border-radius: 12px;
    padding: 12px 15px;
  }

  .stat-label {
    font-size: 12px;
    font-weight: 800;
    color: #AD4852;
    text-transform: uppercase;
  }

  .stat-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--deep);
    margin-top: 4px;
  }

/* Placeholder-page symbols: a little larger within the existing ruby diamond.
   This does not resize or recolor the diamond itself. */
#page-videos .coming-soon-gem svg,
#page-workshop .coming-soon-gem svg,
#page-gallery .coming-soon-gem svg {
  width: 36px;
  height: 36px;
}

/* --- css/05-footer.css --- */
/* ==========================================================================
     06. ORNAMENTAL SITE FOOTER (CLEAN, UNCLIPPED TOP GEM, NO EXTRA BOX LINES)
     ========================================================================== */
  .ammy-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 42px clamp(14px, 2.5vw, 36px) 28px;
    background: linear-gradient(180deg, rgba(255, 241, 235, 0.4), #F9DFD8);
    color: #FFF5E9;
  }

  /* Unclipped outer wrapper so the top diamond gem is NEVER sliced off */
  .ammy-footer__wrap {
    max-width: 1680px;
    margin: 0 auto;
    position: relative;
  }

  .ammy-footer__top-gem {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    z-index: 6;
    filter: drop-shadow(0 3px 6px rgba(72, 18, 29, 0.32));
    pointer-events: none;
  }

  .ammy-footer__shell {
    position: relative;
    padding: 3.5px;
    background: linear-gradient(180deg, #FFE4B5 0%, #E5A260 50%, #C8814E 100%);
    clip-path: polygon(
      24px 0, calc(100% - 24px) 0,
      100% 24px, 100% calc(100% - 24px),
      calc(100% - 24px) 100%, 24px 100%,
      0 calc(100% - 24px), 0 24px
    );
    box-shadow: 0 12px 28px rgba(88, 22, 34, 0.16);
  }

  .ammy-footer__inner {
    position: relative;
    background:
      repeating-conic-gradient(from 45deg, rgba(255, 214, 204, 0.04) 0 25%, transparent 0 50%) 0 0 / 64px 64px,
      linear-gradient(180deg, #792031 0%, #912B3B 50%, #761F30 100%);
    clip-path: polygon(
      22px 0, calc(100% - 22px) 0,
      100% 22px, 100% calc(100% - 22px),
      calc(100% - 22px) 100%, 22px 100%,
      0 calc(100% - 22px), 0 22px
    );
  }

  .ammy-footer__body {
    position: relative;
    display: grid;
    grid-template-columns: minmax(200px, 1.35fr) 1px minmax(460px, 3.6fr) 1px minmax(170px, 1.1fr);
    gap: clamp(16px, 2.2vw, 32px);
    align-items: center;
    padding: 38px clamp(28px, 4vw, 68px) 34px;
  }

  .ammy-footer__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    position: relative;
  }

  .ammy-footer__tagline {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: #F8DFD0;
    opacity: 0.9;
    max-width: 260px;
  }

  .ammy-footer__rule {
    width: 1px;
    height: 108px;
    background: linear-gradient(to bottom, transparent, rgba(255, 229, 185, 0.65) 20%, rgba(255, 229, 185, 0.65) 80%, transparent);
    position: relative;
  }

  .ammy-footer__rule::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #FFF2CC;
    border: 1px solid #DC9A66;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .ammy-footer__links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 1.5vw, 24px);
    align-items: start;
  }

  .ammy-footer__group {
    min-width: 0;
  }

  /* Clean, understated column heading instead of heavy road-sign banners */
  .ammy-footer__group-title {
    margin: 0 0 10px;
    padding-bottom: 7px;
    border-bottom: 1.5px solid rgba(242, 193, 136, 0.45);
  }

  .ammy-footer__group-title > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #FFE7C2;
    font-weight: 800;
    font-size: clamp(13px, 1.05vw, 15px);
    letter-spacing: 0.02em;
    white-space: nowrap;
  }


  .ammy-footer__item {
    margin: 0 0 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFF4E8;
    font-size: clamp(13px, 0.98vw, 14.5px);
    font-weight: 600;
    line-height: 1.3;
    padding: 3px 4px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
  }

  .ammy-footer__item::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    background: #F8C577;
    transform: rotate(45deg);
  }

  .ammy-footer__item:hover,
  .ammy-footer__item:focus-visible {
    color: #FFE3B3;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
  }

  .ammy-footer__item[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
  }

  .ammy-footer__social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 1.3vw, 20px);
  }

  .ammy-footer__social-button {
    width: 44px;
    height: 44px;
    border: 2px solid #E9AC71;
    border-radius: 4px;
    background: linear-gradient(135deg, #FFF9ED, #F7DBA8);
    transform: rotate(45deg);
    display: grid;
    place-items: center;
    color: #8B293A;
    box-shadow: 0 3px 8px rgba(58, 14, 24, 0.28);
    transition: transform 0.18s ease, filter 0.18s ease;
  }

  .ammy-footer__social-button > svg {
    width: 20px;
    height: 20px;
    transform: rotate(-45deg);
  }

  .ammy-footer__social-button:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: rotate(45deg) translate(-2px, -2px);
  }

  .ammy-footer__social-button:disabled {
    cursor: not-allowed;
    opacity: 0.85;
  }

  /* Single clean pair of bottom lines + 3 gems */
  .ammy-footer__bottom-ornaments {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 3;
  }

  .ammy-footer__bottom-ornaments::before,
  .ammy-footer__bottom-ornaments::after {
    content: "";
    position: absolute;
    height: 1.5px;
    top: 50%;
    background: linear-gradient(90deg, transparent, #F2C188, #F2C188);
    width: min(24vw, 320px);
  }

  .ammy-footer__bottom-ornaments::before {
    right: calc(100% + 16px);
  }

  .ammy-footer__bottom-ornaments::after {
    left: calc(100% + 16px);
    background: linear-gradient(90deg, #F2C188, #F2C188, transparent);
  }

  .ammy-footer__bottom-ornaments svg {
    width: 18px;
    height: 18px;
  }

  .ammy-footer__bottom-ornaments svg:nth-child(2) {
    width: 26px;
    height: 26px;
  }

/* --- css/06-motion-and-tools.css --- */
/* ==========================================================================
     07. LOADERS, ENTRANCE STUDIO & FLOATING CONTROLS
     ========================================================================== */
  .floating-controls {
    position: fixed;
    z-index: 90;
    bottom: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .loader-trigger {
    border: 1.5px solid #DBAE79;
    background: rgba(255, 249, 239, 0.95);
    color: #7E303E;
    padding: 7px 13px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 12.5px;
    box-shadow: 0 3px 10px rgba(85, 31, 48, 0.14);
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .loader-trigger:hover,
  .loader-trigger:focus-visible {
    background: #FCE4D9;
    transform: translateY(-1px);
  }

  .review-pill {
    position: fixed;
    right: 16px;
    bottom: 14px;
    z-index: 90;
    border: 1.5px solid #DDA970;
    border-radius: 18px;
    background: rgba(255, 249, 238, 0.94);
    color: #7E3944;
    font-weight: 700;
    font-size: 12px;
    padding: 7px 14px;
    box-shadow: 0 3px 10px rgba(85, 31, 48, 0.12);
    transition: opacity 0.25s ease;
  }

  body.footer-in-view .floating-controls,
  body.footer-in-view .review-pill {
    opacity: 0;
    pointer-events: none;
  }

  /* Layout Lab Drawer */
  .layout-lab[hidden] { display: none !important; }
  .layout-lab {
    position: fixed;
    left: 16px;
    bottom: 58px;
    z-index: 110;
    width: min(360px, calc(100vw - 32px));
    max-height: min(640px, calc(100svh - 100px));
    overflow: auto;
    padding: 16px 18px;
    border: 2px solid #E7AD78;
    border-radius: 16px;
    background: rgba(255, 251, 242, 0.98);
    color: #752734;
    box-shadow: 0 12px 35px rgba(73, 16, 31, 0.25);
    font-size: 13px;
  }

  .lab-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
  }

  .lab-heading button {
    background: transparent;
    border: 0;
    padding: 4px 7px;
    font-size: 18px;
  }

  .lab-intro, .lab-note {
    color: #9C6069;
    line-height: 1.45;
    margin: 7px 0 12px;
  }

  .lab-note {
    font-size: 11.5px;
    margin-bottom: 0;
  }

  .lab-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 11px 0 15px;
  }

  .lab-preset, .lab-actions button, .brand-swatch-actions button {
    background: #FFF7EF;
    border: 1px solid #E4B17D;
    border-radius: 8px;
    padding: 6px 9px;
    color: #802B3A;
    font-weight: 700;
    font-size: 12px;
  }

  .lab-preset.active,
  .brand-swatch-actions button[aria-pressed="true"] {
    background: #912F3C;
    color: #FFF8F0;
    border-color: #912F3C;
  }

  .lab-line {
    margin: 10px 0 2px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
  }

  .lab-line output {
    color: #9D4B55;
    font-variant-numeric: tabular-nums;
  }

  .layout-lab input[type=range] {
    display: block;
    width: 100%;
    accent-color: #AC424A;
    cursor: pointer;
  }

  .lab-experiments {
    border: 1px solid #E5C5A0;
    border-radius: 11px;
    padding: 8px 11px 11px;
    margin-top: 14px;
  }

  .lab-experiments legend {
    font-weight: 800;
    color: #853040;
    padding: 0 5px;
  }

  .lab-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 9px 0;
    font-weight: 600;
    cursor: pointer;
  }

  .brand-swatch-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
  }

  .intro-style-select {
    width: 100%;
    background: #FFF8F1;
    border: 1px solid #DCA86D;
    border-radius: 8px;
    padding: 8px 10px;
    color: #82313E;
    font-weight: 700;
    font-size: 12.5px;
    margin: 5px 0 7px;
  }

  .lab-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
  }

  /* Page Switch Circular Loader */
  .loader-screen[hidden] { display: none !important; }
  .loader-screen {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 20px;
    background: #FFF6E7;
    color: #8F2D3C;
    font-weight: 800;
    overflow: hidden;
    isolation: isolate;
    opacity: 1;
    transition: opacity 260ms ease;
  }

  .loader-screen.is-fading-out,
  .loader-screen.is-fading-in {
    opacity: 0;
    pointer-events: none;
  }

  .loader-screen::before {
    content: "";
    position: absolute;
    inset: -32px;
    z-index: -1;
    background: repeating-conic-gradient(from 45deg, var(--checker-pink) 0 25%, var(--checker-light) 0 50%) 0 0 / 96px 96px;
    opacity: 0.35;
    animation: checker-loader-drift-up-left var(--checker-drift-duration) linear infinite;
  }

  .loader-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(255, 251, 238, 0.95), rgba(255, 246, 231, 0.84) 70%);
  }

  .loader-circle {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 8px solid #ECC8B7;
    border-top-color: #8D2A3A;
    border-right-color: #C45F67;
    border-bottom-color: #E5B17E;
    box-shadow: 0 0 0 5px #FFF9EE, 0 0 0 8px #EAB777, 0 10px 32px rgba(132, 42, 56, 0.14);
    animation: circle-spin 0.8s linear infinite;
    position: relative;
  }

  .loader-circle::after {
    content: "◆";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 24px;
    animation: counter-spin 0.8s linear infinite;
  }

  #loader-text { font-size: 18px; }
  .loader-caption { font-size: 12.5px; letter-spacing: 0.07em; color: #AE6268; margin-top: -12px; }

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

  /* Approved SVG composition uses a fixed origin across viewport cameras.
     Frame movement is now exclusively controlled by 06-frame-debug.js. */
  #portal-frame-entrance, #portal-inner-entrance, #portal-compass-entrance,
  #portal-sparkle-entrance, #portal-arrow-entrance,
  #portal-navigation-entrance, #ammy-character-entrance {
    transform-box:view-box;
    transform-origin:800px 450px;
  }

  .visit-intro[hidden] { display: none !important; }
  .visit-intro {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: radial-gradient(circle at 50% 46%, #FFF9EF 0%, #FFEDE7 67%, #EFCBC8 100%);
    color: #873141;
    text-align: center;
    opacity: 1;
    clip-path:circle(150% at 50% 50%);
    transition: clip-path var(--intro-loader-fade, 310ms) cubic-bezier(.55,0,.95,.42);
  }

  .visit-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.04;
    /* checker appears through the shrinking circular loader, never an opacity animation */
    background: repeating-conic-gradient(from 45deg, var(--checker-pink) 0 25%, var(--checker-light) 0 50%) 0 0 / var(--checker-tile-size) var(--checker-tile-size);
    animation: checker-drift-up-left var(--checker-drift-duration) linear infinite;
  }

  .visit-intro.is-checker-visible::before { opacity: 0.44; }
  .visit-intro.is-dismissing { clip-path:circle(0% at 50% 50%); pointer-events:none; }
  .visit-ring-wrap {
    width: clamp(160px, 26vmin, 290px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    transition: transform var(--intro-loader-fade, 260ms) cubic-bezier(.2,.7,.2,1);
  }
  .visit-intro.is-dismissing .visit-ring-wrap { transform: scale(0.28); }
  .visit-ring {
    height: 100%;
    width: 100%;
    border-radius: 50%;
    border: clamp(10px, 1.4vmin, 16px) solid #F6D3B7;
    border-top-color: #963341;
    border-right-color: #C15F66;
    border-bottom-color: #E4AF70;
    box-shadow: 0 0 0 6px #FFF9F1, 0 0 0 11px #EBBA7D, 0 14px 40px rgba(129, 47, 57, 0.13);
    display: grid;
    place-items: center;
    animation: circle-spin 1.1s linear infinite;
  }
  .visit-gem {
    font-size: clamp(44px, 6.5vmin, 78px);
    color: #A43743;
    line-height: 1;
    animation: counter-spin 1.1s linear infinite;
    text-shadow: 2px 3px 0 #E4AD7B;
  }
  .visit-name { margin: 16px 0 0; font-size: clamp(22px, 3.4vmin, 34px); font-weight: 900; }
  .visit-label { margin: 0 0 8px; font-size: clamp(14px, 1.9vmin, 17px); font-weight: 700; color: #A45D65; }
  .visit-skip {
    background: #FFF9F1;
    border: 2px solid #E9B47C;
    border-radius: 999px;
    color: #81303C;
    font-weight: 800;
    padding: 8px 18px;
  }

  #checker-first-veil {
    position: absolute;
    inset: 0;
    z-index: 9;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    background: repeating-conic-gradient(from 45deg, var(--checker-pink) 0 25%, var(--checker-light) 0 50%) 0 0 / var(--checker-tile-size) var(--checker-tile-size);
  }

/* --- css/07-responsive.css --- */
/* ==========================================================================
     08. ARTWORK SLOTS, RESPONSIVE / MOBILE LAYOUT & REDUCED MOTION
     ========================================================================== */
  .brand-logo-slot {
    display: block;
    flex: 0 0 auto;
    aspect-ratio: 1004 / 318;
    border: 2px dashed rgba(255, 239, 218, 0.68);
    border-radius: 7px;
    background: rgba(255, 247, 235, 0.08);
    width: 100%;
    max-height: 54px;
  }

  .ammy-footer__logo.footer-logo-slot {
    width: min(100%, 220px);
    min-height: 60px;
  }

  .character-desktop-slot { pointer-events: none; }
  .mobile-companion-cards { display: none; }

  @media (max-width: 1130px) {
    :root { --header-height: 68px; }
    .site-header { padding: 0 56px; }
    .menu-trigger {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      margin-left: auto;
      padding: 8px 14px;
      min-height: 44px; /* More comfortable touch target on phones/tablets. */
      background: linear-gradient(180deg, #FFF8EE, #FFE3C4);
      color: #842A38;
      border: 1.5px solid #D79F6E;
      border-radius: 10px;
      font-weight: 800;
      font-size: 13.5px;
      box-shadow: 0 2px 0 #B77B53;
    }
    .menu-trigger svg { width: 18px; height: 18px; }
    .header-nav {
      display: none;
      position: absolute;
      top: calc(100% + 2px);
      left: 16px;
      right: 16px;
      background: linear-gradient(160deg, #FFF7EC, #FCE5D6);
      border: 2px solid #E8AE75;
      border-radius: 0 0 14px 14px;
      box-shadow: 0 14px 26px rgba(82, 26, 37, 0.3);
      padding: 12px;
      flex-direction: column;
      align-items: stretch;
      gap: 7px;
    }
    .header-nav.menu-open { display: flex; }
    .header-nav .nav-pill {
      width: 100%;
      justify-content: flex-start;
      padding: 0 14px;
    }

    /* Shared mobile and tablet content card styling. The actual camera
       and portal stage breakpoint rules appear below this navigation block. */
    .mobile-card-box {
      background: linear-gradient(160deg, #FFFDF8, #FCE9D8);
      border: 3px solid #E5A872;
      border-radius: 14px;
      padding: 18px;
      box-shadow: 0 6px 16px rgba(108, 34, 46, 0.12);
      color: #7D2432;
    }
    .mobile-card-box h2 {
      margin: 0 0 8px;
      font-size: 20px;
    }
    .mobile-card-box p {
      margin: 0 0 8px;
      font-size: 13.5px;
      line-height: 1.45;
      font-weight: 700;
    }
    .character-mobile-art {
      width: 100%;
      height: 180px;
      border-radius: 12px;
      border: 2px dashed rgba(173, 65, 73, 0.45);
      background: radial-gradient(circle at 50% 40%, #FFF8EC, #F6DFD7);
      display: grid;
      place-items: center;
      font-weight: 800;
      font-size: 12.5px;
      color: #9C525B;
    }
    .about-layout { grid-template-columns: 1fr; }

    /* Responsive Footer */
    .ammy-footer__body {
      grid-template-columns: 1fr;
      justify-items: center;
      text-align: center;
      padding: 36px 20px 32px;
      gap: 22px;
    }
    .ammy-footer__brand { align-items: center; }
    .ammy-footer__rule { display: none; }
    .ammy-footer__links {
      width: 100%;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px 16px;
      text-align: left;
    }
    .floating-controls, .review-pill { display: none; }
  }

  /* Tablet: portrait zooms to the 1:1 central portal, landscape uses 16:9.
     This keeps art at one uniform scale and moves the note below the SVG. */
  @media (min-width:701px) and (max-width:1130px) {
    .viewport:not(.is-subpage) {position:relative;min-height:auto;overflow:visible;padding:12px 0 22px;}
    .portal-stage {position:relative;top:auto;left:auto;transform:none;width:100%;max-width:1130px;
      aspect-ratio:16/9;margin:0 auto;border:0;border-radius:0;box-shadow:none;overflow:hidden;}
    #welcome-note-position {display:none;}
    .mobile-companion-cards {display:grid;grid-template-columns:1fr;max-width:760px;padding:0 16px;margin:14px auto 0;}
    .mobile-companion-cards .ak-tablet-character-card {display:none!important;}
  }
  @media (min-width:701px) and (max-width:1130px) and (orientation:portrait) {
    .portal-stage {aspect-ratio:1/1;}
  }
  /* Phone: centered square camera, readable HTML welcome text and art slot. */
  @media (max-width:700px) {
    .viewport:not(.is-subpage) {min-height:auto;overflow:visible;padding:8px 0 20px;}
    .portal-stage {position:relative;top:auto;left:auto;transform:none;width:100%;max-width:560px;
      aspect-ratio:1/1;border:0;border-radius:0;box-shadow:none;overflow:hidden;margin:0 auto;}
    #welcome-note-position {display:none;}
    .mobile-companion-cards {display:grid;padding:0 12px;margin-top:10px;grid-template-columns:1fr;}
    .mobile-card-box {min-width:0;}
  }

  body.motion-disabled *,
  body.motion-disabled *::before,
  body.motion-disabled *::after {
    animation: none !important;
    transition: none !important;
  }
  body.motion-disabled .visit-intro { display: none !important; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      transition: none !important;
    }
    .visit-intro, #checker-first-veil { display: none !important; }
  }

/* Balanced footer layout. */
@media (min-width:701px) and (max-width:1130px) {
  .ammy-footer__links{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:700px) {
  .ammy-footer__group:last-child {grid-column:1 / -1;justify-self:center;width:min(100%,220px);}
}

/* --- css/08-visual-and-developer-tools.css --- */
/* Portal refinements, screen simulator, and developer tools. */

/* =============================================================
   08. REFINEMENTS (independent from the approved portal vector art)
   All geometric scaling here is UNIFORM. Never stretch a diamond.
   ============================================================= */
:root { --checker-zoom: 1; }

/* The classic gold-trimmed ribbon silhouette, gently curved in SVG.
   Its edges are real smooth SVG paths rather than clipped polygons.
   Gold outline scales with the cards; text/icon hit area remains full-sized. */
.home-shortcuts {
  position:relative;z-index:1;
  padding:clamp(14px,1.8vw,24px) clamp(14px,3vw,44px);
  background:linear-gradient(180deg,#FFF1EB,#F9E2DE);
  border-top:2px solid rgba(234,180,124,.4);
}
.home-shortcuts[hidden]{display:none!important;}
.home-shortcuts__inner{
  max-width:1440px;margin:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(12px,1.6vw,23px);
}
.quick-link{
  position:relative;isolation:isolate;min-width:0;min-height:86px;
  display:flex;align-items:center;gap:14px;text-align:left;
  padding:15px clamp(21px,2vw,29px);color:#842A38;
  border:0;border-radius:0;background:transparent;box-shadow:none;
  transition:transform .18s ease,filter .18s ease;
}
.quick-link__frame{
  position:absolute;inset:0;width:100%;height:100%;z-index:0;
  pointer-events:none;overflow:visible;filter:drop-shadow(0px 3px 1px #D8A57E80) drop-shadow(0 5px 7px #8D323A16);
}
.quick-link > .quick-link__icon{
  position:relative;z-index:1;display:grid;place-items:center;
  flex:0 0 42px;width:42px;height:42px;
  border:1.5px solid #E8B780;border-radius:50%;
  background:linear-gradient(135deg,#FFF8EF,#FFEBD9);color:#912C40;
}
.quick-link__icon svg{width:25px;height:25px;display:block;}
.quick-link > .quick-link__text{
  position:relative;z-index:1;flex:1 1 auto;min-width:0;
  display:flex;flex-direction:column;gap:4px;
}
.quick-link strong{font-size:clamp(13px,1.15vw,16px);letter-spacing:.005em;line-height:1.25;}
.quick-link small{font-size:clamp(11px,.93vw,13px);line-height:1.35;color:#96565A;}
.quick-link > .quick-link__arrow{
  position:relative;z-index:1;flex:0 0 27px;display:grid;place-items:center;
  width:27px;height:27px;border:1px solid #E1AB72;border-radius:50%;
  background:#FFF9F1;color:#8E3140;font-size:24px;line-height:1;
  transition:transform .18s ease,background-color .18s ease;
}
.quick-link:hover,.quick-link:focus-visible{transform:translateY(-2px);filter:brightness(1.03);}
.quick-link:focus-visible{outline:3px solid #AC4250;outline-offset:3px;border-radius:12px;}
.quick-link:hover .quick-link__arrow{transform:translateX(2px);background:#FFE7D3;}
@media(max-width:700px){
  .home-shortcuts{padding:14px 12px;}
  .home-shortcuts__inner{grid-template-columns:1fr;gap:10px;}
  .quick-link{min-height:78px;padding:11px 22px;gap:12px;}
  .quick-link > .quick-link__icon{width:40px;height:40px;flex-basis:40px;}
  .quick-link__icon svg{width:23px;height:23px;}
  .quick-link strong{font-size:14px;}
  .quick-link small{font-size:12px;}
}
@media(min-width:701px) and (max-width:970px){
  .home-shortcuts__inner{gap:9px;}
  .quick-link{padding:12px 14px;gap:7px;}
  .quick-link > .quick-link__icon{width:34px;height:34px;flex-basis:34px;}
  .quick-link__icon svg{width:21px;height:21px;}
  .quick-link > .quick-link__arrow{width:22px;height:22px;flex-basis:22px;font-size:20px;}
  .quick-link small{font-size:10.5px;}
}

/* Accessibility: don't disable outline on keyboard focus. */
.menu-trigger:focus-visible, .nav-pill:focus-visible,
.loader-trigger:focus-visible, .screen-test-launch:focus-visible, button:focus-visible { outline: 3px solid #FFDA98; outline-offset: 3px; }

/* Minor spacing improvements on the newer chrome. */
@media (min-width:1131px) and (max-width:1370px) {
 .site-header { padding-left: 60px; padding-right: 60px; gap: 10px; }
 .site-header .brand { width: clamp(130px, 14vw, 194px); }
 .header-nav { gap: 6px; }
 .nav-pill { padding-left:11px;padding-right:11px; }
}

/* Screen-size simulator, independent of the page's normal rendering. */
.screen-test-launch {
 position:fixed; right:14px; bottom:14px; z-index:92; border: 2px solid #E9B47C;
 background:#FFF9F2; color:#81303C; font-size:12px; font-weight:800; border-radius:30px;
 padding:9px 14px; box-shadow:0 3px 12px #54192833;
}
body.footer-in-view .screen-test-launch { opacity: .25; }
.screen-test-launch:hover,body.footer-in-view .screen-test-launch:hover {opacity:1;}
.screen-test-dialog[hidden] {display:none!important;}
.screen-test-dialog {position:fixed; inset:0; z-index:1000; padding: min(20px,3vw); background:#251018B8; display:grid; place-items:center;}
.screen-test-panel { width:min(100%,1500px); height:min(95svh,1120px); background:#FFF7EF; border:3px solid #E7B47D; border-radius:16px; color:#782936; box-shadow: 0 20px 80px #1E0816AA; display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.screen-test-head { background:#842A38; color:#FFF4E9; padding:12px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.screen-test-head h2 {margin:0;font-size:18px;}
.screen-test-head p {margin:3px 0 0;color:#F9D2C2;font-size:12px;}
.screen-test-head button { background:#FFF7ED; border:1px solid #E6B47E; border-radius:9px; padding:8px 12px; color:#842A38; font-size:12px; font-weight:800; }
.screen-test-toolbar {display:flex; flex-wrap:wrap; gap:6px; padding:9px 13px; border-bottom:1px solid #E7C1A4;}
.screen-test-toolbar button {border:1px solid #D5A16E;background:#FFFDF8;color:#7A293A;border-radius:8px;padding:7px 10px;font-size:12px;font-weight:700;}
.screen-test-toolbar button[aria-pressed=true] {background:#8D3040;color:#FFF8F1;}
.screen-test-bottom {padding:8px 14px; display:flex;justify-content:space-between;gap:12px;font-size:12px;font-weight:700;border-bottom:1px solid #E7C1A4;}
.screen-test-scroll {min-height:0;flex:1;overflow:auto;background:repeating-conic-gradient(from 45deg,#E7CFCA 0 25%,#FAECE9 0 50%) 0 0 / 35px 35px;display:block;position:relative;padding:14px;}
#screen-test-frame {margin:auto; position:relative;background:#FFFDF8;box-shadow:0 14px 40px #4E172A55;transform-origin:top left;}
#screen-test-iframe {display:block;transform-origin:top left;border:0;background:#FFF9F3;}
.screen-test-hint {margin:0;padding:6px 13px;font-size:11px;color:#944958;}
@media (max-width:700px) {
 .screen-test-launch {right:6px;bottom:5px;padding:7px 10px;font-size:10px;}
 .screen-test-head h2 {font-size:14px;}
 .screen-test-head p {display:none;}
 .screen-test-head {padding:9px;}
 .screen-test-toolbar {gap:5px;}
 .screen-test-toolbar button {font-size:10px;padding:6px 8px;}
 .screen-test-panel {height:98svh;}
}
html[data-screen-preview="1"] .screen-test-launch,html[data-screen-preview="1"] .floating-controls,
html[data-screen-preview="1"] .review-pill {display:none!important;}
html[data-screen-preview="1"] * {animation-duration:0s!important;transition-duration:0s!important;}
@media (prefers-reduced-motion:reduce) {.screen-test-launch,.quick-link {transition:none!important;}}

/* Centerline diagnostics used by the layout inspector. */
.portal-qa-guides {display:none;}
body.show-portal-guides .portal-qa-guides {display:inline;}
#portal-arrows {pointer-events:none;}
/* At square camera widths enlarged tiles need the lateral space; arrows would
   sit on top of the button hit targets, so hide those *decorative* arrows. */
body[data-portal-camera="square"] #portal-arrows {display:none;}
body[data-portal-camera="inspect"] #portal-arrows {display:inline;}
/* Keep entrance scale strictly anchored to the actual SVG viewBox center. */
#portal-frame-entrance, #portal-navigation-entrance {transform-box:view-box; transform-origin:50% 50%;}
/* Explicit SVG user-space origin: percentage origins re-center on the active
   viewBox (410,410 on phones; 1120,630 on ultrawide) and cause a visible
   horizontal drift during frame zoom. These absolute coordinates match the
   canonical portal center and stay fixed at every camera size. */
#portal-frame-entrance, #portal-navigation-entrance { transform-box:view-box; transform-origin:800px 450px; }
/* At 320px the right header gem covered the Menu touch target. Keep the left
   gem and preserve a comfortable hit target by dropping only the right one. */
@media(max-width:360px){
  .site-header { padding-left:52px; padding-right:12px; gap:7px; }
  .site-header .brand { width:clamp(112px,38vw,138px); min-width:0; }
  .ak-end-gem-right { display:none; }
  .menu-trigger { padding:8px 10px; flex-shrink:0; }
}
/* On phones, simulator launch is a normal post-footer utility, not a floating
   button obstructing the welcome note, character slot or quick links. */
@media(max-width:700px){
  .screen-test-launch {position:relative;right:auto;bottom:auto;display:block;
    margin:12px auto 18px;opacity:1;font-size:12px;padding:10px 16px;}
  body.footer-in-view .screen-test-launch{opacity:1;}
}
.screen-test-custom {display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:8px 13px;border-bottom:1px solid #E7C1A4;}
.screen-test-custom label {display:flex;gap:5px;align-items:center;font-size:12px;font-weight:800;}
.screen-test-custom input {width:92px;max-width:30vw;padding:6px 8px;color:#742637;background:#FFFDF8;border:1px solid #D5A16E;border-radius:8px;font:inherit;}
.screen-test-custom button {border:1px solid #D5A16E;border-radius:8px;background:#8D3040;color:#FFF9F1;font-size:12px;font-weight:800;padding:8px 11px;}
@media(max-width:700px){.screen-test-custom{gap:6px}.screen-test-custom input{width:70px}}

/* An unobtrusive way to open the geometry controls on tablets and phones.
   It is placed after the footer, not over the artwork. */
.mobile-lab-launch {display:none;}
@media (max-width:1130px){
 .mobile-lab-launch {position:relative;display:block;margin:13px auto 0;padding:9px 15px;
   background:#FFF8EE;color:#842A38;border:2px solid #E5AF79;border-radius:24px;
   font-size:12px;font-weight:800;box-shadow:0 3px 8px #54203222;}
}
@media (min-width:701px) and (max-width:1130px){.mobile-lab-launch {margin-bottom:16px;}}
html[data-screen-preview="1"] .mobile-lab-launch {display:none!important;}

/* EXPERIMENTAL: slow no-fade entrance and manual staged artwork inspection.
   Only transforms the existing group wrappers; approved SVG path data untouched. */
:root { --stage-burgundy:#842A38; }
/* Loading begins on dark crimson; the checkerboard is revealed by an iris wipe. */
.visit-intro { background:#842A38; color:#FFF4EA; }
.visit-intro::before { display:none; }
.visit-label {color:#F2C8B2;}
.visit-ring {border-color:#B45A62;border-top-color:#FFF0D5;border-right-color:#F3BF83;border-bottom-color:#ECA66C;}
.visit-gem {color:#FFF0DA;text-shadow:2px 3px 0 #D69B71;}
.visit-skip {background:#FFF4EB;}
/* Reference-like outside-triangle treatment, contrasted against red/pink bands. */
#portal-arrows[data-arrow-mode="outside"] #navigation-arrows {stroke:#F8DFC6;stroke-width:3.3px;}
#portal-arrows[data-arrow-mode="inside"] #navigation-arrows {stroke:#D5756F;stroke-width:2.5px;}
/* Keep the manual stage buttons distinguishable without large badges. */
#entrance-steps {gap:4px;margin:9px 0 12px;}
#entrance-steps button {flex:1 1 80px;}

/* Optional phone triangle experiment. Default remains hidden for button clearance. */
body[data-portal-camera="square"][data-show-mobile-arrows="1"] #portal-arrows {display:inline!important;}

/* Continuous checkerboard on the homepage: one CSS-owned drawing only.
   All SVG masks reveal this same pattern; no duplicated SVG pattern tile. */
.viewport:not(.is-subpage) {
  isolation:isolate;
  background:#842A38;
  animation:none !important;
  --ak-checker-opacity:1;
}
.viewport:not(.is-subpage)::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:var(--ak-checker-opacity,1);
  background:repeating-conic-gradient(from 45deg,
     var(--checker-pink) 0 25%,var(--checker-light) 0 50%) 0 0 /
     var(--checker-tile-size) var(--checker-tile-size);
  /* Ambient movement is independent of the 12 s portal entrance timeline. */
  animation:checker-drift-up-left var(--checker-drift-duration) linear infinite;
}
/* Static/mobile portal camera has no hard-edged SVG checkerboard tile. */
.viewport:not(.is-subpage) .portal-stage { z-index:1; }
.viewport:not(.is-subpage) .mobile-companion-cards { position:relative; z-index:1; }
/* In the design editor the checked diagonal red corners stay inside the SVG.
   To avoid a second checkerboard rendering, the original checker paths have
   transparent centers and keep the red ring via the original mask. */
#background > rect, #outer-framed-checkerboard > path:first-child,
#inner08-checkerboard { fill:transparent !important; }
/* Hide unfinished art slot outlines without removing their SVG anchors. */
#ammy-character .character-desktop-slot {stroke:transparent !important;}
/* The companion character is now controlled by 07-responsive.css. */

/* FRAME-ACCURATE INSPECTION: CSS animation engine must never compete with the
   deterministic timeline. Each position is set by one JS timeline renderer. */
body.ak-debug-active .viewport:not(.is-subpage)::before {opacity:var(--ak-checker-opacity,1)}
/* Paused frame inspection must remain 100% deterministic; the real visitor
   entrance gets the same gentle drift as the settled homepage. */
body.ak-debug-active:not(.ak-public-entrance) .viewport:not(.is-subpage)::before {
  animation:none!important;
  background-position:0 0;
}
@media (prefers-reduced-motion: reduce) {
  .viewport.is-subpage, .viewport:not(.is-subpage)::before,
  .loader-screen::before, .visit-intro::before {animation:none!important;background-position:0 0!important;}
}
body.ak-debug-active .visit-intro {background:#FFF3E8;color:#842A38;clip-path:none;transition:none!important;}
body.ak-debug-active .visit-label {color:#9E5963;}
body.ak-debug-active .visit-intro::before {display:none !important;}
body.ak-debug-active .visit-ring {border-color:#F6D3B7;border-top-color:#963341;border-right-color:#C15F66;border-bottom-color:#E4AF70;}
body.ak-debug-active .visit-gem {color:#A43743;}
body.ak-debug-active #portal-frame-entrance,
body.ak-debug-active #portal-inner-entrance,
body.ak-debug-active #portal-navigation-entrance,
body.ak-debug-active #portal-compass-entrance,
body.ak-debug-active #ammy-character-entrance,
body.ak-debug-active #welcome-note-entrance,
body.ak-debug-active #portal-arrow-entrance,
body.ak-debug-active #portal-sparkle-entrance {animation:none!important;transition:none!important;}
body.ak-debug-active #checker-anim-group,
body.ak-debug-active .sparkle-item,
body.ak-debug-active .note-float,
body.ak-debug-active .compass-float,
body.ak-debug-active .arrow-left,
body.ak-debug-active .arrow-right {animation:none!important;}
/* Debugger panel is optional, can be collapsed to leave the artwork clear. */
.ak-debug-launch {position:fixed;left:14px;bottom:61px;z-index:150;background:#FFF9F0;color:#832B3B;
  border:2px solid #EAB47D;border-radius:999px;font-size:12px;font-weight:800;
  padding:9px 14px;box-shadow:0 4px 15px #551F3055;}
.ak-debug-dock[hidden]{display:none!important;}
.ak-debug-dock {position:fixed;z-index:420;left:14px;bottom:14px;width:min(550px,calc(100vw - 28px));
 background:#FFF9F3;color:#842A38;border:2px solid #E8B17B;border-radius:14px;
 box-shadow:0 18px 50px #3F152777;padding:12px 14px;font:700 13px/1.35 'Trebuchet MS',Arial,sans-serif;}
.ak-debug-head{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:9px;}
.ak-debug-head strong{font-size:15px}.ak-debug-head small{color:#A55962;font-size:11px}
.ak-debug-close{border:0;background:transparent;color:inherit;font-size:21px;font-weight:900;}
.ak-debug-controls,.ak-debug-markers {display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin-top:8px;}
.ak-debug-dock button:not(.ak-debug-close),.ak-debug-dock select,
.screen-test-debug-row button {border:1px solid #D89E70;border-radius:6px;padding:6px 9px;background:#FFF5E8;color:#832B3B;font:800 12px 'Trebuchet MS',Arial,sans-serif;cursor:pointer;}
.ak-debug-dock button[aria-pressed="true"]{background:#842A38;color:#FFF9F3;}
.ak-debug-dock select {margin-left:auto;}
.ak-debug-range {width:100%;accent-color:#B34350;cursor:pointer;margin:2px 0;}
.ak-debug-caption{display:flex;justify-content:space-between;color:#914953;font-size:12px;gap:10px;}
.ak-debug-info{font-size:11px;color:#99525A;line-height:1.35;margin-top:8px;}
.ak-debug-dock button:focus-visible,.ak-debug-launch:focus-visible {outline:3px solid #E9B47C;outline-offset:2px;}
.screen-test-debug-row {display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 13px;border-bottom:1px solid #E7C1A4;}
.screen-test-debug-row input{flex:1;min-width:100px;accent-color:#B34350;}
.screen-test-debug-row output{font-size:12px;font-weight:800;min-width:70px;text-align:right;}
html[data-screen-preview="1"] .ak-debug-launch,
html[data-screen-preview="1"] .ak-debug-dock {display:none!important;}
@media(max-width:700px){.ak-debug-launch {position:relative;left:auto;bottom:auto;display:block;
 margin:8px auto 12px;z-index:5;}.ak-debug-dock {bottom:5px;left:5px;width:calc(100vw - 10px);
 padding:9px;max-height:60svh;overflow-y:auto;}.ak-debug-markers button {font-size:10px!important;padding:5px!important;}}
@media(prefers-reduced-motion:reduce){.ak-debug-launch,.ak-debug-dock{transition:none!important;}}
/* All paused-frame appearances must depend only on the timeline's timestamp.
   Otherwise ambient glow / loader spin would move when the user stops. */
body.ak-debug-active .viewport *,
body.ak-debug-active .visit-intro * {
  animation:none!important;
  transition:none!important;
}

.ak-debug-head-actions{display:flex;align-items:center;gap:6px;}
.ak-debug-head .ak-debug-minimize{padding:5px 9px;border:1px solid #D89E70;border-radius:6px;background:#FFF5E8;font:800 11px Trebuchet MS,Arial,sans-serif;color:#832B3B;}

/* VNext responsive notes and artwork. No CSS polygon extensions: the original SVG red exterior now continues naturally. */
@media (max-width:1130px) {
  .viewport:not(.is-subpage) {padding-bottom:0;}
  .mobile-companion-cards {
    width:100%;max-width:none!important;margin:0 auto!important;
    padding:clamp(16px,2.5vw,28px) clamp(14px,3vw,32px) clamp(22px,3vw,36px)!important;
    position:relative;display:grid;place-items:center;
    min-height:clamp(190px,22vw,260px);
  }
  .mobile-companion-cards .mobile-card-box:first-child {
    z-index:2;width:min(100%,850px);max-width:850px;margin:auto;
    box-shadow:0 8px 20px #63233431;
  }
}
@media(max-width:700px) {
  .mobile-companion-cards {padding:12px 13px 20px!important;min-height:170px;}
}
/* preserve original visual review behavior: the empty art slot is never outlined. */
#ammy-character .character-desktop-slot {display:none!important;}
/* Distinguish rendering variants without changing layout geometry. */
.brand-art-img {width:100%;height:auto;max-height:54px;object-fit:contain;object-position:left center;display:block;}
.ammy-footer__logo.brand-art-img {max-width:230px;max-height:78px;object-position:center;}
.brand-placeholder-text {display:flex;align-items:center;width:100%;font-weight:900;font-size:clamp(16px,2vw,25px);letter-spacing:-.04em;color:#FFF7E5;white-space:nowrap;gap:7px;text-shadow:0 2px 2px #4E162655;}
.brand-placeholder-text::before{content:'◆';font-size:12px;color:#F9D196;}
.ammy-footer__logo.brand-placeholder-text {font-size:24px;}
#ammy-character-art {pointer-events:none;}
/* Wide screens show the full-body character. A square camera cannot show the
   whole silhouette without clipping About: hide that art layer on compact
   devices rather than showing a partial head / reaching hand at the edge. */
@media (max-width:1130px) {
 body #ammy-character-entrance {display:none!important;}
}

/* Natural border continuation: the existing SVG's outside-red geometry runs
   beyond the portal camera behind the mobile welcome note. The entire home
   section clips it. No CSS polygon wedges, no new outer frame border paths. */
@media(max-width:1130px) {
  .viewport:not(.is-subpage) {overflow:hidden!important;}
  .portal-stage {overflow:visible!important;}
  .portal-stage .desktop-art, #portal-artboard {overflow:visible!important;}
  .mobile-companion-cards {isolation:auto!important;background:transparent!important;}
  .mobile-companion-cards .mobile-card-box:first-child {position:relative;z-index:2;}
}
#portal-frame-entrance,#portal-outer-frame,#outer-red-exterior,#outer-red-corner-shade {pointer-events:none;}


@media(prefers-reduced-motion:reduce){.quick-link,.quick-link__arrow{transition:none!important;}}

/* --- css/09-welcome-note.css --- */
/* Welcome note, unified SVG asset for every size. Original PSD artwork and
   its continuous SVG outline are preserved. Only display dimensions vary. */
.ammy-note-svg-image{pointer-events:none;}
.mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
  background:none!important;border:0!important;box-shadow:none!important;
  padding:0!important;border-radius:0!important;
  width:min(100%,610px)!important;max-width:610px!important;
  margin:0 auto!important;overflow:visible;
}
.ammy-note-mobile-img{
  display:block;width:100%;height:auto;object-fit:contain;
  filter:drop-shadow(0 4px 7px rgba(83,28,40,.08));
}
/* A narrower note has a calmer visual weight on phones. Minimum text size
   remains readable at 320px; the image never exceeds padded phone width. */
@media(max-width:700px){
 .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
  width:min(100%,clamp(318px,90vw,390px))!important;max-width:100%!important;
  transform:none!important;
 }
}
/* Tablet artwork no longer fills a large 610px-wide block by default. */
@media(min-width:701px) and (max-width:1130px){
 .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
  width:clamp(390px,52vw,500px)!important;max-width:100%!important;
 }
}
@media(prefers-reduced-motion:reduce){
 .ammy-note-mobile-img{animation:none!important;transition:none!important;}
}

/* --- css/11-character-expression.css --- */
/* The character stays anchored; only expressions animate. */
#ak-character-idle { transform:none!important;animation:none!important; }
#ak-character-eyes-closed {pointer-events:none;}
#ak-expression-marks {pointer-events:none;visibility:hidden;}
#ak-expression-marks.ak-mark-ready{visibility:visible;}
#ak-expression-marks.ak-marks-off {display:none;}
#ak-expression-marks .ak-mark-top,#ak-expression-marks .ak-mark-bottom{
 transform-box:fill-box;transform-origin:50% 75%;
}
/* One intentional perk AFTER the character has reached the final pose.
   Neither accent flicks constantly or randomly while the visitor is reading. */
#ak-expression-marks.ak-mark-pop .ak-mark-top {animation:ak-mark-top-arrive 720ms cubic-bezier(.2,.75,.3,1) both;}
#ak-expression-marks.ak-mark-pop .ak-mark-bottom {animation:ak-mark-bottom-arrive 720ms cubic-bezier(.2,.75,.3,1) 210ms both;}
@keyframes ak-mark-top-arrive {
 0%{transform:scale(0) rotate(-10deg);}
 58%{transform:scale(1.08) rotate(2deg);}
 80%{transform:scale(.97) rotate(-1deg);}
 100%{transform:scale(1) rotate(0deg);}
}
@keyframes ak-mark-bottom-arrive {
 0%{transform:scale(0) rotate(-12deg);}
 56%{transform:scale(1.09) rotate(3deg);}
 84%{transform:scale(.98) rotate(-1deg);}
 100%{transform:scale(1) rotate(0deg);}
}
#ak-arm-warp-layer{pointer-events:none;overflow:visible;}
#ak-arm-warp-canvas{display:none;width:100%;height:100%;background:transparent;pointer-events:none;}
body.ak-debug-active #ak-expression-marks .ak-mark-top,
body.ak-debug-active #ak-expression-marks .ak-mark-bottom{animation:none!important;}
.ak-expression-lab[hidden]{display:none!important;}
.ak-expression-lab{position:fixed;right:16px;bottom:62px;z-index:130;
 width:min(370px,calc(100vw - 32px));max-height:min(700px,calc(100svh - 110px));overflow:auto;
 padding:16px;color:#762A38;background:#FFF8EF;border:2px solid #E0A76C;
 border-radius:16px;box-shadow:0 14px 40px #63273b33;font-family:inherit;
 font-size:13px;line-height:1.5;}
.ak-expr-title{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:16px;}
.ak-expr-title button{padding:3px 7px;background:transparent;border:0;color:#762A38;cursor:pointer;}
.ak-expr-actions{display:flex;gap:8px;flex-wrap:wrap;}
.ak-expression-lab button:not(.ak-expr-title button){border:1px solid #DBA976;border-radius:9px;padding:8px 11px;
 background:#FFF0DC;color:#762A38;font-weight:700;cursor:pointer;}
.ak-expression-lab input[type=range]{width:100%;accent-color:#8F3044;}
.ak-expr-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:11px 0 5px;font-weight:650;}
.ak-expr-line input[type=checkbox]{width:18px;height:18px;accent-color:#9A3847;}
.ak-expr-line select{color:#762A38;background:#fff;border:1px solid #DBA976;border-radius:7px;padding:7px;max-width:175px;}
.ak-expr-notice{font-size:11px;color:#935D63;border-top:1px solid #EACAA7;padding-top:10px;}
@media(prefers-reduced-motion:reduce){
 #ak-expression-marks .ak-mark-top,#ak-expression-marks .ak-mark-bottom{animation:none!important;}
}
body.motion-disabled #ak-expression-marks .ak-mark-top,
body.motion-disabled #ak-expression-marks .ak-mark-bottom{animation:none!important;}

/* Mobile expression marks stay hidden until the reveal starts. */
#ak-tablet-mark-upper,#ak-tablet-mark-lower{visibility:hidden;transform-box:fill-box;transform-origin:50% 75%;}
html[data-ak-expressions=off] .ak-tablet-character-marks{display:none!important;}

/* --- css/12-home-composition.css --- */
/* Responsive character and welcome-paper layout.
   Accounts for the real 1365×2048 PNG transparent padding (visible art x=160..1121,
   which maps to ~15.75% left padding and ~13.85% right padding inside viewBox="-27 22 670 1005").
   Preserves desktop >=1131px, gold expression mark coordinates, and SVG portal borders.
   Supports two selectable compositions via html[data-ak-composition="grounded"|"integrated"]. */
:root{
  --ak-note-rest-y:0px;
  --ak-tablet-offset-x:0px;
  --ak-phone-portrait-size:clamp(350px,96vw,470px);
}
@media(max-width:1130px){
  html[data-ak-gem-policy=compact] #portal-compass-entrance{display:none!important;}
}
html[data-ak-gem-policy=off] #portal-compass-entrance{display:none!important;}

/* Optional debug overlay showing the exact 1365x2048 PNG canvas & x=160..1121 visible zone */
.ak-png-bounds-guide{
  position:absolute;
  inset:0;
  border:1.5px dashed rgba(47,127,160,.65);
  pointer-events:none;
  opacity:0;
  transition:opacity .15s ease;
}
.ak-png-bounds-guide::before{
  content:"PNG x=160..1121";
  position:absolute;
  top:4px;
  left:15.75%;
  right:13.85%;
  bottom:1.2%;
  border:2px dashed rgba(47,127,160,.9);
  background:rgba(47,127,160,.06);
  color:#1E5B75;
  font:800 10px/1.2 "Trebuchet MS",Arial,sans-serif;
  padding:3px 6px;
}
html[data-ak-show-png-bounds="1"] .ak-png-bounds-guide{opacity:1;}

/* ==========================================================================
   PAIRED SIDE-BY-SIDE COMPOSITION (540px – 1130px)
   Single continuous formula across 700px/701px so there is zero breakpoint snap.
   Full-body character is scaled larger and grounded into the bottom edge with
   overflow:hidden crop (matching desktop's 3/4 bust-to-hip framing) while keeping
   the complete 670x1005 sprite and gold expression marks in exact registration.
   ========================================================================== */
@media (min-width:540px) and (max-width:1130px){
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards{
    position:relative!important;
    display:flex!important;
    justify-content:flex-end!important;
    align-items:center!important;
    width:100%!important;
    max-width:1130px!important;
    min-height:max(clamp(395px,47vw,550px), calc(100svh - var(--header-height) - 614px))!important;
    padding:clamp(8px,1.5vw,18px) clamp(16px,3.2vw,44px) clamp(16px,2.4vw,28px)!important;
    margin:0 auto!important;
    overflow:hidden!important;
  }

  /* Option B ("integrated"): gently overlaps the lower diamond portal rim */
  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards{
    margin-top:clamp(-34px,-3.2vw,-14px)!important;
    padding-top:clamp(18px,2.4vw,30px)!important;
    min-height:max(clamp(415px,49vw,575px), calc(100svh - var(--header-height) - 585px))!important;
  }

  /* Compensate for the 15.75% transparent left margin of the 1365×2048 PNG and
     anchor lower legs below the stage edge so her head, torso, and reaching hand
     appear prominent and grounded in the burgundy background. */
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .ak-tablet-character-card{
    position:absolute!important;
    display:block!important;
    left:calc(clamp(-58px,-4.6vw,-24px) + var(--ak-tablet-offset-x,0px))!important;
    right:auto!important;
    top:auto!important;
    bottom:clamp(-215px,-17vw,-112px)!important;
    width:clamp(412px,59vw,695px)!important;
    max-width:none!important;
    height:auto!important;
    aspect-ratio:670/1005;
    padding:0!important;
    margin:0!important;
    min-width:0!important;
    border:0!important;
    box-shadow:none!important;
    background:transparent!important;
    z-index:1!important;
    overflow:visible!important;
    pointer-events:none;
  }

  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .ak-tablet-character-card{
    left:calc(clamp(-64px,-5.0vw,-26px) + var(--ak-tablet-offset-x,0px))!important;
    bottom:clamp(-228px,-18vw,-120px)!important;
    width:clamp(432px,61.5vw,725px)!important;
  }

  html:is([data-ak-art=artwork],[data-ak-art=temp]) .ak-tablet-character-picture{
    position:relative;
    aspect-ratio:670/1005;
    width:100%;
    transform:none!important;
  }

  /* Proportionate welcome paper positioned cleanly to the right of visible x=1121 */
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
    position:relative!important;
    z-index:2!important;
    flex:none!important;
    width:clamp(252px,41vw,430px)!important;
    max-width:46%!important;
    margin:0 0 0 auto!important;
    transform:translateY(calc(var(--ak-note-rest-y,0px) + var(--ak-note-entrance-y,0px)))!important;
  }

  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
    width:clamp(246px,39.5vw,418px)!important;
    max-width:44.5%!important;
    transform:translateY(calc(var(--ak-note-rest-y,0px) - 8px + var(--ak-note-entrance-y,0px))) rotate(-1.2deg)!important;
  }

  html:is([data-ak-art=artwork],[data-ak-art=temp]) .ak-tablet-character-image{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
  }

  html:is([data-ak-art=artwork],[data-ak-art=temp]) .ak-tablet-character-marks{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    overflow:visible;
    pointer-events:none;
    transform:none!important;
  }
}

/* ==========================================================================
   COMPACT PORTRAIT COMPOSITION (< 540px: 390×844, 470×1070)
   Large commanding figure shifted left for the 15.75% PNG padding; welcome paper
   tucks cleanly at the lower right beside her lower skirt so both her face/hand
   and the readable note appear together without excessive empty space.
   ========================================================================== */
@media (max-width:539px){
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards{
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    align-items:center!important;
    width:100%!important;
    max-width:540px!important;
    min-height:0!important;
    padding:0 12px 22px!important;
    gap:0!important;
    margin:0 auto!important;
    overflow:hidden!important;
    --ak-note-rest-y:0px;
  }

  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards{
    margin-top:-18px!important;
  }

  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .ak-tablet-character-card{
    display:block!important;
    position:relative!important;
    order:0!important;
    z-index:1!important;
    inset:auto!important;
    left:auto!important;
    top:auto!important;
    bottom:auto!important;
    flex:none!important;
    width:var(--ak-phone-portrait-size)!important;
    max-width:none!important;
    aspect-ratio:670/1005;
    height:auto!important;
    margin:-10px auto 0 clamp(-36px,-6vw,-14px)!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    overflow:visible!important;
    pointer-events:none;
  }

  html:is([data-ak-art=artwork],[data-ak-art=temp]) .ak-tablet-character-picture{
    position:relative;
    aspect-ratio:670/1005;
    width:100%;
    transform:none!important;
  }

  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
    position:relative!important;
    order:1!important;
    z-index:2!important;
    flex:none!important;
    width:clamp(268px,78vw,356px)!important;
    max-width:calc(100% - 12px)!important;
    margin:clamp(-175px,-36vw,-125px) 2px 0 auto!important;
    transform:translateY(calc(var(--ak-note-rest-y,0px) + var(--ak-note-entrance-y,0px)))!important;
  }

  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
    margin-top:clamp(-195px,-40vw,-140px)!important;
    transform:translateY(calc(var(--ak-note-rest-y,0px) + var(--ak-note-entrance-y,0px))) rotate(-1.2deg)!important;
  }

  html:is([data-ak-art=artwork],[data-ak-art=temp]) .ak-tablet-character-image{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
  }

  html:is([data-ak-art=artwork],[data-ak-art=temp]) .ak-tablet-character-marks{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    overflow:visible;
    pointer-events:none;
    transform:none!important;
  }
}

/* Viewport changes should never interpolate two incompatible layout geometries. */
#ak-tablet-cameo,.ak-tablet-character-picture,.ak-sticky-note-card{transition:none!important;}
/* Only an authoring tool; never included in the visitor edition. */
.ak-scene-lab{position:fixed;right:16px;top:92px;width:min(340px,calc(100vw - 32px));max-height:76svh;overflow:auto;
  z-index:300;background:#FFF9EF;color:#7E293A;border:2px solid #DCA76B;border-radius:16px;padding:13px;
  box-shadow:0 10px 35px #45192355;font:600 12px/1.45 system-ui,sans-serif;}
.ak-scene-lab[hidden]{display:none!important;}
.ak-scene-lab h2{font-size:15px;margin:0 0 8px}.ak-scene-lab label{display:block;margin:8px 0 3px;}
.ak-scene-lab input[type=range]{width:100%;accent-color:#92333E}.ak-scene-lab button{border:1px solid #CA976A;
  border-radius:8px;background:#FCE6D1;color:#7E293A;padding:6px 9px;margin:3px 4px 3px 0;font-weight:750;}
.ak-scene-lab button[aria-pressed="true"]{background:#8D3040;color:#FFF9F1;border-color:#8D3040;}
.ak-coord-box{margin:8px 0;padding:8px 9px;border-radius:10px;background:#FFF3E4;border:1px solid #E4B788;font:700 11px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;color:#6E2231;white-space:pre-line;}

@media(max-width:539px){html[data-ak-phone-cameo=off] .ak-tablet-character-card{display:none!important;}}
/* Marks share their original full-body source coordinate system on every screen. */

/* Keep the tablet portrait in front of the portal; crop only lower legs. */
@media (min-width:540px) and (max-width:1130px){
  .viewport:not(.is-subpage) .mobile-companion-cards{z-index:2!important;}
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .ak-tablet-character-card{
    top:clamp(-12px,-1vw,-5px)!important;
    bottom:auto!important;
  }
  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .ak-tablet-character-card{
    top:0px!important;
    bottom:auto!important;
  }
}
/* Compact portal framing. */
@media (max-width:1130px) {
  .viewport:not(.is-subpage) {position:relative;min-height:auto;overflow:hidden;padding:clamp(6px,1vw,12px) 0 0;}
  .portal-stage {position:relative;top:auto;left:auto;transform:none;width:min(96vw, 600px, calc((100svh - var(--header-height)) * .56));aspect-ratio:1/1;margin:0 auto;border:0;border-radius:0;box-shadow:none;overflow:visible;}
  #welcome-note-position {display:none;}
}


/* Phone character and note layering.
   At regular phone widths the boots may overlap only the top blank paper rim;
   below 380px the paper is placed fully after the figure to protect its text. */
@media (max-width:539px){
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .ak-tablet-character-card{
    z-index:3!important;
  }
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
    z-index:2!important;
    margin-top:-28px!important;
  }
  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
    margin-top:-28px!important;
  }
}
@media (max-width:379px){
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card,
  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card{
    margin-top:2px!important;
  }
}

/* Character framing and grounded note overlap.
   Only the mobile/tablet companion is affected. Keep desktop >=1131px
   unchanged, preserve the original PNG and gold-mark SVG alignment. */
@media (min-width:540px) and (max-width:1130px) {
  /* Previous negative top offset hid the top of the character canvas when
     the companion clipped its overflow. Leave explicit head/mark clearance. */
  html:is([data-ak-art=artwork],[data-ak-art=temp])
    .mobile-companion-cards .ak-tablet-character-card {
      top:clamp(10px, 1.6vw, 20px)!important;
      bottom:auto!important;
  }
  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp])
    .mobile-companion-cards .ak-tablet-character-card {
      top:clamp(12px, 1.8vw, 22px)!important;
      bottom:auto!important;
  }
}
@media (max-width:539px) {
  /* The panel itself clips artwork, so the complete PNG cannot start
     above its edge. This also keeps the gold marks safe during resize. */
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards {
    padding-top:16px!important;
  }
  html:is([data-ak-art=artwork],[data-ak-art=temp])
    .mobile-companion-cards .ak-tablet-character-card {
      margin-top:0!important;
      z-index:2!important;
  }
  /* Paper in the foreground: boots may pass behind its decorative lower
     left region, but text/illustrations stay on top and fully legible. */
  html:is([data-ak-art=artwork],[data-ak-art=temp])
    .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card,
  html[data-ak-composition="integrated"]:is([data-ak-art=artwork],[data-ak-art=temp])
    .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card {
      z-index:3!important;
      margin-top:clamp(-160px, calc(126px - 61vw), -70px)!important;
      width:clamp(268px, 76vw, 340px)!important;
  }
}
/* Gradual note overlap avoids a sharp breakpoint near 380px. */
@media(max-width:1130px){
  /* Developer-only control should not obscure artwork or note during review. */
  #ak-home-lab-launch{
    position:relative!important;left:auto!important;right:auto!important;
    top:auto!important;bottom:auto!important;
    display:block!important;margin:12px auto!important;
  }
}

/* Compact phone composition: the original complete sprite is
   repositioned behind the paper; the hidden boot area is clipped locally.
   Desktop, 540–1130px, gold expressions, arrows, routing and timeline unchanged. */
@media (max-width:539px) {
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards {
    /* Avoid extra blank gap from diamond to the character's head. */
    margin-top:clamp(-32px, -6vw, -19px)!important;
    padding-bottom:8px!important;
  }
  html[data-ak-composition=integrated]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards {
    margin-top:clamp(-38px, -7vw, -22px)!important;
  }
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .ak-tablet-character-card {
    /* Lower the figure relative to the note. Use margins, not transforms,
       because the timeline renderer owns the character transform. */
    margin-top:clamp(56px,17vw,88px)!important;
  }
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .ak-tablet-character-picture {
    /* No detached boots peeking below the foreground note. The source image
       and gold-mark coordinates remain untouched for all other layouts. */
    clip-path:inset(0 0 16% 0);
  }
  html:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card,
  html[data-ak-composition=integrated]:is([data-ak-art=artwork],[data-ak-art=temp]) .mobile-companion-cards .mobile-card-box:first-child.ak-sticky-note-card {
    z-index:3!important;
    margin-top:calc(-1 * clamp(290px,97vw,475px))!important;
  }
}

/* --- css/13-footer-inspired-header.css --- */
/* Gold-framed navigation and compact diamond buttons. */
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]){
  --ak-hdr-gold:#E9AD70;
  --ak-hdr-highlight:#FFE4B5;
  --ak-hdr-facet:#F3BE82;
  --ak-hdr-fill:#FFF6E9;
  --ak-hdr-label:#812839;
  --ak-hdr-active:#8C2C3D;
  --ak-hdr-active-text:#FFF5E9;
}
.site-header[data-header-style="footer-ruby"]{
  --ak-hdr-fill:#84283A;
  --ak-hdr-label:#FFE9C9;
  --ak-hdr-active:#FFF4E5;
  --ak-hdr-active-text:#772536;
}
/* Gold frame + inset paper creates the same bevel language as footer shell. */
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill,
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger{
  position:relative;
  isolation:isolate;
  height:46px;
  min-height:44px;
  padding:0 clamp(11px,.95vw,16px);
  gap:10px;
  background:none;
  border:0;
  border-radius:0;
  box-shadow:none;
  color:var(--ak-hdr-label);
  font-size:clamp(12px,.91vw,13.5px);
  font-weight:800;
  line-height:1.1;
  text-shadow:none;
  transition:transform .19s ease,filter .19s ease;
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill::before,
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background:linear-gradient(165deg,#FFF3CB 0%,#F2C18A 26%,#E8AA6D 70%,#B97549 100%);
  clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px);
  filter:drop-shadow(0 2px 2px #45152444);
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill::after,
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger::after{
  content:"";
  position:absolute;
  inset:2.5px;
  z-index:-1;
  background:linear-gradient(155deg,var(--ak-hdr-fill),var(--ak-hdr-fill));
  clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px);
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill.current{
  color:var(--ak-hdr-active-text);
  background:none;
  border:0;
  box-shadow:none;
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill.current::after{
  background:linear-gradient(160deg,var(--ak-hdr-active),var(--ak-hdr-active));
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill:hover,
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill:focus-visible,
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger:hover,
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger:focus-visible{
  transform:translateY(-2px);
  color:var(--ak-hdr-label);
  background:none;
  border:0;
  filter:brightness(1.055) drop-shadow(0 3px 4px #4D14242B);
  box-shadow:none;
  outline:none; /* Gold edge stays static; hover no longer adds a halo. */
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill.current:hover,
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill.current:focus-visible{
  color:var(--ak-hdr-active-text);
  background:none;
  box-shadow:none;
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill:active,
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger:active{transform:translateY(0);}
/* A miniature of the footer's 44x44 faceted social button. */
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .ak-nav-gem{
  width:25px;
  height:25px;
  flex:0 0 25px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#FFF9ED 7%,#FFE6BB 55%,#F2C389 100%);
  border:1.6px solid #CE915B;
  border-radius:3px;
  box-shadow:0 1px 1px rgba(72,22,32,.20);
  transform:rotate(45deg);
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .ak-nav-gem .ak-nav-icon{
  width:15px;
  height:15px;
  color:#842B3B;
  transform:rotate(-45deg);
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger .ak-nav-gem svg{
  width:16px;
  height:16px;
  color:#842B3B;
  transform:rotate(-45deg);
}
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill > span:not(.ak-nav-gem),
.site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger > span:not(.ak-nav-gem){
  position:relative;
  z-index:1;
}
/* Limit compact desktop widths while preserving 44px target size. */
@media(min-width:1131px) and (max-width:1370px){
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .header-nav{gap:7px;}
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill{padding-inline:10px;gap:8px;font-size:12px;}
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .ak-nav-gem{width:23px;height:23px;flex-basis:23px;}
}
/* Mobile dropdown borrows the footer's burgundy checker and gold frame. */
@media(max-width:1130px){
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger{
    display:inline-flex;
    height:45px;
    padding-inline:12px 15px;
    flex-shrink:0;
  }
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .header-nav{
    background:repeating-conic-gradient(from 45deg,rgba(255,214,204,.05) 0 25%,transparent 0 50%) 0 0 / 48px 48px,
      linear-gradient(160deg,#812438,#922E3E 52%,#762232);
    border:2px solid #EAB47C;
    border-radius:0 0 11px 11px;
    padding:12px;
    gap:7px;
    box-shadow:0 10px 23px #40121E61;
  }
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .header-nav .nav-pill{
    min-height:46px;
    justify-content:flex-start;
    gap:16px;
    padding:0 18px;
    font-size:14px;
  }
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .header-nav .ak-nav-gem{
    width:25px;height:25px;flex-basis:25px;
  }
}
@media(max-width:360px){
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger{
    padding:0 9px;gap:7px;min-width:44px;
  }
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger .ak-nav-gem{
    width:21px;height:21px;flex-basis:21px;
  }
}
@media(prefers-reduced-motion:reduce){
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .nav-pill,
  .site-header:is([data-header-style="footer-cream"],[data-header-style="footer-ruby"]) .menu-trigger{transition:none;}
}

/* Navigation uses semantic links so each page works without JavaScript. */
.site-header .brand, .site-header .nav-pill { text-decoration: none; cursor: pointer; }

/* --- css/14-responsive-logo.css --- */
/* Logo sizing at each header breakpoint.
   Keep the actual transparent source image, logo proportions, and original header height.
   Header-only changes: no portal, animation, companion, footer, or route modifications. */

/* Wide desktops: existing 54px logo limit was hiding available header space. */
@media (min-width: 1371px) {
  .site-header .brand { width: clamp(195px, 16.6vw, 244px); }
  .site-header .brand .brand-art-img { max-height: 62px; }
}

/* Compact desktops: allow a larger logo without crowding the five navigation tabs. */
@media (min-width: 1131px) and (max-width: 1370px) {
  .site-header .brand { width: clamp(177px, 16.5vw, 215px); }
  .site-header .brand .brand-art-img { max-height: 62px; }
}

/* Mobile and tablets: retain the 68px header, leaving enough top/bottom space. */
@media (min-width: 421px) and (max-width: 1130px) {
  .site-header .brand { width: clamp(178px, 20vw, 210px); }
  .site-header .brand .brand-art-img { max-height: 58px; }
}

/* Narrow phones: grow conservatively so the Menu button never collides. */
@media (min-width: 361px) and (max-width: 420px) {
  .site-header .brand { width: clamp(150px, 42.5vw, 176px); }
  .site-header .brand .brand-art-img { max-height: 56px; }
}
@media (max-width: 360px) {
  .site-header .brand { width: clamp(116px, 40.5vw, 146px); }
  .site-header .brand .brand-art-img { max-height: 49px; }
}

/* --- css/15-launch-polish.css --- */
/* Visitor entrance and keyboard accessibility. */
.skip-link {
  position: fixed;
  z-index: 1000;
  top: -70px;
  left: 12px;
  padding: 10px 15px;
  color: #752637;
  background: #fff9f2;
  border: 2px solid #752637;
  border-radius: 7px;
  font-weight: 800;
}
.skip-link:focus-visible { top: 10px; }

/* Keep the established animated portal entrance; simplify only the initial
   visitor loading state (roughly the first 0.7s of normal playback). The
   developer edition retains the full intro controls for frame inspection. */
body.ak-public-entrance .visit-name,
body.ak-public-entrance .visit-label,
body.ak-public-entrance .visit-skip,
body.ak-public-entrance .visit-gem {
  display: none;
}
body.ak-public-entrance .visit-intro { gap: 0; }
/* One generously sized loader on Home. No extra delay or secondary spinner.
   vmin keeps the circular ring proportional on narrow phones and tall monitors. */
body.ak-public-entrance .visit-ring-wrap {
  width: clamp(190px, 31vmin, 320px);
}
body.ak-public-entrance .visit-ring { border-width: clamp(11px, 1.3vmin, 16px); }

/* Avoid hover-only focus cues. The gold frame is decorative; keyboard focus
   remains visible through a separate burgundy outline on actionable controls. */
.back-portal-btn:focus-visible,
.quick-link:focus-visible {
  outline: 3px solid #752637;
  outline-offset: 3px;
}
.site-header .nav-pill:focus-visible,
.site-header .menu-trigger:focus-visible,
.site-header .brand:focus-visible {
  outline: 3px solid #FFF9F0;
  outline-offset: 3px;
}

/* Back controls use real links for direct page access and no-JS fallback. */
a.back-portal-btn { text-decoration: none; }

/* Without JavaScript, the mobile menu button cannot open its dropdown.
   Use a compact, wrapping link list instead; it is invisible when JS runs. */
.ak-nojs-links {
  padding: .85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.1rem;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #fff6e9;
}
.ak-nojs-links a { color: #772536; font-weight: 700; }

.skip-link { text-decoration: none; }

/* --- css/16-about-and-social.css --- */
/* About-first preview: focused content and a single live social profile. */

/* Intro text and the character share one layout on wide screens.
   Mobile keeps full-width readable paragraphs and moves the portrait below. */
.about-intro {
  max-width: 980px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 42px);
  border: 2px solid #ecc397;
  border-radius: 18px;
  background: linear-gradient(160deg, #fffaf4, #fff0e9);
  color: #81303c;
}
.about-intro__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(200px, .9fr);
  grid-template-areas: "copy portrait" "actions portrait";
  grid-template-rows: auto auto;
  column-gap: clamp(18px, 3.4vw, 36px);
  row-gap: 4px;
  align-items: center;
}
.about-intro__copy { min-width: 0; grid-area: copy; align-self: end; }
.about-intro__actions { grid-area: actions; align-self: start; }
.about-intro__portrait { grid-area: portrait; }
.about-intro h2 { margin: 0 0 20px; font-size: clamp(25px, 3.3vw, 36px); line-height: 1.16; }
.about-intro p { margin: 0 0 17px; max-width: 520px; font-size: clamp(15px, 1.55vw, 18px); line-height: 1.65; }
.about-intro__actions { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.about-bluesky-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 18px;
  border: 2px solid #e9b47c;
  border-radius: 12px;
  background: #873043;
  color: #fffaf3;
  font-weight: 800;
  transition: background-color .2s ease;
}
.about-bluesky-link:hover { background: #a53d52; }
.about-bluesky-link:focus-visible { outline: 3px solid #842a38; outline-offset: 4px; }
.about-bluesky-link svg { width: 21px; height: 21px; flex: 0 0 auto; }

/* The source image remains complete. The illustration frame crops only its
   lower half, avoiding a tiny full-body figure beside the introduction. */
.about-intro__portrait {
  position: relative;
  width: 100%;
  height: clamp(310px, 34vw, 445px);
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid #e9b47c;
  border-radius: 18px;
  background: radial-gradient(ellipse at 48% 30%, #fff8ed 0%, #f7ded7 63%, #edc4c2 100%);
}
.about-intro__portrait::before {
  content: '';
  position: absolute;
  left: 50%; top: 47%;
  width: 83%;
  aspect-ratio: 1;
  border: 2px solid rgba(190, 92, 103, .26);
  background: rgba(255, 255, 255, .18);
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 20px;
}
.about-intro__portrait-art {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 132%;
  max-width: none;
  height: auto;
  aspect-ratio: 670 / 1005;
  transform: translateX(-50%);
  display: block;
}
.about-intro__portrait-placeholder { position: relative; height: 100%; display: grid; place-items: center; font-weight: 800; color: #8d4350; text-align: center; padding: 20px; }

/* The diamond-framed icon links are shared by working and future social channels. */
.ammy-footer__social { flex-wrap: wrap; gap: 16px; }
.ammy-footer__social-button { flex: 0 0 44px; }
.ammy-footer__social-button--active:focus-visible { outline: 3px solid #fff6e8; outline-offset: 6px; }
/* The butterfly is optically top-heavy; adjust it inside its rotated frame. */
.ammy-footer__social-button--active > svg { transform: rotate(-45deg) translateY(3px); }
.ammy-footer__social-button--active:hover { filter: brightness(1.1); }
.ammy-footer__social-button:disabled { opacity: .40; filter: grayscale(1); box-shadow: none; }

/* Disabled footer entries are labels, never hoverable links. */
.ammy-footer__item[aria-disabled="true"] { cursor: default; }
.ammy-footer__item[aria-disabled="true"]:hover { background: transparent; color: #fff4e8; }

@media (max-width: 740px) {
  .about-intro__layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "copy" "portrait" "actions";
    row-gap: 20px;
  }
  .about-intro__copy { text-align: center; }
  .about-intro p { margin-inline: auto; }
  .about-intro__actions { justify-content: center; }
  .about-intro__portrait { width: min(100%, 310px); height: 320px; margin: 0 auto; }
  .about-intro__actions { margin-top: 0; }
}
@media (max-width: 420px) {
  .about-intro__actions { flex-direction: column; }
  .about-intro__actions > * { width: min(100%, 300px); }
  .about-intro__portrait { width: min(100%, 265px); height: 275px; }
}

/* A small, readable continuation below the approved About portrait.
   Personal details are intentionally kept out of public-facing copy. */
.about-story {
  max-width: 980px;
  margin: clamp(26px, 4vw, 42px) auto 0;
  padding: clamp(25px, 4vw, 42px);
  border: 2px solid #e6b783;
  border-radius: 18px;
  background: #fffaf4;
}
.about-story__eyebrow {
  color: #994050;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.about-story > h2 {
  margin: 8px 0 17px;
  color: #7e293b;
  font-size: clamp(25px, 3.2vw, 34px);
  line-height: 1.2;
}
/* The heading becomes a slim side column on wider screens. This makes
   deliberate use of the card width while keeping paragraphs easy to scan. */
.about-story__section {
  display: grid;
  grid-template-columns: minmax(180px, .4fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 38px);
  padding: 28px 0 30px;
  border-top: 1px dashed #e2b68e;
}
.about-story__section h3 { margin: 2px 0 0; color: #833042; font-size: clamp(19px, 2.1vw, 23px); line-height: 1.3; }
.about-story__section-copy { min-width: 0; }
.about-story__section p { max-width: 70ch; margin: 0 0 14px; color: #704854; font-size: 16px; line-height: 1.75; }
.about-story__section p:last-child { margin-bottom: 0; }
.about-story__section a { color: #893144; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.about-story__section a:hover { color: #ad4258; }
.about-story__section a:focus-visible { outline: 3px solid #833042; outline-offset: 3px; }
.about-story__closing { margin: 10px 0 0; color: #833042; font-weight: 700; line-height: 1.6; }

/* Narrow screens return to an ordinary vertical reading order. */
@media (max-width: 760px) {
  .about-story__section { display: block; padding: 21px 0 24px; }
  .about-story__section h3 { margin-bottom: 13px; }
}

/* --- css/17-help-and-collaboration.css --- */
/* Help & Collaborate: dedicated public invitation, separate from the personal bio.
   Keep component styles local so the approved homepage remains unchanged. */

.help-shell { max-width: 1120px; }
.help-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .7fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
  padding: clamp(23px, 4vw, 42px);
  border: 2px solid #e8b884;
  border-radius: 18px;
  background: linear-gradient(140deg, #fff9f1, #ffece5);
}
.help-eyebrow {
  display: inline-block;
  color: #9a3b4b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .095em;
  text-transform: uppercase;
}
.help-hero h2,
.help-section h2,
.help-contact h2 {
  margin: 10px 0 18px;
  color: #7e293b;
  font-size: clamp(25px, 3.2vw, 36px);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.help-hero p,
.help-section__heading p,
.help-contact p {
  color: #704854;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
}
.help-hero p { margin: 0 0 15px; max-width: 58ch; }
.help-hero p:last-child { margin-bottom: 0; }
/* Keep character details readable. A strong, unobstructed art preview is a
   better reference than faintly superimposing artwork behind body copy. */
.help-hero__art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 326px;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 16px;
  border: 2px solid #e5bb8e;
  background: radial-gradient(ellipse at 48% 30%, #fff8ed 0%, #f5dbd3 69%, #e9bcb5 100%);
}
.help-hero__art::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 44%; left: 50%;
  width: 80%; aspect-ratio: 1;
  border: 2px solid rgba(170, 65, 79, .2);
  border-radius: 22px;
  background: rgba(255, 255, 255, .21);
  transform: translate(-50%, -50%) rotate(45deg);
}
.help-hero__portrait-art {
  position: absolute;
  top: 5px;
  left: 50%;
  display: block;
  width: 123%;
  max-width: none;
  height: auto;
  aspect-ratio: 670 / 1005;
  transform: translateX(-50%);
}
.help-hero__placeholder { width: 38%; max-width: 130px; }
.help-hero__art-note {
  position: absolute;
  right: 0; bottom: 0; left: 0;
  z-index: 1;
  display: grid;
  gap: 3px;
  padding: 18px 12px 13px;
  background: linear-gradient(transparent, #fff4e9 31%, #fff4e9 100%);
  color: #813044;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
}
.help-hero__art-note strong { font-size: 13px; }
.help-hero__art-note span { color: #75515a; }

/* Native disclosure: full-length visual reference without a new modal or JS.
   This shows the same approved sprite; no second PNG is embedded. */
.help-reference {
  margin-top: 16px;
  border: 2px solid #e8be94;
  border-radius: 14px;
  background: #fff9f2;
}
.help-reference > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  cursor: pointer;
  padding: 17px 21px;
  color: #863245;
  font-size: 15px;
  font-weight: 800;
}
.help-reference > summary::marker { color: #a54a59; }
.help-reference__chevron { width: 20px; height: 20px; flex-shrink: 0; margin-left: auto; transition: transform .16s ease; }
.help-reference[open] .help-reference__chevron { transform: rotate(180deg); }
.help-reference > summary:hover { background: #fceee4; }
.help-reference > summary:focus-visible { outline: 3px solid #7c263a; outline-offset: 3px; }
.help-reference__hint { color: #855061; font-size: 12px; font-weight: 600; }
.help-reference__layout {
  display: grid;
  grid-template-columns: minmax(190px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 26px;
  padding: 20px 28px 28px;
  border-top: 1px solid #edcfb3;
}
.help-reference__figure {
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  border-radius: 14px;
  background: radial-gradient(ellipse at 48% 40%, #fff7ef, #f8e4dc);
  border: 1px solid #ebc49f;
}
.help-reference__portrait-art { display: block; width: min(100%, 285px); height: auto; aspect-ratio: 670 / 1005; }
.help-reference__placeholder { padding: 25px; color: #894254; text-align: center; }
.help-reference__copy h2 { margin: 0 0 15px; color: #7c293d; font-size: clamp(20px, 2.5vw, 27px); }
.help-reference__copy p { margin: 0 0 12px; color: #704854; font-size: 15px; line-height: 1.7; }
.help-reference__copy .help-reference__note { margin: 0; font-size: 13px; }

.help-section { margin-top: clamp(35px, 5vw, 55px); }
.help-section__heading { margin-bottom: 22px; }
.help-section__heading p { margin: 0; max-width: 68ch; }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.help-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 21px;
  background: #fffaf4;
  border: 2px solid #e5b681;
  border-radius: 14px;
}
.help-card h3 { margin: 0 0 10px; color: #802b3c; font-size: 20px; line-height: 1.25; }
.help-card p { margin: 0; color: #704854; line-height: 1.62; font-size: 15px; flex: 1; }

.help-roadmap { padding: clamp(22px, 3vw, 32px); border-radius: 16px; background: #fae8df; }
.help-roadmap .help-section__heading { margin-bottom: 18px; }
.help-steps { margin: 0; padding-left: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 34px; }
.help-steps li { padding-left: 4px; color: #873147; line-height: 1.55; }
.help-steps h3 { margin: 0 0 5px; color: #7b293c; font-size: 17px; line-height: 1.35; }
.help-steps p { margin: 0; color: #704854; font-size: 15px; line-height: 1.65; }

/* A quieter invitation for creator connections, separate from technical help. */
.help-community {
  margin-top: 28px;
  padding: 24px clamp(22px, 3.5vw, 34px);
  border-left: 4px solid #dba36f;
  border-radius: 0 14px 14px 0;
  background: #fff4eb;
}
.help-community h2 { margin: 9px 0 10px; font-size: clamp(20px, 2.5vw, 27px); color: #7e293b; }
.help-community p { max-width: 78ch; margin: 0; color: #704854; font-size: 15.5px; line-height: 1.65; }

.help-contact {
  margin-top: clamp(35px, 5vw, 55px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 36px);
  border: 2px solid #e7ba88;
  border-radius: 18px;
  background: linear-gradient(160deg, #fff5ec, #fffaf4);
}
.help-contact__copy { flex: 1; min-width: 0; }
.help-contact h2 { margin-bottom: 12px; }
.help-contact p { max-width: 65ch; margin: 0 0 12px; }
.help-contact .help-contact__note { margin-bottom: 0; font-size: 14px; line-height: 1.65; color: #855661; }
.help-contact__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 50px;
  padding: 13px 20px;
  flex-shrink: 0;
  border: 2px solid #ecbb84;
  border-radius: 10px;
  background: #842f41;
  color: #fff8ed;
  font-weight: 800;
  text-align: center;
  transition: background-color .15s ease;
}
.help-contact__button:hover { background: #a13c51; }
.help-contact__button svg { width: 24px; height: 24px; flex-shrink: 0; }
.help-back { display: flex; justify-content: flex-start; margin-top: 28px; }
.help-contact__button:focus-visible,
.about-help-link:focus-visible { outline: 3px solid #7c263a; outline-offset: 4px; }

/* Small inline link from About to the new page, in the established palette. */
.about-help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 15px;
  border: 2px solid #b97d62;
  border-radius: 12px;
  background: #fffaf4;
  color: #842b3b;
  font-size: 14px;
  font-weight: 800;
}
.about-help-link:hover { background: #f8e7dc; }

@media (max-width: 850px) {
  .help-hero { grid-template-columns: minmax(0, 1fr); }
  .help-hero__art { min-height: 300px; }
  .help-hero__portrait-art { width: min(116%, 380px); }
  .help-reference__layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .help-reference__figure { min-height: 280px; }
  .help-grid { grid-template-columns: minmax(0, 1fr); }
  .help-contact { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 580px) {
  .help-steps { grid-template-columns: minmax(0, 1fr); }
  .help-hero__art { min-height: 275px; }
  .help-hero__portrait-art { width: min(114%, 330px); }
  .help-reference__layout { padding: 18px; }
  .help-contact__button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .help-contact__button { transition: none; }
}
