:root {
  --ink: #101010;
  --muted: #595959;
  --line: #dbdbdb;
  --brand: #215dd4;
  --paper: #fafafa;
  --story: linear-gradient(35deg, #ffd36b 4%, #ff7a35 26%, #e92e78 55%, #9746ed 92%);
  scroll-padding-top: 70px;
}
body { font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif; font-size: 15px; }
header { padding-block: 0; }
.topbar {
  position: fixed; inset: 0 0 auto; max-width: none; z-index: 5;
  height: 60px; background: white; border-bottom: 1px solid var(--line);
  padding-inline: clamp(16px, 4vw, 48px);
}
.brand { display: flex; align-items: center; gap: 13px; font-size: 25px; }
.brand .camera { border-inline-end-color: currentColor; }
.profile-link, .avatar {
  display: grid; place-items: center; border-radius: 50%; width: 38px; height: 38px;
  background: #f2f2f2; color: var(--ink);
}
main, footer { max-width: 860px; }
main { padding-top: 76px; }
.dock {
  position: fixed; z-index: 4; inset: 60px 0 0 auto; margin: 0; width: 200px;
  padding: 18px 12px; background: white; border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: stretch;
}
.dock a {
  display: flex; align-items: center; gap: 15px; min-height: 49px; padding: 10px 14px;
  font-weight: 600; border: none; color: var(--ink);
}
.dock a:hover, .dock a[aria-current] { background: #f2f2f2; }
.dock a[aria-current] { font-weight: 700; }
@media (min-width: 861px) {
  main, footer { margin-inline-start: max(200px, calc((100% - 660px) / 2)); }
  main, footer { margin-inline-end: auto; }
}
.story-strip {
  display: flex; align-items: start; gap: 18px; overflow-x: auto;
  background: white; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 15px; padding: 14px 12px 10px;
}
.story-strip button, .story-strip a {
  display: grid; justify-items: center; gap: 5px; width: 107px; flex: 0 0 auto;
  border: 0; padding: 0 2px; color: var(--ink); background: transparent;
  text-decoration: none; text-align: center; font-size: 12px;
}
.story-ring {
  display: grid; place-items: center; width: 65px; height: 65px; border: 3px solid transparent;
  border-radius: 50%; color: #171717; transition: transform 150ms ease;
  background: linear-gradient(#fff, #fff) padding-box, var(--story) border-box;
  box-shadow: inset 0 0 0 3px white, inset 0 0 0 28px #f5f5f7;
}
.muted-ring { background: linear-gradient(#fff, #fff) padding-box, linear-gradient(#dedede, #dedede) border-box; }
.story-strip :is(button, a):hover .story-ring { transform: scale(1.06); }
.story-strip :is(button, a):active .story-ring { transform: scale(.93); }
.hero {
  padding: 0; overflow: hidden; color: var(--ink); background: white;
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px;
}
.post-head { display: flex; gap: 10px; align-items: center; padding: 9px 12px; }
.post-head small { margin-inline-start: auto; }
.avatar { background: var(--story); color: white; }
.post-cover {
  color: white; padding: clamp(21px, 4vw, 43px);
  background: radial-gradient(ellipse at 100% 120%, #ce572b, transparent 64%),
    radial-gradient(ellipse at 0% 0%, #6627aa, transparent 70%), #932960;
}
.hero h1 { font-size: clamp(24px, 4vw, 39px); margin: 0 0 8px; }
.hero p { color: #fff; margin: 0; }
.card { border-radius: 10px; scroll-margin: 10px; }
.card h2 { font-size: 20px; }
.row { border-radius: 8px; }
.insight { background: #f6f7fa; border-inline-start-color: #7e5adc; }
.status { background: #edf3ff; color: #25375b; }
.status.error { background: #fff0ed; color: #92281f; }
input, select, textarea { background: #fafafa; border-color: #bcbcbc; }
button { background: #f1f1f1; border: 0; color: var(--ink); font-weight: 600; transition: background-color 150ms, transform 150ms; }
button.primary { background: var(--brand); color: white; }
button:hover { background: #e6e6e6; }
button.primary:hover { background: #1649b5; }
button:active { transform: scale(.98); }
:focus-visible { outline-color: #215dd4; }
.icon { display: inline-block; width: 22px; height: 22px; position: relative; flex: none; }
.icon::before, .icon::after { content: ""; position: absolute; }
.camera, .reel { border: 2px solid; border-radius: 6px; }
.camera::before { inset: 4px; border: 2px solid; border-radius: 50%; }
.camera::after { width: 3px; height: 3px; border-radius: 50%; background: currentColor; inset: 2px 2px auto auto; }
.reel::before { inset: 4px 0 auto; border-top: 2px solid; transform: rotate(-9deg); }
.reel::after { inset: 7px auto auto 6px; border-left: 7px solid; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.home::before { width: 14px; height: 14px; left: 4px; top: 3px; border: 2px solid; transform: rotate(45deg); border-radius: 3px; }
.home::after { inset: 10px 3px 0; background: white; border: 2px solid; border-top: 0; border-radius: 0 0 3px 3px; }
.dock a:hover .home::after, .dock a[aria-current] .home::after { background: #f2f2f2; }
.chart { border: 2px solid; border-radius: 5px; }
.chart::before { background: currentColor; width: 2px; height: 5px; bottom: 3px; left: 4px; box-shadow: 4px -2px, 8px -5px; }
.search::before { width: 13px; height: 13px; top: 0; left: 0; border: 2px solid; border-radius: 50%; }
.search::after { width: 9px; height: 2px; top: 16px; left: 13px; background: currentColor; transform: rotate(45deg); }
.bookmark { border: 2px solid; width: 16px; border-radius: 3px 3px 0 0; clip-path: polygon(0 0,100% 0,100% 100%,50% 77%,0 100%); }
.bookmark::before { width: 11px; height: 11px; left: 0; bottom: -7px; transform: rotate(45deg); border: 2px solid; }
.plus::before { inset: 10px 2px auto; height: 2px; background: currentColor; }
.plus::after { inset: 2px 10px; width: 2px; background: currentColor; }
.person::before { inset: 1px 7px auto; height: 8px; border: 1.5px solid; border-radius: 50%; }
.person::after { inset: 12px 3px 2px; border: 1.5px solid; border-radius: 8px 8px 3px 3px; }
@media(max-width: 860px) {
  :root { scroll-padding-bottom: calc(65px + env(safe-area-inset-bottom)); }
  .topbar { height: 55px; }
  main { padding-top: 68px; }
  footer { padding-bottom: 82px; }
  .dock {
    inset: auto 0 0; width: auto; flex-direction: row; justify-content: space-around;
    padding: 3px 4px max(3px, env(safe-area-inset-bottom)); gap: 0;
    border: 0; border-top: 1px solid var(--line);
  }
  .dock a { flex: 1; flex-direction: column; justify-content: center; gap: 3px; padding: 4px; font-size: 11px; }
}
@media(max-width: 470px) { .story-strip { gap: 4px; justify-content: space-between; } .story-strip :is(button,a) { width: 94px; } }
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.delete-confirm { display:flex; gap:10px; align-items:center; margin-top:12px; }
.delete-confirm input { width:20px; height:20px; flex:none; }
#delete-details summary { cursor:pointer; font-weight:600; }
button.danger { color:white; background:#9d2525; }
button.danger:hover { background:#781619; }
#delete-feedback { color:#9d2525; }
