/* 職員会議メーカー（sup/meeting） */
:root {
  --primary: #4A90E2;
  --primary-dark: #2f6fb8;
  --font-ui: 'M PLUS Rounded 1c', 'Gowun Dodum', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'BIZ UDPGothic', 'Meiryo', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font-ui);
  color: #333;
  min-height: 100dvh;
  padding: calc(72px + env(safe-area-inset-top, 0px)) 16px calc(30px + env(safe-area-inset-bottom, 0px));
  background-color: #f4f7fb;
  background-image: radial-gradient(#d5e1eb 20%, transparent 20%), radial-gradient(#d5e1eb 20%, transparent 20%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  position: relative;
}

/* UI要塞化（スクロールする ページなので 高さも 0 に） */
.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  z-index: -1 !important;
  position: absolute !important;
  max-height: 0 !important; max-width: 0 !important;
  overflow: hidden !important;
}

.lang-slot {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  z-index: 100;
}

.app-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
  min-height: calc(100dvh - 110px);
}
.screen { padding: 30px 28px 36px; }

.app-title { text-align: center; color: var(--primary); margin: 0 0 18px; font-size: 1.7rem; font-weight: 800; }
.app-desc { text-align: center; font-weight: 700; color: #555; margin: 0 0 24px; line-height: 1.7; }
.app-desc small { font-weight: 400; color: #777; }

.ui-btn {
  display: block;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  min-height: 52px;
  line-height: 1.4;
}
.ui-btn:active { transform: translateY(5px); box-shadow: none !important; }
.ui-btn:focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 3px; }

.drop-zone {
  display: block;
  width: 100%;
  border: 3px dashed var(--primary);
  border-radius: 14px;
  padding: 34px 20px;
  text-align: center;
  background-color: rgba(74, 144, 226, 0.05);
  cursor: pointer;
  margin-bottom: 24px;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}
.drop-zone small { font-weight: 400; color: #777; font-size: 0.9rem; }
.drop-zone.dragover { background-color: rgba(74, 144, 226, 0.15); border-color: #f39c12; }
.folder-icon { font-size: 3.6rem; display: block; margin-bottom: 8px; }

.file-list { list-style: none; padding: 0; margin: 0 0 24px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 14px;
  background: #f9fbff;
  border: 1px solid #e0eaf5;
  border-radius: 10px;
  margin-bottom: 8px;
  font-weight: 700;
}
.file-item.dragging { opacity: 0.6; background-color: #e3f2fd; border: 2px dashed var(--primary); }
.file-no { flex: 0 0 auto; min-width: 2em; color: #7a8ea6; }
.drag-handle { color: #a0b2c6; font-size: 1.2rem; cursor: grab; user-select: none; }
.file-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-btn {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  background: #e6edf6;
  color: #2f6fb8;
  box-shadow: 0 3px 0 #c3d1e2;
}
.mini-btn:disabled { opacity: 0.35; cursor: default; }
.mini-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.mini-btn.del { background: #e74c3c; color: #fff; box-shadow: 0 3px 0 #c0392b; padding: 0 14px; }

.start-btn {
  background: #f39c12; color: #fff;
  padding: 16px; font-size: 1.3rem;
  width: 100%; max-width: 420px; margin: 0 auto;
  box-shadow: 0 6px 0 #d68910;
}

.offline-box { margin-top: 36px; padding-top: 20px; border-top: 2px dashed #e0eaf5; text-align: center; }
.offline-title { font-weight: 800; margin: 0 0 4px; color: #555; }
.offline-text { font-size: 0.9rem; color: #666; margin: 0 0 12px; }
.offline-btn {
  display: inline-block;
  background: #7f8c8d; color: #fff; padding: 12px 24px; font-size: 1rem;
  box-shadow: 0 5px 0 #606d6e;
}

/* 変換中 */
.loading-container { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 60dvh; }
.loader {
  border: 8px solid #f3f3f3; border-top: 8px solid #2ecc71; border-radius: 50%;
  width: 70px; height: 70px; animation: spin 1s linear infinite; margin: 10px 0 26px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loader { animation-duration: 3s; } }
.progress-text { font-size: 1.2rem; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: 14px; min-height: 1.6em; }
.safe-notice { font-size: 0.95rem; color: #b85c00; font-weight: 700; background: #fff3cd; padding: 10px 20px; border-radius: 50px; text-align: center; }

/* できあがり */
.manual-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 34px; }
.manual-box {
  background: #fcfcfc; border: 2px solid #eef2f7; border-radius: 14px; padding: 22px;
  display: flex; flex-direction: column;
}
.step-title-wrap { text-align: center; margin: 0 0 12px; }
.highlight-title { font-size: 1.1rem; font-weight: 800; background: linear-gradient(transparent 60%, #fff3cd 60%); padding: 0 5px; }
.step-desc { font-size: 0.95rem; color: #555; margin: 0 0 16px; text-align: center; font-weight: 700; }
.dl-btn { padding: 14px; font-size: 1.1rem; }
.btn-purple { background: #9b59b6; color: #fff; box-shadow: 0 6px 0 #8e44ad; }
.btn-blue { background: var(--primary); color: #fff; box-shadow: 0 6px 0 var(--primary-dark); }
.post-download-box { background-color: #e3f2fd; padding: 14px; border-radius: 10px; margin-top: 18px; }
.post-download-title { font-weight: 800; color: #2471a3; margin: 0 0 8px; font-size: 0.95rem; }
.instruction-list { font-size: 0.9rem; line-height: 1.6; padding-left: 20px; margin: 0; font-weight: 700; }
.restart-btn { background: #7f8c8d; color: #fff; padding: 12px 24px; font-size: 1.05rem; margin: 0 auto; box-shadow: 0 6px 0 #606d6e; }

@media (max-width: 700px) {
  body { padding-top: calc(120px + env(safe-area-inset-top, 0px)); padding-left: 8px; padding-right: 8px; }
  .lang-slot { top: calc(66px + env(safe-area-inset-top, 0px)); }
  .manual-container { grid-template-columns: 1fr; }
  .screen { padding: 22px 14px 30px; }
}
