/* Scroll House uses the same 780×512 logical paper as Ninja School. Each
   frame, card, marker, book, portrait and live label stays independently sized. */
.sh-house-view{position:relative;width:100%;height:100%;overflow:visible;color:#655c50;color-scheme:light;font:14px/1.25 Arial,sans-serif}
.sh-house-view *{box-sizing:border-box;font-family:Arial,sans-serif}
.sh-house-view p,.sh-house-view h2,.sh-house-view h3{margin:0}
#game-container #modal-root .sh-house-view p{margin:0}
.sh-house-view img{display:block;max-width:100%;object-fit:contain}
.sh-house-view svg{display:block;width:100%;height:100%}
.sh-house-view button{appearance:none;border:0;border-radius:0;background:none;padding:0;min-width:0;color:inherit;font:inherit;line-height:1.15;box-shadow:none;cursor:pointer}
.sh-house-view button:disabled{cursor:default}
.sh-house-view button:focus-visible{outline:2px solid #55b9e6;outline-offset:3px}
.sh-house-view .sh-house-title{position:absolute;left:50%;top:-35px;transform:translateX(-50%);font-size:24px!important;line-height:34px!important;font-weight:bold;white-space:nowrap;color:#fff8e2!important;text-shadow:2px 0 #69513b,-2px 0 #69513b,0 2px #69513b,0 -2px #69513b,2px 2px #69513b,-2px -2px #69513b,2px -2px #69513b,-2px 2px #69513b,3px 0 #fff9e8,-3px 0 #fff9e8,0 3px #fff9e8,0 -3px #fff9e8,3px 3px #fff9e8,-3px -3px #fff9e8,3px -3px #fff9e8,-3px 3px #fff9e8}
.sh-house-info-frame{position:absolute;left:calc(50% - 352.5px);top:30px;width:705px;height:145px;border:10px solid transparent;border-image:none;background:#eeeee5;background-clip:padding-box;display:grid;grid-template-columns:176px minmax(0,1fr);gap:11px;align-items:center;padding:0 7px;isolation:isolate;z-index:4;background-image:url('/assets/scroll-house/reference-v1/ui/info-frame.svg');background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-origin:border-box;background-clip:border-box}
.sh-house-teacher{position:absolute;left:4px;top:-66px;width:176px;height:210px;z-index:3;pointer-events:none}
.sh-house-teacher>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;image-rendering:auto}
.sh-house-information{grid-column:2;min-width:0;color:#4e4b43;font-size:14px;line-height:1.4;display:flex;flex-direction:column;gap:3px;z-index:2}
.sh-house-information p{font-size:inherit;line-height:inherit;color:inherit}
.sh-house-info-top{display:grid;grid-template-columns:1fr 1fr 125px;gap:11px;align-items:center;white-space:nowrap}
.sh-house-info-top>span{display:inline-flex;align-items:baseline;gap:6px;font-size:13px}
.sh-house-info-top b{font-weight:bold;color:#d49248;font-size:14px}
.sh-house-information .sh-house-help{padding-right:21px;font-size:12px;line-height:1.3}
.sh-house-information .sh-house-upgrade-cost{font-size:11px;color:#897762;white-space:nowrap}
.sh-house-view .sh-house-action{height:38px;border:9px solid transparent;border-image:none;color:white;font-weight:bold;font-size:14px;text-shadow:0 1px #306195;white-space:nowrap;background-image:url('/assets/recruit-synthesis/reference-v1/ui/action-blue.svg');background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-origin:border-box;background-clip:border-box}
.sh-house-view .sh-house-action.sh-house-gold{border-image:none;color:#fff8e3;text-shadow:0 1px #96652a;background-image:url('/assets/recruit-synthesis/reference-v1/ui/action-gold.svg');background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-origin:border-box;background-clip:border-box}
.sh-house-view .sh-house-action:disabled{border-image:none;color:#f2f0eb;text-shadow:none;opacity:1;background-image:url('/assets/recruit-synthesis/reference-v1/ui/action-disabled.svg');background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-origin:border-box;background-clip:border-box}
.sh-house-upgrade{width:125px}
.sh-house-separator{position:absolute;left:20px;right:16px;width:744px;height:20px;object-fit:fill!important;pointer-events:none}
.sh-house-separator-top{top:195px}.sh-house-separator-bottom{top:458px;transform:scaleY(-1)}
.sh-house-clouds{position:absolute;left:0;top:377px;width:780px;height:135px;pointer-events:none}
.sh-house-cards{position:absolute;left:calc(50% - 349px);top:239px;display:grid;grid-template-columns:335px 335px;grid-template-rows:182px;gap:28px;z-index:2}
.sh-house-card{position:relative;width:335px;height:182px;border:10px solid transparent;border-image:none;isolation:isolate;overflow:visible;background:none;border-radius:0;box-shadow:none;background-image:url('/assets/scroll-house/reference-v1/ui/card-frame.svg');background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-origin:border-box;background-clip:border-box}
.sh-house-view .sh-house-card-title{display:flex;align-items:center;justify-content:center;width:100%;height:26px;font-size:16px!important;line-height:1.15;font-weight:normal;color:#61635b!important;text-shadow:1px 0 #f7f9ef,-1px 0 #f7f9ef,0 1px #f7f9ef,0 -1px #f7f9ef}
.sh-house-card-body{display:grid;grid-template-columns:38% minmax(0,1fr);gap:8px;height:125px}
.sh-house-book-pane,.sh-house-card-information{position:relative;background:#b5b8b255;border-radius:3px;display:flex;flex-direction:column;justify-content:center;min-width:0;padding:7px;overflow:hidden}
.sh-house-book-pane{align-items:center}
.sh-house-book-pane>.sh-house-refresh-mark{width:63px;height:63px;opacity:.85}
.sh-house-book-pane>.sh-house-book{width:64px;height:64px;image-rendering:auto}
.sh-house-book-pane>.sh-house-watermark{position:absolute;left:10%;top:10%;width:80%;height:80%;opacity:.85}
.sh-house-book-pane>.sh-house-lock{width:47px;height:57px;position:relative;z-index:2}
.sh-house-card-information{font-size:13px;line-height:1.35;gap:5px;color:#615a50}
.sh-house-card-information p{color:inherit;line-height:inherit;font-size:inherit}
.sh-house-card-information time{display:block;font-size:15px;font-weight:bold;line-height:1.3;font-variant-numeric:tabular-nums}
.sh-house-card-information .sh-house-refresh-text{font-size:14px;line-height:1.35}
.sh-house-card-information .sh-house-unlock-label{font-size:15px}
.sh-house-unlock-row{display:flex;align-items:center;justify-content:space-between;gap:4px}
.sh-house-unlock-row b{font-size:14px;font-weight:bold;color:#514d44}
.sh-house-card-information .sh-house-book-name{font-size:14px;font-weight:bold;line-height:1.15;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.sh-house-book-name.sh-house-tier-primary{color:#8e43b2}.sh-house-book-name.sh-house-tier-ultimate{color:#c74744}
.sh-house-class{display:flex;align-items:center;gap:4px;font-size:11px;line-height:1}
.sh-house-class>.ninja-class-icon{width:20px;height:20px;flex:0 0 20px}
.sh-house-card-information .sh-house-book-effect{font-size:11px;line-height:1.28;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.sh-house-card-information .sh-house-timer-row{display:flex;align-items:center;justify-content:space-between;gap:5px;width:100%;font-size:11px;line-height:18px}
.sh-house-card-information .sh-house-timer-row time{font-size:15px;font-weight:bold;line-height:18px;color:#72512e}
.sh-house-card-information .sh-house-empty-help{font-size:12px;line-height:1.3}
.sh-house-view .sh-house-card-footer{position:absolute;left:4px;right:3px;bottom:-26px;display:flex;justify-content:flex-end;align-items:center;gap:10px;height:38px;padding:0;margin:0;letter-spacing:normal;text-align:left;border:0;min-height:0}
.sh-house-card-footer>.sh-house-action{width:128px;height:38px;border-width:9px!important;font-size:14px!important;line-height:1}
.sh-house-card-footer>.sh-house-action:first-child:nth-last-child(2){width:99px}
.sh-house-card-reason{position:absolute;top:204px;left:0;right:0;height:16px;text-align:center;color:#995137;font-size:10px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sh-house-page{position:absolute;left:20px;right:20px;bottom:7px;height:16px;text-align:center;font-size:10px;color:#917a54;line-height:1.3;z-index:2}
/* Internal sheets scale with the host, avoiding viewport-specific font changes. */
#game-container .sh-house-view .sh-house-title{font-size:24px!important}
#game-container .sh-house-view .sh-house-card-title{font-size:16px!important}

/* The waiting card keeps its countdown and Skill Patch cost. */
.sh-house-phase-refreshing .sh-house-card-information{text-align:center}
.sh-house-phase-refreshing time{color:#514d44;font-weight:400}
.sh-house-card-reason{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Skill Patch stays visible beside its live stock while the timer runs. */
.sh-house-instant-cost{display:flex;align-items:center;justify-content:center;gap:4px;min-height:22px;font-size:11px;line-height:1.2;white-space:nowrap}
.sh-house-instant-art{display:block;flex:0 0 22px;width:22px;height:22px}
.sh-house-instant-art>img{display:block;width:100%;height:100%}
/* Permanent state colors; the mouse does not change the card appearance. */
.sh-house-phase-refreshing{background-image:url('/assets/recruit-synthesis/reference-v1/ui/school-card-gold.svg');--sh-card-pane:#fff1bbaa;--sh-card-text:#78541e}
.sh-house-reward-primary{background-image:url('/assets/recruit-synthesis/reference-v1/ui/school-card-purple.svg');--sh-card-pane:#f1e1fb99;--sh-card-text:#6a397e}
.sh-house-reward-ultimate{background-image:url('/assets/recruit-synthesis/reference-v1/ui/school-card-red.svg');--sh-card-pane:#ffe0d699;--sh-card-text:#8e3e34}
.sh-house-card:is(.sh-house-phase-refreshing,.sh-house-reward-primary,.sh-house-reward-ultimate) :is(.sh-house-book-pane,.sh-house-card-information){background:var(--sh-card-pane);color:var(--sh-card-text)}
