:root {
  --bg: #f8f6f1;
  --surface: #f3f0ea;
  --surface-2: #ece8e1;
  --text: #121417;
  --text-2: #47505a;
  --text-3: #6b7280;
  --line: rgba(18, 20, 23, 0.08);
  --teal: #1f8a85;
  --teal-dark: #176d68;
  --teal-tint: rgba(31, 138, 133, 0.1);
  --white: #ffffff;
  --danger: #8b3a3a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
}

.phone-shell {
  width: min(100vw, 390px);
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 76px;
  padding: 20px 16px 0;
  background: rgba(248, 246, 241, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.topbar-row {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 22px;
  font-weight: 650;
  line-height: 1;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-button,
.avatar-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  display: inline-grid;
  place-items: center;
  transition: background 160ms ease, transform 160ms ease;
}

.icon-button:active,
.avatar-button:active,
.primary-button:active,
.secondary-button:active {
  transform: scale(0.98);
}

.icon-button:hover,
.avatar-button:hover {
  background: var(--surface-2);
}

.notification-button {
  position: relative;
}

.notification-button.active {
  background: var(--surface-2);
}

.bell {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 9px 9px 6px 6px;
  display: grid;
  place-items: center;
  font-size: 0;
}

.bell::after {
  content: "";
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(10px);
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--teal);
  border: 2px solid var(--bg);
}

.notifications-menu {
  position: absolute;
  top: 68px;
  right: 12px;
  width: min(340px, calc(100vw - 24px));
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.14);
  display: grid;
  gap: 8px;
}

.notifications-title {
  font-size: 13px;
  font-weight: 750;
  color: var(--text-2);
  padding: 2px 4px;
}

.notification-item {
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 4px;
}

.notification-item:hover {
  background: var(--surface-2);
}

.notification-item span {
  font-size: 13px;
  line-height: 18px;
}

.notification-item small {
  color: var(--text-3);
  font-size: 11px;
}

.screen {
  min-height: calc(100vh - 76px);
}

.feed-screen {
  padding: 16px 16px 104px;
}

.auth-screen {
  min-height: 100vh;
  padding: 72px 16px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-hero {
  padding-top: 32px;
}

.auth-title {
  max-width: 340px;
  font-size: 32px;
  line-height: 37px;
  font-weight: 650;
  margin: 0 0 16px;
}

.auth-copy {
  color: var(--text-2);
  font-size: 16px;
  line-height: 24px;
  margin: 0;
  max-width: 330px;
}

.auth-panel,
.sheet-panel {
  width: 100%;
  min-width: 0;
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--line);
}

.tabs {
  height: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
}

.tab {
  min-width: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
}

.tab.active {
  background: var(--white);
  color: var(--text);
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  outline: none;
}

.input,
.select {
  min-height: 44px;
}

.textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 20px;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-tint);
}

.primary-button,
.secondary-button,
.text-button,
.small-button {
  min-height: 44px;
  border-radius: 16px;
  font-weight: 650;
}

.small-button.active {
  background: var(--text);
  color: var(--white);
}

.primary-button {
  background: var(--text);
  color: var(--white);
}

.secondary-button {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--line);
}

.small-button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-size: 13px;
}

.text-button {
  background: transparent;
  color: var(--teal-dark);
  min-height: 32px;
  padding: 0;
}

.hint,
.error,
.success {
  font-size: 13px;
  line-height: 18px;
  margin: 0;
}

.hint {
  color: var(--text-3);
}

.error {
  color: var(--danger);
}

.success {
  color: var(--teal-dark);
}

.feed-list {
  display: grid;
  gap: 28px;
}

.composer-box {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-3);
  text-align: left;
  border: 1px solid var(--line);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.composer-box:hover {
  background: var(--white);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.07);
}

.composer-box:active {
  transform: scale(0.985);
  background: var(--surface-2);
}

.empty-state {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-2);
  padding: 24px;
}

.empty-mark {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 28px;
  margin-bottom: 16px;
}

.post {
  display: grid;
  gap: 12px;
  cursor: pointer;
}

.post-header,
.comment-row,
.identity-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
}

.avatar-link,
.author-link {
  min-width: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.avatar-link {
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

.author-link {
  display: grid;
  gap: 0;
}

.author-link:hover .author-name,
.author-link:hover h3 {
  color: var(--teal-dark);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}

.author-meta {
  font-size: 12px;
  color: var(--text-3);
  line-height: 16px;
}

.post-time {
  color: var(--text-3);
  font-size: 12px;
}

.post-body {
  font-size: 15px;
  line-height: 22px;
  white-space: pre-wrap;
}

.post-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
  background: var(--surface-2);
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
}

.action-button {
  min-width: 72px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  background: transparent;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.action-button:hover {
  background: var(--surface);
}

.action-button.active {
  color: var(--teal-dark);
}

.comments {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 12px;
  cursor: default;
}

.comment-row {
  grid-template-columns: 32px 1fr auto;
  align-items: start;
}

.comment-row .avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.comment-row .avatar-link {
  width: 32px;
  height: 32px;
}

.comment-copy {
  min-width: 0;
}

.comment-block {
  display: grid;
  gap: 8px;
}

.comment-replies {
  display: grid;
  gap: 10px;
  margin-left: 42px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.reply-form {
  margin-left: 42px;
}

.comment-body {
  font-size: 14px;
  line-height: 20px;
}

.comment-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.comment-like,
.quiet-delete {
  min-height: 24px;
  padding: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 650;
}

.comment-like.active {
  color: var(--teal-dark);
}

.quiet-delete {
  width: 24px;
  border-radius: 999px;
  opacity: 0.45;
}

.quiet-delete:hover {
  background: var(--surface-2);
  opacity: 1;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
}

.comment-form .input {
  border-radius: 999px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  bottom: 0;
  transform: none;
  width: min(100vw, 390px);
  height: 78px;
  padding: 8px 16px 18px;
  background: rgba(248, 246, 241, 0.94);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  z-index: 20;
}

.detail-screen .post {
  cursor: default;
}

.back-button {
  margin-bottom: 14px;
}

.profile-detail-card {
  display: grid;
  gap: 12px;
}

.profile-banner {
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-2);
}

.profile-line {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
}

.nav-button {
  border-radius: 16px;
  background: transparent;
  color: var(--text-3);
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 650;
}

.nav-button.active {
  background: var(--teal-tint);
  color: var(--teal-dark);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 23, 0.24);
  z-index: 30;
  display: grid;
  align-items: end;
  justify-items: center;
}

.drawer {
  width: min(100%, 430px);
  max-height: 88vh;
  overflow: auto;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  padding: 12px 16px 24px;
  box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.1);
}

.drawer-handle {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  margin: 0 auto 16px;
}

.drawer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.drawer-title h2 {
  font-size: 22px;
  line-height: 28px;
  margin: 0;
}

.post-detail {
  max-height: 92vh;
}

.post-detail .post {
  cursor: default;
}

.section-title {
  font-size: 13px;
  font-weight: 750;
  color: var(--text-2);
  margin: 20px 0 8px;
}

.company-list,
.identity-list {
  display: grid;
  gap: 8px;
}

.company-card {
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.company-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.company-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 19px;
}

.plus-row {
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  text-align: left;
  font-weight: 650;
}

.plus-row span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--white);
  font-size: 20px;
  line-height: 1;
}

.keep-composer {
  min-height: 132px;
  background: #fffef8;
  box-shadow: inset 0 -3px 0 rgba(31, 138, 133, 0.12);
}

.hidden {
  display: none !important;
}

@media (min-width: 700px) {
  body {
    background:
      linear-gradient(90deg, rgba(18, 20, 23, 0.04) 0, transparent 18%, transparent 82%, rgba(18, 20, 23, 0.04) 100%),
      var(--bg);
  }

  .phone-shell {
    margin: 0 auto;
    box-shadow: 0 0 0 1px var(--line);
  }

  .bottom-nav {
    left: 50%;
    transform: translateX(-50%);
  }
}
