/* The JiCHO share card and share sheet (public/share-card.js). Image first, a short title, one
   short line, the source. Same card in the share sheet and in JiCHO Messaging. */
.js-card{display:flex;flex-direction:column;width:100%;max-width:340px;border-radius:14px;overflow:hidden;background:#fff;color:#1d1a16;
  text-decoration:none;border:1px solid rgba(29,26,22,.10);box-shadow:0 1px 2px rgba(0,0,0,.06);font:400 14px/1.3 Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  -webkit-tap-highlight-color:transparent;cursor:pointer}
.js-card:focus-visible{outline:3px solid var(--jc-orange,#e8731a);outline-offset:2px}
.js-card-media{position:relative;display:block;aspect-ratio:4/3;background:#0a1526 url(/brand/jicho/og-share.jpg) center/cover no-repeat;overflow:hidden}
.js-card-media img,.js-card-media video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;background:#0a1526}
.js-card-blank{position:absolute;inset:0}
.js-card.is-loading .js-card-media{background:linear-gradient(110deg,#eee8dc 30%,#f7f3ea 50%,#eee8dc 70%) 0 0/300% 100%;animation:js-shimmer 1.2s linear infinite}
@keyframes js-shimmer{to{background-position:-300% 0}}
@media (prefers-reduced-motion:reduce){.js-card.is-loading .js-card-media{animation:none}}
.js-card-play{position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;display:grid;place-items:center;
  background:rgba(0,0,0,.5);color:#fff;font-size:18px;padding-left:3px;box-sizing:border-box}
.js-card-body{display:flex;flex-direction:column;gap:3px;padding:10px 12px 11px;background:#fbf7ef}
.js-card-title{font-weight:700;font-size:15px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.js-card-ctx{color:#6f6556;font-size:13.5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.js-card-src{color:#6f6556;font-size:13px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.js-card.is-off{cursor:default}
.js-card.is-off .js-card-body{background:#f3f0ea}

/* Inside a chat bubble: the card IS the message. */
.mx-bubble .js-card,.mx-msg .js-card{margin:2px 0 4px;max-width:min(300px,72vw)}

/* The share sheet: a bottom sheet on phones, a small centred dialog on wide screens. */
dialog.js-sheet{border:0;padding:0;margin:auto auto 0;width:100%;max-width:460px;max-height:92vh;border-radius:18px 18px 0 0;background:#fff;color:#1d1a16;
  box-shadow:0 -8px 30px rgba(0,0,0,.25);font:400 15px/1.35 Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
dialog.js-sheet::backdrop{background:rgba(5,11,20,.55)}
@media (min-width:700px){dialog.js-sheet{margin:auto;border-radius:18px}}
.js-sheet-in{display:flex;flex-direction:column;gap:12px;padding:12px 16px calc(16px + env(safe-area-inset-bottom,0px));overflow:auto;max-height:92vh;box-sizing:border-box}
.js-sheet-head{display:flex;align-items:center;justify-content:space-between}
.js-sheet-head h3{margin:0;font-size:17px;font-weight:700}
.js-x{width:40px;height:40px;border:0;border-radius:50%;background:#f3eee4;color:#1d1a16;font-size:22px;line-height:1;cursor:pointer}
.js-sheet .js-card{max-width:none;align-self:center}
@media (min-width:420px){.js-sheet .js-card{max-width:320px}}
.js-opts{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:6px 4px}
.js-opt{display:flex;flex-direction:column;align-items:center;gap:6px;min-height:76px;padding:6px 2px;border:0;border-radius:12px;background:none;color:#1d1a16;
  font:500 12.5px/1.2 inherit;cursor:pointer;text-align:center}
.js-opt:hover,.js-opt:focus-visible{background:#f7f2e8}
.js-ic{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#f3eee4;color:#5a2a0c;font-size:20px}
.js-opt-chat .js-ic{background:var(--jc-orange,#e8731a);color:#fff}
.js-opt-wa .js-ic{background:#25d366;color:#fff}
.js-opt-fb .js-ic{background:#1877f2;color:#fff}

/* Send in a chat */
.js-note{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#6f6556}
.js-note input,.js-find{width:100%;box-sizing:border-box;min-height:44px;padding:10px 12px;border:1px solid #e3d9c6;border-radius:12px;font:inherit;font-size:15px;color:#1d1a16;background:#fff}
.js-chats{display:flex;flex-direction:column;gap:2px;min-height:60px}
.js-chat{display:flex;align-items:center;gap:10px;min-height:52px;padding:6px 8px;border:0;border-radius:12px;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}
.js-chat:hover,.js-chat:focus-visible{background:#f7f2e8}
.js-ava{flex:0 0 40px;width:40px;height:40px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#f3be2b;color:#3a2500;font-weight:700}
.js-ava img{width:100%;height:100%;object-fit:cover}
.js-chat-t{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.js-send{flex:0 0 auto;padding:7px 14px;border-radius:999px;background:var(--jc-orange,#e8731a);color:#fff;font-weight:600;font-size:13.5px}
.js-chat.is-sent .js-send{background:#16a34a}
.js-empty{margin:8px 4px;color:#6f6556;font-size:14px}
