body[data-topdown-khar-candidate] .td-style-picker { margin: 16px 0; min-width: 0; color: #392a25; }
.td-style-picker > strong { display: block; font-size: 17px; }
.td-style-picker p { margin: 4px 0 9px; font-size: 13px; color: #69544a; }
.td-style-picker [hidden] { display: none !important; }
.td-style-picker .style-picker-toggle, .td-style-picker .style-preset {
  box-sizing: border-box; min-width: 0; min-height: 44px; padding: 8px 10px;
  border: 1px solid #b89b7b; border-radius: 7px; background: #fff8eb; color: #56392d;
  font: 600 14px/1.3 system-ui; white-space: normal; cursor: pointer; box-shadow: none;
}
.td-style-picker .style-picker-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; }
.td-style-picker #style-options {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px;
  margin: 7px 0; padding: 8px; border: 1px solid #b89b7b; border-radius: 8px; background: #fff8eb;
}
.td-style-picker .style-preset:hover { background: #f4e6d0; border-color: #79503b; }
.td-style-picker .style-preset[aria-pressed="true"] { background: #792d36; color: #fff8eb; border-color: #792d36; }
.td-style-picker button:focus-visible { outline: 3px solid #226e8c; outline-offset: 2px; }
body[data-topdown-khar-candidate] .topdown-worktable .forge-worktable-hero {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(210px,360px); align-items: center; gap: 16px; min-height: 0; padding: 14px 18px;
}
body[data-topdown-khar-candidate] .topdown-worktable .forge-worktable-copy { position: static; width: auto; min-width: 0; padding: 0; }
body[data-topdown-khar-candidate] .topdown-worktable .forge-worktable-support { position: static; }
.td-hero-strip {
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); overflow: hidden; padding: 3px;
  border: 1px solid #bc9863; border-radius: 6px; background: #4e3023; box-shadow: inset 0 0 0 1px #f5d39a;
}
.td-hero-strip img { display: block; box-sizing: border-box; width: 100%; height: 78px; padding: 3px; object-fit: contain; }
.td-hero-strip img + img { border-left: 1px solid #bc9863; }
@media (max-width: 820px) {
  body[data-topdown-khar-candidate] .topdown-worktable .forge-worktable-hero { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .td-hero-strip img { height: 58px; }
}
@media (max-width: 480px) {
  .td-style-picker #style-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 360px) {
  body[data-topdown-khar-candidate] #account { grid-template-columns: minmax(0,1fr); }
  body[data-topdown-khar-candidate] #account > * { min-width: 0; }
  body[data-topdown-khar-candidate] .account-cta { grid-template-columns: 36px minmax(0,1fr) 48px; padding: 10px 8px; gap: 6px; }
  body[data-topdown-khar-candidate] .account-cta-action { min-width: 0; }
  body[data-topdown-khar-candidate] .account-cta-copy { min-width: 0; overflow-wrap: anywhere; }
}

/* The original download button is deliberately not restyled here. */
.td-share { position: relative; min-width: 0; padding: 0 12px 8px; }
.td-share button {
  width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #b17b49;
  border-radius: 6px; background: #fbf0df; color: #744019; font: 700 14px/1.3 system-ui;
  white-space: normal; box-shadow: none;
}
.td-share button:not(:disabled):hover { background: #f2e2cc; }
.td-share button:disabled { border-color: #aaa; background: #eceae7; color: #555; opacity: 1; }
.td-share p, .td-share-status { margin: 6px 0; color: #68362b; font: 13px/1.4 system-ui; }
.td-share-status:empty { display: none; }
.tg-share-dialog {
  box-sizing: border-box; width: min(490px,calc(100% - 28px)); max-height: calc(100dvh - 24px);
  overflow: auto; margin: auto; padding: 20px; border: 1px solid #ac774e; border-radius: 12px;
  background: #26191b; color: #f8e9d0; font: 15px/1.5 system-ui;
}
.tg-share-dialog::backdrop { background: #120b0bd9; }
.tg-share-dialog h2 { margin: 0 0 14px; color: #fff3dc; font: 600 24px/1.15 Georgia,serif; }
.tg-share-dialog p { margin: 12px 0; }
.tg-share-dialog a { color: #ffcc8c; text-decoration: underline; }
.tg-share-dialog form { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.tg-share-dialog button { min-height: 44px; padding: 8px 14px; background: #4a2927; color: #fff0d5; border: 1px solid #bb8858; border-radius: 6px; }
.tg-share-dialog button[value="share"] { background: #934b26; }
.tg-share-dialog :focus-visible { outline: 3px solid #ffd38b; outline-offset: 3px; }
