/* Each piece keeps its own layout box, including at the extremes of its motion. */
.hero > * { min-width: 0; }
/* Long page titles stay inside their own column. Paint the accent per line
   fragment rather than positioning one underline across the artwork. */
.hero-wrap-title .marked {
    white-space: normal;
    overflow-wrap: anywhere;
    background: linear-gradient(#cceeff, #cceeff) left calc(100% - .14em) / 100% .12em no-repeat;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.hero-wrap-title .marked::after { content: none; }
.hero .hero-artwork {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 22px;
    width: 100%;
    max-width: 520px;
    min-height: 0;
    padding: 10px;
    margin-inline: auto;
    isolation: isolate;
}
.hero-artwork .collage-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 6px;
    min-width: 0;
}
.hero-artwork .tape {
    position: static;
    flex: 0 0 72px;
    width: 72px;
    height: 20px;
    transform: rotate(-6deg);
}
.hero-artwork .collage-label {
    position: static;
    max-width: 100%;
    min-width: 0;
    transform: none;
    padding: 7px 12px;
    overflow-wrap: anywhere;
}
.hero-artwork .brand-paper {
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 12px;
    transform: none;
    border-radius: 16px;
    box-shadow: 5px 6px 0 #edf0ff;
}
.hero-artwork .brand-visual { padding: 8px; }
.hero-artwork .brand-paper img {
    width: 100%;
    aspect-ratio: 1.5;
    object-fit: contain;
    transform-origin: center;
}
.hero-artwork .brand-paper figcaption {
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 6px 2px;
    gap: 8px 16px;
    overflow-wrap: anywhere;
}
.hero-artwork .collage-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
    min-width: 0;
    padding: 4px 0;
}
.hero-artwork .mini-paper {
    position: relative;
    inset: auto;
    z-index: auto;
    min-width: 0;
    max-width: none;
    min-height: 112px;
    padding: 14px;
    border-radius: 12px;
    transform: none;
}
.hero-artwork .mini-paper strong { overflow-wrap: anywhere; }
.hero-artwork .paper-lines { max-width: 100%; }
.hero-artwork .swatches { flex-wrap: wrap; }
.hero-artwork .swatches i { width: 24px; height: 24px; }
.hero-artwork .collage-stamp {
    position: static;
    justify-self: start;
    z-index: auto;
    max-width: 100%;
    transform: none;
    padding: 6px 12px;
    border-radius: 8px;
    overflow-wrap: anywhere;
}
.tool-card > *, .dashboard-link-card > * { min-width: 0; }
.tool-card .tool-note {
    margin: 8px;
    transform: none;
    border-radius: 12px;
    overflow-wrap: anywhere;
}
.tool-note .note-pin {
    position: static;
    margin-bottom: 12px;
    width: 34px;
    height: 34px;
}
.tool-card, .dashboard-link-card {
    transition: transform 180ms ease-out, box-shadow 180ms ease-out, border-color 180ms ease-out;
}
.tool-card:focus-within, .dashboard-link-card:focus-visible {
    border-color: #ad98f1;
    box-shadow: 0 8px 22px #6533e811;
}
@media (hover: hover) and (pointer: fine) {
    .tool-card:hover, .dashboard-link-card:hover {
        transform: translateY(-3px);
        border-color: #c3b4f1;
        box-shadow: 0 10px 24px #6533e812;
    }
}
@media (prefers-reduced-motion: no-preference) {
    .hero-artwork[data-motion-visible="true"] .brand-paper img {
        animation: manshouri-logo-float 7s ease-in-out infinite;
    }
    .hero-artwork[data-motion-visible="true"] .mini-paper {
        animation: manshouri-paper-float 8s ease-in-out infinite;
    }
    .hero-artwork[data-motion-visible="true"] .paper-design { animation-delay: -4s; }
    .motion-enter { animation: manshouri-card-enter 440ms ease-out both; }
    .tool-card[data-motion-visible="true"] .tool-note {
        animation: manshouri-paper-float 9s ease-in-out infinite;
    }
    html[data-motion-paused] .hero-artwork *,
    html[data-motion-paused] .tool-card *,
    html[data-motion-paused] .motion-enter { animation-play-state: paused !important; }
}
@keyframes manshouri-logo-float {
    0%, 100% { transform: translateY(2px) rotate(-.3deg); }
    50% { transform: translateY(-3px) rotate(.3deg); }
}
@keyframes manshouri-paper-float {
    0%, 100% { transform: translateY(2px); }
    50% { transform: translateY(-2px); }
}
@keyframes manshouri-card-enter {
    from { opacity: .4; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 760px) {
    .hero .hero-artwork { max-width: 450px; padding: 6px; gap: 20px; }
    .hero-artwork .brand-paper { padding: 8px; }
    .hero-artwork .brand-visual { padding: 6px; }
    .hero-artwork .collage-cards { gap: 14px; }
    .hero-artwork .mini-paper { padding: 12px; }
    .hero-artwork .mini-paper strong { font-size: .85rem; line-height: 1.8; }
    .tool-card .tool-note { margin: 6px; }
}
@media (max-width: 370px) {
    .hero-artwork .collage-cards { grid-template-columns: minmax(0, 1fr); }
    .hero-artwork .mini-paper { min-height: 0; }
    .hero-artwork .collage-heading { padding: 4px; gap: 12px; }
    .hero-artwork .tape { flex-basis: 56px; width: 56px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-artwork *, .motion-enter, .tool-card, .tool-card *, .dashboard-link-card {
        animation: none !important;
        transition: none !important;
    }
}
