/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

body {
    font-size: 1em;
    line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection declarations have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
 */

img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Chrome Frame prompt
   ========================================================================== */

.chromeframe {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}
#mgnt-ui {
    visibility: hidden;
    display: none;
}
html.canvas #mgnt-ui {
    visibility: visible;
    display: block;
}
#BrowserSupport {
    visibility: visible;
    display: block !important;
    margin-top: 2em;
}
html.canvas #BrowserSupport {
    visibility: hidden;
    display: none !important;
    margin-top: 0;
}
#unsupported-browser ul.browsers {
width:460px;
min-height:160px;
margin:0 auto;
}

ul.browsers .browser {
float:left;
width:146px;
display:block;
}

ul.browsers .browser a {
overflow:hidden;
width:100%;
height:0;
padding-top:142px;
display:block;
background:transparent url('../img/support/SupportedBrowsersSprite.png') no-repeat 0 0;
}

ul.browsers .browser.firefox a {
background-position-x:-146px;
}

ul.browsers .browser.safari a {
background-position-x:-292px;
}
.modal.panel {
    padding: .75em;
    border-radius: 8px;
    border: 1px solid #FFF;
    background-color: rgba(255, 255, 255, 0.6);
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
    margin-top: 30%;
}
.modal.panel h2 {
    color: #222;
    font-size: 130%;
    font-weight: bold;
    text-align: center;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
textarea.ViewTpl {
    visibility: hidden;
    display: none;
}
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
}
body {
    background: #128b03 url('../img/bkgr/BackgroundLandscape.scale-100.jpg') no-repeat 50% 50%;
    background-color: #128b03;
    background-size: cover;
    -webkit-touch-callout: none; 
    -webkit-text-size-adjust: none; 
    -webkit-user-select: none; 
    -webkit-highlight: none; 
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    overflow: hidden;
    -ms-touch-action: none;
}
a, input, button {
    -ms-touch-action: none !important;
}
h1, h2, h3, h4, h5, p {
    color: #333;
}
h2 {
    font-size: 42px;
}
h3, .promptText p {
    font-size: 20px;
}
p {
    font-size: 13px;
}
.console {
    z-index: 1000;
    position: absolute;
    bottom: 0;
}
#Logo {
    width: 50%;
    max-width: 532px;
}
#Logo img {
    width: 100%;
}
#Logo p {
    color: #FFF;
    font-weight: bold;
    text-align: center;
    text-shadow: 0px 1px 3px #000;
    font-size: 120%;
}
#MASH.logo {
    width: 296px;
    height: 90px;
    background: transparent url('../img/logos/MASHLogoText.scale-100.png') no-repeat 0 0;
    background-size: cover;
}
#mgnt-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
#mgnt-ui {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    overflow: hidden;
}
#facebook #mgnt-ui {
    max-height: 640px;
}
.BaseView {
    position: absolute;
    height: 100%;
    width: 100%;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(0,0,0);
}
.overthrow {
    overflow-y: scroll;
}
/* Overthrow CSS:
   Enable overflow: auto on elements with overthrow class when html element has overthrow class too */
.overthrow-enabled .overthrow {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
.scrollable {
    overflow: scroll;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-scrolling: touch;
    /*padding-right: 2em;*/
    padding-bottom: 2em;
}
.scrollable * {
    -webkit-transform: translate3d(0,0,0);
}

button.basicButton {
    padding: 1em;
    border: 2px solid rgb(18,171,9);
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    /*color: #062954;*/
    color: #FFF;
    text-shadow: 1px 1px 2px #333;
    font-weight: bold;
    font-size: 125%;
    background-image: url('../img/skin/ButtonGloss.scale-100.png'), url('../img/skin/GreenFabricBkgrPattern.scale-100.png');
    background-repeat: no-repeat, repeat;
    background-position: 50% 0, 0 0;
    -webkit-box-shadow: 0px 1px 2px 1px rgba(0,0,0,0.5);
    box-shadow: 0px 1px 2px 1px rgba(0,0,0,0.5);
    background-size: 100% 60%, auto;

}
button.basicButton:hover {
    background-image: url('../img/skin/ButtonGloss.scale-100.png'), url('../img/skin/GreenFabricBkgrPattern_Hover.scale-100.png');
    background-repeat: no-repeat, repeat;
    background-position: 50% 0, 0 0;
}
button.basicButton:active {
    background-image: url('../img/skin/ButtonGloss.scale-100.png'), url('../img/skin/GreenFabricBkgrPattern_Pressed.scale-100.png');
    background-repeat: no-repeat, repeat;
    background-position: 50% 0, 0 0;
    color: #e4e3e3;
}
button[disabled=disabled].basicButton,
button[disabled=disabled].basicButton:hover,
button[disabled=disabled].basicButton:active {
    color: rgb(192, 221, 190);
    border: 2px solid rgb(57,157,52);
    background-color: transparent;
    background-image: url('../img/skin/ButtonGloss.scale-100.png'), url('../img/skin/GreenFabricBkgrPattern_Disabled.scale-100.png');
    background-repeat: no-repeat, repeat;
    background-position: 50% 0, 0 0;
}
button.basicButton:focus {
    outline: none;
}
.backButton {
    display: block;
    color: #FFF;
    font-size: 110%;
    font-weight: bold;
    text-decoration: none;
    width: 48px;
    height: 48px;
    background: transparent url('../img/skin/BackButton.scale-100.png') no-repeat 0 0;
    float: left;
}
.backButton:active {
    background-position: 0 -48px;
    outline: none;
}
.backButton:focus {
    outline: none;
}
.titleView {
    color: #FFF;
    font-size: 125%;
    float: left;
    margin-left: 10px;
}

#NavigatorControl {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#Dwellings {
    width: 100%;
    max-width: 500px;
    height: 50%;
    position: absolute;
    margin: 0 auto;
    bottom: 10%;
    background: transparent url('../img/dwellings/Dwellings-Flat.scale-100.png') no-repeat 0 100%;
    background-size: contain;
}
#facebook #Dwellings {
    bottom: 5%;
}
#HomeView_MainMenu {
    width: 40%;
    min-width: 280px;
    margin-top: 1em;
    position: absolute;
    left: 10px;
}
#HomeView_MainMenu button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}
.SocialButtons {
    position: absolute;
    left: 120px;
    bottom: 10px;
    padding: 10px;
    background-color: rgba(255,255,255,0.8);
    max-width: 460px;
    min-width: 280px;
}
.modern-ui .SocialButtons {
    bottom: 50px;
}
#facebook .SocialButtons {
   bottom: 40px;
}

.SocialButtons .iconBtn {
    margin-right: 10px;
    width: 64px;
    height: 64px;
    display: inline-block;
}
.iconBtn.Facebook {
    background: transparent url('../img/logos/f_logo.svg') no-repeat 0 0;
    background-size: cover;
}
.iconBtn.Twitter {
    background: transparent url('../img/logos/twitter_logo.svg') no-repeat 0 0;
    background-size: cover;
}
.iconBtn.Magnate {
    background: transparent url('../img/logos/mgnt_logo.svg') no-repeat 0 0;
    background-size: cover;
}


#HowToPlayView {
    
}
#HowToPlayContent {
    width: 80%;
    max-width: 1024px;
    min-width: 280px;
    height: 60%;
    padding: 1em;
}
#info_and_credits {
    padding: 1em;
}
#unsupported-browser-message {
    width: 480px;
    margin: 0 auto;
    padding: .5em;
}
.QuestionContent {
    height: 100%;
}
.QuestionHeaderArt, 
.HeaderArt {
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: cover;
    width: 100%;
    height: 30%;
    max-width: 90%;
}
.HeaderArt {
    width: 90%;
    max-width: 1024px;
}
.promptText {
    background-color: rgba(0,0,0,.7);
    padding: 2% 1%;
}
.promptText p {
    color: #FFF;
    margin: 0;
    padding: 0;
    font-size: 120%;
}
.QuestionAnswers {
    padding: 1em 0 0 0;
    width: 60%;
    max-width: 580px;
    min-width: 280px;
}
.AnswerView {
    width: 100%;
    max-width: 580px;
    min-width: 280px;
    margin: 0 auto .5em auto;
}
.controlsContainer {
    max-width: 580px;
    min-width: 280px;
    padding: 0 1em;
    margin-top: 1em;
    z-index: 1000;
}
.controlsContainer {
    position: absolute;
    margin-top: 0;
    padding-top: 0;
    padding-left: 0.5em;
    bottom: 100px;
}
#facebook .controlsContainer {
    bottom: 110px;
}
.hbox .control {
    float: left;
}
.NumberLabel {
    width: 36px;
    height: 48px;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: contain;
}
.AnswerInputContainer {
    width: 60%;
    min-width: 260px;
    height: 36px;
}
.AnswerInputContainer input {
    width: 100%;
    height: 100%;
    padding: 4px;
    margin: 0 auto;
    border-width: 1px;
    border-color: #999;
    -webkit-user-select: auto;
    /*-webkit-user-modify: read-write-plaintext-only;*/
    /*-webkit-tap-highlight-color: rgba(255,255,255,0);*/
}
.AnswerInputContainer input:focus {
    outline: none;
}
.DisclosureButton {
    width: 48px;
    height: 48px;
    margin-left: 16px;
    background: transparent url('../img/skin/DisclosureButton.scale-100.png') no-repeat 0 0;
}
.DisclosureButton:active {
    background-position: 0 -48px;
    outline: none;
}
#overlay {
    position: absolute;
    background: transparent url('../img/skin/transparent.png') repeat 0 0;
    width: 100%;
    height: 100%;
    z-index: 300;
}
.listControl {
    position: absolute;
    visibility: hidden;
    overflow: auto;
    border: 2px solid #333;
    background-color: #FFF;
    z-index: 600;
}
.listControlItem {
    background-color: #FFF;
    border-bottom: 1px solid #333;
    padding: 1em;
}

.listControlItem .titleLbl {
    color: #222;
    font-size: 125%;
    cursor: default;
}

.listControlItem:hover, .segmentedListControlItem .listControlItem:hover {
    background-color: #bdd8e2;
}
.baseControlDisabled:hover {
    background-color: #E8E8E8;   
}

.listControlItem:active, .segmentedListControlItem .listControlItem:active {
    background-color: #7dcef3;
}

.baseControlDisabled,
.baseControlDisabled:hover,
.baseControlDisabled:active
{
    background-color: #E8E8E8;
}
.baseControlDisabled .titleLbl {
    color: #8F8F8F;
}

.segmentedListControlItem {
    width: 100%;
    padding: 0;
}
.segmentedListControlItem .listControlItem {
    float: left;
    width: 40%;
    padding: 5%;
    background-color: #d8e5e6;
}
.segmentedListControlItem .listControlItem.selected {
    background-color: #FFF;
}

#SpiralDrawingContent, #ResultsGeneratorOuter, #StoryContentOuter, #HowToPlayContent, #BrowserSupportContent {
    background-color: rgba(0,0,0,0.0);
    background-repeat: repeat-y;
    background-position: 0 0;
    background-image: url('../img/skin/paper.jpg');
}
#SpiralDrawingContent, #ResultsGeneratorContent, #StoryContentOuter {
    position: relative;
}
#ResultsGeneratorContent {
    position: relative;
}
#DrawingCanvas, #ResultsGeneratorCanvas {
    position: absolute;
    zoom: 100%;
}
#DrawingCanvas {
    -ms-touch-action: none;
    touch-action: none;
}
#ResultsGeneratorCanvas {
    visibility: hidden;
}
#ResultsGeneratorContent {
    overflow: hidden;
}
#StoryContentOuter {
    width: 90%;
    max-width: 1024px;
    height: 30%;
}
#facebook #StoryContentOuter {
    height: 34%;
}
#ReadStoryContent {
    padding: 1em 2em;
}
.wordLblOuter {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: absolute;
    opacity: 0;
}
label.wordLbl {
    color: #222222;
}
canvas.wordLblCanvas {
    position: absolute;
}
.penView {
    display: block;
    position: absolute;
    width: 228px;
    height: 169px;
    background: transparent url('../img/pen.png') no-repeat 0 0;
    z-index: 1000;
    overflow: hidden;
}
#MagicNumberLabel {
    display: none;
    font-size: 350%;
    position: absolute;
    color: #FFF;
    text-shadow: 1px 1px 2px #333;
    padding: 0 5%;
    background-color: rgba(0,0,0,.4);
}

.adModule {
    position: absolute;
    z-index: 2000;
    width: 0;
    height: 0;
    background: transparent;
    /*background-color: #FEFEFE;*/
}
/* MS unit id: 109757 */
.adModule.ad_160x600 {
    width: 160px;
    height: 600px;
}
/* MS unit id: 109758 */
.adModule.ad_292x60 {
    width: 292px;
    height: 60px;
}
/* MS unit id: 109759 */
.adModule.ad_728x90 {
    width: 728px;
    height: 90px;
}
.win-settingsflyout {
    z-index: 2001; /* Place above ad module */
}

/* Desktop web layout */
#NavBar {
    min-width: 320px;
}
.modern-ui #NavBar {
    padding-top: 55px;
    padding-left: 36px;
}
.modern-ui #Logo {
    margin-top: 50px;
    margin-left: 100px;
}
.modern-ui #Dwellings {
    max-width: 768px;
    min-width: 480px;
}
.modern-ui #HomeView_MainMenu {
    left: 120px;
    max-width: 480px;
}
.modern-ui .BaseView {
}
.modern-ui .copy {
    -moz-column-count: 2;
    -moz-column-gap: 20px;
    -webkit-column-count: 2;
    -webkit-column-gap: 20px;
    column-count: 2;
    column-gap: 20px;
}
.modern-ui .titleView {
    font-size: 42px;
    margin-top: 0;
    margin-left: 36px;
}
.modern-ui .promptText {
    padding-left: 10px;
}
.modern-ui .QuestionAnswers {
    padding-left: 80px;
    margin-left: 0;
    margin-top: 1em;
}
.modern-ui .AnswerView {
    margin: 0 auto .5em 0;
}
.modern-ui .controlsContainer {
    position: absolute;
    margin-top: 0;
    padding-top: 0;
    padding-left: 120px;
    bottom: 200px;
}
.modern-ui #HowToPlayContent,
.modern-ui .HeaderArt,
.modern-ui .QuestionHeaderArt
{
    margin-left: 120px;
}
.modern-ui #SpiralDrawingContent {
    margin-left: 120px;
}
.modern-ui #ResultsGeneratorOuter {
    /*position: relative;
    left: 120px;*/
    /*-webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(120px,0,0);
    transform: translate3d(120px,0,0);*/
}
.modern-ui #ResultsGeneratorOuter *, #windowsphone #ResultsGeneratorOuter * {
    -webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}
.modern-ui #ResultsGeneratorOuter .penView {
    
}
.modern-ui #ResultsGeneratorContent {
    
}
.modern-ui .HeaderArt,
.modern-ui .QuestionHeaderArt {
    width: 80%;
    min-width: 538px;
    max-width: 1024px;
}
.modern-ui .StoryHeaderArt,
.modern-ui #StoryContentOuter {
    margin-left: 120px;
}
.modern-ui #StoryContentOuter {
    width: 80%;
    min-width: 538px;
    max-width: 1024px;
}




.waitOverlay {
    z-index: 2000;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}
.waitMessage {
    width: 300px;
    height: auto;
    background-color: rgba(255,255,255,0.9);
    border-radius: 8px;
    padding: .75em;
    position: absolute;
    top: 40%;
    left: 50%;
    margin-left: -150px;
    -webkit-box-shadow: 0px 1px 2px 1px rgba(0,0,0,0.5);
    box-shadow: 0px 1px 2px 1px rgba(0,0,0,0.5);
}
.waitMessage h3, .waitMessage p {
    color: #333;
    text-align: center;
}

/* Portrait */
@media screen and (orientation:portrait) {
    body {
        background: #128b03 url('../img/bkgr/BackgroundPortrait.scale-100.jpg') no-repeat 50% 50%;
        background-size: cover;
    }
    #Dwellings {
        width: 100%;
        height: 70%;
        position: absolute;
        margin: 0 auto;
        bottom: 25%;
        background: transparent url('../img/dwellings/Dwellings-Flat.scale-100.png') no-repeat 0 100%;
        background-size: contain;
    }
}
/* Landscape */
@media screen and (orientation:landscape) {
    body {
        background: #128b03 url('../img/bkgr/BackgroundLandscape.scale-100.jpg') no-repeat 50% 50%;
        background-size: cover;
    }
}

@media screen and (min-device-pixel-ratio: 1.5) {
    .backButton {
        width: 48px;
        height: 48px;
        background: transparent url('../img/skin/BackButton.scale-200.png') no-repeat 0 0;
        background-size: cover;
    }
}
@media screen and (min-width: 600px) and (orientation: portrait) {
    .controlsContainer {
        max-width: 80%;
        min-width: 280px;
    }
    .QuestionHeaderArt {
        width: 100%;
        height: 25%;
        max-width: 90%;
    }
    .QuestionAnswers {
        padding: 1em 0 0 0;
        width: 100%;
        max-width: 80%;
        min-width: 280px;
        margin: 1em;
    }
    .AnswerView {
        max-width: 100%;
    }
    .AnswerInputContainer {
        width: 70%;
        max-width: 70%;
        min-width: 120px;
        height: 36px;
    }
    .AnswerInputContainer input {
        width: 100%;
        height: 100%;
        padding: 4px;
        margin: 0 auto;
        border-width: 1px;
        border-color: #999;
    }

}
@media screen and (min-width: 721px) and (orientation: portrait) {
    .QuestionHeaderArt {
        width: 100%;
        height: 30%;
        max-width: 90%;
    }
    #ReadStoryContent p {
        font-size: 125%;
    }
    #HomeView_MainMenu {
        width: 50%;
    }
}

@media screen and (min-width: 900px) and (orientation: landscape) {
    .controlsContainer {
        max-width: 80%;
        min-width: 280px;
        margin: 0 auto;
        padding: 0 1em;
    }
    .QuestionHeaderArt {
        width: 100%;
        height: 30%;
        max-width: 90%;
    }
    .QuestionAnswers {
        padding: 1em 0 0 0;
        width: 100%;
        max-width: 80%;
        min-width: 280px;
        margin: 1em;
    }
    .AnswerView {
        max-width: 100%;
    }
    .AnswerInputContainer {
        width: 70%;
        max-width: 70%;
        min-width: 120px;
        height: 36px;
    }
    .AnswerInputContainer input {
        width: 100%;
        height: 100%;
        padding: 4px;
        margin: 0 auto;
        border-width: 1px;
        border-color: #999;
    }
    #ReadStoryContent p {
        font-size: 135%;
    }
}

/* Snapped */
@media screen and (max-width: 320px) and (orientation: portrait) {
    body {
        background: #128b03 url('../img/bkgr/BackgroundSnapped.scale-100.jpg') no-repeat 50% 50%;
        background-size: cover;
    }
    #Dwellings {
        width: 100%;
        height: 70%;
        position: absolute;
        margin: 0 auto;
        bottom: 25%;
        background: transparent url('../img/dwellings/Dwellings-Flat.scale-100.png') no-repeat 0 100%;
        background-size: contain;
    }
    .controlsContainer {
        max-width: 280px;
        min-width: 280px;
        margin: 0 auto;
        padding: 0 1em;
    }
    .QuestionHeaderArt {
        width: 100%;
    }
    .QuestionAnswers {
        padding: 1em 0 0 0;
        width: 90%;
        max-width: 280px;
        min-width: 280px;
        margin: 0 auto;
    }
    .AnswerInputContainer {
        width: 70%;
        min-width: 120px;
        height: 36px;
    }
    .AnswerInputContainer input {
        width: 100%;
        height: 100%;
        padding: 4px;
        margin: 0 auto;
        border-width: 1px;
        border-color: #999;
    }
    .AnswerInputContainer input:focus {
        outline: none;
    }
    label.wordLbl {
        font-size: 12px;
    }
}
@media screen and (max-width: 480px) and (orientation: portrait) {
    body {
        background: #128b03 url('../img/bkgr/BackgroundSnapped.scale-100.jpg') no-repeat 50% 50%;
        background-size: cover;
    }
}
@media screen and (max-width: 480px) and (orientation: portrait) and (min-device-pixel-ratio: 2.0) {
    body {
        background: #128b03 url('../img/bkgr/BackgroundSnapped.scale-180.jpg') no-repeat 50% 50%;
        background-size: cover;
    }
}
@media screen and (max-width: 720px) and (orientation: portrait) {
    #Logo {
        width: 70%;
    }
    #Dwellings {
        width: 100%;
        height: 70%;
        position: absolute;
        margin: 0 auto;
        bottom: 0;
        background: transparent url('../img/dwellings/Dwellings-Flat.scale-100.png') no-repeat 0 100%;
        background-size: contain;
    }
    #HomeView_MainMenu {
        width: 70%;
    }
    .controlsContainer {
        max-width: 90%;
        min-width: 280px;
    }
    .QuestionHeaderArt,
    .HeaderArt {
        width: 100%;
        max-width: 100%;
    }
    #StoryContentOuter {
        width: 100%;
    }
    .QuestionAnswers {
        padding: 1em 0 0 0;
        width: 90%;
        max-width: 90%;
        min-width: 280px;
        margin: 0;
    }
    .AnswerView {
        max-width: 100%;
    }
    .AnswerInputContainer {
        width: 60%;
        max-width: 70%;
        min-width: 120px;
        height: 36px;
    }
    .AnswerInputContainer input {
        width: 100%;
        height: 100%;
        padding: 4px;
        margin: 0 auto;
        border-width: 1px;
        border-color: #999;
    }
}
@media screen and (max-width: 480px) and (orientation: portrait) {
    .QuestionControls button.basicButton {
        max-width: 220px;
        padding: 5%;
        font-size: 110%;
    }
    #ReadStoryViewControls button.basicButton {
        max-width: 220px;
        padding: 5%;
        font-size: 110%;
    }
}
@media screen and (max-width: 600px) and (orientation: landscape) {
    .QuestionAnswers {
        padding: 1em 0 0 0;
        width: 90%;
        max-width: 580px;
        min-width: 280px;
        margin: 0 auto;
    }
    .AnswerView {
        max-width: 100%;
    }
    .AnswerInputContainer {
        width: 60%;
        max-width: 70%;
        min-width: 120px;
        height: 36px;
    }
    .AnswerInputContainer input {
        width: 100%;
        height: 100%;
        padding: 4px;
        margin: 0 auto;
        border-width: 1px;
        border-color: #999;
    }
    .AnswerInputContainer input:focus {
        outline: none;
    }
}

/* Fill */
@media screen and (max-height: 700px) and (orientation: portrait) {
    
}
@media screen and (min-height: 480px) and (orientation: landscape) {
    .QuestionAnswers {
        padding: 0 0 0 0;
        width: 100%;
        max-width: 80%;
        min-width: 280px;
        margin: .25em 1em;
    }
}
@media screen and (max-height: 400px) {
    .QuestionAnswers {
        /*height: 25%;*/
    }
}
@media screen and (max-height: 360px) {
    .QuestionAnswers {
        /*height: 20%;*/
    }
}
@media screen and (max-height: 460px) {
    #Dwellings {
        width: 100%;
        height: 70%;
        position: absolute;
        margin: 0 auto;
        bottom: -10%;
        background: transparent url('../img/dwellings/Dwellings-Flat.scale-100.png') no-repeat 0 100%;
        background-size: contain;
    }
}

@media screen and (max-height: 340px) {
    #HomeView_MainMenu {
        display: none;
        visibility: hidden;
    }
}

@media screen and (max-height: 310px) {
    #Dwellings {
        width: 100%;
        height: 70%;
        position: absolute;
        margin: 0 auto;
        bottom: -20%;
        background: transparent url('../img/dwellings/Dwellings-Flat.scale-100.png') no-repeat 0 100%;
        background-size: contain;
    }
}

@media screen and (max-height: 230px) {
    #Dwellings {
        width: 100%;
        height: 70%;
        position: absolute;
        margin: 0 auto;
        bottom: -30%;
        background: transparent url('../img/dwellings/Dwellings-Flat.scale-100.png') no-repeat 0 100%;
        background-size: contain;
    }
}

/* Story sharing */
.storyForRendering {
    width: 480px;
    height: auto;
    position: absolute;
    background: #FFF url('../img/skin/paper.jpg') repeat-y 0 0;
}
.storyForRendering .HeaderArt {
    width: 480px;
    height: 160px;
    background-position: 50% 50%;
    background-size: cover;
}

/* Promo and version */
.additionalStoryContent {
    padding: 2em;
}
.promoCopy {
    font-size: 80%;
    color: #24981f;
    font-weight: bold;
}
.versionInfo {
    font-size: 50%;
    text-align: right;
    color: #508dee;
}
#StoryDownload {
}
#DownloadContent {
    width: 90%;
    height: 100%;
    margin: 0 auto;
    min-width: 480px;
    max-width: 480px;
    overflow: auto;
}
#DownloadContent h1,
#DownloadContent h2,
#DownloadContent h3,
#DownloadContent h4,
#DownloadContent h5,
#DownloadContent p {
    color: #FFF;
    font-family: sans-serif;
}
#DownloadContent h1 {
    font-size: 125%;
}

/* Windows Phone */
#windowsphone #Logo {
    width: 80%;
    margin-top: 10px;
    margin-left: 10px;
}

#windowsphone #ResumeGameButton {
    display: none;
    visibility: hidden;
}

#windowsphone #Dwellings {
    bottom: 15%;
}

#windowsphone .SocialButtons { 
    left: 10px;
    bottom: 0;
    margin-top: 16px;
}

#windowsphone .iconBtn.Facebook {
    background: transparent url('../img/logos/f_logo.png') no-repeat 0 0;
    background-size: cover;
}
#windowsphone .iconBtn.Twitter {
    background: transparent url('../img/logos/twitter_logo.png') no-repeat 0 0;
    background-size: cover;
}
#windowsphone .iconBtn.Magnate {
    background: transparent url('../img/logos/mgnt_logo.png') no-repeat 0 0;
    background-size: cover;
}
#windowsphone .backButton {
    display: none;
    visibility: hidden;
}

#windowsphone #ReadStoryViewControls .ShareStoryButton {
    visibility: hidden;
    display: none;
}



/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Image replacement
 */
.replaced {
    text-indent: 100%;  
    white-space: nowrap;  
    overflow: hidden;
}
.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    /* IE 6/7 fallback */
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 100%;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   Theses examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-resolution: 144dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
