/* A mobile composer is a writing surface above the native keyboard. */
.mobile-kind-nav{display:none}
@media(max-width:980px){
 body.page-write{height:var(--mobile-visible-height,100dvh);overflow:hidden}
 body.page-write .feed-layout,body.layout-extended.page-write .feed-layout{height:calc(var(--mobile-visible-height,100dvh) - var(--mobile-shell-height,92px))!important;padding:0!important;overflow:hidden!important}
 body.page-write .left-rail{display:none!important}
 body.page-write .feed-center,body.layout-extended.page-write .feed-center{height:100%;padding:8px!important;overflow:hidden}
 body.page-write #main-feed,body.layout-extended.page-write #main-feed{top:auto!important;width:100%!important;max-width:none!important;height:min(100%,440px)!important;min-height:0!important;max-height:440px!important;aspect-ratio:auto;padding:8px!important;border-radius:20px}
 body.page-write .tablet-camera{display:none}
 body.page-write .feed-screen{height:100%!important;min-height:0!important;padding:0!important;overflow:hidden!important;border-radius:12px}
 body.page-write #page-content{width:100%!important;max-width:100%!important;margin:0!important;height:100%!important;min-height:0!important;padding:0!important;overflow:hidden!important;border-radius:12px}
 #page-content .mobile-writer{width:100%;max-width:100%;box-sizing:border-box;height:100%;min-height:0;max-height:100%;display:flex;flex-direction:column;padding:0 12px;overflow:hidden}
 #page-content .mobile-writer .tablet-bar{order:0;flex:none;padding:7px 0;min-height:28px;font-size:10px}
 #page-content .mobile-writer .mobile-kind-nav{order:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;flex:none;padding-bottom:9px;border-bottom:1px solid #e2e8df}
 .mobile-kind-nav button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:48px;padding:5px;border:1px solid #dce4d8;border-radius:8px;background:#fafbf8;color:#687c6e}
 .mobile-kind-nav button[aria-pressed=true]{background:#e7efe5;border-color:#7d9880;color:#244c39;box-shadow:inset 0 1px #fff}
 .mobile-kind-nav .cover{display:block!important;width:23px!important;height:34px!important;max-height:34px!important;flex:none;object-fit:cover;filter:none}
 .mobile-kind-nav span{font:600 10px/1.4 system-ui;word-break:keep-all;text-align:left}
 #page-content .mobile-writer .mini-heading{display:none}
 #page-content .mobile-writer .mini-writing{order:2;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;padding:8px 0 3px;gap:6px;overflow:auto}
 #page-content .mobile-writer .mini-text{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
 #page-content .mobile-writer .mini-text label{font:400 11px/1.4 system-ui;margin:0 0 6px;color:#7a887b}
 #page-content .mobile-writer .mini-text textarea{display:block;flex:1 1 auto;width:100%;height:auto;min-height:42px;margin:0;resize:none;font:400 16px/1.65 'Apple SD Gothic Neo',system-ui;padding:4px 0;border:0;border-radius:0;background:#fff;color:#263f33;box-shadow:none;outline-offset:2px}
 #page-content .mobile-writer .mini-text textarea:focus{box-shadow:none!important;outline:0!important;border:0!important}
 #page-content .mobile-writer .mini-text>small{flex:none;font-size:10px;text-align:right;color:#8d998c;line-height:1.4}
 #page-content .mobile-writer .mini-representative{display:none}
 #page-content .mobile-writer.has-attachment .mini-representative{display:flex;order:1;align-items:center;gap:8px;flex:none;text-align:left}
 #page-content .mobile-writer .mini-cover-object{width:35px;flex:none;filter:none}
 #page-content .mobile-writer .mini-cover-object img{width:35px;height:48px;object-fit:contain}
 #page-content .mobile-writer .mini-representative small{font-size:10px;margin:0;max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #page-content .mobile-writer .mini-representative button{font-size:10px;margin-left:auto}
 #page-content .mobile-writer .mini-attach{order:3;flex:none;margin:0;padding:6px 0;border:0;border-radius:0;box-shadow:none;background:#fff}
 #page-content .mobile-writer .mini-attach:before,#page-content .mobile-writer .mini-attach>header{display:none}
 #page-content .mobile-writer .mini-tools{display:flex;gap:6px}
 #page-content .mobile-writer .mini-tools button{flex:1;min-width:0;min-height:44px;padding:5px 3px;font:650 12px/1.3 system-ui;animation:none;border:1px solid #dce4da;background:#f6f9f3;color:#526b54;border-radius:6px}
 #page-content .mobile-writer>.dialog-error{order:4;flex:none;padding:0!important;margin:2px 0;font-size:11px}
 #page-content .mobile-writer .mini-bottom{order:5;position:static;flex:none;min-height:40px;margin:0;padding:6px 0 max(6px,env(safe-area-inset-bottom));box-shadow:none;background:#fff;display:flex;justify-content:flex-end}
 #page-content .mobile-writer .mini-bottom>p{display:none}
 #page-content .mobile-writer .mini-publish{display:flex;flex-direction:row;align-items:center;gap:9px;width:100%;justify-content:space-between}
 #page-content .mobile-writer .mini-reward-note{font-size:9px;white-space:normal}
 #page-content .mobile-writer .mini-bottom button{min-height:33px;padding:7px 12px;font-size:12px}
 #page-content .mobile-writer .mini-overlay{z-index:5;position:absolute;inset:0;min-height:0;height:100%;padding:12px!important;overflow:auto;background:#fff}
 #page-content .mobile-writer .mini-overlay[hidden]{display:none!important}
 #page-content .mobile-writer .picker-books{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 9px}
 #page-content .mobile-writer .picker-books img{height:100px;max-width:100%;object-fit:contain}
 #page-content .mobile-writer .picker-search{font-size:16px}
}

@media(max-width:980px){
 /* The card stays compact without a software keyboard; when it opens, use
    only the visible space above it. No simulated keyboard is shipped. */
 body.page-write.keyboard-open .mobile-writer .mini-text label{display:none}
 body.page-write.keyboard-open .mobile-writer .tablet-bar{padding:4px 0;min-height:26px}
 body.page-write.keyboard-open .mobile-writer .mobile-kind-nav{padding-bottom:5px;gap:4px}
 body.page-write.keyboard-open .mobile-writer .mobile-kind-nav button{min-height:42px;padding:3px}
 body.page-write.keyboard-open .mobile-writer .mobile-kind-nav .cover{width:20px!important;height:29px!important}
 body.page-write.keyboard-open .mobile-writer .mini-writing{padding-top:5px}
 body.page-write.keyboard-open .mobile-writer .mini-attach{padding:4px 0}
 body.page-write.keyboard-open .mobile-writer .mini-tools button{min-height:28px;padding:4px 2px}
 body.page-write.keyboard-open .mobile-writer .mini-bottom{min-height:34px;padding:4px 0}
 body.page-write.keyboard-open .mobile-writer .mini-reward-note{display:none}
 body.page-write.keyboard-open #page-content .mobile-writer .mini-publish{justify-content:flex-end}
}

#page-content .guided-writer [hidden]{display:none!important}
#page-content .guided-writer .mobile-kind-nav{
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:8px;
 width:100%;
 max-width:390px;
 align-self:center;
 margin:0 0 10px;
}
#page-content .guided-writer .writer-step{
 grid-column:1/-1;
 display:flex;
 align-items:center;
 gap:7px;
 margin:0;
 color:#294942;
 font:700 13px/1.3 system-ui,sans-serif;
}
#page-content .guided-writer .writer-step span{
 padding:3px 6px;
 border-radius:4px;
 background:#e5eee9;
 color:#31594d;
 font:700 11px/1.2 system-ui,sans-serif;
 white-space:nowrap;
}
#page-content .guided-writer .mobile-kind-nav button{
 display:grid;
 grid-template-columns:minmax(0,1fr);
 gap:0;
 min-width:0;
 padding:0;
 overflow:hidden;
 border:1px solid #d2ded8;
 border-radius:8px;
 background:#fafbf8;
 color:#34514a;
}
#page-content .guided-writer .mobile-kind-nav button[aria-pressed=true],
#page-content .guided-writer .mini-tools button[aria-pressed=true]{
 background:#e2eee7;
 border-color:#7b9b8c;
 color:#234d3b;
}
#page-content .guided-writer .mobile-kind-nav .cover{
 display:block;
 width:100%!important;
 height:auto!important;
 max-height:none!important;
 aspect-ratio:2/3;
 object-fit:cover;
}
#page-content .guided-writer .mobile-kind-nav button span{
 display:block;
 padding:6px 2px;
 font:650 12px/1.3 system-ui,sans-serif;
 text-align:center;
}
#page-content .picker-head-with-back{
 justify-content:flex-start;
 gap:12px;
}
#page-content .picker-head-with-back button{
 flex:none;
 min-height:38px;
 padding:4px 8px;
 border:1px solid #d2ded8;
 border-radius:6px;
 background:#f6f8f5;
 color:#34514a;
 font:650 13px/1.3 system-ui,sans-serif;
}
#page-content .guided-writer .writer-heading-hint{
 order:2;
 margin:8px 0;
 color:#536760;
 font-size:13px;
}
#page-content .guided-writer .mini-tools{
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
}
#page-content .guided-writer>.mini-representative{
 display:flex;
 align-items:center;
 gap:10px;
 padding:4px 0 8px;
 text-align:left;
}
#page-content .guided-writer>.mini-representative .mini-cover-object{width:48px}
#page-content .guided-writer>.mini-representative .mini-cover-object img{
 width:48px;
 height:69px;
}
#page-content .guided-writer .mini-writing{grid-template-columns:minmax(0,1fr)}
@media(max-width:980px){
 body.page-write #main-feed:has(.guided-writer),
 body.layout-extended.page-write #main-feed:has(.guided-writer){
  height:min(100%,560px)!important;
  max-height:560px!important;
 }
 #page-content .guided-writer{overflow-y:auto}
 #page-content .guided-writer:has(.mini-overlay:not([hidden])){overflow:hidden}
 #page-content .guided-writer .mini-writing{flex:1 0 108px}
 #page-content .guided-writer.has-attachment>.mini-representative{order:4}
 #page-content .guided-writer .mini-attach{order:3}
 #page-content .guided-writer .mini-attach>header{display:block;margin:0 0 6px}
 #page-content .guided-writer .mini-attach>header strong{color:#34514a}
 #page-content .guided-writer .mini-attach .mini-tools button{min-height:38px}
 #page-content .guided-writer .mini-writing{order:5}
 #page-content .guided-writer>.dialog-error{order:6}
 #page-content .guided-writer .mini-bottom{order:7}
 #page-content .guided-writer .mobile-kind-nav{margin-bottom:0}
}
