@font-face {
    font-family: 'Helvetica Neue iPod';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Helvetica Neue Regular'), url('https://fonts.cdnfonts.com/s/14188/HelveticaNeue-Roman.woff') format('woff');
}

@font-face {
    font-family: 'Helvetica Neue iPod';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: local('Helvetica Neue Medium'), url('https://fonts.cdnfonts.com/s/14188/HelveticaNeue-Medium.woff') format('woff');
}

@font-face {
    font-family: 'Helvetica Neue iPod';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local('Helvetica Neue Bold'), url('https://fonts.cdnfonts.com/s/14188/HelveticaNeueBold.woff') format('woff');
}

body, html {
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(0, 0, 0, 0.18) 100%
    );
}

p {
    margin: 0;
    padding: 0;
}

.wrapper {
    display: flex;
    align-items: center;
    flex-direction: column;
    position: relative;
    transform: scale(0.8);
    transform-origin: center;
}

.audio-controls {
    position: absolute;
    top: -48px;
    left: 17.5%;
    width: calc(65% * 0.82);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
}

.waveform-button, .audio-mute {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 36px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.waveform-button {
    position: relative;
    flex: 1;
    min-width: 0;
}

.waveform-button canvas {
    display: block;
    width: 100%;
    height: 32px;
}

.waveform-button:disabled {
    cursor: default;
    opacity: 1;
}

.audio-start-mark {
    display: none;
    position: absolute;
    left: 0;
    background: white;
    padding-right: 5px;
    font-size: 12px;
}

.audio-controls[data-state="waiting"] .audio-start-mark {
    display: block;
}

.audio-mute {
    width: 36px;
    flex-shrink: 0;
    border-radius: 50%;
}

.audio-mute svg {
    width: 22px;
    height: 22px;
}

.audio-mute:hover {
    background: #0000000d;
    color: #000;
}

.mute-cross,
.audio-mute[aria-pressed="true"] .sound-waves {
    display: none;
}

.audio-mute[aria-pressed="true"] .mute-cross {
    display: block;
}

.waveform-button:focus-visible, .audio-mute:focus-visible {
    outline: 2px solid #a16cce;
    outline-offset: 3px;
}

.header {
    font-family: 'Helvetica Neue';
    font-weight: light;
    width: 65%;
}

.pod {
    height: 700px;
    user-select: none;
}

.header p {
    font-size: 60px;
    letter-spacing: -2.9px;
}

.links .link-icon svg {
    height: 32px;
    aspect-ratio: 1/1;
}

.links .link-icon:hover svg {
    fill: purple;
}

.links {
    padding-top: 16px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 82%;
}

.polaroid {
    height: 256px;
    position: absolute;
    left: -17%;
    bottom: 5px;
    transform: translateY(-50%);
    transform: rotateZ(5deg);
    user-select: none;
    filter: drop-shadow(2px 3px 1px rgba(0, 0, 0, 0.4));
}

.ipod {
    position: relative;
    width: min(506.32px, calc(100vw - 32px));
    flex-shrink: 0;
    container-type: inline-size;
}

.ipod .pod {
    display: block;
    width: 100%;
    height: auto;
}

.ipod-screen {
    position: absolute;
    left: 23.23%;
    top: 8.3%;
    width: 41.53%;
    height: 46.44%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f6f8f4;
    color: #151b21;
    font: 600 clamp(10px, 3cqw, 15px)/1.25 'Helvetica Neue iPod', Helvetica, sans-serif;
    border-radius: 1px;
    box-shadow: inset 0 0 8px #24382924;
    user-select: none;
}

.ipod-screen[data-backlight="dim"] {
    filter: brightness(0.65);
}

.ipod-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 1.3em;
    padding: 0 0.45em;
    background: linear-gradient(#fff, #9da3a7);
    border-bottom: 1px solid #85939e;
    flex-shrink: 0;
}

.ipod-titlebar > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#ipod-title {
    font-size: 14px;
    font-family: inherit;
    font-weight: bold;
    color: black;
    text-shadow: 0px 1px 1px rgba(221, 221, 221, 1)
}

.ipod-battery {
    position: relative;
    width: 1.35em;
    height: 0.6em;
    flex-shrink: 0;
    border: 1px solid #52654b;
    border-radius: 1px;
    background: linear-gradient(#b5d97b, #6c9f40);
    box-shadow: inset 0 0 0 1px #ffffff80;
    margin-right: 2px;
}

.ipod-battery::after {
    content: "";
    position: absolute;
    right: -3px;
    top: 25%;
    width: 2px;
    height: 50%;
    background: #52654b;
}

.ipod-viewport {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.ipod-content {
    position: absolute;
    inset: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    background: #f6f8f4;
}

.ipod-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ipod-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3em;
    width: 100%;
    min-height: 1.3em;
    padding: 0.2em 0.3em;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.ipod-menu button[aria-current="true"] {
    background: linear-gradient(#64a9eb, #246cba);
    color: white;
}

.ipod-menu button:focus-visible {
    outline: 2px solid #66358e;
    outline-offset: -2px;
}

.ipod-chevron {
    font-size: 1.2em;
    line-height: 1;
}

.ipod-status {
    min-height: 2.3em;
    padding: 0.35em 0.45em;
    box-sizing: border-box;
    color: #4b5660;
    background: #e8edf0;
    border-top: 1px solid #c5cdd2;
    font-size: 0.7em;
    flex-shrink: 0;
}

.ipod-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65em;
    min-height: 100%;
    padding: 0.8em;
    box-sizing: border-box;
    text-align: center;
}

.ipod-detail h2 {
    margin: 0;
    font-size: 1.2em;
}

.ipod-detail p {
    font-size: 0.85em;
    font-weight: normal;
}

.ipod-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #202329;
}

.click-wheel {
    position: absolute;
    left: 25.68%;
    top: 60.47%;
    width: 37.16%;
    height: 26.88%;
    border-radius: 50%;
    touch-action: none;
    cursor: grab;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.click-wheel.is-dragging {
    cursor: grabbing;
}

.wheel-button {
    position: absolute;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    touch-action: none;
}

.wheel-menu, .wheel-play {
    left: 25%;
    width: 50%;
    height: 25%;
}

.wheel-menu { top: 0; }
.wheel-play { bottom: 0; }

.wheel-previous, .wheel-next {
    top: 25%;
    width: 25%;
    height: 50%;
}

.wheel-previous { left: 0; }
.wheel-next { right: 0; }

.wheel-select {
    left: 25%;
    top: 25%;
    width: 50%;
    height: 50%;
    border-radius: 50%;
}

.click-wheel:focus-visible,
.wheel-button:focus-visible {
    outline: 2px solid #a16cce;
    outline-offset: 2px;
}

.wheel-button:active {
    background: #5b337014;
}

@media (max-width: 600px), (max-width: 950px) and (max-height: 600px) and (pointer: coarse) {
    body {
        height: 100svh;
        min-height: 100svh;
        padding: 0;
        box-sizing: border-box;
    }

    .wrapper {
        width: min(90vw, calc((90svh - 100px) * 366 / 506));
        transform: none;
    }

    .header {
        width: 100%;
        margin-bottom: 12px;
        text-align: center;
    }

    .header p {
        font-size: clamp(28px, 8vw, 40px);
        letter-spacing: -1.5px;
        white-space: nowrap;
    }

    .links {
        width: min(82%, 240px);
        margin-inline: auto;
        padding-top: 8px;
    }

    .links .link-icon svg {
        height: 24px;
    }

    .ipod {
        width: 100%;
    }

    .polaroid,
    .audio-controls {
        display: none;
    }
}
