/* Chat with Keralam, at the end of the front page: the write box beside the posts (shared/talk.js). */
.talk { margin-top: 30px; }
.tk-wrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }

/* The write box: a wooden stall of its own */
.tk-box { position: sticky; top: 10px; display: grid; gap: 6px; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, rgba(92, 46, 20, 0.88), rgba(59, 27, 11, 0.92)); box-shadow: inset 0 0 0 2px #8A5528, 0 14px 30px rgba(0, 0, 0, 0.35); }
.tk-box h3 { margin: 0; font-family: var(--font-display); font-size: 20px; color: #FFD66B; }
.tk-fine { margin: 0; color: rgba(242, 221, 184, 0.72); font-size: 12px; line-height: 1.4; }
.tk-label { margin-top: 4px; color: var(--cream-soft); font-size: 12.5px; font-weight: 700; }
.tk-input { width: 100%; padding: 9px 12px 7px; border: 1.5px solid rgba(232, 181, 71, 0.45); border-radius: 12px; background: rgba(255, 243, 218, 0.07); color: var(--cream); font: inherit; font-size: 15px; line-height: 1.4; }
.tk-input::placeholder { color: rgba(242, 221, 184, 0.5); }
.tk-input:focus { outline: none; border-color: #FFD66B; box-shadow: 0 0 0 3px rgba(255, 214, 107, 0.2); }
textarea.tk-input { resize: vertical; min-height: 64px; }
.tk-input:disabled { opacity: 0.5; }
.tk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.tk-chip { padding: 3px 10px 1px; border: 0; border-radius: 999px; background: rgba(255, 243, 218, 0.1); color: var(--cream-soft); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.tk-chip[aria-checked="true"] { background: #FFD66B; color: #3A1A08; }
.tk-chip-more { background: transparent; box-shadow: inset 0 0 0 1px rgba(242, 221, 184, 0.35); }
.tk-row { display: flex; align-items: center; gap: 8px; }
.tk-ml { padding: 4px 10px 2px; border: 0; border-radius: 8px; background: rgba(255, 243, 218, 0.12); color: var(--cream); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.tk-ml[aria-pressed="true"] { background: #3DDC84; color: #063; }
.tk-count { margin-left: auto; color: rgba(242, 221, 184, 0.6); font-size: 12px; font-variant-numeric: tabular-nums; }
.tk-count.over { color: #FF8A7A; font-weight: 800; }
.tk-go { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px 6px; border: 0; border-radius: 12px; background: linear-gradient(180deg, #FFE08A, #E8A21B); color: #3A1A08; font: inherit; font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 var(--brass-deep); cursor: pointer; }
.tk-go:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brass-deep); }
.tk-go:disabled { opacity: 0.55; cursor: default; transform: none; }
.tk-msg { margin: 0; min-height: 0; color: #FF9A8A; font-size: 13px; font-weight: 700; }
.tk-msg:empty { display: none; }
.tk-msg.ok { color: #3DDC84; }
.tk-closed { margin: 0; color: #FFD66B; font-size: 13px; font-weight: 700; }

/* Manglish: the spellings to tap, the first one taken at a space */
.tk-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-suggest[hidden] { display: none; }
.tk-sug { padding: 4px 10px 2px; border: 0; border-radius: 8px; background: rgba(255, 243, 218, 0.14); color: var(--cream); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.tk-sug.first { background: #FFD66B; color: #3A1A08; }
.tk-keep { background: transparent; box-shadow: inset 0 0 0 1px rgba(242, 221, 184, 0.35); color: var(--cream-soft); font-size: 13px; }

/* The posts */
.tk-sort { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tk-sort button { padding: 4px 12px 2px; border: 0; border-radius: 999px; background: rgba(255, 243, 218, 0.1); color: var(--cream-soft); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tk-sort button[aria-pressed="true"] { background: var(--cream); color: var(--wood-dark); }
.tk-list { display: grid; gap: 10px; }
.tk-empty { margin: 0; padding: 18px 14px; border-radius: 16px; background: rgba(20, 6, 20, 0.35); color: var(--cream-soft); text-align: center; font-size: 14.5px; }
.tk-post { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(20, 6, 20, 0.45); box-shadow: inset 0 0 0 1px rgba(232, 181, 71, 0.25); }
.tk-owner-post { box-shadow: inset 0 0 0 1.5px rgba(255, 214, 107, 0.7); background: rgba(60, 30, 10, 0.55); }
.tk-body { flex: 1; min-width: 0; }
.tk-av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: hsl(var(--h, 30) 55% 40%); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 0 0 2px rgba(255, 243, 218, 0.7); }
.tk-av-owner { background: url("logos/play-keralam.png") center / 112% no-repeat, #17241d; box-shadow: 0 0 0 2px #FFD66B; }
.tk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; }
.tk-name { font-weight: 800; color: var(--cream); overflow-wrap: anywhere; }
.tk-when { color: rgba(242, 221, 184, 0.7); font-size: 12px; font-weight: 600; }
.tk-owner { padding: 1px 8px 0; border-radius: 999px; background: #FFD66B; color: #3A1A08; font-size: 11px; font-weight: 800; }
.tk-tag { padding: 1px 8px 0; border-radius: 999px; background: #6B5A44; color: #fff; font-size: 11px; font-weight: 800; }
.tk-tag[data-tag="vaakku"] { background: #2F9E57; } .tk-tag[data-tag="paryayam"] { background: #4257D6; } .tk-tag[data-tag="thaaranira"] { background: #B87F12; }
.tk-tag[data-tag="katha"] { background: #8B4FD6; } .tk-tag[data-tag="cidmoosa"] { background: #E8392E; } .tk-tag[data-tag="sat"] { background: #D96A12; }
.tk-tag[data-tag="thurupp"] { background: #0E9C7E; } .tk-tag[data-tag="kerala-guesser"] { background: #1E8BB0; } .tk-tag[data-tag="aadyam"] { background: #D8466A; }
.tk-tag[data-tag="ashwamedham"] { background: #2E6BEB; } .tk-tag[data-tag="antakshari"] { background: #A34596; }
.tk-status { padding: 1px 8px 0; border-radius: 6px; font-size: 11px; font-weight: 900; letter-spacing: 0.03em; color: #fff; background: #4257D6; }
.tk-status[data-label="fixing"] { background: #FFC93C; color: #432; }
.tk-status[data-label="done"] { background: #3DDC84; color: #063; }
.tk-pin { color: #FFD66B; font-size: 12px; font-weight: 700; }
.tk-text { margin: 4px 0 6px; color: var(--cream); font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tk-acts button { padding: 2px 0; border: 0; background: none; color: rgba(242, 221, 184, 0.75); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.tk-acts button:hover { color: var(--cream); }
.tk-like[aria-pressed="true"] { color: #FF7A8A; }
.tk-del { color: rgba(255, 154, 138, 0.85) !important; }

/* Replies: the owner's in gold, everyone else's quieter */
.tk-replies { display: grid; gap: 8px; margin-top: 4px; }
.tk-replies:empty { display: none; }
.tk-reply-item { display: flex; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 243, 218, 0.05); }
.tk-reply-item .tk-av { width: 28px; height: 28px; font-size: 13px; }
.tk-reply-item .tk-text { font-size: 14px; margin-bottom: 4px; }
.tk-owner-reply { background: rgba(255, 214, 107, 0.1); border-left: 3px solid #FFD66B; }
.tk-replyform { display: grid; gap: 6px; margin-top: 8px; }
.tk-replyform .tk-row { justify-content: flex-end; }
.tk-ghost { padding: 6px 12px 4px; border: 0; border-radius: 10px; background: rgba(255, 243, 218, 0.1); color: var(--cream-soft); font: inherit; font-weight: 700; cursor: pointer; }
.tk-more { display: block; margin: 12px auto 0; padding: 7px 18px 5px; border: 0; border-radius: 999px; background: rgba(255, 243, 218, 0.12); color: #FFD66B; font: inherit; font-weight: 800; cursor: pointer; }
.tk-more[hidden] { display: none; }

@media (max-width: 860px) {
  .tk-wrap { grid-template-columns: 1fr; gap: 12px; }
  .tk-box { position: static; }
}
@media (max-width: 600px) {
  .talk { margin-top: 22px; }
  .tk-box { padding: 12px; }
  .tk-box h3 { font-size: 18px; }
  .tk-post { padding: 10px; gap: 9px; }
  .tk-post > .tk-av { width: 30px; height: 30px; font-size: 13px; }
  .tk-text { font-size: 14.5px; }
}
