
/* --- Delete button in post modal --- */
.edit-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edit-modal__actions-right {
  display: flex;
  gap: 10px;
}

.edit-modal__danger {
  border-radius: 999px;
  border: none;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  background: rgba(229, 57, 53, 0.14);
  color: #b71c1c;
}

.edit-modal__danger:hover {
  opacity: 0.9;
}

.edit-modal__danger.is-hidden {
  display: none;
}
/* 
  This is the full content of /Users/veikkakaronen/Downloads/taekwondo.html/styles.css 
  with the new styles appended at the very end as requested in step 2A.
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #f9f1e4 0, #f4ede2 40%, #ebdfcf 100%);
  color: #2a241b;
  min-height: 100vh;
  overflow-x: hidden;
}



.page {
  min-height: 100vh;
  --page-pad: 32px;
  padding: 0 24px 0; /* ei alareunan tyhjää tilaa (footer kiinni pohjaan) */
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.header-bar {
  position: sticky;
  top: 0;
  z-index: 200;

  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  padding: var(--page-pad) 32px 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: transparent; /* sama kuin sivun tausta */
}

/* Header auto-hide (only when JS toggles the class) */
.header-bar.is-hidden{
  transform: translateY(-110%);
}

.header-bar{
  transition: transform 0.35s cubic-bezier(.2,.9,.2,1);
}

.header-bar > * {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.site-title {
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.login-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.login-status {
  opacity: 0.7;
}

.login-button {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  background: #111;
  color: #fff;
}

.login-button:hover {
  opacity: 0.9;
}

.login-panel {
  display: none;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.login-panel.is-open {
  display: block;
}

.login-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.login-form input {
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.login-form button[type="submit"] {
  margin-top: auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: #222;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.login-hint {
  margin-top: 8px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.site-header {
  text-align: center;
}

.site-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header p {
  margin-top: 4px;
  font-size: 0.95rem;
  opacity: 0.8;
}

.layout {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  transition: all 0.3s ease;
  margin-top: 24px;
}

/* Vyökolumni */

.belts-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 520px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform 0.6s cubic-bezier(.2,.9,.2,1);
  will-change: transform;
  transform-origin: center left;
  position: sticky;
  top: calc(var(--page-pad) + 96px); /* headerin alle + sivun yläpadding */
  align-self: flex-start;
}

.belt {
  position: relative;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding-inline: 26px 52px;
  height: 78px;         /* normaali korkeus myös alussa */
  line-height: 1;       /* ettei teksti venytä/latista */
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1f130b;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.belt::after {
  content: "";
  position: absolute;
  right: 16px;
  width: 22px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.belt-label {
  z-index: 1;
}

.belt:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.belt.is-active {
  outline: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Vyövärit */

.belt--white {
  background: linear-gradient(135deg, #ffffff, #f5f5f5);
}

.belt--yellow {
  background: linear-gradient(135deg, #ffe27a, #ffcf33);
}

.belt--green {
  background: linear-gradient(135deg, #8ad67a, #4da94e);
}

.belt--blue {
  background: linear-gradient(135deg, #7eb5ff, #366bd9);
}

.belt--red {
  background: linear-gradient(135deg, #ff8a80, #e53935);
}

/* Oikea palsta */

.content-column{
  display: flex;                 /* keep in layout so transitions can run */
  flex-direction: column;
  gap: 18px;

  /* CLOSED state */
  flex: 0 0 0;
  width: 0;
  max-width: 0;
  overflow: hidden;

  opacity: 0;
  transform: translateX(32px);
  pointer-events: none;

  transition:
    opacity 0.45s cubic-bezier(.2,.9,.2,1),
    transform 0.55s cubic-bezier(.2,.9,.2,1),
    max-width 0.55s cubic-bezier(.2,.9,.2,1),
    width 0.55s cubic-bezier(.2,.9,.2,1);

  will-change: opacity, transform, max-width, width;
}

.intro-card,
.belt-info,
.note-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.04);
}

.intro-card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.intro-card p + p {
  margin-top: 6px;
}

.belt-info h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.belt-info-level {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.9;
}

.belt-info p {
  line-height: 1.5;
}

.note-card h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.note-card p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.note-scroll {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Kun vyö valitaan, avataan blogipaneeli oikealle */

.layout.detail-open{
  justify-content: center;   /* avoid jump */
  align-items: flex-start;
}

.layout.detail-open .belts-column{
  transform: translateX(-26px);
}

.layout.detail-open .belt {
  font-size: 0.95rem;
  padding-inline: 22px 46px;
}

.layout.detail-open .belt::after {
  width: 20px;
  height: 28px;
  right: 14px;
}

.layout.detail-open .content-column{
  /* OPEN state */
  flex: 1 1 auto;
  width: 100%;
  max-width: 560px;
  overflow: visible;

  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Responsiivisuus */

@media (max-width: 800px) {
  .page {
    --page-pad: 16px;
    padding: 0 16px 0;
  background: radial-gradient(circle at top, #f9f1e4 0, #f4ede2 40%, #ebdfcf 100%);  }

  .layout {
    align-items: stretch;
    flex-direction: column;
    margin-top: -24px;
    gap: 14px;
  }

  .belts-column {
    padding: 18px 14px;
    border-radius: 18px;
    position: static;
    top: auto;
    margin-top: -32px;
  }

  .belt {
    font-size: 0.90rem;
    padding-inline: 18px 38px;
    height: 64px;
  }

  .belt::after{
    right: 12px;
    width: 18px;
    height: 26px;
  }

  .belts-column{
    gap: 10px;
    padding: 6px 10px 10px;
    margin-top: -32px;
  }

  .header-bar + .layout{
    margin-top: 0;
  }

  /* Mobile: content appears under belts, no sideways layout animation */
  .content-column{
    display: none;          /* hidden until a belt is picked */
    width: 100%;
    max-width: 100%;
    overflow: visible;

    /* override desktop closed-state hacks */
    flex: 1 1 auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
    will-change: auto;
  }

  .layout.detail-open .content-column{
    display: flex;          /* show under belts after click */
  }

  .layout.detail-open .belts-column{
    transform: none;        /* don't slide belts on mobile */
  }

  /* Mobile: add breathing room ABOVE belts AFTER a belt is selected */
  .layout.detail-open .belts-column{
    margin-top: 24px;
  }

  .header-bar{
    position: sticky;
    top: 0;
    z-index: 300;

    padding: 10px 16px 10px; /* tiiviimpi mobiilissa */

    background: radial-gradient(circle at top, #f9f1e4 0, #f4ede2 40%, #ebdfcf 100%);

    /* subtle separation without color mismatch */
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  }

  /* Estä scroll ensimmäisessä näkymässä mobiilissa */
  html, body{
    height: 100%;
  }

  body:not(.detail-open){
    overflow: hidden;
  }

  body.detail-open{
    overflow-y: auto;
  }
}

.belt--black {
  background: linear-gradient(135deg, #111111, #000000);
  color: #ffffff;
}

/* --- Editointi (näkyy vain kirjautuneelle) --- */
.editable {
  position: relative;
}

.edit-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.editable:hover .edit-icon,
.post:hover .edit-icon {
  opacity: 1;
  transform: scale(1.05);
}

body:not(.is-logged-in) .edit-icon {
  display: none;
}

/* --- Edit modal (kynä-ikonista avautuva muokkaus) --- */
.edit-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
}

.edit-modal.is-open {
  display: block;
}

.edit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.edit-modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0,0,0,0.08);
    max-height: 85vh;   /* ei koskaan ruutua korkeampi */
  overflow-y: auto;  /* scroll modaalin sisällä */
  z-index: 2;
}

.edit-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edit-modal__close {
  border: none;
  background: rgba(0,0,0,0.08);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
}

.edit-modal__hint {
  margin-top: 8px;
  font-size: 0.85rem;
  opacity: 0.75;
}

.edit-modal__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 650;
}

.edit-modal__field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.18);
  padding: 12px 12px;
  font-family: inherit;
  font-size: 0.98rem;
  line-height: 1.35;
  resize: vertical;
  background: #fff;
}

.edit-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.edit-modal__save,
.edit-modal__cancel {
  border-radius: 999px;
  border: none;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
}

.edit-modal__save {
  background: #111;
  color: #fff;
}

.edit-modal__cancel {
  background: rgba(0,0,0,0.10);
}

.edit-modal__status {
  margin-top: 10px;
  font-size: 0.86rem;
  opacity: 0.85;
  min-height: 1.2em;
}

body.modal-open {
  overflow: hidden;
}

/* --- Notes header + new post button --- */
.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.new-post-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  background: #111;
  color: #fff;
}

.new-post-btn:hover {
  opacity: 0.9;
}

body:not(.is-logged-in) .new-post-btn {
  display: none;
}

.new-post-btn--ghost{
  background: rgba(0,0,0,0.10);
  color: #111;
}

.new-post-btn--ghost:hover{
  opacity: 0.9;
}

/* Export näkyy vain kirjautuneelle */
body:not(.is-logged-in) #exportJson{
  display:none;
}

/* --- Posts list --- */
#postsContainer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 14px 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.04);
}

.post__title {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.post__meta {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-bottom: 10px;
}

.post__body {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* input in modal */
.edit-modal__input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.18);
  padding: 12px 12px;
  font-family: inherit;
  font-size: 0.98rem;
  background: #fff;
}


/* --- Posts as same style as intro-card --- */
#postsContainer {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post {
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.04);
  border: none;
}

.post__title {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.post__meta {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 10px;
}

.post__meta-sep{
  opacity: 0.55;
  margin: 0 6px;
}

.post__lane{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.06);
}


:root{
  --lane-base-bg: rgba(255,255,255,0.55);
  --lane-base-border: rgba(0,0,0,0.12);
  --lane-upper-bg: rgba(255, 207, 51, 0.22);
  --lane-upper-border: rgba(255, 207, 51, 0.40);
}

.post__lane--upper{
  background: var(--lane-upper-bg);
  border-color: var(--lane-upper-border);
}

.post__lane--base{
  background: var(--lane-base-bg);
  border-color: var(--lane-base-border);
}

.post__body p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.post__body p + p {
  margin-top: 6px;
}


/* --- Attach image UI --- */
.attach-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.attach-btn{
  border:none;
  border-radius:999px;
  padding:10px 14px;
  font-size:0.9rem;
  font-weight:800;
  cursor:pointer;
  background:#111;
  color:#fff;
}

.attach-btn:hover{ opacity:0.9; }

.attach-btn--ghost{
  background: rgba(0,0,0,0.10);
  color:#111;
}

.image-preview{ margin-top:10px; }
.image-preview img{
  max-width: 100%;
  max-height: 300px;     /* pienempi esikatselussa */
  object-fit: contain;
  border-radius: 14px;
  display: block;
}

.image-preview .image-preview__hint{
  font-size:0.85rem;
  opacity:0.75;
}

.post__image img{
  max-width: 100%;
  max-height: 420px;      /* estää liian korkeat kuvat */
  object-fit: contain;   /* koko kuva näkyy, ei leikkausta */
  border-radius: 14px;
  display: block;
}

.youtube-preview {
  margin-top: 10px;
}

.youtube-preview__hint {
  font-size: 0.85rem;
  opacity: 0.7;
}

.youtube-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,0.06);
}

.youtube-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post__youtube {
  margin: 12px 0;
}


/* --- Pin-to-top UI --- */
.edit-modal__field--inline{
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.edit-modal__field--inline input[type="checkbox"]{
  width: 20px;
  height: 20px;
  accent-color: #111;
}

/* Pin-nappi postauksessa */
.pin-icon{
  position:absolute;
  top:10px;
  right:52px; /* kynä-ikonin vasemmalle puolelle */
  border:none;
  background: rgba(0,0,0,0.75);
  color:#fff;
  border-radius:999px;
  width:34px;
  height:34px;
  font-size:14px;
  cursor:pointer;
  opacity:0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
body.is-logged-in .post:hover .pin-icon{ opacity:1; transform: scale(1.05); }
/* Logged-out users should NOT see the pin action button at all (they only see .pin-indicator) */
body:not(.is-logged-in) .pin-icon{
  display: none;
}

.pin-icon.is-pinned{
  background: rgba(17,17,17,0.92);
}

/* --- Pinned badge (selkeä merkki pinnatusta) --- */
.post.is-pinned{
  outline: 2px solid rgba(17,17,17,0.12);
}

.pinned-badge{
  opacity: 0;
pointer-events: none;
z-index: 3;
  position:absolute;
  top:10px;
  right:96px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:0.75rem;
  font-weight:800;
  letter-spacing:0.04em;
  background:#111;
  color:#fff;
}

body.is-logged-in .post:hover .pinned-badge{
  opacity: 1;
  pointer-events: auto;
}

body:not(.is-logged-in) .pinned-badge{
  display:none;
}

.pinned-badge button{
  border:none;
  background:rgba(255,255,255,0.15);
  color:#fff;
  border-radius:999px;
  width:20px;
  height:20px;
  cursor:pointer;
  font-size:12px;
  line-height:1;
}

.pinned-badge button:hover{
  background:rgba(255,255,255,0.25);
}
/* Pinned indicator shown for everyone */
.pin-indicator{
  position:absolute;
  top:10px;
  right:10px;
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background: rgba(0,0,0,0.10);
  font-size:14px;
  z-index: 2;
}

/* Kun kirjautuneena hoveraa postausta, piilota pieni pin-indicator ettei mene päällekkäin */
body.is-logged-in .post:hover .pin-indicator{
  opacity: 0;
  pointer-events: none;
}


/* --- Tags (post modal + post view) --- */
.tag-selector{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.tag-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background: rgba(0,0,0,0.06);
  cursor:pointer;
  user-select:none;
  font-weight:700;
  font-size:0.85rem;
}

.tag-pill input{
  width:16px;
  height:16px;
}

.tag-hint{
  margin-top:8px;
  font-size:0.8rem;
  opacity:0.7;
}

.post__tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 12px;
}

.post__tag{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(0,0,0,0.06);
  font-size:0.78rem;
  font-weight:800;
  letter-spacing:0.03em;
  text-transform: lowercase;
}


/* --- Posts toolbar: search + filters (fresh) --- */
.posts-toolbar{
  position: relative;
  border-radius: 22px;
  padding: 16px 16px 14px;
  margin-bottom: 18px;

  /* glass + contrast so it won't look like a post */
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow:
    0 18px 50px rgba(0,0,0,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.35);
}

/* top accent line */
.posts-toolbar::before{
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 10px;
  height: 3px;
  border-radius: 999px;
  opacity: 0.5;
}

.posts-toolbar__row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.posts-toolbar__search{
  position: relative;
  flex: 1;
  min-width: 260px;
}

.posts-toolbar__search::before{
  content: "🔎";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.55;
  pointer-events: none;
}

.posts-toolbar__input{
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  padding: 11px 44px 11px 38px;
  font-size: 0.92rem;
  background: rgba(255,255,255,0.78);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.posts-toolbar__input:focus{
  outline: none;
  border-color: rgba(0,0,0,0.22);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.posts-toolbar__clear{
  position:absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  cursor: pointer;
  background: rgba(17,17,17,0.08);
  font-size: 14px;
  line-height: 1;
}

.posts-toolbar__clear:hover{ opacity: 0.9; }

.posts-toolbar__count{
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.posts-toolbar__tags{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Filters look DIFFERENT from post tags */
.tag-filter{
  border: 1px solid rgba(0,0,0,0.12);
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.55);
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.tag-filter:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

.tag-filter.is-active{
  background: #111;
  color: #fff;
  border-color: rgba(17,17,17,0.35);
  box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}

.tag-filter--clear{
  background: rgba(17,17,17,0.08);
  border-color: rgba(0,0,0,0.10);
}

@media (max-width: 520px){
  .posts-toolbar{ padding: 14px 12px 12px; }
  .posts-toolbar__search{ min-width: 0; width: 100%; }
  .posts-toolbar__input{ padding: 11px 44px 11px 36px; }
}



/* --- Draft / Published --- */
.post.is-draft{
  border: 1px dashed rgba(0,0,0,0.22);
  background: rgba(255,255,255,0.62);
}

/* LUONNOS badge: a bit more breathing room from title */
.post-status-badge{
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.08);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* push title down only when draft badge exists */
.post.is-draft .post__title{
  padding-top: 26px;
}

/* normal posts keep their spacing */
.post.is-published .post__title{
  padding-top: 0;
}

/* --- Make the draft/published select match your theme --- */
select.edit-modal__input{
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.18);
  padding: 12px 44px 12px 12px;
  font-family: inherit;
  font-size: 0.98rem;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 10px 24px rgba(0,0,0,0.04);
  cursor: pointer;
}

select.edit-modal__input:focus{
  outline: none;
  border-color: rgba(0,0,0,0.28);
  box-shadow: 0 14px 30px rgba(0,0,0,0.06);
}

/* custom arrow */
select.edit-modal__input{
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0,0,0,0.55) 50%),
    linear-gradient(135deg, rgba(0,0,0,0.55) 50%, transparent 50%),
    linear-gradient(to right, rgba(0,0,0,0.10), rgba(0,0,0,0.10));
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px),
    calc(100% - 34px) 50%;
  background-size:
    6px 6px,
    6px 6px,
    1px 18px;
  background-repeat: no-repeat;
}

/* --- Back to top button --- */
.back-to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.10);
  color: #111;
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 300;
}

.back-to-top.is-visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover{
  transform: translateY(-2px);
}

@media (max-width: 520px){
  .back-to-top{ right: 12px; bottom: 12px; }
}


/* --- Footer / alapalkki --- */
.footer-bar{
  margin-top: auto;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 22px 24px;
  background: #111;
  color: rgba(255,255,255,0.86);

  display: none; /* 🔴 piilotetaan oletuksena */
}

.footer-bar__inner{
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-bar__text{
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.footer-bar__links{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-bar__links a{
  color: rgba(255,255,255,0.86);
  text-decoration: none;
  font-weight: 900;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  opacity: 0.95;
}

.footer-bar__links span{
  font-size: 0.85rem;
  opacity: 0.78;
}

.footer-bar__links a:hover{ opacity: 1; }

/* Näytä alapalkki vasta kun vyö on valittu */
body.detail-open .footer-bar{
  display: block;
}

/* --- Belt progress (two large bars + vertical accent) --- */
.belt-progress{
  display:flex;
  gap: 18px;
  border-radius: 28px;
  padding: 18px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow:
    0 18px 50px rgba(0,0,0,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.35);
}

.belt-bar{
  position: relative;
  flex: 1;
  height: 54px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.06),
    0 10px 24px rgba(0,0,0,0.06);
}

.belt-bar__text{
  position: relative;
  z-index: 2;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  opacity: 0.9;
  text-shadow: 0 2px 10px rgba(0,0,0,0.10);
  user-select: none;
}

/* kontrasti mustalla */
.belt-bar--black .belt-bar__text{
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

 /* bar colors by CURRENT belt */
 .belt-bar--white{ background: linear-gradient(135deg, #ffffff, #f5f5f5); }
 .belt-bar--yellow{ background: linear-gradient(135deg, #ffe27a, #ffcf33); }
 .belt-bar--green{ background: linear-gradient(135deg, #8ad67a, #4da94e); }
 .belt-bar--blue{ background: linear-gradient(135deg, #7eb5ff, #366bd9); }
 .belt-bar--red{ background: linear-gradient(135deg, #ff8a80, #e53935); }
 .belt-bar--black{ background: linear-gradient(135deg, #111111, #000000); }

/* vertical accent on the RIGHT bar */
.belt-accent{
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 60%;
  border-radius: 999px;
  background: #ffcf33; /* default = yellow */
  box-shadow: 0 0 0 2px rgba(255,255,255,0.65);
}

/* Accent colors by NEXT belt */
.belt-accent--white{ background:#f5f5f5; }
.belt-accent--yellow{ background:#ffcf33; }
.belt-accent--green{ background:#4da94e; }
.belt-accent--blue{ background:#366bd9; }
.belt-accent--red{ background:#e53935; }
.belt-accent--black{ background:#111111; }

@media (max-width: 520px){
  .belt-progress{ padding: 14px; gap: 12px; }
  .belt-bar{ height: 46px; }
}


.belt-bar{
  transition: transform 0.12s ease, outline-color 0.12s ease;
}

.belt-bar.is-selected{
  outline: 3px solid rgba(0,0,0,0.22);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.posts-empty{
  text-align: center;
  padding: 40px 20px;
  font-size: 0.95rem;
  opacity: 0.55;
  letter-spacing: 0.04em;
}