* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #425366 0%, #2a3642 100%);
    font-family: Arial, sans-serif;
    padding: 32px;
    color: #111;
}

.ticket {
    width: min(1500px, 96vw);
    margin: auto;
    background: #f3e3c3;
    border-radius: 35px;
    padding: 18px;
    position: relative;
    box-shadow: 0 30px 70px rgba(0,0,0,0.45);
}

.ticket::before,
.ticket::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 90px;
    height: 90px;
    background: #2a3642;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.ticket::before {
    left: -45px;
}

.ticket::after {
    right: -45px;
}

.ticket-inner {
    border: 3px dashed #1a1a1a;
    border-radius: 28px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 2fr 260px;
    background: #f3e3c3;
}

.main {
    padding: 45px 55px 30px;
}

.side {
    background: #ecd19b;
    border-left: 3px dashed #111;
    padding: 40px 25px;
    text-align: center;
    min-width: 260px;
}

.label {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #8a531d;
    text-transform: uppercase;
    margin-bottom: 18px;
}

h1 {
    font-size: clamp(52px, 7vw, 95px);
    line-height: 0.9;
    margin-bottom: 30px;
}

.subtitle {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.box {
    border: 2px solid #111;
    border-radius: 14px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.15);
}

.box small,
.timebox span,
.bottom-label {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: #8a531d;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.box strong {
    font-size: 28px;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 2px solid #111;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 22px;
}

.timebox {
    padding: 18px;
    text-align: center;
    border-right: 2px solid #111;
}

.timebox:last-child {
    border-right: none;
}

.timebox strong {
    display: block;
    font-size: clamp(34px, 5vw, 58px);
}

.login-form {
    display: grid;
    grid-template-columns: 1fr 1fr 240px;
    gap: 14px;
    margin-bottom: 20px;
}

input {
    height: 72px;
    border: 2px solid #111;
    border-radius: 12px;
    padding: 0 20px;
    font-size: 22px;
    background: #f9f2df;
    min-width: 0;
}

button {
    border: none;
    border-radius: 12px;
    background: #111;
    color: white;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
}

button:hover {
    background: #333;
}

.links {
    font-size: 22px;
    font-weight: 900;
}

.links a {
    color: #111;
}

.stamp {
    display: inline-block;
    border: 4px solid #111;
    padding: 12px 26px;
    font-size: 28px;
    font-weight: 900;
    transform: rotate(-7deg);
    margin-bottom: 70px;
}

.train {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    object-position: center;
    
    display: block;
    padding: 10px;
}

.side-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 3px;
    line-height: 1.35;
}

.star {
    font-size: 40px;
    margin: 24px 0;
}

.good {
    border-top: 2px solid #111;
    margin-top: 20px;
    padding-top: 18px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 3px;
}

.bottom {
    grid-column: 1 / 3;
    border-top: 3px dashed #111;
    display: grid;
    grid-template-columns: 360px 1fr 1fr 1fr;
}

.bottom-item {
    padding: 24px 28px;
    border-right: 2px dashed #111;
}

.bottom-item:last-child {
    border-right: none;
}

.barcode {
    font-size: 52px;
    letter-spacing: -5px;
    font-family: monospace;
    overflow: hidden;
    white-space: nowrap;
}

.bottom-value {
    font-size: 32px;
    font-weight: 900;
}

.error {
    color: darkred;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

/* Smartphone */
@media (max-width: 650px) {
    body {
        padding: 12px;
        align-items: flex-start;
    }

    .ticket {
        width: 100%;
        padding: 8px;
        border-radius: 24px;
    }

    .ticket::before,
    .ticket::after {
        display: none;
    }

    .ticket-inner {
        display: flex;
        flex-direction: column;
        border-radius: 18px;
        overflow: hidden;
    }

    .side {
        order: -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        border-left: none;
        border-bottom: 2px dashed #111;
        border-top: none;
        padding: 14px 16px;
        background: #ecd19b;
    }

    .stamp {
        margin: 0;
        font-size: 16px;
        padding: 7px 14px;
        border-width: 3px;
        transform: rotate(-6deg);
        white-space: nowrap;
    }

    .train {
        font-size: 34px;
        margin: 0;
    }

    .side-title {
        font-size: 13px;
        letter-spacing: 1.4px;
        line-height: 1.25;
        text-align: right;
    }

    .star,
    .good {
        display: none;
    }

    .main {
        padding: 24px 18px 20px;
    }

    .label {
        font-size: 11px;
        letter-spacing: 1.7px;
        line-height: 1.4;
    }

    h1 {
        font-size: 43px;
        margin: 14px 0 16px;
    }

    .subtitle {
        font-size: 15px;
        margin-bottom: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .box {
        padding: 12px 14px;
    }

    .box small {
        font-size: 11px;
    }

    .box strong {
        font-size: 24px;
    }

    .countdown {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 14px;
    }

    .timebox {
        padding: 12px 6px;
        border-right: 1px solid #111;
        border-bottom: 1px solid #111;
    }

    .timebox:nth-child(2),
    .timebox:nth-child(4) {
        border-right: none;
    }

    .timebox:nth-child(3),
    .timebox:nth-child(4) {
        border-bottom: none;
    }

    .timebox strong {
        font-size: 34px;
    }

    .timebox span {
        font-size: 10px;
    }

    .login-form {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 16px;
    }

    input,
    button {
        width: 100%;
        height: 54px;
        font-size: 17px;
    }

    button {
        grid-column: auto;
    }

    .links {
        font-size: 16px;
        margin-top: 8px;
    }

    .bottom {
        display: block;
        border-top: 2px dashed #111;
    }

    .bottom-item {
        padding: 14px 18px;
        border-right: none;
        border-bottom: 1px dashed #111;
    }

    .bottom-item:last-child {
        border-bottom: none;
    }

    .barcode {
        font-size: 30px;
        letter-spacing: -4px;
    }

    .bottom-label {
        font-size: 11px;
    }

    .bottom-value {
        font-size: 21px;
    }
}