@charset "UTF-8";
/* CSS Document */
/* 迷路遊び｜迷路自動生成 */
/* みんなの知識 ちょっと便利帳 */
/* 2026/07/04 */

/* --- 全体レイアウト --- */
.maze-app-container {
  font-family: sans-serif;
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fcfcfc;
  border: 3px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  box-sizing: border-box;
  position: relative;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.maze-app-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin: 5px 0 20px;
  padding: 20px 0;
  text-align: center;
  color: #333;
  background-color: #f0f7ff;
}

.maze-app-instructions {
  font-size: 0.85rem;
  color: #666;
  background-color: #f0f7ff;
  border-left: 4px solid #007aff;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 0 4px 4px 0;
  line-height: 1.4;
}

.maze-app-instructions-title {
  font-size: 1rem;
  color: #666;
  font-weight: bold;
}

.maze-app-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #eee;
  margin-bottom: 15px;
}

.maze-app-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.maze-app-control-group label {
  font-size: 0.85rem;
  color: #444;
  font-weight: bold;
}

.maze-app-control-group select {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.85rem;
  background-color: #fff;
}

.maze-app-timer-display {
  font-size: 1rem;
  font-weight: bold;
  color: #1e293b;
  background-color: #f1f5f9;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  min-width: 110px;
  text-align: center;
}
#maze-app-timer-val {
  font-family: monospace;
  color: #dc2626;
}

.maze-app-btn-group {
  display: flex;
  gap: 8px;
}

.maze-app-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: bold;
  background-color: #4f46e5;
  color: #fff;
  transition: background-color 0.2s;
}

.maze-app-btn:hover:not(:disabled) { background-color: #4338ca; }
.maze-app-btn-solve { background-color: #ea580c; }
.maze-app-btn-solve:hover:not(:disabled) { background-color: #ca8a04; }
.maze-app-btn-print { background-color: #0d9488; }
.maze-app-btn-print:hover:not(:disabled) { background-color: #0f766e; }

.maze-app-btn:disabled {
  background-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
}

.maze-app-view-wrapper {
  display: flex;
  justify-content: center;
  background: #fff;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #eee;
  overflow: auto;
}

#maze-app-canvas {
  display: block;
  background-color: #fff;
  max-width: 100%;
  height: auto;
  cursor: crosshair;
}

.maze-app-print-area { display: none; }

/* --- オリジナルゴール画面 --- */
.maze-app-modal-overlay {
  display: none; 
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  z-index: 100;
}

.maze-app-modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: maze-app-bounce 0.4s ease-out;
  max-width: 80%;
}

@keyframes maze-app-bounce {
  0% { transform: scale(0.8); opacity: 0; }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.maze-app-modal-emoji { font-size: 3.5rem; margin: 10px 0 25px; }
.maze-app-modal-text { font-size: 1.3rem; font-weight: bold; color: #1e293b; margin: 10px 0 5px; }

.maze-app-modal-time-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ea580c;
  background-color: #fff7ed;
  border: 1px dashed #fdba74;
  padding: 8px 16px;
  border-radius: 6px;
  margin: 15px auto 20px auto;
  display: inline-block;
}

.maze-app-modal-btn {
  background-color: #22c55e;
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}
.maze-app-modal-btn:hover { background-color: #16a34a; }

/* --- 🖨 印刷専用スタイル設定 --- */
@media print {
  @page {
    size: A4 landscape; 
    margin: 10mm;
  }
  body * { visibility: hidden; }
  .maze-app-container, .maze-app-container * { visibility: visible; }
  .maze-app-container {
    position: absolute;
    top: 0; left: 0; width: 100% !important; max-width: 100% !important;
    box-shadow: none !important; border: none !important; background: #fff !important; padding: 0 !important; margin: 0 !important;
  }
  .maze-app-controls, .maze-app-instructions, .maze-app-view-wrapper, .maze-app-modal-overlay {
    display: none !important;
  }
  .maze-app-title { font-size: 1.8rem; margin-bottom: 20px; }
  .maze-app-print-area {
    display: flex !important;
    justify-content: space-around;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
  }
  .maze-app-print-block { text-align: center; }
  .maze-app-print-label { font-size: 1.2rem; font-weight: bold; margin-bottom: 8px; color: #000; }
  .maze-app-print-block canvas { display: block !important; border: 1px solid #000; background-color: #fff; }
}

