[hidden] { display: none !important; }
:root {
  --kagit: #fbf6ea;
  --kagit2: #f3ead6;
  --murekkep: #3b2f22;
  --soluk: #8a7a63;
  --vurgu: #c8553d;
  --yesil: #5f8f3a;
  --golge: 0 6px 22px rgba(40, 28, 12, 0.22);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #a8c88a; font-family: 'Nunito', system-ui, sans-serif; color: var(--murekkep); -webkit-user-select: none; user-select: none; }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(30, 20, 5, 0.28) 100%); }
#sahne { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
button { font: inherit; cursor: pointer; }
.soluk { color: var(--soluk); }

/* Yükleme */
#yukleniyor { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #f7e7c4, #d9b77d); z-index: 50; transition: opacity .6s; }
#yukleniyor.bitti { opacity: 0; pointer-events: none; }
.yk-kutu { text-align: center; }
.yk-logo { font-size: 64px; font-weight: 900; letter-spacing: 6px; color: #8c3a24; text-shadow: 0 3px 0 #f9eeda, 0 6px 18px rgba(80, 40, 10, .35); }
.yk-alt { margin: 6px 0 22px; color: #7a5a35; font-weight: 700; }
.yk-cubuk { width: 280px; height: 12px; border-radius: 99px; background: rgba(120, 80, 30, .2); overflow: hidden; margin: 0 auto; }
#yk-dolu { height: 100%; width: 0; background: linear-gradient(90deg, #c8553d, #e8a04c); border-radius: 99px; transition: width .2s; }

/* Üst şerit */
.ust { position: fixed; top: 12px; left: 12px; right: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; pointer-events: none; z-index: 5; }
.ust > * { pointer-events: auto; }
.marka { background: var(--kagit); border-radius: 14px; padding: 8px 14px; box-shadow: var(--golge); display: flex; flex-direction: column; line-height: 1.05; }
.marka b { font-size: 20px; font-weight: 900; letter-spacing: 2px; color: #8c3a24; }
.marka span { font-size: 11px; color: var(--soluk); font-weight: 700; }
.saat-kutu { background: var(--kagit); border-radius: 99px; padding: 6px 8px 6px 14px; box-shadow: var(--golge); display: flex; align-items: center; gap: 8px; font-weight: 800; }
#saat { font-size: 20px; font-variant-numeric: tabular-nums; min-width: 56px; }
#gun { font-size: 13px; }
.hizlar { display: flex; gap: 2px; background: var(--kagit2); border-radius: 99px; padding: 3px; }
.hizlar button { border: 0; background: transparent; border-radius: 99px; width: 34px; height: 28px; font-size: 13px; color: var(--murekkep); }
.hizlar button.secili { background: var(--murekkep); color: var(--kagit); }
.sag-ust select { font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 8px 10px; background: var(--kagit); box-shadow: var(--golge); color: var(--murekkep); }

/* Durum şeridi: para, ün, envanter */
.durum-seridi { position: fixed; left: 12px; top: 76px; background: var(--kagit); border-radius: 14px; padding: 8px 12px; box-shadow: var(--golge); z-index: 5; display: grid; gap: 4px; min-width: 200px; }
.durum-seridi .para { font-size: 20px; font-weight: 900; color: #3d6a2a; }
.durum-seridi .un { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; font-size: 12px; font-weight: 800; color: var(--soluk); }
.durum-seridi .un i { height: 7px; border-radius: 99px; background: var(--kagit2); overflow: hidden; display: block; min-width: 60px; }
.durum-seridi .un b { display: block; height: 100%; background: linear-gradient(90deg, #f0c24a, #e08a2c); }
.envanter { display: flex; gap: 6px; flex-wrap: wrap; font-weight: 800; font-size: 13px; }
.envanter span { background: var(--kagit2); border-radius: 8px; padding: 2px 7px; }

/* Görevler */
.gorevler { position: fixed; right: 12px; top: 64px; width: 280px; background: var(--kagit); border-radius: 16px; padding: 10px 12px; box-shadow: var(--golge); z-index: 4; }
.gv-bas { font-weight: 900; font-size: 13px; color: var(--soluk); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.gv { padding: 6px 0; border-top: 1px solid var(--kagit2); }
.gv:first-child { border-top: 0; }
.gv b { display: block; font-size: 14px; }
.gv small { color: var(--soluk); font-weight: 700; font-size: 12px; }

/* İnşa */
.insa-dugme { position: fixed; right: 12px; bottom: 12px; z-index: 6; border: 0; border-radius: 16px; padding: 12px 18px; background: var(--murekkep); color: var(--kagit); font-weight: 900; font-size: 16px; box-shadow: var(--golge); }
.insa-panel { position: fixed; right: 12px; bottom: 70px; width: 330px; max-height: calc(100vh - 160px); overflow: auto; background: var(--kagit); border-radius: 18px; padding: 12px; box-shadow: var(--golge); z-index: 9; }
.insa-oge { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: var(--kagit2); border-radius: 12px; padding: 8px 10px; margin-top: 6px; text-align: left; color: var(--murekkep); }
.insa-oge .ik { font-size: 24px; }
.insa-oge .bil { flex: 1; line-height: 1.15; }
.insa-oge .bil small { display: block; color: var(--soluk); font-weight: 700; font-size: 12px; }
.insa-oge .fiyat { font-weight: 900; white-space: nowrap; }
.insa-oge:disabled { opacity: .45; cursor: default; }
.insa-oge:hover:not(:disabled) { background: #ead9b6; }
.insa-ipucu { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: var(--murekkep); color: var(--kagit); padding: 8px 16px; border-radius: 99px; font-weight: 800; z-index: 8; }
.insa-etiket { position: fixed; z-index: 8; background: var(--kagit); padding: 6px 10px; border-radius: 10px; box-shadow: var(--golge); font-weight: 700; font-size: 13px; pointer-events: none; }
.insa-etiket .hata { color: #c8553d; font-weight: 900; }
.kart-isler { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kart-isler button { border: 0; background: #e4ecd2; border-radius: 10px; padding: 7px 10px; font-weight: 800; font-size: 13px; color: var(--murekkep); }
.cubuklar b.urun { background: linear-gradient(90deg, #f0d77a, #d9a441); }

/* Eldeki eşya rozeti */
.elde { position: fixed; left: 50%; bottom: 52px; transform: translateX(-50%); background: var(--kagit); border-radius: 99px; padding: 6px 14px 6px 8px; box-shadow: var(--golge); display: flex; align-items: center; gap: 8px; z-index: 5; font-weight: 800; }
.elde span { font-size: 22px; }
.elde small { color: var(--soluk); font-weight: 700; font-size: 11px; }

/* Eylem menüsü */
.eylem-menu { position: fixed; z-index: 9; background: var(--kagit); border-radius: 16px; padding: 10px; box-shadow: var(--golge); min-width: 230px; max-width: 280px; }
.em-bas { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.em-bas .ik { font-size: 24px; }
.em-bas b { display: block; font-size: 16px; }
.em-bas small { color: var(--soluk); font-weight: 700; }
.em-dugme { display: block; width: 100%; text-align: left; border: 0; background: var(--kagit2); border-radius: 10px; padding: 7px 10px; margin-top: 5px; color: var(--murekkep); font-weight: 800; }
.em-dugme small { display: block; color: var(--soluk); font-weight: 700; font-size: 12px; }
.em-dugme:hover:not(:disabled) { background: #ead9b6; }
.em-dugme:disabled { opacity: .5; cursor: default; }
.em-bilgi { font-size: 12px; color: var(--soluk); font-weight: 700; margin-top: 6px; }

/* İş çubuğu (çiftçinin üstünde) */
.is-cubugu { position: fixed; transform: translate(-50%, -100%); z-index: 3; background: var(--murekkep); color: var(--kagit); border-radius: 10px; padding: 3px 9px 5px; font-size: 12px; font-weight: 800; pointer-events: none; text-align: center; }
.is-cubugu i { display: block; height: 5px; border-radius: 99px; background: rgba(255,255,255,.2); margin-top: 3px; overflow: hidden; width: 120px; }
.is-cubugu b { display: block; height: 100%; background: #f0c24a; }

/* Pazar */
.modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(30, 20, 8, .35); z-index: 20; }
.modal-kart { background: var(--kagit); border-radius: 20px; padding: 16px; box-shadow: var(--golge); width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.modal-bas { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.modal-bas b { font-size: 20px; }
.pz-sutunlar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pz-baslik { font-weight: 900; color: var(--soluk); text-transform: uppercase; font-size: 12px; letter-spacing: 1px; margin-bottom: 6px; }
.pz-satir { display: flex; align-items: center; gap: 8px; background: var(--kagit2); border-radius: 12px; padding: 7px 9px; margin-bottom: 6px; font-weight: 800; }
.pz-satir .ik { font-size: 22px; }
.pz-satir .bil { flex: 1; line-height: 1.15; }
.pz-satir small { display: block; color: var(--soluk); font-weight: 700; font-size: 12px; }
.pz-satir button { border: 0; border-radius: 9px; padding: 6px 10px; background: var(--murekkep); color: var(--kagit); font-weight: 800; }
.pz-satir button:disabled { opacity: .4; cursor: default; }
.pz-satir.kilitli { opacity: .55; }

/* Ana menü */
#ana-menu { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(247,231,196,.55), rgba(120,90,40,.55)); }
.am-kart { background: rgba(251,246,234,.96); border-radius: 24px; padding: 26px 28px; box-shadow: var(--golge); width: min(460px, calc(100vw - 32px)); text-align: center; }
.am-alt { color: #7a5a35; font-weight: 700; margin: 4px 0 18px; }
.am-baslik { font-weight: 900; color: var(--soluk); text-transform: uppercase; letter-spacing: 1px; font-size: 12px; margin: 14px 0 6px; }
.am-zorluklar { display: grid; gap: 6px; }
.am-dugme { display: block; width: 100%; border: 0; border-radius: 14px; padding: 10px 14px; background: var(--kagit2); color: var(--murekkep); font-weight: 800; text-align: left; }
.am-dugme b { font-size: 16px; }
.am-dugme small { display: block; color: var(--soluk); font-weight: 700; }
.am-dugme:hover { background: #ead9b6; }
.am-dugme.ana { background: #3d6a2a; color: #fff; text-align: center; font-size: 18px; }
.am-dugme.ikincil { margin-top: 14px; text-align: center; background: transparent; border: 2px dashed #d8c39a; }
#perde { position: fixed; inset: 0; background: #0b0a10; opacity: 0; pointer-events: none; z-index: 30; transition: opacity .6s; }
#perde.acik { opacity: 1; }

/* Sayım */
.sayim { position: fixed; left: 12px; top: 84px; display: flex; flex-direction: column; gap: 6px; z-index: 4; }
.sayim button { border: 0; background: var(--kagit); box-shadow: var(--golge); border-radius: 12px; padding: 6px 10px; display: flex; align-items: center; gap: 8px; font-weight: 800; min-width: 92px; color: var(--murekkep); }
.sayim button span:first-child { font-size: 20px; }
.sayim button small { color: var(--soluk); font-weight: 700; margin-left: auto; }
.sayim button:hover { transform: translateX(2px); }

/* Seçili hayvan kartı */
.kart { position: fixed; left: 12px; bottom: 12px; width: 290px; background: var(--kagit); border-radius: 18px; padding: 14px; box-shadow: var(--golge); z-index: 6; }
.kart-bas { display: flex; align-items: center; gap: 10px; }
.kart-ikon { font-size: 30px; width: 48px; height: 48px; display: grid; place-items: center; background: var(--kagit2); border-radius: 14px; }
.kart-ad { font-size: 20px; font-weight: 900; }
.kart-cins { font-size: 13px; color: var(--soluk); font-weight: 700; }
.kapat { margin-left: auto; align-self: flex-start; border: 0; background: transparent; font-size: 16px; color: var(--soluk); }
.kart-durum { margin: 10px 0 8px; font-weight: 800; color: var(--yesil); }
.cubuklar { display: grid; gap: 5px; }
.cubuklar label { display: grid; grid-template-columns: 70px 1fr; align-items: center; font-size: 12px; font-weight: 800; color: var(--soluk); }
.cubuklar i { height: 8px; border-radius: 99px; background: var(--kagit2); overflow: hidden; display: block; }
.cubuklar b { display: block; height: 100%; background: linear-gradient(90deg, #8fb85a, #5f8f3a); border-radius: 99px; }
.kart-dugmeler { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.kart-dugmeler button { border: 0; background: var(--kagit2); border-radius: 10px; padding: 7px 10px; font-weight: 800; font-size: 13px; color: var(--murekkep); }
.kart-dugmeler button:hover { background: #ead9b6; }
.kart-dugmeler button.acik { background: var(--murekkep); color: var(--kagit); }
.kart-dugmeler button:disabled { opacity: .45; cursor: default; }
.kart-ipucu { margin-top: 10px; font-size: 12px; color: var(--soluk); font-weight: 700; }

/* Saat paneli */
.zaman-panel { position: fixed; right: 12px; bottom: 12px; background: var(--kagit); border-radius: 16px; padding: 10px 12px; box-shadow: var(--golge); width: 300px; z-index: 4; }
.zp-bas { font-weight: 900; font-size: 13px; margin-bottom: 4px; }
.zaman-panel input { width: 100%; accent-color: var(--vurgu); }
.zp-hazir { display: flex; gap: 4px; flex-wrap: wrap; }
.zp-hazir button { border: 0; background: var(--kagit2); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 800; color: var(--murekkep); }

.ipucu { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(40, 30, 18, .62); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; pointer-events: none; white-space: nowrap; z-index: 3; transition: opacity .5s; }

/* Hayvan adı etiketleri */
#etiketler { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.etiket { position: absolute; transform: translate(-50%, -100%); background: var(--kagit); color: var(--murekkep); font-weight: 800; font-size: 13px; padding: 3px 9px; border-radius: 99px; box-shadow: 0 3px 10px rgba(40, 28, 12, .25); white-space: nowrap; }
.etiket small { color: var(--soluk); font-weight: 700; margin-left: 4px; }
.etiket.secili { background: var(--murekkep); color: var(--kagit); }
.etiket.secili small { color: #d8c8a8; }

#bildirim { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; z-index: 8; }
.bld { background: var(--kagit); padding: 8px 16px; border-radius: 12px; box-shadow: var(--golge); font-weight: 800; animation: bld 3.2s forwards; }
@keyframes bld { 0% { opacity: 0; transform: translateY(-8px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

@media (max-width: 720px) {
  .gorevler { display: none; }
  .durum-seridi { top: 64px; min-width: 0; }
  .marka span, .ipucu { display: none; }
  .zaman-panel { width: auto; left: 12px; right: auto; bottom: auto; top: 64px; left: auto; right: 12px; padding: 8px; }
  .zp-bas, .zaman-panel input { display: none; }
  .zp-hazir { flex-direction: column; }
  .kart { width: auto; right: 12px; }
  .sayim { top: 70px; }
  .sayim button { min-width: 0; padding: 5px 8px; }
  .sayim button small { display: none; }
  #saat { font-size: 17px; min-width: 48px; }
  .sag-ust select { padding: 6px; font-size: 12px; max-width: 110px; }
}
