/* はにかむトーク: compact, familiar messaging with a soft nursery palette. */
:root { --talk-ink:#343b3a; --talk-muted:#7c8582; --talk-accent:#27836c; --talk-line:#eef0ec; --talk-sky:#eaf2f4; }
body.logged-in { color:var(--talk-ink); font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif; }
.logged-in .top { border-bottom:1px solid var(--talk-line); background:#fffefa; }
.brand strong { letter-spacing:.02em; color:#4c645a; }
.tabs { background:#fafbf8; border-color:var(--talk-line); gap:12px; }
.tabs button { color:#858b82; border-radius:14px; font-weight:500; }
.tabs button[aria-current=page] { color:var(--talk-accent); background:#eaf3eb; }
.tabs .nav-badge { border-color:#fafbf8; background:#e88970; }
.layout { grid-template-columns:340px minmax(0,1fr); }
#talkList { background:#fffefa; border-color:var(--talk-line); }
.list-heading { padding:24px 24px 16px; }
.list-heading .eyebrow { color:#819184; font-size:10px; letter-spacing:.08em; margin-bottom:6px; }
.list-heading h1 { font-size:28px; font-weight:750; color:#303c35; letter-spacing:.01em; }
.list-heading .icon-button { background:#edf5ec; border-radius:15px; color:#487b57; }
.search-box { background:#f1f3ef; border:0; border-radius:12px; margin:0 20px 12px; color:#91998f; }
.search-box input { min-height:42px; color:#455147; font-size:14px; }
.search-box input::placeholder { color:#91998f; }
.search-box:focus-within { outline:2px solid #7caa96; outline-offset:2px; }
.talk-greeting { margin:0 23px 9px; padding:2px 0; background:none; border:0; box-shadow:none; border-radius:0; gap:8px; justify-content:flex-start; }
.talk-greeting img { width:23px; height:23px; }
.talk-greeting img:last-child { margin-left:auto; width:21px; height:21px; }
.talk-greeting span { font-size:10px; color:#9a8e76; letter-spacing:.02em; }
.list-caption { padding:8px 24px; color:#8a9288; font-size:11px; }
#rooms { padding:0 0 16px; scrollbar-width:thin; scrollbar-color:#dde5dc transparent; }
#rooms>button { padding:15px 20px; margin:0; gap:13px; background:transparent; border:0; border-radius:0; box-shadow:none; min-height:85px; }
#rooms>button:hover { background:#f4f6f0; }
#rooms>button.selected { background:#edf4eb; box-shadow:inset 3px 0 #75a486; }
#rooms .avatar { width:52px; height:52px; font-size:20px; box-shadow:none; }
.room-copy { gap:5px; }
.room-name { font-size:15px; font-weight:600; color:#343f38; line-height:1.5; }
.room-preview { font-size:12px; color:#718075; line-height:1.5; }
.room-end { min-width:33px; gap:8px; padding-top:1px; }
.room-time { font-size:10px; color:#758173; font-variant-numeric:tabular-nums; }
#rooms>button.has-unread .room-name { font-weight:750; }
#rooms>button.has-unread .room-preview { color:#69766c; }
#rooms .badge { background:#71a885; color:#fff; min-width:21px; height:21px; line-height:21px; border-radius:11px; padding:0 6px; font-size:11px; box-shadow:none; }
#workspace[data-page=chat] #content { background:var(--talk-sky); background-image:none; }
.chat-header { background:#fcfdf9; border-bottom:1px solid #dfe9e5; min-height:77px; padding:13px 22px; gap:12px; }
.chat-header>.avatar { width:43px; height:43px; box-shadow:none; font-size:17px; }
.chat-heading { min-width:0; }
.chat-heading h1 { font-size:17px; color:#34463e; font-weight:650; letter-spacing:0; }
.chat-heading p { color:#8b968e; font-size:11px; margin-top:3px; }
.chat-actions .icon-button { background:transparent; color:#586d60; border-radius:50%; }
.chat-actions .icon-button:hover { background:#eaf1e9; }
.history-bar { background:transparent; padding:9px 16px 4px; display:flex; justify-content:center; gap:8px; }
.history-bar #older,.history-bar .important-link { min-height:30px; padding:5px 12px; font-size:11px; border-radius:16px; box-shadow:none; margin:0; }
.history-bar #older { color:#758c90; background:#f8fcfd99; }
.history-bar .important-link { color:#998249; background:#fff8df; }
.messages { padding:7px 28px 25px; scrollbar-color:#c7d9dc transparent; }
.day-divider span { background:#d8e6e9; color:#71858b; font-size:10px; padding:4px 13px; border-radius:20px; }
.message { gap:8px; margin:18px 0; }
.message>.avatar { width:32px; height:32px; font-size:13px; box-shadow:none; margin-top:0; }
.message-stack { max-width:min(72%,480px); }
.message.mine .message-stack { max-width:min(76%,480px); }
.message-name { font-size:11px; color:#6d827b; margin:0 0 5px 4px; }
.bubble { border-radius:17px; background:#fff; padding:10px 14px; box-shadow:0 1px 2px #45636609; }
.bubble:before { background:inherit; top:10px; }
.message.mine .bubble { background:#cde8c5; box-shadow:0 1px 2px #45636609; }
.message-body { font-size:15px; line-height:1.7; color:#37473f; }
.message-meta { color:#637e77; font-size:10px; margin-bottom:3px; gap:1px; }
.message-meta .readers-button { text-decoration:none; font-size:10px; color:#637c70; padding:2px 0; line-height:1.3; min-height:18px; }
.message-meta .message-more { color:#819598; font-size:17px; min-height:21px; width:28px; }
.message-meta time { font-size:10px; font-variant-numeric:tabular-nums; }
.message.is-continuation { margin-top:-9px; }
.message.is-continuation>.avatar { visibility:hidden; }
.message.is-continuation .message-name { display:none; }
.message.is-continuation .bubble:before { display:none; }
.bubble.has-photo { padding:7px; overflow:hidden; }
.bubble.has-photo>.message-body { padding:4px 7px 9px; }
.photo-attachment { gap:3px; }
.photo-thumbnail { width:260px; max-width:100%; height:190px; border-radius:12px; background:#f1f4ed; }
.photo-attachment .attachment-button { background:transparent; color:#7c8a80; font-size:10px; min-height:28px; padding:5px 7px; border-radius:7px; }
.important-bubble { border-color:#ecd99f!important; }
.composer { border-top:1px solid #dfe9e5; background:#fcfdfb; padding:9px 16px 12px; }
.compose-extras { margin:0 4px 6px; min-height:23px; justify-content:flex-end; }
.compose-extras label { font-size:10px; color:#8b9284; gap:5px; }
.compose-extras input { accent-color:#699e7b; width:15px; height:15px; min-height:15px; }
.compose-line { gap:6px; align-items:flex-end; }
.compose-line>.icon-button { width:38px; height:44px; padding:9px; color:#81917e; background:transparent; }
.compose-line>.icon-button svg { width:23px; height:23px; }
.compose-line textarea { flex:1; min-width:0; width:auto; min-height:44px; max-height:140px; height:44px; border:1px solid #e9eee5; background:#f0f3ed; color:#3f4e43; padding:10px 13px; border-radius:22px; resize:none; font-size:16px; line-height:22px; overflow-y:auto; }
.compose-line textarea::placeholder { color:#9aA294; font-size:13px; }
.compose-line .send-button { width:43px; height:43px; flex:0 0 43px; background:#4b9575; color:#fff; padding:11px; border-radius:50%; box-shadow:none; }
.compose-line .send-button svg { width:21px; height:21px; }
.file-selection { border-radius:12px; background:#eff4eb; padding:7px 10px; margin-bottom:6px; color:#64816c; font-size:12px; }
.file-selection>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attachment-preview { width:42px; height:42px; object-fit:cover; border-radius:7px; flex-shrink:0; }
.sticker-selection { background:#f5f7ed; }
.sticker-bubble { background:transparent!important; box-shadow:none!important; }
.sticker-bubble:before { display:none; }
@media(min-width:701px) and (max-width:1000px) { .layout { grid-template-columns:290px minmax(0,1fr); } .message-stack { max-width:70%; } .message.mine .message-stack { max-width:76%; } .messages { padding:8px 16px 20px; } }
@media(max-width:700px) {
  body.logged-in { height:var(--talk-viewport,100dvh); }
  #workspace { height:var(--talk-viewport,100dvh); }
  .layout { display:flex; }
  .tabs { padding:5px 10px max(7px,env(safe-area-inset-bottom)); background:#fffefa; border-top:1px solid #e9eee4; gap:3px; }
  .tabs button { min-height:54px; padding:6px 0; border-radius:12px; font-size:10px; gap:3px; }
  .tabs button[aria-current=page] { background:transparent; color:#377d59; font-weight:650; }
  .tabs svg.icon { width:23px; height:23px; }
  .tabs .nav-badge { border-color:#fffefa; }
  .list-heading { padding:calc(22px + env(safe-area-inset-top)) 23px 16px; }
  .list-heading .eyebrow { font-size:10px; display:block; }
  .list-heading h1 { font-size:29px; }
  .talk-greeting { padding:0; margin:0 23px 6px; }
  .talk-greeting img { width:23px; height:23px; }
  .talk-greeting span { font-size:10px; }
  .list-caption { padding:7px 24px; }
  #rooms>button { padding:15px 21px; min-height:87px; gap:13px; }
  #rooms>button.selected { background:transparent; box-shadow:none; }
  #rooms>button .avatar { width:53px; height:53px; }
  .room-name { font-size:15px; }
  .room-preview { font-size:12px; }
  .chat-header { min-height:64px; padding:calc(7px + env(safe-area-inset-top)) 8px 7px; gap:2px; }
  .chat-header .back-button { width:38px; height:44px; padding:10px; color:#5d7c68; }
  .chat-heading h1 { font-size:16px; line-height:1.5; }
  .chat-heading p { font-size:10px; margin-top:1px; }
  .chat-actions .icon-button { width:38px; height:44px; min-height:44px; padding:9px; }
  .chat-actions .icon { width:22px; height:22px; }
  .history-bar { padding-top:7px; }
  .history-bar #older,.history-bar .important-link { font-size:10px; min-height:29px; }
  .messages { padding:5px 12px 20px; }
  .message { gap:6px; margin:17px 0; }
  .message-stack { max-width:calc(100% - 84px); }
  .message.mine .message-stack { max-width:calc(100% - 57px); }
  .message-body { font-size:15px; line-height:1.65; }
  .message-meta { font-size:10px; min-width:30px; }
  .bubble { padding:9px 12px; border-radius:16px; }
  .photo-thumbnail { height:170px; width:240px; }
  .composer { padding:6px 7px max(9px,env(safe-area-inset-bottom)); }
  .compose-line { gap:2px; }
  .compose-line>.icon-button { width:33px; padding:7px; }
  .compose-line .send-button { width:40px; height:40px; flex-basis:40px; margin-bottom:2px; padding:10px; }
  .compose-extras { margin:0 7px 5px; min-height:20px; }
  .compose-line textarea { padding:10px 11px; }
  .viewport-keyboard .composer { padding-bottom:7px; }
  dialog { max-height:calc(var(--talk-viewport,100dvh) - 32px); }
}
/* Bound the grid's intrinsic image size so tall photos remain fully visible. */
.photo-thumbnail { grid-template-rows:minmax(0,1fr); }
.photo-thumbnail img { min-width:0; min-height:0; max-height:100%; object-fit:contain; }
.tabs button[data-page][aria-current=page] { background:#eaf3eb; color:var(--talk-accent); }
@media(max-width:700px) { .tabs button[data-page][aria-current=page] { background:transparent; color:#377d59; } }
