/* ============================================================
   Hyves recreation — classic three-column profile (2007 look)
   ============================================================ */

:root {
  --hyves-orange: #ec7404;
  --hyves-orange-dark: #c95f00;
  --nav-blue: #3f6fc4;
  --nav-blue-dark: #2f57a0;
  --title-blue: #2f5aa8;
  --link: #2f5aa8;
  --link-orange: #d8690a;
  --text: #333;
  --muted: #888;
  --box-border: #cfd6df;
  --page-bg: #d7dce3;
  --peach: #ffe9d6;
  --peach-line: #ffd2a8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: Tahoma, Verdana, Geneva, sans-serif;
  font-size: 11px;
  line-height: 1.5;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Logo wordmark ---------- */
.logo-word {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: bold;
  color: var(--hyves-orange);
  font-size: 30px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}
.logo-word.small { font-size: 14px; }

/* ---------- Logo image ---------- */
.logo-img { display: block; height: 40px; width: auto; }
.logo-img.small { height: 30px; }

/* ---------- Avatar images (uploaded photos) ---------- */
.ava-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.profile-photo .ava-img { border-radius: 0; }

/* ---------- Frame ---------- */
.hyves-frame {
  max-width: 980px;
  margin: 16px auto;
  background: #fff;
  border: 1px solid #b9c0cb;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
/* Round the top corners here since the frame no longer clips (so the smiley
   popup can extend past box edges without being cut off). */
.topbar { border-radius: 8px 8px 0 0; }

.site-header { position: relative; }

/* ---------- Top bar ---------- */
.topbar {
  background: linear-gradient(to bottom, #fdf6dd 0%, #fbe4a6 55%, #f6c96d 100%);
  border-bottom: 1px solid #e3b35e;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-tagline { color: #8a6a2b; font-size: 11px; font-style: italic; }

.account-area {
  text-align: right;
  color: #5b4a26;
  font-size: 11px;
  line-height: 1.7;
}
.account-area a { color: #2f57a0; }
.account-area .acct-line2 { color: #7a6534; }
.account-area .online-dot { color: #3a8a3a; }
.account-area .loading { opacity: .7; }

@media (min-width: 641px) {
  .account-area {
    position: absolute;
    top: 8px;
    right: 18px;
    z-index: 2;
  }
}

/* ---------- Nav ---------- */
.mainnav {
  background: linear-gradient(to bottom, #5a86d2, var(--nav-blue));
  border-bottom: 2px solid var(--nav-blue-dark);
  display: flex;
  align-items: center;
  padding: 0 10px;
}
.mainnav a {
  color: #fff;
  font-weight: bold;
  padding: 8px 14px;
  font-size: 12px;
  border-right: 1px solid rgba(255, 255, 255, .18);
}
.mainnav a:first-of-type { border-left: 1px solid rgba(255, 255, 255, .18); }
.mainnav a:hover { background: rgba(255, 255, 255, .18); text-decoration: none; }

.mainnav > .account-area a {
  color: #2f57a0;
  font-weight: normal;
  padding: 0;
  border: none;
}
.mainnav > .account-area a strong { color: #2f57a0; font-weight: bold; }
.mainnav > .account-area a:hover {
  background: transparent;
  text-decoration: underline;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--nav-blue-dark);
  border-radius: 4px;
  background: linear-gradient(to bottom, #5a86d2, var(--nav-blue));
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}
.nav-toggle:hover { background: linear-gradient(to bottom, #6b94db, #436fc0); }
.nav-toggle-icon { font-size: 16px; line-height: 1; }

.slide-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 250;
}
.slide-backdrop.hidden { display: none; }

body.nav-open { overflow: hidden; }

.searchbox {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
}
.search-label { color: #fff; font-size: 11px; }
.searchbox input {
  border: 1px solid var(--nav-blue-dark);
  border-radius: 3px;
  padding: 3px 6px;
  width: 130px;
  font-size: 11px;
  outline: none;
}
.searchbox button {
  border: 1px solid var(--nav-blue-dark);
  background: #fff;
  color: var(--nav-blue-dark);
  border-radius: 3px;
  padding: 2px 8px;
  cursor: pointer;
  font-weight: bold;
}

/* ---------- Profile page ---------- */
.profile-page { padding: 14px 18px 4px; }

.profile-titlebar {
  border-bottom: 1px solid #e2e6ec;
  padding-bottom: 8px;
  margin-bottom: 12px;
  position: relative;
}
.profile-titlebar h1 {
  margin: 0;
  font-size: 22px;
  color: var(--title-blue);
  font-weight: bold;
}
.profile-titlebar h1 .paren { color: #9aa6b8; font-weight: normal; }
.profile-sublinks { margin-top: 3px; color: #aab2bf; font-size: 11px; }
.profile-sublinks a { color: var(--link); }
.own-design {
  position: absolute;
  right: 0;
  top: 4px;
  color: var(--link-orange);
  font-size: 11px;
}

/* ---------- Three columns ---------- */
.three-col { display: flex; gap: 16px; align-items: flex-start; }
.col-left { width: 132px; flex-shrink: 0; }
.col-mid { flex: 1; min-width: 0; }
.col-right { width: 250px; flex-shrink: 0; }

/* ---------- Left column ---------- */
.photo-frame {
  border: 1px solid #c9cdd2;
  padding: 4px;
  background: #fff;
  border-radius: 3px;
}
.profile-photo {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 84px;
  background: linear-gradient(to bottom, #fff7ef, #ffe2c6);
}
.online-line { color: #3a8a3a; font-size: 11px; font-weight: bold; padding: 5px 2px; }

.action-menu { list-style: none; margin: 6px 0 0; padding: 0; }
.action-menu-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #d4a030;
  border-radius: 4px;
  background: linear-gradient(to bottom, #fff8e8, #f5d88a);
  color: #5b4a26;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
}
.action-menu-toggle:hover { background: linear-gradient(to bottom, #fff, #fbe4a6); }
.action-menu-toggle .caret {
  display: inline-block;
  transition: transform 0.2s ease;
}
.action-menu-wrap.open .action-menu-toggle .caret { transform: rotate(180deg); }
.action-menu li { border-bottom: 1px dotted #e2e6ec; }
.action-menu li.sep { border-bottom: none; height: 8px; }
.action-menu .act {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 4px;
  color: var(--link);
  font-size: 11px;
}
.action-menu .act[hidden] { display: none; }
.action-menu .act:hover { background: #f2f5fa; text-decoration: none; }
.action-menu .ico { font-size: 14px; width: 16px; text-align: center; }
.action-menu .act.given { color: #3a8a3a; font-weight: bold; }
.self-note { font-size: 11px; color: var(--muted); margin-top: 8px; font-style: italic; }

/* ---------- Boxes ---------- */
.box {
  border: 1px solid var(--box-border);
  border-radius: 5px;
  margin-bottom: 14px;
  background: #fff;
  overflow: hidden;
}
.box-head {
  background: linear-gradient(to bottom, #fbfcfd, #eef1f5);
  border-bottom: 1px solid var(--box-border);
  padding: 6px 11px;
  font-weight: bold;
  color: #555;
  font-size: 12px;
}
.box-head.orange { color: var(--hyves-orange); background: linear-gradient(to bottom, #fff5ea, #ffe8d2); border-bottom-color: var(--peach-line); }
.box-head.blue { color: var(--title-blue); }
.box-head .h-team { float: right; font-size: 12px; letter-spacing: -1px; }
.box-body { padding: 11px; }
.muted { color: var(--muted); }
.block-title { color: var(--hyves-orange); font-size: 12px; margin: 10px 0 4px; }

/* ---------- Key/value tables ---------- */
.kv-table { width: 100%; border-collapse: collapse; }
.kv-table th {
  text-align: left;
  color: var(--muted);
  font-weight: normal;
  padding: 3px 10px 3px 0;
  vertical-align: top;
  width: 78px;
  white-space: nowrap;
}
.kv-table td { padding: 3px 0; color: #333; }
.info-box .kv-table td.info-name { font-weight: bold; color: var(--link-orange); }
.bekeken-line { color: var(--muted); font-size: 11px; margin: 8px 0 0; }
.over-mij { white-space: pre-wrap; margin: 4px 0 0; }

/* ---------- WWW box ---------- */
.www-tags { margin-bottom: 9px; }
.www-tags .tag {
  display: inline-block;
  background: var(--peach);
  border: 1px solid var(--peach-line);
  color: var(--hyves-orange-dark);
  border-radius: 10px;
  padding: 1px 9px;
  font-size: 10px;
  margin: 0 4px 4px 0;
}
.www-box .kv-table td { font-weight: bold; }
.www-omschrijving { background: #fafbfc; border: 1px solid #eee; border-radius: 4px; padding: 9px; margin: 8px 0 0; }

.rsvp { margin-top: 12px; border-top: 1px solid #eee; padding-top: 10px; }
.rsvp-question { font-weight: bold; margin-bottom: 7px; font-size: 12px; }
.rsvp-buttons { display: flex; gap: 7px; flex-wrap: wrap; }
.rsvp-btn {
  border: 1px solid var(--box-border);
  background: #f4f6f8;
  padding: 7px 13px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  color: #555;
}
.rsvp-btn:hover { background: #e9edf1; }
.rsvp-btn.selected[data-status="ja"] { background: #3a8a3a; color: #fff; border-color: #2c6b2c; }
.rsvp-btn.selected[data-status="misschien"] { background: #d9a106; color: #fff; border-color: #b3850a; }
.rsvp-btn.selected[data-status="nee"] { background: #c0392b; color: #fff; border-color: #962d22; }

/* ---------- Right column: friends ---------- */
.vrienden-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.vriend { text-align: center; font-size: 10px; overflow: hidden; }
.vriend .ava {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  border: 1px solid var(--box-border);
  text-decoration: none;
  cursor: pointer;
}
.vriend .ava:hover { border-color: var(--hyves-orange); }
.vriend .naam {
  display: block;
  color: var(--link);
  margin-top: 3px;
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
  text-decoration: none;
}
.vriend .naam:hover { text-decoration: underline; }
.vriend .vr-respect { color: var(--muted); font-size: 10px; }
.meer-vrienden { margin-top: 10px; font-size: 11px; }
.meer-vrienden a { color: var(--link-orange); }

/* ---------- Wie komt ---------- */
.rsvp-lists { display: flex; gap: 16px; }
.rsvp-col { flex: 1; }
.rsvp-col-head { font-size: 12px; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 2px solid; }
.rsvp-col-head.ja { color: #3a8a3a; border-color: #3a8a3a; }
.rsvp-col-head.misschien { color: #b3850a; border-color: #d9a106; }
.rsvp-col-head.nee { color: #c0392b; border-color: #c0392b; }
.attendee-list { list-style: none; margin: 0; padding: 0; }
.attendee-list li { display: flex; align-items: center; gap: 7px; padding: 4px 0; font-size: 11px; }
.attendee-list li.empty { color: var(--muted); font-style: italic; }
.attendee-list .ava {
  width: 24px; height: 24px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; border: 1px solid var(--box-border); text-decoration: none;
}
.attendee-list a { text-decoration: none; color: var(--link-orange); }
.attendee-list a:hover { text-decoration: underline; }

/* ---------- Krabbels ---------- */
.krabbel-form textarea {
  width: 100%; height: 56px;
  border: 1px solid var(--box-border);
  border-radius: 4px; padding: 7px;
  font-family: inherit; font-size: 12px; resize: vertical; outline: none;
}
.krabbel-form textarea:focus { border-color: var(--hyves-orange); }
/* The krabbels box must not clip the smiley popup that drops out of it. */
.krabbels-section { overflow: visible; }
.krabbels-section > .box-head { border-radius: 5px 5px 0 0; }

.krabbel-form { position: relative; }
.krabbel-toolbar { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 8px; }
.smiley-tools { position: relative; }
.smiley-toggle { font-size: 12px; }

/* Smiley picker popup — drops down to the right/bottom of the button */
.smiley-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 340px;
  max-width: 90vw;
  background: #fff;
  border: 1px solid var(--box-border);
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .25);
  z-index: 60;
  overflow: hidden;
}
.smiley-popup.hidden { display: none; }
.smiley-popup-head {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid #eef1f5;
  background: linear-gradient(to bottom, #fbfcfd, #eef1f5);
}
.smiley-popup-head input {
  flex: 1;
  border: 1px solid var(--box-border);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
  outline: none;
}
.smiley-popup-head input:focus { border-color: var(--hyves-orange); }
.smiley-close {
  border: 1px solid var(--box-border);
  background: #f4f6f8;
  border-radius: 4px;
  cursor: pointer;
  padding: 0 9px;
  font-size: 12px;
  color: #666;
}
.smiley-close:hover { background: #e9edf1; }
.smiley-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px;
  max-height: 230px;
  overflow-y: auto;
}
.smiley-grid button {
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
}
.smiley-grid button:hover { border-color: var(--peach-line); background: var(--peach); }
.smiley-grid img { max-width: 100%; max-height: 24px; display: block; }
.smiley-empty { grid-column: 1 / -1; color: var(--muted); font-style: italic; padding: 10px; text-align: center; }

/* Inline smileys inside krabbels */
.krabbel-smiley {
  vertical-align: middle;
  max-height: 20px;
  margin: 0 1px;
}

.login-hint { color: var(--muted); font-size: 11px; }
.login-hint a { color: var(--link-orange); }

.krabbels-list { margin-top: 10px; }
.krabbel { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dotted #d8dbe0; }
.krabbel:last-child { border-bottom: none; }
.krabbel .ava {
  width: 44px; height: 44px; border-radius: 4px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; border: 1px solid var(--box-border); text-decoration: none; cursor: pointer;
}
.krabbel .ava:hover { border-color: var(--hyves-orange); }
.krabbel .body { flex: 1; min-width: 0; }
.krabbel .naam { color: var(--link-orange); font-weight: bold; text-decoration: none; cursor: pointer; }
.krabbel .naam:hover { text-decoration: underline; }
.krabbel .tijd { color: var(--muted); font-size: 10px; margin-left: 6px; }
.krabbel .bericht { margin-top: 3px; word-wrap: break-word; }
.empty { color: var(--muted); font-style: italic; padding: 8px 0; }

/* ---------- Buttons ---------- */
.hyves-btn {
  background: linear-gradient(to bottom, #5a86d2, var(--nav-blue));
  border: 1px solid var(--nav-blue-dark);
  color: #fff; font-weight: bold;
  padding: 6px 14px; border-radius: 4px; cursor: pointer;
  font-size: 12px; font-family: inherit;
}
.hyves-btn:hover { background: linear-gradient(to bottom, #6b94db, #436fc0); }
.hyves-btn.big { width: 100%; padding: 9px; font-size: 13px; margin-top: 6px; }
.hyves-btn.ghost { background: #eef1f4; color: #555; border-color: var(--box-border); }
.hyves-btn.ghost:hover { background: #e2e6ea; }

/* ---------- Footer ---------- */
.footer { text-align: center; color: var(--muted); font-size: 11px; padding: 18px 0 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: rgba(40, 40, 40, .92); color: #fff;
  padding: 10px 18px; border-radius: 6px; font-size: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35); z-index: 200;
  transition: opacity .25s; max-width: 80vw; text-align: center;
}
.toast.hidden { opacity: 0; pointer-events: none; }

/* ---------- Modals ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.overlay.hidden { display: none; }
.login-modal {
  width: 360px; max-width: 92vw; background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .4);
}
.edit-modal { width: 440px; }
.edit-modal .login-body { max-height: 72vh; overflow-y: auto; }
.login-head {
  background: linear-gradient(to bottom, #fdf6dd, #f6c96d);
  border-bottom: 1px solid #e3b35e;
  padding: 14px 18px; display: flex; align-items: baseline; gap: 10px;
}
.login-sub { color: #8a6a2b; font-size: 12px; font-style: italic; }
.login-body { padding: 18px; }
.login-body label { display: block; font-weight: bold; color: #555; margin: 12px 0 4px; font-size: 12px; }
.login-body label:first-child { margin-top: 0; }
.login-body input[type="text"],
.login-body input[type="password"],
.login-body textarea {
  width: 100%; border: 1px solid var(--box-border); border-radius: 4px;
  padding: 8px; font-size: 13px; font-family: inherit; outline: none;
}
.login-body input[type="text"]:focus,
.login-body input[type="password"]:focus,
.login-body textarea:focus { border-color: var(--hyves-orange); }
.login-body textarea { resize: vertical; }
/* Photo upload in the edit modal */
.avatar-edit { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.avatar-preview {
  width: 72px; height: 72px; flex-shrink: 0;
  border: 1px solid var(--box-border);
  border-radius: 6px;
  background: linear-gradient(to bottom, #fff7ef, #ffe2c6);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; overflow: hidden;
}
.avatar-upload { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.upload-btn { display: inline-block; cursor: pointer; }
.upload-note { color: var(--muted); font-size: 11px; }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 5px; }
.avatar-picker button {
  font-size: 22px; width: 38px; height: 38px; border: 2px solid transparent;
  border-radius: 5px; background: #f4f6f8; cursor: pointer; line-height: 1;
}
.avatar-picker button.sel { border-color: var(--hyves-orange); background: var(--peach); }
.color-picker { display: flex; gap: 6px; }
.color-picker button {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff;
  outline: 1px solid var(--box-border); cursor: pointer;
}
.color-picker button.sel { outline: 2px solid #333; }
/* ---------- Home (party invitation) ---------- */
.home-page { padding: 14px 18px 4px; max-width: 720px; margin: 0 auto; }
.home-post { display: flex; gap: 12px; align-items: flex-start; }
.home-host-ava {
  width: 52px; height: 52px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0; overflow: hidden;
  border: 1px solid #e2e6ec; text-decoration: none;
}
.home-host-ava:hover { border-color: var(--hyves-orange); }
.home-post-body { flex: 1; min-width: 0; }
.home-post-body .naam { color: var(--link-orange); font-weight: bold; text-decoration: none; font-size: 13px; }
.home-post-body .naam:hover { text-decoration: underline; }
.home-post-text { margin-top: 8px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }

/* ---------- Admin panel ---------- */
.admin-page { padding: 14px 18px 4px; }
.nav-admin { color: #fff; font-weight: bold; }
.reg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reg-status { font-size: 12px; color: #333; }
.reg-status .reg-on { color: #2f8f2f; font-weight: bold; }
.reg-status .reg-off { color: #c0392b; font-weight: bold; }
.admin-toolbar { margin-bottom: 10px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 2px solid #e2e6ec;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.admin-table td { padding: 7px 8px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.admin-table tr:hover td { background: #f7f9fc; }
.admin-table .empty { text-align: center; color: var(--muted); font-style: italic; padding: 16px; }
.admin-ava-cell { width: 40px; }
.admin-ava {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
}
.admin-actions { white-space: nowrap; text-align: right; }
.admin-actions .small-btn { margin-left: 4px; }
.admin-status-bericht { max-width: 320px; word-break: break-word; }
.blog-del-btn { font-size: 10px; padding: 3px 8px; }
.badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  background: #dfeaf7;
  color: #2f5aa8;
  vertical-align: middle;
}
.badge.warn { background: #fbe6c6; color: #a86412; }
.edit-actions { display: flex; gap: 8px; margin-top: 12px; }

.party-edit label { display: block; font-size: 11px; font-weight: bold; margin: 10px 0 4px; color: #445; }
.party-edit label:first-child { margin-top: 0; }
.party-edit input,
.party-edit textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid #c7ccd6;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
}
.party-edit textarea { resize: vertical; min-height: 80px; }
.party-edit .edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.party-edit .edit-row > div label { margin-top: 0; }
.party-edit #party-save { margin-top: 12px; }

/* ---------- Friends overview page ---------- */
.friends-page { padding: 14px 18px 4px; }
.friends-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #c7ccd6;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 12px;
}
.friends-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.friend-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #e2e6ec;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: var(--link);
  transition: background 0.12s, border-color 0.12s;
}
.friend-card:hover { background: #f2f5fa; border-color: #c7d3e6; text-decoration: none; }
.friend-card .fc-ava {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
  flex-shrink: 0;
}
.friend-card .fc-naam {
  flex: 1;
  font-weight: bold;
  font-size: 12px;
  color: #234;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friend-card .fc-respect { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* ---------- Blogs feed ---------- */
.blogs-page { padding: 14px 18px 4px; }
.blogs-feed { display: flex; flex-direction: column; gap: 0; }
.blog-post {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dotted #d8dbe0;
}
.blog-post:last-child { border-bottom: none; }
.blog-post .ava {
  width: 44px; height: 44px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; overflow: hidden;
  border: 1px solid #e2e6ec; text-decoration: none;
}
.blog-post .ava:hover { border-color: var(--hyves-orange); }
.blog-body { flex: 1; min-width: 0; }
.blog-head { margin-bottom: 4px; }
.blog-head .naam { color: var(--link-orange); font-weight: bold; text-decoration: none; }
.blog-head .naam:hover { text-decoration: underline; }
.blog-head .tijd { color: var(--muted); font-size: 10px; margin-left: 6px; }
.blog-bericht { font-size: 13px; line-height: 1.45; word-wrap: break-word; }
.blog-actions { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.blog-react-btn {
  border: 1px solid #c7ccd6;
  background: #f7f9fc;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  color: #445;
}
.blog-react-btn:hover { background: #eef3fa; border-color: #a8b8d0; }
.blog-react-btn.reacted {
  background: #e8f4e8;
  border-color: #7cb87c;
  color: #2f6b2f;
  font-weight: bold;
}
.blog-react-btn:disabled { opacity: 0.6; cursor: wait; }
.blogs-feed .empty { font-size: 12px; color: var(--muted); font-style: italic; padding: 8px 0; }

/* ---------- Wie Wat Waar (status updates) ---------- */
.status-form { display: flex; gap: 6px; margin-bottom: 10px; }
.status-form input {
  flex: 1;
  padding: 7px 9px;
  border: 1px solid #c7ccd6;
  border-radius: 4px;
  font-size: 12px;
}
.status-list { display: flex; flex-direction: column; gap: 8px; }
.status-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 7px 9px;
  background: #f7f9fc;
  border: 1px solid #e6eaf0;
  border-radius: 5px;
}
.status-bericht { font-size: 12px; color: #333; word-break: break-word; }
.status-item .tijd { font-size: 10px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.status-list .empty { font-size: 11px; color: var(--muted); font-style: italic; }

.login-error { color: #c0392b; font-size: 11px; min-height: 14px; margin-top: 8px; }

.host-login { margin-top: 14px; padding-top: 12px; border-top: 1px dotted #d5dbe3; text-align: center; }
.host-login > a { font-size: 11px; color: var(--muted); }
.host-login-fields { display: flex; gap: 6px; margin-top: 10px; }
.host-login-fields input {
  flex: 1;
  padding: 7px 9px;
  border: 1px solid #c7ccd6;
  border-radius: 4px;
  font-size: 12px;
}
.edit-row { display: flex; gap: 10px; }
.edit-row > div { flex: 1; }
.edit-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ---------- Responsive ---------- */

/* Tablet */
@media (max-width: 820px) {
  .three-col { flex-direction: column; }
  .col-left, .col-right { width: 100%; }
  .vrienden-grid { grid-template-columns: repeat(4, 1fr); }
  .rsvp-lists { flex-direction: column; gap: 12px; }
  .home-page { max-width: none; }
  .friends-overview-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* Small tablet / large phone */
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }

  .mainnav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 88vw);
    z-index: 300;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 16px;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, .25);
  }
  .mainnav.open { transform: translateX(0); }
  .mainnav .account-area {
    position: static;
    min-height: 0;
    display: block;
    padding: 16px 18px 14px;
    background: rgba(0, 0, 0, .14);
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    text-align: left;
    font-size: 13px;
    line-height: 1.6;
    pointer-events: auto;
  }
  .mainnav .account-area a {
    color: #fff;
    font-weight: normal;
    padding: 0;
    border: none;
  }
  .mainnav .account-area a:hover {
    background: transparent;
    text-decoration: underline;
  }
  .mainnav .account-area a strong { color: #fff; }
  .mainnav .account-area .acct-line2 { color: rgba(255, 255, 255, .88); }
  .mainnav .account-area .online-dot { color: #9ee09e; }
  .mainnav a {
    flex-shrink: 0;
    white-space: normal;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
    padding: 14px 18px;
    font-size: 14px;
  }
  .mainnav a:first-of-type { border-left: none; }
  .searchbox { display: none; }

  .profile-titlebar h1 { font-size: 18px; }
  .own-design { position: static; display: block; margin-top: 6px; }

  .col-left {
    display: grid;
    grid-template-columns: 100px 1fr;
    grid-template-areas:
      "photo online"
      "actions actions"
      "self self";
    gap: 8px 12px;
    align-items: start;
  }
  .photo-frame { grid-area: photo; width: 100px; }
  .profile-photo { height: 92px; font-size: 52px; }
  .online-line { grid-area: online; align-self: center; margin: 0; }
  .action-menu-wrap { grid-area: actions; width: 100%; }
  .action-menu-toggle { display: flex; }
  .action-menu-wrap .action-menu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.25s ease;
  }
  .action-menu-wrap.open .action-menu {
    max-height: 420px;
    opacity: 1;
    margin-top: 4px;
  }
  .self-note { grid-area: self; width: 100%; }

  .admin-table { font-size: 11px; }
  .admin-actions .small-btn { display: inline-block; margin: 2px 0 2px 4px; }
}

/* Phone */
@media (max-width: 480px) {
  html, body { font-size: 12px; }

  .hyves-frame {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }
  .topbar {
    border-radius: 0;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 12px;
  }
  .logo-img { height: 30px; }

  .profile-page,
  .home-page,
  .friends-page,
  .blogs-page,
  .admin-page {
    padding: 10px 12px 4px;
  }

  .profile-titlebar { padding-bottom: 10px; margin-bottom: 10px; }
  .profile-titlebar h1 { font-size: 17px; line-height: 1.25; }
  .profile-sublinks { font-size: 12px; line-height: 1.6; }

  .box-body { padding: 10px; }
  .box-head { padding: 8px 10px; font-size: 13px; }

  /* Touch-friendly controls */
  .hyves-btn,
  .rsvp-btn,
  .blog-react-btn,
  .action-menu .act,
  .smiley-toggle,
  .smiley-close {
    min-height: 44px;
    font-size: 13px;
  }
  .action-menu .act { padding: 10px 6px; }
  .rsvp-buttons { flex-direction: column; }
  .rsvp-buttons .rsvp-btn { width: 100%; text-align: center; }

  .krabbel-form textarea { height: 72px; font-size: 16px; /* prevents iOS zoom */ }
  .krabbel-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .smiley-tools { width: 100%; }
  .smiley-toggle { width: 100%; text-align: center; }
  .krabbel-toolbar > .hyves-btn { width: 100%; }

  /* Smiley popup: bottom sheet on mobile */
  .smiley-popup {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: auto;
    width: auto;
    max-width: none;
    max-height: 55vh;
    z-index: 150;
  }
  .smiley-grid {
    grid-template-columns: repeat(6, 1fr);
    max-height: calc(55vh - 60px);
  }

  .status-form { flex-direction: column; gap: 8px; }
  .status-form input,
  .status-form .hyves-btn,
  .status-form button {
    width: 100%;
    font-size: 16px;
    min-height: 44px;
  }

  .status-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .vrienden-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

  .home-post { gap: 10px; }
  .home-host-ava { width: 44px; height: 44px; font-size: 22px; }
  .home-post-text { font-size: 14px; }

  .blog-post .ava { width: 40px; height: 40px; font-size: 20px; }
  .blog-bericht { font-size: 14px; }
  .blog-actions { gap: 6px; }

  .krabbel .ava { width: 40px; height: 40px; font-size: 22px; }
  .krabbel .bericht { font-size: 14px; }

  .friends-overview-grid { grid-template-columns: 1fr; }
  .friend-card { padding: 10px 12px; }

  .kv-table th {
    width: 72px;
    font-size: 11px;
    padding-right: 8px;
  }
  .kv-table td { font-size: 13px; word-break: break-word; }

  .login-body input[type="text"],
  .login-body input[type="password"],
  .login-body textarea,
  .party-edit input,
  .party-edit textarea,
  .host-login-fields input {
    font-size: 16px; /* prevents iOS zoom on focus */
    min-height: 44px;
  }

  .edit-modal,
  .login-modal {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    margin: 0 8px;
    display: flex;
    flex-direction: column;
  }
  .edit-modal .login-body { max-height: calc(92vh - 60px); }

  .overlay {
    align-items: flex-end;
    padding: 0;
  }
  .overlay .login-modal {
    border-radius: 12px 12px 0 0;
    margin: 0;
    width: 100%;
  }

  .avatar-edit { flex-direction: column; align-items: flex-start; }
  .avatar-picker button { width: 44px; height: 44px; font-size: 24px; }
  .color-picker button { width: 36px; height: 36px; }

  .edit-row,
  .party-edit .edit-row {
    flex-direction: column;
    display: flex;
    gap: 0;
  }

  .reg-row { flex-direction: column; align-items: stretch; }
  .reg-row .hyves-btn { width: 100%; }

  .host-login-fields { flex-direction: column; }
  .host-login-fields input,
  .host-login-fields .hyves-btn { width: 100%; }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
    transform: none;
    max-width: none;
  }

  .footer { padding: 14px 12px; font-size: 11px; }
}

/* Very small phones */
@media (max-width: 360px) {
  .vrienden-grid { grid-template-columns: repeat(2, 1fr); }
  .smiley-grid { grid-template-columns: repeat(5, 1fr); }
}
