html, body { height: 100%; }
body { overflow-x: hidden; }

.tut {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 14px);
  gap: 12px;
}
.tut-top { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.tut-skip { color: var(--bone-dim); text-decoration: none; padding: 8px 4px; }
.tut-count { font-size: 14px; color: var(--bone-dim); }

/* çizim alanı */
.tut-stage {
  position: relative;
  border-radius: var(--radius-m);
  background: #d6be8f;
  border: 1px solid #b89c69;
  min-height: 250px;
  height: 42vh;
  height: 42dvh;
  max-height: 340px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #2b2418;
}
.tut-stage > svg { width: 100%; height: 100%; display: block; }
.tut-stage .scene-html { width: 100%; height: 100%; padding: 14px; display: grid; align-content: center; gap: 8px; }
.tut-stage.fade > * { animation: sceneIn .3s ease-out; }
@keyframes sceneIn { from { opacity: 0; transform: translateY(6px); } }

.tut-title { font-family: var(--font-display); font-weight: 400; font-size: 27px; line-height: 1.15; margin: 4px 0 8px; color: var(--sand); }
.tut-body p { margin: 0 0 10px; max-width: 46ch; }
.tut-body .note { color: var(--bone-dim); font-size: 15px; }
.tut-body ol { margin: 0 0 10px; padding-left: 22px; }
.tut-body li { margin-bottom: 4px; }
.tut-body b { color: var(--bone); }

.tut-nav { display: grid; gap: 12px; }
.tut-dots { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.tut-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--lapis-600);
}
.tut-dots button[aria-selected="true"] { background: var(--saffron); width: 22px; border-radius: 5px; }
.tut-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.tut-btns .btn { min-height: 50px; }

/* sahnelerdeki HTML parçaları */
.cost-row {
  display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .45); border-radius: 8px; padding: 6px 10px;
}
.cost-row .nm { font-weight: 600; font-size: 15px; }
.cost-row .ic { display: flex; gap: 2px; }
.cost-row .ic svg { width: 24px; height: 24px; }
.cost-row .vp { font-family: var(--font-display); font-size: 18px; color: #7a4a10; min-width: 30px; text-align: right; }
.cost-row .shape svg { width: 40px; height: 32px; display: block; }

.trade-row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .45); border-radius: 8px; padding: 8px 10px;
}
.trade-row .lbl { grid-column: 1 / -1; font-weight: 600; font-size: 14px; }
.trade-row .side { display: flex; gap: 1px; flex-wrap: wrap; }
.trade-row .side svg { width: 24px; height: 24px; }
.trade-row .arrow { font-size: 20px; color: #6b5330; }
.trade-row .side.right { justify-content: flex-end; }

.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dcard {
  background: #f4ead3; border: 1px solid #b89c69; border-radius: 8px; padding: 8px 10px;
  font-size: 13px; line-height: 1.3;
}
.dcard b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 17px; color: #14233b; }
.dcard .n { float: right; color: #7a4a10; font-weight: 600; }
.dcard.wide { grid-column: 1 / -1; }

.count-table { width: 100%; border-collapse: collapse; font-size: 14px; background: rgba(255,255,255,.45); border-radius: 8px; overflow: hidden; }
.count-table th, .count-table td { padding: 7px 8px; text-align: left; border-bottom: 1px solid rgba(107, 83, 48, .25); }
.count-table th { font-weight: 600; }

.roll-btn {
  position: absolute; right: 12px; bottom: 12px;
  background: var(--saffron); color: #2b1d05; border: 1px solid var(--saffron-deep);
  border-radius: var(--radius-s); padding: 10px 16px; font-weight: 600; cursor: pointer; min-height: 44px;
}
.stage-note {
  position: absolute; left: 12px; bottom: 12px; right: 120px;
  background: rgba(16, 27, 46, .88); color: var(--bone); border-radius: 8px;
  padding: 7px 10px; font-size: 13px; line-height: 1.3;
}
.stage-note:empty { display: none; }

@media (min-height: 800px) { .tut-stage { max-height: 380px; } }
@media (prefers-reduced-motion: reduce) {
  .tut-stage.fade > * { animation: none; }
}
