/* あんまり見ないでね。はずかしいよ。めるん */

@font-face {
    font-family: "Americana ExtraBold";
    src: url("/fonts/americana-extrabold.woff2?v=20260827j") format("woff2"),
        url("/fonts/americana-extrabold.ttf?v=20260827j") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

.event-join {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start;
    width: 100%;
    max-width: none;
    margin: 28px auto 8px;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
}

.event-page > .event-join,
.prose > .event-join,
.mypage-panel-body > .event-join {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    margin-right: 0;
    padding-left: max(16px, calc((100vw - 1120px) / 2 + 20px));
    padding-right: max(16px, calc((100vw - 1120px) / 2 + 20px));
}

.event-page-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 40px 0 36px;
    text-align: center;
}
.event-howto-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1.5px solid rgba(74, 175, 200, 0.45);
    background: rgba(255, 255, 255, 0.72);
    color: var(--sea, #2a8fa8);
    font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(42, 143, 168, 0.12);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.event-howto-link:hover {
    background: #fff;
    border-color: var(--sea, #2a8fa8);
    transform: translateY(-1px);
}
.event-page-links .more {
    font-size: 13px;
}
.event-footer-nav {
    display: flex;
    justify-content: center;
    margin: 8px 0 40px;
    text-align: center;
}
.event-join + .event-footer-nav {
    margin-top: 4px;
}
.event-join + .event-page-links + .event-footer-nav,
.event-page-links + .event-footer-nav {
    display: none;
}

.tj-root {
    --tj-accent: #a34b3a;
    --tj-card: #e6dcc8;
    --tj-stub: #f6f1e6;
    --tj-dark: var(--tj-card);
    --tj-fg: #2c241c;
    --tj-muted: rgba(44, 36, 28, 0.58);
    --tj-line: rgba(44, 36, 28, 0.35);
    --tj-notch: 10px;
    --tj-stub-h: 108px;
    --tj-radius: 4px;
    --tj-font-display: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
    --tj-font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    --tj-font-block: "Anton", "Bebas Neue", Impact, sans-serif;
    --tj-font-type: "Special Elite", "Courier New", Courier, monospace;
    --tj-font-stamp: "Special Elite", "Courier New", Courier, monospace;
    --tj-font-ledger: "Zen Antique", "Shippori Mincho", "Hiragino Mincho ProN", serif;
    position: relative;
    flex: 0 1 auto;
    width: min(100%, 440px);
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--tj-radius);
    overflow: visible;
    background: transparent;
    box-shadow: none;
    font-family: var(--tj-font-sans);
    color: var(--tj-fg);
    -webkit-font-smoothing: antialiased;
    text-align: left;
    isolation: isolate;
}

.tj-root h1,
.tj-root h2,
.tj-root h3,
.tj-root p,
.tj-root span,
.tj-root a,
.tj-root button {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    font-style: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: none;
    box-shadow: none;
}

.tj-shell-wrap {
    position: relative;
    border-radius: var(--tj-radius);
    /* drop-shadowは使わない */
    filter: none;
    outline: none;
}
.tj-shell-punch {
    position: relative;
    border-radius: var(--tj-radius);
    outline: none;
}
.tj-shell {
    position: relative;
    border-radius: var(--tj-radius);
    overflow: hidden;
    background: transparent;
    outline: none;
}
/* ノッチのくり抜き（ちぎり前後で同じ値を使う） */
.tj-root:has(.tj-stub-stage):not(.is-reduced) {
    --tj-notch-y: calc(100% - var(--tj-stub-h));
    --tj-notch-r: calc(var(--tj-notch) + 2px);
}
.tj-root:has(.tj-stub-stage):not(.is-reduced) .tj-shell-punch {
    overflow: visible;
    -webkit-mask-image:
        radial-gradient(circle at -2px var(--tj-notch-y), transparent 0, transparent var(--tj-notch-r), #000 calc(var(--tj-notch-r) + 0.5px)),
        radial-gradient(circle at calc(100% + 2px) var(--tj-notch-y), transparent 0, transparent var(--tj-notch-r), #000 calc(var(--tj-notch-r) + 0.5px));
    -webkit-mask-size: 100% 100%, 100% 100%;
    -webkit-mask-position: 0 0, 0 0;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-composite: source-in;
    mask-image:
        radial-gradient(circle at -2px var(--tj-notch-y), transparent 0, transparent var(--tj-notch-r), #000 calc(var(--tj-notch-r) + 0.5px)),
        radial-gradient(circle at calc(100% + 2px) var(--tj-notch-y), transparent 0, transparent var(--tj-notch-r), #000 calc(var(--tj-notch-r) + 0.5px));
    mask-size: 100% 100%, 100% 100%;
    mask-position: 0 0, 0 0;
    mask-repeat: no-repeat;
    mask-composite: intersect;
}
.tj-root:has(.tj-stub-stage):not(.is-reduced) .tj-shell {
    overflow: visible;
}
.tj-root[data-join-mode="button"] .tj-shell-punch,
.tj-root[data-join-mode="static"] .tj-shell-punch,
.tj-root.is-reduced .tj-shell-punch {
    -webkit-mask-image: none;
    mask-image: none;
}
.tj-root[data-join-mode="button"] .tj-shell,
.tj-root[data-join-mode="static"] .tj-shell,
.tj-root.is-reduced .tj-shell {
    overflow: hidden;
}

.tj-hero {
    position: relative;
    z-index: 1;
    border-radius: var(--tj-radius) var(--tj-radius) 0 0;
    overflow: hidden;
    outline: none;
    border: 0;
    background:
        radial-gradient(ellipse 70% 50% at 8% 12%, rgba(140, 110, 70, 0.1), transparent 55%),
        radial-gradient(ellipse 60% 45% at 92% 88%, rgba(90, 70, 50, 0.08), transparent 50%),
        repeating-linear-gradient(
            -16deg,
            rgba(44, 36, 28, 0.03) 0 1px,
            transparent 1px 11px
        ),
        linear-gradient(165deg, #efe6d4 0%, #e6dcc8 48%, #ddd1bb 100%);
}
.tj-root:not(:has(.tj-stub-stage)) .tj-hero,
.tj-root.is-reduced .tj-hero,
.tj-root[data-join-mode="button"] .tj-hero,
.tj-root[data-join-mode="static"] .tj-hero {
    border-radius: var(--tj-radius);
}
.tj-root.is-confirmed:has(.tj-stub-stage) .tj-hero {
    /* 下辺はミシン目なので角丸にしない */
    border-radius: var(--tj-radius) var(--tj-radius) 0 0;
}

.tj-hero-frame {
    position: relative;
    z-index: 2;
    margin: 10px;
    border: 1.5px solid var(--tj-line);
    /* 二重線（間は塗らない） */
    outline: 1.5px solid var(--tj-line);
    outline-offset: -6px;
    box-shadow: none;
    background: transparent;
}

.tj-hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 16px 18px 14px;
    box-sizing: border-box;
    min-height: 220px;
}

.tj-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}
.tj-root .tj-brand {
    font-family: var(--tj-font-type);
    font-size: 13px;
    letter-spacing: 0.14em;
    color: var(--tj-fg);
}
.tj-root .tj-serial {
    font-family: var(--tj-font-type);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--tj-accent);
}

.tj-admit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 12px;
}
.tj-rule {
    flex: 1;
    height: 1px;
    background: var(--tj-line);
}
.tj-root .tj-admit {
    flex: 0 0 auto;
    font-family: "Americana ExtraBold", var(--tj-font-block);
    font-size: 34px;
    line-height: 1;
    letter-spacing: 0.08em;
    color: var(--tj-accent);
}

.tj-root .tj-title {
    margin: 0 0 10px;
    font-family: var(--tj-font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--tj-fg);
    text-align: center;
    letter-spacing: 0.04em;
}

.tj-fare {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--tj-line);
}
.tj-root .tj-price {
    font-family: var(--tj-font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--tj-accent);
    letter-spacing: 0.08em;
}
.tj-root .tj-dot {
    color: var(--tj-muted);
    font-size: 14px;
}
.tj-root .tj-class {
    font-family: var(--tj-font-type);
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--tj-fg);
}

.tj-ledger {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin-bottom: 10px;
}
.tj-ledger-col { min-width: 0; }
.tj-root .tj-meta-k {
    margin: 0 0 4px;
    font-family: var(--tj-font-type);
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--tj-accent);
}
.tj-root .tj-meta-v {
    margin: 0;
    font-family: var(--tj-font-ledger);
    font-size: 16px;
    font-weight: 400;
    color: #3a2f26;
    line-height: 1.55;
    letter-spacing: 0.06em;
    white-space: pre-line;
    word-break: break-word;
}

.tj-root .tj-subtitle {
    margin: 8px 0 0;
    font-family: var(--tj-font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--tj-accent);
    text-align: center;
    line-height: 1.45;
}
.tj-root .tj-desc {
    display: none;
}
.tj-root .tj-desc:not(:empty) {
    display: block;
    margin: 8px 0 0;
    font-family: var(--tj-font-sans);
    font-size: 12px;
    line-height: 1.65;
    color: var(--tj-muted);
    text-align: center;
}

.tj-stamp {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: none;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 36px 16px 0 0;
    pointer-events: none;
    isolation: isolate;
}
.tj-root.is-confirmed .tj-stamp { display: flex; }
.tj-stamp-inner {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    border: 3px solid rgba(163, 55, 40, 0.82);
    box-shadow:
        inset 0 0 0 2px rgba(163, 55, 40, 0.55),
        0 0 0 1px rgba(163, 55, 40, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-22deg);
    background:
        radial-gradient(circle at 35% 30%, rgba(163, 55, 40, 0.08), transparent 55%),
        transparent;
    mix-blend-mode: multiply;
    animation: tj-stamp-in 0.78s cubic-bezier(0.18, 1.05, 0.28, 1) both;
    opacity: 0;
}
.tj-root .tj-stamp-inner span {
    font-family: var(--tj-font-stamp);
    font-size: 16px;
    font-weight: 700;
    color: rgba(163, 55, 40, 0.88);
    letter-spacing: 0.1em;
    white-space: nowrap;
    text-align: center;
    line-height: 1.15;
    text-shadow: 0 0 1px rgba(163, 55, 40, 0.35);
    filter: contrast(1.05) saturate(0.9);
}
@keyframes tj-stamp-in {
    0% {
        opacity: 0;
        transform: rotate(-28deg) scale(2.35) translateY(-22px);
        filter: blur(2px);
        box-shadow:
            inset 0 0 0 2px rgba(163, 55, 40, 0.28),
            0 0 0 1px rgba(163, 55, 40, 0.12);
    }
    42% {
        opacity: 1;
        transform: rotate(-20deg) scale(0.84) translateY(3px);
        filter: blur(0);
        box-shadow:
            inset 0 0 0 2px rgba(163, 55, 40, 0.68),
            0 0 0 10px rgba(163, 55, 40, 0.16);
    }
    58% {
        opacity: 1;
        transform: rotate(-23deg) scale(1.08) translateY(-1px);
        box-shadow:
            inset 0 0 0 2px rgba(163, 55, 40, 0.55),
            0 0 0 4px rgba(163, 55, 40, 0.1);
    }
    78% {
        transform: rotate(-21.5deg) scale(0.97) translateY(0.5px);
    }
    100% {
        opacity: 0.92;
        transform: rotate(-22deg) scale(1);
        filter: none;
        box-shadow:
            inset 0 0 0 2px rgba(163, 55, 40, 0.55),
            0 0 0 1px rgba(163, 55, 40, 0.25);
    }
}
.tj-stub-stage {
    position: relative;
    z-index: 1;
    height: var(--tj-stub-h);
    overflow: hidden;
    border-radius: 0 0 var(--tj-radius) var(--tj-radius);
    background: transparent;
    touch-action: none;
    user-select: none;
    border-top: 0;
}
.tj-stub-stage.is-folded,
.tj-root.is-confirmed .tj-stub-stage {
    /* ちぎった後もstubの高さは残す（heroの位置がずれる） */
    height: var(--tj-stub-h);
    visibility: hidden;
    pointer-events: none;
    border: 0;
    margin: 0;
    padding: 0;
}
.tj-curl {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}
.tj-curl.is-on { opacity: 1; visibility: visible; }

.tj-stub {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 0 0 var(--tj-radius) var(--tj-radius);
    border: 0;
    outline: none;
    cursor: grab;
    overflow: hidden;
    background:
        repeating-linear-gradient(
            -18deg,
            rgba(44, 36, 28, 0.025) 0 1px,
            transparent 1px 10px
        ),
        linear-gradient(180deg, #faf6ee 0%, #f6f1e6 100%);
}
.tj-root.is-dragging .tj-stub { cursor: grabbing; }

.tj-seam {
    position: absolute;
    left: calc(var(--tj-notch) + 6px);
    right: calc(var(--tj-notch) + 6px);
    top: calc(100% - var(--tj-stub-h));
    z-index: 5;
    height: 2px;
    margin-top: -1px;
    pointer-events: none;
    background: repeating-linear-gradient(
        90deg,
        rgba(44, 36, 28, 0.75) 0 3px,
        transparent 3px 9px
    );
    opacity: 0.9;
}
.tj-root.is-reduced .tj-seam,
.tj-root:not(:has(.tj-stub-stage)) .tj-seam {
    display: none;
}

.tj-stub-row {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 14px 0 6px;
    gap: 10px;
    box-sizing: border-box;
}
.tj-stub-swipe {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 48px;
    margin-left: 0;
    padding: 0;
    color: var(--tj-accent);
    pointer-events: none;
}
.tj-stub-swipe svg {
    display: block;
    width: 36px;
    height: 24px;
    animation: tj-grab-nudge 1.55s ease-in-out infinite;
}
.tj-stub-swipe span {
    font-family: var(--tj-font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1;
    color: var(--tj-accent);
    white-space: nowrap;
}
.tj-root.is-dragging .tj-stub-swipe {
    opacity: 0.3;
}
.tj-stub-block {
    flex: 1;
    min-width: 0;
    padding-left: 6px;
}
.tj-root .tj-stub-admit {
    margin: 0 0 4px;
    font-family: var(--tj-font-block);
    font-size: 22px;
    letter-spacing: 0.06em;
    line-height: 1;
    color: var(--tj-accent);
}
.tj-root .tj-stub-serial {
    margin: 0;
    font-family: var(--tj-font-type);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--tj-fg);
}
.tj-stub-mid {
    flex: 0 0 auto;
    text-align: center;
    min-width: 40px;
    padding-right: 2px;
}
.tj-root .tj-stub-label {
    margin: 0;
    font-family: var(--tj-font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--tj-muted);
    writing-mode: horizontal-tb;
}
.tj-stub-div {
    width: 1px;
    height: 56px;
    flex-shrink: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(44, 36, 28, 0.4) 0,
        rgba(44, 36, 28, 0.4) 3px,
        transparent 3px,
        transparent 7px
    );
}
@keyframes tj-grab-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.tj-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 16px;
    background: var(--tj-card);
    border-radius: 0 0 var(--tj-radius) var(--tj-radius);
    text-align: center;
    border-top: 1px solid var(--tj-line);
    overflow: hidden;
    box-shadow:
        0 8px 22px rgba(44, 36, 28, 0.12),
        0 0 0 1px rgba(44, 36, 28, 0.16);
}
.tj-root[data-join-mode="button"] .tj-actions,
.tj-root[data-join-mode="static"] .tj-actions,
.tj-root.is-reduced .tj-actions {
    box-shadow: 0 0 0 1px rgba(44, 36, 28, 0.16);
}
.tj-root[data-join-mode="button"] .tj-subtitle,
.tj-root[data-join-mode="static"] .tj-subtitle,
.tj-root.is-reduced .tj-subtitle {
    margin-bottom: 4px;
}
.tj-root.is-reduced .tj-stub-stage,
.tj-root[data-join-mode="button"] .tj-stub-stage,
.tj-root[data-join-mode="static"] .tj-stub-stage {
    display: none;
}
.tj-root[data-join-mode="apply"]:not(.is-reduced):not(.is-confirmed) .tj-btn,
.tj-root[data-join-mode="discord"]:not(.is-reduced):not(.is-confirmed) .tj-btn {
    display: none;
}
.tj-root[data-join-mode="apply"]:not(.is-reduced):not(.is-confirmed) .tj-actions,
.tj-root[data-join-mode="discord"]:not(.is-reduced):not(.is-confirmed) .tj-actions {
    display: none;
}
.tj-root[data-join-mode="apply"].is-reduced .tj-actions,
.tj-root[data-join-mode="discord"].is-reduced .tj-actions,
.tj-root[data-join-mode="button"] .tj-actions,
.tj-root[data-join-mode="static"] .tj-actions {
    display: flex;
}
/* ちぎってスタンプした後のパネル */
.tj-root[data-join-mode="apply"].is-confirmed .tj-actions,
.tj-root[data-join-mode="discord"].is-confirmed .tj-actions {
    display: flex;
    opacity: 0;
    transform: translateY(10px);
    animation: tj-actions-in 1s ease 1.05s forwards;
    margin-top: 18px;
    padding: 16px 18px 14px;
    background: rgba(246, 241, 230, 0.96);
    border: 1px solid rgba(44, 36, 28, 0.16);
    border-radius: 12px;
    border-top: 1px solid rgba(44, 36, 28, 0.16);
    box-shadow: 0 10px 24px rgba(44, 36, 28, 0.12);
}
.tj-root[data-join-mode="apply"].is-confirmed .tj-btn,
.tj-root[data-join-mode="discord"].is-confirmed .tj-btn {
    display: inline-flex;
}
@keyframes tj-actions-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.tj-root.is-confirmed .tj-note { display: none; }

.tj-root .tj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 2px;
    background: var(--tj-accent);
    color: #f6f1e6;
    font-family: var(--tj-font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(44, 36, 28, 0.16);
}
.tj-root .tj-btn:hover { filter: brightness(1.05); }
.tj-root.is-confirmed .tj-btn,
.tj-root.is-confirmed .tj-dismiss {
    border-radius: 10px;
}
.tj-root:not(.is-confirmed) .tj-dismiss {
    display: none;
}
.tj-root.is-confirmed .tj-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    margin-top: 2px;
    border: 1px solid rgba(44, 36, 28, 0.22);
    border-radius: 10px;
    background: rgba(44, 36, 28, 0.08);
    color: rgba(44, 36, 28, 0.55);
    font-family: var(--tj-font-sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: none;
}
.tj-root.is-confirmed .tj-dismiss:hover {
    background: rgba(44, 36, 28, 0.12);
    color: rgba(44, 36, 28, 0.7);
}
.tj-root .tj-note {
    margin: 0;
    font-family: var(--tj-font-sans);
    font-size: 12px;
    line-height: 1.65;
    color: var(--tj-muted);
}

@media (max-width: 640px) {
    .tj-root { width: min(100%, 100%); }
    .tj-root .tj-admit { font-size: 28px; }
    .tj-root .tj-title { font-size: 19px; }
    .tj-hero-body { padding: 14px 14px 12px; }
    .tj-ledger { grid-template-columns: 1fr; gap: 10px; }
    .tj-stub-row { padding: 0 12px 0 4px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .tj-stub-swipe svg { animation: none; }
    .tj-stamp-inner,
    .tj-root[data-join-mode="apply"].is-confirmed .tj-actions,
    .tj-root[data-join-mode="discord"].is-confirmed .tj-actions {
        animation: none;
        opacity: 1;
        transform: none;
        filter: none;
    }
    .tj-root.is-confirmed .tj-stamp-inner {
        opacity: 0.92;
        transform: rotate(-22deg);
    }
    .tj-stub-stage {
        transition: none;
    }
}
