
  :root{
    --brand: #6e2f2f;           /* tema utama */
    --brand-600: #632a2a;
    --brand-700: #582525;
    --panel: #0f172a;           /* slate-900 */
    --panel-2: #111827;         /* gray-900 */
    --text: #e5e7eb;            /* gray-200 */
    --muted: #9ca3af;           /* gray-400 */
    --ok: #16a34a;              /* green-600 */
    --bad: #ef4444;             /* red-500 */
    --card: #111827;
    --ring: 2px solid #6e2f2f88;
    --radius: 16px;
    --shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  }

  *{ box-sizing: border-box }
  html, body{
    height:100%;
    background: radial-gradient(1200px 800px at 20% -10%, #482121 0, #160b0b 30%, #05080a 70%) fixed;
    color: var(--text);
    font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans Batak", sans-serif;
    line-height: 1.5;
  }

  body {
  font-family: 'Noto Sans Batak', sans-serif;
}


  .app{
    max-width: 1100px;
    margin: clamp(10px, 3vw, 28px) auto;
    padding: clamp(12px, 2vw, 18px);
  }

  header{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
  }

 .title {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo {
  width: 60px;
  height: 60px;
  flex-shrink: 0;        /* ⬅️ cegah ketarik flex */
  border-radius: 50%;
  background: #ffff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}




h1 {
  font-size: clamp(20px, 2.3vw, 28px);
  margin: 0;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: -15px;
  margin-bottom: 10px;
}


  .toolbar{
    display:flex; flex-wrap: wrap; gap:10px; justify-content:flex-end; align-items:center;
  }
  .select, .btn{
    background: linear-gradient(180deg, #0f1a15, #0b1411);
    color: var(--text);
    border: 1px solid #462525;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .06s ease, border-color .2s ease, background .2s ease;
  }

option {
  background-color: #0f1a15;
  color: var(--text);
}

  .select{padding: 9px 10px}
  .btn:hover{ transform: translateY(-1px); border-color: var(--brand)}
  .btn:active{ transform: translateY(0) }
  .btn.primary{ background: linear-gradient(180deg, var(--brand), var(--brand-600)); border-color: #a56060 }
  .btn.ghost{ background: transparent; border-color: #3b2b2b }

  .panel{
    background: linear-gradient(180deg, rgba(110, 47, 47, 0.25), rgba(78, 29, 29, 0.08));
    border: 1px solid #CF392C;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
  }

  .stats{
    display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:10px; margin: 12px 0 16px;
  }
  .stat{
    background: #0a1310; border:1px solid #331c1c; border-radius: 14px; padding: 10px 12px;
  }
  .stat .label{ color: #ffffff; font-size: 12px }
  .stat .value{ font-size: clamp(16px, 2vw, 20px); font-weight: 800 }

  .progress{ height: 10px; background: #0a1a14; border:1px solid #3a1b1b; border-radius: 999px; overflow: hidden }
  .progress > span{ display:block; height:100%; width:0%; background: linear-gradient(90deg, #2F6E4C, #2F6E4C); transition: width .35s ease }

  .boards{ display:grid; gap:14px; grid-template-columns: 1fr; }
  @media (min-width: 960px){
    .boards{ grid-template-columns: repeat(2, 1fr) }
  }

  .board{
    display:grid; gap:12px; grid-template-columns: repeat( auto-fit, minmax(110px, 1fr) );
    padding: 12px; min-height: 260px;
    background: #0b1612; border:1px dashed #CF392C; border-radius: 14px;
  }

  .slot, .tile{
    user-select: none;
    border-radius: 14px;
    padding: 14px 10px;
    display:flex; align-items:center; justify-content:center;
    text-align:center;
    min-height: 78px;
    outline: none;
    transition: transform .12s ease, background .25s ease, border-color .25s ease;
  }

  .tile{
    background: radial-gradient(60% 100% at 50% 0%, #311616, #1f0e0e);
    border: 1px solid #5f3535;
    box-shadow: 0 6px 16px rgba(0,0,0,.35);
    font-size: clamp(28px, 5vw, 42px);
    cursor: grab;
  }
  .tile:active{ cursor: grabbing }
  .tile[aria-grabbed="true"]{ outline: var(--ring); transform: scale(1.03) }

  .slot{
    position: relative;
    background: #0a1310;
    border: 1px dashed #532b2b;
    color: #cfb8b8;
    font-weight: 700;
    font-size: clamp(14px, 2.2vw, 18px);
  }
  .slot.ready{ border-style: solid; border-color: #7e3e3e; background: #1d0d0d }
  .slot.filled{ border-color: #3a1f1f; background: linear-gradient(180deg, #1d0d0d, #0a1411) }
  .slot.correct{ box-shadow: inset 0 0 0 2px var(--ok) }
  .slot.incorrect{ animation: shake .35s ease }

  @keyframes shake {
    0%, 100% { transform: translateX(0) }
    25% { transform: translateX(-6px) }
    50% { transform: translateX(6px) }
    75% { transform: translateX(-3px) }
  }

  .toast{
    position: fixed; left:50%; bottom: 18px; transform: translateX(-50%) translateY(20px);
    background: #0d1b16; border:1px solid #5b2a2a; color: #d9f2e5; padding:10px 14px; border-radius: 999px;
    opacity: 0; pointer-events:none; transition: opacity .25s ease, transform .25s ease; font-weight:700;
  }
  .toast.show{ opacity: 1; transform: translateX(-50%) translateY(0) }

  .footer{ display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top: 14px }
  .hint{ color: #b79999; font-size: 13px }

  /* Mobile-first touch guidance chip */
  .chip{
    display:inline-flex; align-items:center; gap:8px; padding: 6px 10px;
    background: #0d1b16; border:1px solid #3e1f1f; border-radius: 999px; font-size: 12px; color:#fbfbfb
  }
  .chip .dot{ width:8px; height:8px; border-radius: 999px; background: var(--brand) }

  /* Focus ring for a11y */
  .focusable:focus-visible{ outline: var(--ring) }

  /* Confetti container */
  #confetti{ position: fixed; inset: 0; pointer-events: none }

  /* ======== Tambahan Responsif untuk HP ======== */
  @media (max-width: 600px) {
    header {
      grid-template-columns: 1fr;
      gap: 8px;
    }
    .title {
      flex-direction: row;
      gap: 8px;
    }
    h1 {
      font-size: 18px;
    }
    .subtitle {
      font-size: 12px;
      margin-top: -15px;
        margin-bottom: 10px;
    }
    .toolbar {
      justify-content: flex-start;
      gap: 6px;
    }
    .select, .btn {
      font-size: 13px;
      padding: 7px 10px;
    }
    .boards {
      grid-template-columns: 1fr;
    }
    .board {
      grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
      gap: 8px;
      padding: 8px;
    }
    .slot, .tile {
      min-height: 64px;
      padding: 10px 6px;
      font-size: 22px;
    }
    .slot {
      font-size: 13px;
    }
    .footer {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
    }
    .hint {
      font-size: 12px;
    }
  }




  .modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 25px 28px;
  border-radius: 14px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  border: 2px solid #CF392C;
  animation: fadeIn 0.35s ease;
  color: #2c3e50;
}

.modal-content h2 {
  font-size: 1.4rem;
  color: #CF392C;
  border-bottom: 2px solid #CF392C;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.modal-content p {
  line-height: 1.6;
   color: #2c3e50;
}

.close {
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  color: #CF392C;
  transition: color 0.2s ease;
}
.close:hover {
  color: #c0392b;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-25px);}
  to {opacity: 1; transform: translateY(0);}
}