.tya-dashboard-root,
.tya-login-box {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24312f;
}

.tya-dashboard-root *,
.tya-login-box * {
  box-sizing: border-box;
}

.tya-shell,
.tya-login-box {
  max-width: 1120px;
  margin: 32px auto;
  padding: 28px;
  border: 1px solid #dbe8df;
  border-radius: 18px;
  background: #fbfdf9;
  box-shadow: 0 14px 40px rgba(36, 49, 47, 0.08);
}

.tya-loading,
.tya-error,
.tya-empty {
  max-width: 760px;
  margin: 32px auto;
  padding: 24px;
  border-radius: 14px;
  background: #f4f8f2;
  text-align: center;
}

.tya-error {
  background: #fff1f1;
  color: #8a2020;
}

.tya-hero {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 26px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff8ed, #fff8e7);
}

.tya-hero h2,
.tya-login-box h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.tya-hero p,
.tya-login-box p {
  margin: 0;
  line-height: 1.8;
}

.tya-eyebrow {
  display: inline-flex;
  margin-bottom: 10px !important;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(82, 133, 92, 0.12);
  color: #47764f;
  font-weight: 700;
  font-size: 13px;
}

.tya-logout,
.tya-note-box a,
.tya-login-primary,
.tya-login-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.tya-logout,
.tya-login-secondary {
  background: #ffffff;
  border: 1px solid #cfe0d5;
  color: #365840;
}

.tya-login-primary,
.tya-note-box a,
.tya-primary {
  background: #52855c;
  color: #ffffff;
  border: none;
}

.tya-stats {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
  gap: 18px;
  margin-bottom: 22px;
}

.tya-progress-card,
.tya-age-stats,
.tya-start-panel,
.tya-note-box {
  padding: 22px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e1ebe4;
}

.tya-progress-card p,
.tya-age-stats p,
.tya-note-box h3 {
  margin: 0 0 10px;
  font-weight: 700;
}

.tya-progress-card strong {
  display: block;
  font-size: 34px;
  margin-bottom: 12px;
}

.tya-progress-card em,
.tya-age-row em {
  font-style: normal;
  font-weight: 700;
  color: #52855c;
}

.tya-progress-bar,
.tya-age-row div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #edf3ef;
}

.tya-progress-bar span,
.tya-age-row b {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #74a979;
  transition: width 0.25s ease;
}

.tya-age-row {
  display: grid;
  grid-template-columns: 82px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 14px;
}

.tya-controls {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr 0.8fr;
  gap: 12px;
  margin-bottom: 22px;
}

.tya-controls label,
.tya-start-panel label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #4b5e58;
}

.tya-controls input,
.tya-controls select,
.tya-start-panel select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cfddd3;
  border-radius: 12px;
  background: #ffffff;
  color: #24312f;
}

.tya-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 1100px) {
  .tya-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .tya-card {
    min-height: 240px;
    padding: 18px;
  }

  .tya-card h3 {
    font-size: 18px;
    line-height: 1.45;
  }

  .tya-card p {
    font-size: 14px;
    line-height: 1.7;
  }
}

.tya-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid #e0ebe3;
  border-radius: 16px;
  background: #ffffff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tya-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(36, 49, 47, 0.08);
}

.tya-card.is-done {
  border-color: #9fcaa8;
  background: #f7fcf7;
}

.tya-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tya-number {
  color: #789083;
  font-size: 13px;
  font-weight: 700;
}

.tya-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #cfe0d5;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.tya-check input {
  width: 17px;
  height: 17px;
}

.tya-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.45;
}

.tya-card p {
  margin: 0 0 12px;
  line-height: 1.75;
  color: #4f625b;
}

.tya-tags,
.tya-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tya-tags span,
.tya-meta span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f0f5f1;
  color: #3f5948;
  font-size: 12px;
  font-weight: 700;
}

.tya-meta {
  margin-top: 8px;
}

.tya-meta span {
  background: #fbf5e4;
  color: #715d2d;
}

.tya-safety {
  margin-top: 12px !important;
  padding: 10px;
  border-radius: 10px;
  background: #fff7e9;
  color: #7a5725 !important;
  font-size: 13px;
}

.tya-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tya-share button,
.tya-share a,
.tya-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #cfe0d5;
  background: #ffffff;
  color: #365840;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.tya-primary {
  min-height: 48px;
  padding: 12px 18px;
  border: none;
  color: #ffffff;
  font-size: 15px;
}

.tya-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.tya-start-panel {
  display: grid;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}

.tya-small,
.tya-login-note {
  color: #687970;
  font-size: 13px;
}

.tya-note-box {
  margin-top: 24px;
  background: #fffdf7;
}

.tya-note-box p {
  margin: 0 0 14px;
  line-height: 1.8;
}

.tya-note-box span {
  color: #697a72;
  font-size: 14px;
}

.tya-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 10px;
}

@media (max-width: 820px) {
  .tya-shell,
  .tya-login-box {
    padding: 18px;
    margin: 20px auto;
    border-radius: 14px;
  }

  .tya-hero,
  .tya-stats,
  .tya-controls,
  .tya-card-grid {
    grid-template-columns: 1fr;
  }

  .tya-hero {
    display: block;
    padding: 20px;
  }

  .tya-logout {
    margin-top: 14px;
  }

  .tya-card {
    min-height: auto;
  }
}

/* v0.1.1: generator button visibility guard */
.tya-generator-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.tya-start-panel .tya-generate-button,
.tya-start-panel button.tya-primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border: 0 !important;
  border-radius: 999px;
  background: #52855c !important;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  opacity: 1;
  visibility: visible !important;
}

.tya-start-panel .tya-generate-button:disabled,
.tya-start-panel button.tya-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}
