/* ===============================
   Kirius Lab - Smartphone Layout
   PC版(style.css)は一切変更せず、
   幅880px以下でだけ適用されるUX最適化CSS
   =============================== */

/* タブレット〜スマホ共通 */
@media (max-width: 880px) {
  body {
    font-size: 14px;
    padding: 0;
  }

  .app {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0.9rem 1rem;
  }

  .sidebar section {
    margin-bottom: 1rem;
  }

  .main {
    padding: 0.75rem 0.9rem 1rem;
    gap: 0.6rem;
  }

  .canvas-wrapper {
    height: 60vh;
    max-height: 70vh;
    border-radius: 0.9rem;
  }

  .canvas-inner {
    overflow: auto;
  }

  .status-bar {
    font-size: 0.7rem;
    padding: 0.25rem 0.2rem 0;
  }
}

/* 幅600px以下：よりモバイル寄りの調整 */
@media (max-width: 600px) {
  h1 {
    font-size: 1.15rem;
  }
  h2 {
    font-size: 0.95rem;
  }
  .sidebar small {
    font-size: 0.78rem;
  }

  .sidebar {
    padding: 0.8rem 0.75rem 0.95rem;
  }
  .main {
    padding: 0.7rem 0.75rem 0.95rem;
  }

  .row {
    gap: 0.3rem;
  }

  .canvas-wrapper {
    height: 58vh;
  }
}

/* 幅480px以下：ボタン・フォームをタップしやすく */
@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .sidebar section {
    padding: 0.7rem 0.7rem 0.8rem;
  }

  label {
    font-size: 0.78rem;
  }

  input[type="file"] {
    font-size: 0.7rem;
  }

  .text-input {
    font-size: 0.76rem;
  }

  button {
    font-size: 0.75rem;
    padding: 0.33rem 0.6rem;
  }

  /* 重要なアクションは幅広めでタップしやすく */
  section button.primary,
  #exportPngBtn,
  #selectionTransparentBtn {
    width: 100%;
    justify-content: center;
  }

  .canvas-wrapper {
    height: 55vh;
  }
}
