/* V4: shared parchment interface for every SMF member-facing screen.
   Desktop CSS and permission-generated links/forms remain intact. */
.ha-rank-ribbon,.ha-section-toggle,.ha-local-toggle,.ha-menu-caption {display:none;}
@media screen and (max-width:800px) {
  :root {--ha-ink:#30251b;--ha-paper:#faf3e7;--ha-line:#bda17c;--ha-brown:#63432c;--ha-panel:#f0e2ca;}
  body {background:#eadfcf;color:var(--ha-ink);}
  #main_content_section {min-height:calc(100svh - 150px);background-color:#faf3e7;background-image:radial-gradient(ellipse at 5% 10%,#dcc29635,transparent 70%),radial-gradient(ellipse at 90% 80%,#d5b58015,transparent 60%);}
  .ha-mobilebar {height:60px;min-height:60px;background:linear-gradient(110deg,#51311c,#795437 55%,#50301b);box-shadow:inset 0 -1px #d4b780;}
  .ha-wordmark {font-weight:bold;font-size:clamp(20px,5.8vw,28px);text-shadow:0 1px 1px #321c14;}
  .ha-wordmark span {display:block;height:12px;margin:3px auto 0;font-size:0;width:110px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='17' viewBox='0 0 140 17' fill='none' stroke='%23dabe8a' stroke-width='1'%3E%3Cpath d='M0 8h52m36 0h52M70 1l-9 15h18ZM70 1v15'/%3E%3Ccircle cx='70' cy='10' r='4.5'/%3E%3C/svg%3E");}
  .ha-mobile-footer {background:linear-gradient(110deg,#51311c,#795437,#50301b);}
  .ha-page-home .ha-mobile-hero {border-bottom:1px solid #b99d72;}
  .ha-welcome {padding:7px 10px;min-height:41px;background:#f3e7d3;}
  .ha-welcome a {font-size:12px;border-radius:4px;background:linear-gradient(#815a38,#624027);}
  .ha-search {height:37px;background:#fffaf2;}
  .ha-announcement {padding:10px 12px;min-height:75px;background:linear-gradient(110deg,#eddbb8,#f9eed8);box-shadow:inset 0 0 14px #9c6c3110;}
  .ha-announcement-copy h2 {font-size:21px;}
  .ha-announcement-copy li,.ha-announcement-copy li * {font-size:12px!important;}
  #boardindex_table .table_list > tbody.content,
  .childboards .table_list > tbody.content {
    padding: 0;
  }
  .childboards .table_frame > .table_list {
    margin: 0;
  }
  #boardindex_table .table_list tbody.content td.info a.subject {font-size:17px;}
  #boardindex_table .table_list td.info p.ha-board-meta {white-space:normal;font-size:10px;line-height:1.35;}
  #boardindex_table .table_list td.info p.ha-board-meta span {white-space:normal;}
  #boardindex_table table.table_list td.icon > a > img.ha-board-photo,.childboards table.table_list td.icon > a > img.ha-board-photo {display:block!important;visibility:visible!important;opacity:1!important;max-width:50px!important;max-height:56px!important;width:auto!important;height:auto!important;}
  .childboards table.table_list td.icon > a > img:not(.ha-board-photo) {display:none;}
  .childboards .ha-board-photo {display:block;}
  .childboards .table_list tbody.content tr[id^=board_] {grid-template-columns:54px minmax(0,1fr);}
  .childboards .table_list td.icon {grid-row:1/4;}
  .childboards .table_list td.info p img {display:none;}
  .childboards .table_list td.info a.subject {font: bold 17px/1.25 Georgia,serif;}
  /* The original unread artwork is replaced, but its state remains visible. */
  .ha-board-new {position:absolute;right:7px;top:8px;width:6px;height:6px;background:#947044;border-radius:50%;}
  .navigate_section {margin:0 0 9px;padding:6px 0;border-bottom:1px solid #dac6a5;}
  .navigate_section ul {font:italic 12px/1.5 Georgia,serif;}
  h1,h2,h3,h4,h5 {overflow-wrap:anywhere;}
  div.cat_bar,div.title_bar,div.title_barIC {background:linear-gradient(110deg,#593820,#7b5435);border-color:#8c6745;min-height:31px;}
  h3.catbg,h4.catbg,h3.titlebg,h4.titlebg,div.title_barIC h4.titlebg {min-height:30px;font:bold 18px/1.25 Georgia,serif;padding:6px 0;}
  #main_content_section .catbg *,#main_content_section .titlebg * {max-width:100%;}
  #main_content_section .catbg .ie6_header,#main_content_section .titlebg .ie6_header {float:none;white-space:normal;}
  .ha-topic-heading h1 {font-size:28px!important;}
  .ha-topic-heading p {font-size:13px!important;}
  #whoisviewing {margin-bottom:9px;background:transparent;border-bottom:1px solid #d8c5a8;border-radius:0;}
  /* Slim reference postbit: no individual boxes around each line. */
  #forumposts .post_wrapper {grid-template-columns:clamp(94px,29vw,130px) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;}
  #forumposts .poster {padding:7px 5px 8px;background:linear-gradient(100deg,#efe0c6,#f6ead5);}
  #forumposts .poster h4 {border:0;background:transparent;padding:0;margin:0 0 2px;font:bold 17px/1.2 Georgia,serif;gap:4px;}
  #forumposts .poster h4 img {width:9px!important;height:9px!important;object-fit:contain;}
  #forumposts .poster > ul.reset {display:flex;flex-direction:column;align-items:center;gap:5px;font-size:11px;}
  #forumposts .poster > ul.reset > li {border:0!important;background:transparent!important;border-radius:0;padding:0!important;margin:0!important;line-height:1.25;}
  #forumposts .poster > ul.reset > li.membergroup {order:1;font-size:11px;}
  #forumposts .poster > ul.reset > li.avatar {order:2;width:min(76px,100%);border:1px solid #b89c76!important;border-radius:5px;overflow:hidden;}
  #forumposts .poster li.avatar a {display:block;}
  #forumposts .poster li.avatar img {width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important;aspect-ratio:76 / 88;object-fit:cover;margin:0!important;}
  #forumposts .poster > ul.reset > li.ha-rank-ribbon {display:block;order:3;width:100%;padding:3px 3px!important;background:linear-gradient(#9d703e,#754a23)!important;color:#fff2d4;border-radius:2px;font-size:10px;clip-path:polygon(0 0,100% 0,97% 50%,100% 100%,0 100%,3% 50%);}
  #forumposts .poster > ul.reset > li.ha-field-house {order:4;margin:1px 0!important;}
  #forumposts .poster > ul.reset > li.ha-field-blood {order:5;}
  #forumposts .poster > ul.reset > li.ha-field-side {order:6;}
  #forumposts .poster > ul.reset > li.postcount {order:7;font-size:11px;padding-top:3px!important;}
  #forumposts .poster > ul.reset > li.custom img {max-width:90px!important;max-height:40px!important;width:auto!important;height:auto!important;}
  #forumposts .poster > ul.reset > li.ha-field-house img {max-height:44px!important;}
  #forumposts .poster > ul.reset > li.ha-field-other {order:8;}
  #forumposts .poster > ul.reset > li:is(.postgroup,.stars,.title,.gender,.ha-broom,.blurb,.im_icons,.karma,.karma_allow) {display:none;}
  #forumposts .postarea {padding:9px 11px 5px;background:linear-gradient(120deg,#fffaf2,#f7edde);}
  #forumposts .post {font-size:15px;line-height:1.5;padding:9px 0 22px;min-height:110px;}
  #forumposts .postarea img.modifybutton {
    order: 2;
    align-self: flex-end;
    width: 20px;
    height: 20px;
    margin: 0 0 6px;
  }
  #forumposts .ha-post-meta {font-size:11px;}
  #forumposts ul.quickbuttons {padding-top:7px;}
  #forumposts ul.quickbuttons li a {font-size:12px;}
  #forumposts .signature {color:#796852;}
  .ha-post-date {max-width:calc(100% - 25px);}
  .pagelinks a,.pagelinks > strong {border:1px solid #c0a17e;border-radius:4px;margin:2px;min-width:30px;padding:6px 8px;background:#fbf4e8;}
  .pagelinks > strong {background:#704a2d;color:#fff1d8;border-color:#704a2d;}
  .ha-topic-controls .pagelinks a,.ha-topic-controls .pagelinks > strong {border:0;margin:0;padding:4px;min-width:19px;background:transparent;color:#63432c;}
  #quickreplybox .cat_bar {background:linear-gradient(110deg,#f0e0c4,#fcf3e4);border:1px solid #bda17c;border-bottom:0;}
  #quickreplybox .catbg {padding:7px 0 0;font-size:21px;}
  #quickReplyOptions .roundframe {padding:8px;}
  /* Generic menu is used by profile, settings, PMs, moderation and administration. */
  #main_container,#main_admsection,#admin_content,#left_admsection,#pm_main,#pm_menu {float:none!important;min-width:0!important;max-width:100%!important;width:100%!important;margin:0!important;padding:0!important;}
  #left_admsection .adm_section {margin:0 0 7px;border:1px solid #c7ad87;border-radius:5px;overflow:hidden;}
  #left_admsection .cat_bar {border:0;border-radius:0;margin:0;}
  #left_admsection .catbg {display:flex;align-items:center;justify-content:space-between;}
  #left_admsection .left_admmenu {display:flex;flex-wrap:wrap;gap:5px;padding:8px;margin:0;background:#f1e4ce;list-style:none;}
  #left_admsection .left_admmenu li {padding:0;margin:0;background:transparent;}
  #left_admsection .left_admmenu li a {display:block;padding:7px 8px;border:1px solid #cbb38f;border-radius:4px;background:#fff8eb;font-size:12px;}
  #left_admsection .left_admmenu li strong a {background:#704a2d;color:#fff2d8;}
  .ha-js #left_admsection .adm_section:not(.ha-section-open) .left_admmenu {display:none;}
  .ha-section-toggle {display:inline-flex;align-items:center;justify-content:center;width:34px;height:30px;padding:0;border:0;background:transparent;color:#f8e4be;font-size:20px;cursor:pointer;}
  #admin_menu,#adm_submenus {float:none;height:auto!important;width:100%;padding:0;margin:0 0 9px;background:transparent!important;overflow:visible;position:relative;}
  #admin_menu .dropmenu,#adm_submenus .dropmenu {display:flex;flex-wrap:wrap;gap:5px;margin:0;padding:0;}
  #admin_menu .dropmenu > li,#adm_submenus .dropmenu > li {float:none;position:relative;height:auto;width:auto;max-width:100%;margin:0;padding:0;}
  #admin_menu .dropmenu a.firstlevel,#adm_submenus .dropmenu a.firstlevel {display:block;padding:8px 35px 8px 10px!important;margin:0;background:#efdfc4;border:1px solid #bea27c;border-radius:4px;min-height:36px;color:#624027;font-size:12px;}
  #admin_menu .dropmenu a.firstlevel span,#adm_submenus .dropmenu a.firstlevel span {position:static;padding:0!important;background:none;line-height:1.4;height:auto;white-space:normal;color:inherit;font-size:inherit;}
  #admin_menu .dropmenu a.active,#adm_submenus .dropmenu a.active {background:#704a2d;color:#fff1d8;}
  #admin_menu .dropmenu li > ul,#admin_menu .dropmenu li:hover > ul,#adm_submenus .dropmenu li > ul {position:static;left:auto;top:auto;width:auto;max-width:100%;min-width:0;border:0;padding:6px;margin:0;background:#f1e4ce;box-shadow:none;display:block;}
  .ha-js #admin_menu .dropmenu li:not(.ha-local-open) > ul,.ha-js #adm_submenus .dropmenu li:not(.ha-local-open) > ul {display:none;}
  #admin_menu .dropmenu ul li,#adm_submenus .dropmenu ul li {float:none;width:auto;min-width:0;margin:0;padding:0;background:none;}
  #admin_menu .dropmenu ul a,#adm_submenus .dropmenu ul a {display:block;width:auto;padding:8px;border-bottom:1px solid #dcc6a4;color:#60422b;font-size:12px;white-space:normal;}
  #admin_menu .dropmenu ul a span,#adm_submenus .dropmenu ul a span {height:auto;line-height:1.4;white-space:normal;background:none;color:inherit;}
  .ha-local-toggle {display:block;position:absolute;right:1px;top:1px;width:30px;height:33px;border:0;background:transparent;color:#8e6b40;cursor:pointer;}
  .ha-local-toggle[aria-expanded=true] {transform:rotate(180deg);}
  #menu_toggle {display:none;}
  /* Profiles: a compact identity card followed by readable real profile data. */
  #profileview {overflow:visible;}
  #profileview #basicinfo,#profileview #detailedinfo {float:none!important;width:100%!important;padding:0!important;margin:0 0 10px!important;}
  #basicinfo .windowbg,#detailedinfo .windowbg2 {border:1px solid #bda17c!important;border-radius:6px;background:linear-gradient(110deg,#f0e0c6,#fcf5e9)!important;}
  #basicinfo .content {display:grid!important;grid-template-columns:82px minmax(0,1fr);gap:6px 12px;padding:12px!important;min-width:0;}
  #basicinfo .username {grid-column:2;grid-row:1;}
  #basicinfo h4 {font:bold 23px/1.2 Georgia,serif;margin:0;}
  #basicinfo h4 .position {display:block;font:12px/1.5 Arial,sans-serif;margin:3px 0;}
  #basicinfo .content > img.avatar,#basicinfo .content > a:has(img.avatar) {grid-column:1;grid-row:1/5;width:82px!important;max-width:82px!important;max-height:110px;height:auto!important;border-radius:5px;object-fit:cover;}
  #basicinfo ul.reset {grid-column:2;display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;}
  #basicinfo #userstatus,#basicinfo #infolinks {grid-column:2;padding:0!important;margin:0!important;font-size:11px;}
  #basicinfo #infolinks a {display:inline-block;line-height:1.7;margin:0 8px 0 0;text-decoration:underline;}
  #basicinfo .topslice,#basicinfo .botslice,#detailedinfo .topslice,#detailedinfo .botslice {display:none;}
  #detailedinfo .content {padding:12px;}
  #detailedinfo div.content dl,#tracking div.content dl {display:grid;grid-template-columns:minmax(90px,38%) minmax(0,1fr);gap:8px 12px;padding:0;margin:0 0 12px;border-color:#d2ba96;}
  #detailedinfo div.content dt,#detailedinfo div.content dd,#tracking div.content dt,#tracking div.content dd {float:none;width:auto!important;min-width:0;margin:0;padding:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere;}
  #detailedinfo div.content dt {font-weight:bold;}
  #detailedinfo div.content dd img {max-width:130px;max-height:65px;object-fit:contain;}
  #detailedinfo p {font-size:12px;}
  #generalstats,#activitytime,#popularposts,#popularactivity {float:none;width:100%;margin:0 0 10px;min-width:0;}
  /* All account/profile settings, notification forms and registration. */
  #creator > .windowbg2,#registration > .windowbg2,#postmodify > .windowbg,#postmodify > .windowbg2 {border:1px solid #c5ab84;border-radius:5px;background:linear-gradient(110deg,#f1e4cf,#fcf6ec);}
  #creator .content,#registration fieldset.content,#postmodify .content {padding:12px;min-width:0;}
  #creator dl,#registration dl.register_form,dl.settings,#post_header,.postbox,#search_options {display:block;width:100%;padding:0;margin:0 0 13px;}
  #creator dl dt,#creator dl dd,#registration dl.register_form dt,#registration dl.register_form dd,dl.settings dt,dl.settings dd,#post_header dt,#post_header dd,.postbox dt,.postbox dd,#search_options dt,#search_options dd {float:none!important;clear:both;width:100%!important;max-width:100%;min-width:0;padding:0;margin:0 0 7px;box-sizing:border-box;text-align:left;}
  #creator dl dt,#registration dl.register_form dt,dl.settings dt,#post_header dt {font-size:13px;font-weight:600;}
  #creator dl dd,#registration dl.register_form dd,dl.settings dd,#post_header dd {margin-bottom:15px;}
  #creator dl dt .smalltext,#registration dl.register_form dt span {font-weight:normal;color:#7f6a50;font-size:11px;}
  #creator input:is([type=text],[type=password],[type=email]),#creator select,#creator textarea,#registration input:is([type=text],[type=password],[type=email]),#registration select,#post_header input[type=text],#postmodify textarea,#searchform input[type=text] {width:100%!important;min-width:0;max-width:100%;}
  input:is([type=text],[type=password],[type=email],[type=search],[type=number]),select,textarea {border:1px solid #b89d75;border-radius:4px;background:#fffbf4;color:#3d2c1d;padding:9px;min-height:37px;font-size:16px;box-shadow:inset 0 1px 2px #67431b08;}
  input:is([type=checkbox],[type=radio]) {width:16px;height:16px;vertical-align:middle;accent-color:#795236;}
  input[type=file] {width:100%;max-width:100%;font-size:12px;}
  input[type=hidden] {display:none;}
  input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible {outline:2px solid #9a723d;outline-offset:2px;}
  fieldset {min-width:0;max-width:100%;border-color:#ceb58e;border-radius:5px;}
  #postmodify #subject,#pm_subject input,#pm_to input {width:100%!important;}
  #post_area,#bbcBox_message,#smileyBox_message,#message,#postMoreOptions,#edit_event {float:none;width:100%!important;max-width:100%;min-width:0;margin-left:0;margin-right:0;}
  #post_area textarea {min-height:180px;}
  #bbcBox_message {overflow-x:auto;}
  .sceditor-container {box-sizing:border-box;width:100%!important;max-width:100%;min-width:0;background:#fffaf1;border-color:#bfa57f;}
  .sceditor-toolbar {white-space:normal!important;}
  .sceditor-container iframe,.sceditor-container textarea {max-width:100%;}
  #post_confirm_strip {display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:flex-end;}
  .button_submit,.button_reset {min-height:37px;background:linear-gradient(#805838,#5f3d24);color:#fff4df;border-color:#6f482b;font-size:13px;}
  .button_reset {background:#f3e6d1;color:#654329;}
  /* Topic lists: sorting controls remain accessible and moderation inputs remain real. */
  #messageindex .table_grid {table-layout:auto;}
  #messageindex thead tr {gap:3px;background:linear-gradient(100deg,#58371f,#805939);padding:4px;}
  #messageindex thead th {font-size:11px;padding:4px;}
  #messageindex thead th a {color:#f4dfb7;}
  #messageindex tbody tr {grid-template-columns:25px minmax(0,1fr) auto;gap:4px 8px;padding:11px 9px;background:linear-gradient(110deg,#f2e5cf,#fff9ef);border-color:#c5ab86;}
  #messageindex td.subject {font-size:14px;font-weight:600;}
  #messageindex td.subject .smalltext {font-weight:normal;font-size:11px;}
  #messageindex td.lastpost {font-size:11px;color:#7a654a;}
  #messageindex td.stats {font-size:10px;}
  #messageindex .whos_viewing td {grid-column:1/-1!important;}
  /* PM inbox and conversation, with original checkbox/recipient/action handlers. */
  #personal_messages > form[name="pmFolder"] > .table_grid {display:block;border:0;table-layout:auto;}
  #personal_messages > form[name="pmFolder"] > .table_grid > thead,#personal_messages > form[name="pmFolder"] > .table_grid > tbody {display:block;}
  #personal_messages > form[name="pmFolder"] > .table_grid > thead > tr {display:flex;flex-wrap:wrap;padding:5px;background:#68452b;border-radius:5px 5px 0 0;}
  #personal_messages > form[name="pmFolder"] > .table_grid > thead > tr > th {display:block;width:auto!important;border:0;background:none;font-size:11px;}
  #personal_messages > form[name="pmFolder"] > .table_grid th a {color:#f9e5c1;}
  #personal_messages > form[name="pmFolder"] > .table_grid > tbody > tr {display:grid;grid-template-columns:22px minmax(0,1fr) 24px;gap:4px 7px;padding:10px;border:1px solid #c6ab85;border-top:0;background:linear-gradient(110deg,#f2e4cd,#fff9ef);}
  #personal_messages > form[name="pmFolder"] > .table_grid > tbody > tr > td {display:block;width:auto!important;padding:0!important;border:0;background:none;min-width:0;text-align:left;}
  #personal_messages > form[name="pmFolder"] > .table_grid > tbody > tr > td:nth-child(1) {grid-column:1;grid-row:1/4;}
  #personal_messages > form[name="pmFolder"] > .table_grid > tbody > tr > td:nth-child(2) {grid-column:2;grid-row:3;font-size:11px;color:#816d54;}
  #personal_messages > form[name="pmFolder"] > .table_grid > tbody > tr > td:nth-child(3) {grid-column:2;grid-row:1;font:bold 16px/1.3 Georgia,serif;}
  #personal_messages > form[name="pmFolder"] > .table_grid > tbody > tr > td:nth-child(4) {grid-column:2;grid-row:2;font-size:12px;}
  #personal_messages > form[name="pmFolder"] > .table_grid > tbody > tr > td:nth-child(5) {grid-column:3;grid-row:1/4;}
  #personal_messages > form[name="pmFolder"] > .table_grid > tbody > tr > td[colspan] {grid-column:1/-1;font-size:13px;}
  #personal_messages > form > .windowbg.clear,#personal_messages > form > .windowbg2.clear {display:grid;grid-template-columns:94px minmax(0,1fr);margin:10px 0;border:1px solid #bda17c;border-radius:6px;overflow:hidden;}
  #personal_messages .poster {width:auto;grid-column:1;grid-row:1/3;background:#f0e2ca;padding:7px;text-align:center;border-right:1px solid #bda17c;}
  #personal_messages .poster h4 {font:bold 16px/1.2 Georgia,serif;}
  #personal_messages .poster ul {list-style:none;}
  #personal_messages .poster li.avatar img {max-width:76px;height:auto;border-radius:5px;}
  #personal_messages .postarea {display:flex;flex-direction:column;min-width:0;padding:10px;background:#fcf5e9;}
  #personal_messages .post {flex:1;min-height:90px;line-height:1.5;}
  #personal_messages .postarea .keyinfo {border-bottom:1px solid #d0b995;padding-bottom:6px;}
  #personal_messages .keyinfo h5 {font:bold 15px/1.3 Georgia,serif;margin:0;}
  #personal_messages .keyinfo .smalltext {font-size:11px;}
  #personal_messages .quickbuttons {order:3;padding-top:7px;border-top:1px solid #d0b995;}
  #personal_messages .quickbuttons li {padding:0;margin:0;}
  #personal_messages .quickbuttons a {display:block;min-height:30px;padding:6px 5px;font-size:11px;background:#eee0c7;border-radius:3px;}
  /* Search, recent messages, lists, reports, statistics and third-party modules. */
  #simple_search,#advanced_search,#search_results,#memberlist,#mlist,#report_topic,#move_topic,#merge_topics,#split_topics,#stats,#calendar {min-width:0;max-width:100%;width:100%;margin-left:0;margin-right:0;}
  #simple_search .roundframe,#advanced_search .roundframe {margin:0;padding:12px;}
  #searchBoardsExpand,#searchLabelsExpand {display:flex;flex-wrap:wrap;gap:7px;}
  #searchBoardsExpand li,#searchLabelsExpand li {float:none;width:auto;max-width:100%;font-size:12px;}
  #search_term_input {width:100%;}
  #search_term_input input[type=text] {width:100%!important;}
  .search_results_posts .topic,.search_results_posts .post,.search_results_posts .content,.core_posts .content {max-width:100%;min-width:0;overflow-wrap:anywhere;}
  .search_results_posts .topic {float:none;width:auto;padding:10px;background:#f2e4cd;}
  .search_results_posts .inner,.core_posts .inner {padding:10px;font-size:14px;line-height:1.5;}
  .search_results_posts img,.core_posts img {max-width:100%;height:auto;}
  .ha-table-scroll {max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #c6ad89;border-radius:5px;}
  .ha-table-scroll .table_grid {table-layout:auto!important;}
  .ha-table-scroll th,.ha-table-scroll td {white-space:normal;overflow-wrap:normal;}
  .ha-table-scroll .table_grid th {min-width:65px;}
  .table_grid thead tr.catbg,.table_grid thead tr.titlebg,.table_grid th {background:#68452b;color:#f9e5c1;}
  .table_grid thead a:link,.table_grid thead a:visited {color:#f9e5c1;}
  .table_grid td {background:#f7ecd9;border-color:#d1bb98;}
  .table_grid tr:nth-child(even) td {background:#fcf6ec;}
  #main_content_section .windowbg,#main_content_section .windowbg2 {background-color:#f6ead6;background-image:none;}
  .description,.description_board,.plainbox,.information {background:#f0e2c9;border-color:#cdb48e;border-radius:5px;}
  .errorbox {border:1px solid #c4876a;background:#f5e3d6;color:#7f2e20;padding:12px;border-radius:5px;}
  .successbox,#profile_success {border:1px solid #9cad7b;background:#eaf0da;padding:12px;border-radius:5px;}
  #poll_options dl.options {display:block;}
  #poll_options dl.options dt,#poll_options dl.options dd {float:none;width:100%;margin:0 0 8px;}
  .diagon-store > table > tbody {grid-template-columns:repeat(2,minmax(0,1fr));}
  .diagon-store .diagon-product {border-color:#c4a77e;background:#fff7e9;}
  #footer_section {background:#f5ead6;}
}
@media screen and (max-width:360px) {
  #forumposts .post_wrapper {grid-template-columns:94px minmax(0,1fr);}
  #forumposts .postarea {padding:8px;}
  #forumposts .post {font-size:14px;}
  #forumposts .poster > ul.reset > li.custom img {max-width:79px!important;}
  .ha-wordmark {font-size:19px;}
  .diagon-store > table > tbody {grid-template-columns:1fr;}
  #detailedinfo div.content dl {grid-template-columns:36% minmax(0,1fr);gap:7px;}
}
@media screen and (max-width:800px) {
  .ha-search input {border:0!important;background:transparent;box-shadow:none;min-height:0;}
  #basicinfo h4 {white-space:normal;overflow:visible;}
  #basicinfo h4 span.position {font:12px/1.5 Arial,sans-serif;white-space:normal;}
  form#postmodify .roundframe {padding:12px!important;}
  #advanced_search dl#search_options {width:100%;max-width:100%;margin:0;padding:12px 0 0;overflow:visible;}
  #advanced_search dl#search_options input:not([type=checkbox]):not([type=radio]) {width:100%;}
  #advanced_search .enhanced {display:flex;flex-wrap:wrap;gap:7px;align-items:center;}
  #advanced_search .enhanced input[type=text] {width:100%;}
  #advanced_search .between input {max-width:80px;}
  #messageindex tbody tr {min-height:0!important;height:auto!important;grid-template-rows:auto auto auto;}
  #messageindex tbody td {height:auto!important;min-height:0;}
  #messageindex tbody td.subject {text-align:left!important;}
  #messageindex tbody td.subject p {margin:3px 0 0;font-size:10px;font-weight:normal;}
  #messageindex tbody td.stats {text-align:left!important;}
  #messageindex tbody td.lastpost > div {padding-left:24px!important;min-height:20px;display:block;text-align:left;}
  #messageindex tbody td.lastpost img[alt^=abm_] {width:18px!important;height:18px!important;max-width:18px!important;margin-top:-9px!important;}
  #messageindex tbody td.lastpost img:not([alt^=abm_]) {float:none;width:12px;height:auto;margin:0;}
  .description_board {overflow:auto;}
  .description_board img {display:none;}
}
@media screen and (max-width:800px) {
  #personal_messages .postarea > .flow_hidden {display:contents;}
  #personal_messages .keyinfo {order:0;}
  #personal_messages .post {order:1;}
  #personal_messages .quickbuttons {order:3;}
  #personal_messages .poster > ul {display:flex;flex-direction:column;gap:5px;}
  #personal_messages .poster li {border:0;margin:0;padding:0;}
  #personal_messages .poster li.membergroup {order:0;}
  #personal_messages .poster li.avatar {order:1;}
  #personal_messages .poster li.custom {order:2;}
  #personal_messages .poster li.postcount {order:3;}
  #personal_messages .poster li:is(.postgroup,.stars,.gender,.profile,.im_icons,.blurb) {display:none;}
}
@media screen and (max-width:800px) {
  #messageindex table.table_grid tbody td {padding:0!important;background:none;border:0;}
  #messageindex table.table_grid thead th {padding:5px 6px;font-size:11px;}
  #messageindex tbody td[colspan] {grid-column:1/-1!important;grid-row:auto!important;}
  #messageindex tbody tr.whos_viewing {grid-template-rows:auto;padding:7px 9px;}
  #personal_messages .poster > ul.reset > li {border:0!important;background:transparent!important;margin:0 0 4px;padding:0;}
  #personal_messages .post .inner {border:0;padding:8px 0;margin:0;}
  #personal_messages .postarea .flow_hidden .quickbuttons {border-top:1px solid #cbb28a;margin-top:10px;}
  #main_content_section #fatal_error {width:100%;margin:0;}
}
@media screen and (max-width:800px) {
  #notify_options {font-size:13px;}
  #notify_options label {line-height:1.7;}
  #notify_options select {display:block;width:100%;margin-top:7px;white-space:normal;}
  #statistics #stats_left,#statistics #stats_right,#statistics .half_content,#profileview #generalstats,#profileview #activitytime {float:none;width:100%;max-width:100%;min-width:0;margin:0 0 10px;}
  #statistics dl.stats {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:8px 0;}
  #statistics dl.stats dt,#statistics dl.stats dd {float:none;width:auto;margin:0;font-size:12px;}
  #personal_messages form[action*="manlabels"] input[type=text] {width:100%;}
  #personal_messages form[action*="manlabels"] .table_grid td:last-child {width:34px;}
  #postMoreOptions ul,#postMoreOptions li {max-width:100%;min-width:0;}
  #postMoreOptions input[type=file],#postMoreOptions input.input_text {width:100%;}
}
.ha-board-heading {display:none;}
@media screen and (max-width:800px) {
  .ha-board-heading {display:block;margin:2px 0 10px;}
  .ha-board-heading h1 {font:bold 27px/1.2 Georgia,serif;color:#39291c;margin:0;}
  .childboards .table_frame {padding:0!important;border:0;background:transparent;}
  .childboards table.table_list > tbody.content > tr[id^=board_]:not([id$=_children]) {display:grid;grid-template-columns:54px minmax(0,1fr);gap:3px 9px;padding:10px!important;background:linear-gradient(110deg,#f0e1c7,#fcf7ed);border-bottom:1px solid #cfb796;}
  .childboards table.table_list > tbody.content > tr > td {display:block;width:auto!important;min-width:0;max-width:100%;padding:0!important;border:0!important;background:none;text-align:left;}
  .childboards table.table_list td.icon {grid-column:1;grid-row:1/4;display:flex;align-items:center;justify-content:center;padding-right:7px!important;border-right:1px solid #d6c19e!important;}
  .childboards table.table_list td.info {grid-column:2;grid-row:1;}
  .childboards table.table_list td.info a.subject {font:bold 17px/1.2 Georgia,serif;color:#39291c;}
  .childboards table.table_list td.info p {font:12px/1.35 Arial,sans-serif;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:3px 0 0;}
  .childboards table.table_list td.stats {grid-column:2;grid-row:2;text-align:left;}
  .childboards table.table_list td.stats p {font:10px/1.4 Arial,sans-serif;margin:0;text-align:left;}
  .childboards table.table_list td.stats br {display:none;}
  .childboards table.table_list td.lastpost {grid-column:2;grid-row:3;line-height:1.4;font-size:10px;}
  .childboards table.table_list td.lastpost p {margin:0;padding:0;}
  .childboards table.table_list td.children {grid-column:1/-1;padding:6px!important;}
  #messageindex table.table_grid tr.titlebg {display:block;}
  #messageindex table.table_grid tr.titlebg > td {display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end;}
}
.ha-mobile-role {display:none;}
@media screen and (max-width:800px) {
  #forumposts .poster > ul.reset > li.ha-mobile-role {display:block;order:1;font-size:11px;}
}

@media screen and (max-width:800px) {
  #messageindex.topic_table {padding:0;border:0;background:transparent;}
  #messageindex .table_grid {margin:0;}
  #messageindex .table_grid thead {border:0;margin-bottom:6px;}
  #messageindex .table_grid thead tr {
    gap:0 2px;
    padding:2px 7px;
    border:0;
    background:linear-gradient(110deg,#593820,#7b5435);
    border-radius:6px;
  }
  #messageindex .table_grid thead th {
    border:0;
    padding:4px 5px;
    font-size:10px;
    line-height:1.35;
  }
  #messageindex .table_grid thead th.first_th,
  #messageindex .table_grid thead th.last_th:not(:has(a,input,strong)) {display:none;}
  #messageindex .table_grid thead th a {color:#fff1d7;}
  #messageindex .table_grid thead th img {width:8px;vertical-align:middle;}
  #messageindex .table_grid tbody > tr:has(> td.subject) {
    grid-template-columns:20px minmax(0,1fr) auto;
    gap:3px 8px;
    margin:0 0 6px;
    padding:8px 9px;
    border:1px solid #c9ae88;
    border-radius:6px;
    background:linear-gradient(110deg,#f2e5ce,#fcf7ec);
  }
  #messageindex .table_grid tbody > tr:has(> td.stickybg2, > td.locked_sticky2, > td.approvetbg) {border-inline-start:3px solid #95673e;}
  #messageindex table.table_grid tbody td:is(.icon1,.subject,.stats,.lastpost,.moderation) {
    width:auto !important;
    max-width:none;
    min-width:0;
    float:none;
    text-align:left;
  }
  #messageindex .table_grid td.icon1 img {width:auto;max-width:17px;max-height:18px;vertical-align:middle;}
  #messageindex .table_grid td.subject {font:bold 16px/1.25 Georgia,serif;}
  #messageindex .table_grid td.subject span[id^="msg_"] > a {color:#39291c;}
  #messageindex .table_grid td.subject p {font:11px/1.3 Arial,sans-serif;color:#634e38;}
  #messageindex .table_grid td.subject a[id^="newicon"] img {vertical-align:middle;}
  #messageindex .table_grid td.stats {font:11px/1.35 Arial,sans-serif;}
  #messageindex .ha-topic-count {display:inline-block;white-space:nowrap;}
  #messageindex .ha-topic-count + br + .ha-topic-count::before {content:"·";margin:0 5px 0 2px;}
  #messageindex table.table_grid tbody td.lastpost {
    padding-top:4px !important;
    border-top:1px solid #dec9aa;
    color:#65513c;
    font:11px/1.4 Arial,sans-serif;
  }
  #messageindex .table_grid td.lastpost img[src$="/last_post.gif"] {margin-inline-end:3px;vertical-align:middle;}
  #messageindex .table_grid tbody > tr.whos_viewing {
    margin-bottom:6px;
    border:1px solid #d2b996;
    border-radius:6px;
    background:#f0e3cb;
  }
  #messageindex .table_grid .whos_viewing td {font:11px/1.35 Arial,sans-serif;overflow-wrap:anywhere;}
}
