/* Yubaree community site — layout on top of shared/yubaree.css */

/* ---- top menu ---- */
.site-top .topbar-inner { max-width: 1240px; margin: 0 auto; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav > a, .site-nav .apps-menu > button { color: var(--ink); text-decoration: none; font-weight: 700; padding: .42rem .72rem; border-radius: 999px; border: 2px solid transparent; box-shadow: none; background: none; }
.site-nav > a:hover, .site-nav .apps-menu > button:hover { border-color: var(--line); background: var(--paper); }
.site-nav > a.active { background: var(--c-orange); color: var(--c-paper); border-color: var(--line); box-shadow: var(--shadow-sm); }
.apps-menu { position: relative; }
.menu-panel { position: absolute; top: calc(100% + 10px); left: 0; z-index: 50; width: 340px; background: var(--paper); border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--c-orange); padding: .5rem; }
.menu-app { display: flex; gap: .75rem; align-items: center; padding: .55rem .6rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.menu-app:hover { background: var(--soft); }
.menu-app svg { width: 38px; height: 38px; flex: none; }
.menu-app strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
.menu-app span.t { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.menu-soon { border-top: 2px dashed var(--line-soft); margin-top: .35rem; padding: .55rem .6rem .25rem; }
.menu-soon .pills { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
/* The apps drop-down: two columns so all of the apps fit under the sticky top bar; it scrolls on a very short window. */
#apps-panel { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; }
.menu-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem .3rem; }
.menu-app { padding: .45rem .55rem; }
.menu-app svg { width: 34px; height: 34px; }
.menu-all { display: block; border-top: 2px dashed var(--line-soft); margin-top: .35rem; padding: .6rem .6rem .35rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.menu-all:hover { text-decoration: underline; }
.site-nav .apps-menu > button.active { background: var(--c-orange); color: var(--c-paper); border-color: var(--line); box-shadow: var(--shadow-sm); }
.apps-page h1 { margin: 0; font-size: 2.4rem; }
.quick-app.all { border-style: dashed; color: var(--accent); }
.quick-app .all-ico { font-size: 2rem; line-height: 42px; height: 42px; }
.nav-toggle { display: none; }
.auth-area .avatar { cursor: pointer; }
.user-menu { position: relative; }
.user-menu .menu-panel { left: auto; right: 0; width: 240px; }
.user-menu .menu-panel a, .user-menu .menu-panel button { display: flex; width: 100%; padding: .5rem .6rem; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600;
  border: 0; box-shadow: none; background: none; justify-content: flex-start; }
.user-menu .menu-panel a:hover, .user-menu .menu-panel button:hover { background: var(--soft); }
.user-btn { padding: .2rem .7rem .2rem .25rem !important; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; align-items: center; padding: 3.2rem 1.5rem 2.5rem; max-width: 1120px; margin: 0 auto; }
.hero .stripes { margin-bottom: 1.4rem; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.6rem; }
.stickers { position: relative; height: 400px; }
.sticker { position: absolute; width: 230px; background: var(--paper); border: 3px solid var(--line); border-radius: 18px; box-shadow: 6px 6px 0 var(--line); padding: 1.1rem 1.15rem;
  text-decoration: none; color: var(--ink); transition: transform .12s; }
.sticker:hover { transform: rotate(0deg) translate(-3px, -3px) !important; z-index: 5; }
.sticker svg { width: 64px; height: 64px; display: block; margin-bottom: .6rem; }
.sticker strong { font-family: var(--serif); font-size: 1.35rem; display: block; line-height: 1.1; }
.sticker span { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.sticker:nth-child(1) { left: 0; top: 40px; transform: rotate(-6deg); }
.sticker:nth-child(2) { left: 50%; top: 0; transform: rotate(4deg); z-index: 2; box-shadow: 6px 6px 0 var(--c-orange); }
.sticker:nth-child(3) { left: 24%; top: 205px; transform: rotate(-2deg); z-index: 3; box-shadow: 6px 6px 0 var(--c-teal); }

/* ---- sections ---- */
.section { max-width: 1120px; margin: 0 auto; padding: 2.2rem 1.5rem; }
.section-head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.section-head h2 { margin: 0; font-size: 2.1rem; }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.app-card { display: flex; flex-direction: column; gap: .5rem; }
.app-card svg { width: 58px; height: 58px; }
.app-card h3 { font-size: 1.5rem; margin: .2rem 0 0; }
.app-card .blurb { color: var(--muted); flex: 1; margin: 0; }
.soon-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: 1.4rem; }

/* ---- community feed ---- */
.feed-tools { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.feed { display: grid; gap: 1.3rem; }
.feed-page { display: grid; gap: 1.3rem; }
.feed-more { margin: 0; text-align: center; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.6rem; align-items: start; }
.feed-side { position: sticky; top: 96px; display: grid; gap: 1.2rem; }
.post-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .55rem; }
.post-head .who { line-height: 1.2; }
.post-head .who a { color: var(--ink); text-decoration: none; font-weight: 700; }
.post-head .who a:hover { text-decoration: underline; }
.post-head .chips { margin-left: auto; display: flex; gap: .35rem; flex-wrap: wrap; }
.post h3 { font-size: 1.4rem; margin: .1rem 0 .4rem; }
.post h3 a { color: var(--ink); text-decoration: none; }
.post h3 a:hover { color: var(--accent); }
.post-body { white-space: pre-wrap; }
.post.in-feed .post-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { display: flex; gap: .5rem; align-items: center; margin-top: .8rem; flex-wrap: wrap; }
.like.liked { background: var(--c-orange); color: var(--c-paper); border-color: var(--line); }
.attach { margin-top: .85rem; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); padding: .85rem 1rem; }
.attach .a-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.attach .a-head svg { width: 26px; height: 26px; flex: none; }
.attach .a-title { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.attach blockquote { margin: 0; font-family: var(--serif); font-size: 1.04rem; line-height: 1.65; font-variation-settings: "SOFT" 50, "opsz" 12; white-space: pre-wrap; }
.w-fig.page img { width: 100%; max-width: 720px; margin: 0 auto; display: block; border: 1.5px solid var(--line); border-radius: 3px; }
.post.in-feed .attach blockquote { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.attach audio { width: 100%; margin-top: .3rem; }
.attach.with-cover { display: flex; gap: .85rem; align-items: center; } .attach .a-cover { width: 84px; height: 84px; object-fit: cover; border: 2px solid var(--line); border-radius: 8px; flex: none; } .attach .a-main { flex: 1; min-width: 0; }
.attach .segs { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.img-attach { margin: .85rem 0 0; }
.comic-pages { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: .3rem; }
.comic-page { margin: 0; text-align: center; }
.comic-page img { display: block; max-width: 100%; height: auto; max-height: 640px; object-fit: contain; border: 2px solid var(--line); border-radius: 4px; background: #fff; }
.comic-pages.all .comic-page img { max-height: none; width: min(100%, 720px); }
.comic-page figcaption { font-size: .75rem; color: var(--muted); margin-top: .25rem; }
.timelapse { margin-top: .7rem; } .timelapse summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.timelapse video { display: block; width: 100%; max-height: 70vh; border: 2px solid var(--line); border-radius: 8px; background: #000; margin-top: .4rem; }
.video-attach { margin: .85rem 0 0; }
/* an arcade game from Coin-Op: its cover with a Play button, then the cabinet itself */
.game-attach .ga-pitch { margin: .1rem 0 .6rem; }
.ga-stage { position: relative; max-width: 768px; margin: 0 auto; }
.ga-stage > img { display: block; width: 100%; height: auto; image-rendering: pixelated; border: 3px solid var(--line); border-radius: 12px; background: #101010; }
.ga-stage .ga-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ga-stage .ga-play:active { transform: translate(calc(-50% + 2px), calc(-50% + 2px)); }
.ga-board { margin-top: .85rem; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); padding: .75rem 1rem; }
.ga-scores { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.ga-scores li { counter-increment: rank; display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; border-bottom: 1px dashed var(--line-soft); }
.ga-scores li:last-child { border-bottom: 0; }
.ga-scores li::before { content: counter(rank) "."; width: 1.6rem; color: var(--muted); font-family: var(--mono); }
.ga-scores li > span { flex: 1; }
.video-attach video { display: block; width: 100%; height: auto; max-height: 70vh; border: 2px solid var(--line); border-radius: 8px; background: #000; margin-top: .3rem; }
.img-attach img { display: block; max-width: 100%; height: auto; max-height: 560px; object-fit: contain; border: 2px solid var(--line); border-radius: 8px; background: var(--paper); margin-top: .3rem; }
.ra-desc { margin: .2rem 0 .6rem; }
.ra-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem; }
.ra-ings, .ra-steps { margin: 0; padding-left: 1.2rem; font-size: .9rem; }
.ra-ings li, .ra-steps li { margin: .12rem 0; }
.ra-ings .ra-h { list-style: none; margin-left: -1.2rem; font-weight: 700; margin-top: .45rem; }
.ra-steps.clamp li { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ra-al, .ra-notes { margin: .6rem 0 0; }
@media (max-width: 600px) { .ra-cols { grid-template-columns: 1fr; } }
.da-cols { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; }
.da-glass { display: flex; justify-content: center; min-width: 110px; }
.da-meta { margin: 0 0 .4rem; }
.age-chip { font-size: .7rem; padding: .02rem .4rem; background: #5a1a2a; color: #f6dcc4; vertical-align: 1px; letter-spacing: 0; }
.yg-anim .yg-smoke path { animation: yg-drift 3.2s ease-in-out infinite; }
@keyframes yg-drift { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-6px); opacity: .5; } }
.yg-anim .yg-bub { animation: yg-rise 2.4s linear infinite; }
@keyframes yg-rise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
@media (max-width: 520px) { .da-cols { grid-template-columns: 1fr; } }
.side-card h3 { font-size: 1.15rem; }
.side-card ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.side-card li { margin: .25rem 0; }

/* ---- post page ---- */
.comments { display: grid; gap: .9rem; margin-top: 1rem; }
.comment { display: flex; gap: .7rem; }
.comment .bubble { flex: 1; background: var(--paper); border: 2px solid var(--line); border-radius: 12px; padding: .6rem .85rem; }
.comment .meta { font-size: .82rem; color: var(--muted); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.comment .meta strong { color: var(--ink); }
.comment p { margin: .2rem 0 0; white-space: pre-wrap; }

/* ---- membership ---- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.plan h3 { font-size: 1.6rem; margin: 0; }
.plan .price { font-family: var(--serif); font-size: 2.6rem; font-weight: 800; line-height: 1; margin: .6rem 0 .2rem; }
.plan .price small { font-family: var(--sans); font-size: .9rem; font-weight: 600; color: var(--muted); }
.plan ul { padding-left: 1.2rem; margin: .8rem 0 1rem; }
.plan li { margin: .3rem 0; }
.plan.member { box-shadow: 6px 6px 0 var(--c-orange); }

/* ---- profile ---- */
.profile-head { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.profile-head h1 { font-size: 2.3rem; margin: 0; }
.swatches { display: flex; gap: .5rem; margin-top: .4rem; }
.swatches button { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.swatches button.on { outline: 3px solid var(--c-mustard); outline-offset: 2px; }

/* ---- auth modal ---- */
.auth-tabs { margin-bottom: .6rem; }
.note { font-size: .82rem; color: var(--muted); margin-top: .8rem; }

/* ---- footer ---- */
.site-foot { margin-top: 3rem; background: var(--paper); }
.foot-inner { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.foot-inner svg { width: 34px; height: 34px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .stickers { height: 300px; max-width: 520px; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-layout { grid-template-columns: 1fr; }
  .feed-side { position: static; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; order: 5; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: .4rem 0 .6rem; }
  .site-nav.open { display: flex; }
  .site-nav > a, .site-nav .apps-menu > button { width: 100%; justify-content: flex-start; }
  .menu-panel { position: static; width: 100%; box-shadow: none; margin-top: .4rem; }
  .user-menu .menu-panel { position: absolute; width: 240px; box-shadow: 5px 5px 0 var(--c-orange); }
  /* On a phone the open menu sits inside the sticky top bar, so it has to scroll on its own or the last apps can't be reached. */
  .site-nav.open { max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain; }
  #apps-panel { width: 100%; max-height: none; overflow: visible; }
  .menu-app span.t { display: none; }
  .app-grid { grid-template-columns: 1fr; }
  .apps-page h1 { font-size: 1.9rem; }
  .brand-name { font-size: 1.3rem; }
  .site-top .topbar-inner { gap: .5rem; }
  .site-top .spacer { order: 1; } .site-top .auth-area { order: 2; } .site-top .nav-toggle { order: 3; } .site-top .site-nav { order: 5; }
  .auth-area .btn.ghost { display: none; }
  .stickers { height: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; max-width: none; }
  .sticker, .sticker:nth-child(1), .sticker:nth-child(2), .sticker:nth-child(3) { position: static; width: auto; padding: .75rem .7rem; border-radius: 14px; }
  .sticker svg { width: 40px; height: 40px; margin-bottom: .4rem; }
  .sticker strong { font-size: 1rem; }
  .sticker span { display: none; }
  .section-head h2 { font-size: 1.7rem; }
  .post-head .chips { margin-left: 0; }
}

/* ---- genres and finished writing ---- */
.chip.genre { background: var(--paper); color: var(--ink); border-style: dashed; }
.genre-pick { width: auto; margin: 0; border-radius: 999px; padding: .38rem .8rem; font-weight: 700; font-size: .85rem; box-shadow: var(--shadow-sm); background: var(--paper); }
.writing-attach blockquote { font-family: var(--serif); }
.writing-attach .w-cover { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); margin: .2rem 0 .8rem; }
.post.in-feed .writing-attach .w-cover { max-height: 220px; }
.reader { font-family: var(--serif); font-size: 1.12rem; line-height: 1.72; max-width: 40rem; margin: .6rem auto 0; font-variation-settings: "SOFT" 50, "opsz" 12; }
.reader p { margin: 0 0 1.05em; }
.reader section + section { margin-top: 2.6rem; padding-top: 2rem; border-top: 2px dashed var(--line-soft); }
.reader header { margin-bottom: 1.1rem; }
.reader h3 { font-size: 1.6rem; margin: 0; }
.reader h4 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
.reader .dek { font-style: italic; color: var(--muted); margin: .3rem 0 0; }
.reader blockquote { margin: 1.1em 1.2em; font-style: italic; border: 0; padding: 0; background: none; }
.reader hr.scene-break { border: 0; text-align: center; margin: 1.6em 0; height: auto; }
.reader hr.scene-break::before { content: "◆  ◆  ◆"; color: var(--accent); font-size: .6em; letter-spacing: .5em; white-space: pre; }
.reader .pull-quote { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.45rem; line-height: 1.25; margin: 1.6rem 0; padding: .2em 0 .2em 1rem; border-left: 6px solid var(--accent); }
.reader figure { margin: 1.6rem 0; }
.reader figure img { display: block; width: auto; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 8px; border: 2px solid var(--line); }
.reader figcaption { font-family: var(--sans); font-size: .8rem; line-height: 1.4; color: var(--muted); margin-top: .45rem; }
.reader figcaption .credit { font-size: .82em; letter-spacing: .08em; text-transform: uppercase; }
@media (min-width: 640px) { .reader figure.left, .reader figure.right { width: 46%; margin-top: .4rem; margin-bottom: .8rem; } .reader figure.left { float: left; margin-right: 1.3rem; } .reader figure.right { float: right; margin-left: 1.3rem; } }
.reader section::after { content: ""; display: block; clear: both; }
.reader-toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.6rem; font-family: var(--sans); font-size: .82rem; }
.reader-toc a { border: 2px solid var(--line); border-radius: 999px; padding: .15rem .7rem; text-decoration: none; color: var(--ink); font-weight: 700; background: var(--paper); }
.reader-toc a:hover { background: var(--soft); }

.tracklist { margin: .2rem 0 0; padding-left: 1.4rem; }
.tracklist li { margin: .1rem 0; }
.tl-at { color: var(--muted); font-size: .78rem; margin-right: .3rem; }
.perm-list, .perm-open { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-direction: column; gap: .6rem; }
.perm-row { display: flex; gap: .6rem; align-items: flex-start; border-bottom: 1.5px dashed var(--line-soft); padding-bottom: .6rem; }
.perm-row p { margin: .1rem 0; }

/* ---------- phones: filters are one row that slides sideways, and everything tappable is thumb-sized ---------- */
@media (max-width: 760px) {
  #feed-filter, #feed-sort, #wall-filter, #cr-kinds, #st-format { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #feed-filter::-webkit-scrollbar, #feed-sort::-webkit-scrollbar, #wall-filter::-webkit-scrollbar, #cr-kinds::-webkit-scrollbar, #st-format::-webkit-scrollbar { display: none; }
  #feed-filter button, #feed-sort button, #wall-filter button, #cr-kinds button, #st-format button { flex: none; white-space: nowrap; padding: .78rem 1rem; }
  .section-head { flex-wrap: wrap; } .section-head > * { min-width: 0; }
  .feed-tools { gap: .55rem; flex: 1 1 100%; min-width: 0; max-width: 100%; } .feed-tools > * { max-width: 100%; min-width: 0; }
  .site-nav > a, .site-nav .apps-menu > button { padding: .7rem .95rem; }
  .auth-area a, .auth-area button, .nav-toggle { min-height: 42px; display: inline-flex; align-items: center; }
}

/* ---------- home, logged in: the apps as one row, then the feed ---------- */
.home-quick { padding-bottom: 0; }
.quick-apps { display: flex; gap: .7rem; overflow-x: auto; padding: .3rem .2rem 1rem; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.quick-app { flex: none; width: 104px; display: grid; justify-items: center; align-content: start; gap: .4rem; text-align: center; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .82rem; line-height: 1.2; padding: .75rem .4rem .65rem; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow-sm); }
.quick-app:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.quick-app svg { width: 42px; height: 42px; }
