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

:root {
    color-scheme: light;
    --ink: #1b1a2b;
    --ink-soft: #3a3950;
    --paper: #f7f2ea;
    --accent: #f35b3e;
    --accent-2: #1f7a8c;
    --accent-3: #f2c94c;
    --card: #ffffff;
    --stroke: #e5dfd6;
    --shadow: 0 24px 60px rgba(27, 26, 43, 0.12);
}

.geo-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--stroke);
}

.geo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.geo-panel {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
}

#geohunter-admin-map,
#geohunter-poi-map,
#geohunter-team-map,
#geohunter-overview-map {
    height: 420px;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    position: relative;
}

#geohunter-team-map {
    z-index: 10;
}

.geo-team-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 1rem;
}

.geo-choices {
    display: grid;
    gap: 0.75rem;
}

.geo-choice-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.8rem;
    align-items: center;
}

.geo-choice-row input[type="text"] {
    width: 100%;
}

.geo-choice-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.geo-choice-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.4rem 0;
}

@media (max-width: 960px) {
    .geo-layout {
        grid-template-columns: 1fr;
    }

    #geohunter-admin-map,
    #geohunter-poi-map,
    #geohunter-team-map,
    #geohunter-overview-map {
        height: 320px;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(243, 91, 62, 0.12), transparent 45%),
        radial-gradient(circle at 20% 80%, rgba(31, 122, 140, 0.12), transparent 55%),
        linear-gradient(135deg, #f8f1e4 0%, #f4f6f6 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

main {
    padding: 2.5rem 0 4rem;
}

h1,
h2,
h3,
h4 {
    font-family: 'Fraunces', 'Georgia', serif;
    margin: 0 0 0.6rem;
}

p {
    margin: 0 0 1rem;
    color: var(--ink-soft);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(247, 242, 234, 0.85);
    border-bottom: 1px solid rgba(229, 223, 214, 0.7);
}

.nav-shell {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: transparent;
    color: inherit;
    font-weight: 700;
    object-fit: contain;
}

.brand-text {
    font-size: 1.1rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-nav a {
    font-weight: 500;
}

.nav-user {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(31, 122, 140, 0.1);
    color: var(--accent-2);
    font-size: 0.9rem;
}

.nav-locale {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(243, 91, 62, 0.08);
    font-size: 0.85rem;
}

.nav-locale a {
    font-weight: 600;
}

.page-shell {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flash {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: #fff8e8;
    border: 1px solid var(--stroke);
}

.flash-error {
    background: #ffe9e4;
}

.flash-success {
    background: #e7f8f0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 24px rgba(243, 91, 62, 0.2);
}

.btn-info {
    background: var(--accent-2);
    color: #fff;
    box-shadow: 0 10px 24px rgba(31, 122, 140, 0.22);
}

.btn-ghost {
    border-color: var(--stroke);
    background: #fff;
}

.btn-small {
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
}

.btn-add {
    background: #2f9e5f;
    color: #fff;
    box-shadow: 0 10px 24px rgba(47, 158, 95, 0.22);
}

.btn-edit {
    background: #f2c94c;
    color: #5d4b00;
    box-shadow: 0 10px 24px rgba(242, 201, 76, 0.28);
}

.btn-remove {
    background: #e0524d;
    color: #fff;
    box-shadow: 0 10px 24px rgba(224, 82, 77, 0.22);
}

.btn-add:hover,
.btn-edit:hover,
.btn-remove:hover,
.btn-info:hover {
    filter: brightness(0.96);
}

button:not(.btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

button:not(.btn):hover {
    border-color: rgba(31, 122, 140, 0.4);
    box-shadow: 0 8px 18px rgba(31, 122, 140, 0.12);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 2.5rem;
    align-items: center;
    padding: 2rem 0 3rem;
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 4vw, 3.6rem);
}

.hero-kicker {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-2);
    margin-bottom: 0.8rem;
}

.hero-lede {
    font-size: 1.1rem;
    max-width: 34rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hero-tags span {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(31, 122, 140, 0.1);
    color: var(--accent-2);
    font-size: 0.9rem;
}

.game-types {
    padding: 2.5rem 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.game-types-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-types-grid {
    display: flex;
    gap: 1.2rem;
    overflow-x: auto;
    padding: 0.3rem 0.2rem 0.8rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
}

.game-types-grid::-webkit-scrollbar {
    display: none;
}

.game-type-card {
    flex: 0 0 calc((100% - 1.2rem) / 2);
    min-width: 220px;
    background: #fff;
    border-radius: 22px;
    padding: 1.5rem;
    border: 1px solid var(--stroke);
    box-shadow: 0 14px 30px rgba(27, 26, 43, 0.08);
    display: grid;
    gap: 0.6rem;
    scroll-snap-align: start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(27, 26, 43, 0.14);
}

.game-icon {
    font-size: 1.8rem;
}

.game-link {
    font-weight: 600;
    color: var(--accent-2);
}

.carousel-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--stroke);
    background: #fff;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 10px 20px rgba(27, 26, 43, 0.08);
    cursor: pointer;
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 720px) {
    .carousel-btn {
        display: none;
    }

    .game-type-card {
        flex: 0 0 85%;
    }
}

.hero-panel {
    background: var(--card);
    padding: 2rem;
    border-radius: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--stroke);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-kicker {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    color: var(--accent-2);
    margin: 0 0 0.4rem;
}

.panel-badge {
    background: var(--accent-3);
    color: #6b5600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
}

.panel-lede {
    margin-bottom: 1.5rem;
}

.panel-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.form-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.form-row {
    margin-bottom: 1rem;
}

.form-row-error input,
.form-row-error textarea,
.form-row-error select {
    border-color: #d63b2c;
    background: #fff3f1;
}

.form-errors {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: #fff3f1;
    border: 1px solid #f3b2aa;
    color: #8b1f12;
}

.form-errors ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    font-family: inherit;
    font-size: 1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.features article {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--stroke);
}

.steps {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    padding: 2rem;
    border: 1px solid var(--stroke);
}

.steps-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.step-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.2rem;
    border: 1px solid var(--stroke);
}

.step-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--accent-2);
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.team-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--stroke);
}

.hand-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.hand-grid li {
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: #fff;
}

.hand-card {
    display: grid;
    gap: 0.75rem;
}

.hand-card-image {
    width: 140px;
    height: 140px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: #fff;
}

.hand-card-body {
    display: grid;
    gap: 0.2rem;
}

.hand-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
}

.hand-card-type {
    font-size: 0.85rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card-item {
    background: #fff;
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--stroke);
}

.card-item img {
    max-width: 100%;
    height: auto;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 30, 0.4);
}

.modal-card {
    position: relative;
    z-index: 2;
    max-width: 420px;
    width: 90%;
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
}

.modal-card-wide {
    max-width: 520px;
}

.modal-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: var(--accent-2);
    margin: 0 0 0.4rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.overview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--stroke);
}

.overview-header > div:first-child {
    flex: 1;
}

.overview-kicker {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.7rem;
    color: var(--accent-2);
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.overview-header h1 {
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.overview-subtitle {
    font-size: 1.1rem;
    color: var(--ink-soft);
    margin: 0 0 0.6rem 0;
}

.overview-note {
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.overview-note::before {
    content: '↻';
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: rgba(31, 122, 140, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--accent-2);
    flex-shrink: 0;
}

.overview-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    padding: 1.6rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 242, 234, 0.6) 100%);
    border: 2px solid var(--stroke);
    box-shadow: 0 8px 24px rgba(27, 26, 43, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(27, 26, 43, 0.15);
    border-color: var(--accent-2);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-2);
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
}

.team-card {
    background: #fff;
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--stroke);
    box-shadow: 0 12px 32px rgba(27, 26, 43, 0.08);
    display: grid;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.geo-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.geo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2rem;
}

.geo-panel {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

#geohunter-admin-map,
#geohunter-poi-map,
#geohunter-team-map,
#geohunter-overview-map {
    width: 100%;
    min-height: 420px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    overflow: hidden;
}

.geo-team-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    align-items: center;
}

.geo-choice-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.6rem;
}

.geo-choice-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.geo-team-icon {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 960px) {
    .geo-layout {
        grid-template-columns: 1fr;
    }
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
    border-radius: 24px 24px 0 0;
}

.team-card:hover {
    box-shadow: 0 20px 48px rgba(27, 26, 43, 0.12);
    transform: translateY(-2px);
    border-color: var(--accent-2);
}

.team-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    align-items: center;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid var(--stroke);
}

.team-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.team-identity h2 {
    font-size: 1.3rem;
    margin: 0;
    line-height: 1.2;
}

.team-logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    border: 2px solid var(--stroke);
    background: var(--paper);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(27, 26, 43, 0.1);
}

.team-code {
    font-weight: 700;
    color: var(--accent-2);
    letter-spacing: 0.12em;
    font-size: 0.95rem;
    margin: 0.3rem 0 0 0;
}

.team-lives {
    text-align: center;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, rgba(243, 91, 62, 0.1) 0%, rgba(31, 122, 140, 0.1) 100%);
    border-radius: 16px;
    border: 2px solid rgba(243, 91, 62, 0.2);
    flex-shrink: 0;
}

.team-lives-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.team-lives-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-soft);
    font-weight: 700;
    margin-top: 0.4rem;
}

.team-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1rem 0;
    border-top: 2px solid var(--stroke);
    border-bottom: 2px solid var(--stroke);
}

.team-card-actions {
    display: flex;
    justify-content: flex-end;
}

.team-card-actions form {
    margin: 0;
}

.tag {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.tag-alert {
    background: linear-gradient(135deg, rgba(224, 82, 77, 0.15) 0%, rgba(224, 82, 77, 0.08) 100%);
    color: #b33830;
    border: 1px solid rgba(224, 82, 77, 0.3);
}

.tag-alert:hover {
    background: linear-gradient(135deg, rgba(224, 82, 77, 0.2) 0%, rgba(224, 82, 77, 0.12) 100%);
    transform: scale(1.05);
}

.tag-warm {
    background: linear-gradient(135deg, rgba(242, 201, 76, 0.2) 0%, rgba(242, 201, 76, 0.12) 100%);
    color: #7a6000;
    border: 1px solid rgba(242, 201, 76, 0.4);
}

.tag-warm:hover {
    background: linear-gradient(135deg, rgba(242, 201, 76, 0.25) 0%, rgba(242, 201, 76, 0.15) 100%);
    transform: scale(1.05);
}

.tag-cool {
    background: linear-gradient(135deg, rgba(31, 122, 140, 0.15) 0%, rgba(31, 122, 140, 0.08) 100%);
    color: #1f6a79;
    border: 1px solid rgba(31, 122, 140, 0.3);
}

.tag-cool:hover {
    background: linear-gradient(135deg, rgba(31, 122, 140, 0.2) 0%, rgba(31, 122, 140, 0.12) 100%);
    transform: scale(1.05);
}

.tag-muted {
    background: rgba(27, 26, 43, 0.08);
    color: var(--ink-soft);
    border: 1px solid var(--stroke);
}

.tag-muted:hover {
    background: rgba(27, 26, 43, 0.12);
    transform: scale(1.05);
}

.team-section {
    padding: 1rem 0;
}

.team-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.8rem 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.team-section:first-of-type {
    padding-top: 0;
}

.chip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
}

.chip-list li {
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(243, 91, 62, 0.08) 0%, rgba(31, 122, 140, 0.06) 100%);
    border: 1px solid var(--stroke);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    transition: all 0.2s ease;
}

.chip-list li:hover {
    border-color: var(--accent-2);
    background: linear-gradient(135deg, rgba(243, 91, 62, 0.12) 0%, rgba(31, 122, 140, 0.1) 100%);
}

.chip-title {
    display: block;
    font-weight: 700;
    color: var(--ink);
}

.chip-meta {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-top: 0.3rem;
}

.muted {
    color: var(--ink-soft);
    font-style: italic;
}

.team-message {
    display: grid;
    gap: 0.8rem;
    padding: 1.2rem;
    border-radius: 16px;
    border: 2px solid var(--stroke);
    background: linear-gradient(135deg, rgba(242, 201, 76, 0.08) 0%, rgba(31, 122, 140, 0.06) 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-message:focus-within {
    border-color: var(--accent-2);
    background: linear-gradient(135deg, rgba(242, 201, 76, 0.12) 0%, rgba(31, 122, 140, 0.1) 100%);
    box-shadow: 0 8px 20px rgba(31, 122, 140, 0.1);
}

.team-message label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.team-message textarea {
    resize: vertical;
    min-height: 70px;
    padding: 0.8rem 1rem;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    background: #fff;
    transition: all 0.2s ease;
}

.team-message textarea:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(31, 122, 140, 0.1);
}

.logo-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.8rem;
    margin-top: 0.6rem;
}

.logo-option {
    position: relative;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    padding: 0.4rem;
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.logo-option img {
    width: 100%;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
}

.logo-option-none {
    display: grid;
    place-items: center;
    font-weight: 600;
    color: var(--ink-soft);
    background: rgba(27, 26, 43, 0.04);
}

.logo-option input:checked + img,
.logo-option input:checked + span {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

.scan-card-image {
    max-width: 320px;
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    box-shadow: 0 16px 40px rgba(27, 26, 43, 0.1);
    margin: 1.2rem 0;
}

.chip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.chip-list li {
    padding: 0.45rem 0.75rem;
    border-radius: 12px;
    background: rgba(27, 26, 43, 0.04);
    border: 1px solid var(--stroke);
    font-size: 0.9rem;
    display: grid;
    gap: 0.15rem;
}

.chip-title {
    font-weight: 600;
}

.chip-meta {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.muted {
    color: var(--ink-soft);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .nav-shell {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
    }
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.admin-table thead {
    background: linear-gradient(135deg, rgba(31, 122, 140, 0.08) 0%, rgba(243, 91, 62, 0.06) 100%);
    border-bottom: 2px solid var(--stroke);
}

.admin-table thead th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink);
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--stroke);
    transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
    background: rgba(31, 122, 140, 0.04);
}

.admin-table tbody tr:last-child {
    border-bottom: none;
}

.admin-table td {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    color: var(--ink);
}

.admin-table td.text-center {
    text-align: center;
    font-weight: 600;
    color: var(--accent-2);
}

.admin-table td.table-actions-inline {
    display: inline-flex;
    gap: 0.6rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1rem 0 1.5rem;
}

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    padding: 1rem;
    border-radius: 16px;
    border: 2px solid var(--stroke);
    background: rgba(247, 242, 234, 0.6);
    margin: 1rem 0 1.5rem;
}

.admin-card-edit {
    flex-direction: column;
    align-items: stretch;
}

.admin-card-edit input[type="text"],
.admin-card-edit select {
    width: 100%;
}

.admin-inline-form label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
}

.admin-inline-form select,
.admin-inline-form input[type="number"] {
    border: 1px solid var(--stroke);
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    font-size: 0.95rem;
    background: #fff;
}

.admin-edit-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.admin-edit-form select {
    border: 1px solid var(--stroke);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    background: #fff;
}

.qr-thumb {
    width: 72px;
    height: 72px;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: #fff;
}

.card-thumb {
    width: 72px;
    height: 72px;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: #fff;
    object-fit: cover;
}

.admin-table code {
    background: rgba(27, 26, 43, 0.06);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--ink);
    font-weight: 600;
}

.admin-table form[style*="display:inline"] {
    display: inline !important;
}

@media (max-width: 720px) {
    main {
        padding: 2rem 0 3rem;
    }

    .page-shell {
        padding: 0 1.1rem;
    }

    .overview-header {
        flex-direction: column;
        align-items: stretch;
        border-bottom: 2px solid var(--stroke);
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .overview-actions {
        justify-content: flex-start;
    }

    .overview-stats {
        grid-template-columns: 1fr;
        margin-bottom: 2rem;
    }

    .stat-card {
        padding: 1.4rem;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .team-card {
        padding: 1.4rem;
        gap: 1.2rem;
    }

    .team-card-header {
        flex-direction: column;
        align-items: flex-start;
        border-bottom: 2px solid var(--stroke);
        padding-bottom: 1rem;
    }

    .team-card-actions {
        justify-content: flex-start;
    }

    .team-lives {
        width: 100%;
        text-align: left;
        padding: 0.8rem 1rem;
    }

    .team-lives-value {
        font-size: 1.6rem;
    }

    .team-identity {
        width: 100%;
        align-items: flex-start;
    }

    .team-logo {
        width: 56px;
        height: 56px;
    }

    .hand-grid {
        grid-template-columns: 1fr;
    }

    .logo-picker {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }

    .logo-option img {
        height: 72px;
    }

    .chip-list {
        grid-template-columns: 1fr;
    }

    .team-message {
        padding: 1rem;
    }

    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table thead th {
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
    }

    .admin-table td {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }

    .admin-table td.text-center {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        align-items: center;
    }

    .admin-table td.table-actions-inline {
        flex-direction: row;
    }

    .admin-table form[style*="display:inline"] {
        display: block !important;
        width: 100%;
    }

    .admin-table .btn-small {
        width: 100%;
    }

    .admin-inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-inline-form label {
        font-size: 0.8rem;
    }

    .admin-inline-form select,
    .admin-inline-form input[type="number"] {
        width: 100%;
    }

    .admin-edit-form {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 520px) {
    .nav-shell {
        padding: 0.8rem 1rem;
    }

    .page-shell {
        padding: 0 0.9rem;
    }

    .brand-text {
        font-size: 1rem;
    }

    .btn,
    button:not(.btn) {
        width: 100%;
    }

    .hero-panel,
    .steps,
    .team-panel {
        padding: 1.4rem;
    }

    .overview-header {
        margin-bottom: 1.8rem;
        padding-bottom: 1.2rem;
    }

    .overview-header h1 {
        font-size: 1.8rem;
    }

    .overview-kicker {
        font-size: 0.65rem;
    }

    .stat-card {
        padding: 1.2rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .team-card {
        padding: 1.2rem;
        border-radius: 20px;
    }

    .team-card-header {
        padding-bottom: 0.8rem;
        gap: 0.8rem;
    }

    .team-identity h2 {
        font-size: 1.1rem;
    }

    .team-logo {
        width: 48px;
        height: 48px;
    }

    .team-lives {
        padding: 0.6rem 0.8rem;
    }

    .team-lives-value {
        font-size: 1.4rem;
    }

    .team-message {
        padding: 0.8rem;
    }

    .team-message label {
        font-size: 0.8rem;
    }

    .team-message textarea {
        min-height: 60px;
        font-size: 0.9rem;
    }

    .team-section h3 {
        font-size: 0.95rem;
    }

    .chip-list {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .chip-list li {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    .modal-card {
        padding: 1.2rem;
    }

    .scan-card-image {
        max-width: 100%;
    }

    .tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table thead th {
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
    }

    .admin-table td {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }

    .admin-inline-form {
        padding: 0.8rem;
    }

    .qr-thumb {
        width: 56px;
        height: 56px;
    }

    .card-thumb {
        width: 56px;
        height: 56px;
    }
}

/* Blind Hike Styles */
.blindhike-overview-layout,
.blindhike-team-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2rem;
    height: calc(100vh - 180px);
}

.blindhike-map-container,
.blindhike-team-map-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    background: #000;
}

#blindhike-overview-map,
#blindhike-team-map,
#blindhike-config-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border-radius: 20px;
}

.blindhike-sidebar,
.blindhike-team-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
}

.blindhike-sidebar .card,
.blindhike-team-controls .card {
    background: var(--card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
}

.blindhike-sidebar h2,
.blindhike-team-controls h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--ink);
}

.team-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--paper);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.team-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.team-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.marker-count {
    font-weight: 600;
    color: var(--accent);
}

.obstacle-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.obstacle-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--paper);
    border-radius: 8px;
    color: var(--ink-soft);
}

.obstacle-list li.active {
    background: var(--accent-3);
    color: var(--ink);
    font-weight: 600;
}

.target-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--accent-3);
    border-radius: 12px;
    font-weight: 600;
    color: var(--ink);
    margin-top: 1rem;
}

.target-icon {
    font-size: 1.5rem;
}

.cooldown-info,
.warning-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--paper);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.cooldown-bar {
    height: 8px;
    background: var(--stroke);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.cooldown-progress {
    height: 100%;
    background: var(--accent);
    transition: width 1s linear;
}

.cooldown-time {
    text-align: center;
    font-weight: 600;
    color: var(--accent);
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
}

.marker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--paper);
    border-radius: 8px;
}

.marker-number {
    font-weight: 600;
    color: var(--accent);
}

.marker-time {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--stroke);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--ink);
}

.form-section .help-text {
    color: var(--ink-soft);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.checkbox-group {
    margin-bottom: 1.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group .help-text {
    margin-left: 2rem;
    margin-top: 0.5rem;
    font-weight: normal;
}

@media (max-width: 960px) {
    .blindhike-overview-layout,
    .blindhike-team-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .blindhike-sidebar,
    .blindhike-team-controls {
        max-height: none;
    }

    #blindhike-overview-map,
    #blindhike-team-map {
        min-height: 400px;
    }
}
