:root {
  --kahve: #5b3416;
  --kahve2: #7a4a22;
  --krem: #f6ecd9;
  --kagit: #fffaf0;
  --amber: #e8961e;
  --sari: #f6c14b;
  --domates: #cf4126;
  --zeytin: #5f7a2e;
  --lacivert: #1d2b53;
  --yazi: #2a1d12;
  --soluk: #6f6255;
  --cizgi: #e6d5b8;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--krem); color: var(--yazi);
  font: 400 16px/1.5 Nunito, system-ui, sans-serif;
  background-image: linear-gradient(45deg, rgba(122, 74, 34, .05) 25%, transparent 25%, transparent 75%, rgba(122, 74, 34, .05) 75%), linear-gradient(45deg, rgba(122, 74, 34, .05) 25%, transparent 25%, transparent 75%, rgba(122, 74, 34, .05) 75%);
  background-size: 44px 44px; background-position: 0 0, 22px 22px;
}
#uygulama { max-width: 720px; margin: 0 auto; padding: 16px 16px 90px; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--kahve2); font-weight: 800; }

.bas { text-align: center; padding: 16px 4px 4px; }
.ust { margin: 0; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: var(--domates); }
h1 { font: 900 clamp(34px, 9.5vw, 58px)/1.02 Fraunces, Georgia, serif; color: var(--kahve); margin: 8px 0 12px; }
h1 em { color: var(--amber); font-style: italic; }
.giris-yazi { max-width: 540px; margin: 0 auto; font-size: 17px; }

.kart { background: var(--kagit); border: 2px solid var(--kahve); border-radius: 18px; padding: 16px; margin: 16px 0; box-shadow: 5px 5px 0 var(--kahve); }
h2 { font: 900 22px/1.2 Fraunces, Georgia, serif; color: var(--kahve); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
h3 { font: 900 17px/1.2 Nunito, sans-serif; color: var(--kahve); margin: 20px 0 8px; }
.adim { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: #fff; font: 900 16px Nunito, sans-serif; flex: none; }
.kucuk { font-size: 13.5px; color: var(--soluk); margin: 10px 0 0; }

.iki { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sayac { display: grid; grid-template-columns: 46px 1fr 46px; grid-template-rows: auto 46px; align-items: center; gap: 6px 8px; background: #fff; border: 2px solid var(--cizgi); border-radius: 14px; padding: 10px; }
.sayac-ad { grid-column: 1 / -1; font-weight: 800; font-size: 14px; text-align: center; }
.sayac-ad small { font-weight: 400; color: var(--soluk); }
.sayac button { height: 46px; border-radius: 12px; border: 2px solid var(--kahve); background: var(--sari); font-weight: 900; font-size: 24px; cursor: pointer; touch-action: manipulation; }
.sayac button:active { transform: scale(.94); }
.sayac output { text-align: center; font: 900 30px Fraunces, Georgia, serif; color: var(--kahve); }

.hazir { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hazir button { border: 2px dashed var(--kahve2); background: transparent; border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 14px; cursor: pointer; }
.hazir button[aria-pressed="true"] { background: var(--kahve); color: #fff; border-style: solid; }

.kalemler { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 8px; }
.kalem { display: flex; align-items: center; gap: 7px; text-align: left; border: 2px solid var(--cizgi); background: #fff; border-radius: 14px; padding: 8px 8px; cursor: pointer; min-height: 58px; transition: transform .1s; touch-action: manipulation; }
.kalem i { font-style: normal; font-size: 26px; line-height: 1; filter: grayscale(.85); opacity: .55; }
.kalem span { display: flex; flex-direction: column; line-height: 1.15; }
.kalem b { font-size: 14.5px; }
.kalem small { font-size: 11.5px; color: var(--soluk); }
.kalem[aria-pressed="true"] { border-color: var(--kahve); background: #fff3d6; box-shadow: 2px 2px 0 var(--kahve); }
.kalem[aria-pressed="true"] i { filter: none; opacity: 1; }
.kalem:active { transform: scale(.97); }

.sehir { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sehir button { border: 2px solid var(--kahve); background: #fff; border-radius: 12px; padding: 10px 4px; font-weight: 800; font-size: 14px; cursor: pointer; line-height: 1.2; }
.sehir button i { display: block; font-style: normal; font-size: 24px; }
.sehir button[aria-checked="true"] { background: var(--kahve); color: #fff; }

.sonuc { background: #fffdf6; }
.karsilastir { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: stretch; gap: 6px; }
.kutu { border-radius: 16px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.kutu span { font-weight: 800; font-size: 14px; }
.kutu b { font: 900 clamp(21px, 6.4vw, 40px)/1.1 Fraunces, Georgia, serif; margin: 4px 0; white-space: nowrap; }
.kutu small { font-size: 12.5px; opacity: .85; }
.kutu.ev { background: var(--zeytin); color: #fff; }
.kutu.dis { background: var(--domates); color: #fff; }
.vs { align-self: center; font: 900 italic 20px Fraunces, serif; color: var(--kahve); }
.fark { font: 900 20px/1.3 Fraunces, Georgia, serif; text-align: center; color: var(--kahve); margin: 14px 0 4px; }
.fark mark { background: var(--sari); color: var(--kahve); padding: 0 6px; border-radius: 6px; }
.esdeger { text-align: center; margin: 0; font-weight: 700; color: var(--soluk); }

.gecmis { display: grid; gap: 8px; }
.cubuk { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.cubuk > div { background: #f1e5cf; border-radius: 10px; height: 34px; overflow: hidden; }
.cubuk > div > span { display: flex; align-items: center; height: 100%; padding: 0 10px; border-radius: 10px; background: var(--amber); color: var(--kahve); white-space: nowrap; font-weight: 900; transition: width .4s; min-width: max-content; }
.cubuk.simdi > div > span { background: var(--kahve); color: #fff; }

.dokum { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.dokum li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--cizgi); font-size: 15px; }
.dokum li b { white-space: nowrap; }
.dokum li:first-child { font-weight: 800; }
.dokum li:first-child span::after { content: ' 👑'; }

.dugmeler { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dugme { flex: 1 1 200px; text-align: center; text-decoration: none; border: 2px solid var(--kahve); background: #fff; color: var(--kahve); border-radius: 12px; padding: 12px 14px; font-weight: 900; cursor: pointer; }
.dugme.ana { background: var(--amber); box-shadow: 3px 3px 0 var(--kahve); }
.dugme.wp { background: #e6f4e8; }
.dugme:active { transform: translate(2px, 2px); box-shadow: none; }

.alisveris { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 18px; }
@media (max-width: 460px) { .alisveris { columns: 1; } }
.alisveris li { break-inside: avoid; display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--cizgi); }
.alisveris li b { white-space: nowrap; color: var(--kahve); }
.alisveris.soluk li { color: var(--soluk); }

details { margin-top: 10px; border: 2px solid var(--cizgi); border-radius: 12px; padding: 8px 12px; background: #fff; }
summary { cursor: pointer; font-weight: 800; }
.tablo-kap { overflow-x: auto; margin-top: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px; border-bottom: 1px solid var(--cizgi); vertical-align: top; }
td:nth-child(3) { white-space: nowrap; font-weight: 800; }
.kaynaklar { font-size: 13.5px; padding-left: 18px; }
.kaynaklar li { margin: 4px 0; }

.son { text-align: center; font-size: 14px; color: var(--soluk); }

.alt-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--kahve); color: #fff; font-size: 15px; transform: translateY(110%); transition: transform .25s; }
.alt-bar.acik { transform: none; }
.alt-bar b { font-family: Fraunces, Georgia, serif; font-size: 18px; }
.alt-bar a { margin-left: auto; color: var(--kahve); background: var(--sari); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.bar-ayrac { opacity: .5; }

.bildirim { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); background: var(--lacivert); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 800; z-index: 9; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
