/* Consolidated responsive and shared controls */
html,body{max-width:100%;overflow-x:clip}
*,*:before,*:after{min-width:0}
img,video,svg{max-width:100%}
dialog{box-sizing:border-box!important;max-width:min(96vw,780px)!important;max-height:calc(100dvh - 24px)!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain}
dialog input,dialog textarea,dialog select{max-width:100%;box-sizing:border-box}
.tt-auth-modal.active,.tt-auth-panel,.tt-simple-dialog{max-height:100dvh;overflow-y:auto}
.tt-tree-choice{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px;background:#f5eddc;border:1px solid #d7c9a7;border-radius:10px;margin:10px 0;color:#173b2c}
.tt-tree-choice select,.tt-tree-choice input{max-width:100%;min-height:38px;border-radius:7px;border:1px solid #b7a77f;padding:7px;background:#fffdf7}
.tt-tree-choice button,.tt-action{background:#24533c;color:#fff;border:0;border-radius:8px;padding:9px 12px;cursor:pointer}
.tt-choice-status{font:12px/1.4 Arial;color:#655e4f;flex-basis:100%}
.tt-gallery-grid{display:block!important;max-width:760px;margin:auto}
.tt-gallery-stage{width:100%;min-height:220px;aspect-ratio:16/9;background:#ede7d9;border:1px solid #d5c5a7;border-radius:12px;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}
.tt-gallery-stage img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain!important;display:block}
.tt-gallery-stage .tt-doc-link{padding:18px;text-align:center;overflow-wrap:anywhere}
.tt-gallery-info{text-align:center;padding:12px 5px}
.tt-gallery-nav{display:flex;justify-content:center;align-items:center;gap:14px;padding:8px}
.tt-gallery-nav button{border:1px solid #bdab88;border-radius:8px;background:#fffdf7;padding:8px 13px;cursor:pointer}
.tt-gallery-manage{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;padding-bottom:10px}
.tt-news-list{display:flex;flex-direction:column;gap:6px}
.tt-news-item{display:flex;justify-content:space-between;gap:12px;text-align:left;width:100%;background:#fffdf7;border:1px solid #e0d5bd;padding:12px;border-radius:8px;color:#173b2c;cursor:pointer}
.tt-news-item time{white-space:nowrap;color:#706754;font-size:12px}
.tt-news-detail{border:1px solid #dccbb1;background:#fffdf7;padding:16px;border-radius:12px;margin-top:12px}
.tt-news-detail img{max-width:100%;width:100%;max-height:340px;object-fit:contain;background:#f1eee8;border-radius:8px}
.tt-news-detail p{white-space:pre-wrap;overflow-wrap:anywhere}
.tt-graves .tt-grave-card{border:1px solid #dfd0b3;border-radius:10px;padding:12px;background:#fffdf7;margin:10px 0}
.tt-grave-form{display:grid;gap:10px;grid-template-columns:1fr 1fr}
.tt-grave-form label{display:flex;flex-direction:column;gap:4px}
.tt-grave-form input,.tt-grave-form select,.tt-grave-form textarea{padding:9px;border:1px solid #c4b396;border-radius:7px;width:100%;box-sizing:border-box}
.tt-grave-form .wide{grid-column:1/-1}
.tt-grave-photo{width:100%;max-height:240px;object-fit:contain;background:#eee8dc}
.tt-month-change{font-weight:700;white-space:nowrap}
@media(max-width:640px){dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;padding:14px!important}
 .tt-tree-choice{display:grid;grid-template-columns:1fr 1fr}.tt-tree-choice>*{width:100%;max-width:100%}.tt-tree-choice .tt-choice-status{grid-column:1/-1}
 .tt-news-item{flex-direction:column;gap:3px}.tt-gallery-stage{min-height:150px}
 .tt-grave-form{grid-template-columns:1fr}.tt-grave-form .wide{grid-column:1}
 .top .brandrow{flex-wrap:wrap}.tt-mobile-menu-button{max-width:100%}
}
