* { box-sizing: border-box; }

body {
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background: #F0FDFA;
  margin: 0;
  padding: 24px;
  color: #1E293B;
  min-height: 100vh;
}

h1 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #0F766E;
  border-left: 4px solid #0D9488;
  padding-left: 12px;
}

/* --- パスワードゲート --- */
.gate {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-box {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  max-width: 420px;
  width: 100%;
}

.gate-desc {
  color: #64748B;
  font-size: 13px;
  margin-bottom: 16px;
}

.gate-box input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}

/* --- メインコンテナ --- */
.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.subtitle {
  color: #64748B;
  font-size: 13px;
  margin-bottom: 24px;
}

.panel {
  background: #F8FAFC;
  border-left: 4px solid #0D9488;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: bold;
  color: #334155;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #0D9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.field textarea {
  resize: vertical;
}

.field .hint {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary { background: #0D9488; color: white; }
.btn-primary:hover { background: #0F766E; }
.btn-primary:disabled { background: #94A3B8; cursor: not-allowed; }

.btn-large {
  padding: 12px 28px;
  font-size: 15px;
  margin-top: 4px;
}

.loading {
  margin-left: 12px;
  font-size: 13px;
  color: #0F766E;
}

.error-text {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #B91C1C;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.note-text {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #92400E;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* --- 結果パネル --- */
.results {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.pattern-box {
  background: #F8FAFC;
  border-left: 4px solid #0D9488;
  border-radius: 8px;
  padding: 16px;
}

.pattern-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.pattern-title {
  font-size: 15px;
  font-weight: bold;
  color: #0F766E;
}

.char-count {
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  background: #14B8A6;
  color: white;
}

.char-count.warn { background: #F59E0B; }
.char-count.error { background: #DC2626; }

.pattern-text {
  width: 100%;
  min-height: 110px;
  padding: 12px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.7;
  font-family: inherit;
  resize: vertical;
  background: white;
}

.pattern-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-small {
  padding: 6px 14px;
  background: #0F766E;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  font-family: inherit;
}

.btn-small:hover { background: #0D9488; }
.btn-small.secondary { background: #E2E8F0; color: #334155; }
.btn-small.secondary:hover { background: #CBD5E1; }
.btn-small.copied { background: #059669; }

.disclaimer {
  margin-top: 24px;
  padding: 16px;
  background: #F1F5F9;
  border-radius: 8px;
  font-size: 11px;
  color: #64748B;
  line-height: 1.7;
}
