.sgb-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.sgb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.sgb-field label {
  font-weight: 600;
}

.sgb-field input,
.sgb-field textarea {
  border: 1px solid #d2d2d2;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 16px;
}

.sgb-field select {
  border: 1px solid #d2d2d2;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 16px;
  background: #ffffff;
}

.sgb-button {
  background: #0f4c5c;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 16px;
  cursor: pointer;
}

.sgb-button.sgb-secondary {
  background: transparent;
  color: #0f4c5c;
  border: 2px solid #0f4c5c;
}

.sgb-button:hover {
  opacity: 0.9;
}

.sgb-result {
  margin-top: 24px;
}

.sgb-chooser-header {
  font-weight: 700;
  margin-bottom: 6px;
}

.sgb-chooser-status {
  color: #5f5f5f;
  margin-bottom: 16px;
}

.sgb-chooser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.sgb-choose-card {
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  padding: 16px;
  background: #faf9f6;
}

.sgb-choose-card.selected {
  border-color: #0f4c5c;
  box-shadow: 0 0 0 2px rgba(15, 76, 92, 0.2);
}

.sgb-choose-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin-bottom: 12px;
}

.sgb-choose-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.sgb-chooser-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sgb-loading {
  font-weight: 600;
}

.sgb-error {
  color: #b42318;
  font-weight: 600;
}

.sgb-note {
  color: #5f5f5f;
  font-size: 14px;
}

.sgb-password-hints {
  margin-bottom: 12px;
  font-size: 14px;
}

.sgb-hint {
  color: #5f5f5f;
}

.sgb-hint.ok {
  color: #027a48;
}

.sgb-hint.bad {
  color: #b42318;
}

.sgb-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.sgb-login-gate {
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  padding: 18px;
  background: #ffffff;
  margin: 18px 0;
}

.sgb-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.sgb-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.sgb-page {
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  padding: 14px;
  background: #faf9f6;
}

.sgb-page img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin-bottom: 10px;
}

.sgb-page-header {
  font-weight: 700;
  margin-bottom: 8px;
}

.sgb-history {
  max-width: 900px;
  margin: 0 auto;
}

.sgb-history-list {
  list-style: none;
  padding-left: 0;
}

.sgb-history-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e3e3e3;
}

.sgb-history-detail {
  max-width: 900px;
  margin: 0 auto;
}

.sgb-meta {
  color: #5f5f5f;
  margin-bottom: 20px;
}

.sgb-home {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.sgb-profile {
  max-width: 1100px;
  margin: 0 auto;
}

.sgb-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.sgb-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.sgb-success {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
}

.sgb-success p {
  margin: 0;
}

.sgb-hero {
  padding: 36px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff2e1, #e9f3f8);
}

.sgb-hero-text h1 {
  font-size: clamp(28px, 3vw, 42px);
  margin-bottom: 12px;
}

.sgb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.sgb-section h2 {
  margin-bottom: 16px;
}

.sgb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.sgb-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #e3e3e3;
  background: #ffffff;
}

.sgb-steps ol {
  padding-left: 20px;
}

.sgb-cta {
  padding: 24px;
  border-radius: 16px;
  background: #f8f1e7;
}

.sgb-login {
  max-width: 460px;
  margin: 0 auto;
}

.sgb-register {
  max-width: 460px;
  margin: 0 auto;
}

.sgb-resend {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e3e3e3;
}

.sgb-resend h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.sgb-login-card {
  border: 1px solid #e3e3e3;
  border-radius: 16px;
  padding: 24px;
  background: #ffffff;
}

.sgb-google {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #d2d2d2;
  margin-bottom: 10px;
  color: #1f1f1f;
}

.sgb-story-meta {
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  padding: 12px 14px;
  background: #faf9f6;
  margin-bottom: 18px;
}

.sgb-story-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.sgb-story-details {
  color: #5f5f5f;
  font-size: 14px;
}

.sgb-character-list,
.sgb-character-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.sgb-character-card {
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
}

.sgb-character-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sgb-remove-character {
  padding: 6px 12px;
  font-size: 14px;
}
