* {
  box-sizing: border-box;
}

body.page {
  margin: 0;
  font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f7f4ef;
  color: #111318;
}

.shell {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.shell-wide {
  max-width: 980px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.eyebrow-centered {
  justify-self: center;
  margin: 0;
}

.hero-spacer {
  display: block;
}

.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-row-centered {
  justify-content: center;
}

.hero-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.name-edit-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.name-edit-form input {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.lang-toggle {
  display: inline-flex;
  gap: 8px;
}

.lang-toggle button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-toggle button.active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #6b7280;
  margin: 0;
}

h1 {
  font-size: 36px;
  margin: 0;
}

.subtitle {
  font-size: 18px;
  margin: 0;
  color: #4b5563;
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.card {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.saved-guides-card {
  margin-top: 24px;
}

h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-icon {
  padding: 8px 10px;
  font-size: 14px;
  position: relative;
}

.copy-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -6px);
  background: #111827;
  color: #f9fafb;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.btn-primary {
  background: #111827;
  color: #f9fafb;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}

.inline-form {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

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

.field-help {
  font-size: 12px;
  color: #6b7280;
}

.phone-input {
  direction: ltr;
  text-align: left;
}

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

.helper {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.text-link {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 12px;
}

.back-link:hover {
  text-decoration: underline;
}

.share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.share-input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
}

.step-block {
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
}

.step-block:first-of-type {
  border-top: none;
}

.step-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  color: #374151;
}

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saved-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #e5e7eb;
}

.saved-row:first-child {
  border-top: none;
}

.saved-info {
  font-weight: 600;
  color: #374151;
  text-align: left;
  order: 1;
}

.saved-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  order: 2;
}

.rtl .saved-row {
  flex-direction: row-reverse;
}

.rtl .saved-info {
  text-align: right;
  order: 2;
}

.rtl .saved-actions {
  order: 1;
}

.rtl .hero-row {
  flex-direction: row-reverse;
}

.rtl .hero {
  text-align: right;
}

.rtl .cta-row {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.rtl .share-row {
  grid-template-columns: auto auto minmax(0, 1fr);
}

.rtl .step-meta {
  flex-direction: row-reverse;
}

.step-thumb {
  width: 100%;
  max-width: 360px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: block;
}

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

.step-delete {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .share-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
}
