:root {
    --tg-ink: #262626;
    --tg-muted: #615c55;
    --tg-brand: #f39800;
    --tg-brand-dark: #7c4100;
    --tg-accent: #0f766e;
    --tg-accent-dark: #164e63;
    --tg-paper: #fffaf0;
    --tg-surface: #ffffff;
    --tg-border: #e6d7c1;
    --tg-shadow: 0 12px 34px rgb(40 31 18 / 10%);
}

.tokugy-php-template,
.tokugy-php-template * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.tokugy-php-template {
    color: var(--tg-ink);
}

.tg-main {
    display: block;
    overflow: clip;
}

.tg-page {
    background: var(--tg-surface);
    color: var(--tg-ink);
    font-size: 17px;
    line-height: 1.8;
}

.tg-section {
    --tg-section-padding: 72px;
    background-color: var(--tg-node-bg, var(--tg-surface));
    background-image: var(--tg-node-image, none);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: var(--tg-section-padding) 24px;
    position: relative;
}

.tg-section > :not(.tg-layout) {
    margin-inline: auto;
    max-width: 1120px;
    width: 100%;
}

.tg-layout {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-inline: auto;
    max-width: 1120px;
    width: 100%;
}

.tg-column {
    align-self: stretch;
    background-color: var(--tg-node-bg, transparent);
    background-image: var(--tg-node-image, none);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex: 1 1 calc(var(--tg-column, 100%) - 32px);
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.tg-container-node,
.tg-inner-section {
    background-color: var(--tg-node-bg, transparent);
    background-image: var(--tg-node-image, none);
    background-position: center;
    background-size: cover;
    width: 100%;
}

.tg-container-node {
    align-items: var(--tg-flex-align, stretch);
    display: flex;
    flex-direction: var(--tg-flex-direction, column);
    flex-wrap: wrap;
    gap: var(--tg-flex-gap, 24px);
    justify-content: var(--tg-flex-justify, flex-start);
}

.tg-container-node > * {
    flex-basis: var(--tg-item-width, auto);
    width: var(--tg-item-width, auto);
}

.tg-inner-section {
    padding-block: 20px;
}

.tg-heading {
    color: var(--tg-brand-dark);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 24px;
    overflow-wrap: anywhere;
    text-align: center;
}

h3.tg-heading,
h4.tg-heading,
h5.tg-heading,
h6.tg-heading {
    font-size: 24px;
}

.tg-rich-text {
    color: var(--tg-ink);
    overflow-wrap: anywhere;
}

.tg-rich-text > :first-child {
    margin-top: 0;
}

.tg-rich-text > :last-child {
    margin-bottom: 0;
}

.tg-rich-text a,
.tg-text-link {
    color: var(--tg-accent-dark);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.tg-widget + .tg-widget {
    margin-top: 24px;
}

.tg-image {
    margin: 0;
    text-align: center;
}

.tg-image img,
.tg-gallery img {
    display: block;
    height: auto;
    margin-inline: auto;
    max-width: 100%;
}

.tg-gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tg-gallery figure {
    aspect-ratio: 3 / 2;
    margin: 0;
    overflow: hidden;
}

.tg-gallery img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.tg-action {
    text-align: center;
}

.tg-button {
    align-items: center;
    background: var(--tg-brand);
    border: 2px solid var(--tg-brand-dark);
    border-radius: 6px;
    color: #2f1a00;
    display: inline-flex;
    font-size: 16px;
    font-weight: 700;
    justify-content: center;
    line-height: 1.4;
    min-height: 48px;
    padding: 10px 28px;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.tg-button:hover,
.tg-button:focus-visible {
    background: var(--tg-accent);
    border-color: var(--tg-accent);
    color: #ffffff;
    transform: translateY(-2px);
}

.tg-anchor {
    display: block;
    scroll-margin-top: 100px;
}

.tg-divider {
    align-items: center;
    color: var(--tg-accent-dark);
    display: flex;
    font-size: 22px;
    font-weight: 700;
    gap: 16px;
    margin-block: 36px;
    text-align: center;
}

.tg-divider::before,
.tg-divider::after {
    background: var(--tg-border);
    content: "";
    flex: 1;
    height: 2px;
}

.tg-feature {
    border-left: 5px solid var(--tg-accent);
    margin-block: 16px;
    padding: 8px 0 8px 24px;
}

.tg-feature h3 {
    color: var(--tg-accent-dark);
    font-size: 22px;
    margin: 0 0 8px;
}

.tg-faq {
    display: grid;
    gap: 12px;
}

.tg-faq details {
    background: var(--tg-surface);
    border: 1px solid var(--tg-border);
    border-radius: 6px;
    padding: 0 20px;
}

.tg-faq summary {
    color: var(--tg-accent-dark);
    cursor: pointer;
    font-weight: 700;
    padding: 18px 4px;
}

.tg-faq details .tg-rich-text {
    border-top: 1px solid var(--tg-border);
    padding: 16px 4px 20px;
}

.tg-post-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tg-empty-posts {
    color: var(--tg-muted);
    margin: 36px 0 0;
    text-align: center;
}

.tg-post-card {
    background: var(--tg-surface);
    border: 1px solid var(--tg-border);
    border-radius: 6px;
    box-shadow: var(--tg-shadow);
    min-width: 0;
    overflow: hidden;
}

.tg-post-card__image {
    aspect-ratio: 11 / 8;
    display: block;
    overflow: hidden;
}

.tg-post-card__image img {
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
    width: 100%;
}

.tg-post-card:hover .tg-post-card__image img {
    transform: scale(1.025);
}

.tg-post-card__body {
    padding: 20px;
}

.tg-post-card time {
    color: var(--tg-muted);
    font-size: 14px;
}

.tg-post-card h3 {
    font-size: 20px;
    line-height: 1.45;
    margin: 8px 0 12px;
    overflow-wrap: anywhere;
}

.tg-post-card h3 a {
    color: var(--tg-ink);
    text-decoration: none;
}

.tg-post-card p {
    color: var(--tg-muted);
    font-size: 15px;
}

.tg-pagination {
    margin-top: 40px;
}

.tg-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tg-pagination a,
.tg-pagination span {
    align-items: center;
    border: 1px solid var(--tg-brand-dark);
    border-radius: 4px;
    display: inline-flex;
    justify-content: center;
    min-height: 42px;
    min-width: 42px;
    padding: 6px 12px;
    text-decoration: none;
}

.tg-pagination .current {
    background: var(--tg-brand);
    color: #2f1a00;
    font-weight: 700;
}

.tg-page--home .tg-section--0 {
    background-color: var(--tg-paper);
    min-height: 640px;
}

.tg-page--home .tg-section--0 .tg-rich-text:first-child {
    color: var(--tg-accent-dark);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.45;
}

.tg-page--home .tg-section--0 .header-kv-text2 {
    color: var(--tg-brand-dark);
}

.tg-page--home .tg-section--0 .header-text-underline1,
.tg-page--home .tg-section--0 .header-text-underline2 {
    text-decoration-color: var(--tg-brand);
    text-decoration-line: underline;
    text-decoration-thickness: 8px;
    text-underline-offset: -2px;
}

.tg-page--home .tg-section--1 {
    padding-block: 48px;
}

.tg-page--home .tg-section--2,
.tg-page--home .tg-section--4,
.tg-page--home .tg-section--7,
.tg-page--about .tg-section--1,
.tg-page--about .tg-section--3,
.tg-page--support .tg-section--2,
.tg-page--support .tg-section--3 {
    border-top: 1px solid rgb(124 65 0 / 12%);
}

.tg-page--news .tg-section,
.tg-page--blog .tg-section,
.tg-page--activities .tg-section,
.tg-page--thanks .tg-section {
    background: var(--tg-paper);
}

.tg-page--news .tg-section,
.tg-page--blog .tg-section,
.tg-page--activities .tg-section {
    min-height: 520px;
}

.tg-page--thanks .tg-section--1 {
    text-align: center;
}

@media (max-width: 900px) {
    .tg-section {
        --tg-section-padding: 56px;
        padding-inline: 20px;
    }

    .tg-layout {
        gap: 24px;
    }

    .tg-column {
        flex-basis: 100%;
    }

    .tg-container-node {
        flex-direction: var(--tg-flex-direction-mobile, var(--tg-flex-direction, column));
    }

    .tg-container-node > * {
        flex-basis: var(--tg-item-width-mobile, var(--tg-item-width, auto));
        width: var(--tg-item-width-mobile, var(--tg-item-width, auto));
    }

    .tg-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tg-page--home .tg-section--0 {
        min-height: auto;
    }

    .tg-page--home .tg-section--0 .tg-rich-text:first-child {
        font-size: 32px;
    }
}

@media (min-width: 901px) {
    .tg-hide-desktop {
        display: none !important;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .tg-hide-tablet {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .tg-hide-mobile {
        display: none !important;
    }

    .tg-page {
        font-size: 16px;
    }

    .tg-section {
        --tg-section-padding: 44px;
        padding-inline: 16px;
    }

    .tg-heading {
        font-size: 28px;
    }

    h3.tg-heading,
    h4.tg-heading,
    h5.tg-heading,
    h6.tg-heading {
        font-size: 21px;
    }

    .tg-gallery,
    .tg-post-grid {
        grid-template-columns: 1fr;
    }

    .tg-gallery figure {
        aspect-ratio: 16 / 9;
    }

    .tg-page--home .tg-section--0 .tg-rich-text:first-child {
        font-size: 28px;
    }

    .tg-button {
        width: min(100%, 320px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tokugy-php-template *,
    .tokugy-php-template *::before,
    .tokugy-php-template *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
