/* 0.17.0 · Έκδοση κινητού και tablet. Όλοι οι κανόνες ισχύουν μόνο όταν το mobile.js βάλει κλάση στο <html>:
   html.m-mobile (κινητό, κινητό οριζόντια, αφή έως 1024px) · html.m-tablet (tablet με αφή) · html.m-land (κινητό οριζόντια).
   Σε υπολογιστή με ποντίκι η εμφάνιση δεν αλλάζει. Μόνο μπλε/γκρι· κόκκινο μόνο για σφάλμα αποθήκευσης. */

/* ---------- στοιχεία που υπάρχουν μόνο στο κινητό ---------- */
.m-head,.m-tabbar,.m-secbar,.m-actbar,.m-hf-head,.m-hf-bar,.m-unset-note{display:none}
#therapy-flow :is(.m-head,.m-tabbar,.m-secbar,.m-actbar){display:none}
.m-svg{width:22px;height:22px;flex:0 0 auto}

/* ---------- σελίδα: κύλιση στο παράθυρο (όχι σε εσωτερικά κουτιά), σωστό ύψος σε iOS ---------- */
html.m-mobile{height:auto!important;min-height:100%;overflow-y:auto!important;overflow-x:hidden!important}
html.m-mobile body{height:auto!important;min-height:100%;overflow:visible!important}
html.m-mobile body{background:var(--bg,#faf8f5)}
html.m-mobile #therapy-flow:not([hidden]){height:auto!important;min-height:100dvh;overflow:visible!important;display:block!important}
html.m-mobile #therapy-flow[hidden]{display:none!important}
html.m-mobile #therapy-flow .shell{display:block!important;overflow:visible!important;height:auto!important;position:static!important}
html.m-mobile #therapy-flow:not(.global-screen) .shell>main,
html.m-mobile #therapy-flow .shell>main{height:auto!important;max-height:none!important;overflow:visible!important;
  padding:12px calc(16px + env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left))!important}
html.m-mobile.m-noscroll,html.m-noscroll,html.m-noscroll body{overflow:hidden!important}

/* στοιχεία που φεύγουν από την κύρια ροή */
html.m-mobile body:has(#therapy-flow:not([hidden])) .language-bar{display:none!important}
html.m-mobile #therapy-flow .shell>aside{display:none!important}
html.m-mobile #therapy-flow .app-statusbar,html.m-mobile #therapy-flow #back-to-top,html.m-mobile #therapy-flow #upgrade-notice[hidden]{display:none!important}
html.m-mobile #therapy-flow #status:empty{display:none}

/* ---------- header 48px ---------- */
html.m-mobile #therapy-flow header{display:block!important;position:sticky;top:0;z-index:50;height:auto!important;min-height:0!important;
  padding:env(safe-area-inset-top) calc(4px + env(safe-area-inset-right)) 0 calc(4px + env(safe-area-inset-left))!important;margin:0;border-radius:0}
html.m-mobile #therapy-flow header>*:not(.m-head){display:none!important}
html.m-mobile #therapy-flow header>.m-head{display:flex;align-items:center;gap:0;height:48px}
.m-icon,#therapy-flow .m-icon{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px!important;padding:0!important;margin:0;border:0!important;border-radius:10px;background:transparent!important;color:inherit;cursor:pointer;box-shadow:none!important}
#therapy-flow .m-head .m-icon{color:var(--offwhite,#f7f9fa)}
#therapy-flow .m-head .m-icon:focus-visible{outline:2px solid var(--offwhite,#f7f9fa);outline-offset:-3px}
#therapy-flow .m-head .m-icon[hidden]{display:none}
#therapy-flow .m-head .m-eye[aria-pressed=true]{background:var(--navy-active,#24425a)!important}
.m-title{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;padding:0 6px;line-height:1.2}
.m-head .m-back:not([hidden])+.m-title{padding-left:0}
.m-name{font-size:16px;font-weight:600;color:var(--offwhite,#f7f9fa);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-sub{font-size:12px;color:var(--navy-text,#9fb3bf);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-save[data-state=err]{color:#f2b8b0;font-weight:600}

/* ---------- κάτω μπάρα ---------- */
html.m-mobile #therapy-flow:not([hidden]) .m-tabbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;left:0;right:0;top:auto;bottom:0;z-index:60;margin:0!important;
  background:var(--white,#fff);border-top:1px solid var(--line,#d5dee3);padding:4px calc(4px + env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) calc(4px + env(safe-area-inset-left))}
#therapy-flow .m-tabbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:52px!important;padding:4px 2px!important;margin:0;border:0!important;border-radius:10px;background:transparent!important;
  color:var(--muted,#5a6b72);font:500 12px/1.2 var(--ui,inherit);box-shadow:none!important;position:relative}
#therapy-flow .m-tabbar button[aria-current=page]{color:var(--blue-dark,#1f3f58);font-weight:700}
#therapy-flow .m-tabbar button[aria-current=page]::before{content:'';position:absolute;top:0;left:30%;right:30%;height:3px;border-radius:0 0 3px 3px;background:var(--blue,#2b5675)}
#therapy-flow .m-tabbar .m-plus .m-svg{width:30px;height:30px;padding:4px;border-radius:50%;background:var(--blue,#2b5675);color:var(--white,#fff);box-sizing:border-box}
#therapy-flow .m-tabbar button:focus-visible{outline:2px solid var(--ring,#2b5675);outline-offset:-2px}
html.m-form #therapy-flow .m-head .m-find{display:none}
html.m-mobile.m-file #therapy-flow .m-tabbar,html.m-mobile.m-typing #therapy-flow .m-tabbar{display:none!important}

/* ---------- φάκελος: κρύβονται η κεφαλίδα, το πλαϊνό μενού και το FAB· εμφανίζονται μπάρα ενοτήτων και μπάρα ενεργειών ---------- */
html.m-mobile #therapy-flow #view>.heading{display:none!important}
html.m-mobile:not(.m-tablet) #therapy-flow #view>nav{display:none!important}
html.m-mobile #therapy-flow:not(.global-screen) #view:has(>nav){display:block!important;padding:0!important;margin:0!important;max-width:none;min-height:0}
html.m-mobile #therapy-flow #view>.m-secbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,1.25fr);gap:6px;position:sticky;top:calc(48px + env(safe-area-inset-top));z-index:40;
  margin:-12px -16px 12px;padding:8px 16px;background:var(--bg,#faf8f5);border-bottom:1px solid var(--line-2,#e1e8ec)}
#therapy-flow .m-secbar button{min-height:44px!important;padding:0 6px!important;margin:0;border:1px solid var(--line,#d5dee3)!important;border-radius:10px;background:var(--white,#fff)!important;color:var(--ink,#22333b);
  font:500 14px/1.2 var(--ui,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:none!important;display:flex;align-items:center;justify-content:center;gap:2px}
#therapy-flow .m-secbar button[aria-current=page]{background:var(--blue-tint,#e1eaf1)!important;border-color:var(--blue,#2b5675)!important;color:var(--blue-dark,#1f3f58);font-weight:700}
#therapy-flow .m-secbar .m-all span{overflow:hidden;text-overflow:ellipsis}
#therapy-flow .m-secbar .m-all .m-svg{width:16px;height:16px}
html.m-mobile #therapy-flow #view>.m-actbar{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:60;background:var(--white,#fff);border-top:1px solid var(--line,#d5dee3);
  padding:8px calc(16px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left))}
#therapy-flow .m-actbar button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:48px!important;margin:0;padding:0 10px!important;border-radius:12px;font:600 15px/1.2 var(--ui,inherit);white-space:nowrap;min-width:0}
#therapy-flow .m-actbar .m-quick{background:var(--white,#fff);border:1px solid var(--line,#d5dee3);color:var(--blue-dark,#1f3f58)}
html.m-mobile.m-typing #therapy-flow #view>.m-actbar{display:none!important}
/* επικεφαλίδες που δεν κρύβονται κάτω από header + μπάρα ενοτήτων */
html.m-mobile #therapy-flow #content :is(h2,h3,h4,section,details,.box,[id]){scroll-margin-top:calc(116px + env(safe-area-inset-top))}

/* ---------- γενικά: στόχοι αφής, πεδία, κάρτες ---------- */
html.m-mobile #therapy-flow :is(input:not([type=checkbox]):not([type=radio]),textarea,select),html.m-mobile .m-sheet :is(input,select){font-size:16px!important}
html.m-mobile #therapy-flow :is(input[type=date],input[type=time],input[type=text],input[type=search],input[type=tel],input[type=email],input:not([type]),select){min-height:44px}
html.m-mobile #therapy-flow button{min-height:44px}
html.m-mobile #therapy-flow .text-link{min-height:44px;display:inline-flex;align-items:center;padding:0 2px}
html.m-mobile #therapy-flow .box{padding:16px;border-radius:14px;margin:0 0 12px}
html.m-mobile #therapy-flow input[type=checkbox]{width:20px;height:20px}
html.m-mobile #therapy-flow h2{font-size:22px}
html.m-mobile #therapy-flow h3{font-size:17px}

/* ---------- Σήμερα ---------- */
html.m-mobile #therapy-flow .home2 :is(.discreet-toggle,.home-start,.home-recent2,.home-nav,.home-bottom){display:none!important}
html.m-mobile #therapy-flow .home2>p.small:last-child{display:none}
html.m-mobile #therapy-flow .home2>.home-backup{display:none!important}
html.m-mobile #therapy-flow .home-top{margin:4px 0 12px}
html.m-mobile #therapy-flow .home-top .eyebrow{display:none}
html.m-mobile #therapy-flow .home-top h1{font-size:20px;margin:2px 0 0}
html.m-mobile #therapy-flow .home-grid{display:flex!important;flex-direction:column;gap:12px}
html.m-mobile #therapy-flow .home-grid>.box{margin:0}
html.m-mobile #therapy-flow .day-row{grid-template-columns:56px minmax(0,1fr)!important;align-items:start;padding:10px 0}
html.m-mobile #therapy-flow .day-row .day-actions{grid-column:2}
html.m-mobile #therapy-flow .day-row.m-next{background:var(--white,#fff);border:1px solid var(--blue-soft,#c5d6e3);border-radius:14px;padding:14px 12px;margin:4px 0 8px;box-shadow:var(--shadow)}
html.m-mobile #therapy-flow .day-row.m-next .day-time{font-weight:700;color:var(--blue-dark,#1f3f58)}
.m-next-info{margin:4px 0 0;font-size:14px;color:var(--blue-dark,#1f3f58)}
html.m-mobile #therapy-flow .day-row.m-next .day-actions{display:flex;gap:8px;margin-top:10px;font-size:0}
html.m-mobile #therapy-flow .day-row.m-next .day-actions .text-link{flex:1;justify-content:center;font-size:15px;font-weight:600;text-decoration:none;border:1px solid var(--line,#d5dee3);border-radius:10px;background:var(--surface,#f2f5f7)}
html.m-mobile #therapy-flow .day-row.m-next .day-actions [data-h-log]{background:var(--blue,#2b5675);border-color:var(--blue,#2b5675);color:var(--white,#fff)}
html.m-mobile #therapy-flow .m-bk{margin:12px 0}
html.m-mobile #therapy-flow .m-bk>summary{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 14px;border:1px solid var(--warning-line,#e6c690);border-radius:12px;background:var(--warning-tint,#f8ecd9);color:var(--warning-ink,#6b4510);font-size:15px;list-style:none;cursor:pointer}
html.m-mobile #therapy-flow .m-bk>summary::-webkit-details-marker{display:none}
html.m-mobile #therapy-flow .m-bk>summary>span:nth-child(2){flex:1}
html.m-mobile #therapy-flow .m-bk[open]>summary .m-row-go{transform:rotate(90deg)}
html.m-mobile #therapy-flow .m-bk>.home-backup{display:block!important;margin-top:8px}
html.m-mobile #therapy-flow .open-cat>summary{min-height:44px}

/* ---------- Πελάτες ---------- */
html.m-mobile #therapy-flow .home-intro.compact{margin:4px 0 10px}
html.m-mobile #therapy-flow .home-intro.compact :is(.eyebrow,p){display:none}
html.m-mobile #therapy-flow .home-intro.compact h1{font-size:22px;margin:0}
html.m-mobile #therapy-flow .client-picker{padding:12px}
html.m-mobile #therapy-flow .picker-row{display:flex;flex-direction:column;gap:8px}
html.m-mobile #therapy-flow .picker-row input{flex:0 0 auto;height:48px;min-height:48px}
html.m-mobile #therapy-flow .picker-row button{width:100%}
.m-recent h2{font-size:15px!important;color:var(--muted,#5a6b72);margin:18px 0 8px;font-weight:600}

/* ---------- λίστες γραμμών (φύλλα, πρόσφατοι, πρακτικά) ---------- */
.m-list{list-style:none;margin:0;padding:0}
.m-list>li{margin:0 0 6px}
.m-row,#therapy-flow .m-row{display:flex;align-items:center;gap:12px;width:100%;min-height:52px!important;box-sizing:border-box;padding:8px 12px 8px 14px!important;margin:0;border:1px solid var(--line-2,#e1e8ec)!important;border-radius:12px;
  background:var(--white,#fff)!important;color:var(--ink,#22333b)!important;text-align:left;text-decoration:none!important;font:400 15px/1.3 var(--ui,inherit);box-shadow:none!important;cursor:pointer}
.m-row:focus-visible,#therapy-flow .m-row:focus-visible{outline:2px solid var(--ring,#2b5675);outline-offset:1px}
.m-row[aria-current=page],#therapy-flow .m-row[aria-current=page]{border-color:var(--blue,#2b5675)!important;background:var(--blue-tint,#e1eaf1)!important}
.m-row-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px}
.m-row-main b{font-weight:600;overflow:hidden;text-overflow:ellipsis}
.m-row-main .small{font-size:13px;color:var(--muted,#5a6b72)}
.m-row-val{flex:0 1 auto;font-size:14px;color:var(--muted,#5a6b72);text-align:right}
.m-row-go{display:inline-flex;color:var(--muted,#5a6b72)}
.m-row-go .m-svg{width:18px;height:18px}
.m-row-ico{display:inline-flex;color:var(--blue,#2b5675)}
.m-row.m-check{cursor:pointer}
.m-row.m-check input{width:22px;height:22px;margin:0;accent-color:var(--blue,#2b5675);flex:0 0 auto}

/* ---------- φύλλα (bottom sheets) ---------- */
dialog.m-sheet{position:fixed;inset:auto 0 0 0;width:100%;max-width:640px;max-height:88dvh;margin:0 auto;padding:0;border:0;border-radius:18px 18px 0 0;background:var(--bg,#faf8f5);color:var(--ink,#22333b);
  box-shadow:0 -12px 40px #16283a33;font-family:var(--ui,inherit);font-size:15px;line-height:1.45;flex-direction:column;overflow:hidden}
dialog.m-sheet[open]{display:flex}
dialog.m-sheet::backdrop{background:#16283a66}
.m-sheet-grip{width:40px;height:4px;border-radius:2px;background:var(--line,#d5dee3);margin:8px auto 2px;flex:0 0 auto}
.m-sheet-body{overflow-y:auto;overscroll-behavior:contain;padding:4px calc(16px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left))}
.m-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px}
.m-sheet-head h2{font-size:18px;margin:0;color:var(--ink,#22333b)}
.m-sheet .m-icon{color:var(--ink,#22333b)}
.m-sheet .m-icon:focus-visible{outline:2px solid var(--ring,#2b5675);outline-offset:-3px}
.m-group{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted,#5a6b72);margin:16px 0 6px}
.m-pick-input{width:100%;box-sizing:border-box;min-height:48px;padding:0 14px;border:1px solid var(--line,#d5dee3);border-radius:12px;background:var(--white,#fff);font-size:16px;color:var(--ink,#22333b)}
.m-pick-hint{margin:12px 0 6px;color:var(--muted,#5a6b72);font-size:13px}
.m-note{margin:4px 2px 0;color:var(--muted,#5a6b72);font-size:13px}
.m-lang select{width:100%;min-height:48px;padding:0 12px;border:1px solid var(--line,#d5dee3);border-radius:12px;background:var(--white,#fff);font-size:16px;color:var(--ink,#22333b)}
.m-lock-now{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:50px;margin:20px 0 6px;border-radius:12px;font-weight:600}
.m-version{text-align:center;color:var(--muted,#5a6b72);font-size:12px;margin:8px 0 0}
.m-filesearch:empty{display:none}
.m-filesearch{margin:0 0 6px}
.m-filesearch .file-search-field{display:flex;align-items:center;gap:8px}
.m-filesearch input{width:100%;box-sizing:border-box;min-height:48px;padding:0 14px;border:1px solid var(--line,#d5dee3);border-radius:12px;background:var(--white,#fff);font-size:16px;color:var(--ink,#22333b)}
.m-filesearch label>span,.m-filesearch .file-search-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.m-filesearch .file-search-results{position:static!important;width:auto!important;max-height:none!important;box-shadow:none}

/* ---------- Σύνοψη φακέλου: μία στήλη, η σειρά της προετοιμασίας ---------- */
html.m-mobile #therapy-flow #content:has(>.overview-grid){display:flex;flex-direction:column}
html.m-mobile #therapy-flow #content :is(.overview-grid,.overview-main,.overview-context){display:contents!important}
html.m-mobile #therapy-flow #content>.risk-strip{order:1;margin:0 0 12px}
html.m-mobile #therapy-flow #content .next-card{order:2}
html.m-mobile #therapy-flow #content .m-nextq{order:3}
html.m-mobile #therapy-flow #content .last-card{order:4}
html.m-mobile #therapy-flow #content .axes-card{order:5}
html.m-mobile #therapy-flow #content .formulation-card{order:6}
html.m-mobile #therapy-flow #content .practical-card{order:7}
html.m-mobile #therapy-flow #content .remind-card{order:8}
html.m-mobile #therapy-flow #content .thread-card{order:9}
html.m-mobile #therapy-flow #content .context-card{order:10}
html.m-mobile #therapy-flow #content .connections-card{order:11}
html.m-mobile #therapy-flow #content .file-status{order:12}
html.m-mobile #therapy-flow .next-card{padding:12px 16px}
html.m-mobile #therapy-flow .next-card .next-row{display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:6px 10px;align-items:start}
html.m-mobile #therapy-flow .next-card .next-row>label{display:flex;flex-direction:column;gap:4px;margin:0;min-width:0}
html.m-mobile #therapy-flow .next-card .next-row input{width:100%;box-sizing:border-box}
html.m-mobile #therapy-flow .next-card .next-row>:is(button,#next-msg){grid-column:1/-1}
html.m-mobile #therapy-flow .next-card .next-row>#next-msg:empty{display:none}
html.m-mobile .m-unset-note{display:block;grid-column:1/-1;font-size:13px;color:var(--muted,#5a6b72)}
html.m-mobile #therapy-flow .m-nextq .next-questions{border:0!important;padding:0!important;margin:0!important}
html.m-mobile #therapy-flow .m-nextq h4{font-size:17px;margin:0 0 6px}
html.m-mobile #therapy-flow .m-nextq #task-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}
html.m-mobile #therapy-flow .m-nextq #task-form .field{margin:0}
html.m-mobile #therapy-flow .m-nextq .task{min-height:44px;align-items:flex-start}
html.m-mobile #therapy-flow .formulation-card [data-action=configure-form]{display:none}
html.m-mobile #therapy-flow .m-compact{padding:12px 16px}
html.m-mobile #therapy-flow .m-compact :is(h3,.card-heading){margin:0}
html.m-mobile #therapy-flow .m-compact h3{font-size:16px}
html.m-mobile #therapy-flow .m-compact :is(.empty-note,.small){margin:2px 0 0;font-size:14px;color:var(--muted,#5a6b72)}
html.m-mobile #therapy-flow .m-compact .ctx-links{margin:4px 0 0}
html.m-mobile #therapy-flow .practical-card h3{margin:0 0 10px}
html.m-mobile #therapy-flow .m-practical .m-row{background:var(--white,#fff)!important}
html.m-mobile #therapy-flow .m-inline-wrap{margin:4px 0 0}
html.m-mobile #therapy-flow .m-inline-action{min-height:44px;padding:0 14px;border:1px solid var(--line,#d5dee3);border-radius:10px;background:var(--white,#fff);color:var(--blue-dark,#1f3f58);font-weight:600}
html.m-mobile #therapy-flow .file-status>summary{min-height:48px;display:flex;align-items:center;color:var(--blue-dark,#1f3f58);font-weight:600}
html.m-mobile #therapy-flow .thread .t-note{display:block}
html.m-mobile.m-discreet #therapy-flow .thread .t-note{display:none}

/* ---------- πίνακες ως κάρτες (χωρίς οριζόντια κύλιση) ---------- */
html.m-mobile #therapy-flow .table-scroll:has(table.m-cards){overflow:visible}
html.m-mobile #therapy-flow table.m-cards{display:block;width:100%!important;min-width:0!important;border:0}
html.m-mobile #therapy-flow .subtabs{flex-wrap:wrap!important;overflow:visible!important;gap:6px}
html.m-mobile #therapy-flow .subtabs>button{flex:0 1 auto!important;white-space:nowrap}
html.m-mobile #therapy-flow table.m-cards thead{display:none}
html.m-mobile #therapy-flow table.m-cards tbody{display:flex;flex-direction:column;gap:8px}
html.m-mobile #therapy-flow table.m-cards tr{display:block;padding:8px 12px;border:1px solid var(--line-2,#e1e8ec);border-radius:12px;background:var(--white,#fff)}
html.m-mobile #therapy-flow table.m-cards td{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:4px 0;border:0;text-align:right;min-width:0;overflow-wrap:anywhere}
html.m-mobile #therapy-flow table.m-cards td::before{content:attr(data-label);flex:0 0 auto;max-width:45%;text-align:left;font-size:13px;color:var(--muted,#5a6b72)}
html.m-mobile #therapy-flow table.m-cards td:not([data-label])::before{content:none}
html.m-mobile #therapy-flow table.m-cards td:empty{display:none}
html.m-mobile #therapy-flow table.m-cards .m-cell{flex:1 1 auto;min-width:0;text-align:right}
html.m-mobile #therapy-flow table.m-cards .m-cell>details{text-align:left;margin-top:4px}

/* ---------- Νέα συνεδρία ---------- */
html.m-mobile #therapy-flow #session-form.m-session{padding:12px 16px calc(92px + env(safe-area-inset-bottom));margin:0}
html.m-mobile #therapy-flow #session-form>h3{display:none}
html.m-mobile #therapy-flow #session-form label.field:has([data-key=date]){max-width:240px}
.m-first{display:flex;flex-direction:column;gap:12px;margin:8px 0 12px}
html.m-mobile #therapy-flow .m-main-note textarea{min-height:170px}
html.m-mobile #therapy-flow .related-axes{border:0;padding:0;margin:0}
html.m-mobile #therapy-flow .related-axes>legend{font-weight:600;padding:0;margin:0 0 6px}
html.m-mobile #therapy-flow .related-axes>.small{display:none}
html.m-mobile #therapy-flow .related-axes>[data-link]{display:inline-block;margin:0 6px 8px 0}
html.m-mobile #therapy-flow .related-axes label.task{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;margin:0;border:1px solid var(--line,#d5dee3);border-radius:22px;background:var(--white,#fff)}
html.m-mobile #therapy-flow .related-axes label.task:has(input:checked){border-color:var(--blue,#2b5675);background:var(--blue-tint,#e1eaf1);font-weight:600}
.m-acc{border:1px solid var(--line-2,#e1e8ec);border-radius:12px;background:var(--white,#fff);margin:0 0 8px}
#therapy-flow .m-acc>summary{display:flex;align-items:center;gap:10px;min-height:52px;padding:0 14px;font-weight:600;list-style:none;cursor:pointer}
.m-acc>summary::-webkit-details-marker{display:none}
.m-acc>summary::before{content:'';width:8px;height:8px;border-right:2px solid var(--muted,#5a6b72);border-bottom:2px solid var(--muted,#5a6b72);transform:rotate(-45deg);transition:transform .15s;flex:0 0 auto}
.m-acc[open]>summary::before{transform:rotate(45deg)}
.m-acc-t{flex:1}
.m-acc-state{font-weight:400;font-size:14px;color:var(--muted,#5a6b72)}
.m-acc-body{padding:4px 14px 14px}
.m-acc-body>.box,.m-acc-body .session-billing,.m-acc-body .session-themes{border:0;padding:0;margin:0;background:none;box-shadow:none}
html.m-mobile #therapy-flow .rate-scale{display:flex;flex-wrap:wrap;gap:6px}
html.m-mobile #therapy-flow .rate-scale button{min-width:44px;min-height:44px}
html.m-mobile #therapy-flow .rate-row{grid-template-columns:1fr!important}
html.m-mobile #therapy-flow #session-form>.actions{position:fixed!important;left:0;right:0;bottom:var(--m-kb,0px);z-index:70;margin:0!important;border-radius:0!important;
  display:grid!important;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;background:var(--white,#fff);border-top:1px solid var(--line,#d5dee3);box-shadow:0 -6px 16px #22333b12;
  padding:8px calc(16px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left))!important}
html.m-mobile.m-kbd #therapy-flow #session-form>.actions{padding-bottom:8px!important}
html.m-mobile #therapy-flow #session-form>.actions>[data-action=overview]{display:none!important}
html.m-mobile #therapy-flow #session-form>.actions>button:not(.primary){background:var(--white,#fff);border:1px solid var(--line,#d5dee3);color:var(--blue-dark,#1f3f58);text-decoration:none;font-weight:600}
html.m-mobile #therapy-flow #session-form>.actions>button{min-height:48px;margin:0;border-radius:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#therapy-flow .m-dictate{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 14px;border:1px solid var(--blue,#2b5675);background:var(--blue-tint,#e1eaf1);color:var(--blue-dark,#1f3f58);font-weight:600}
html.m-mobile #therapy-flow .local-mic .m-svg{width:20px;height:20px}

/* ---------- Λίστα συνεδριών ---------- */
html.m-mobile #therapy-flow .m-month{position:sticky;top:calc(108px + env(safe-area-inset-top));z-index:2;margin:14px -16px 4px;padding:6px 16px;background:var(--surface,#f2f5f7);font-size:12px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--muted,#5a6b72)}
html.m-mobile #therapy-flow details[data-sid]>summary{display:flex;align-items:baseline;gap:10px;min-height:48px;padding:12px 0;border-bottom:1px solid var(--line-2,#e1e8ec);cursor:pointer}
.m-s-date{font-weight:600;white-space:nowrap}
.m-s-meta{color:var(--muted,#5a6b72);font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- Ατομικό ιστορικό: ανάγνωση σε γραμμές, ένα πεδίο σε πλήρη οθόνη ---------- */
html.m-mobile #therapy-flow .personal-history>[data-action=configure-history]{display:none}
html.m-mobile #therapy-flow .personal-history .m-hf{margin:0;padding:0;border-bottom:1px solid var(--line-2,#e1e8ec)}
html.m-mobile #therapy-flow .personal-history .m-hf:not(.m-edit-full)>:not(.m-hf-head){display:none!important}
html.m-mobile .m-hf>.m-hf-head{display:flex;align-items:center;gap:8px;min-height:56px;padding:6px 0}
.m-hf-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.m-hf-text b{font-size:15px}
.m-hf-val{font-size:14px;color:var(--ink,#22333b);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.m-hf-val.empty{color:var(--muted,#5a6b72)}
#therapy-flow .m-hf-edit{color:var(--blue,#2b5675)!important}
html.m-mobile #therapy-flow .personal-history .m-hf.m-edit-full{position:fixed;inset:0;z-index:900;background:var(--bg,#faf8f5);overflow-y:auto;overscroll-behavior:contain;
  padding:0 calc(16px + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));margin:0;border:0}
html.m-mobile .m-hf.m-edit-full>.m-hf-head{display:none!important}
html.m-mobile .m-hf.m-edit-full>.m-hf-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:3;margin:0 -16px 16px;
  padding:calc(6px + env(safe-area-inset-top)) 16px 6px;min-height:48px;background:var(--navy,#16283a);color:var(--offwhite,#f7f9fa)}
.m-hf-bar b{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#therapy-flow .m-hf-bar .m-hf-done{min-height:40px;padding:0 18px;border-radius:10px;background:var(--offwhite,#f7f9fa);color:var(--navy,#16283a);border:0;font-weight:700}
html.m-mobile #therapy-flow .m-hf.m-edit-full textarea{min-height:40dvh}
html.m-mobile #therapy-flow .m-hf.m-edit-full>:is(.choice-title,label.field>span:first-child){display:none!important}
html.m-mobile #therapy-flow .m-acc-body .session-themes>legend{display:none}
.m-call{display:inline-flex;align-items:center;min-height:44px;margin-top:4px;padding:0 14px;border:1px solid var(--line,#d5dee3);border-radius:10px;background:var(--white,#fff);color:var(--blue-dark,#1f3f58);font-weight:600;text-decoration:none}
html.m-discreet .m-call{display:none}
html.m-mobile #therapy-flow .m-hf.m-edit-full .choice-drop>summary{min-height:48px}

/* ---------- πολλαπλή επιλογή: φύλλο κάτω ---------- */
.m-backdrop{display:none}
html.m-mobile details.choice-drop[open]>.m-backdrop{display:block;position:fixed;inset:0;z-index:1000!important;background:#16283a66}
html.m-mobile details.choice-drop[open]>.choice-menu{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;z-index:1001!important;max-width:640px;margin:0 auto;max-height:82dvh;
  display:flex!important;flex-direction:column;gap:0;padding:0 0 env(safe-area-inset-bottom)!important;border:0;border-radius:18px 18px 0 0;overflow-y:auto;overscroll-behavior:contain;box-shadow:0 -12px 40px #16283a33;background:var(--white,#fff)}
.m-choice-head{position:sticky;top:0;z-index:1;display:flex;flex-direction:column;gap:8px;padding:14px 16px 10px;background:var(--white,#fff);border-bottom:1px solid var(--line-2,#e1e8ec)}
.m-choice-head b{font-size:17px}
.m-choice-find{width:100%;box-sizing:border-box;min-height:44px;padding:0 12px;border:1px solid var(--line,#d5dee3);border-radius:10px;font-size:16px}
html.m-mobile details.choice-drop[open] .choice-opt{display:flex;align-items:center;gap:12px;min-height:50px;padding:0 16px;margin:0;border-bottom:1px solid var(--line-2,#e1e8ec);border-radius:0}
html.m-mobile details.choice-drop[open] .choice-opt[hidden]{display:none}
html.m-mobile details.choice-drop[open] .choice-opt input{width:22px;height:22px;margin:0;flex:0 0 auto}
.m-choice-foot{position:sticky;bottom:0;padding:10px 16px;background:var(--white,#fff);border-top:1px solid var(--line-2,#e1e8ec)}
.m-choice-foot button,#therapy-flow .m-choice-foot button{width:100%;min-height:48px;border-radius:12px;font-weight:600}
html.m-mobile details.choice-drop>summary{min-height:48px}

/* ---------- διακριτική προβολή (κινητό): κρυμμένα τηλέφωνα, email, αποσπάσματα ---------- */
html.m-mobile.m-discreet #therapy-flow :is(input[data-key=phone],input[data-key=email]){-webkit-text-security:disc}

/* ---------- πληκτρολόγιο ανοιχτό: καμία μπάρα πλοήγησης πάνω από τα πεδία ---------- */
html.m-mobile.m-typing #therapy-flow .shell>main{padding-bottom:calc(96px + var(--m-kb,0px))!important}

/* ---------- θόλωμα όταν η εφαρμογή πάει στο παρασκήνιο (όλα τα πλάτη) ---------- */
html.m-veil #therapy-flow,html.m-veil dialog{filter:blur(24px)}
html.m-veil body::after{content:'';position:fixed;inset:0;z-index:5000;background:var(--bg,#faf8f5);opacity:.75}

/* ---------- κινητό οριζόντια: να μη σπάει· στενή στήλη στο κέντρο ---------- */
html.m-land #therapy-flow #view{max-width:680px;margin:0 auto}
html.m-land #therapy-flow #view>.m-secbar{margin-left:0;margin-right:0;padding-left:0;padding-right:0}
html.m-land .m-actbar,html.m-land #therapy-flow #session-form>.actions{max-width:720px;margin:0 auto!important}

/* ---------- tablet (768–1024px, αφή): οι 10 ενότητες ως πλαϊνό μενού, περιεχόμενο δίπλα ---------- */
html.m-tablet #therapy-flow #view>.m-secbar{display:none!important}
html.m-tablet #therapy-flow:not(.global-screen) #view:has(>nav){display:grid!important;grid-template-columns:232px minmax(0,1fr);gap:20px;align-items:start;max-width:1000px;margin:0 auto!important}
html.m-tablet #therapy-flow:not(.global-screen) #view>nav{display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;position:sticky!important;top:calc(60px + env(safe-area-inset-top))!important;bottom:auto!important;left:auto!important;right:auto!important;
  transform:none!important;width:auto!important;height:auto!important;min-height:0!important;max-height:calc(100dvh - 160px);overflow-y:auto!important;grid-column:1;grid-row:1/span 3;order:0!important;
  margin:0!important;padding:8px!important;gap:2px!important;background:var(--surface,#f2f5f7);border:1px solid var(--line-2,#e1e8ec);border-radius:14px;box-shadow:none;z-index:1}
html.m-tablet #therapy-flow #view>nav>:is(.panel-rail,.panel-pin,.nav-profile){display:none!important}
html.m-tablet #therapy-flow #view>nav>button{display:flex!important;align-items:center;gap:10px;width:100%!important;min-height:46px!important;padding:8px 12px!important;margin:0!important;text-align:left;white-space:normal!important;
  border:0!important;border-radius:10px!important;background:transparent;font-size:15px}
html.m-tablet #therapy-flow #view>nav>button[aria-pressed=true]{background:var(--blue-tint,#e1eaf1);color:var(--blue-dark,#1f3f58);font-weight:700}
html.m-tablet #therapy-flow #view>nav>button[aria-pressed=true]::after{content:'';margin-left:auto;width:6px;height:6px;border-radius:50%;background:var(--blue,#2b5675)}
html.m-tablet #therapy-flow #view>nav>button::before{display:none!important}
html.m-tablet #therapy-flow #view>#content{grid-column:2;min-width:0;order:0!important}
html.m-tablet #therapy-flow #view>.m-actbar{left:0;right:0}
html.m-tablet #therapy-flow.global-screen #view{max-width:760px;margin:0 auto}

@media (max-width:380px){#therapy-flow .m-actbar button{font-size:14px;gap:4px}#therapy-flow .m-secbar button{font-size:13px}}
@media print{.m-head,.m-tabbar,.m-secbar,.m-actbar,dialog.m-sheet{display:none!important}}
@media (prefers-reduced-motion:reduce){.m-acc>summary::before{transition:none}}
