html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    color: var(--page-text, inherit);
    background: var(--page-bg, transparent);
}

header {
    display: flex;
    align-items: center;
    font-family: var(--header-font, inherit);
    padding: 10px;
    background-color: var(--header-bg);
    border-bottom: var(--header-border-style, none);
}

footer {
    text-align: right;
    padding: 10px;
    background-color: var(--footer-bg, var(--header-bg));
    font-size: 10px;
    border-top: var(--footer-border-style, var(--header-border-style, none));
}

header img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-right: 20px;
}

.linked-header {
    padding: 0;
}

.home-header-link,
.home-header-link:visited {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    border-radius: 8px;
    width: 100%;
    padding: 10px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.home-header-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin-right: 20px;
    flex: 0 0 80px;
    border-radius: 8px;
}

.home-icon-image {
    position: absolute;
    inset: 0;
    width: 80px;
    height: 80px;
    margin-right: 0;
    border-radius: 8px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-icon-image {
    opacity: 0;
    transform: scale(0.96);
}

.header-text-stack {
    position: relative;
}

.app-header-text,
.main-header-text {
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-header-text {
    position: absolute;
    left: 0;
    top: 50%;
    opacity: 0;
    transform: translateY(-50%) scale(0.96);
    white-space: nowrap;
}

.main-header-title {
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: var(--header-title-text, inherit);
}

@media (hover: hover) and (pointer: fine) {
    .home-header-link:hover {
        background-color: rgba(255, 255, 255, 0.18);
    }

    .home-header-link:hover .app-icon-image {
        opacity: 0;
        transform: scale(1.04);
    }

    .home-header-link:hover .main-icon-image {
        opacity: 1;
        transform: scale(1);
    }

    .home-header-link:hover .app-header-text {
        opacity: 0;
        transform: scale(1.04);
    }

    .home-header-link:hover .main-header-text {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.home-header-link:focus-visible .app-icon-image {
    opacity: 0;
    transform: scale(1.04);
}

.home-header-link:focus-visible .main-icon-image {
    opacity: 1;
    transform: scale(1);
}

.home-header-link:focus-visible .app-header-text {
    opacity: 0;
    transform: scale(1.04);
}

.home-header-link:focus-visible .main-header-text {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.home-header-link:focus-visible {
    background-color: rgba(255, 255, 255, 0.18);
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .home-icon-image,
    .app-header-text,
    .main-header-text {
        transition: none;
    }
}

.header-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-text h1 {
    margin: 0;
    font-size: 24px;
    color: var(--header-title-text, inherit);
    overflow-wrap: anywhere;
}

.header-text h2 {
    margin: 0;
    font-size: 16px;
    font-weight: normal;
    font-style: italic;
    color: var(--header-subtitle-text, #666);
    overflow-wrap: anywhere;
}

.download-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    margin: 15px;
}

.download-label {
    background-color: var(--bubble-bg);
    border: 1px solid var(--bubble-border);
    border-radius: 999px;
    color: var(--bubble-text);
    font-size: 16px;
    font-style: italic;
    padding: 4px 10px;
}

.download-link {
    display: inline-block;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.download-link img {
    display: block;
    width: 120px;
    height: 40px;
    margin-right: 0;
}

.download-link:hover {
    transform: scale(1.05);
}

.media-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px;
}

.single-media {
    display: block;
    width: min(90vw, 320px);
    height: auto;
    border: 0.5px solid black;
    border-radius: 15px;
}

.text-sections {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 15px;
    width: calc(100% - 30px);
}

.text-section {
    width: 100%;
    max-width: 800px;
    margin-bottom: 0;
    text-align: left;
}

.text-section h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--heading-text);
    font-family: var(--heading-font, inherit);
    background-color: var(--heading-bg);
    padding: 5px 10px;
    border-left: 6px solid var(--heading-border);
    border-radius: 4px;
}

a {
    text-decoration: none;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.support_img {
    height: 1.3em;
    vertical-align: -0.35em;
}
