:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #000;
  color: #fff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: #000;
  overscroll-behavior-y: none;
}

button {
  color: inherit;
  font: inherit;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #000;
  overscroll-behavior: none;
}

.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 2;
  width: min(100%, 430px);
  height: 65px;
  padding: max(28px, env(safe-area-inset-top)) 20px 0;
  transform: translateX(-50%);
  background: #000;
}

.header-bar {
  display: grid;
  grid-template-columns: 45px 1fr 45px;
  align-items: center;
  height: 37px;
  transform: translateY(-5px);
}

.header-bar h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(17px, 4.4vw, 20px);
  font-weight: 580;
  letter-spacing: -1px;
  white-space: nowrap;
}

.close-button,
.more-button {
  position: relative;
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.close-button {
  background: #202125;
}

.close-button span {
  position: absolute;
  top: 12px;
  left: 7px;
  width: 15px;
  height: 3px;
  border-radius: 5px;
  background: #a4a4ab;
  transform: rotate(45deg);
}

.close-button span + span {
  transform: rotate(-45deg);
}

.more-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: translateX(10px);
}

.more-button span {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 50%;
  background: #f0eef1;
}

.ticket {
  position: relative;
  margin-top: 65px;
  height: calc(100dvh - 65px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  color: #050505;
  background: #fff;
}

.ticket::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: #fff url("hintergrund.png") center top / 100% auto repeat-y;
  content: "";
}

.ticket-content {
  position: relative;
  z-index: 1;
  min-height: 880px;
  padding: 37px 28px 130px;
}

.wienerlinien-logo {
  display: block;
  width: min(48%, 205px);
  height: auto;
  margin: 0 auto 18px 7px;
}

.clock {
  position: absolute;
  top: 29px;
  right: 26px;
  width: 50.4px;
  height: 50.4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
}

.clock-tick {
  position: absolute;
  top: 3.15px;
  left: 23.7px;
  width: 3px;
  height: 4px;
  border-radius: 1px;
  background: #000;
  transform-origin: 1.5px 22.05px;
}

.clock-tick-1 { transform: rotate(0deg); }
.clock-tick-2 { transform: rotate(30deg); }
.clock-tick-3 { transform: rotate(60deg); }
.clock-tick-4 { transform: rotate(90deg); }
.clock-tick-5 { transform: rotate(120deg); }
.clock-tick-6 { transform: rotate(150deg); }
.clock-tick-7 { transform: rotate(180deg); }
.clock-tick-8 { transform: rotate(210deg); }
.clock-tick-9 { transform: rotate(240deg); }
.clock-tick-10 { transform: rotate(270deg); }
.clock-tick-11 { transform: rotate(300deg); }
.clock-tick-12 { transform: rotate(330deg); }

.clock::after {
  display: none;
}

.clock-hand {
  position: absolute;
  z-index: 3;
  top: 24.15px;
  left: 25.2px;
  width: 18.9px;
  height: 3px;
  border-radius: 3px;
  background: #000;
  transform-origin: left center;
}

.clock-hand-hour { width: 14.65px; }
.clock-hand-minute { width: 19.9px; height: 2.1px; }
.clock-hand-second {
  width: 22px;
  height: 1.05px;
  background: #000;
}

.ticket h2 {
  margin: 0 0 11px;
  font-size: clamp(22px, 5.5vw, 26px);
  line-height: 1.05;
  letter-spacing: -0.5px;
  font-weight: 550;
  white-space: nowrap;
}

.qr-code {
  display: block;
  width: min(260px, calc(100vw - 56px));
  height: auto;
  margin: 0 auto 48px;
}

.ticket-details {
  margin: 0;
  transform: translateY(-20px);
}

.ticket-details div {
  margin-bottom: 22px;
}

.ticket-details dt,
.ticket-details dd {
  margin: 0;
}

.ticket-details dt {
  font-size: clamp(14px, 3.7vw, 18px);
  line-height: 1.05;
}

.ticket-details dd {
  margin-top: 6px;
  font-size: clamp(17px, 4.5vw, 22px);
  font-weight: 550;
  line-height: 1.08;
}

.watermark {
  position: absolute;
  top: 0;
  right: 24px;
  width: 82px;
  height: 82px;
  object-fit: contain;
  opacity: .75;
}

.profile-picture {
  display: block;
  width: 107px;
  height: 121px;
  margin-top: -33px;
  object-fit: cover;
}

.ticket-logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 25px;
}

.number-block {
  display: block;
  width: min(58%, 154px);
  height: auto;
}

.vor-logo {
  display: block;
  width: 85px;
  height: auto;
}

.ticket-notes {
  width: calc(100% + 7px);
  margin: 40px 0 0 -3.5px;
  font-size: 16px;
  line-height: 1.3;
}

.ticket-notes p {
  margin: 0;
}

.ticket-note-strong {
  font-weight: 700;
}

.ticket-note-strong + p {
  margin-top: 10px;
  font-weight: 400;
}

.bottom-bar {
  position: fixed;
  z-index: 3;
  bottom: 0;
  left: 50%;
  display: flex;
  justify-content: center;
  width: min(100%, 430px);
  height: 65px;
  padding-bottom: 0;
  transform: translateX(-50%);
  background: rgba(57, 57, 57, .82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.active-page {
  align-self: flex-start;
  width: 9px;
  height: 9px;
  margin-top: 12px;
  padding: 0;
  flex: 0 0 9px;
  border: 0;
  border-radius: 50%;
  background: #f44355;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  z-index: 5;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: #202124;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.profile-editor {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .7);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.profile-editor.open {
  opacity: 1;
  pointer-events: auto;
}

.profile-editor-card {
  width: min(100%, 340px);
  padding: 22px;
  border-radius: 16px;
  color: #111;
  background: #fff;
  box-shadow: 0 15px 40px rgba(0, 0, 0, .4);
}

.profile-editor-card h2 {
  margin: 0;
  font-size: 22px;
}

.profile-editor-hint {
  margin: 5px 0 18px;
  color: #5f6368;
  font-size: 13px;
}

.profile-editor-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 700;
}

.profile-editor-name {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #b9b9b9;
  border-radius: 8px;
  color: #111;
  background: #fff;
  font: inherit;
}

.profile-preview-frame {
  width: 107px;
  height: 121px;
  margin: 0 auto 10px;
  overflow: hidden;
  background: #eee;
}

.profile-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-editor-file {
  display: block;
  width: 100%;
  color: #333;
  font-size: 13px;
}

.profile-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.profile-editor-actions button {
  padding: 9px 13px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.profile-reset {
  color: #222;
  background: #e8e8e8;
}

.profile-save {
  color: #fff;
  background: #111;
}

@media (min-width: 600px) {
  body {
    display: grid;
    place-items: start center;
    padding: 20px 0;
    background: #171717;
  }

  .app-shell {
    min-height: calc(100dvh - 40px);
    border-radius: 24px;
    box-shadow: 0 16px 70px rgba(0, 0, 0, .6);
  }
}
