@font-face {
    font-family: Orbitron;
    src: url('../fonts/Orbitron.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.phone-body {
    --bg: #44050d;
    --surface: #560a14;
    --header: #990e1e;
    --red: #c51929;
    --red-deep: #8d0c1a;
    --border: #a83843;
    --border-bright: #e46066;
    --text: #fff7f5;
    --muted: #ffd0d0;
    --accent: #ffb4b4;
    --tint: #75101d;
    --gutter: clamp(.75rem, 4vw, 1.1rem);
    color-scheme: dark;
    background: linear-gradient(180deg, var(--header) 0, #700b17 32%, var(--bg) 88%);
    color: var(--text);
    font: 500 clamp(12px, 4vw, 16px)/1.45 Orbitron, sans-serif;
}

.phone-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding-top: max(clamp(2.45rem, 12vw, 3rem), env(safe-area-inset-top));
}

.phone-brand {
    display: flex;
    flex: none;
    align-items: center;
    gap: .8rem;
    padding: .7rem var(--gutter);
    border-bottom: 1px solid var(--border);
    background: var(--header);
}

.phone-app-icon {
    flex: none;
    width: clamp(2.125rem, 12vw, 3rem);
    aspect-ratio: 1;
    height: auto;
}

.phone-wordmark {
    min-width: 0;
}

.phone-wordmark h1 {
    margin: 0;
    font-size: clamp(1rem, 6vw, 1.5rem);
    font-weight: 800;
    line-height: 1.2;
}

.phone-wordmark p {
    margin: .25rem 0 0;
    color: var(--muted);
    font-size: .82em;
}

.phone-main {
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #da4c55 transparent;
}

.phone-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: none;
    gap: .35rem;
    padding: .35rem var(--gutter) max(clamp(.9rem, 5vw, 1.55rem), env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--red-deep);
}

.phone-bottom button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    min-height: 2.65rem;
    padding: .4rem .25rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font-size: .85em;
}

.phone-bottom button.active,
.phone-bottom button[aria-current='page'] {
    border-color: var(--border-bright);
    background: var(--red);
    color: var(--text);
    font-weight: 750;
}

.nav-live-count {
    display: inline-grid;
    place-items: center;
    min-width: 1.2rem;
    padding: .1rem .2rem;
    border-radius: .35rem;
    background: var(--bg);
    color: #fff;
    font: 700 .75em/1.25 Orbitron, sans-serif;
}

.edition-hero,
.live-intro {
    margin: var(--gutter);
    padding: .8rem .85rem;
    border: 1px solid var(--border-bright);
    border-radius: 11px;
    background: linear-gradient(120deg, var(--red-deep), var(--red));
}

.edition-hero h2,
.live-intro h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.1rem, 5.6vw, 1.4rem);
    font-weight: 800;
    line-height: 1.25;
}

.edition-hero p,
.live-intro p {
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: .86em;
}

.live-intro-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
}

.phone-search {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 2.65rem;
    margin: 0 var(--gutter) .5rem;
    padding: 0 .7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--accent);
}

.phone-search:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.phone-search input {
    width: 100%;
    padding: .45rem 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: .88em;
}

.phone-search input::placeholder {
    color: var(--muted);
}

.phone-categories {
    display: flex;
    gap: .4rem;
    padding: .2rem var(--gutter) .6rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #da4c55 transparent;
}

.phone-categories button {
    min-height: 2rem;
    padding: .24rem .66rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--muted);
    font-size: .8em;
    white-space: nowrap;
}

.phone-categories button.active {
    border-color: var(--border-bright);
    background: var(--red);
    color: var(--text);
}

.live-strip {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: calc(100% - 2 * var(--gutter));
    margin: 0 var(--gutter) .65rem;
    padding: .66rem .75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--tint);
    text-align: left;
}

.live-strip strong,
.live-strip small {
    display: block;
}

.live-strip small {
    margin-top: .15rem;
    color: var(--muted);
}

.live-strip > .icon {
    margin-left: auto;
    color: var(--accent);
}

.phone-body .live-badge {
    font: 750 .74em/1 Orbitron, sans-serif;
    letter-spacing: .03em;
    background: var(--red);
}

.news-feed,
.live-list {
    display: grid;
    gap: .65rem;
    padding: .25rem var(--gutter) 1rem;
}

.issue-card,
.live-card {
    width: 100%;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    text-align: left;
}

.issue-card:hover,
.live-card:hover,
.live-strip:hover {
    border-color: var(--border-bright);
}

.issue-card > .image-frame {
    height: clamp(6.25rem, 43vw, 10.75rem);
    border-bottom: 1px solid var(--border);
}

.issue-card .image-placeholder {
    min-height: 0;
    background: linear-gradient(125deg, var(--tint), var(--red));
    color: var(--accent);
    font: inherit;
}

.issue-card-body,
.live-card-info {
    min-width: 0;
    padding: .75rem;
    overflow-wrap: anywhere;
}

.issue-card-kicker,
.issue-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .32rem;
    color: var(--muted);
    font-size: .76em;
}

.issue-card-kicker strong,
.issue-card-footer strong {
    color: var(--accent);
}

.issue-card h3,
.live-card-info h3 {
    margin: .4rem 0;
    font-size: clamp(1rem, 4.8vw, 1.27rem);
    line-height: 1.3;
}

.issue-card p {
    display: -webkit-box;
    margin: 0 0 .6rem;
    overflow: hidden;
    color: var(--muted);
    font-size: .9em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.issue-card-footer strong,
.live-card-info small {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.issue-card.compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(3.75rem, 22vw, 5.7rem);
    align-items: center;
}

.issue-card.compact > .image-frame {
    grid-area: 1 / 2;
    height: auto;
    aspect-ratio: 1;
    margin-right: .65rem;
    border: 0;
    border-radius: 6px;
}

.issue-card.compact .issue-card-body {
    grid-area: 1 / 1;
}

.issue-card.compact .image-placeholder span {
    display: none;
}

.issue-card.compact h3 {
    font-size: 1em;
}

.reader-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.reader-toolbar,
.watch-header {
    display: flex;
    flex: none;
    align-items: center;
    gap: .35rem;
    padding: .5rem var(--gutter);
    border-bottom: 1px solid var(--border);
    background: var(--red-deep);
}

.reader-toolbar {
    flex-wrap: wrap;
}

.reader-label,
.watch-header > span {
    flex: 1;
    color: var(--muted);
    font-size: .78em;
}

.reader-toolbar .button {
    min-height: 2rem;
    padding: .35rem .45rem;
}

.reader-zoom {
    display: flex;
    align-items: center;
    gap: .1rem;
}

.reader-zoom button {
    padding: .4rem;
}

.reader-content {
    flex: 1;
    min-height: 0;
    padding: .3rem .2rem;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #da4c55 transparent;
}

.reader-content.reading-viewport {
    padding: 0;
}

.phone-body .newspaper.reading .paper-logo {
    font-size: clamp(1.25rem, 8vw, 2.1rem);
    white-space: normal;
}

.live-card-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    height: clamp(5.5rem, 34vw, 8.5rem);
    padding: .7rem;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(ellipse at 50% 48%, var(--red), var(--tint) 80%);
}

.live-card-visual > .icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2.6rem;
    height: 2.6rem;
    color: #ffd0d0af;
    transform: translate(-50%, -50%);
}

.live-card-visual .viewers {
    display: flex;
    align-self: flex-end;
    align-items: center;
    gap: .3rem;
    font-size: .78em;
}

.live-card-info p {
    margin: .25rem 0;
}

.live-card-info small,
.live-card-info p,
.watch-meta,
.watch-volume,
.watch-audio-help,
.watch-status {
    color: var(--muted);
    font-size: .84em;
}

.watch-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #09090b;
}

.watch-frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.watch-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .6rem;
    background: var(--bg);
    color: var(--muted);
    font-size: .8em;
    text-align: center;
}

.watch-live-badge {
    position: absolute;
    top: .55rem;
    left: .55rem;
}

.watch-content {
    padding: var(--gutter);
    overflow-wrap: anywhere;
}

.watch-content h2 {
    margin: 0 0 .5rem;
    font-size: 1.25em;
    line-height: 1.3;
}

.watch-meta,
.watch-meta span {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.watch-meta {
    flex-wrap: wrap;
    justify-content: space-between;
}

.watch-audio {
    margin-top: .75rem;
    padding: .7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.watch-audio > .button,
.load-more {
    width: 100%;
}

.watch-volume {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: .65rem;
}

.watch-volume input {
    flex: 1;
    min-width: 0;
    accent-color: var(--red);
}

.phone-body .button {
    min-height: 2.3rem;
    border-color: var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: .85em;
}

.phone-body .button:hover,
.phone-body .icon-button:hover {
    background: var(--tint);
}

.phone-body .button.primary {
    border-color: var(--border-bright);
    background: var(--red);
    color: #fff;
}

.phone-body button:focus-visible,
.phone-body input[type='range']:focus-visible {
    outline-color: var(--accent);
}

.phone-body .empty-state,
.phone-body .loading {
    padding: 1.45rem .75rem;
    color: var(--muted);
    font-size: .9em;
}

.phone-body .empty-state h3 {
    color: var(--text);
}

.phone-body .empty-state p {
    font-size: .9em;
}

@media (max-width: 245px) {
    .issue-card.compact {
        display: block;
    }

    .issue-card.compact > .image-frame {
        display: none;
    }
}
