@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

/* ===== 変数 / リセット ===== */
:root {
    --bg: #FFFFFF;
    --surface: #F5F3EE;
    --ink: #171B26;
    --muted: rgba(23,27,38,0.6);
    --faint: rgba(23,27,38,0.32);
    --vermillion: #E2542A;
    --gold: #B9790C;
    --line: rgba(23,27,38,0.12);
    --header-h: 112px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Zen Kaku Gothic New', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

img {
    user-select: none;
}

/* ===== ヘッダー ===== */
header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

header > .title {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    padding: 14px 20px 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
}

header .icon {
    width: 37px;
    height: 37px;
    display: block;
    margin-right: 4px;
}

header .tab {
    display: flex;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    padding: 0 14px 12px;
    gap: 4px;
}

header .tab .item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 4px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--muted);
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
    user-select: none;
    white-space: nowrap;
}

header .tab .item:hover {
    color: var(--ink);
}

header .tab .item.is-active {
    color: var(--ink);
    background: var(--surface);
}

/* 準備中タブ(4〜6番目) */
header .tab .item:nth-child(n+4) {
    color: var(--faint);
    pointer-events: none;
    font-size: 0;
}

header .tab .item:nth-child(n+4)::after {
    content: "準備中";
    font-size: 0.62rem;
    letter-spacing: 0.05em;
}

/* ===== ページ共通 ===== */
.home, .stamp, .map {
    position: fixed;
    top: var(--header-h);
    bottom: 0;
    left: 0;
    right: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
    background: var(--bg);
}

.home.is-visible,
.stamp.is-visible,
.map.is-visible {
    display: block;
}

/* ===== トップ ===== */
.home .count {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 24px 60px;
    text-align: center;
    position: relative;
}

.home .flex {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.home .flex:first-child .title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 23px;
    letter-spacing: 0.08em;
}

.home .flex:first-child .small {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.home .flex:last-child .small {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 500;
    align-self: flex-end;
    margin-bottom: 0.6em;
}

.home .flex:last-child .title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 78px;
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: var(--vermillion);
}

.main {
    padding: 20px;
    text-align: center;
    font-size: 22px;
}

@media (max-width: 340px) {
    .home .flex:last-child .title {
        font-size: 16vw;
    }
}

@keyframes navi1 {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(10px); }
}

.navi1_parent {
    position: relative;
}

.navi1 {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 63px;
    display: flex;
    pointer-events: none;
}

body:not(:has(.home.is-visible)) .navi1 {
    display: none;
}

.navi1 img {
    width: 27px;
    aspect-ratio: 217 / 460;
    transform: translateY(-5px);
    animation: navi1 1s ease-in-out infinite;
}

.navi1 .text {
    border: solid 2px rgb(70, 70, 70);
    background-color: azure;
    padding: 5px 11px;
    border-radius: 13px;
    border-top-left-radius: 0;
    margin-top: 25px;
    margin-left: 15px;
    height: fit-content;
    color: rgb(70, 70, 70);
}

.navi2 {
    display: none;
    position: absolute;
    width: 55px;
    margin-bottom: 225px;
    margin-right: 52px;
}

.navi3 {
    position: absolute;
    width: 87px;
    top: 50%;
    margin-top: 45px;
    margin-left: 130px;
    left: 50%;
    transform: translateX(-50%);
}

.stamp {
    z-index: 80;
}

.stamp > * {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stamp > .stamp-card {
    margin-top: 36px;
}

.stamp > .ticket-error {
    padding: 0 24px;
    margin-top: 16px;
    display: block;
}

#NoQR {
    display: none;
}

#NoQR.active {
    display: block;
    margin-top: 30px;
    font-weight: 600;
    font-size: 22px;
    padding: 30px;
}

.stamp-card {
    width: calc(100% - 48px);
    max-width: 280px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 20px;
    display: none;
    flex-direction: column;
    align-items: center;
}

.stamp-card.active {
    display: flex;
}

.myQR {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-frame {
    display: inline-block;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    line-height: 0;
    position: relative;
}

.qr-frame img,
.qr-frame canvas,
.qr-frame table {
    display: block;
    width: 180px;
    height: 180px;
}

.qr-frame img,
.qr-frame canvas {
    image-rendering: pixelated;
}

.cover {
    position: absolute;
    width: 206px;
    height: 206px;
    background-color: transparent;
    z-index: 100000;
}

.user-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}

.user-greeting {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 700;
}

.user-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.01em;
}

.user-sub {
    font-size: 0.85rem;
    color: var(--muted);
}

.ticket-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-top: 16px;
}

.ticket-item {
    flex: 1;
}

.ticket-divider {
    width: 1px;
    align-self: stretch;
    background: var(--line);
}

.ticket-label {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 700;
}

.ticket-num {
    margin: 6px 0 0;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.9rem;
    color: var(--vermillion);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.ticket-unit {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.ticket-error {
    width: 100%;
    font-size: 0.82rem;
    color: var(--vermillion);
    font-weight: 700;
    line-height: 1.7;
}

.ticket-error:empty {
    display: none;
}

/* QR全画面表示 */
.tapMessage {
    display: none;
}

.stamp-card.tap {
    width: 100%;
    height: 100%;
    max-width: none;
    z-index: 80;
    padding: 0;
    margin: 0;
    border-radius: 0;
    display: block;
    position: fixed;
    top: 0;
    left: 0;
}

.tap .myQR {
    width: 100%;
    margin-top: 40px;
}

.tap .qr-frame {
    width: calc(100% - 80px);
    height: calc(100% - 80px);
}

.tap .qr-frame img {
    width: 100%;
    height: auto;
}

.tap .user-row,
.tap .ticket-row {
    display: none;
}

.tap .cover {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
}

.tap .tapMessage {
    display: block;
    margin-top: 25px;
    font-size: 26px;
    font-weight: 600;
    color: rgb(93,93,93);
}

/* ===== マップ ===== */
.map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ===== イースターエッグ ===== */
#taiju {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100000;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#taiju img {
    width: 100%;
    height: 100%;
}

#taiju .fix {
    position: absolute;
    top: 45%;
    width: fit-content;
    margin: auto;
    padding: 0 30px;
    color: white;
    letter-spacing: 1px;
    background-color: rgba(63,63,63,0.5);
    height: fit-content;
    border-radius: 20px;
    font-size: 30px;
    font-weight: 600;
}

.home {
    background:
        radial-gradient(circle at 15% 20%, rgba(79,168,232,0.22) 0, transparent 38%),
        radial-gradient(circle at 85% 30%, rgba(240,107,160,0.20) 0, transparent 36%),
        radial-gradient(circle at 25% 80%, rgba(245,182,58,0.22) 0, transparent 40%),
        radial-gradient(circle at 80% 85%, rgba(47,191,155,0.20) 0, transparent 38%),
        var(--bg);
}