:root {
  --ink: #0c0c0b;
  --panel: #141412;
  --panel-2: #191917;
  --line: #34342f;
  --text: #f4f1e9;
  --muted: #aaa69d;
  --gold: #d7b334;
  --gold-soft: #f0dc8a;
  --paper: #ffffff;
  --paper-warm: #fffaf0;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 83% 18%, rgb(215 179 52 / 0.09), transparent 29%),
    radial-gradient(circle at 10% 56%, rgb(215 179 52 / 0.045), transparent 24%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 0 28px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  right: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--gold);
  color: #17130a;
  font-size: 12px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 4px solid var(--gold);
  border-bottom: 1px solid #292925;
}

.site-header p,
.site-footer span {
  margin: 0;
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand-lockup {
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d5d2cb;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.brand-lockup img {
  filter: drop-shadow(0 0 10px rgb(255 255 255 / 0.11));
}

.header-meta {
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-meta i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgb(215 179 52 / 0.09);
}

.brand-lockup img {
  display: block;
  object-fit: contain;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  align-items: end;
  gap: clamp(42px, 7vw, 96px);
  padding: clamp(60px, 8vw, 96px) 0 54px;
}

.hero-copy {
  text-align: right;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.eyebrow span {
  direction: ltr;
  display: inline-flex;
  margin-left: 8px;
  padding: 5px 8px;
  border: 1px solid rgb(215 179 52 / 0.34);
  border-radius: 999px;
  color: var(--gold-soft);
  font-family: Arial, sans-serif;
  letter-spacing: 0.08em;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  font-size: clamp(46px, 6.4vw, 78px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.hero h1 em {
  color: var(--gold-soft);
  font-style: normal;
  font-weight: 500;
}

.hero-description {
  max-width: 620px;
  margin: 18px 0 0 auto;
  color: #bcb8ae;
  font-size: 16px;
  line-height: 1.9;
}

.hero-meta {
  direction: ltr;
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: #858179;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
}

.search-panel {
  position: relative;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #191917, #111110 72%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.055), 0 24px 80px rgb(0 0 0 / 0.22);
}

.search-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 28px;
  width: 72px;
  height: 2px;
  background: var(--gold);
}

.search-heading {
  margin-bottom: 25px;
  padding-bottom: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2d2d29;
}

.search-heading span {
  color: #7d796f;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.search-heading strong {
  color: var(--gold-soft);
  font-size: 13px;
}

.search-panel label {
  display: block;
  color: #f7f3ea;
  font-size: 15px;
  font-weight: 700;
}

.search-panel > p {
  margin: 6px 0 15px;
  color: #b7b2a8;
  font-size: 12px;
  line-height: 1.7;
}

.input-row {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.input-row input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #44413a;
  border-radius: var(--radius);
  outline: none;
  background: #0d0d0d;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-row input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(215 179 52 / 0.18);
}

.input-row input[aria-invalid="true"] {
  border-color: #d88b75;
}

.input-row button,
.result-toolbar button {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--gold);
  color: #17130a;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 150ms ease, background-color 150ms ease;
}

.input-row button:hover,
.result-toolbar .download-button:hover {
  background: #e2c247;
}

.result-toolbar .print-button:hover {
  background: rgb(215 179 52 / 0.09);
}

.input-row button:active,
.result-toolbar button:active {
  transform: translateY(1px);
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.search-panel .form-error {
  min-height: 23px;
  margin: 10px 0 0;
  color: #efaa95;
  font-size: 12px;
  font-weight: 600;
}

.search-panel .privacy-note {
  margin: 7px 0 0;
  padding-top: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #282824;
  color: #817d75;
  font-size: 10px;
}

.privacy-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
}

.process-strip {
  direction: rtl;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  border-block: 1px solid #292925;
}

.process-strip li {
  min-height: 94px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-left: 1px solid #292925;
}

.process-strip li:last-child {
  border-left: 0;
}

.process-strip > li > span {
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.process-strip div {
  display: grid;
  gap: 4px;
}

.process-strip strong {
  color: #eae6dc;
  font-size: 12px;
}

.process-strip small {
  color: #89857d;
  font-size: 10px;
  line-height: 1.6;
}

.result-section {
  min-height: 390px;
  padding: 30px 0 42px;
  border-top: 0;
}

.empty-state,
.ticket-skeleton {
  width: min(100%, 820px);
  min-height: 286px;
  margin: 22px auto 0;
  border: 1px solid #303030;
  border-radius: var(--radius);
  background: var(--panel);
}

.empty-state {
  direction: ltr;
  display: grid;
  grid-template-columns: auto 64px auto;
  align-content: center;
  justify-content: center;
  align-items: center;
  column-gap: 22px;
  color: #4f4b41;
  font-family: Arial, sans-serif;
}

.empty-state > span {
  font-size: clamp(36px, 7vw, 62px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.empty-plane {
  width: 46px;
  height: 28px;
  color: #6f6127;
  font-size: 33px;
  text-align: center;
}

.empty-plane .plane-mark {
  width: 46px;
  height: 28px;
}

.empty-state p {
  grid-column: 1 / -1;
  margin: 20px 0 0;
  color: #9f9a90;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  text-align: center;
}

.ticket-skeleton {
  position: relative;
  overflow: hidden;
}

.ticket-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgb(255 255 255 / 0.045) 48%, transparent 76%);
  transform: translateX(-100%);
}

@media (prefers-reduced-motion: no-preference) {
  .ticket-skeleton::after {
    animation: skeleton-shift 1.2s ease-in-out infinite;
  }

  .ticket-result {
    animation: ticket-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes skeleton-shift {
  to { transform: translateX(100%); }
}

@keyframes ticket-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.ticket-result {
  width: min(100%, 930px);
  margin: 0 auto;
}

.result-toolbar {
  width: min(100%, 820px);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.result-copy {
  display: grid;
  gap: 4px;
}

.result-toolbar strong {
  color: #f1ede4;
  font-size: 14px;
}

.result-copy > span {
  color: #aaa59a;
  font-size: 12px;
}

.result-toolbar button {
  min-height: 42px;
  padding-inline: 16px;
}

.result-actions {
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.result-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.result-toolbar .download-button {
  background: var(--gold);
  color: #17130a;
}

.result-toolbar .print-button {
  background: transparent;
  color: var(--gold-soft);
}

.result-copy .success-mark {
  width: fit-content;
  margin-bottom: 2px;
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.ticket-scroll {
  direction: ltr;
  width: 100%;
  overflow-x: auto;
  padding: 0 0 14px;
  scrollbar-color: #5e5122 #171717;
}

.ticket {
  direction: ltr;
  width: 820px;
  height: 333.125px;
  min-height: 0;
  aspect-ratio: 32 / 13;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 188px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  color: #171717;
  box-shadow: 0 22px 60px rgb(0 0 0 / 0.42);
  font-family: Arial, Tahoma, sans-serif;
}

.ticket-side {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  background: var(--gold);
  color: #ffffff;
}

.side-cell {
  display: grid;
  align-content: center;
  justify-items: center;
  border-bottom: 1px solid #e5c958;
  text-align: center;
}

.side-cell-last {
  border-bottom: 0;
}

.side-cell span,
.passenger-block > span,
.ticket-facts dt,
.route-row span,
.stub-passenger span,
.stub-facts dt,
.stub-route span,
.stub-ticket span {
  color: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.side-cell strong {
  margin-top: 7px;
  font-size: 21px;
}

.ticket-main {
  min-width: 0;
  padding: 0 18px 10px;
  display: grid;
  grid-template-rows: 48px 78px 48px 1fr 18px;
}

.ticket-head {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eadca7;
}

.ticket-head strong {
  color: #9a7415;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.ticket-head span {
  color: #606060;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.passenger-block {
  min-height: 0;
  padding-top: 8px;
  text-align: left;
}

.passenger-block > span,
.ticket-facts dt,
.route-row span,
.stub-passenger span,
.stub-facts dt,
.stub-route span,
.stub-ticket span {
  color: #727272;
}

.passenger-block h2 {
  margin: 2px 0 0;
  overflow: hidden;
  color: #111111;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passenger-block p {
  direction: rtl;
  margin: 3px 0 0;
  color: #606060;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 7px;
  line-height: 1.4;
  text-align: left;
}

.ticket-facts {
  min-height: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 25% 35% 40%;
  align-items: center;
  border-bottom: 1px dashed #c9b56a;
}

.ticket-facts div,
.stub-facts div {
  display: grid;
  gap: 4px;
}

.ticket-facts dd,
.stub-facts dd {
  margin: 0;
  color: #111111;
  font-size: 12px;
  font-weight: 700;
}

.route-row {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 46px 1fr 88px;
  align-items: center;
  gap: 6px;
}

.route-row > div {
  display: grid;
  justify-items: start;
}

.route-row strong {
  color: var(--gold);
  font-size: 31px;
  line-height: 1;
}

.route-row small {
  margin-top: 4px;
  color: #555555;
  font-size: 8px;
}

.plane-mark {
  width: 38px;
  height: 24px;
  color: var(--gold);
}

.ticket-qr {
  display: block;
  width: 92px;
  height: 92px;
  border: 1px solid #eadca7;
  background: #ffffff;
}

.ticket-location {
  direction: rtl;
  margin: 0;
  color: #606060;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 8px;
  text-align: right;
}

.ticket-location b {
  color: #111111;
}

.ticket-location i::before {
  content: "|";
  padding: 0 6px;
  color: var(--gold);
  font-style: normal;
}

.ticket-stub {
  display: grid;
  grid-template-rows: 55px 78px 48px 68px 60px 1fr;
  border-left: 2px dashed #bfa75a;
  background: var(--paper-warm);
}

.ticket-stub > header {
  display: grid;
  align-content: center;
  justify-items: center;
  border-bottom: 1px solid #e5d28b;
  background: #fff3c4;
}

.ticket-stub > header strong {
  color: #9a7415;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.ticket-stub > header span {
  margin-top: 4px;
  color: #4c4c4c;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.stub-passenger {
  display: grid;
  align-content: center;
  padding: 0 12px;
  text-align: left;
}

.stub-passenger b {
  margin-top: 4px;
  overflow: hidden;
  color: #111111;
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stub-passenger small {
  direction: rtl;
  margin-top: 3px;
  overflow: hidden;
  color: #5f5f5f;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 6px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stub-facts,
.stub-route {
  margin: 0;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.stub-facts > div:last-child,
.stub-route > div:last-child {
  justify-items: end;
}

.stub-route {
  grid-template-columns: 1fr 42px 1fr;
}

.stub-route div {
  display: grid;
}

.stub-route b {
  color: var(--gold);
  font-size: 23px;
}

.stub-ticket {
  display: grid;
  align-content: center;
  justify-items: center;
  border-top: 1px dashed #c9b56a;
}

.stub-ticket b {
  margin-top: 4px;
  color: #111111;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.stub-ticket small {
  margin-top: 3px;
  color: #666666;
  font-size: 7px;
}

.ticket-stub > footer {
  display: grid;
  align-content: center;
  justify-content: center;
  background: var(--gold);
  color: #ffffff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.mobile-hint,
.mobile-qr {
  display: none;
}

.site-footer {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #262626;
}

.site-footer p {
  margin: 0;
  color: #aaa59a;
  font-size: 12px;
}

@media (max-width: 900px) {
  main {
    width: min(calc(100% - 28px), 760px);
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 30px;
    padding: 48px 0 42px;
  }

  .hero h1 {
    font-size: clamp(40px, 10vw, 58px);
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 66px;
  }

  .header-meta {
    display: none;
  }

  .brand-lockup {
    width: auto;
  }

  .hero {
    padding-top: 38px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-description {
    font-size: 14px;
  }

  .hero-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .search-panel {
    padding: 20px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .input-row button {
    width: 100%;
  }

  .process-strip {
    grid-template-columns: 1fr;
  }

  .process-strip li {
    min-height: 72px;
    padding: 14px 8px;
    border-left: 0;
    border-bottom: 1px solid #292925;
  }

  .process-strip li:last-child {
    border-bottom: 0;
  }

  .result-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .result-actions {
    width: 100%;
  }

  .result-actions button {
    flex: 1;
    padding-inline: 12px;
  }

  .mobile-hint {
    display: block;
    width: min(100%, 820px);
    margin: 0 auto 10px;
    color: #aaa59a;
    font-size: 11px;
  }

  .ticket-scroll {
    padding-bottom: 12px;
  }

  .ticket {
    margin: 0;
  }

  .mobile-qr {
    margin: 24px auto 0;
    padding: 22px;
    display: grid;
    justify-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
  }

  .mobile-qr img {
    border: 8px solid #ffffff;
    border-radius: 8px;
  }

  .mobile-qr strong {
    margin-top: 12px;
    color: #ffffff;
    font-family: Arial, sans-serif;
    letter-spacing: 0.08em;
  }

  .mobile-qr span {
    margin-top: 5px;
    color: #aaa59a;
    font-size: 11px;
  }

  .site-footer {
    padding: 20px 0;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media print {
  @page {
    size: landscape;
    margin: 12mm;
  }

  body {
    background: #ffffff;
  }

  .site-header,
  .hero,
  .result-toolbar,
  .mobile-hint,
  .mobile-qr,
  .site-footer,
  .empty-state {
    display: none !important;
  }

  main,
  .result-section,
  .ticket-result,
  .ticket-scroll {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
  }

  .ticket {
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
