/* The gallery (templates/gallery.html, gallery/*.js): the studio's paper and lines (style.css), the
   workshop's pixel buttons (pxbtn.css), a black pixel heart for likes. */

/* ---------- top ---------- */
.g-top { display: flex; align-items: center; gap: 12px 14px; flex-wrap: wrap; margin-bottom: 40px; }
/* the site's name (home: making a pattern), as light as on the studio */
.g-brand { margin-right: auto; font: 300 30px/1 var(--sans); letter-spacing: .04em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.g-brand:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.g-back { display: inline-block; margin: -16px 0 22px; font-size: 13px; letter-spacing: .06em; color: var(--ink-3); text-decoration: none; }
.g-back:hover { color: var(--ink); }
.g-links { --gap: 14px; display: flex; align-items: center; gap: var(--gap); }
/* the three ways, each its own: a short hairline between */
.g-links > a + a { gap: 0; }
.g-links > a + a::before { content: ""; width: 1px; height: 12px; margin-right: var(--gap); background: var(--line); }
.g-links[data-here="gallery"] .g-nav-gallery, .g-links[data-here="diary"] .g-nav-diary { color: var(--ink); font-weight: 500; }
/* comments new to the person signed in, in the diaries: a red dot by the way there (account.js) */
.g-nav-diary { position: relative; }
.g-nav-diary.g-news::after { content: ""; position: absolute; top: 50%; right: -9px; width: 6px; height: 6px; margin-top: -9px; border-radius: 50%;
                             background: #c4452b; box-shadow: 0 0 0 2px var(--paper); }
.g-account { display: inline-flex; align-items: center; padding-left: 14px; border-left: 1px solid var(--line); }
/* a phone: the account up by the site's name, the three ways on a row of their own under them */
@media (max-width: 600px) {
  .g-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 12px; }
  .g-account { grid-row: 1; grid-column: 2; padding-left: 0; border-left: 0; }
  .g-me > span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .g-links { grid-row: 2; grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) { .g-brand { font-size: 24px; } }

/* ---------- people's pictures (pixel portraits, scaled up sharp) ---------- */
.g-avatar.tiny { width: 16px; height: 16px; }
.g-avatar.mid { width: 44px; height: 44px; }
.g-avatar.big { width: 96px; height: 96px; }
.g-avatar.huge { width: 88px; height: 88px; }

/* ---------- headings, tools ---------- */
.g-title { font: 300 36px/1.15 var(--sans); letter-spacing: .06em; margin: 14px 0 0; word-break: keep-all; }
@media (max-width: 600px) { .g-title { font-size: 28px; } }
.g-main .rule { margin-top: 22px; }
.g-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px 16px; flex-wrap: wrap; margin: 34px 0 26px; }
.g-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-pills-bar { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
.g-search { width: min(240px, 100%); padding: 7px 2px; border: 0; border-bottom: 1px solid var(--stone); background: transparent; font: inherit; font-size: 13px; color: var(--ink); }
.g-search:focus { outline: none; border-color: var(--ink); }
.g-empty { padding: 48px 0; color: var(--ink-3); text-align: center; }
.g-fine { font-size: 12px; color: var(--ink-3); line-height: 1.6; word-break: keep-all; text-wrap: balance; }   /* Korean breaks between words, lines of even length */
.g-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 56px 0 18px; }
.g-sec h2 { font: 500 14px var(--sans); letter-spacing: .1em; margin: 0; }
.g-quiet { font-size: 12px; color: var(--ink-3); }
.g-px { display: block; flex: none; }

/* ---------- cards ---------- */
.g-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
@media (max-width: 900px) { .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; } }
.g-card { position: relative; min-width: 0; }
.g-card-link { display: block; color: inherit; text-decoration: none; }
.g-fabric { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; background: var(--fabric); overflow: hidden; }
/* placed by the fabric's own edges: a percentage height of the square (aspect-ratio) isn't a size a browser trusts, so a tall pattern spilled out below and was cut off */
.g-fabric img { position: absolute; inset: 15%; width: 70%; height: 70%; object-fit: contain; image-rendering: pixelated; }
.g-card-link:hover .g-fabric { box-shadow: inset 0 0 0 1px var(--stone); }
.g-card-title { display: block; margin-top: 12px; font-weight: 500; font-size: 14px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.g-by { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--ink-3); text-decoration: none; }
.g-by span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-stats { display: flex; gap: 10px; flex: none; font: 400 11.5px var(--mono); color: var(--ink-2); }
.g-stats span { display: inline-flex; align-items: center; gap: 4px; }
.g-more { margin: 32px auto 0; display: flex; }
.g-review { margin-top: 28px; }
.g-review-note { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }
.g-review-note b { font-weight: 500; color: #a8433b; }
.g-review-note a { color: inherit; text-decoration: none; }
.g-review-note a:hover { text-decoration: underline; text-underline-offset: 3px; }
.g-review-acts { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; }
.g-dots-at { position: absolute; right: 8px; top: 8px; z-index: 4; }
.g-dots { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); cursor: pointer; }

/* ---------- a post ---------- */
.g-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 800px) { .g-detail { grid-template-columns: 1fr; gap: 28px; } }
.g-stage { border-radius: 16px; }
.g-stage img { inset: 10%; width: 80%; height: 80%; }
.g-post-title { font: 300 30px/1.25 var(--sans); letter-spacing: .05em; margin: 14px 0 18px; overflow-wrap: anywhere; }
.g-author-row { position: relative; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.g-author { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.g-author .g-avatar { width: 38px; height: 38px; }
.g-author b, .g-pop b { display: block; font-weight: 500; }
.g-author small, .g-pop small { display: block; font: 400 12px var(--mono); color: var(--ink-3); }
.g-pop { position: absolute; left: 0; top: calc(100% - 4px); z-index: 5; width: min(300px, 100%); padding: 18px; border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -18px rgba(0, 0, 0, .35); }
.g-pop-head { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.g-pop p { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.g-pop .g-pop-nums { display: flex; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.g-pop-nums b { display: inline; margin-right: 4px; font: 400 13px var(--mono); color: var(--ink); }
.g-kv { display: grid; grid-template-columns: 72px 1fr; gap: 8px 12px; margin: 20px 0; font-size: 13px; }
.g-kv dt { color: var(--ink-3); }
.g-kv dd { margin: 0; font: 400 12.5px var(--mono); }
.g-finished { display: grid; gap: 3px; }
.g-threads { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.g-threads span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.g-threads i { width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(17, 17, 17, .18); }
.g-counts { display: flex; gap: 32px; margin: 0; font-size: 11.5px; color: var(--ink-3); }
.g-counts b { display: block; font: 400 22px/1.2 var(--mono); color: var(--ink); }
.g-acts { display: flex; gap: 10px; align-items: stretch; margin-top: 22px; }
.g-acts .g-keep { flex: 1; justify-content: center; --pad-y: 11px; font-size: 14px; }
.g-acts .px-btn span { font: 400 12px var(--mono); }
.g-take { display: flex; gap: 18px; flex-wrap: wrap; margin: 16px 0 0; font-size: 12.5px; }
.g-link { padding: 0 0 1px; border: 0; border-bottom: 1px solid var(--stone); background: none; font: inherit; color: var(--ink-2); cursor: pointer; }
.g-link.quiet { margin-left: auto; border: 0; color: var(--ink-3); }
.g-link.danger { color: #a8433b; border-color: #e3b9b4; }

/* ---------- a maker ---------- */
.g-prof { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: start; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .g-prof { grid-template-columns: auto minmax(0, 1fr); } .g-side { grid-column: 1 / -1; justify-items: start; } }
.g-name { font-size: 30px; margin-top: 4px; overflow-wrap: anywhere; }
.g-handle { margin: 6px 0 0; font: 400 12px var(--mono); letter-spacing: .04em; color: var(--ink-3); }
.g-bio { margin: 12px 0 0; max-width: 460px; font-size: 13.5px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.g-side { display: grid; justify-items: end; gap: 22px; }
.g-totals { display: flex; gap: 32px; font-size: 11.5px; color: var(--ink-3); }
.g-totals b { display: block; font: 400 22px/1.2 var(--mono); color: var(--ink); }
.g-tabs { display: flex; gap: 26px; }
.g-tabs a { padding-bottom: 6px; border-bottom: 1.5px solid transparent; font: 500 14px var(--sans); letter-spacing: .08em; color: var(--ink-3); text-decoration: none; }
.g-tabs a.on { color: var(--ink); border-color: var(--ink); }
.g-tabs i { margin-left: 6px; font: 400 13px var(--mono); font-style: normal; color: var(--ink-3); }

/* ---------- dialogs ---------- */
.g-dialog { width: min(400px, calc(100vw - 32px)); padding: 28px 28px 24px; border: 0; border-radius: 18px; background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); }
.g-dialog.small { width: min(340px, calc(100vw - 32px)); }
.g-dialog::backdrop { background: rgba(30, 26, 20, .32); }
.g-dialog h2 { margin: 12px 0 6px; font: 300 22px/1.3 var(--sans); letter-spacing: .05em; }
.g-dialog p { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; word-break: keep-all; }
.g-dialog .center, .center { text-align: center; justify-content: center; }
.g-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.g-actions .g-wide { min-width: 160px; justify-content: center; }
.g-error { color: #a8433b !important; }
.g-avatar-edit { position: relative; width: 96px; height: 96px; margin: 22px auto 4px; }
.g-camera { position: absolute; right: -2px; bottom: 2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 3px var(--paper); cursor: pointer; }
.g-avatar-links { display: flex; gap: 14px; }
.g-field { display: block; margin-top: 16px; }
.g-field > span:first-child { display: block; margin-bottom: 6px; font-size: 12px; letter-spacing: .04em; color: var(--ink-3); }
.g-input { display: flex; align-items: center; gap: 4px; width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.g-input:focus-within, textarea.g-input:focus { outline: none; border-color: var(--ink); }
.g-input input { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; outline: none; }
.g-input .g-at { font: 400 13px var(--mono); color: var(--ink-3); }
.g-input small { flex: none; font-size: 12px; color: var(--ink-3); }
.g-input small.ok { color: #2f7a52; }
.g-input small.bad { color: #a8433b; }
textarea.g-input { display: block; resize: vertical; min-height: 78px; }
.g-leave-tidy { margin-top: 16px !important; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px !important; color: var(--ink-3) !important; }
.g-leave-tidy a { margin: 0 4px; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--stone); }
.g-leave-row { margin-top: 18px !important; font-size: 12px !important; color: var(--ink-3) !important; }
.g-publish-picture { width: min(240px, 64vw); margin: 16px auto 4px; border-radius: 12px; }
.g-publish-picture img { inset: 7%; width: 86%; height: 86%; }
.g-publish-text { white-space: pre-line; }                                  /* a sentence a line */
.g-check span { text-wrap: balance; }
.g-publish-name { text-align: center; font-weight: 500; color: var(--ink) !important; }
.g-check { word-break: keep-all; display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; cursor: pointer; }
.g-check input { margin-top: 3px; }
#askInput { margin-top: 12px; }

.g-toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 999px;
  background: rgba(20, 18, 16, .86); color: #f6f2ea; font-size: 13px; }

/* the keepers' page (review.js): posts and diary entries as tabs; a diary entry as text, photos and why */
.g-tabs .g-tab { padding: 0 0 6px; border: 0; border-bottom: 1.5px solid transparent; background: none; font: 500 14px var(--sans);
                 letter-spacing: .08em; color: var(--ink-3); cursor: pointer; }
.g-tabs .g-tab[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.g-title + .g-tabs { margin-top: 10px; }
.g-review-entries { display: grid; gap: 12px; max-width: 560px; }
.g-review-entry { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.g-review-top { display: flex; justify-content: space-between; gap: 10px; margin: 0; font-size: 12px; color: var(--ink-3); }
.g-review-top a { color: var(--ink-2); }
.g-review-text { margin: 8px 0; font-size: 13.5px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.g-review-photos { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.g-review-photos img { display: block; width: 92px; height: 92px; object-fit: cover; border-radius: 8px; }
.g-review-why { margin: 4px 0 0; font-size: 12px; color: var(--ink-2); }
/* a keeper's top bar: the reports waiting (account.js drawChip) */
.g-reports { align-self: center; margin-right: 10px; padding: 3px 10px; border-radius: 999px; background: #a8433b; color: #fff;
             font-size: 12px; text-decoration: none; white-space: nowrap; }

/* ---------- shared with the diary: pixel icons (pixicons.js), a panel from a button (pop.js), a ⋯ menu (menu.js) ---------- */
.px-icon { display: inline-flex; flex: none; width: 16px; height: 16px; }
.px-icon .px-ic { display: block; width: 100%; height: 100%; }
.px-popat, .px-popwrap { position: relative; }
.px-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 5; width: max-content; min-width: 140px; max-width: min(300px, calc(100vw - 32px));
  padding: 10px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #e3dccd, 0 16px 30px -18px rgba(0, 0, 0, .4); }
.px-pop-end { left: auto; right: 0; }
.px-pop:has(> .px-menu) { min-width: 0; padding: 6px; }       /* a menu: as wide as its words */
.px-menu { display: grid; margin: -2px; }
.px-menu button { display: flex; align-items: center; gap: 7px; padding: 7px 12px 7px 9px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-size: 13px; text-align: left; white-space: nowrap; cursor: pointer; }
.px-menu button:hover { background: #f1ece2; color: var(--ink); }
.px-menu .px-danger, .px-menu .px-danger:hover { color: #a5392e; }

/* why one reports a post or a diary entry (report.js) */
.g-reasons { display: grid; gap: 9px; margin: 14px 0 4px; font-size: 13px; color: var(--ink-2); }
.g-reasons label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.g-reasons input { margin: 0; accent-color: var(--ink); }
