:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: #f4f6f9;
  color: #1f2733;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, .12), transparent 34%),
    linear-gradient(315deg, rgba(15, 118, 110, .12), transparent 34%),
    #f4f6f9;
}

.shell {
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 40px;
}

.screen.active {
  display: block;
}

.app-header {
  max-width: 760px;
  margin: 8vh auto 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
}

.lead {
  margin: 18px 0 0;
  color: #586273;
  font-size: 17px;
  line-height: 1.8;
}

.upload-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #dde4ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 48px rgba(31, 39, 51, .08);
}

.file-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 154px;
  border: 1px dashed #9aa8bb;
  border-radius: 8px;
  background: #fbfcfe;
  color: #25324a;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 0.2s, border-color 0.2s;
}

.file-picker.drag-over {
  border-color: #0f766e;
  background: #f0fdfa;
}

.file-picker input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.file-name {
  min-height: 24px;
  margin: 14px 0;
  color: #687184;
}

button {
  min-height: 42px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .62;
}

.primary-button {
  background: #0f766e;
  color: white;
}

.secondary-button {
  background: white;
  border-color: #cbd5e1;
  color: #25324a;
}

.message {
  min-height: 24px;
  margin: 14px 0 0;
  color: #9f1239;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 16px;
}

.toolbar-title {
  flex: 1;
  display: grid;
  gap: 4px;
}

.toolbar-title span {
  color: #687184;
  font-size: 14px;
}

iframe {
  width: 100%;
  height: calc(100vh - 120px);
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: white;
}

.progress-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #586273;
}

progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  appearance: none;
  border: none;
}

progress::-webkit-progress-bar {
  background-color: #e2e8f0;
  border-radius: 4px;
}

progress::-webkit-progress-value {
  background-color: #0f766e;
  border-radius: 4px;
  transition: width 0.3s ease;
}

@media (max-width: 720px) {
  .screen {
    padding: 18px;
  }

  h1 {
    font-size: 30px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-title {
    order: -1;
  }
}

.version-display {
  font-size: 11px;
  color: #687184;
  opacity: 0.8;
  margin-left: 8px;
  text-transform: none;
}

/* サービス説明モーダルのスタイル */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-container {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.8);
  max-width: 780px;
  width: 90%;
  max-height: 85vh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(31, 39, 51, 0.12);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #0f766e;
}

.close-button {
  background: none;
  border: none;
  font-size: 28px;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
  min-height: auto;
}

.close-button:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
}

.modal-tab-button {
  background: none;
  border: none;
  border-radius: 0;
  padding: 12px 16px;
  font-weight: 700;
  color: #64748b;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  min-height: auto;
}

.modal-tab-button:hover {
  color: #0f766e;
}

.modal-tab-button.active {
  color: #0f766e;
  border-bottom-color: #0f766e;
}

.modal-tab-content {
  display: none;
  line-height: 1.6;
  color: #334155;
}

.modal-tab-content.active {
  display: block;
}

.modal-tab-content h3 {
  margin-top: 0;
  font-size: 18px;
  color: #0f172a;
  margin-bottom: 12px;
}

.modal-tab-content p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #475569;
}

.sub-title {
  font-size: 15px;
  color: #0f766e;
  margin: 24px 0 12px;
  border-left: 3px solid #0f766e;
  padding-left: 8px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 12px;
}

.feature-list li {
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.feature-list li strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 4px;
}

.feature-list li .desc {
  display: block;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

/* データ準備手順 */
.export-devices {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.device-guide {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.device-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.device-badge.android {
  background: #dcfce7;
  color: #15803d;
}

.device-badge.ios {
  background: #dbeafe;
  color: #1d4ed8;
}

.device-badge.pc {
  background: #f3e8ff;
  color: #7e22ce;
}

.device-guide ol {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
  color: #334155;
}

.device-guide li {
  margin-bottom: 6px;
}

.device-guide li:last-child {
  margin-bottom: 0;
}

.device-guide a {
  color: #0f766e;
  text-decoration: underline;
}

.device-guide a:hover {
  color: #0d5c56;
}

.alert-box {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin: 16px 0 0;
  border-left: 4px solid;
}

.alert-box.note {
  background: #eff6ff;
  border-left-color: #3b82f6;
  color: #1e40af;
}

.alert-box.warning {
  background: #fffbeb;
  border-left-color: #d97706;
  color: #92400e;
}

/* プライバシーセクション */
.privacy-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.privacy-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.privacy-card h4 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 14px;
  color: #0f172a;
}

.privacy-card p {
  margin: 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .privacy-card-grid {
    grid-template-columns: 1fr;
  }
  .modal-container {
    max-height: 90vh;
  }
  .modal-tabs {
    flex-wrap: wrap;
  }
  .modal-tab-button {
    padding: 8px 12px;
    font-size: 13px;
  }
}



