.attribute-table th:first-child{width:28%}.attribute-table td{overflow-wrap:break-word}@media(max-width:600px){.lore-prose table.attribute-table,.attribute-table tbody,.attribute-table tr{display:block}.attribute-table thead{display:none}.attribute-table tr{margin-bottom:16px;border:1px solid #87734d65}.attribute-table tbody th{display:block;width:auto!important;background:#263027;font-weight:bold}.attribute-table td{display:block;font-size:16px}.attribute-table td[data-label]:before{content:attr(data-label);display:block;color:#e5c995;font-weight:bold;margin-bottom:5px}}.attribute-browser{margin:34px 0 24px;padding:20px;border:1px solid #87734d65;background:#17231e}.attribute-browser label{display:block;color:#e5d1aa;font-size:18px;margin-bottom:10px}.attribute-search-row{display:flex;gap:10px}.attribute-search-row input{min-width:0;flex:1;padding:12px;color:#eee1c5;background:#0b1411;border:1px solid #9b835c;font:16px Georgia,serif}.attribute-browser button{padding:10px 14px;background:#263027;color:#ead9b3;border:1px solid #87734d;font:16px Georgia,serif;cursor:pointer}.attribute-browse-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:14px}.attribute-browse-actions span{font-size:15px}.attribute-tree{margin:18px 0!important;padding:0!important;border:1px solid #87734d65}.attribute-tree>h2{margin:0!important;padding:0!important;background:none!important}.attribute-tree>h2:before,.attribute-tree>h2:after{display:none!important}.attribute-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;border:0;padding:22px;background:#17231e;color:#e5d1aa;font:32px Norse,Georgia,serif;text-align:left;cursor:pointer}.attribute-toggle small{display:block;font:16px/1.5 Georgia,serif;color:#c6bea9;margin-top:5px}.attribute-toggle-mark{font:28px Georgia,serif}.attribute-panel{padding:0 22px 20px}.attribute-toggle:hover,.attribute-browser button:hover{background:#293629}.attribute-toggle:focus-visible,.attribute-browser :focus-visible{outline:2px solid #e5c995;outline-offset:3px}.attribute-tree [hidden],.attribute-tree[hidden],.attribute-browser[hidden]{display:none!important}@media(max-width:600px){.attribute-toggle{padding:18px;font-size:28px}.attribute-panel{padding:0 12px 12px}.attribute-browser{padding:16px}.attribute-search-row{flex-wrap:wrap}.attribute-search-row input{width:100%}}@media print{.attribute-panel{display:block!important}.attribute-browser{display:none!important}}

/* Game UI textures retain their native proportions around live labels. */
.attribute-browser button {
  position: relative;
  min-width: 9rem;
  min-height: 2.75rem;
  padding: .6rem 1.5rem;
  border: 0;
  background: transparent url("/assets/attribute-ui/T_NW_UI_Button_Primary.png") center / contain no-repeat;
  color: #fff2d7;
  text-shadow: 0 1px 3px #000;
}
.attribute-browser button:hover {
  background-color: transparent;
  filter: brightness(1.18);
}
.attribute-browser button:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/attribute-ui/T_NW_UI_Focus_Outline.png") center / contain no-repeat;
  pointer-events: none;
}
.attribute-tree {
  border: 0;
  padding-bottom: .7rem !important;
  background: url("/assets/attribute-ui/T_NW_UI_Divider.png") bottom center / 100% .7rem no-repeat;
}
.attribute-toggle .attribute-name {
  display: grid;
  place-items: center;
  width: min(100%, 17rem);
  aspect-ratio: 847 / 178;
  box-sizing: border-box;
  padding-inline: 12%;
  background: url("/assets/attribute-ui/T_NW_UI_Attribute_Normal.png") center / contain no-repeat;
  color: #fff2d7;
  text-shadow: 0 1px 3px #000;
}
.attribute-toggle > span:first-child { flex: 1; min-width: 0; }
.attribute-toggle[aria-expanded="true"] .attribute-name {
  background-image: url("/assets/attribute-ui/T_NW_UI_Attribute_Selected.png");
}
.attribute-toggle .attribute-name { padding-inline: 0; }
/* Keep guide controls readable inside their illustrated frames. */
.attribute-views{display:flex;gap:12px;flex-wrap:wrap;margin:28px 0}
.attribute-views button,.attribute-browser button{box-sizing:border-box;min-height:52px;height:auto;max-width:100%;padding:14px 24px;white-space:normal;overflow-wrap:break-word;line-height:1.35;font:16px/1.35 Georgia,serif;background:#17231e;border:1px solid #87734d;color:#ead9b3;cursor:pointer}
.attribute-views button{flex:1 1 180px}
.attribute-views button[aria-pressed=true]{background:#354433;border-color:#dbc18d;color:#fff2d7}
.attribute-views button:focus-visible{outline:2px solid #e5c995;outline-offset:3px}
.attribute-view[hidden],.attribute-views[hidden]{display:none!important}
.attribute-toggle{height:auto;min-height:110px;white-space:normal;line-height:1.2}
.attribute-toggle .attribute-name{width:min(100%,19rem);min-height:64px;aspect-ratio:auto;padding:14px 26px;font-size:clamp(22px,2.5vw,30px);background-size:100% 100%;overflow-wrap:break-word;box-sizing:border-box}
.attribute-toggle small{max-width:100%;white-space:normal}
.attribute-toggle-mark{flex:0 0 24px;text-align:center}
.attribute-browse-actions{align-items:stretch}.attribute-browse-actions span{flex-basis:100%}
@media(max-width:600px){.attribute-views{gap:8px}.attribute-views button{flex-basis:100%;min-height:48px}.attribute-toggle{padding:12px;gap:8px}.attribute-toggle .attribute-name{font-size:25px;padding:14px 20px}.attribute-search-row input{flex-basis:100%}.attribute-browser button{flex:1 1 120px;min-width:0}}
/* Reuse the gold game button; compensate for its transparent left margin. */
.attribute-views button,
.attribute-views button[aria-pressed="true"] {
  flex: 1 1 220px;
  min-height: 76px;
  padding: 22px 30px;
  border: 0;
  background: transparent url('/assets/attribute-ui/T_NW_UI_Button_Primary.png') 100% center / 150% 100% no-repeat;
  color: #fff2d7;
  font: 16px/1.35 Georgia, serif;
  text-shadow: 0 1px 3px #000;
}
.attribute-views button[aria-pressed="true"] {filter: brightness(1.25);text-decoration:underline;text-underline-offset:5px}
.attribute-views button:hover {filter: brightness(1.2)}
@media(max-width:600px){.attribute-views button{flex-basis:100%;min-height:76px}}

/* Match the planner actions with the existing gold button artwork. */
.attribute-browser button {
 flex:0 1 190px;
 min-width:170px;
 min-height:68px;
 padding:20px 28px;
 border:0;
 background:transparent url('/assets/attribute-ui/T_NW_UI_Button_Primary.png') 100% center / 150% 100% no-repeat;
 color:#fff2d7;
 font:16px/1.35 Georgia,serif;
 text-shadow:0 1px 3px #000;
}
.attribute-browser button:hover{background-color:transparent;filter:brightness(1.2)}
.attribute-search-row{align-items:center}
@media(max-width:600px){.attribute-browser button{flex:1 1 100%;min-width:0}}
.attribute-browser button:hover{background:transparent url('/assets/attribute-ui/T_NW_UI_Button_Primary.png') 100% center / 150% 100% no-repeat;filter:brightness(1.2)}
/* Same approved inset artwork as the planner number fields. */
.attribute-search-row input {
 box-sizing:border-box;
 min-width:0;
 min-height:56px;
 padding:10px 14px;
 border:8px solid transparent;
 border-image:url('/assets/attribute-ui/05_character_or_readonly_field.png') 10 29 fill / 8px / 0 stretch;
 background:none;
 color:#fff2d7;
 font:16px/1.4 Georgia,serif;
 appearance:none;
}
.attribute-search-row input::placeholder{color:#c6bea9;opacity:1}
.attribute-search-row input:focus-visible{outline:2px solid #e5c995;outline-offset:3px}
