:root {
  --green: #0b6b37; --green-d: #06401f; --red: #d81e2c; --cream: #fbf8f1;
  --ink: #16201a; --muted: #5d665f; --line: #e3e0d6; --glass: rgba(255, 255, 255, 0.92);
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; font-family: var(--font); color: var(--ink); background: #9ec3dd; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 10px; padding: 9px 14px; }
button.primary { background: var(--red); color: #fff; font-weight: 700; box-shadow: 0 2px 0 #9e1220; }
button.primary:hover { filter: brightness(1.07); }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.ghost:hover { background: rgba(0,0,0,.04); }
button.ghost.light { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(6,64,31,.55); backdrop-filter: blur(6px); }
button.ghost.light:hover { background: rgba(6,64,31,.8); }

/* Üst bar */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; background: linear-gradient(90deg, var(--green-d), var(--green)); color: #fff; z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 14px, var(--green) 14px 28px); }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { height: 42px; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 17px; letter-spacing: .2px; }
.brand small { font-size: 12.5px; opacity: .85; text-transform: uppercase; letter-spacing: 1.5px; }
.topbar nav { display: flex; gap: 8px; }
.topbar nav .ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.topbar nav .ghost:hover { background: rgba(255,255,255,.12); }

/* Sol panel */
.panel { position: fixed; top: 76px; left: 16px; bottom: 56px; width: 380px; background: var(--glass); backdrop-filter: blur(10px);
  border-radius: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.25); z-index: 5; display: flex; flex-direction: column; overflow: hidden; }
.steps { display: flex; list-style: none; margin: 0; padding: 12px 14px 0; gap: 6px; }
.steps li { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 7px 0; border-bottom: 3px solid var(--line); }
.steps li.active { color: var(--green); border-color: var(--green); }
.steps li.done { color: var(--ink); border-color: #8fbf9f; }
.step { padding: 14px 18px 18px; overflow-y: auto; flex: 1; }
.step h2 { margin: 6px 0 6px; font-size: 21px; }
.lead { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.back { background: none; padding: 4px 0; color: var(--green); font-weight: 600; }
.cards { display: grid; gap: 9px; }
.card { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 3px;
  transition: transform .12s, box-shadow .12s, border-color .12s; }
.card:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.08); border-color: #b9d7c3; }
.card .t { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 15.5px; }
.card .t em { font-style: normal; font-size: 13px; color: var(--green); font-weight: 700; }
.card .d { font-size: 13px; color: var(--muted); }
.card .bar { height: 5px; background: #eee; border-radius: 3px; overflow: hidden; margin-top: 5px; }
.card .bar i { display: block; height: 100%; background: var(--red); }
.stat { font-size: 12.5px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 6px; text-align: center; }
.chip:hover { border-color: var(--green); }
.chip b { display: block; font-size: 16px; }
.chip small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.chip.closed { opacity: .55; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.sw.free { background: #7fdc8f; } .sw.sold { background: #b9b9b4; } .sw.sel { background: #ffc400; outline: 2px solid #111; }
.seatmap-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; overflow: auto; max-height: 46vh; }
.seatmap { display: flex; flex-direction: column; gap: 3px; align-items: center; min-width: max-content; }
.srow { display: flex; gap: 2px; align-items: center; }
.srow .rl { width: 22px; font-size: 10px; color: var(--muted); text-align: right; margin-right: 4px; }
.s { width: var(--sz, 11px); height: var(--sz, 11px); padding: 0; border-radius: 3px; background: #7fdc8f; }
.s:hover { outline: 2px solid #111; }
.s.sold { background: #c9c9c4; cursor: not-allowed; }
.s.sel { background: #ffc400; outline: 2px solid #111; }
.s.sold.sel { background: #c9c9c4; }
.pitchside { text-align: center; font-size: 11px; letter-spacing: 3px; color: var(--green); font-weight: 700; margin-top: 8px; }
.seatinfo { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.seatinfo .k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seatinfo .k div { background: var(--cream); border-radius: 8px; padding: 6px 8px; }
.seatinfo .k small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .5px; }
.seatinfo .k b { font-size: 18px; }
.seatinfo .row2 { display: flex; justify-content: space-between; font-size: 13.5px; }
.seatinfo .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Koltuk görünümü alt bar */
.seatbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 64px; z-index: 6; display: flex; gap: 22px; align-items: center;
  background: rgba(6,64,31,.88); color: #fff; padding: 12px 16px 12px 20px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); backdrop-filter: blur(8px); }
.seatbar strong { display: block; font-size: 17px; }
.seatbar small { opacity: .8; font-size: 12.5px; }
.seatbar .actions { display: flex; gap: 8px; }
@media (min-width: 821px) { .seatbar { left: calc(50% + 198px); max-width: calc(100vw - 440px); } }
.hud { position: fixed; right: 16px; top: 78px; z-index: 5; display: flex; gap: 8px; }
.tooltip { position: fixed; pointer-events: none; z-index: 20; background: rgba(15,20,17,.9); color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; }
.loading { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #0b6b37, #052b15); color: #fff; font-weight: 600; transition: opacity .6s; }
.loading img { height: 110px; animation: pulse 1.4s ease-in-out infinite; }
.loading.gone { opacity: 0; pointer-events: none; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.disclaimer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; background: rgba(12,18,14,.82); color: #e9ece9; font-size: 12px;
  line-height: 1.4; padding: 8px 18px; text-align: center; backdrop-filter: blur(6px); }

/* Diyaloglar */
.dlg { border: 0; border-radius: 18px; padding: 0; max-width: min(680px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.dlg.wide { max-width: min(1180px, 96vw); }
.dlg::backdrop { background: rgba(5,20,10,.6); backdrop-filter: blur(3px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); margin: 0; }
.dlg-head h3 { margin: 0; font-size: 18px; }
.x { background: none; font-size: 26px; line-height: 1; padding: 0 6px; color: var(--muted); }
.dlg > p, .dlg > ol, .dlg > h4 { margin-left: 22px; margin-right: 22px; }
.dlg h4 { margin-bottom: 4px; }
.dlg p { font-size: 14px; line-height: 1.55; color: #333; }
.howto { padding-left: 20px; line-height: 1.6; font-size: 14.5px; }
.fine { font-size: 12px !important; color: var(--muted) !important; }
.ticket-body { padding: 18px; display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
#ticketCanvas { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 8px 26px rgba(0,0,0,.25); background: #eee; }
.ticket-form, .ticket-done { display: grid; gap: 12px; }
.ticket-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ticket-form input { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.ticket-form input:focus { outline: 2px solid #8fbf9f; border-color: var(--green); }
.price { display: flex; justify-content: space-between; align-items: baseline; background: var(--cream); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.price strong { font-size: 22px; color: var(--green-d); }
.ok { color: var(--green); font-weight: 700; margin: 0; }
.gallery { padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; max-height: 72vh; overflow: auto; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: 10px; display: block; }
.gallery figcaption { font-size: 12.5px; color: var(--muted); padding: 4px 2px; }

@media (max-width: 820px) {
  .panel { top: auto; left: 0; right: 0; bottom: 52px; width: auto; max-height: 52vh; border-radius: 18px 18px 0 0; }
  .brand strong { font-size: 14px; }
  .topbar nav .ghost { padding: 7px 9px; font-size: 13px; }
  .hud { top: 70px; right: 8px; gap: 6px; }
  .hud button { padding: 6px 9px; font-size: 12.5px; }
  .panel { max-height: 46vh; }
  .step h2 { font-size: 18px; }
  .brand img { height: 34px; }
  .topbar { height: 54px; padding: 0 10px; }
  .seatbar { bottom: 60px; flex-direction: column; align-items: stretch; width: calc(100% - 20px); gap: 10px; }
  .ticket-body { grid-template-columns: 1fr; }
  .disclaimer { font-size: 10.5px; padding: 6px 10px; }
}
