/* Nokta'nın Kasabası · gözlem ortamı (oyun.css'in üstüne) */
html, body { height: 100%; overflow: hidden; }
body { background: #efe6d2; }
#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#world.grabbing { cursor: grabbing; }
.ui { position: fixed; z-index: 5; }
.hide-ui .ui { display: none !important; }

/* üst çubuk */
.top { top: 0; left: 0; right: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; background: rgba(255,250,240,.9); padding: 6px 12px 6px 6px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(23,20,17,.12), 0 10px 22px -16px rgba(60,40,10,.7); }
.brand a { font-family: var(--mono); font-size: 12px; text-decoration: none; padding: 6px 8px; border-radius: 6px; border: 1.5px solid var(--ink); }
.brand a:hover { background: var(--ink); color: var(--paper); }
.brand h1 { font-family: var(--brush); font-weight: 400; font-size: 27px; margin: 0; line-height: 1; white-space: nowrap; }
.stations { display: flex; gap: 6px; }
.st-btn { font-family: var(--brush); font-size: 20px; line-height: 1; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--ink); background: rgba(255,250,240,.92); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: transform .2s; }
.st-btn:hover { transform: translateY(-2px); }
.st-btn b { font-family: var(--mono); font-size: 12px; font-weight: 500; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid currentColor; }
.st-btn[aria-current="true"] { background: var(--ink); color: var(--paper); }
.st-btn.done b { background: var(--amber); border-color: var(--amber-deep); color: var(--ink); }
.tools-r { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chip-btn { font-family: var(--mono); font-size: 12.5px; padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--ink); background: rgba(255,250,240,.92); color: var(--ink); cursor: pointer; white-space: nowrap; }
.chip-btn:hover { background: var(--ink); color: var(--paper); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--ink); }
.seg .chip-btn { border: 0; border-radius: 0; }
.seg .chip-btn + .chip-btn { border-left: 1.5px solid var(--ink); }
.btn:focus-visible, .chip-btn:focus-visible, .st-btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* istasyon kartı */
.scard { left: 14px; bottom: 14px; width: min(410px, calc(100vw - 28px)); max-height: calc(100vh - 96px); overflow: auto; background: rgba(255,250,240,.96); border-radius: 14px; padding: 14px 16px 16px; box-shadow: 0 0 0 1.5px var(--ink), 0 22px 44px -26px rgba(40,25,5,.8); }
.scard .head { display: flex; align-items: center; gap: 10px; }
.scard .head img { width: 54px; height: auto; flex: none; transform-origin: 50% 92%; }
.scard .head img.hop { animation: hop .9s ease-in-out 1; }
.scard h2 { font-family: var(--brush); font-weight: 400; font-size: 30px; line-height: 1; margin: 2px 0 0; }
.scard .code { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--amber-deep); background: var(--amber-wash); padding: 2px 7px; border-radius: 4px; }
.scard .fold { margin-left: auto; align-self: flex-start; }
.scard p { margin: 8px 0; font-size: 16px; }
.scard .q { font-family: var(--brush); font-size: 23px; line-height: 1.15; margin: 10px 0 6px; }
.scard .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-deep); display: block; margin: 12px 0 6px; }
.scard.min .body { display: none; }
.scard.ipucu { width: auto; max-width: min(360px, calc(100vw - 28px)); padding: 8px 14px; } /* istasyon seçilmeden önce: tek satır ipucu */
.scard.ipucu p { margin: 0; font-size: 15px; }
.scard .minrow { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.scard .minrow .small { font-family: var(--mono); font-size: 12px; color: var(--amber-deep); }
.scard.min .head h2 { font-size: 24px; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.tasks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 15px; align-items: start; }
.tasks li i { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--ink); margin-top: 2px; display: grid; place-items: center; font-style: normal; font-size: 13px; }
.tasks li.ok { color: var(--ink-soft); }
.tasks li.ok i { background: var(--amber); border-color: var(--amber-deep); }
.tasks li.ok i::after { content: "✓"; color: var(--ink); }
.picked { font-size: 15px; color: var(--ink-soft); }
.picked b { color: var(--ink); }
.explain { border-left: 3px solid var(--amber); padding: 4px 0 4px 12px; font-size: 15.5px; }
.row2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* yakından bak */
.zoom { position: fixed; inset: 0; z-index: 20; background: rgba(18,15,12,.55); display: none; place-items: start center; padding: max(12px, 4vh) 12px 12px; overflow: auto; }
.zoom.open { display: grid; }
.zbox { background: var(--paper); border-radius: 14px; width: min(1220px, 100%); max-height: calc(100vh - 24px); overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; padding: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.zbox .board { border-radius: 10px; align-self: start; }
.zbox { align-items: start; min-height: min(640px, calc(100vh - 24px)); }
.zside { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.zside h3 { font-family: var(--brush); font-weight: 400; font-size: 30px; margin: 0; line-height: 1; }
.zside .hint { background: var(--sheet); border-radius: 10px; padding: 10px 12px; box-shadow: 0 0 0 1.5px var(--ink); font-size: 15.5px; min-height: 64px; }
.zside .hint.pop { animation: pop .35s cubic-bezier(.2,.8,.2,1); }
.mini-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; }
.mini-table th, .mini-table td { padding: 4px 5px; border-bottom: 1px solid var(--ink-faint); text-align: center; }
.mini-table th { color: var(--amber-deep); font-weight: 500; }

/* defter, öğretmen */
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(18,15,12,.55); display: none; place-items: center; padding: 12px; }
.sheet.open { display: grid; }
.sbox { background: var(--paper); border-radius: 14px; width: min(760px, 100%); max-height: calc(100vh - 24px); overflow: auto; padding: 20px 22px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.sbox h2 { font-family: var(--brush); font-weight: 400; font-size: 40px; margin: 0 0 6px; line-height: 1; }
.sbox h3 { font-family: var(--brush); font-weight: 400; font-size: 27px; margin: 18px 0 4px; }
.sbox ul { margin: 6px 0; padding-left: 20px; }
.sbox textarea, .sbox input[type=text] { width: 100%; font-family: var(--serif); font-size: 16px; padding: 8px 10px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--sheet); color: var(--ink); }
.sbox textarea { min-height: 70px; resize: vertical; }
.sbox .close { float: right; }

/* tanıtım */
.coach-hl { position: fixed; z-index: 40; border: 3px solid var(--amber); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(18,15,12,.45); pointer-events: none; transition: all .35s cubic-bezier(.2,.8,.2,1); }
.coach { position: fixed; z-index: 41; width: min(380px, calc(100vw - 24px)); background: var(--sheet); border-radius: 14px; padding: 14px 16px; box-shadow: 0 0 0 1.8px var(--ink), 0 20px 40px -20px rgba(0,0,0,.6); transition: top .35s, left .35s; }
.coach .who { display: flex; gap: 10px; align-items: center; }
.coach img { width: 52px; }
.coach p { margin: 6px 0 10px; font-size: 16.5px; }
.coach .row2 { justify-content: space-between; align-items: center; margin-top: 4px; }
.coach .n { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

/* sunum modu, bildirim */
.present { top: 74px; left: 50%; transform: translateX(-50%); width: min(1100px, calc(100vw - 32px)); text-align: center; background: rgba(255,250,240,.95); border-radius: 16px; padding: 16px 24px; box-shadow: 0 0 0 2px var(--ink); display: none; }
.present.on { display: block; }
/* geniş ekranda (tahta) sunum bandı istasyon kartının altında kalmasın: kartın sağındaki alanda ortalanır; kart küçültülünce ekranda ortalanır */
@media (min-width: 901px) {
  .present { left: 438px; right: 16px; width: auto; max-width: 1100px; margin: 0 auto; transform: none; }
  .present:has(~ .scard.min) { left: 16px; }
}
.present small { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-deep); }
.present div { font-family: var(--brush); font-size: clamp(34px, 5.4vw, 66px); line-height: 1.05; margin-top: 6px; }
/* "Sence?" sınıf dağılımı: kartta küçük, sunumda (tahtada) büyük */
.sence-dag { display: grid; gap: 6px; margin: 6px 0 4px; }
.sence-dag:empty { display: none; }
.sd-satir { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 44px; gap: 8px; align-items: center; font-size: 14px; line-height: 1.25; }
.sd-satir em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--amber-deep); }
.sd-cubuk { height: 10px; border-radius: 5px; background: var(--ink-faint); overflow: hidden; }
.sd-cubuk i { display: block; height: 100%; background: var(--amber); opacity: .5; }
.sd-satir.ben .sd-cubuk i { opacity: 1; }
.sd-satir b { font-family: var(--mono); font-weight: 500; font-size: 12.5px; text-align: right; }
.sd-ust { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sd-ust select { font: inherit; padding: 4px 8px; border-radius: 8px; border: 1.5px solid var(--ink); background: #fff; }
.present .sence-dag { max-width: 860px; margin: 14px auto 2px; font-family: var(--serif); font-size: 20px; text-align: left; }
.present .sd-satir { margin: 0; font-family: var(--brush); font-size: clamp(20px, 2.6vw, 32px); line-height: 1.1; grid-template-columns: minmax(0, 1.5fr) minmax(90px, 1fr) 80px; }
.present .sd-cubuk { height: 18px; border-radius: 9px; }
.present .sd-satir b { font-size: clamp(16px, 2vw, 24px); }
.toast { left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: 15px; transition: all .3s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%); }
.zip-btn { right: 18px; bottom: 18px; width: 68px; height: 68px; border-radius: 50%; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 12px/1 var(--mono); display: grid; place-content: center; gap: 3px; cursor: pointer; box-shadow: 0 10px 22px -12px rgba(60,40,10,.8); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.zip-btn span { font-size: 26px; line-height: 1; color: var(--amber); }
.zip-btn:active { transform: translateY(2px); }
.zip-btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
@media (max-width: 900px) { .zip-btn { right: 10px; bottom: auto; top: 40%; width: 58px; height: 58px; } }
/* dokunmatik ekranda yürüme düğmeleri (fare ve klavyede gizli) */
.yuru-grup { display: none; right: 96px; bottom: 22px; gap: 8px; }
.yuru-btn { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 22px; line-height: 1; display: grid; place-content: center; cursor: pointer; box-shadow: 0 10px 22px -12px rgba(60,40,10,.8); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.yuru-btn.bas { background: var(--ink); color: var(--amber); transform: translateY(2px); }
@media (hover: none), (pointer: coarse) { .yuru-grup { display: flex; } }
@media (max-width: 900px) { .yuru-grup { right: 10px; bottom: auto; top: calc(40% + 66px); } .yuru-btn { width: 52px; height: 52px; } }
.toast b { color: var(--amber); }

#menuBtn { display: none; }
@media (max-width: 430px) { .stations { gap: 4px; } .st-btn { padding: 6px 7px !important; } }
@media (max-width: 700px) {
  #menuBtn { display: inline-block; }
  .tools-r:not(.open) > :not(#menuBtn) { display: none; }
  .tools-r { margin-left: auto !important; }
  .tools-r.open { background: rgba(255,250,240,.95); padding: 8px; border-radius: 12px; box-shadow: 0 10px 22px -12px rgba(60,40,10,.6); }
}
@media (max-width: 1600px) { .st-btn:not([aria-current="true"]) span { display: none; } }
@media (max-width: 900px) {
  .zbox { grid-template-columns: 1fr; }
  .brand h1 { font-size: 22px; }
  .st-btn { font-size: 17px; padding: 7px 9px; }
  .st-btn span { display: none; }
  .tools-r { margin-left: 0; justify-content: flex-start; }
  .scard { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 46vh; }
  .scard.min { padding: 10px 12px; }
  .scard.min .head .nokta-cv { width: 40px !important; }
  .present.on ~ .scard { display: none; }
}

/* rehber: tek görev, açık yönerge */
.gbox { background: #fff6e2; border-radius: 12px; padding: 12px 14px; box-shadow: 0 0 0 2.5px var(--amber), 0 10px 22px -16px rgba(60,40,10,.6); }
.gbox .gstep { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-deep); display: block; margin-bottom: 4px; }
.gbox .gtext { font-size: 18px; line-height: 1.4; margin-bottom: 8px; }
.gbox.ok { background: #eef5e6; box-shadow: 0 0 0 2.5px #87a074; }
.gbox.ok .gstep { color: #4d6b3d; }
.gbox .gip { margin: 4px 0 8px; padding-left: 18px; font-size: 15px; color: var(--ink-soft); }
.gbox .gip li { margin: 3px 0; }
.zside .hint .who { font-family: var(--brush); font-weight: 400; font-size: 18px; color: var(--amber-deep); }
#zctl.dim { opacity: .4; pointer-events: none; }
.tasks li.now span { font-weight: 600; }
.tasks li.now i { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-wash); }
.scard .next { background: var(--amber-wash); border-radius: 8px; padding: 8px 10px; font-size: 15px; }
.nudge { animation: nudge 1.3s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,163,61,.0), 0 0 0 2px var(--amber); } 50% { box-shadow: 0 0 0 7px rgba(232,163,61,.35), 0 0 0 2px var(--amber); } }
@media (prefers-reduced-motion: reduce) { .nudge { animation: none; box-shadow: 0 0 0 3px var(--amber); } }

/* sade görünüm: görev noktaları (dolu: bitti, halkalı: şimdiki), kartta incele satırı; öğrenciye öğretmen düğmeleri görünmez */
.gnokta { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; margin-left: 6px; }
.gnokta i { display: block; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; }
.gnokta i.ok { background: var(--amber); border-color: var(--amber-deep); }
.gnokta i.simdi { box-shadow: 0 0 0 3px var(--amber-wash); border-color: var(--amber-deep); }
.scard .zoomrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.scard .minrow .gnokta { margin-left: 0; }
.ogrenci-gorunum #havaBtns, .ogrenci-gorunum #ogretmenBtn, .ogrenci-gorunum #sunumBtn { display: none !important; }
/* seçmeli (⭐ ek) görevler: küçük eşkenar dörtgen nokta, kesik çerçeveli görev kutusu */
.gnokta i.ek { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); border-style: dashed; }
.gnokta i.ek.ok { border-style: solid; }
.gbox.ek { background: var(--paper, #fffaf0); box-shadow: none; outline: 2.5px dashed var(--amber); outline-offset: -1px; }
#zside .gbox .row2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#zside .gbox #gEk { margin-top: 8px; }
