/* Şehir sohbeti (32. tur, chat-panel.js; user: “saydam şehir sohbeti”): a see-through panel over the map, like the user's
   ProYDS city — on the right, on a phone above the menu. Colours come from palette.css. The frame lets the map show through;
   the messages sit on their own solid cards, so the words stay readable (24 Eylül the user found the menus too see-through). */
.chat-panel{position:fixed;z-index:60;top:calc(80px + env(safe-area-inset-top));right:16px;bottom:128px;width:min(380px,calc(100% - 32px));
 display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid var(--ui-line,#3a4b5c);border-radius:16px;color:var(--ui-text,#f4f1ea);
 background:rgba(var(--ui-surface,21,32,43),.74);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);box-shadow:var(--ui-shadow,0 10px 30px #0006);
 font:14px/1.45 'Avenir Next',Avenir,'Segoe UI',sans-serif}
.chat-panel[hidden],.chat-panel [hidden]{display:none!important}
.cp-head{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:start}
.cp-head .eyebrow{margin:0;font-size:11px;font-weight:800;letter-spacing:.14em;color:var(--ui-accent,#ecc27f)}
.cp-head h2{margin:2px 0 0;font:500 21px/1.2 Georgia,serif}
.cp-close{width:40px;height:40px;border:1px solid var(--ui-line,#3a4b5c);border-radius:50%;background:transparent;color:inherit;font-size:20px;cursor:pointer}
.cp-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:3px;border-radius:10px;background:rgba(var(--ui-surface,21,32,43),.9)}
.cp-tab{min-height:38px;padding:3px 4px;line-height:1.2;border:0;border-radius:8px;background:transparent;color:var(--ui-muted,#c6ced6);font-size:12px;font-weight:700;cursor:pointer}
.cp-tab[aria-selected=true]{background:var(--ui-raised,#1f2d3b);color:var(--ui-text,#f4f1ea);box-shadow:inset 0 -2px 0 var(--ui-accent,#ecc27f)}
.cp-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}
.cp-gate,.cp-join{padding:14px;border:1px solid var(--ui-line,#3a4b5c);border-radius:12px;background:var(--ui-reading,#15202b)}
.cp-gate p{margin:0 0 10px;font-size:13px;color:var(--ui-muted,#c6ced6)}
.cp-join{display:grid;gap:8px}.cp-join h3{margin:0;font:500 18px/1.25 Georgia,serif}.cp-join label{font-size:12px;font-weight:700;color:var(--ui-accent,#ecc27f)}
.cp-join input:not([type=checkbox]){min-height:42px;padding:0 10px;border:1px solid var(--ui-line,#3a4b5c);border-radius:9px;background:var(--ui-field,#1f2d3b);color:inherit}
.cp-consent{display:flex;gap:8px;align-items:flex-start;font-size:12px!important;font-weight:500!important;color:var(--ui-text,#f4f1ea)!important;line-height:1.45}
.cp-consent input{margin-top:3px;accent-color:var(--ui-accent,#ecc27f)}
.cp-log{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:7px;padding:2px;overscroll-behavior:contain}
.cp-msg{max-width:92%;padding:9px 11px;border:1px solid var(--ui-line,#3a4b5c);border-radius:4px 12px 12px;background:rgba(31,45,59,.94)}
.cp-msg.mine{align-self:flex-end;border-radius:12px 4px 12px 12px;background:rgba(36,74,92,.95)}
.cp-msg header{display:flex;gap:8px;align-items:baseline;font-size:11px}.cp-msg header strong{color:var(--ui-accent,#ecc27f)}.cp-msg time{margin-left:auto;color:var(--ui-muted,#c6ced6)}
.cp-msg p{margin:4px 0 0;overflow-wrap:anywhere;white-space:pre-wrap;font-size:13px}
.cp-msg .cp-removed{font-style:italic;color:var(--ui-muted,#c6ced6)}
.cp-badge{padding:1px 6px;border-radius:6px;background:#ecc27f22;color:var(--ui-accent,#ecc27f);font-size:11px}
.cp-msg-actions,.cp-actions,.cp-ask{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:5px}
.cp-ask{padding-top:6px;border-top:1px solid var(--ui-line,#3a4b5c)}.cp-ask p{flex-basis:100%;margin:0;font-size:12px;color:var(--ui-muted,#c6ced6)}
.cp-quiet,.cp-back,.cp-link{min-height:32px;padding:0;border:0;background:transparent;color:var(--ui-link,#a8d8f3);font-size:12px;font-weight:700;text-decoration:none;cursor:pointer}
.cp-primary{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 14px;border:1px solid var(--ui-primary-line,#6aa6bd);border-radius:9px;background:var(--ui-primary,#2e6c85);color:#fff;font-size:12px;font-weight:700;text-decoration:none;cursor:pointer}
.cp-primary:hover{background:var(--ui-primary-hover,#387d98)}.chat-panel button:disabled{opacity:.5;cursor:default}
.cp-compose{display:grid;gap:5px}
.cp-compose textarea{width:100%;box-sizing:border-box;resize:none;padding:9px 10px;border:1px solid var(--ui-line,#3a4b5c);border-radius:10px;background:var(--ui-field,#1f2d3b);color:inherit;font:inherit;font-size:13px}
.cp-compose textarea:focus,.cp-join input:focus{outline:2px solid var(--ui-primary-line,#6aa6bd);outline-offset:1px}
.cp-bar{display:flex;align-items:center;justify-content:space-between;gap:8px}.cp-bar small{font-size:11px;color:var(--ui-muted,#c6ced6)}
.cp-note,.cp-muted,.cp-empty,.cp-foot{margin:0;font-size:12px;line-height:1.45;color:var(--ui-muted,#c6ced6)}
.cp-note{padding:8px 10px;border-radius:9px;background:#ecc27f18;color:#f0dcae}
.cp-empty{padding:10px;text-align:center}
.cp-foot{font-size:11px}
.cp-inbox{flex:1;min-height:0;overflow-y:auto;display:grid;align-content:start;gap:8px}
.cp-list{display:grid;gap:6px}.cp-list h3{margin:6px 0 0;font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--ui-accent,#ecc27f)}
.cp-thread{display:grid;gap:2px;width:100%;min-height:52px;padding:8px 10px;border:1px solid var(--ui-line,#3a4b5c);border-radius:10px;background:rgba(31,45,59,.94);color:inherit;text-align:left;cursor:pointer}
.cp-thread:hover{background:var(--ui-hover,#2a3b4c)}.cp-thread-top{display:flex;gap:8px;justify-content:space-between;align-items:baseline}
.cp-thread small{font-size:11px;color:var(--ui-muted,#c6ced6)}.cp-preview{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;color:var(--ui-muted,#c6ced6)}
.cp-talk{flex:1;min-height:0;display:flex;flex-direction:column;gap:7px}
.cp-talk-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:8px;align-items:center}.cp-talk-head h3{margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:500 17px/1.2 Georgia,serif}
.cp-status{margin:0;min-height:1.2em;font-size:11px;color:var(--ui-muted,#c6ced6)}.cp-status.error{color:#ffb4a8}
/* A phone: above the menu, about two thirds of the screen; the map stays visible above it. */
@media(max-width:650px){
 .chat-panel{top:auto;left:8px;right:8px;width:auto;bottom:calc(124px + env(safe-area-inset-bottom));height:min(560px,calc(100svh - 210px));padding:12px}
 .cp-head h2{font-size:18px}
}
/* One card at a time: the welcome and first-visit cards step aside while the chat is open. */
body.chat-open .welcome-back,body.chat-open .first-steps{visibility:hidden}
@media(pointer:coarse){.cp-quiet,.cp-back,.cp-link{min-height:44px}.cp-tab{min-height:44px}.cp-primary{min-height:44px}}
@media(prefers-reduced-motion:no-preference){.chat-panel:not([hidden]){animation:cp-in .22s ease both}}
@keyframes cp-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
/* 33. tur: the friends tab (chat-panel.js; user chose “Ekleme ve liste” and “Yanına git”). Each friend on a solid card:
   the portrait with a dot (green online, gold solving questions), the name, the state and today's goal, then the actions. */
.cp-friend{display:grid;grid-template-columns:40px minmax(0,1fr);gap:4px 10px;align-items:center;padding:8px 10px;border:1px solid var(--ui-line,#3a4b5c);border-radius:10px;background:rgba(31,45,59,.94)}
.cp-friend .cp-actions{grid-column:2;margin-top:2px}.cp-friend .cp-ask{grid-column:1/-1}
.cp-face{position:relative;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#0006;color:var(--ui-accent,#ecc27f);font:700 15px Georgia,serif}
.cp-face img{width:38px;height:38px;border-radius:50%;object-fit:cover;object-position:50% 18%}
.cp-face::after{content:'';position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;border:2px solid #1f2d3b;background:#56697b}
.cp-face.on::after{background:#4cd08a}.cp-face.study::after{background:var(--ui-accent,#ecc27f)}.cp-face.none::after{display:none}
.cp-friend-words{min-width:0}.cp-friend-words strong{display:block;font-size:13px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cp-friend-words small{display:block;font-size:11.5px;line-height:1.4;color:var(--ui-muted,#c6ced6)}.cp-goal.done{color:#82dfae}
.cp-friend-tools{padding-top:6px;border-top:1px solid var(--ui-line,#3a4b5c)}.cp-friend-tools .cp-primary{justify-self:start}
.cp-made{display:grid;gap:6px}.cp-made input{width:100%;box-sizing:border-box;min-height:38px;padding:0 10px;border:1px solid var(--ui-line,#3a4b5c);border-radius:9px;background:var(--ui-field,#1f2d3b);color:inherit;font-size:12px}
.cp-made small{font-size:11px;color:var(--ui-muted,#c6ced6)}
.cp-invite-card{display:grid;gap:6px}.cp-invite-card p{margin:0}.cp-invite-card>button{justify-self:start}
