:root {
  --blue: #1877f2;
  --text: #050505;
  --muted: #65676b;
  --line: #dddfe2;
  --soft: #f0f2f5;
  --card: #ffffff;
  --danger: #d93025;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #d9dbe1;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone-shell {
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--card);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
}

.hidden {
  display: none !important;
}

.auth-view {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 100vh;
  padding: 24px;
  background: var(--soft);
}

.auth-brand {
  text-align: center;
}

.auth-brand img {
  width: 82px;
  height: 82px;
  border-radius: 22px;
}

.auth-brand h1 {
  margin: 10px 0 4px;
  color: var(--blue);
  font-size: 36px;
  letter-spacing: -1px;
}

.auth-brand p {
  margin: 0;
  color: var(--muted);
}

.auth-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.auth-card h2 {
  margin: 0 0 4px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
}

textarea {
  resize: vertical;
}

.primary,
.secondary,
.text-btn {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: var(--blue);
}

.secondary {
  color: var(--text);
  background: var(--soft);
}

.text-btn {
  color: var(--blue);
  background: transparent;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.mobile-top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: max(8px, env(safe-area-inset-top)) 14px 8px;
}

.wordmark {
  flex: 1;
  color: var(--blue);
  font-size: 31px;
  line-height: 1;
  letter-spacing: -1.5px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #000;
  background: #f2f3f5;
  border: 0;
  border-radius: 50%;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}

.composer-strip {
  display: grid;
  grid-template-columns: 48px 1fr 34px;
  gap: 10px;
  align-items: center;
  padding: 8px 14px 12px;
}

.composer-strip img,
.mini-avatar img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.composer-strip button:not(.photo-btn) {
  height: 42px;
  padding: 0 18px;
  text-align: left;
  color: #111;
  background: #fff;
  border: 1px solid #ccd0d5;
  border-radius: 999px;
}

.photo-btn {
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 26px;
}

.feed-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 54px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.feed-tabs button {
  color: var(--muted);
  background: #fff;
  border: 0;
  font-weight: 800;
}

.feed-tabs button.active {
  color: var(--blue);
  box-shadow: inset 0 -4px 0 var(--blue);
}

.stories-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 8px 10px;
  background: #fff;
  border-bottom: 8px solid var(--soft);
  scroll-snap-type: x mandatory;
}

.story-card {
  position: relative;
  flex: 0 0 126px;
  height: 214px;
  overflow: hidden;
  background: #f5f6f7;
  border: 1px solid var(--line);
  border-radius: 12px;
  scroll-snap-align: start;
}

.story-image {
  height: 142px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.12)),
    url("Recursos/ICOON%20APP.png") center/cover no-repeat;
}

.story-card span {
  position: absolute;
  top: 120px;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border: 4px solid #fff;
  border-radius: 50%;
  translate: -50% 0;
  font-size: 38px;
  line-height: 1;
}

.story-card strong {
  position: absolute;
  right: 10px;
  bottom: 12px;
  left: 10px;
  text-align: center;
  font-size: 15px;
}

.empty-story {
  display: grid;
  place-items: end start;
  padding: 12px;
  color: #fff;
  background: linear-gradient(160deg, #444, #111);
}

.empty-story strong {
  position: static;
  text-align: left;
}

.notice {
  margin: 0;
  padding: 14px;
  color: #5f4300;
  background: #fff6d7;
  border-bottom: 1px solid #f1d47a;
}

.feed-list {
  display: grid;
  gap: 8px;
  padding-bottom: 86px;
  background: var(--soft);
}

.post {
  padding: 12px 14px 0;
  background: #fff;
}

.post-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-weight: 900;
}

.post-meta {
  color: var(--muted);
  font-size: 13px;
}

.post-menu {
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 28px;
}

.post p {
  margin: 12px 0 14px;
  font-size: 18px;
  line-height: 1.28;
}

.post-category {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 9px;
  color: var(--blue);
  background: #e7f0ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.post-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.post-actions button {
  min-height: 44px;
  color: var(--muted);
  background: #fff;
  border: 0;
  font-weight: 800;
}

.empty-feed {
  padding: 34px 24px;
  text-align: center;
  background: #fff;
}

.empty-feed h2 {
  margin: 0 0 8px;
}

.empty-feed p {
  margin: 0;
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: min(100vw, 430px);
  height: 62px;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid var(--line);
}

.bottom-nav button {
  color: #111;
  background: #fff;
  border: 0;
  font-size: 28px;
}

.bottom-nav button.active {
  color: var(--blue);
}

.mini-avatar img {
  width: 32px;
  height: 32px;
}

.modal {
  width: min(398px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 14px;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.48);
}

.modal form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.modal h2 {
  margin: 0;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (min-width: 431px) {
  body::before {
    content: "Vista movil";
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 20;
    padding: 6px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 999px;
    translate: -50% 0;
    font-size: 12px;
  }
}
