/* Basics */
body { padding: 0; -webkit-font-smoothing: antialiased; }
section { margin-bottom: 20px; }


/* Body */
#body { position: relative; zoom: 1; }
#body:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }

/* Content */
.content { position: relative; margin: 0 auto; max-width: 960px; }

body.book_list .content,
body.list_detail .content,
body.goal_list .content { max-width: 98%; }

/* Footer */
#footer { position: relative; margin: 100px auto 0 auto; padding: 15px 0; zoom: 1; text-align: center; }
#footer p { color: #bbb; font-size: 70%; font-family: 'freight-sans-pro', helvetica, sans-serif; }
#footer a { color: #999; }
#footer .remove { color: #ff4b65; }

/* UI: Nav */
.ui-nav { position: fixed; left: 0; right: 0; background: rgba(0,0,0,1); z-index: 999; }

.ui-nav .ui-nav-action-home { position: absolute; width: 64; top: 0; bottom: 0; background: url(../images/logo.svg) no-repeat 50% 50%; overflow: hidden; text-indent: -1000px; box-shadow: none; }

.ui-nav-title { padding-top: 12px; font-size: 100%; text-align: center; font-style: italic; }

.ui-nav .ui-tabs { margin: 0 0 0 64px; padding: 0; text-align: left; }
.ui-nav .ui-tabs-wrapper { margin: 0; background: none; box-shadow: none; border: none; border-radius: 0; }
.ui-nav .ui-tab { padding: 16px 24px; border: none; border-radius: 0; text-transform: uppercase; color: #fff; }
.ui-nav .ui-tab:hover { background: rgba(255,255,255,.1); }

.ui-nav-action { position: absolute; top: 0; bottom: 0; }
.ui-nav-action a,
.ui-nav-action button { display: block; padding: 16px 32px 16px 32px; border-radius: 0px; }
.ui-nav-action a:hover { text-decoration: none; }

.ui-nav-action-left { left: 0; }
.ui-nav-action-left a,
.ui-nav-action-left button { background: #444; }

.ui-nav-action-right { right: 0; }
.ui-nav-action-right a,
.ui-nav-action-right button { background: #08a2e2; }


/* UI: Search */
.ui-nav-search { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; border-left: 1px solid #333; }
.ui-nav-search input { position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 0 20px 0 48px; width: 100%; border: none; background: transparent url(../images/spyglass_white.svg) no-repeat; background-position: 14px 13px; background-size: 24px; box-shadow: none; }
.ui-nav-search input:focus { background-color: rgba(255,255,255,.9); background-image: url(../images/spyglass_black.svg); }

.ui-search-results { position: fixed; top: 0; right: 0; bottom: 0; display: none; width: 50%; background: rgba(250,250,250,.98); border-left: 1px solid #eee; z-index: 888; overflow: auto; }
.ui-search-results .ui-list { padding: 64px 16px 16px 16px; }
.ui-search-results-active { display: block; }


/* UI: Tabs */
.ui-tabs { list-style: none; margin: 0 auto 40px auto; padding: 0; zoom: 1; font-family: 'freight-sans-pro', helvetica, sans-serif; font-size: 65%; text-align: center; }

.ui-tabs-wrapper { display: inline-block; border-radius: 2px; border: 1px solid #999; }

.ui-tab { display: inline-block; margin: 0; padding: 8px 32px; color: #999; font-weight: 600;
  -moz-box-sizing: border-box; box-sizing: border-box; }
.ui-tab:hover { text-decoration: none; }

.ui-tab-on { background: #999; color: #fff; }

.ui-tab:first-child { border-radius: 1px 0 0 1px; }
.ui-tab:last-child { border-right: none; border-radius: 0 1px 1px 0; }
.ui-tab:first-child:last-child { border-radius: 1px; }


/* UI: Pagination */
.ui-pagination { margin: 50px 0; text-align: center; }


/* UI: Lede */
.ui-lede { position: relative; padding: 64px 0 32px 0; background-position: 0 0; text-align: center; }

.ui-lede .ui-book-cover { margin: 64px auto 0 auto; width: 200px; height: 300px; }
.ui-lede .ui-book-cover a { width: 200px; height: 300px; }

.ui-lede .ui-actor-pic { margin: 32px auto; }

.ui-lede-title { margin: 32px 0; text-align: center; }
.ui-lede-title h1 { margin-bottom: 2px; }
.ui-lede-title p { font-weight: 300; color: #999; }
.ui-lede-title p a { color: #999; }


/* UI: Feed */
.ui-feed { margin-bottom: 20px; }
.ui-feed:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }


/* UI: Story */
.ui-story { position: relative; margin-bottom: 32px; padding: 0 0 32px 75px; }
.ui-story:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ui-story:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }

.ui-story-actor-pic { position: absolute; top: 6px; left: 0; }
.ui-story-actor-pic a { display: block; width: 60px; height: 60px; background-color: #222; background-position: 50% 50%; background-size: auto 60px; border-radius: 30px; }

.ui-story-actor-book { position: absolute; top: 6px; left: 0; }
.ui-story-actor-book a { display: block; width: 60px; height: 90px; background-color: #222; background-position: 50% 50%; background-size: 60px 90px; }

.ui-story-book { position: absolute; top: 8px; left: 0; }
.ui-story-book a { display: block; width: 60px; height: 90px; background-size: 101% 101%; background-position: 50% 50%; background-color: #eee; background-repeat: no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.3); }

.ui-story-attribution p { margin-bottom: 4px; font-weight: 300; }
.ui-story-actor { font-weight: 600; color: #333; }
.ui-story-object { font-weight: 300; color: #333; }

.ui-story-message >:last-child { margin-bottom: 0; }
.ui-story-message blockquote>:last-child { margin-bottom: 0; }

.ui-story-message .ui-book { margin: 5px 0; width: 100%; }
.ui-story-message .ui-book .ui-book-cover { float: left; margin: 0 10px 0 0; }
.ui-story-message .ui-book .ui-book-cover a { width: 64px; height: 96px; }
.ui-story-message .ui-book h1 { margin-bottom: 5px; margin-top: 5px; font-size: 100%; }
.ui-story-message .ui-book h2 { margin-bottom: 5px; font-size: 100%; }
.ui-story-message .ui-book p { font-size: 80%; }

.ui-story-actions p { margin: 4px 0 0 0; color: #999; font-size: 70%; font-family: 'freight-sans-pro', helvetica, sans-serif; }
.ui-story-timestamp { color: #999; }

.ui-story-book { color: #999; }

body.book_edition #body .ui-story-object,
body.book_edition #body .ui-story .arrow,
body.book_edition #body .ui-story .preposition { display: none; }


/* UI: Actor pick */
.ui-actor { width: 120px; }
.ui-actor p { margin: 5px 10px; font-size: 80%; color: #999; }
.ui-actor-pic { margin: 0 auto; width: 120px; height: 120px; border-radius: 70px; overflow: hidden; }
.ui-actor-pic a { display: block; width: 120px; height: 120px; background-size: auto 120px; background-position: 50% 50%; background-color: #222; border-radius: 70px; }

.ui-grid .ui-actor { width: 80px; }
.ui-grid .ui-actor-pic { width: 80px; height: 80px; }
.ui-grid .ui-actor-pic a { width: 80px; height: 80px; background-size: 80px; }


/* UI: Grid */
.ui-grid { margin-bottom: 20px; padding: 0; text-align: center; }


/* UI: Carousel */
.ui-carousel { position: relative; margin: 0 0 64px 0; padding: 0; height: 192px; overflow: hidden; overflow-x: scroll; white-space: nowrap; }
.ui-carousel:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-carousel .ui-book { display: inline-block; margin: 0 8px 0 0; width: 128px; }
.ui-carousel .ui-book-cover a { width: 128px; height: 184px; }
.ui-carousel .ui-book-cover a:before { width: 4px; }
.ui-carousel .ui-reading-status { display: none; }

/* UI: Help */
.ui-help { margin: 64px auto; max-width: 960px; text-align: center; }
.ui-help h5 { border: none; margin-bottom: 0; }
.ui-help p { font-family: 'freight-text-pro', Times, serif; font-style: italic; color: #999; }
.ui-help p:last-child { margin-bottom: 0; }
.ui-help hr { border-color: #ddd; }

.ui-help .ui-list { text-align: left; }
.ui-help .ui-story { border-color: #ddd; }

/* UI: Spinner */
@-webkit-keyframes rotate {
  from { -webkit-transform: rotate(360deg); }
  to { -webkit-transform: rotate(0deg); }
}

.ui-spinner { margin: 20px auto 0 auto; width: 32px; height: 32px; background: url(../images/spinner.png); background-size: 32px 32px; 
  -webkit-animation-name: rotate; -webkit-animation-duration: 1.1s; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; }

/* UI: Dialog */
body.base-dialog { background: rgba(250,250,250,.98); }
body.base-dialog .content { margin: 64px auto; padding: 32px; max-width: 480px; background: #fff; border: 1px solid #eee; border-radius: 8px; }
