/* ==========================================================================
   勾玉 / magatama mark system — structural layer
   Replaces the repeated red-square seals with a single personal crest language:
   polished carnelian magatama, gold rims, paper charm tags, and a round family crest.
   ========================================================================== */

/* ---------- brand crest ---------- */
.brand-seal {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--gold-line-strong);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 36%, rgba(214, 179, 122, .18) 0%, rgba(5, 9, 16, .92) 68%),
        #07101a;
    box-shadow:
        inset 0 0 0 2px rgba(214, 179, 122, .08),
        0 6px 20px rgba(0, 0, 0, .45),
        0 0 26px rgba(226, 92, 52, .1);
    color: transparent;
    font-size: 0;
    transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}

.brand-seal::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(214, 179, 122, .22);
    border-radius: 50%;
    pointer-events: none;
}

.brand-seal::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(214, 179, 122, .16);
    border-radius: 50%;
    pointer-events: none;
}

.brand-seal img {
    position: relative;
    z-index: 2;
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 7px rgba(255, 150, 90, .4));
}

.brand:hover .brand-seal {
    transform: rotate(-6deg) scale(1.05);
    border-color: var(--gold-bright);
    box-shadow:
        inset 0 0 0 2px rgba(214, 179, 122, .12),
        0 10px 28px rgba(0, 0, 0, .5),
        0 0 34px rgba(226, 92, 52, .22);
}

/* ---------- hero role gem ---------- */
.role-seal {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    background: radial-gradient(circle at 50% 38%, rgba(214, 179, 122, .15), rgba(5, 9, 16, .78) 70%);
    border: 1px solid var(--gold-line-strong);
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(214, 179, 122, .06), 0 4px 12px rgba(0, 0, 0, .35);
    transform: rotate(-4deg);
}

.role-seal img {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 5px rgba(255, 150, 90, .35));
}

/* ---------- shared hanging charm ---------- */
.charm-cord {
    display: block;
    width: 1px;
    height: 16px;
    background: linear-gradient(var(--gold-line-strong), var(--gold));
}

.charm-gem {
    display: block;
    width: 40px;
    height: 40px;
    margin-top: -1px;
    filter: drop-shadow(0 0 8px rgba(255, 150, 90, .32)) drop-shadow(0 8px 14px rgba(0, 0, 0, .5));
}

.charm-tag {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 34px;
    min-height: 44px;
    margin-top: 1px;
    padding: 4px 0;
    background-color: #efe4cb;
    background-image:
        linear-gradient(160deg, rgba(255, 252, 242, .62), rgba(214, 179, 122, .12)),
        url("../img/texture/washi.png");
    background-size: cover;
    border: 1px solid rgba(214, 179, 122, .68);
    color: #2b1e14;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: .04em;
    box-shadow: 0 7px 16px rgba(0, 0, 0, .42), inset 0 0 0 1px rgba(154, 119, 71, .22);
    transform: rotate(-3deg);
}

.charm-tag::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 1px;
    height: 7px;
    background: var(--shu);
}

.charm-tag::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -3px;
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 6px rgba(246, 228, 184, .5);
}

.charm-tag i {
    display: block;
    font-style: normal;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.12;
}

/* ---------- hero hanging charms ---------- */
.hero-seal-stack {
    position: absolute;
    left: 3.5%;
    bottom: 4%;
    z-index: 6;
    width: 62px;
    height: 148px;
}

.hero-seal {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 60px;
    height: auto;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    font-family: inherit;
    opacity: 0;
    transform: none;
    transition: none;
    pointer-events: none;
}

.hero-seal::after {
    display: none;
}

.hero-seal .charm-cord {
    height: 16px;
}

.hero-seal .charm-tag {
    min-height: 50px;
}

html[data-char="tanno"] .hero-seal[data-char="tanno"],
html[data-char="uram"] .hero-seal[data-char="uram"],
html[data-char="lei"] .hero-seal[data-char="lei"] {
    opacity: 1;
    transform: none;
    animation: none;
}

/* ---------- cast hanging charms ---------- */
.cast-seal {
    position: absolute;
    left: 8%;
    bottom: 10%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 58px;
    height: auto;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    font-family: inherit;
    font-size: 0;
    transform: none;
}

.cast-seal .charm-cord {
    height: 16px;
}

.cast-seal .charm-gem {
    width: 38px;
    height: 38px;
}

.cast-seal .charm-tag {
    width: 34px;
    min-height: 42px;
    font-size: 16px;
}

/* ---------- scroll gem charm ---------- */
.scroll-seal {
    position: absolute;
    right: -20px;
    bottom: 16px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 42px;
    height: auto;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    font-family: inherit;
    font-size: 0;
    transform: none;
}

.scroll-seal .charm-cord {
    height: 14px;
}

.scroll-seal .charm-gem {
    width: 36px;
    height: 36px;
}

/* ---------- contact family crest ---------- */
.contact-hanko {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: auto;
    height: auto;
    margin-top: 26px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    font-family: inherit;
    font-size: 0;
    line-height: 1;
    transform: none;
}

.contact-hanko .hanko-crest {
    position: relative;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 38%, rgba(214, 179, 122, .15) 0%, rgba(5, 9, 16, .9) 70%),
        #07101a;
    border: 1px solid var(--gold-line-strong);
    box-shadow:
        inset 0 0 0 5px rgba(214, 179, 122, .05),
        inset 0 0 0 6px rgba(214, 179, 122, .18),
        0 14px 32px rgba(0, 0, 0, .42);
}

.contact-hanko .hanko-crest::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(214, 179, 122, .28);
    border-radius: 50%;
    pointer-events: none;
}

.contact-hanko .hanko-crest::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
    background: var(--gold);
    transform: rotate(45deg);
    box-shadow: 0 0 10px rgba(246, 228, 184, .5);
}

.contact-hanko .hanko-crest img {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 0 9px rgba(255, 150, 90, .38));
}

.contact-hanko .hanko-name {
    display: block;
    text-align: center;
    font-family: var(--font-serif);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .28em;
    color: var(--gold);
    padding-left: .28em;
}

/* ---------- viewer mark ---------- */
.viewer-info::after {
    content: "";
    display: block;
    align-self: flex-start;
    width: 42px;
    height: 42px;
    margin-top: 14px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 38%, rgba(214, 179, 122, .14) 0%, rgba(5, 9, 16, .88) 70%),
        url("../img/ornament/magatama.svg") center / 26px 26px no-repeat;
    border: 1px solid var(--gold-line-strong);
    box-shadow: inset 0 0 0 3px rgba(214, 179, 122, .07), 0 8px 18px rgba(0, 0, 0, .35);
    font-size: 0;
    color: transparent;
    transform: none;
}

/* ---------- section ornament gem ---------- */
.sec-orn i {
    width: 28px;
    height: 28px;
    background: url("../img/ornament/magatama.svg") center / contain no-repeat;
    transform: none;
    box-shadow: none;
    filter: drop-shadow(0 0 9px rgba(255, 150, 90, .32));
}

/* ==========================================================================
   responsive mark sizes
   ========================================================================== */
@media (max-width: 1000px) {
    .brand-seal {
        width: 38px;
        height: 38px;
    }

    .brand-seal img {
        width: 24px;
        height: 24px;
    }

    .hero-seal-stack {
        left: 2%;
        bottom: 3%;
        width: 56px;
        height: 134px;
    }

    .hero-seal {
        width: 54px;
    }

    .hero-seal .charm-gem {
        width: 36px;
        height: 36px;
    }

    .hero-seal .charm-tag {
        width: 32px;
        min-height: 46px;
        font-size: 15px;
    }

    .hero-seal .charm-tag i {
        font-size: 15px;
    }

    .sec-orn i {
        width: 26px;
        height: 26px;
    }

    .cast-seal {
        left: 6%;
        bottom: 4%;
    }

    .cast-seal .charm-gem {
        width: 34px;
        height: 34px;
    }

    .cast-seal .charm-tag {
        width: 32px;
        min-height: 40px;
        font-size: 15px;
    }

    .contact-hanko .hanko-crest {
        width: 84px;
        height: 84px;
    }

    .contact-hanko .hanko-crest img {
        width: 48px;
        height: 48px;
    }

    .contact-hanko .hanko-name {
        font-size: 12px;
    }
}

@media (max-width: 720px) {
    .brand-seal {
        width: 36px;
        height: 36px;
    }

    .brand-seal img {
        width: 23px;
        height: 23px;
    }

    .role-seal {
        width: 28px;
        height: 28px;
    }

    .role-seal img {
        width: 19px;
        height: 19px;
    }

    .hero-seal-stack {
        left: 1%;
        bottom: 2%;
        width: 48px;
        height: 116px;
    }

    .hero-seal {
        width: 46px;
    }

    .hero-seal .charm-cord {
        height: 13px;
    }

    .hero-seal .charm-gem {
        width: 32px;
        height: 32px;
    }

    .hero-seal .charm-tag {
        width: 29px;
        min-height: 40px;
        padding: 3px 0;
        font-size: 14px;
    }

    .hero-seal .charm-tag i {
        font-size: 14px;
    }

    .sec-orn i {
        width: 24px;
        height: 24px;
    }

    .cast-seal {
        left: 4%;
        bottom: 3%;
        width: 48px;
    }

    .cast-seal .charm-cord {
        height: 12px;
    }

    .cast-seal .charm-gem {
        width: 30px;
        height: 30px;
    }

    .cast-seal .charm-tag {
        width: 28px;
        min-height: 36px;
        padding: 2px 0;
        font-size: 14px;
    }

    .scroll-seal {
        right: -12px;
        bottom: 10px;
    }

    .scroll-seal .charm-gem {
        width: 30px;
        height: 30px;
    }

    .contact-hanko .hanko-crest {
        width: 74px;
        height: 74px;
    }

    .contact-hanko .hanko-crest img {
        width: 42px;
        height: 42px;
    }

    .contact-hanko .hanko-name {
        font-size: 12px;
        letter-spacing: .22em;
    }

    .viewer-info::after {
        width: 38px;
        height: 38px;
        background-size: auto, 23px 23px;
    }
}

/* ==========================================================================
   勾玉 mark refinements — larger gems, visible suspension cords,
   slow crest rotation and charm sway.
   ========================================================================== */

.brand-seal {
    width: 46px;
    height: 46px;
}

.brand-seal img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 0 8px rgba(255, 168, 104, .48));
}

.brand-seal::after {
    animation: crestSpin 55s linear infinite;
}

.brand:hover .brand-seal {
    transform: rotate(-6deg) scale(1.05);
}

.role-seal {
    width: 32px;
    height: 32px;
}

.role-seal img {
    width: 23px;
    height: 23px;
    filter: drop-shadow(0 0 6px rgba(255, 168, 104, .4));
}

.charm-cord {
    position: relative;
    height: 26px;
    background: linear-gradient(180deg, transparent 0%, var(--gold-line-strong) 28%, var(--gold) 100%);
}

.charm-cord::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: rgba(5, 8, 15, .82);
    box-shadow: 0 0 6px rgba(246, 228, 184, .4);
}

.charm-cord::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: .8;
}

.hero-seal-stack {
    left: 3.5%;
    bottom: 6%;
    width: 64px;
    height: 158px;
}

.hero-seal .charm-gem {
    width: 42px;
    height: 42px;
}

.hero-seal .charm-tag {
    width: 36px;
    min-height: 54px;
    font-size: 17px;
}

.hero-seal .charm-tag i {
    font-size: 17px;
}

html[data-char="tanno"] .hero-seal[data-char="tanno"],
html[data-char="uram"] .hero-seal[data-char="uram"],
html[data-char="lei"] .hero-seal[data-char="lei"] {
    animation: none;
    transform-origin: top center;
}

.cast-seal {
    animation: charmSway 9s ease-in-out infinite;
    transform-origin: top center;
}

.cast-seal .charm-cord {
    height: 24px;
}

.cast-seal .charm-gem {
    width: 40px;
    height: 40px;
}

.cast-seal .charm-tag {
    width: 34px;
    min-height: 46px;
    font-size: 17px;
}

.scroll-seal {
    animation: charmSway 10s ease-in-out infinite;
    transform-origin: top center;
}

.scroll-seal .charm-cord {
    height: 18px;
}

.scroll-seal .charm-gem {
    width: 38px;
    height: 38px;
}

.contact-hanko .hanko-crest {
    width: 100px;
    height: 100px;
}

.contact-hanko .hanko-crest::before {
    animation: crestSpin 65s linear infinite reverse;
}

.contact-hanko .hanko-crest img {
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 0 11px rgba(255, 168, 104, .46));
}

.contact-hanko .hanko-name {
    font-size: 12px;
}

.viewer-info::after {
    width: 44px;
    height: 44px;
    background-size: auto, 28px 28px;
}

.sec-orn i {
    width: 30px;
    height: 30px;
    animation: gemPulse 7s ease-in-out infinite;
}

@keyframes crestSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes charmSway {

    0%,
    100% {
        transform: rotate(-1.1deg);
    }

    50% {
        transform: rotate(1.1deg);
    }
}

@keyframes gemPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 7px rgba(255, 150, 90, .28));
    }

    50% {
        filter: drop-shadow(0 0 14px rgba(255, 186, 122, .52));
    }
}

@media (max-width: 1000px) {
    .brand-seal {
        width: 40px;
        height: 40px;
    }

    .brand-seal img {
        width: 26px;
        height: 26px;
    }

    .hero-seal-stack {
        left: 2%;
        bottom: 4%;
        width: 58px;
        height: 146px;
    }

    .hero-seal {
        width: 56px;
    }

    .hero-seal .charm-gem {
        width: 38px;
        height: 38px;
    }

    .hero-seal .charm-tag {
        width: 34px;
        min-height: 50px;
        font-size: 16px;
    }

    .hero-seal .charm-tag i {
        font-size: 16px;
    }

    .cast-seal .charm-gem {
        width: 36px;
        height: 36px;
    }

    .cast-seal .charm-tag {
        width: 32px;
        min-height: 42px;
        font-size: 16px;
    }

    .contact-hanko .hanko-crest {
        width: 90px;
        height: 90px;
    }

    .contact-hanko .hanko-crest img {
        width: 52px;
        height: 52px;
    }

    .sec-orn i {
        width: 28px;
        height: 28px;
    }

    .viewer-info::after {
        width: 42px;
        height: 42px;
        background-size: auto, 26px 26px;
    }
}

@media (max-width: 720px) {
    .brand-seal {
        width: 36px;
        height: 36px;
    }

    .brand-seal img {
        width: 23px;
        height: 23px;
    }

    .role-seal {
        width: 28px;
        height: 28px;
    }

    .role-seal img {
        width: 19px;
        height: 19px;
    }

    .charm-cord {
        height: 20px;
    }

    .hero-seal-stack {
        left: 1%;
        bottom: 3%;
        width: 50px;
        height: 128px;
    }

    .hero-seal {
        width: 48px;
    }

    .hero-seal .charm-gem {
        width: 34px;
        height: 34px;
    }

    .hero-seal .charm-tag {
        width: 31px;
        min-height: 44px;
        padding: 3px 0;
        font-size: 14px;
    }

    .hero-seal .charm-tag i {
        font-size: 14px;
    }

    .cast-seal {
        left: 4%;
        bottom: 3%;
        width: 50px;
    }

    .cast-seal .charm-cord {
        height: 18px;
    }

    .cast-seal .charm-gem {
        width: 32px;
        height: 32px;
    }

    .cast-seal .charm-tag {
        width: 30px;
        min-height: 38px;
        padding: 2px 0;
        font-size: 14px;
    }

    .scroll-seal .charm-cord {
        height: 14px;
    }

    .scroll-seal .charm-gem {
        width: 30px;
        height: 30px;
    }

    .contact-hanko .hanko-crest {
        width: 78px;
        height: 78px;
    }

    .contact-hanko .hanko-crest img {
        width: 46px;
        height: 46px;
    }

    .contact-hanko .hanko-name {
        font-size: 12px;
    }

    .sec-orn i {
        width: 26px;
        height: 26px;
    }

    .viewer-info::after {
        width: 38px;
        height: 38px;
        background-size: auto, 23px 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-seal::after,
    .contact-hanko .hanko-crest::before,
    .hero-seal,
    .cast-seal,
    .scroll-seal,
    .sec-orn i {
        animation: none;
    }
}

/* ---------- final brand crest proportion + pin ---------- */
.brand-seal {
    width: 48px;
    height: 48px;
    overflow: visible;
    border-width: 1.5px;
    box-shadow:
        inset 0 0 0 2px rgba(214, 179, 122, .1),
        0 6px 22px rgba(0, 0, 0, .48),
        0 0 30px rgba(226, 92, 52, .16);
}

.brand-seal img {
    width: 32px;
    height: 32px;
}

.brand-seal .brand-pin {
    position: absolute;
    left: 50%;
    top: -3px;
    z-index: 3;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    background: var(--gold);
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(246, 228, 184, .55);
}

@media (max-width: 1000px) {
    .brand-seal {
        width: 40px;
        height: 40px;
    }

    .brand-seal img {
        width: 26px;
        height: 26px;
    }

    .brand-seal .brand-pin {
        width: 5px;
        height: 5px;
        margin-left: -2.5px;
    }
}

@media (max-width: 720px) {
    .brand-seal {
        width: 38px;
        height: 38px;
    }

    .brand-seal img {
        width: 24px;
        height: 24px;
    }
}


