:root {
  --bg: #d8e7f4;
  --panel: #ffffff;
  --line: #b7cde0;
  --line-soft: #d6e4ef;
  --blue: #4377a8;
  --blue-dark: #2d5e8d;
  --blue-light: #eaf4fb;
  --blue-title: #d9eaf7;
  --text: #333333;
  --muted: #6b7782;
  --pink: #e0529a;
  --link: #2b65a1;
  --cream: #fff9d9;
  --danger: #a33;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font: 12px/1.35 Arial, Helvetica, sans-serif;
}
button, input, textarea, select { font: inherit; }
button { touch-action: manipulation; }

.browser-note {
  padding: 4px 10px;
  text-align: center;
  color: #647688;
  background: #eef5fb;
  border-bottom: 1px solid #c7d8e7;
  font-size: 10px;
}

.topbar {
  background: #f7fbfe;
  border-bottom: 1px solid #a9c3d9;
}
.topbar-inner {
  max-width: 980px;
  min-height: 55px;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0 4px 2px;
  cursor: pointer;
  font: bold 31px/1 Verdana, Arial, sans-serif;
  letter-spacing: -3px;
  color: #4b8dc0;
}
.logo b { color: var(--pink); font-weight: 700; }
.main-nav { display: flex; gap: 4px; align-self: stretch; }
.main-nav button, .text-btn {
  border: 0;
  background: transparent;
  color: var(--link);
  cursor: pointer;
  text-decoration: underline;
}
.main-nav button {
  min-width: 58px;
  padding: 0 8px;
  text-decoration: none;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}
.main-nav button:hover, .main-nav button.active {
  background: #e5f1f9;
  border-color: #d2e1ec;
}
.account-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6f7e8a;
  white-space: nowrap;
}

.page-shell {
  max-width: 980px;
  margin: 10px auto 42px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) 220px;
  gap: 10px;
  align-items: start;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.card + .card { margin-top: 10px; }
.card-header {
  padding: 5px 8px;
  font-weight: bold;
  color: #315f88;
  background: var(--blue-title);
  border-bottom: 1px solid var(--line);
}
.card-body { padding: 9px; }

.profile-thumb {
  display: block;
  width: 124px;
  height: 124px;
  margin: 10px auto 8px;
  border: 1px solid #c3c3c3;
  padding: 3px;
  background: white;
  object-fit: cover;
}
.profile-name {
  padding: 0 9px 3px;
  text-align: center;
  font-weight: bold;
  color: #315f88;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.profile-meta { padding: 0 9px 8px; text-align: center; color: #666; }
.side-menu { border-top: 1px solid var(--line-soft); }
.side-menu button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e3edf5;
  background: #f6fbfe;
  color: var(--link);
  padding: 5px 9px;
  text-align: left;
  cursor: pointer;
}
.side-menu button:hover, .side-menu button.active { background: #e3f0f9; font-weight: bold; }
.side-note { padding: 8px 9px; color: #6d7a85; font-size: 10px; background: #fbfdff; }

.welcome {
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.welcome h1, .page-title {
  margin: 0 0 8px;
  font: normal 20px Arial, Helvetica, sans-serif;
  color: #5f6d79;
}
.welcome h1 strong, .page-title strong { color: #315f88; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 0 10px;
}
.stat {
  min-height: 58px;
  border: 1px solid #d6e4ef;
  background: #f4f9fd;
  padding: 7px;
  text-align: center;
  color: #667782;
}
.stat strong { display: block; color: #326797; font-size: 17px; margin-top: 2px; }

.legacy-box {
  margin-top: 10px;
  border: 1px solid #c9ddeb;
  background: white;
}
.legacy-box-title {
  padding: 5px 8px;
  background: #e8f3fa;
  border-bottom: 1px solid #c9ddeb;
  color: #315f88;
  font-weight: bold;
}
.legacy-box-body { padding: 9px; }

.status-form, .scrap-form, .message-form, .friend-form, .profile-form, .topic-form {
  display: grid;
  gap: 7px;
}
textarea, input[type="text"], input[type="email"], input[type="date"], select {
  width: 100%;
  border: 1px solid #9bb4c7;
  background: white;
  padding: 7px;
  border-radius: 1px;
  color: #333;
  min-height: 31px;
}
textarea { min-height: 76px; resize: vertical; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.primary-btn, .secondary-btn, .danger-btn {
  border: 1px solid #6d91ae;
  background: linear-gradient(#ffffff, #dbeaf4);
  padding: 5px 11px;
  border-radius: 2px;
  cursor: pointer;
  color: #2f5f87;
  font-weight: bold;
}
.primary-btn:hover, .secondary-btn:hover { background: #edf6fc; }
.secondary-btn { font-weight: normal; }
.danger-btn { border-color: #c7a0a0; color: var(--danger); background: #fffafa; font-weight: normal; }
.link-btn {
  border: 0; background: none; color: var(--link); text-decoration: underline; padding: 0; cursor: pointer;
}

.activity-list, .scrap-list, .message-list, .topic-list { display: grid; gap: 7px; }
.activity, .scrap, .message-item, .topic-item {
  border-bottom: 1px solid #e1e9ef;
  padding: 7px 0 9px;
}
.activity:last-child, .scrap:last-child, .message-item:last-child, .topic-item:last-child { border-bottom: 0; }
.item-head { display: flex; gap: 8px; align-items: flex-start; }
.mini-avatar {
  width: 46px; height: 46px; flex: 0 0 46px; object-fit: cover; background: #e5eef5; border: 1px solid #c9d4dc; padding: 2px;
}
.tiny-avatar {
  width: 54px; height: 54px; object-fit: cover; background: #e5eef5; border: 1px solid #c9d4dc; padding: 2px;
}
.item-content { min-width: 0; flex: 1; }
.item-content strong { color: #326797; }
.item-content p { margin: 3px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.item-meta { color: #8b969f; font-size: 10px; }

.friend-grid, .community-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.friend-cell, .community-cell { min-width: 0; text-align: center; }
.friend-cell img, .community-cell img {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 3px;
  object-fit: cover;
  border: 1px solid #c8d2da;
  padding: 2px;
  background: #fff;
}
.friend-cell button, .community-cell button {
  width: 100%;
  border: 0;
  background: none;
  color: var(--link);
  font-size: 10px;
  line-height: 1.15;
  cursor: pointer;
  overflow-wrap: anywhere;
  padding: 0;
}
.right-column .footer-link { display: block; padding: 7px 9px; border-top: 1px solid #e0e8ef; color: var(--link); text-align: right; }

.profile-table { width: 100%; border-collapse: collapse; }
.profile-table td { padding: 5px 7px; border-bottom: 1px solid #edf1f4; vertical-align: top; }
.profile-table td:first-child { width: 132px; color: #81909c; text-align: right; }
.profile-table td:last-child { color: #333; overflow-wrap: anywhere; }
.rating-row { display: flex; gap: 18px; flex-wrap: wrap; padding: 6px 0; }
.rating { color: #777; }
.rating .icons { color: #e4a500; letter-spacing: 1px; }

.friend-list-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e5edf3;
}
.friend-list-row .friend-info { flex: 1; min-width: 0; }
.friend-list-row .friend-info strong { color: #326797; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.photo-card { border: 1px solid #cad9e4; background: #f9fcfe; padding: 5px; }
.photo-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #eef3f7; }
.photo-card .caption { padding: 5px 1px 3px; font-size: 11px; overflow-wrap: anywhere; }

.inbox-table { width: 100%; border-collapse: collapse; }
.inbox-table tr { border-bottom: 1px solid #dfe9f0; cursor: pointer; }
.inbox-table tr:hover { background: #f3f8fc; }
.inbox-table td { padding: 7px 5px; vertical-align: top; }
.inbox-table .unread { font-weight: bold; }

.community-hero { display: flex; gap: 12px; align-items: flex-start; }
.community-hero img { width: 90px; height: 90px; object-fit: cover; border: 1px solid #cad7df; padding: 3px; }
.community-meta { flex: 1; }
.community-meta h2 { margin: 0 0 4px; font-size: 18px; color: #356990; font-weight: normal; }

.notice {
  background: var(--cream);
  border: 1px solid #e6d88f;
  padding: 8px;
  color: #6f6234;
  margin-top: 9px;
}
.empty { padding: 18px 8px; text-align: center; color: #8795a0; }
.count-badge { color: #667782; font-weight: normal; }

.mobile-nav { display: none; }
.modal { border: 0; padding: 0; background: transparent; width: min(92vw, 430px); }
.modal::backdrop { background: rgba(20, 37, 52, .42); }
.modal-box { margin: 0; padding: 0; background: white; border: 2px solid #9eb8ca; border-radius: 3px; box-shadow: 0 12px 38px rgba(0,0,0,.25); max-height: 80vh; overflow: auto; }
.modal-title { padding: 7px 9px; background: #dcecf7; border-bottom: 1px solid #b9cfde; color: #315f88; font-weight: bold; }
.modal-content { padding: 10px; }

@media (max-width: 820px) {
  body { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  .browser-note { display: none; }
  .topbar-inner { min-height: 49px; padding: 0 8px; gap: 8px; }
  .logo { font-size: 28px; }
  .main-nav { display: none; }
  .account-tools { font-size: 10px; }
  .page-shell { grid-template-columns: 1fr; margin-top: 7px; padding: 0 7px; }
  .left-column { display: none; }
  .right-column { order: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .right-column .card + .card { margin-top: 0; }
  .content-column { order: 1; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-table td:first-child { width: 95px; }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #9db8cd;
    background: #edf6fc;
  }
  .mobile-nav button {
    min-height: 44px;
    border: 0;
    border-right: 1px solid #cbdce8;
    background: transparent;
    color: #2f6591;
    font-size: 10px;
  }
  .mobile-nav button.active { background: #d9ebf7; font-weight: bold; }
}

@media (max-width: 500px) {
  .right-column { grid-template-columns: 1fr; }
  .right-column .card + .card { margin-top: 0; }
  .welcome { padding: 10px; }
  .welcome h1, .page-title { font-size: 18px; }
  .friend-grid, .community-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .friend-cell img, .community-cell img { width: 52px; height: 52px; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .community-hero img { width: 76px; height: 76px; }
}

/* Recursos multiplayer: mantém o desenho original do Orkut 2005 */
#noticeArea { max-width:980px; margin: 7px auto 0; padding:0 10px; }
#noticeArea:empty { display:none; }
#noticeArea .notice { margin:0; }
#noticeArea .notice.error { background:#fff0f0; border-color:#dbaaaa; color:#8a2929; }
#noticeArea .notice.success { background:#f0fff0; border-color:#acd4b0; color:#326c37; }
.auth-card { max-width:520px; margin: 28px auto; }
.auth-card h1 { color:#315f88; font-weight:normal; font-size:22px; margin:0 0 8px; }
.auth-grid { display:grid; gap:10px; }
.auth-grid label,.profile-form label,.topic-form label,.message-form label { display:grid; gap:4px; color:#657587; }
input[type="password"],input[type="number"],input[type="search"],input[type="url"] {
 width:100%; padding:7px; min-height:31px; background:white; color:#333; border:1px solid #9bb4c7; border-radius:1px;
}
button:disabled { opacity:.55; cursor:wait; }
.person-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.person-card { display:flex; gap:10px; padding:8px; border:1px solid #d6e5ed; background:#fbfdff; min-width:0; }
.person-card img { width:62px; height:62px; object-fit:cover; border:1px solid #c2d2de; }
.person-card-info { min-width:0; flex:1; }
.person-card-info strong { color:#326797; overflow-wrap:anywhere; }
.person-card-info p { margin:3px 0; font-size:11px; color:#717d87; }
.person-card .btn-row { margin-top:5px; }
.banner { display:block; width:100%; max-height:175px; min-height:90px; object-fit:cover; background:linear-gradient(115deg,#e5edf6,#c6e0f1 55%,#f4d2e5); border-bottom:1px solid #b7cde0; }
.profile-cover { display:flex; align-items:flex-end; gap:12px; padding:10px; border-bottom:1px solid #e4edf3; }
.profile-cover .profile-thumb { width:104px; height:104px; margin:0; flex:none; }
.muted { color:#81909c; }
.chip { display:inline-block; background:#fce9f3; border:1px solid #efc0d8; color:#ac4b85; border-radius:3px; padding:2px 5px; font-size:10px; }
.thread-reply { border-left:3px solid #d3e5f2; margin:10px 0; padding:4px 8px; }
.thread-reply p { white-space:pre-wrap; margin:3px 0; }
.list-actions { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.inline-btn { color:#316c9b; border:1px solid #b8d2e4; background:#f3f9fd; cursor:pointer; padding:3px 7px; }
.community-banner { width:100%; max-height:140px; object-fit:cover; display:block; background:#e6f1f8; }
.community-tile { display:flex; gap:10px; padding:8px 0; border-bottom:1px solid #e2eaf1; align-items:center; }
.community-tile img { width:55px; height:55px; object-fit:cover; border:1px solid #bfd0db; }
.community-tile .item-content { flex:1; }
small { color:#7f8b95; }
#modalBox { padding:0; }
#modalBox form { padding:10px; display:grid; gap:9px; }
#modalBox .modal-message { padding:10px; }
#modalBox .modal-message p { white-space:pre-wrap; }
#modalBox .modal-title { display:flex; justify-content:space-between; align-items:center; }
#modalBox .modal-title .text-btn { text-decoration:none; font-weight:bold; }
#logoutBtn[hidden] { display:none; }
@media(max-width:520px) {
 .person-list { grid-template-columns:1fr; }
 .profile-cover { align-items:center; }
 .profile-cover .profile-thumb {width:76px;height:76px;}
}
/* Janela de bate-papo com visual do antigo MSN */
.msn-head { display:flex; gap:9px; align-items:center; background:#eef8ff; border:1px solid #c1d7e7; padding:8px; }
.msn-selector { display:block; margin:10px 0 6px; color:#667; }
.msn-selector select { max-width:300px; display:block; margin-top:4px; }
.msn-thread { background:#fff; border:1px inset #a6c4d9; padding:10px; height:315px; overflow:auto; }
.msn-line { margin-bottom:10px; padding:6px 8px; border-radius:3px; max-width:95%; overflow-wrap:anywhere; }
.msn-line.mine { background:#e5f4ff; margin-left:auto; }
.msn-line.theirs { background:#f6edf7; margin-right:auto; }
.msn-line.mine strong {color:#2c68a1;}
.msn-line.theirs strong {color:#a04683;}
.mobile-shortcuts { display:none; }
@media (max-width:820px) {
 .mobile-shortcuts { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin-bottom:7px; }
 .mobile-shortcuts button { flex:1 0 auto; font-size:11px; min-height:31px; }
}
